QMdiArea, first attempt
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@597 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
4
AUTHORS
4
AUTHORS
@@ -10,6 +10,10 @@ Javier Serrano Polo
|
||||
<jasp00/at/terra/dot/es>
|
||||
development
|
||||
|
||||
Paul Giblock
|
||||
<drfaygo/at/gmail/dot/com>
|
||||
development
|
||||
|
||||
Zolo
|
||||
<the-zolo/at/gmx/dot/de>
|
||||
theme "Blue Scene"
|
||||
|
||||
15
acinclude.m4
15
acinclude.m4
@@ -7,13 +7,13 @@ AC_REQUIRE([AC_PATH_X])
|
||||
AC_MSG_CHECKING([QTDIR])
|
||||
AC_ARG_WITH([qtdir], [ --with-qtdir=DIR Qt installation directory [default=$QTDIR]], QTDIR=$withval)
|
||||
# Check that QTDIR is defined or that --with-qtdir given
|
||||
if test x"$QTDIR" = x ; then
|
||||
#if test x"$QTDIR" = x ; then
|
||||
# some usual Qt-locations
|
||||
QT_SEARCH="/usr /usr/lib/qt4 /usr/share/qt4 /usr/local/Trolltech/Qt-4.3.0 /usr/local/Trolltech/Qt-4.3.1 /usr/local/Trolltech/Qt-4.1.0"
|
||||
else
|
||||
QT_SEARCH=$QTDIR
|
||||
QTDIR=""
|
||||
fi
|
||||
QT_SEARCH="/home/llama/projects/lmms/lmms/qtdir /usr/local/Trolltech/Qt-4.3.0 /usr/local/Trolltech/Qt-4.3.1 /usr/local/Trolltech/Qt-4.1.0"
|
||||
#else
|
||||
# QT_SEARCH=$QTDIR
|
||||
# QTDIR=""
|
||||
#fi
|
||||
for i in $QT_SEARCH ; do
|
||||
QT_INCLUDE_SEARCH="include/qt4 include"
|
||||
for j in $QT_INCLUDE_SEARCH ; do
|
||||
@@ -23,6 +23,9 @@ for i in $QT_SEARCH ; do
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
QTDIR="/home/llama/projects/lmms/qtdir"
|
||||
QT_INCLUDES="/home/llama/projects/lmms/qtdir/include"
|
||||
if test x"$QTDIR" = x ; then
|
||||
AC_MSG_ERROR([*** QTDIR must be defined, or --with-qtdir option given])
|
||||
fi
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QMdiSubWindow>
|
||||
|
||||
#include "midi_event_processor.h"
|
||||
#include "mixer.h"
|
||||
@@ -54,7 +55,7 @@ class surroundArea;
|
||||
class volumeKnob;
|
||||
|
||||
|
||||
class instrumentTrack : public QWidget, public track, public midiEventProcessor
|
||||
class instrumentTrack : public QMdiSubWindow, public track, public midiEventProcessor
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
@@ -34,7 +34,7 @@ class QAction;
|
||||
class QDomElement;
|
||||
class QGridLayout;
|
||||
class QSplashScreen;
|
||||
class QWorkspace;
|
||||
class QMdiArea;
|
||||
|
||||
class configManager;
|
||||
class tool;
|
||||
@@ -45,7 +45,7 @@ class mainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
inline QWorkspace * workspace( void )
|
||||
inline QMdiArea * workspace( void )
|
||||
{
|
||||
return( m_workspace );
|
||||
}
|
||||
@@ -124,7 +124,7 @@ private:
|
||||
void finalize( void );
|
||||
|
||||
|
||||
QWorkspace * m_workspace;
|
||||
QMdiArea * m_workspace;
|
||||
|
||||
QWidget * m_toolBar;
|
||||
QGridLayout * m_toolBarLayout;
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
class QGroupBox;
|
||||
class QLabel;
|
||||
class QPushButton;
|
||||
class QMdiSubWindow;
|
||||
|
||||
class audioPort;
|
||||
class effect;
|
||||
@@ -94,6 +95,7 @@ private:
|
||||
QGroupBox * m_controls;
|
||||
QLabel * m_label;
|
||||
QPushButton * m_editButton;
|
||||
QMdiSubWindow *m_subWindow;
|
||||
effect * m_effect;
|
||||
effectControlDialog * m_controlView;
|
||||
track * m_track;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include <QtGui/QScrollArea>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtGui/QMainWindow>
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
|
||||
#include "track.h"
|
||||
@@ -42,7 +42,7 @@ const Uint16 DEFAULT_SCROLLBAR_SIZE = 16;
|
||||
|
||||
|
||||
|
||||
class trackContainer : public QMainWindow, public journallingObject
|
||||
class trackContainer : public QWidget, public journallingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -54,6 +54,15 @@ public:
|
||||
return( m_scrollArea );
|
||||
}
|
||||
|
||||
#warning centralWidget is obsolete
|
||||
QWidget * centralWidget() const {
|
||||
return (QWidget*)this;
|
||||
}
|
||||
|
||||
void setCentralWidget( QWidget *cw ) {
|
||||
//m_centralWidget = cw;
|
||||
}
|
||||
|
||||
virtual void FASTCALL saveSettings( QDomDocument & _doc,
|
||||
QDomElement & _parent );
|
||||
|
||||
@@ -98,7 +107,6 @@ public:
|
||||
|
||||
const trackWidget * trackWidgetAt( const int _y ) const;
|
||||
|
||||
|
||||
virtual bool allowRubberband( void ) const;
|
||||
|
||||
inline bool rubberBandActive( void ) const
|
||||
@@ -131,11 +139,15 @@ protected:
|
||||
|
||||
virtual void dragEnterEvent( QDragEnterEvent * _dee );
|
||||
virtual void dropEvent( QDropEvent * _de );
|
||||
virtual void mousePressEvent( QMouseEvent * _me );
|
||||
|
||||
virtual void mousePressEvent( QMouseEvent * _me );
|
||||
virtual void mouseMoveEvent( QMouseEvent * _me );
|
||||
virtual void mouseReleaseEvent( QMouseEvent * _me );
|
||||
|
||||
virtual void resizeEvent( QResizeEvent * );
|
||||
|
||||
void addToWorkspace();
|
||||
|
||||
constTrackVector tracks( void ) const;
|
||||
|
||||
virtual QRect scrollAreaRect( void ) const
|
||||
@@ -145,7 +157,6 @@ protected:
|
||||
|
||||
midiTime m_currentPosition;
|
||||
|
||||
|
||||
protected slots:
|
||||
void updateScrollArea( void );
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
virtual inline effectControlDialog * createControlDialog( track * )
|
||||
{
|
||||
return( new bassBoosterControlDialog(
|
||||
engine::getMainWindow()->workspace(),
|
||||
NULL /*engine::getMainWindow()->workspace()*/,
|
||||
this ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
track * _track )
|
||||
{
|
||||
return( new ladspaControlDialog(
|
||||
engine::getMainWindow()->workspace(),
|
||||
NULL /*engine::getMainWindow()->workspace()*/,
|
||||
this, _track ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtGui/QLayout>
|
||||
#include <QtGui/QMdiArea>
|
||||
|
||||
#else
|
||||
|
||||
@@ -38,7 +39,7 @@
|
||||
|
||||
|
||||
|
||||
stereoEnhancerControlDialog::stereoEnhancerControlDialog( QWidget * _parent,
|
||||
stereoEnhancerControlDialog::stereoEnhancerControlDialog( QMdiArea * _parent,
|
||||
stereoEnhancerEffect * _eff ) :
|
||||
effectControlDialog( _parent, _eff ),
|
||||
m_effect( _eff )
|
||||
|
||||
@@ -29,13 +29,14 @@
|
||||
|
||||
class knob;
|
||||
class stereoEnhancerEffect;
|
||||
class QMdiArea;
|
||||
|
||||
|
||||
class stereoEnhancerControlDialog : public effectControlDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
stereoEnhancerControlDialog( QWidget * _parent, stereoEnhancerEffect * _eff );
|
||||
stereoEnhancerControlDialog( QMdiArea * _parent, stereoEnhancerEffect * _eff );
|
||||
virtual ~stereoEnhancerControlDialog()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QScrollBar>
|
||||
#include <QtGui/QWheelEvent>
|
||||
#include <QtGui/QWorkspace>
|
||||
#include <QtGui/QMdiArea>
|
||||
|
||||
|
||||
#ifndef __USE_XOPEN
|
||||
@@ -74,7 +74,7 @@ QPixmap * automationEditor::s_toolMove = NULL;
|
||||
|
||||
|
||||
automationEditor::automationEditor( void ) :
|
||||
QWidget( engine::getMainWindow()->workspace() ),
|
||||
QWidget( ),
|
||||
m_pattern( NULL ),
|
||||
m_min_level( 0 ),
|
||||
m_max_level( 0 ),
|
||||
@@ -113,12 +113,6 @@ automationEditor::automationEditor( void ) :
|
||||
"edit_move" ) );
|
||||
}
|
||||
|
||||
// add us to workspace
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addWindow( this );
|
||||
}
|
||||
|
||||
// add time-line
|
||||
m_timeLine = new timeLine( VALUES_WIDTH, 32, m_ppt,
|
||||
engine::getSongEditor()->getPlayPos(
|
||||
@@ -333,12 +327,18 @@ automationEditor::automationEditor( void ) :
|
||||
|
||||
// setup our actual window
|
||||
setWindowIcon( embed::getIconPixmap( "automation" ) );
|
||||
resize( INITIAL_WIDTH, INITIAL_HEIGHT );
|
||||
setCurrentPattern( NULL );
|
||||
|
||||
setMouseTracking( TRUE );
|
||||
|
||||
hide();
|
||||
// add us to workspace
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
}
|
||||
|
||||
parentWidget()->resize( INITIAL_WIDTH, INITIAL_HEIGHT );
|
||||
parentWidget()->hide();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -250,7 +250,7 @@ void automationPattern::loadSettings( const QDomElement & _this )
|
||||
void automationPattern::openInAutomationEditor( void )
|
||||
{
|
||||
engine::getAutomationEditor()->setCurrentPattern( this );
|
||||
engine::getAutomationEditor()->show();
|
||||
engine::getAutomationEditor()->parentWidget()->show();
|
||||
engine::getAutomationEditor()->setFocus();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <QtGui/QKeyEvent>
|
||||
#include <QtGui/QCloseEvent>
|
||||
#include <QtGui/QLayout>
|
||||
#include <QtGui/QMdiArea>
|
||||
|
||||
|
||||
#include "bb_editor.h"
|
||||
@@ -73,18 +74,6 @@ bbEditor::bbEditor( void )
|
||||
BBE_PPT + 2 * TCO_BORDER_WIDTH +
|
||||
DEFAULT_SCROLLBAR_SIZE );
|
||||
|
||||
QWidget * w = ( parentWidget() != NULL ) ? parentWidget() : this;
|
||||
if( engine::getMainWindow()->workspace() != NULL )
|
||||
{
|
||||
resize( minimumWidth(), 300 );
|
||||
w->move( 10, 340 );
|
||||
}
|
||||
else
|
||||
{
|
||||
resize( minimumWidth(), 300 );
|
||||
w->move( 210, 340 );
|
||||
}
|
||||
|
||||
containerWidget()->move( 0, 32 );
|
||||
setPixelsPerTact( BBE_PPT );
|
||||
|
||||
@@ -131,7 +120,24 @@ bbEditor::bbEditor( void )
|
||||
tb_layout->addWidget( l );
|
||||
tb_layout->addSpacing( 15 );
|
||||
|
||||
show();
|
||||
if( engine::getMainWindow()->workspace() != NULL )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
}
|
||||
|
||||
QWidget * w = ( parentWidget() != NULL ) ? parentWidget() : this;
|
||||
if( engine::getMainWindow()->workspace() != NULL )
|
||||
{
|
||||
w->resize( minimumWidth(), 300 );
|
||||
w->move( 10, 340 );
|
||||
}
|
||||
else
|
||||
{
|
||||
resize( minimumWidth(), 300 );
|
||||
w->move( 210, 340 );
|
||||
}
|
||||
|
||||
w->show();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
#include <QtGui/QKeyEvent>
|
||||
#include <QtGui/QMenu>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QWorkspace>
|
||||
#include <QtGui/QMdiArea>
|
||||
#include <QtGui/QMdiSubWindow>
|
||||
|
||||
|
||||
#include "bb_editor.h"
|
||||
@@ -317,16 +318,16 @@ void listView::sendToActiveInstrumentTrack( void )
|
||||
}
|
||||
|
||||
// get all windows opened in the workspace
|
||||
QWidgetList pl = engine::getMainWindow()->workspace()->windowList(
|
||||
QWorkspace::StackingOrder );
|
||||
QListIterator<QWidget *> w( pl );
|
||||
QList<QMdiSubWindow*> pl = engine::getMainWindow()->workspace()->subWindowList(
|
||||
QMdiArea::StackingOrder );
|
||||
QListIterator<QMdiSubWindow *> w( pl );
|
||||
w.toBack();
|
||||
// now we travel through the window-list until we find an
|
||||
// instrument-track
|
||||
while( w.hasPrevious() )
|
||||
{
|
||||
instrumentTrack * ct = dynamic_cast<instrumentTrack *>(
|
||||
w.previous() );
|
||||
w.previous()->widget() );
|
||||
if( ct != NULL && ct->isHidden() == FALSE )
|
||||
{
|
||||
// ok, it's an instrument-track, so we can apply the
|
||||
|
||||
@@ -169,6 +169,7 @@ int main( int argc, char * * argv )
|
||||
return( EXIT_FAILURE );
|
||||
}
|
||||
|
||||
// set palette
|
||||
QPalette pal = app.palette();
|
||||
pal.setColor( QPalette::Background, QColor( 128, 128, 128 ) );
|
||||
pal.setColor( QPalette::Foreground, QColor( 240, 240, 240 ) );
|
||||
|
||||
@@ -37,7 +37,8 @@
|
||||
#include <QtGui/QMessageBox>
|
||||
#include <QtGui/QSplashScreen>
|
||||
#include <QtGui/QSplitter>
|
||||
#include <QtGui/QWorkspace>
|
||||
#include <QtGui/QMdiArea>
|
||||
#include <QtGui/QMdiSubWindow>
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@@ -142,10 +143,10 @@ mainWindow::mainWindow( void ) :
|
||||
|
||||
if( no_mdi == FALSE )
|
||||
{
|
||||
m_workspace = new QWorkspace( splitter );
|
||||
m_workspace->setScrollBarsEnabled( TRUE );
|
||||
m_workspace = new QMdiArea( splitter );
|
||||
m_workspace->setBackground( embed::getIconPixmap(
|
||||
"background_artwork" ) );
|
||||
// m_workspace->setBackgroundMode (QWidget::NoBackground);
|
||||
}
|
||||
|
||||
hbox->addWidget( side_bar );
|
||||
@@ -730,16 +731,16 @@ void mainWindow::help( void )
|
||||
|
||||
void mainWindow::toggleBBEditorWin( void )
|
||||
{
|
||||
if( engine::getBBEditor()->isHidden() == TRUE ||
|
||||
if( engine::getBBEditor()->parentWidget()->isHidden() == TRUE ||
|
||||
( m_workspace != NULL &&
|
||||
m_workspace->activeWindow() != engine::getBBEditor() ) )
|
||||
m_workspace->activeSubWindow()->widget() != engine::getBBEditor() ) )
|
||||
{
|
||||
engine::getBBEditor()->show();
|
||||
engine::getBBEditor()->parentWidget()->show();
|
||||
engine::getBBEditor()->setFocus();
|
||||
}
|
||||
else
|
||||
{
|
||||
engine::getBBEditor()->hide();
|
||||
engine::getBBEditor()->parentWidget()->hide();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -748,16 +749,16 @@ void mainWindow::toggleBBEditorWin( void )
|
||||
|
||||
void mainWindow::toggleSongEditorWin( void )
|
||||
{
|
||||
if( engine::getSongEditor()->isHidden() == TRUE ||
|
||||
( m_workspace != NULL && m_workspace->activeWindow()
|
||||
if( engine::getSongEditor()->parentWidget()->isHidden() == TRUE ||
|
||||
( m_workspace != NULL && m_workspace->activeSubWindow()->widget()
|
||||
!= engine::getSongEditor() ) )
|
||||
{
|
||||
engine::getSongEditor()->show();
|
||||
engine::getSongEditor()->parentWidget()->show();
|
||||
engine::getSongEditor()->setFocus();
|
||||
}
|
||||
else
|
||||
{
|
||||
engine::getSongEditor()->hide();
|
||||
engine::getSongEditor()->parentWidget()->hide();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -767,7 +768,7 @@ void mainWindow::toggleSongEditorWin( void )
|
||||
void mainWindow::toggleProjectNotesWin( void )
|
||||
{
|
||||
if( engine::getProjectNotes()->isHidden() == TRUE ||
|
||||
( m_workspace != NULL && m_workspace->activeWindow() !=
|
||||
( m_workspace != NULL && m_workspace->activeSubWindow()->widget() !=
|
||||
engine::getProjectNotes() ) )
|
||||
{
|
||||
engine::getProjectNotes()->show();
|
||||
@@ -784,16 +785,16 @@ void mainWindow::toggleProjectNotesWin( void )
|
||||
|
||||
void mainWindow::togglePianoRollWin( void )
|
||||
{
|
||||
if( engine::getPianoRoll()->isHidden() == TRUE ||
|
||||
( m_workspace != NULL && m_workspace->activeWindow()
|
||||
if( engine::getPianoRoll()->parentWidget()->isHidden() == TRUE ||
|
||||
( m_workspace != NULL && m_workspace->activeSubWindow()->widget()
|
||||
!= engine::getPianoRoll() ) )
|
||||
{
|
||||
engine::getPianoRoll()->show();
|
||||
engine::getPianoRoll()->parentWidget()->show();
|
||||
engine::getPianoRoll()->setFocus();
|
||||
}
|
||||
else
|
||||
{
|
||||
engine::getPianoRoll()->hide();
|
||||
engine::getPianoRoll()->parentWidget()->hide();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -802,16 +803,16 @@ void mainWindow::togglePianoRollWin( void )
|
||||
|
||||
void mainWindow::toggleAutomationEditorWin( void )
|
||||
{
|
||||
if( engine::getAutomationEditor()->isHidden() == TRUE ||
|
||||
( m_workspace != NULL && m_workspace->activeWindow()
|
||||
if( engine::getAutomationEditor()->parentWidget()->isHidden() == TRUE ||
|
||||
( m_workspace != NULL && m_workspace->activeSubWindow()->widget()
|
||||
!= engine::getAutomationEditor() ) )
|
||||
{
|
||||
engine::getAutomationEditor()->show();
|
||||
engine::getAutomationEditor()->parentWidget()->show();
|
||||
engine::getAutomationEditor()->setFocus();
|
||||
}
|
||||
else
|
||||
{
|
||||
engine::getAutomationEditor()->hide();
|
||||
engine::getAutomationEditor()->parentWidget()->hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <QtGui/QLayout>
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QWheelEvent>
|
||||
#include <QtGui/QWorkspace>
|
||||
#include <QtGui/QMdiArea>
|
||||
|
||||
|
||||
#ifndef __USE_XOPEN
|
||||
@@ -127,7 +127,7 @@ const int DEFAULT_PR_PPT = KEY_LINE_HEIGHT * DEFAULT_STEPS_PER_TACT;
|
||||
|
||||
|
||||
pianoRoll::pianoRoll( void ) :
|
||||
QWidget( engine::getMainWindow()->workspace() ),
|
||||
QWidget( ),
|
||||
m_pattern( NULL ),
|
||||
m_currentPosition(),
|
||||
m_recording( FALSE ),
|
||||
@@ -185,11 +185,6 @@ pianoRoll::pianoRoll( void ) :
|
||||
"automation" ) );
|
||||
}
|
||||
|
||||
// add us to workspace
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addWindow( this );
|
||||
}
|
||||
|
||||
// add time-line
|
||||
m_timeLine = new timeLine( WHITE_KEY_WIDTH, 32, m_ppt,
|
||||
@@ -422,12 +417,17 @@ pianoRoll::pianoRoll( void ) :
|
||||
|
||||
// setup our actual window
|
||||
setWindowIcon( embed::getIconPixmap( "piano" ) );
|
||||
resize( INITIAL_PIANOROLL_WIDTH, INITIAL_PIANOROLL_HEIGHT );
|
||||
setCurrentPattern( NULL );
|
||||
|
||||
setMouseTracking( TRUE );
|
||||
|
||||
hide();
|
||||
// add us to workspace
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
}
|
||||
parentWidget()->resize( INITIAL_PIANOROLL_WIDTH, INITIAL_PIANOROLL_HEIGHT );
|
||||
parentWidget()->hide();
|
||||
|
||||
}
|
||||
|
||||
@@ -970,7 +970,7 @@ void pianoRoll::removeSelection( void )
|
||||
void pianoRoll::closeEvent( QCloseEvent * _ce )
|
||||
{
|
||||
QApplication::restoreOverrideCursor();
|
||||
hide();
|
||||
parentWidget()->hide();
|
||||
_ce->ignore ();
|
||||
}
|
||||
|
||||
@@ -1906,7 +1906,7 @@ void pianoRoll::mouseMoveEvent( QMouseEvent * _me )
|
||||
|
||||
|
||||
|
||||
void pianoRoll::paintEvent( QPaintEvent * )
|
||||
void pianoRoll::paintEvent( QPaintEvent * _pe)
|
||||
{
|
||||
QPixmap paintPixmap( size() );
|
||||
updatePaintPixmap( paintPixmap );
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <QtGui/QMessageBox>
|
||||
#include <QtGui/QScrollBar>
|
||||
#include <QtGui/QStatusBar>
|
||||
#include <QtGui/QMdiArea>
|
||||
|
||||
|
||||
#include "song_editor.h"
|
||||
@@ -97,23 +98,10 @@ songEditor::songEditor( void ) :
|
||||
setWindowTitle( tr( "Song-Editor" ) );
|
||||
setWindowIcon( embed::getIconPixmap( "songeditor" ) );
|
||||
|
||||
QWidget * w = ( parentWidget() != NULL ) ? parentWidget() : this;
|
||||
if( engine::getMainWindow()->workspace() != NULL )
|
||||
{
|
||||
resize( 680, 300 );
|
||||
w->move( 10, 10 );
|
||||
}
|
||||
else
|
||||
{
|
||||
resize( 580, 300 );
|
||||
w->move( 210, 10 );
|
||||
}
|
||||
|
||||
setFocusPolicy( Qt::StrongFocus );
|
||||
setFocus();
|
||||
|
||||
QWidget * cw = new QWidget( this );
|
||||
setCentralWidget( cw );
|
||||
QWidget * cw = this;
|
||||
|
||||
|
||||
// create time-line
|
||||
@@ -388,7 +376,24 @@ songEditor::songEditor( void ) :
|
||||
this, SLOT( scrolled( int ) ) );
|
||||
|
||||
|
||||
show();
|
||||
if( engine::getMainWindow()->workspace() != NULL )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
}
|
||||
|
||||
QWidget * w = ( parentWidget() != NULL ) ? parentWidget() : this;
|
||||
if( engine::getMainWindow()->workspace() != NULL )
|
||||
{
|
||||
w->resize( 680, 300 );
|
||||
w->move( 10, 10 );
|
||||
}
|
||||
else
|
||||
{
|
||||
resize( 580, 300 );
|
||||
w->move( 210, 10 );
|
||||
}
|
||||
|
||||
w->show();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "tool.h"
|
||||
|
||||
#include <QtGui/QIcon>
|
||||
#include <QtGui/QWorkspace>
|
||||
#include <QtGui/QMdiArea>
|
||||
|
||||
#include "main_window.h"
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QProgressDialog>
|
||||
#include <QtGui/QWheelEvent>
|
||||
#include <QtGui/QWorkspace>
|
||||
#include <QtGui/QMdiArea>
|
||||
|
||||
|
||||
#include "bb_track.h"
|
||||
@@ -56,18 +56,13 @@
|
||||
|
||||
|
||||
trackContainer::trackContainer( void ) :
|
||||
QMainWindow( engine::getMainWindow()->workspace() ),
|
||||
QWidget( ),
|
||||
m_currentPosition( 0, 0 ),
|
||||
m_scrollArea( new scrollArea( this ) ),
|
||||
m_ppt( DEFAULT_PIXELS_PER_TACT ),
|
||||
m_rubberBand( new rubberBand( m_scrollArea ) ),
|
||||
m_origin()
|
||||
{
|
||||
if( engine::getMainWindow()->workspace() != NULL )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addWindow( this );
|
||||
}
|
||||
|
||||
m_scrollArea->show();
|
||||
m_rubberBand->hide();
|
||||
|
||||
|
||||
@@ -40,7 +40,8 @@
|
||||
#include <QtGui/QLineEdit>
|
||||
#include <QtGui/QMenu>
|
||||
#include <QtGui/QMessageBox>
|
||||
#include <QtGui/QWorkspace>
|
||||
#include <QtGui/QMdiArea>
|
||||
#include <QtGui/QMdiSubWindow>
|
||||
|
||||
|
||||
#include "arp_and_chords_tab_widget.h"
|
||||
@@ -97,8 +98,8 @@ const int PIANO_HEIGHT = 84;
|
||||
|
||||
|
||||
instrumentTrack::instrumentTrack( trackContainer * _tc ) :
|
||||
QWidget( engine::getMainWindow()->workspace() ),
|
||||
track( _tc ),
|
||||
QMdiSubWindow( engine::getMainWindow()->workspace() ),
|
||||
track( _tc ),
|
||||
midiEventProcessor(),
|
||||
m_trackType( INSTRUMENT_TRACK ),
|
||||
m_midiPort( engine::getMixer()->getMIDIClient()->addPort( this,
|
||||
@@ -111,21 +112,17 @@ instrumentTrack::instrumentTrack( trackContainer * _tc ) :
|
||||
m_midiInputAction( NULL ),
|
||||
m_midiOutputAction( NULL )
|
||||
{
|
||||
|
||||
QWidget * widget = new QWidget();
|
||||
|
||||
for( int i = 0; i < NOTES; ++i )
|
||||
{
|
||||
m_notes[i] = NULL;
|
||||
}
|
||||
|
||||
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addWindow( this );
|
||||
}
|
||||
|
||||
setAcceptDrops( TRUE );
|
||||
|
||||
hide();
|
||||
|
||||
getTrackWidget()->setFixedHeight( 32 );
|
||||
|
||||
|
||||
@@ -174,12 +171,12 @@ instrumentTrack::instrumentTrack( trackContainer * _tc ) :
|
||||
|
||||
// init own layout + widgets
|
||||
setFocusPolicy( Qt::StrongFocus );
|
||||
QVBoxLayout * vlayout = new QVBoxLayout( this );
|
||||
QVBoxLayout * vlayout = new QVBoxLayout( widget );
|
||||
vlayout->setMargin( 0 );
|
||||
vlayout->setSpacing( 0 );
|
||||
|
||||
m_generalSettingsWidget = new tabWidget( tr( "GENERAL SETTINGS" ),
|
||||
this );
|
||||
widget );
|
||||
m_generalSettingsWidget->setFixedHeight( 90 );
|
||||
|
||||
// setup line-edit for changing channel-name
|
||||
@@ -317,9 +314,17 @@ instrumentTrack::instrumentTrack( trackContainer * _tc ) :
|
||||
|
||||
_tc->updateAfterTrackAdd();
|
||||
|
||||
setWidget( widget );
|
||||
|
||||
setFixedWidth( INSTRUMENT_WIDTH );
|
||||
resize( sizeHint() );
|
||||
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
}
|
||||
|
||||
hide();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -457,7 +457,7 @@ void pattern::openInPianoRoll( void )
|
||||
void pattern::openInPianoRoll( bool )
|
||||
{
|
||||
engine::getPianoRoll()->setCurrentPattern( this );
|
||||
engine::getPianoRoll()->show();
|
||||
engine::getPianoRoll()->parentWidget()->show();
|
||||
engine::getPianoRoll()->setFocus();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "effect_label.h"
|
||||
|
||||
#include <QtGui/QMouseEvent>
|
||||
#include <QtGui/QWorkspace>
|
||||
#include <QtGui/QMdiArea>
|
||||
#include <QtXml/QDomElement>
|
||||
|
||||
#include "effect_tab_widget.h"
|
||||
@@ -67,7 +67,7 @@ effectLabel::effectLabel( const QString & _initial_name, QWidget * _parent,
|
||||
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addWindow( m_effWidget );
|
||||
engine::getMainWindow()->workspace()->addSubWindow( m_effWidget );
|
||||
}
|
||||
|
||||
m_effWidget->setWindowTitle( _initial_name );
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <QtGui/QTextCursor>
|
||||
#include <QtGui/QTextEdit>
|
||||
#include <QtGui/QToolBar>
|
||||
#include <QtGui/QWorkspace>
|
||||
#include <QtGui/QMdiArea>
|
||||
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
@@ -49,11 +49,6 @@
|
||||
projectNotes::projectNotes( void ) :
|
||||
QMainWindow( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addWindow( this );
|
||||
}
|
||||
|
||||
m_edit = new QTextEdit( this );
|
||||
m_edit->setAutoFillBackground( TRUE );
|
||||
QPalette pal;
|
||||
@@ -78,6 +73,11 @@ projectNotes::projectNotes( void ) :
|
||||
|
||||
resize( 300, 200 );
|
||||
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
}
|
||||
|
||||
QWidget * w = ( parentWidget() != NULL ) ? parentWidget() : this;
|
||||
if( engine::getMainWindow()->workspace() != NULL )
|
||||
{
|
||||
@@ -88,8 +88,6 @@ projectNotes::projectNotes( void ) :
|
||||
w->move( 800, 10 );
|
||||
}
|
||||
|
||||
//show();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
|
||||
#include <QtGui/QLabel>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QWorkspace>
|
||||
#include <QtGui/QMdiArea>
|
||||
#include <QtGui/QMdiSubWindow>
|
||||
|
||||
#include "audio_port.h"
|
||||
#include "caption_menu.h"
|
||||
@@ -132,10 +133,11 @@ rackPlugin::rackPlugin( QWidget * _parent,
|
||||
m_label->setPalette( pal );
|
||||
|
||||
m_controlView = m_effect->createControlDialog( m_track );
|
||||
engine::getMainWindow()->workspace()->addWindow( m_controlView );
|
||||
m_subWindow = engine::getMainWindow()->workspace()->addSubWindow( m_controlView );
|
||||
connect( m_controlView, SIGNAL( closed() ),
|
||||
this, SLOT( closeEffects() ) );
|
||||
m_controlView->hide();
|
||||
|
||||
m_subWindow->hide();
|
||||
|
||||
if( m_controlView->getControlCount() == 0 )
|
||||
{
|
||||
@@ -189,13 +191,13 @@ void rackPlugin::editControls( void )
|
||||
{
|
||||
if( m_show )
|
||||
{
|
||||
m_controlView->show();
|
||||
m_controlView->raise();
|
||||
m_subWindow->show();
|
||||
m_subWindow->raise();
|
||||
m_show = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_controlView->hide();
|
||||
m_subWindow->hide();
|
||||
m_show = TRUE;
|
||||
}
|
||||
}
|
||||
@@ -333,7 +335,7 @@ void FASTCALL rackPlugin::loadSettings( const QDomElement & _this )
|
||||
|
||||
void rackPlugin::closeEffects( void )
|
||||
{
|
||||
m_controlView->hide();
|
||||
m_subWindow->hide();
|
||||
m_show = TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "tempo_sync_knob.h"
|
||||
|
||||
#include <QtGui/QMouseEvent>
|
||||
#include <QtGui/QWorkspace>
|
||||
#include <QtGui/QMdiArea>
|
||||
|
||||
#include "automatable_object_templates.h"
|
||||
#include "caption_menu.h"
|
||||
|
||||
Reference in New Issue
Block a user