subWindow resizing, minimum, and intial sizes
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1219 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -354,6 +354,8 @@ automationEditor::automationEditor( void ) :
|
||||
|
||||
setMouseTracking( TRUE );
|
||||
|
||||
setMinimumSize( tb_layout->minimumSize().width(), 128 );
|
||||
|
||||
// add us to workspace
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
@@ -677,14 +679,12 @@ void automationEditor::drawLine( int _x0, float _y0, int _x1, float _y1 )
|
||||
while( i < deltax )
|
||||
{
|
||||
y = _y0 + ( ystep * yscale * i );
|
||||
m_pattern->removeValue( midiTime( x ) );
|
||||
m_pattern->putValue( midiTime( x ), y );
|
||||
|
||||
x += xstep;
|
||||
i += 1;
|
||||
m_pattern->removeValue( midiTime( x ) );
|
||||
m_pattern->putValue( midiTime( x ), y );
|
||||
}
|
||||
m_pattern->removeValue( midiTime( _x1 ) );
|
||||
m_pattern->putValue( midiTime( _x1 ), _y1 );
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <QtGui/QInputDialog>
|
||||
#include <QtGui/QLayout>
|
||||
#include <QtGui/QMdiArea>
|
||||
#include <QtGui/QMdiSubWindow>
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QToolButton>
|
||||
@@ -45,8 +46,6 @@
|
||||
#include "tooltip.h"
|
||||
#include "pixmap_button.h"
|
||||
|
||||
|
||||
|
||||
class fxLine : public QWidget
|
||||
{
|
||||
public:
|
||||
@@ -229,7 +228,14 @@ fxMixerView::fxMixerView() :
|
||||
|
||||
|
||||
// add ourself to workspace
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
QMdiSubWindow * subWin =
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
Qt::WindowFlags flags = subWin->windowFlags();
|
||||
flags |= Qt::MSWindowsFixedSizeDialogHint;
|
||||
flags &= ~Qt::WindowMaximizeButtonHint;
|
||||
subWin->setWindowFlags( flags );
|
||||
subWin->layout()->setSizeConstraint(QLayout::SetFixedSize);
|
||||
|
||||
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, FALSE );
|
||||
parentWidget()->move( 10, 200 );
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ extern Keys whiteKeys[]; // defined in piano_widget.cpp
|
||||
|
||||
|
||||
// some constants...
|
||||
const int INITIAL_PIANOROLL_WIDTH = 640;
|
||||
const int INITIAL_PIANOROLL_WIDTH = 840;
|
||||
const int INITIAL_PIANOROLL_HEIGHT = 480;
|
||||
|
||||
const int SCROLLBAR_SIZE = 16;
|
||||
@@ -442,6 +442,8 @@ pianoRoll::pianoRoll( void ) :
|
||||
|
||||
setMouseTracking( TRUE );
|
||||
|
||||
setMinimumSize( tb_layout->minimumSize().width(), 160 );
|
||||
|
||||
// add us to workspace
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QLayout>
|
||||
#include <QtGui/QMdiSubWindow>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QScrollArea>
|
||||
#include <QtGui/QVBoxLayout>
|
||||
@@ -71,7 +72,15 @@ controllerRackView::controllerRackView( ) :
|
||||
|
||||
setModel( engine::getSong() );
|
||||
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
QMdiSubWindow * subWin =
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
Qt::WindowFlags flags = subWin->windowFlags();
|
||||
flags |= Qt::MSWindowsFixedSizeDialogHint;
|
||||
flags &= ~Qt::WindowMaximizeButtonHint;
|
||||
subWin->setWindowFlags( flags );
|
||||
setWindowFlags( flags );
|
||||
subWin->layout()->setSizeConstraint(QLayout::SetFixedSize);
|
||||
|
||||
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, FALSE );
|
||||
}
|
||||
|
||||
|
||||
@@ -75,6 +75,12 @@ controllerView::controllerView( controller * _model, QWidget * _parent ) :
|
||||
|
||||
m_subWindow = engine::getMainWindow()->workspace()->addSubWindow(
|
||||
m_controllerDlg );
|
||||
|
||||
Qt::WindowFlags flags = m_subWindow->windowFlags();
|
||||
flags |= Qt::MSWindowsFixedSizeDialogHint;
|
||||
flags &= ~Qt::WindowMaximizeButtonHint;
|
||||
m_subWindow->setWindowFlags( flags );
|
||||
m_subWindow->setFixedSize( m_subWindow->size() );
|
||||
|
||||
m_subWindow->setWindowIcon( m_controllerDlg->windowIcon() );
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#include <QtGui/QMdiArea>
|
||||
#include <QtGui/QMenu>
|
||||
#include <QtGui/QMessageBox>
|
||||
#include <QtGui/QMdiSubWindow>
|
||||
#include <QtGui/QPainter>
|
||||
|
||||
|
||||
@@ -1204,7 +1205,14 @@ instrumentTrackWindow::instrumentTrackWindow( instrumentTrackView * _itv ) :
|
||||
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
QMdiSubWindow * subWin =
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
Qt::WindowFlags flags = subWin->windowFlags();
|
||||
flags |= Qt::MSWindowsFixedSizeDialogHint;
|
||||
flags &= ~Qt::WindowMaximizeButtonHint;
|
||||
subWin->setWindowFlags( flags );
|
||||
subWin->setFixedSize( subWin->size() );
|
||||
|
||||
parentWidget()->hide();
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user