added toggle-button for controller-rack-view and improved default positions of sub-windows in workspace

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1254 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-06-30 22:30:45 +00:00
parent 9514af19f4
commit 3fa2d7e823
7 changed files with 37 additions and 8 deletions

View File

@@ -1,5 +1,14 @@
2008-06-30 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* include/main_window.h:
* src/gui/bb_editor.cpp:
* src/gui/fx_mixer_view.cpp:
* src/gui/main_window.cpp:
* src/gui/song_editor.cpp:
* src/gui/widgets/controller_rack_view.cpp:
added toggle-button for controller-rack-view and improved default
positions of sub-windows in workspace
* src/core/song.cpp:
- send posted events after creating a new project - makes project not
being marked as modified right after it's been created

View File

@@ -109,6 +109,7 @@ public slots:
void toggleProjectNotesWin( void );
void toggleFxMixerWin( void );
void togglePianoRollWin( void );
void toggleControllerRack( void );
void undo( void );
void redo( void );

View File

@@ -116,7 +116,7 @@ bbEditor::bbEditor( bbTrackContainer * _tc ) :
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, FALSE );
parentWidget()->layout()->setSizeConstraint( QLayout::SetMinimumSize );
parentWidget()->resize( minimumWidth(), 300 );
parentWidget()->move( 10, 340 );
parentWidget()->move( 610, 5 );
parentWidget()->show();

View File

@@ -237,7 +237,7 @@ fxMixerView::fxMixerView() :
subWin->layout()->setSizeConstraint(QLayout::SetFixedSize);
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, FALSE );
parentWidget()->move( 10, 200 );
parentWidget()->move( 5, 310 );
// we want to receive dataChanged-signals in order to update
setModel( m );

View File

@@ -45,6 +45,7 @@
#include "engine.h"
#include "fx_mixer_view.h"
#include "about_dialog.h"
#include "controller_rack_view.h"
#include "file_browser.h"
#include "plugin_browser.h"
#include "side_bar.h"
@@ -434,13 +435,22 @@ void mainWindow::finalize( void )
"project notes window. In this window you can put "
"down your project notes.") );
toolButton * controllers_window = new toolButton(
embed::getIconPixmap( "controller" ),
tr( "Show/hide controller rack" ) +
" (F11)",
this, SLOT( toggleControllerRack() ),
m_toolBar );
controllers_window->setShortcut( Qt::Key_F11 );
m_toolBarLayout->addWidget( song_editor_window, 1, 1 );
m_toolBarLayout->addWidget( bb_editor_window, 1, 2 );
m_toolBarLayout->addWidget( piano_roll_window, 1, 3 );
m_toolBarLayout->addWidget( automation_editor_window, 1, 4 );
m_toolBarLayout->addWidget( fx_mixer_window, 1, 5 );
m_toolBarLayout->addWidget( project_notes_window, 1, 6 );
m_toolBarLayout->addWidget( controllers_window, 1, 7 );
m_toolBarLayout->addWidget( controllers_window, 1, 7 );
m_toolBarLayout->setColumnStretch( 100, 1 );
@@ -466,7 +476,7 @@ void mainWindow::finalize( void )
int mainWindow::addWidgetToToolBar( QWidget * _w, int _row, int _col )
{
int col = ( _col == -1 ) ? m_toolBarLayout->columnCount() + 6 : _col;
int col = ( _col == -1 ) ? m_toolBarLayout->columnCount() + 7 : _col;
if( _w->height() > 32 || _row == -1 )
{
m_toolBarLayout->addWidget( _w, 0, col, 2, 1 );
@@ -484,7 +494,7 @@ int mainWindow::addWidgetToToolBar( QWidget * _w, int _row, int _col )
void mainWindow::addSpacingToToolBar( int _size )
{
m_toolBarLayout->setColumnMinimumWidth( m_toolBarLayout->columnCount() +
6, _size );
7, _size );
}
@@ -813,6 +823,14 @@ void mainWindow::toggleFxMixerWin( void )
void mainWindow::toggleControllerRack( void )
{
toggleWindow( engine::getControllerRackView() );
}
void mainWindow::undo( void )
{
engine::getProjectJournal()->undo();

View File

@@ -332,8 +332,8 @@ songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) :
engine::getMainWindow()->workspace()->addSubWindow( this );
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, FALSE );
parentWidget()->resize( 680, 300 );
parentWidget()->move( 10, 10 );
parentWidget()->resize( 600, 300 );
parentWidget()->move( 5, 5 );
parentWidget()->show();
m_updateTimer.start( 1000 / 20, this ); // 20 fps

View File

@@ -79,9 +79,10 @@ controllerRackView::controllerRackView( ) :
flags &= ~Qt::WindowMaximizeButtonHint;
subWin->setWindowFlags( flags );
setWindowFlags( flags );
subWin->layout()->setSizeConstraint(QLayout::SetFixedSize);
subWin->layout()->setSizeConstraint( QLayout::SetFixedSize );
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, FALSE );
parentWidget()->move( 880, 310 );
}