properly save and restore position, size, visibility and state of MDI-subwindows
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1569 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -27,25 +27,31 @@
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#include "serializing_object.h"
|
||||
#include "types.h"
|
||||
|
||||
#include "mv_base.h"
|
||||
|
||||
class QPushButton;
|
||||
class QScrollArea;
|
||||
class QVBoxLayout;
|
||||
//class QVBoxLayout;
|
||||
|
||||
class controllerView;
|
||||
|
||||
|
||||
class controllerRackView : public QWidget, public modelView
|
||||
class controllerRackView : public QWidget, public serializingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
controllerRackView();
|
||||
virtual ~controllerRackView();
|
||||
|
||||
void clear( void );
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
|
||||
inline virtual QString nodeName( void ) const
|
||||
{
|
||||
return( "controllerrackview" );
|
||||
}
|
||||
|
||||
|
||||
public slots:
|
||||
@@ -56,24 +62,11 @@ private slots:
|
||||
virtual void update( void );
|
||||
void addController( void );
|
||||
|
||||
|
||||
private:
|
||||
/*virtual void modelChanged( void );
|
||||
|
||||
inline effectChain * fxChain( void )
|
||||
{
|
||||
return( castModel<effectChain>() );
|
||||
}
|
||||
|
||||
inline const effectChain * fxChain( void ) const
|
||||
{
|
||||
return( castModel<effectChain>() );
|
||||
}
|
||||
*/
|
||||
|
||||
QVector<controllerView *> m_controllerViews;
|
||||
|
||||
QVBoxLayout * m_mainLayout;
|
||||
//groupBox * m_effectsGroupBox;
|
||||
QScrollArea * m_scrollArea;
|
||||
QPushButton * m_addButton;
|
||||
|
||||
|
||||
@@ -40,13 +40,17 @@ class pixmapButton;
|
||||
|
||||
|
||||
|
||||
class fxMixerView : public QWidget, public modelView
|
||||
class fxMixerView : public QWidget, public modelView,
|
||||
public serializingObjectHook
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
fxMixerView();
|
||||
virtual ~fxMixerView();
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _this );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
|
||||
fxLine * currentFxLine( void )
|
||||
{
|
||||
return( m_currentFxLine );
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#ifndef _MAIN_WINDOW_H
|
||||
#define _MAIN_WINDOW_H
|
||||
|
||||
#include <QtCore/QBasicTimer>
|
||||
#include <QtCore/QList>
|
||||
#include <QtGui/QMainWindow>
|
||||
#include <QtGui/QWhatsThis>
|
||||
@@ -120,6 +121,7 @@ protected:
|
||||
virtual void focusOutEvent( QFocusEvent * _fe );
|
||||
virtual void keyPressEvent( QKeyEvent * _ke );
|
||||
virtual void keyReleaseEvent( QKeyEvent * _ke );
|
||||
virtual void timerEvent( QTimerEvent * _ev );
|
||||
|
||||
|
||||
private:
|
||||
@@ -157,6 +159,8 @@ private:
|
||||
QMenu * m_toolsMenu;
|
||||
QList<pluginView *> m_tools;
|
||||
|
||||
QBasicTimer m_updateTimer;
|
||||
|
||||
|
||||
friend class engine;
|
||||
|
||||
@@ -168,6 +172,10 @@ private slots:
|
||||
void showTool( QAction * _idx );
|
||||
void updateRecentlyOpenedProjectsMenu( void );
|
||||
|
||||
|
||||
signals:
|
||||
void periodicUpdate( void );
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#include "combobox_model.h"
|
||||
#include "journalling_object.h"
|
||||
#include "serializing_object.h"
|
||||
#include "note.h"
|
||||
#include "types.h"
|
||||
|
||||
@@ -46,7 +46,7 @@ class timeLine;
|
||||
class toolButton;
|
||||
|
||||
|
||||
class pianoRoll : public QWidget, public journallingObject
|
||||
class pianoRoll : public QWidget, public serializingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -72,6 +72,7 @@ public:
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
|
||||
inline virtual QString nodeName( void ) const
|
||||
{
|
||||
return( "pianoroll" );
|
||||
|
||||
@@ -37,7 +37,7 @@ class QTextCharFormat;
|
||||
class QTextEdit;
|
||||
|
||||
|
||||
class EXPORT projectNotes : public QMainWindow, public journallingObject
|
||||
class EXPORT projectNotes : public QMainWindow, public serializingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -49,6 +49,7 @@ public:
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
|
||||
inline virtual QString nodeName( void ) const
|
||||
{
|
||||
return( "projectnotes" );
|
||||
|
||||
@@ -66,13 +66,6 @@ public:
|
||||
|
||||
void clearAllTracks( void );
|
||||
|
||||
/*
|
||||
trackList & tracks( void )
|
||||
{
|
||||
return( m_tracks );
|
||||
}
|
||||
*/
|
||||
|
||||
const trackList & tracks( void ) const
|
||||
{
|
||||
return( m_tracks );
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
#ifndef _TRACK_CONTAINER_VIEW_H
|
||||
#define _TRACK_CONTAINER_VIEW_H
|
||||
|
||||
#include <QtGui/QScrollArea>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtGui/QScrollArea>
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
|
||||
@@ -40,13 +40,17 @@ class trackContainer;
|
||||
|
||||
|
||||
class trackContainerView : public QWidget, public modelView,
|
||||
public journallingObject
|
||||
public journallingObject,
|
||||
public serializingObjectHook
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
trackContainerView( trackContainer * _tc );
|
||||
virtual ~trackContainerView();
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _this );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
|
||||
QWidget * contentWidget( void )
|
||||
{
|
||||
return( m_scrollArea );
|
||||
|
||||
Reference in New Issue
Block a user