GUI-improvements, zooming-selectboxes in piano-roll and song-editor and more

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@12 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2005-09-29 07:18:55 +00:00
parent f64b25ba44
commit b3754454cd
16 changed files with 297 additions and 110 deletions

View File

@@ -49,11 +49,12 @@
#include "spc_bg_hndl_widget.h"
class envelopeTabWidget;
class pixmapButton;
class knob;
class QPaintEvent;
class QPixmap;
class envelopeTabWidget;
class knob;
class ledCheckBox;
class pixmapButton;
@@ -145,8 +146,8 @@ private:
pixmapButton * m_sqrLfoBtn;
static QPixmap * s_lfoGraph;
pixmapButton * m_x100Btn;
pixmapButton * m_controlEnvAmountBtn;
ledCheckBox * m_x100Cb;
ledCheckBox * m_controlEnvAmountCb;
Uint32 m_lfoPredelayFrames;
Uint32 m_lfoAttackFrames;

View File

@@ -53,6 +53,29 @@ public:
ledColors _color = YELLOW );
virtual ~ledCheckBox();
#ifdef QT4
inline virtual bool isChecked( void ) const
{
return( checkState() == Qt::Checked );
}
#else
inline virtual bool isOn( void ) const
{
return( state() == On );
}
#endif
#ifdef QT4
inline virtual void setChecked( bool _on )
#else
inline virtual void setOn( bool _on )
#endif
{
if( _on != isChecked() )
{
toggle();
}
}
protected:
virtual void paintEvent( QPaintEvent * _pe );

View File

@@ -44,9 +44,10 @@
#include "note.h"
class QScrollBar;
class QComboBox;
class QPainter;
class QPixmap;
class QScrollBar;
class crystalButton;
class pattern;
@@ -122,6 +123,8 @@ protected slots:
void updatePosition( const midiTime & _t );
void zoomingChanged( const QString & _zfac );
private:
@@ -180,6 +183,9 @@ private:
crystalButton * m_copyButton;
crystalButton * m_pasteButton;
QComboBox * m_zoomingComboBox;
pattern * m_pattern;
QScrollBar * m_leftRightScroll;
QScrollBar * m_topBottomScroll;

View File

@@ -44,12 +44,14 @@
#include "types.h"
class QComboBox;
class QLabel;
class QPixmap;
class QPushButton;
class QScrollBar;
class QSlider;
class QToolButton;
class exportProjectDialog;
class lcdSpinBox;
class pattern;
@@ -243,6 +245,8 @@ protected slots:
void updatePosition( const midiTime & _t );
void zoomingChanged( const QString & _zfac );
private:
songEditor();
@@ -288,6 +292,7 @@ private:
QToolButton * m_insertTactButton;
QToolButton * m_removeTactButton;
QComboBox * m_zoomingComboBox;
QString m_fileName;

View File

@@ -30,30 +30,52 @@
#ifdef QT4
#include <QWidget>
#include <QVector>
#include <QMap>
#else
#include <qwidget.h>
#include <qvaluevector.h>
#include <qmap.h>
#include "spc_bg_hndl_widget.h"
#endif
class tabWidget : public QWidget
#ifndef QT4
, public specialBgHandlingWidget
#endif
{
Q_OBJECT
public:
tabWidget( const QString & _caption, QWidget * _parent );
~tabWidget();
void addTab( QWidget * _w, const QString & _name );
void addTab( QWidget * _w, const QString & _name, int _idx = -1 );
inline void setActiveTab( int _idx )
{
if( m_widgets.contains( _idx ) )
{
m_activeTab = _idx;
m_widgets[m_activeTab].w->raise();
update();
}
}
inline int activeTab( void ) const
{
return( m_activeTab );
}
protected:
virtual void mousePressEvent( QMouseEvent * _me );
virtual void paintEvent( QPaintEvent * _pe );
virtual void resizeEvent( QResizeEvent * _re );
virtual void wheelEvent( QWheelEvent * _we );
private:
@@ -63,10 +85,10 @@ private:
QString name; // name for widget
int nwidth; // width of name when painting
} ;
typedef vvector<widgetDesc> widgetStack;
typedef QMap<int, widgetDesc> widgetStack;
widgetStack m_widgets;
int m_curWidget;
int m_activeTab;
QString m_caption;
} ;

View File

@@ -1,5 +1,6 @@
/*
* track_container.h - base-class for all track-containers like Playlist-Editor, BB-Editor...
* track_container.h - base-class for all track-containers like Song-Editor,
* BB-Editor...
*
* Linux MultiMedia Studio
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
@@ -46,6 +47,8 @@
#include "settings.h"
const Uint16 DEFAULT_PIXELS_PER_TACT = 16;
class trackContainer : public QMainWindow, public settings
{