fixed modified project indicator and scrolling
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@619 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -58,7 +58,11 @@ public:
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
int currentBB( void ) const;
|
||||
int currentBB( void ) const
|
||||
{
|
||||
return( m_currentBB );
|
||||
}
|
||||
|
||||
tact FASTCALL lengthOfBB( const int _bb );
|
||||
inline tact lengthOfCurrentBB( void )
|
||||
{
|
||||
@@ -80,11 +84,7 @@ public slots:
|
||||
|
||||
|
||||
protected:
|
||||
virtual void closeEvent( QCloseEvent * _ce );
|
||||
virtual void keyPressEvent( QKeyEvent * _ke );
|
||||
virtual void resizeEvent( QResizeEvent * _re );
|
||||
|
||||
virtual QRect scrollAreaRect( void ) const;
|
||||
|
||||
|
||||
private:
|
||||
@@ -95,6 +95,8 @@ private:
|
||||
void FASTCALL createTCOsForBB( const int _bb );
|
||||
|
||||
|
||||
int m_currentBB;
|
||||
|
||||
QWidget * m_toolBar;
|
||||
|
||||
toolButton * m_playButton;
|
||||
|
||||
@@ -58,7 +58,14 @@ public:
|
||||
int addWidgetToToolBar( QWidget * _w, int _row = -1, int _col = -1 );
|
||||
void addSpacingToToolBar( int _size );
|
||||
|
||||
void resetWindowTitle( void );
|
||||
void resetWindowTitle( bool _modified = FALSE );
|
||||
|
||||
|
||||
// every function that replaces current file (e.g. creates new file,
|
||||
// opens another file...) has to call this before and may only process
|
||||
// if this function returns true
|
||||
bool mayChangeProject( void );
|
||||
|
||||
|
||||
void clearKeyModifiers( void );
|
||||
|
||||
@@ -151,6 +158,8 @@ private:
|
||||
QMenu * m_tools_menu;
|
||||
QList<tool *> m_tools;
|
||||
|
||||
bool m_modified;
|
||||
|
||||
|
||||
friend class engine;
|
||||
|
||||
|
||||
@@ -133,12 +133,6 @@ public:
|
||||
virtual automationPattern * tempoAutomationPattern( void );
|
||||
|
||||
|
||||
// every function that replaces current file (e.g. creates new file,
|
||||
// opens another file...) has to call this before and may only process
|
||||
// if this function returns true
|
||||
bool mayChangeProject( void );
|
||||
|
||||
|
||||
// file management
|
||||
void createNewProject( void );
|
||||
void FASTCALL createNewProjectFromTemplate( const QString & _template );
|
||||
@@ -189,14 +183,10 @@ public slots:
|
||||
|
||||
|
||||
protected:
|
||||
virtual void closeEvent( QCloseEvent * _ce );
|
||||
virtual void resizeEvent( QResizeEvent * _re );
|
||||
virtual void keyPressEvent( QKeyEvent * _ke );
|
||||
virtual void wheelEvent( QWheelEvent * _we );
|
||||
virtual void paintEvent( QPaintEvent * _pe );
|
||||
|
||||
virtual QRect scrollAreaRect( void ) const;
|
||||
|
||||
virtual bool allowRubberband( void ) const;
|
||||
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ public:
|
||||
public slots:
|
||||
void insertTact( const midiTime & _pos );
|
||||
void removeTact( const midiTime & _pos );
|
||||
void updateTCOs( void );
|
||||
void update( void );
|
||||
|
||||
|
||||
protected:
|
||||
@@ -338,7 +338,6 @@ public:
|
||||
return( m_action == MOVE_TRACK );
|
||||
}
|
||||
|
||||
virtual void repaint( void );
|
||||
virtual void update( void );
|
||||
|
||||
|
||||
@@ -511,8 +510,6 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
typedef QVector<track *> trackVector;
|
||||
typedef QVector<const track *> constTrackVector;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,9 +36,7 @@
|
||||
#include "journalling_object.h"
|
||||
|
||||
|
||||
|
||||
const Uint16 DEFAULT_PIXELS_PER_TACT = 16;
|
||||
const Uint16 DEFAULT_SCROLLBAR_SIZE = 16;
|
||||
class QVBoxLayout;
|
||||
|
||||
|
||||
|
||||
@@ -49,7 +47,7 @@ public:
|
||||
trackContainer( void );
|
||||
virtual ~trackContainer();
|
||||
|
||||
inline QWidget * containerWidget( void )
|
||||
QWidget * contentWidget( void )
|
||||
{
|
||||
return( m_scrollArea );
|
||||
}
|
||||
@@ -93,7 +91,7 @@ public:
|
||||
void FASTCALL moveTrackUp( track * _track );
|
||||
void FASTCALL moveTrackDown( track * _track );
|
||||
|
||||
void FASTCALL realignTracks( bool _complete_update = FALSE );
|
||||
void FASTCALL realignTracks( void );
|
||||
void clearAllTracks( void );
|
||||
|
||||
const trackWidget * trackWidgetAt( const int _y ) const;
|
||||
@@ -116,7 +114,7 @@ public:
|
||||
return( foo );*/
|
||||
}
|
||||
|
||||
trackVector tracks( void );
|
||||
QList<track *> tracks( void );
|
||||
|
||||
static const QString classNodeName( void )
|
||||
{
|
||||
@@ -124,7 +122,13 @@ public:
|
||||
}
|
||||
|
||||
|
||||
signals:
|
||||
void positionChanged( const midiTime & _pos );
|
||||
|
||||
|
||||
protected:
|
||||
static const Uint16 DEFAULT_PIXELS_PER_TACT = 16;
|
||||
|
||||
virtual void undoStep( journalEntry & _je );
|
||||
virtual void redoStep( journalEntry & _je );
|
||||
|
||||
@@ -137,18 +141,10 @@ protected:
|
||||
|
||||
virtual void resizeEvent( QResizeEvent * );
|
||||
|
||||
constTrackVector tracks( void ) const;
|
||||
|
||||
virtual QRect scrollAreaRect( void ) const
|
||||
{
|
||||
return( rect() );
|
||||
}
|
||||
const QList<track *> tracks( void ) const;
|
||||
|
||||
midiTime m_currentPosition;
|
||||
|
||||
protected slots:
|
||||
void updateScrollArea( void );
|
||||
|
||||
|
||||
private:
|
||||
enum actions
|
||||
@@ -172,19 +168,14 @@ private:
|
||||
|
||||
|
||||
scrollArea * m_scrollArea;
|
||||
typedef QVector<trackWidget *> trackWidgetVector;
|
||||
QVBoxLayout * m_scrollLayout;
|
||||
|
||||
trackWidgetVector m_trackWidgets;
|
||||
QList<track *> m_tracks;
|
||||
float m_ppt;
|
||||
|
||||
rubberBand * m_rubberBand;
|
||||
QPoint m_origin;
|
||||
|
||||
|
||||
signals:
|
||||
void positionChanged( const midiTime & _pos );
|
||||
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user