Reverted c310667bd90457a4edafd752718046bf892b1ea6y to keep trunk at least

a bit usable, will continue FLUIQ development in a separate branch
This commit is contained in:
Tobias Doerffel
2009-02-24 17:08:01 +01:00
parent 7ec6080f92
commit 8c85e9b1cf
21 changed files with 720 additions and 329 deletions

View File

@@ -97,12 +97,12 @@ void engine::init( const bool _has_gui )
{
s_mainWindow = new mainWindow;
s_songEditor = new songEditor( s_song, s_songEditor );
s_bbEditor = new bbEditor( s_bbTrackContainer );
s_pianoRoll = new pianoRoll;
s_automationEditor = new automationEditor;
s_fxMixerView = new fxMixerView;
s_controllerRackView = new controllerRackView;
s_projectNotes = new projectNotes;
s_bbEditor = new bbEditor( s_bbTrackContainer );
s_pianoRoll = new pianoRoll;
s_automationEditor = new automationEditor;
s_mainWindow->finalize();
}

View File

@@ -65,7 +65,6 @@
#include "bb_track_container.h"
#include "piano_roll.h"
#include "debug.h"
#include "fluiq/widget_container.h"
@@ -76,7 +75,7 @@ QPixmap * automationEditor::s_toolMove = NULL;
automationEditor::automationEditor( void ) :
FLUIQ::CollapsibleWidget( Qt::Vertical ),
QWidget(),
m_zoomingXModel(),
m_zoomingYModel(),
m_quantizeModel(),
@@ -134,9 +133,8 @@ automationEditor::automationEditor( void ) :
m_toolBar = new QWidget( this );
m_toolBar->setFixedHeight( 32 );
m_toolBar->move( 0, 0 );
m_toolBar->setAutoFillBackground( true );
addWidget( m_toolBar );
QPalette pal;
pal.setBrush( m_toolBar->backgroundRole(),
embed::getIconPixmap( "toolbar_bg" ) );
@@ -358,7 +356,18 @@ automationEditor::automationEditor( void ) :
setMinimumSize( tb_layout->minimumSize().width(), 128 );
engine::getMainWindow()->centralWidgetContainer()->addWidget( this );
// add us to workspace
if( engine::getMainWindow()->workspace() )
{
engine::getMainWindow()->workspace()->addSubWindow( this );
parentWidget()->resize( InitialWidth, InitialHeight );
parentWidget()->hide();
}
else
{
resize( InitialWidth, InitialHeight );
hide();
}
}

View File

@@ -50,8 +50,7 @@ bbEditor::bbEditor( bbTrackContainer * _tc ) :
pal.setBrush( m_toolBar->backgroundRole(),
embed::getIconPixmap( "toolbar_bg" ) );
m_toolBar->setPalette( pal );
insertWidget( 1, m_toolBar );
// static_cast<QVBoxLayout *>( layout() )->insertWidget( 0, m_toolBar );
static_cast<QVBoxLayout *>( layout() )->insertWidget( 0, m_toolBar );
QHBoxLayout * tb_layout = new QHBoxLayout( m_toolBar );
tb_layout->setSpacing( 0 );
@@ -59,8 +58,7 @@ bbEditor::bbEditor( bbTrackContainer * _tc ) :
setWindowIcon( embed::getIconPixmap( "bb_track" ) );
setWindowTitle( tr( "PATTERN EDITOR" ) );
setWindowTitle( tr( "Beat+Bassline Editor" ) );
// TODO: Use style sheet
setMinimumWidth( TRACK_OP_WIDTH + DEFAULT_SETTINGS_WIDGET_WIDTH
+ 2 * TCO_BORDER_WIDTH + 192 );
@@ -114,12 +112,12 @@ bbEditor::bbEditor( bbTrackContainer * _tc ) :
tb_layout->addWidget( l );
tb_layout->addSpacing( 15 );
/* engine::getMainWindow()->workspace()->addSubWindow( this );
engine::getMainWindow()->workspace()->addSubWindow( this );
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, FALSE );
parentWidget()->layout()->setSizeConstraint( QLayout::SetMinimumSize );
parentWidget()->resize( minimumWidth(), 300 );
parentWidget()->move( 610, 5 );
parentWidget()->show();*/
parentWidget()->show();
setModel( _tc );

View File

@@ -63,19 +63,16 @@ enum TreeWidgetItemTypes
fileBrowser::fileBrowser( const QString & _directories, const QString & _filter,
const QString & _title, const QPixmap & _pm,
QWidget * _parent, bool _dirs_as_items ) :
QWidget( _parent ),
sideBarWidget( _title, _pm, _parent ),
m_directories( _directories ),
m_filter( _filter ),
m_dirsAsItems( _dirs_as_items )
{
QVBoxLayout * viewLayout = new QVBoxLayout( this );
viewLayout->setMargin( 5 );
viewLayout->setSpacing( 5 );
setWindowTitle( tr( "Browser" ) );
m_l = new fileBrowserTreeWidget( contentParent() );
addContentWidget( m_l );
m_l = new fileBrowserTreeWidget( this );
viewLayout->addWidget( m_l );
QWidget * ops = new QWidget( this );
QWidget * ops = new QWidget( contentParent() );
ops->setFixedHeight( 24 );
QHBoxLayout * opl = new QHBoxLayout( ops );
@@ -95,9 +92,10 @@ fileBrowser::fileBrowser( const QString & _directories, const QString & _filter,
opl->addSpacing( 5 );
opl->addWidget( reload_btn );
viewLayout->addWidget( ops );
addContentWidget( ops );
reloadTree();
show();
}

View File

@@ -29,9 +29,9 @@
#include <QtGui/QMdiArea>
#include <QtGui/QMdiSubWindow>
#include <QtGui/QPainter>
#include <QtGui/QScrollArea>
#include <QtGui/QScrollBar>
#include <QtGui/QStackedWidget>
#include <QtGui/QPushButton>
#include <QtGui/QToolButton>
#include <QtGui/QStackedLayout>
#include "fx_mixer_view.h"
#include "fader.h"
@@ -44,8 +44,6 @@
#include "tooltip.h"
#include "pixmap_button.h"
#include "fluiq/widget_container.h"
class fxLine : public QWidget
@@ -100,7 +98,7 @@ private:
fxMixerView::fxMixerView() :
FLUIQ::CollapsibleWidget( Qt::Vertical ),
QWidget(),
modelView( NULL, this ),
serializingObjectHook()
{
@@ -111,66 +109,111 @@ fxMixerView::fxMixerView() :
//pal.setColor( QPalette::Background, QColor( 72, 76, 88 ) );
//setPalette( pal );
setAutoFillBackground( true );
setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed );
setFixedHeight( 280 );
setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Minimum );
setWindowTitle( tr( "FX MIXER" ) );
setWindowTitle( tr( "FX-Mixer" ) );
setWindowIcon( embed::getIconPixmap( "fx_mixer" ) );
m_fxLineBanks = new QStackedLayout;
m_fxLineBanks->setSpacing( 0 );
m_fxLineBanks->setMargin( 1 );
m_fxRacksLayout = new QStackedLayout;
m_fxRacksLayout->setSpacing( 0 );
m_fxRacksLayout->setMargin( 0 );
// main-layout
QWidget * mainWidget = new QWidget;
QHBoxLayout * mainLayout = new QHBoxLayout;
mainLayout->setMargin( 5 );
mainLayout->setSpacing( 5 );
mainLayout->addSpacing( 0 );
mainWidget->setLayout( mainLayout );
QHBoxLayout * ml = new QHBoxLayout;
ml->setMargin( 0 );
ml->setSpacing( 0 );
ml->addSpacing( 6 );
m_fxRacksView = new QStackedWidget;
m_fxRacksView->setFixedSize( 250, 250 );
mainLayout->addWidget( m_fxRacksView, 0, Qt::AlignTop );
mainLayout->addSpacing( 8 );
QScrollArea * scrollArea = new QScrollArea( mainWidget );
scrollArea->setWidget( new QWidget );
scrollArea->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
scrollArea->setFrameShape( QScrollArea::NoFrame );
scrollArea->setFixedHeight( 250 );
scrollArea->horizontalScrollBar()->setSingleStep( 33 );
scrollArea->horizontalScrollBar()->setPageStep( 33 );
QWidget * scrollAreaWidget = scrollArea->widget();
QHBoxLayout * scrollAreaLayout = new QHBoxLayout( scrollAreaWidget );
scrollAreaLayout->setSizeConstraint( QLayout::SetMinAndMaxSize );
scrollAreaLayout->setMargin( 0 );
scrollAreaLayout->setSpacing( 1 );
QHBoxLayout * banks[NumFxChannels/16];
for( int i = 0; i < NumFxChannels/16; ++i )
{
QWidget * w = new QWidget( this );
banks[i] = new QHBoxLayout( w );
banks[i]->setMargin( 5 );
banks[i]->setSpacing( 1 );
m_fxLineBanks->addWidget( w );
}
for( int i = 0; i < NumFxChannels+1; ++i )
{
fxChannelView * view = &m_fxChannelViews[i];
createFxLine( i, i == 0 ? mainWidget : scrollAreaWidget );
fxChannelView * cv = &m_fxChannelViews[i];
if( i == 0 )
{
mainLayout->addWidget( view->m_fxLine, 0,
Qt::AlignTop );
mainLayout->addSpacing( 5 );
cv->m_fxLine = new fxLine( NULL, this,
m->m_fxChannels[i]->m_name );
ml->addWidget( cv->m_fxLine );
ml->addSpacing( 10 );
}
else
{
scrollAreaLayout->addWidget( view->m_fxLine );
const int bank = (i-1) / 16;
cv->m_fxLine = new fxLine( NULL, this,
m->m_fxChannels[i]->m_name );
banks[bank]->addWidget( cv->m_fxLine );
}
lcdSpinBox * l = new lcdSpinBox( 2, cv->m_fxLine );
l->model()->setRange( i, i );
l->model()->setValue( i );
l->move( 2, 4 );
l->setMarginWidth( 1 );
cv->m_fader = new fader( &m->m_fxChannels[i]->m_volumeModel,
cv->m_fxLine );
cv->m_fader->move( 15-cv->m_fader->width()/2,
cv->m_fxLine->height()-
cv->m_fader->height()-5 );
cv->m_muteBtn = new pixmapButton( cv->m_fxLine, tr( "Mute" ) );
cv->m_muteBtn->setModel( &m->m_fxChannels[i]->m_muteModel );
cv->m_muteBtn->setActiveGraphic(
embed::getIconPixmap( "led_off" ) );
cv->m_muteBtn->setInactiveGraphic(
embed::getIconPixmap( "led_green" ) );
cv->m_muteBtn->setCheckable( true );
cv->m_muteBtn->move( 9, cv->m_fader->y()-16);
toolTip::add( cv->m_muteBtn, tr( "Mute this FX channel" ) );
cv->m_rackView = new effectRackView(
&m->m_fxChannels[i]->m_fxChain, this );
m_fxRacksLayout->addWidget( cv->m_rackView );
if( i == 0 )
{
QVBoxLayout * l = new QVBoxLayout;
l->addSpacing( 10 );
QButtonGroup * g = new QButtonGroup( this );
m_bankButtons = g;
g->setExclusive( true );
for( int j = 0; j < 4; ++j )
{
QToolButton * btn = new QToolButton;
btn->setText( QString( 'A'+j ) );
btn->setCheckable( true );
btn->setSizePolicy( QSizePolicy::Preferred,
QSizePolicy::Expanding );
l->addWidget( btn );
g->addButton( btn, j );
btn->setChecked( j == 0);
}
l->addSpacing( 10 );
ml->addLayout( l );
connect( g, SIGNAL( buttonClicked( int ) ),
m_fxLineBanks, SLOT( setCurrentIndex( int ) ) );
}
view->m_rackView = new effectRackView(
&m->m_fxChannels[i]->m_fxChain );
view->m_rackView->setFixedWidth( 240 );
view->m_rackView->mainLayout()->setMargin( 0 );
m_fxRacksView->addWidget( view->m_rackView );
}
mainLayout->addWidget( scrollArea, 0, Qt::AlignTop );
addWidget( mainWidget );
ml->addLayout( m_fxLineBanks );
ml->addLayout( m_fxRacksLayout );
setLayout( ml );
updateGeometry();
m_fxLineBanks->setCurrentIndex( 0 );
setCurrentFxLine( m_fxChannelViews[0].m_fxLine );
// timer for updating faders
@@ -178,7 +221,17 @@ fxMixerView::fxMixerView() :
this, SLOT( updateFaders() ) );
engine::getMainWindow()->centralWidgetContainer()->addWidget( this );
// add ourself to workspace
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( 5, 310 );
// we want to receive dataChanged-signals in order to update
setModel( m );
@@ -217,7 +270,7 @@ void fxMixerView::setCurrentFxLine( fxLine * _line )
{
if( m_fxChannelViews[i].m_fxLine == _line )
{
m_fxRacksView->setCurrentIndex( i );
m_fxRacksLayout->setCurrentIndex( i );
}
m_fxChannelViews[i].m_fxLine->update();
}
@@ -230,6 +283,8 @@ void fxMixerView::setCurrentFxLine( int _line )
if ( _line >= 0 && _line < NumFxChannels+1 )
{
setCurrentFxLine( m_fxChannelViews[_line].m_fxLine );
m_bankButtons->button( (_line-1) / 16 )->click();
}
}
@@ -278,37 +333,5 @@ void fxMixerView::updateFaders( void )
void fxMixerView::createFxLine( int _line, QWidget * _parent )
{
fxMixer * m = engine::getFxMixer();
fxChannelView * view = &m_fxChannelViews[_line];
view->m_fxLine = new fxLine( _parent, this,
m->m_fxChannels[_line]->m_name );
lcdSpinBox * l = new lcdSpinBox( 2, view->m_fxLine );
l->model()->setRange( _line, _line );
l->model()->setValue( _line );
l->move( 2, 4 );
l->setMarginWidth( 1 );
view->m_fader = new fader( &m->m_fxChannels[_line]->m_volumeModel,
view->m_fxLine );
view->m_fader->move( 15-view->m_fader->width()/2,
view->m_fxLine->height()-
view->m_fader->height()-5 );
view->m_muteBtn = new pixmapButton( view->m_fxLine, tr( "Mute" ) );
view->m_muteBtn->setModel( &m->m_fxChannels[_line]->m_muteModel );
view->m_muteBtn->setActiveGraphic(
embed::getIconPixmap( "led_off" ) );
view->m_muteBtn->setInactiveGraphic(
embed::getIconPixmap( "led_green" ) );
view->m_muteBtn->setCheckable( true );
view->m_muteBtn->move( 9, view->m_fader->y()-16 );
toolTip::add( view->m_muteBtn, tr( "Mute this FX channel" ) );
}
#include "moc_fx_mixer_view.cxx"

View File

@@ -31,7 +31,6 @@
#include <QtGui/QCloseEvent>
#include <QtGui/QDesktopServices>
#include <QtGui/QFileDialog>
#include <QtGui/QLineEdit>
#include <QtGui/QMdiArea>
#include <QtGui/QMdiSubWindow>
#include <QtGui/QMenuBar>
@@ -58,6 +57,7 @@
#include "controller_rack_view.h"
#include "file_browser.h"
#include "plugin_browser.h"
#include "side_bar.h"
#include "config_mgr.h"
#include "mixer.h"
#include "plugin_view.h"
@@ -77,17 +77,8 @@
#include "cpuload_widget.h"
#include "visualization_widget.h"
#include "resources_db.h"
#include "resources_tree_model.h"
#include "resources_tree_view.h"
#include "gui/tracks/track_container_scene.h"
#include "fluiq/workspace.h"
#include "fluiq/widget_container.h"
#include "fluiq/collapsible_widget.h"
mainWindow::mainWindow( void ) :
m_workspace( NULL ),
@@ -97,14 +88,13 @@ mainWindow::mainWindow( void ) :
{
setAttribute( Qt::WA_DeleteOnClose );
QWidget * mainWidget = new QWidget( this );
QVBoxLayout * vbox = new QVBoxLayout( mainWidget );
QWidget * main_widget = new QWidget( this );
QVBoxLayout * vbox = new QVBoxLayout( main_widget );
vbox->setSpacing( 0 );
vbox->setMargin( 0 );
#if 0
QWidget * w = new QWidget( mainWidget );
QWidget * w = new QWidget( main_widget );
QHBoxLayout * hbox = new QHBoxLayout( w );
hbox->setSpacing( 0 );
hbox->setMargin( 0 );
@@ -165,94 +155,6 @@ mainWindow::mainWindow( void ) :
), ++id );
m_workspace = new QMdiArea( splitter );
#endif
FLUIQ::Workspace * ws = new FLUIQ::Workspace( mainWidget );
FLUIQ::CollapsibleWidget * componentWidget =
new FLUIQ::CollapsibleWidget( Qt::Horizontal, ws );
componentWidget->setWindowTitle( tr( "COMPONENTS" ) );
FLUIQ::WidgetContainer * componentContainer =
new FLUIQ::WidgetContainer( Qt::Vertical, componentWidget );
componentWidget->addWidget( componentContainer );
FLUIQ::CollapsibleWidget * resourcesWidget =
new FLUIQ::CollapsibleWidget( Qt::Vertical,
componentContainer );
resourcesWidget->setWindowTitle( tr( "RESOURCES" ) );
ResourcesTreeModel * rtm = new ResourcesTreeModel(
engine::getResourcesDB() );
ResourcesTreeView * tv = new ResourcesTreeView( rtm, resourcesWidget );
QLineEdit * le = new QLineEdit;
resourcesWidget->addWidget( tv );
resourcesWidget->addWidget( le );
connect( le, SIGNAL( textChanged( const QString & ) ),
tv, SLOT( setFilter( const QString & ) ) );
componentContainer->addWidget( resourcesWidget );
FLUIQ::CollapsibleWidget * pluginsWidget =
new FLUIQ::CollapsibleWidget( Qt::Vertical,
componentContainer );
pluginsWidget->setWindowTitle( tr( "INSTRUMENTS" ) );
pluginBrowser * pb = new pluginBrowser();
pluginsWidget->addWidget( pb );
componentContainer->addWidget( pluginsWidget );
FLUIQ::CollapsibleWidget * homeBrowserW =
new FLUIQ::CollapsibleWidget( Qt::Vertical,
componentContainer );
homeBrowserW->setWindowTitle( tr( "HOME DIRECTORY" ) );
fileBrowser * hb = new fileBrowser( QDir::homePath(), "*",
tr( "My home" ),
embed::getIconPixmap( "home" ),
NULL );
homeBrowserW->addWidget( hb );
componentContainer->addWidget( homeBrowserW );
componentWidget->setMaximumWidth( 300 );
ws->addWidget( componentWidget );
FLUIQ::CollapsibleWidget * editorsWidget =
new FLUIQ::CollapsibleWidget( Qt::Horizontal, ws );
editorsWidget->setWindowTitle( tr( "EDITORS" ) );
m_centralWidgetContainer = new FLUIQ::WidgetContainer( Qt::Vertical,
editorsWidget );
editorsWidget->addWidget( m_centralWidgetContainer );
FLUIQ::CollapsibleWidget * workspaceWidget =
new FLUIQ::CollapsibleWidget( Qt::Vertical,
m_centralWidgetContainer );
workspaceWidget->setWindowTitle( tr( "WORKSPACE" ) );
m_workspace = new QMdiArea;
workspaceWidget->addWidget( m_workspace );
m_centralWidgetContainer->addWidget( workspaceWidget );
ws->addWidget( editorsWidget );
// Load background
QString bgArtwork = configManager::inst()->backgroundArtwork();
@@ -274,9 +176,12 @@ mainWindow::mainWindow( void ) :
m_workspace->setHorizontalScrollBarPolicy( Qt::ScrollBarAsNeeded );
m_workspace->setVerticalScrollBarPolicy( Qt::ScrollBarAsNeeded );
hbox->addWidget( side_bar );
hbox->addWidget( splitter );
// create global-toolbar at the top of our window
m_toolBar = new QWidget( mainWidget );
m_toolBar = new QWidget( main_widget );
m_toolBar->setObjectName( "mainToolbar" );
m_toolBar->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
m_toolBar->setFixedHeight( 64 );
@@ -288,9 +193,8 @@ mainWindow::mainWindow( void ) :
m_toolBarLayout->setSpacing( 0 );
vbox->addWidget( m_toolBar );
vbox->addWidget( ws );
setCentralWidget( mainWidget );
vbox->addWidget( w );
setCentralWidget( main_widget );
/// HACK TO CREATE EXTRA SONG EDITOR FOR NOW ///
//Fun test
@@ -1212,15 +1116,18 @@ void mainWindow::help( void )
void mainWindow::toggleWindow( FLUIQ::CollapsibleWidget * _w )
void mainWindow::toggleWindow( QWidget * _w )
{
if( _w->isCollapsed() )
if( m_workspace->activeSubWindow() != _w->parentWidget()
|| _w->parentWidget()->isHidden() )
{
_w->expand();
_w->parentWidget()->show();
_w->show();
_w->setFocus();
}
else
{
_w->collapse();
_w->parentWidget()->hide();
}
}
@@ -1245,20 +1152,7 @@ void mainWindow::toggleSongEditorWin( void )
void mainWindow::toggleProjectNotesWin( void )
{
//toggleWindow( engine::getProjectNotes() );
// TODO
QWidget * _w = engine::getProjectNotes();
if( m_workspace->activeSubWindow() != _w->parentWidget()
|| _w->parentWidget()->isHidden() )
{
_w->parentWidget()->show();
_w->show();
_w->setFocus();
}
else
{
_w->parentWidget()->hide();
}
toggleWindow( engine::getProjectNotes() );
}
@@ -1290,18 +1184,7 @@ void mainWindow::toggleFxMixerWin( void )
void mainWindow::toggleControllerRack( void )
{
QWidget * _w = engine::getControllerRackView();
if( m_workspace->activeSubWindow() != _w->parentWidget()
|| _w->parentWidget()->isHidden() )
{
_w->parentWidget()->show();
_w->show();
_w->setFocus();
}
else
{
_w->parentWidget()->hide();
}
toggleWindow( engine::getControllerRackView() );
}

View File

@@ -69,7 +69,6 @@
#include "timeline.h"
#include "tool_button.h"
#include "tooltip.h"
#include "fluiq/widget_container.h"
typedef automationPattern::timeMap timeMap;
@@ -79,6 +78,9 @@ extern Keys whiteKeys[]; // defined in piano_widget.cpp
// some constants...
static const int InitialPianoRollWidth = 840;
static const int InitialPianoRollHeight = 480;
static const int ScrollBarSize = 16;
static const int PianoX = 0;
@@ -250,9 +252,8 @@ pianoRoll::pianoRoll( void ) :
m_toolBar = new QWidget( this );
m_toolBar->setFixedHeight( 32 );
m_toolBar->move( 0, 0 );
m_toolBar->setAutoFillBackground( true );
addWidget( m_toolBar );
QPalette pal;
pal.setBrush( m_toolBar->backgroundRole(),
embed::getIconPixmap( "toolbar_bg" ) );
@@ -509,7 +510,19 @@ pianoRoll::pianoRoll( void ) :
setMinimumSize( tb_layout->minimumSize().width(), 160 );
engine::getMainWindow()->centralWidgetContainer()->addWidget( this );
// add us to workspace
if( engine::getMainWindow()->workspace() )
{
engine::getMainWindow()->workspace()->addSubWindow( this );
parentWidget()->resize( InitialPianoRollWidth,
InitialPianoRollHeight );
parentWidget()->hide();
}
else
{
resize( InitialPianoRollWidth, InitialPianoRollHeight );
hide();
}
connect( engine::getSong(), SIGNAL( timeSignatureChanged( int, int ) ),
this, SLOT( update() ) );

View File

@@ -29,7 +29,6 @@
#include <QtGui/QPainter>
#include <QtGui/QCursor>
#include <QtGui/QMouseEvent>
#include <QtGui/QVBoxLayout>
#include "plugin_browser.h"
@@ -42,27 +41,28 @@
pluginBrowser::pluginBrowser( QWidget * _parent ) :
QWidget( _parent )
sideBarWidget( tr( "Instrument plugins" ),
embed::getIconPixmap( "plugins" ), _parent )
{
/* setWindowTitle( tr( "Instrument browser" ) );
setWindowTitle( tr( "Instrument browser" ) );
m_view = new QWidget( contentParent() );
//m_view->setFrameShape( QFrame::NoFrame );
addContentWidget( m_view );*/
addContentWidget( m_view );
QVBoxLayout * viewLayout = new QVBoxLayout( this );
viewLayout->setMargin( 5 );
viewLayout->setSpacing( 5 );
QVBoxLayout * view_layout = new QVBoxLayout( m_view );
view_layout->setMargin( 5 );
view_layout->setSpacing( 5 );
QLabel * hint = new QLabel( tr( "Drag an instrument "
"into either the Song-Editor, the "
"Beat+Bassline Editor or into an "
"existing instrument track." ),
this );
m_view );
hint->setFont( pointSize<8>( hint->font() ) );
hint->setWordWrap( true );
viewLayout->addWidget( hint );
hint->setWordWrap( TRUE );
view_layout->addWidget( hint );
plugin::getDescriptorsOfAvailPlugins( m_pluginDescriptors );
@@ -73,14 +73,13 @@ pluginBrowser::pluginBrowser( QWidget * _parent ) :
if( it->type == plugin::Instrument )
{
pluginDescWidget * p = new pluginDescWidget( *it,
this );
m_view );
p->show();
viewLayout->addWidget( p );
view_layout->addWidget( p );
}
}
viewLayout->addStretch();
viewLayout->setSizeConstraint( QLayout::SetMinimumSize );
view_layout->addStretch();
show();
}
@@ -102,12 +101,12 @@ pluginDescWidget::pluginDescWidget( const plugin::descriptor & _pd,
m_updateTimer( this ),
m_pluginDescriptor( _pd ),
m_logo( _pd.logo->pixmap() ),
m_mouseOver( false ),
m_mouseOver( FALSE ),
m_targetHeight( 24 )
{
connect( &m_updateTimer, SIGNAL( timeout() ), SLOT( updateHeight() ) );
setFixedHeight( m_targetHeight );
setMouseTracking( true );
setMouseTracking( TRUE );
setCursor( Qt::PointingHandCursor );
}
@@ -139,14 +138,14 @@ void pluginDescWidget::paintEvent( QPaintEvent * )
p.drawPixmap( 4, 4, logo );
QFont f = pointSize<8>( p.font() );
f.setBold( true );
f.setBold( TRUE );
p.setFont( f );
p.drawText( 10 + logo_size.width(), 15,
m_pluginDescriptor.displayName );
if( height() > 24 || m_mouseOver )
{
f.setBold( false );
f.setBold( FALSE );
p.setFont( pointSize<7>( f ) );
QRect br;
p.drawText( 10 + logo_size.width(), 20, width() - 58 - 5, 999,
@@ -166,7 +165,7 @@ void pluginDescWidget::paintEvent( QPaintEvent * )
void pluginDescWidget::enterEvent( QEvent * _e )
{
m_mouseOver = true;
m_mouseOver = TRUE;
m_targetHeight = height() + 1;
updateHeight();
QWidget::enterEvent( _e );
@@ -177,7 +176,7 @@ void pluginDescWidget::enterEvent( QEvent * _e )
void pluginDescWidget::leaveEvent( QEvent * _e )
{
m_mouseOver = false;
m_mouseOver = FALSE;
m_targetHeight = 24;
updateHeight();
QWidget::leaveEvent( _e );

View File

@@ -33,7 +33,6 @@ ResourcesTreeView::ResourcesTreeView( ResourcesTreeModel * _tm,
m_tm( _tm )
{
setHeaderHidden( true );
setIconSize( QSize( 24, 24 ) );
setModel( m_tm );
connect( m_tm, SIGNAL( itemsChanged() ),
this, SLOT( updateFilter() ) );

View File

@@ -77,7 +77,7 @@ songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) :
{
_engine_ptr = this;
setWindowTitle( tr( "SONG EDITOR" ) );
setWindowTitle( tr( "Song-Editor" ) );
setWindowIcon( embed::getIconPixmap( "songeditor" ) );
setFocusPolicy( Qt::StrongFocus );
@@ -99,7 +99,7 @@ songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) :
// create own toolbar
m_toolBar = new QWidget;//( this );
m_toolBar = new QWidget( this );
m_toolBar->setFixedHeight( 32 );
m_toolBar->setAutoFillBackground( TRUE );
QPalette pal;
@@ -107,8 +107,8 @@ songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) :
embed::getIconPixmap( "toolbar_bg" ) );
m_toolBar->setPalette( pal );
insertWidget( 1, m_toolBar );
insertWidget( 2, m_timeLine );
static_cast<QVBoxLayout *>( layout() )->insertWidget( 0, m_toolBar );
static_cast<QVBoxLayout *>( layout() )->insertWidget( 1, m_timeLine );
QHBoxLayout * tb_layout = new QHBoxLayout( m_toolBar );
tb_layout->setMargin( 0 );
@@ -251,11 +251,11 @@ songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) :
this, SLOT( scrolled( int ) ) );
/* engine::getMainWindow()->workspace()->addSubWindow( this );
engine::getMainWindow()->workspace()->addSubWindow( this );
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, FALSE );
parentWidget()->resize( 600, 300 );
parentWidget()->move( 5, 5 );
parentWidget()->show();*/
parentWidget()->show();
}

View File

@@ -47,11 +47,9 @@
#include "string_pair_drag.h"
#include "track.h"
#include "fluiq/widget_container.h"
trackContainerView::trackContainerView( trackContainer * _tc ) :
FLUIQ::CollapsibleWidget( Qt::Vertical ),
QWidget(),
modelView( NULL, this ),
journallingObject(),
serializingObjectHook(),
@@ -63,11 +61,12 @@ trackContainerView::trackContainerView( trackContainer * _tc ) :
m_rubberBand( new rubberBand( m_scrollArea ) ),
m_origin()
{
engine::getMainWindow()->centralWidgetContainer()->addWidget( this );
m_tc->setHook( this );
addWidget( m_scrollArea );
QVBoxLayout * layout = new QVBoxLayout( this );
layout->setMargin( 0 );
layout->setSpacing( 0 );
layout->addWidget( m_scrollArea );
QWidget * scrollContent = new QWidget;
m_scrollLayout = new QVBoxLayout( scrollContent );
@@ -477,7 +476,7 @@ void trackContainerView::resizeEvent( QResizeEvent * _re )
trackContainerView::scrollArea::scrollArea( trackContainerView * _parent ) :
QScrollArea( NULL ),
QScrollArea( _parent ),
m_trackContainerView( _parent )
{
setFrameStyle( QFrame::NoFrame );