Mercurial > hg > easaier-soundaccess
comparison widgets/PropertyBox.cpp @ 183:2e81141893db
resolve problem with hide and show action of the PropertyBox
author | lbajardsilogic |
---|---|
date | Fri, 23 Nov 2007 11:18:39 +0000 |
parents | 7386cd014f52 |
children | 6a574a1abfc8 |
comparison
equal
deleted
inserted
replaced
182:7386cd014f52 | 183:2e81141893db |
---|---|
93 m_layout->setRowStretch(m_layout->rowCount(), 10); | 93 m_layout->setRowStretch(m_layout->rowCount(), 10); |
94 | 94 |
95 connect(UnitDatabase::getInstance(), SIGNAL(unitDatabaseChanged()), | 95 connect(UnitDatabase::getInstance(), SIGNAL(unitDatabaseChanged()), |
96 this, SLOT(unitDatabaseChanged())); | 96 this, SLOT(unitDatabaseChanged())); |
97 | 97 |
98 move(MainWindow::instance()->pos().x() + 3*MainWindow::instance()->width()/4, | 98 setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint); |
99 MainWindow::instance()->pos().y() + 3*MainWindow::instance()->height()/5); | |
100 | 99 |
101 #ifdef DEBUG_PROPERTY_BOX | 100 #ifdef DEBUG_PROPERTY_BOX |
102 std::cerr << "PropertyBox[" << this << "]::PropertyBox returning" << std::endl; | 101 std::cerr << "PropertyBox[" << this << "]::PropertyBox returning" << std::endl; |
103 #endif | 102 #endif |
104 } | 103 } |
766 if (!(QApplication::mouseButtons() & Qt::LeftButton)) { | 765 if (!(QApplication::mouseButtons() & Qt::LeftButton)) { |
767 emit contextHelpChanged(""); | 766 emit contextHelpChanged(""); |
768 } | 767 } |
769 } | 768 } |
770 | 769 |
770 void PropertyBox::showNormal() | |
771 { | |
772 if (!isVisible()) | |
773 { | |
774 move(MainWindow::instance()->pos().x() + 3*MainWindow::instance()->width()/4, | |
775 MainWindow::instance()->pos().y() + 3*MainWindow::instance()->height()/5); | |
776 } | |
777 QWidget::showNormal(); | |
778 activateWindow(); | |
779 } | |
771 | 780 |
772 LEDButton* PropertyBox::showButton(){ | 781 LEDButton* PropertyBox::showButton(){ |
773 return m_showButton; | 782 return m_showButton; |
774 } | 783 } |
775 LEDButton* PropertyBox::playButton(){ | 784 LEDButton* PropertyBox::playButton(){ |
777 } | 786 } |
778 | 787 |
779 PropertyContainer* PropertyBox::container(){ | 788 PropertyContainer* PropertyBox::container(){ |
780 return m_container; | 789 return m_container; |
781 } | 790 } |
791 |