initial support for use of FLUIQ by LMMS - will need lots of tuning until it gets usable

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@2032 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2009-02-13 11:35:56 +00:00
parent 4e2b92105c
commit c310667bd9
22 changed files with 353 additions and 720 deletions

View File

@@ -1,5 +1,29 @@
2009-02-13 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* include/side_bar.h:
* include/kmultitabbar.h:
* include/file_browser.h:
* include/piano_roll.h:
* include/track_container_view.h:
* include/main_window.h:
* include/fx_mixer_view.h:
* include/automation_editor.h:
* include/plugin_browser.h:
* include/side_bar_widget.h:
* src/gui/piano_roll.cpp:
* src/gui/track_container_view.cpp:
* src/gui/plugin_browser.cpp:
* src/gui/fx_mixer_view.cpp:
* src/gui/main_window.cpp:
* src/gui/song_editor.cpp:
* src/gui/file_browser.cpp:
* src/gui/resources_tree_view.cpp:
* src/gui/automation_editor.cpp:
* src/gui/bb_editor.cpp:
* src/core/engine.cpp:
initial support for use of FLUIQ by LMMS - will need lots of tuning
until it gets usable
* src/gui/widgets/combobox.cpp:
* src/gui/widgets/tab_widget.cpp:
* src/gui/widgets/envelope_and_lfo_view.cpp:

View File

@@ -35,6 +35,7 @@
#include "midi_time.h"
#include "automation_pattern.h"
#include "combobox_model.h"
#include "fluiq/collapsible_widget.h"
class QPainter;
@@ -47,7 +48,8 @@ class timeLine;
class toolButton;
class automationEditor : public QWidget, public journallingObject
class automationEditor : public FLUIQ::CollapsibleWidget,
public journallingObject
{
Q_OBJECT
public:
@@ -148,7 +150,8 @@ private:
static const int InitialHeight = 480;
static const int ScrollBarSize = 16;
static const int TopMargin = 48;
static const int TopMargin = 32 +
FLUIQ::CollapsibleWidgetHeader::MinimalHeight;
static const int DefaultYDelta = 6;
static const int DefaultStepsPerTact = 16;

View File

@@ -30,10 +30,6 @@
#include <QtCore/QMutex>
#include <QtGui/QTreeWidget>
#include "side_bar_widget.h"
class QLineEdit;
class fileItem;
@@ -44,7 +40,7 @@ class trackContainer;
class fileBrowser : public sideBarWidget
class fileBrowser : public QWidget
{
Q_OBJECT
public:
@@ -54,6 +50,10 @@ public:
virtual ~fileBrowser();
protected:
virtual void keyPressEvent( QKeyEvent * _ke );
public slots:
void filterItems( const QString & _filter );
void reloadTree( void );
@@ -61,7 +61,6 @@ public slots:
private:
bool filterItems( QTreeWidgetItem * _item, const QString & _filter );
virtual void keyPressEvent( QKeyEvent * _ke );
void addItems( const QString & _path );

View File

@@ -29,9 +29,10 @@
#include <QtGui/QWidget>
#include "fx_mixer.h"
#include "fluiq/collapsible_widget.h"
class QStackedLayout;
class QStackedWidget;
class QButtonGroup;
class fader;
class fxLine;
@@ -40,7 +41,7 @@ class pixmapButton;
class fxMixerView : public QWidget, public modelView,
class fxMixerView : public FLUIQ::CollapsibleWidget, public modelView,
public serializingObjectHook
{
Q_OBJECT
@@ -53,7 +54,7 @@ public:
fxLine * currentFxLine( void )
{
return( m_currentFxLine );
return m_currentFxLine;
}
void setCurrentFxLine( fxLine * _line );
void setCurrentFxLine( int _line );
@@ -66,6 +67,8 @@ private slots:
private:
void createFxLine( int _line, QWidget * _parent );
struct fxChannelView
{
fxLine * m_fxLine;
@@ -76,9 +79,7 @@ private:
fxChannelView m_fxChannelViews[NumFxChannels+1];
QStackedLayout * m_fxRacksLayout;
QStackedLayout * m_fxLineBanks;
QButtonGroup * m_bankButtons;
QStackedWidget * m_fxRacksView;
fxLine * m_currentFxLine;
} ;

View File

@@ -1,309 +0,0 @@
/***************************************************************************
kmultitabbar.h - description
-------------------
begin : 2001
copyright : (C) 2001,2002,2003 by Joseph Wenninger <jowenn@kde.org>
***************************************************************************/
/***************************************************************************
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
***************************************************************************/
#ifndef _KMultitabbar_h_
#define _KMultitabbar_h_
#include <QtCore/QString>
#include <QtCore/QList>
#include <QtGui/QLayout>
#include <QtGui/QPushButton>
class QPixmap;
class QPainter;
class QFrame;
class QMenu;
class KMultiTabBarPrivate;
class KMultiTabBarTabPrivate;
class KMultiTabBarButtonPrivate;
class KMultiTabBarInternal;
/**
* A Widget for horizontal and vertical tabs.
* It is possible to add normal buttons to the top/left
* The handling if only one tab at a time or multiple tabs
* should be raisable is left to the "user".
*@author Joseph Wenninger
*/
class KMultiTabBar: public QWidget
{
Q_OBJECT
public:
enum KMultiTabBarMode{Horizontal, Vertical};
enum KMultiTabBarPosition{Left, Right, Top, Bottom};
/**
* The list of available styles for KMultiTabBar
* - VSNET - Visual Studio .Net like (only show the text of active tabs
* - KDEV3 - Kdevelop 3 like (always show the text)
* - KONQSBC - konqy's classic sidebar style (unthemed) (currently disabled)
*/
enum KMultiTabBarStyle{VSNET=0, KDEV3=1, KONQSBC=2, KDEV3ICON=3,STYLELAST=0xffff};
KMultiTabBar(KMultiTabBarMode bm,QWidget *parent=0 );
virtual ~KMultiTabBar();
/**
* append a new button to the button area. The button can later on be accessed with button(ID)
* eg for connecting signals to it
* @param pic a pixmap for the button
* @param id an arbitraty ID value. It will be emitted in the clicked signal for identifying the button
* if more than one button is connected to a signals.
* @param popup A popup menu which should be displayed if the button is clicked
* @param not_used_yet will be used for a popup text in the future
*/
int appendButton(const QPixmap &pic,int id=-1,QMenu* popup=0,const QString& not_used_yet=QString());
/**
* remove a button with the given ID
*/
void removeButton(int id);
/**
* append a new tab to the tab area. It can be accessed lateron with tabb(id);
* @param pic a bitmap for the tab
* @param id an arbitrary ID which can be used later on to identify the tab
* @param text if a mode with text is used it will be the tab text, otherwise a mouse over hint
*/
int appendTab(const QPixmap &pic,int id=-1,const QString& text=QString());
/**
* remove a tab with a given ID
*/
void removeTab(int id);
/**
* set a tab to "raised"
* @param id The ID of the tab to manipulate
* @param state true == activated/raised, false == not active
*/
void setTab(int id ,bool state);
/**
* return the state of a tab, identified by it's ID
*/
bool isTabRaised(int id) const;
/**
* get a pointer to a button within the button area identified by its ID
*/
class KMultiTabBarButton *button(int id) const;
/**
* get a pointer to a tab within the tab area, identiifed by its ID
*/
class KMultiTabBarTab *tab(int id) const;
/**
* set the real position of the widget.
* @param pos if the mode is horizontal, only use top, bottom, if it is vertical use left or right
*/
void setPosition(KMultiTabBarPosition pos);
/**
* get the tabbar position.
* @return position
*/
KMultiTabBarPosition position() const;
/**
* set the display style of the tabs
*/
void setStyle(KMultiTabBarStyle style);
/**
* get the display style of the tabs
* @return display style
*/
KMultiTabBarStyle tabStyle() const;
/**
* be carefull, don't delete tabs yourself and don't delete the list itself
*/
QList<KMultiTabBarTab *>* tabs();
/**
* be carefull, don't delete buttons yourself and don't delete the list itself
*/
QList<KMultiTabBarButton *>* buttons();
/**
* might vanish, not sure yet
*/
void showActiveTabTexts(bool show=true);
protected:
friend class KMultiTabBarButton;
virtual void fontChange( const QFont& );
void updateSeparator();
private:
class KMultiTabBarInternal *m_internal;
QBoxLayout *m_l;
QFrame *m_btnTabSep;
QList<KMultiTabBarButton *> m_buttons;
KMultiTabBarPosition m_position;
KMultiTabBarPrivate *d;
};
/**
* This class should never be created except with the appendButton call of KMultiTabBar
*/
class KMultiTabBarButton: public QPushButton
{
Q_OBJECT
public:
KMultiTabBarButton(const QPixmap& pic,const QString&, QMenu *popup,
int id,QWidget *parent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style);
KMultiTabBarButton(const QString&, QMenu *popup,
int id,QWidget *parent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style);
virtual ~KMultiTabBarButton();
int id() const;
public slots:
/**
* this is used internaly, but can be used by the user, if (s)he wants to
* It the according call of KMultiTabBar is invoked though this modifications will be overwritten
*/
void setPosition(KMultiTabBar::KMultiTabBarPosition);
/**
* this is used internaly, but can be used by the user, if (s)he wants to
* It the according call of KMultiTabBar is invoked though this modifications will be overwritten
*/
void setStyle(KMultiTabBar::KMultiTabBarStyle);
/**
* modify the text of the button
*/
void setText(const QString &);
QSize sizeHint() const;
protected:
KMultiTabBar::KMultiTabBarPosition m_position;
KMultiTabBar::KMultiTabBarStyle m_style;
QString m_text;
virtual void hideEvent( class QHideEvent*);
virtual void showEvent( class QShowEvent*);
private:
int m_id;
KMultiTabBarButtonPrivate *d;
signals:
/**
* this is emitted if the button is clicked
* @param id the ID identifying the button
*/
void clicked(int id);
protected slots:
virtual void slotClicked();
};
/**
* This class should never be created except with the appendTab call of KMultiTabBar
*/
class KMultiTabBarTab: public KMultiTabBarButton
{
Q_OBJECT
public:
KMultiTabBarTab(const QPixmap& pic,const QString&,int id,QWidget *parent,
KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style);
virtual ~KMultiTabBarTab();
/**
* set the active state of the tab
* @param state true==active false==not active
*/
void setState(bool state);
/**
* choose if the text should always be displayed
* this is only used in classic mode if at all
*/
void showActiveTabText(bool show);
void resize(){ setSize( neededSize() ); }
private:
bool m_showActiveTabText;
int m_expandedSize;
KMultiTabBarTabPrivate *d;
protected:
friend class KMultiTabBarInternal;
void setSize(int);
int neededSize();
void updateState();
virtual void paintEvent(QPaintEvent *);
virtual void drawButton(QPainter *);
virtual void drawButtonLabel(QPainter *);
void drawButtonStyled(QPainter *);
void drawButtonClassic(QPainter *);
protected slots:
virtual void slotClicked();
void setTabsPosition(KMultiTabBar::KMultiTabBarPosition);
public slots:
virtual void setIcon(const QString&);
virtual void setIcon(const QPixmap&);
};
/***************************************************************************
kmultitabbar_p.h - description
-------------------
begin : 2003
copyright : (C) 2003 by Joseph Wenninger <jowenn@kde.org>
***************************************************************************/
/***************************************************************************
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
***************************************************************************/
class KMultiTabBarInternal: public QWidget
{
Q_OBJECT
public:
KMultiTabBarInternal(QWidget *parent,KMultiTabBar::KMultiTabBarMode bm);
int appendTab(const QPixmap &,int=-1,const QString& =QString());
KMultiTabBarTab *tab(int) const;
void removeTab(int);
void setPosition(enum KMultiTabBar::KMultiTabBarPosition pos);
void setStyle(enum KMultiTabBar::KMultiTabBarStyle style);
void showActiveTabTexts(bool show);
QList<KMultiTabBarTab *>* tabs(){return &m_tabs;}
private:
friend class KMultiTabBar;
QWidget *box;
QBoxLayout *mainLayout;
QList<KMultiTabBarTab *> m_tabs;
enum KMultiTabBar::KMultiTabBarPosition m_position;
bool m_showActiveTabTexts;
enum KMultiTabBar::KMultiTabBarStyle m_style;
int m_expandedTabSize;
int m_lines;
KMultiTabBar::KMultiTabBarMode m_barMode;
protected:
virtual bool eventFilter(QObject *,QEvent*);
// virtual void paintEvent( QPaintEvent * );
virtual void resizeEvent(QResizeEvent *);
};
#endif

View File

@@ -47,6 +47,11 @@ class textFloat;
class configManager;
class pluginView;
class toolButton;
namespace FLUIQ
{
class WidgetContainer;
class CollapsibleWidget;
}
enum ProjectPlaybackMode
{
@@ -64,6 +69,11 @@ public:
return( m_workspace );
}
inline FLUIQ::WidgetContainer * centralWidgetContainer( void )
{
return m_centralWidgetContainer;
}
inline QWidget * toolBar( void )
{
return( m_toolBar );
@@ -152,10 +162,11 @@ private:
void finalize( void );
void toggleWindow( QWidget * _w );
void toggleWindow( FLUIQ::CollapsibleWidget * _w );
QMdiArea * m_workspace;
FLUIQ::WidgetContainer * m_centralWidgetContainer;
QWidget * m_toolBar;
QHBoxLayout * m_toolBarLayout;

View File

@@ -28,12 +28,11 @@
#ifndef _PIANO_ROLL_H
#define _PIANO_ROLL_H
#include <QtGui/QWidget>
#include "combobox_model.h"
#include "serializing_object.h"
#include "note.h"
#include "lmms_basics.h"
#include "fluiq/collapsible_widget.h"
class QPainter;
@@ -50,7 +49,7 @@ class timeLine;
class toolButton;
class pianoRoll : public QWidget, public serializingObject
class pianoRoll : public FLUIQ::CollapsibleWidget, public serializingObject
{
Q_OBJECT
public:

View File

@@ -1,7 +1,7 @@
/*
* plugin_browser.h - include file for pluginBrowser
*
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -28,29 +28,27 @@
#include <QtCore/QTimer>
#include <QtCore/QVector>
#include <QtGui/QWidget>
#include <QtGui/QPixmap>
#include "side_bar_widget.h"
#include "plugin.h"
class trackContainer;
class pluginBrowser : public sideBarWidget
class pluginBrowser : public QWidget
{
Q_OBJECT
public:
pluginBrowser( QWidget * _parent );
pluginBrowser( QWidget * _parent = NULL );
virtual ~pluginBrowser();
private:
QVector<plugin::descriptor> m_pluginDescriptors;
QWidget * m_view;
} ;

View File

@@ -1,97 +0,0 @@
/*
* side_bar.h - code for side-bar in LMMS
*
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#ifndef _SIDE_BAR_H
#define _SIDE_BAR_H
#include <QtCore/QMap>
#include "kmultitabbar.h"
#include "side_bar_widget.h"
class sideBar : public KMultiTabBar
{
Q_OBJECT
public:
sideBar( KMultiTabBarMode _m, QWidget * _parent ) :
KMultiTabBar( _m, _parent )
{
}
virtual ~sideBar()
{
}
inline int appendTab( sideBarWidget * _sbw, int _id )
{
int ret = KMultiTabBar::appendTab( _sbw->icon(), _id,
_sbw->title() );
m_widgets[_id] = _sbw;
_sbw->hide();
_sbw->setMinimumWidth( 200 );
connect( tab( _id ), SIGNAL( clicked( int ) ), this,
SLOT( tabClicked( int ) ) );
return( ret );
}
private slots:
inline void tabClicked( int _id )
{
// disable all other tabbar-buttons
QMap<int, QWidget *>::Iterator it;
for( it = m_widgets.begin(); it != m_widgets.end(); ++it )
{
if( it.key() != _id/* && isTabRaised(it.key()) == TRUE*/ )
{
setTab( it.key(), FALSE );
}
if( m_widgets[it.key()] != NULL )
{
m_widgets[it.key()]->hide();
}
}
if( m_widgets[_id] != NULL )
{
if( isTabRaised( _id ) )
{
m_widgets[_id]->show();
}
else
{
m_widgets[_id]->hide();
}
}
}
private:
QMap<int, QWidget *> m_widgets;
} ;
#endif

View File

@@ -1,77 +0,0 @@
/*
* side_bar_widget.h - base-class for all side-bar-widgets
*
* Copyright (c) 2004-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#ifndef _SIDE_BAR_WIDGET_H
#define _SIDE_BAR_WIDGET_H
#include <QtGui/QPixmap>
#include <QtGui/QVBoxLayout>
#include <QtGui/QWidget>
class sideBarWidget : public QWidget
{
Q_OBJECT
public:
sideBarWidget( const QString & _title, const QPixmap & _icon,
QWidget * _parent );
virtual ~sideBarWidget();
inline const QPixmap & icon( void ) const
{
return( m_icon );
}
inline const QString & title( void ) const
{
return( m_title );
}
protected:
virtual void paintEvent( QPaintEvent * _pe );
virtual void resizeEvent( QResizeEvent * _re );
inline virtual void contextMenuEvent( QContextMenuEvent * )
{
}
inline QWidget * contentParent( void )
{
return( m_contents );
}
inline void addContentWidget( QWidget * _w )
{
m_layout->addWidget( _w );
}
private:
QWidget * m_contents;
QVBoxLayout * m_layout;
QString m_title;
QPixmap m_icon;
} ;
#endif

View File

@@ -33,13 +33,15 @@
#include "track.h"
#include "journalling_object.h"
#include "fluiq/collapsible_widget.h"
class QVBoxLayout;
class trackContainer;
class trackContainerView : public QWidget, public modelView,
class trackContainerView : public FLUIQ::CollapsibleWidget,
public modelView,
public journallingObject,
public serializingObjectHook
{
@@ -53,22 +55,22 @@ public:
QWidget * contentWidget( void )
{
return( m_scrollArea );
return m_scrollArea;
}
inline const midiTime & currentPosition( void ) const
{
return( m_currentPosition );
return m_currentPosition;
}
virtual bool fixedTCOs( void ) const
{
return( FALSE );
return false;
}
inline float pixelsPerTact( void ) const
{
return( m_ppt );
return m_ppt;
}
void setPixelsPerTact( int _ppt );
@@ -79,27 +81,27 @@ public:
inline bool rubberBandActive( void ) const
{
return( m_rubberBand->isVisible() );
return m_rubberBand->isVisible();
}
inline QVector<selectableObject *> selectedObjects( void )
{
if( allowRubberband() == TRUE )
if( allowRubberband() == true )
{
return( m_rubberBand->selectedObjects() );
return m_rubberBand->selectedObjects();
}
return( QVector<selectableObject *>() );
return QVector<selectableObject *>();
}
trackContainer * model( void )
{
return( m_tc );
return m_tc;
}
const trackContainer * model( void ) const
{
return( m_tc );
return m_tc;
}
void moveTrackViewUp( trackView * _tv );
@@ -114,7 +116,7 @@ public:
virtual QString nodeName( void ) const
{
return( "trackcontainerview" );
return "trackcontainerview";
}
@@ -129,7 +131,7 @@ protected:
const QList<trackView *> & trackViews( void ) const
{
return( m_trackViews );
return m_trackViews;
}
virtual void dragEnterEvent( QDragEnterEvent * _dee );

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_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_fxMixerView = new fxMixerView;
s_controllerRackView = new controllerRackView;
s_projectNotes = new projectNotes;
s_mainWindow->finalize();
}

View File

@@ -65,6 +65,7 @@
#include "bb_track_container.h"
#include "piano_roll.h"
#include "debug.h"
#include "fluiq/widget_container.h"
@@ -75,7 +76,7 @@ QPixmap * automationEditor::s_toolMove = NULL;
automationEditor::automationEditor( void ) :
QWidget(),
FLUIQ::CollapsibleWidget( Qt::Vertical ),
m_zoomingXModel(),
m_zoomingYModel(),
m_quantizeModel(),
@@ -133,8 +134,9 @@ 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" ) );
@@ -356,18 +358,7 @@ automationEditor::automationEditor( void ) :
setMinimumSize( tb_layout->minimumSize().width(), 128 );
// add us to workspace
if( engine::getMainWindow()->workspace() )
{
engine::getMainWindow()->workspace()->addSubWindow( this );
parentWidget()->resize( InitialWidth, InitialHeight );
parentWidget()->hide();
}
else
{
resize( InitialWidth, InitialHeight );
hide();
}
engine::getMainWindow()->centralWidgetContainer()->addWidget( this );
}

View File

@@ -50,7 +50,8 @@ bbEditor::bbEditor( bbTrackContainer * _tc ) :
pal.setBrush( m_toolBar->backgroundRole(),
embed::getIconPixmap( "toolbar_bg" ) );
m_toolBar->setPalette( pal );
static_cast<QVBoxLayout *>( layout() )->insertWidget( 0, m_toolBar );
insertWidget( 1, m_toolBar );
// static_cast<QVBoxLayout *>( layout() )->insertWidget( 0, m_toolBar );
QHBoxLayout * tb_layout = new QHBoxLayout( m_toolBar );
tb_layout->setSpacing( 0 );
@@ -58,7 +59,8 @@ bbEditor::bbEditor( bbTrackContainer * _tc ) :
setWindowIcon( embed::getIconPixmap( "bb_track" ) );
setWindowTitle( tr( "Beat+Bassline Editor" ) );
setWindowTitle( tr( "PATTERN EDITOR" ) );
// TODO: Use style sheet
setMinimumWidth( TRACK_OP_WIDTH + DEFAULT_SETTINGS_WIDGET_WIDTH
+ 2 * TCO_BORDER_WIDTH + 192 );
@@ -112,12 +114,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,16 +63,19 @@ enum TreeWidgetItemTypes
fileBrowser::fileBrowser( const QString & _directories, const QString & _filter,
const QString & _title, const QPixmap & _pm,
QWidget * _parent, bool _dirs_as_items ) :
sideBarWidget( _title, _pm, _parent ),
QWidget( _parent ),
m_directories( _directories ),
m_filter( _filter ),
m_dirsAsItems( _dirs_as_items )
{
setWindowTitle( tr( "Browser" ) );
m_l = new fileBrowserTreeWidget( contentParent() );
addContentWidget( m_l );
QVBoxLayout * viewLayout = new QVBoxLayout( this );
viewLayout->setMargin( 5 );
viewLayout->setSpacing( 5 );
QWidget * ops = new QWidget( contentParent() );
m_l = new fileBrowserTreeWidget( this );
viewLayout->addWidget( m_l );
QWidget * ops = new QWidget( this );
ops->setFixedHeight( 24 );
QHBoxLayout * opl = new QHBoxLayout( ops );
@@ -92,10 +95,9 @@ fileBrowser::fileBrowser( const QString & _directories, const QString & _filter,
opl->addSpacing( 5 );
opl->addWidget( reload_btn );
addContentWidget( ops );
viewLayout->addWidget( ops );
reloadTree();
show();
}

View File

@@ -29,9 +29,9 @@
#include <QtGui/QMdiArea>
#include <QtGui/QMdiSubWindow>
#include <QtGui/QPainter>
#include <QtGui/QPushButton>
#include <QtGui/QToolButton>
#include <QtGui/QStackedLayout>
#include <QtGui/QScrollArea>
#include <QtGui/QScrollBar>
#include <QtGui/QStackedWidget>
#include "fx_mixer_view.h"
#include "fader.h"
@@ -44,6 +44,8 @@
#include "tooltip.h"
#include "pixmap_button.h"
#include "fluiq/widget_container.h"
class fxLine : public QWidget
@@ -98,7 +100,7 @@ private:
fxMixerView::fxMixerView() :
QWidget(),
FLUIQ::CollapsibleWidget( Qt::Vertical ),
modelView( NULL, this ),
serializingObjectHook()
{
@@ -109,111 +111,66 @@ fxMixerView::fxMixerView() :
//pal.setColor( QPalette::Background, QColor( 72, 76, 88 ) );
//setPalette( pal );
setAutoFillBackground( true );
setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Minimum );
setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed );
setFixedHeight( 280 );
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
QHBoxLayout * ml = new QHBoxLayout;
ml->setMargin( 0 );
ml->setSpacing( 0 );
ml->addSpacing( 6 );
QWidget * mainWidget = new QWidget;
QHBoxLayout * mainLayout = new QHBoxLayout;
mainLayout->setMargin( 5 );
mainLayout->setSpacing( 5 );
mainLayout->addSpacing( 0 );
mainWidget->setLayout( mainLayout );
m_fxRacksView = new QStackedWidget;
m_fxRacksView->setFixedSize( 250, 250 );
mainLayout->addWidget( m_fxRacksView, 0, Qt::AlignTop );
mainLayout->addSpacing( 8 );
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 );
}
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 );
for( int i = 0; i < NumFxChannels+1; ++i )
{
fxChannelView * cv = &m_fxChannelViews[i];
fxChannelView * view = &m_fxChannelViews[i];
createFxLine( i, i == 0 ? mainWidget : scrollAreaWidget );
if( i == 0 )
{
cv->m_fxLine = new fxLine( NULL, this,
m->m_fxChannels[i]->m_name );
ml->addWidget( cv->m_fxLine );
ml->addSpacing( 10 );
mainLayout->addWidget( view->m_fxLine, 0,
Qt::AlignTop );
mainLayout->addSpacing( 5 );
}
else
{
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 ) ) );
scrollAreaLayout->addWidget( view->m_fxLine );
}
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 );
}
ml->addLayout( m_fxLineBanks );
ml->addLayout( m_fxRacksLayout );
mainLayout->addWidget( scrollArea, 0, Qt::AlignTop );
addWidget( mainWidget );
setLayout( ml );
updateGeometry();
m_fxLineBanks->setCurrentIndex( 0 );
setCurrentFxLine( m_fxChannelViews[0].m_fxLine );
// timer for updating faders
@@ -221,17 +178,7 @@ fxMixerView::fxMixerView() :
this, SLOT( updateFaders() ) );
// 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 );
engine::getMainWindow()->centralWidgetContainer()->addWidget( this );
// we want to receive dataChanged-signals in order to update
setModel( m );
@@ -270,7 +217,7 @@ void fxMixerView::setCurrentFxLine( fxLine * _line )
{
if( m_fxChannelViews[i].m_fxLine == _line )
{
m_fxRacksLayout->setCurrentIndex( i );
m_fxRacksView->setCurrentIndex( i );
}
m_fxChannelViews[i].m_fxLine->update();
}
@@ -283,8 +230,6 @@ void fxMixerView::setCurrentFxLine( int _line )
if ( _line >= 0 && _line < NumFxChannels+1 )
{
setCurrentFxLine( m_fxChannelViews[_line].m_fxLine );
m_bankButtons->button( (_line-1) / 16 )->click();
}
}
@@ -333,5 +278,37 @@ 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,6 +31,7 @@
#include <QtGui/QCloseEvent>
#include <QtGui/QDesktopServices>
#include <QtGui/QFileDialog>
#include <QtGui/QLineEdit>
#include <QtGui/QMdiArea>
#include <QtGui/QMdiSubWindow>
#include <QtGui/QMenuBar>
@@ -57,7 +58,6 @@
#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,8 +77,17 @@
#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 ),
@@ -88,13 +97,14 @@ mainWindow::mainWindow( void ) :
{
setAttribute( Qt::WA_DeleteOnClose );
QWidget * main_widget = new QWidget( this );
QVBoxLayout * vbox = new QVBoxLayout( main_widget );
QWidget * mainWidget = new QWidget( this );
QVBoxLayout * vbox = new QVBoxLayout( mainWidget );
vbox->setSpacing( 0 );
vbox->setMargin( 0 );
QWidget * w = new QWidget( main_widget );
#if 0
QWidget * w = new QWidget( mainWidget );
QHBoxLayout * hbox = new QHBoxLayout( w );
hbox->setSpacing( 0 );
hbox->setMargin( 0 );
@@ -155,6 +165,94 @@ 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();
@@ -176,12 +274,9 @@ 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( main_widget );
m_toolBar = new QWidget( mainWidget );
m_toolBar->setObjectName( "mainToolbar" );
m_toolBar->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
m_toolBar->setFixedHeight( 64 );
@@ -193,8 +288,9 @@ mainWindow::mainWindow( void ) :
m_toolBarLayout->setSpacing( 0 );
vbox->addWidget( m_toolBar );
vbox->addWidget( w );
setCentralWidget( main_widget );
vbox->addWidget( ws );
setCentralWidget( mainWidget );
/// HACK TO CREATE EXTRA SONG EDITOR FOR NOW ///
//Fun test
@@ -1115,18 +1211,15 @@ void mainWindow::help( void )
void mainWindow::toggleWindow( QWidget * _w )
void mainWindow::toggleWindow( FLUIQ::CollapsibleWidget * _w )
{
if( m_workspace->activeSubWindow() != _w->parentWidget()
|| _w->parentWidget()->isHidden() )
if( _w->isCollapsed() )
{
_w->parentWidget()->show();
_w->show();
_w->setFocus();
_w->expand();
}
else
{
_w->parentWidget()->hide();
_w->collapse();
}
}
@@ -1151,7 +1244,20 @@ void mainWindow::toggleSongEditorWin( void )
void mainWindow::toggleProjectNotesWin( void )
{
toggleWindow( engine::getProjectNotes() );
//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();
}
}
@@ -1183,7 +1289,18 @@ void mainWindow::toggleFxMixerWin( void )
void mainWindow::toggleControllerRack( void )
{
toggleWindow( engine::getControllerRackView() );
QWidget * _w = engine::getControllerRackView();
if( m_workspace->activeSubWindow() != _w->parentWidget()
|| _w->parentWidget()->isHidden() )
{
_w->parentWidget()->show();
_w->show();
_w->setFocus();
}
else
{
_w->parentWidget()->hide();
}
}

View File

@@ -68,6 +68,7 @@
#include "timeline.h"
#include "tool_button.h"
#include "tooltip.h"
#include "fluiq/widget_container.h"
typedef automationPattern::timeMap timeMap;
@@ -77,9 +78,6 @@ 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;
@@ -240,8 +238,9 @@ 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" ) );
@@ -498,19 +497,7 @@ pianoRoll::pianoRoll( void ) :
setMinimumSize( tb_layout->minimumSize().width(), 160 );
// add us to workspace
if( engine::getMainWindow()->workspace() )
{
engine::getMainWindow()->workspace()->addSubWindow( this );
parentWidget()->resize( InitialPianoRollWidth,
InitialPianoRollHeight );
parentWidget()->hide();
}
else
{
resize( InitialPianoRollWidth, InitialPianoRollHeight );
hide();
}
engine::getMainWindow()->centralWidgetContainer()->addWidget( this );
connect( engine::getSong(), SIGNAL( timeSignatureChanged( int, int ) ),
this, SLOT( update() ) );

View File

@@ -29,6 +29,7 @@
#include <QtGui/QPainter>
#include <QtGui/QCursor>
#include <QtGui/QMouseEvent>
#include <QtGui/QVBoxLayout>
#include "plugin_browser.h"
@@ -41,28 +42,27 @@
pluginBrowser::pluginBrowser( QWidget * _parent ) :
sideBarWidget( tr( "Instrument plugins" ),
embed::getIconPixmap( "plugins" ), _parent )
QWidget( _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 * view_layout = new QVBoxLayout( m_view );
view_layout->setMargin( 5 );
view_layout->setSpacing( 5 );
QVBoxLayout * viewLayout = new QVBoxLayout( this );
viewLayout->setMargin( 5 );
viewLayout->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." ),
m_view );
this );
hint->setFont( pointSize<8>( hint->font() ) );
hint->setWordWrap( TRUE );
view_layout->addWidget( hint );
hint->setWordWrap( true );
viewLayout->addWidget( hint );
plugin::getDescriptorsOfAvailPlugins( m_pluginDescriptors );
@@ -73,13 +73,14 @@ pluginBrowser::pluginBrowser( QWidget * _parent ) :
if( it->type == plugin::Instrument )
{
pluginDescWidget * p = new pluginDescWidget( *it,
m_view );
this );
p->show();
view_layout->addWidget( p );
viewLayout->addWidget( p );
}
}
view_layout->addStretch();
show();
viewLayout->addStretch();
viewLayout->setSizeConstraint( QLayout::SetMinimumSize );
}
@@ -101,12 +102,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 );
}
@@ -138,14 +139,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,
@@ -165,7 +166,7 @@ void pluginDescWidget::paintEvent( QPaintEvent * )
void pluginDescWidget::enterEvent( QEvent * _e )
{
m_mouseOver = TRUE;
m_mouseOver = true;
m_targetHeight = height() + 1;
updateHeight();
QWidget::enterEvent( _e );
@@ -176,7 +177,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,6 +33,7 @@ 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

@@ -76,7 +76,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 );
@@ -98,7 +98,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;
@@ -106,8 +106,8 @@ songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) :
embed::getIconPixmap( "toolbar_bg" ) );
m_toolBar->setPalette( pal );
static_cast<QVBoxLayout *>( layout() )->insertWidget( 0, m_toolBar );
static_cast<QVBoxLayout *>( layout() )->insertWidget( 1, m_timeLine );
insertWidget( 1, m_toolBar );
insertWidget( 2, m_timeLine );
QHBoxLayout * tb_layout = new QHBoxLayout( m_toolBar );
tb_layout->setMargin( 0 );
@@ -250,11 +250,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,9 +47,11 @@
#include "string_pair_drag.h"
#include "track.h"
#include "fluiq/widget_container.h"
trackContainerView::trackContainerView( trackContainer * _tc ) :
QWidget(),
FLUIQ::CollapsibleWidget( Qt::Vertical ),
modelView( NULL, this ),
journallingObject(),
serializingObjectHook(),
@@ -61,12 +63,11 @@ trackContainerView::trackContainerView( trackContainer * _tc ) :
m_rubberBand( new rubberBand( m_scrollArea ) ),
m_origin()
{
engine::getMainWindow()->centralWidgetContainer()->addWidget( this );
m_tc->setHook( this );
QVBoxLayout * layout = new QVBoxLayout( this );
layout->setMargin( 0 );
layout->setSpacing( 0 );
layout->addWidget( m_scrollArea );
addWidget( m_scrollArea );
QWidget * scrollContent = new QWidget;
m_scrollLayout = new QVBoxLayout( scrollContent );
@@ -476,7 +477,7 @@ void trackContainerView::resizeEvent( QResizeEvent * _re )
trackContainerView::scrollArea::scrollArea( trackContainerView * _parent ) :
QScrollArea( _parent ),
QScrollArea( NULL ),
m_trackContainerView( _parent )
{
setFrameStyle( QFrame::NoFrame );