Label for tooltip.
This commit is contained in:
parent
9c05894dac
commit
67fc4b7539
|
@ -59,7 +59,8 @@ QT_WARNING_POP
|
||||||
VPMainWindow::VPMainWindow(const VPCommandLinePtr &cmd, QWidget *parent) :
|
VPMainWindow::VPMainWindow(const VPCommandLinePtr &cmd, QWidget *parent) :
|
||||||
VAbstractMainWindow(parent),
|
VAbstractMainWindow(parent),
|
||||||
ui(new Ui::VPMainWindow),
|
ui(new Ui::VPMainWindow),
|
||||||
m_cmd(cmd)
|
m_cmd(cmd),
|
||||||
|
m_statusLabel(new QLabel(this))
|
||||||
{
|
{
|
||||||
// create a standard sheet
|
// create a standard sheet
|
||||||
auto *sheet = new VPSheet(m_layout);
|
auto *sheet = new VPSheet(m_layout);
|
||||||
|
@ -90,6 +91,9 @@ VPMainWindow::VPMainWindow(const VPCommandLinePtr &cmd, QWidget *parent) :
|
||||||
m_tileFactory = new VPTileFactory(m_layout, VPApplication::VApp()->Settings());
|
m_tileFactory = new VPTileFactory(m_layout, VPApplication::VApp()->Settings());
|
||||||
m_tileFactory->refreshTileInfos();
|
m_tileFactory->refreshTileInfos();
|
||||||
|
|
||||||
|
// init status bar
|
||||||
|
statusBar()->addPermanentWidget(m_statusLabel, 1);
|
||||||
|
|
||||||
SetupMenu();
|
SetupMenu();
|
||||||
InitProperties();
|
InitProperties();
|
||||||
InitCarrousel();
|
InitCarrousel();
|
||||||
|
@ -948,6 +952,12 @@ void VPMainWindow::on_actionNew_triggered()
|
||||||
VPApplication::VApp()->NewMainWindow();
|
VPApplication::VApp()->NewMainWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void VPMainWindow::ShowToolTip(const QString &toolTip)
|
||||||
|
{
|
||||||
|
m_statusLabel->setText(toolTip);
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VPMainWindow::closeEvent(QCloseEvent *event)
|
void VPMainWindow::closeEvent(QCloseEvent *event)
|
||||||
{
|
{
|
||||||
|
|
|
@ -90,6 +90,8 @@ public slots:
|
||||||
*/
|
*/
|
||||||
void on_actionNew_triggered();
|
void on_actionNew_triggered();
|
||||||
|
|
||||||
|
virtual void ShowToolTip(const QString &toolTip) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void closeEvent(QCloseEvent *event) override;
|
virtual void closeEvent(QCloseEvent *event) override;
|
||||||
virtual void changeEvent(QEvent* event) override;
|
virtual void changeEvent(QEvent* event) override;
|
||||||
|
@ -415,6 +417,8 @@ private:
|
||||||
*/
|
*/
|
||||||
QLabel* m_mouseCoordinate{nullptr};
|
QLabel* m_mouseCoordinate{nullptr};
|
||||||
|
|
||||||
|
QLabel* m_statusLabel{nullptr};
|
||||||
|
|
||||||
QString curFile{};
|
QString curFile{};
|
||||||
|
|
||||||
bool isInitialized{false};
|
bool isInitialized{false};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user