Merge pull request #1495 from DanWin/window
Hide windows instead of closing them when clicking on close
This commit is contained in:
@@ -61,6 +61,9 @@ public slots:
|
||||
void addSteps();
|
||||
void removeSteps();
|
||||
|
||||
protected:
|
||||
virtual void closeEvent( QCloseEvent * _ce );
|
||||
|
||||
private:
|
||||
virtual void keyPressEvent( QKeyEvent * _ke );
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#define CONTROLLER_RACK_VIEW_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QCloseEvent>
|
||||
|
||||
#include "SerializingObject.h"
|
||||
#include "lmms_basics.h"
|
||||
@@ -56,6 +57,8 @@ public:
|
||||
public slots:
|
||||
void deleteController( ControllerView * _view );
|
||||
|
||||
protected:
|
||||
virtual void closeEvent( QCloseEvent * _ce );
|
||||
|
||||
private slots:
|
||||
virtual void update();
|
||||
|
||||
@@ -99,6 +99,9 @@ public:
|
||||
// make sure the display syncs up with the fx mixer.
|
||||
// useful for loading projects
|
||||
void refreshDisplay();
|
||||
|
||||
protected:
|
||||
virtual void closeEvent( QCloseEvent * _ce );
|
||||
|
||||
private slots:
|
||||
void updateFaders();
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#define PROJECT_NOTES_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QCloseEvent>
|
||||
|
||||
#include "JournallingObject.h"
|
||||
|
||||
@@ -56,6 +57,7 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
virtual void closeEvent( QCloseEvent * _ce );
|
||||
void setupActions();
|
||||
|
||||
|
||||
|
||||
@@ -65,6 +65,8 @@ public:
|
||||
public slots:
|
||||
void scrolled( int _new_pos );
|
||||
|
||||
protected:
|
||||
virtual void closeEvent( QCloseEvent * _ce );
|
||||
|
||||
private slots:
|
||||
void setHighQuality( bool );
|
||||
|
||||
@@ -322,4 +322,16 @@ void BBEditor::keyPressEvent( QKeyEvent * _ke )
|
||||
|
||||
|
||||
|
||||
void BBEditor::closeEvent( QCloseEvent * _ce )
|
||||
{
|
||||
if( parentWidget() )
|
||||
{
|
||||
parentWidget()->hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
hide();
|
||||
}
|
||||
_ce->ignore();
|
||||
}
|
||||
|
||||
|
||||
@@ -480,6 +480,21 @@ void FxMixerView::keyPressEvent(QKeyEvent * e)
|
||||
|
||||
|
||||
|
||||
void FxMixerView::closeEvent( QCloseEvent * _ce )
|
||||
{
|
||||
if( parentWidget() )
|
||||
{
|
||||
parentWidget()->hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
hide();
|
||||
}
|
||||
_ce->ignore();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void FxMixerView::setCurrentFxLine( int _line )
|
||||
{
|
||||
if( _line >= 0 && _line < m_fxChannelViews.size() )
|
||||
|
||||
@@ -576,6 +576,21 @@ void SongEditor::wheelEvent( QWheelEvent * _we )
|
||||
|
||||
|
||||
|
||||
void SongEditor::closeEvent( QCloseEvent * _ce )
|
||||
{
|
||||
if( parentWidget() )
|
||||
{
|
||||
parentWidget()->hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
hide();
|
||||
}
|
||||
_ce->ignore();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void SongEditor::masterVolumeChanged( int _new_val )
|
||||
{
|
||||
|
||||
@@ -195,4 +195,16 @@ void ControllerRackView::addController()
|
||||
|
||||
|
||||
|
||||
void ControllerRackView::closeEvent( QCloseEvent * _ce )
|
||||
{
|
||||
if( parentWidget() )
|
||||
{
|
||||
parentWidget()->hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
hide();
|
||||
}
|
||||
_ce->ignore();
|
||||
}
|
||||
|
||||
|
||||
@@ -396,4 +396,17 @@ void ProjectNotes::loadSettings( const QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
void ProjectNotes::closeEvent( QCloseEvent * _ce )
|
||||
{
|
||||
if( parentWidget() )
|
||||
{
|
||||
parentWidget()->hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
hide();
|
||||
}
|
||||
_ce->ignore();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user