Reverted c310667bd90457a4edafd752718046bf892b1ea6y to keep trunk at least
a bit usable, will continue FLUIQ development in a separate branch
This commit is contained in:
@@ -35,7 +35,6 @@
|
||||
#include "midi_time.h"
|
||||
#include "automation_pattern.h"
|
||||
#include "combobox_model.h"
|
||||
#include "fluiq/collapsible_widget.h"
|
||||
|
||||
|
||||
class QPainter;
|
||||
@@ -48,8 +47,7 @@ class timeLine;
|
||||
class toolButton;
|
||||
|
||||
|
||||
class automationEditor : public FLUIQ::CollapsibleWidget,
|
||||
public journallingObject
|
||||
class automationEditor : public QWidget, public journallingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -150,8 +148,7 @@ private:
|
||||
static const int InitialHeight = 480;
|
||||
|
||||
static const int ScrollBarSize = 16;
|
||||
static const int TopMargin = 32 +
|
||||
FLUIQ::CollapsibleWidgetHeader::MinimalHeight;
|
||||
static const int TopMargin = 48;
|
||||
|
||||
static const int DefaultYDelta = 6;
|
||||
static const int DefaultStepsPerTact = 16;
|
||||
|
||||
@@ -30,6 +30,10 @@
|
||||
#include <QtCore/QMutex>
|
||||
#include <QtGui/QTreeWidget>
|
||||
|
||||
|
||||
#include "side_bar_widget.h"
|
||||
|
||||
|
||||
class QLineEdit;
|
||||
|
||||
class fileItem;
|
||||
@@ -40,7 +44,7 @@ class trackContainer;
|
||||
|
||||
|
||||
|
||||
class fileBrowser : public QWidget
|
||||
class fileBrowser : public sideBarWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -50,10 +54,6 @@ public:
|
||||
virtual ~fileBrowser();
|
||||
|
||||
|
||||
protected:
|
||||
virtual void keyPressEvent( QKeyEvent * _ke );
|
||||
|
||||
|
||||
public slots:
|
||||
void filterItems( const QString & _filter );
|
||||
void reloadTree( void );
|
||||
@@ -61,6 +61,7 @@ public slots:
|
||||
|
||||
private:
|
||||
bool filterItems( QTreeWidgetItem * _item, const QString & _filter );
|
||||
virtual void keyPressEvent( QKeyEvent * _ke );
|
||||
|
||||
void addItems( const QString & _path );
|
||||
|
||||
|
||||
@@ -29,10 +29,9 @@
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#include "fx_mixer.h"
|
||||
#include "fluiq/collapsible_widget.h"
|
||||
|
||||
|
||||
class QStackedWidget;
|
||||
class QStackedLayout;
|
||||
class QButtonGroup;
|
||||
class fader;
|
||||
class fxLine;
|
||||
@@ -41,7 +40,7 @@ class pixmapButton;
|
||||
|
||||
|
||||
|
||||
class fxMixerView : public FLUIQ::CollapsibleWidget, public modelView,
|
||||
class fxMixerView : public QWidget, public modelView,
|
||||
public serializingObjectHook
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -54,7 +53,7 @@ public:
|
||||
|
||||
fxLine * currentFxLine( void )
|
||||
{
|
||||
return m_currentFxLine;
|
||||
return( m_currentFxLine );
|
||||
}
|
||||
void setCurrentFxLine( fxLine * _line );
|
||||
void setCurrentFxLine( int _line );
|
||||
@@ -67,8 +66,6 @@ private slots:
|
||||
|
||||
|
||||
private:
|
||||
void createFxLine( int _line, QWidget * _parent );
|
||||
|
||||
struct fxChannelView
|
||||
{
|
||||
fxLine * m_fxLine;
|
||||
@@ -79,7 +76,9 @@ private:
|
||||
|
||||
fxChannelView m_fxChannelViews[NumFxChannels+1];
|
||||
|
||||
QStackedWidget * m_fxRacksView;
|
||||
QStackedLayout * m_fxRacksLayout;
|
||||
QStackedLayout * m_fxLineBanks;
|
||||
QButtonGroup * m_bankButtons;
|
||||
fxLine * m_currentFxLine;
|
||||
|
||||
} ;
|
||||
|
||||
309
include/kmultitabbar.h
Normal file
309
include/kmultitabbar.h
Normal file
@@ -0,0 +1,309 @@
|
||||
/***************************************************************************
|
||||
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
|
||||
@@ -47,11 +47,6 @@ class textFloat;
|
||||
class configManager;
|
||||
class pluginView;
|
||||
class toolButton;
|
||||
namespace FLUIQ
|
||||
{
|
||||
class WidgetContainer;
|
||||
class CollapsibleWidget;
|
||||
}
|
||||
|
||||
enum ProjectPlaybackMode
|
||||
{
|
||||
@@ -69,11 +64,6 @@ public:
|
||||
return( m_workspace );
|
||||
}
|
||||
|
||||
inline FLUIQ::WidgetContainer * centralWidgetContainer( void )
|
||||
{
|
||||
return m_centralWidgetContainer;
|
||||
}
|
||||
|
||||
inline QWidget * toolBar( void )
|
||||
{
|
||||
return( m_toolBar );
|
||||
@@ -162,11 +152,10 @@ private:
|
||||
|
||||
void finalize( void );
|
||||
|
||||
void toggleWindow( FLUIQ::CollapsibleWidget * _w );
|
||||
void toggleWindow( QWidget * _w );
|
||||
|
||||
|
||||
QMdiArea * m_workspace;
|
||||
FLUIQ::WidgetContainer * m_centralWidgetContainer;
|
||||
|
||||
QWidget * m_toolBar;
|
||||
QHBoxLayout * m_toolBarLayout;
|
||||
|
||||
@@ -28,12 +28,13 @@
|
||||
#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 "song.h"
|
||||
#include "fluiq/collapsible_widget.h"
|
||||
|
||||
|
||||
class QPainter;
|
||||
@@ -50,7 +51,7 @@ class timeLine;
|
||||
class toolButton;
|
||||
|
||||
|
||||
class pianoRoll : public FLUIQ::CollapsibleWidget, public serializingObject
|
||||
class pianoRoll : public QWidget, public serializingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* plugin_browser.h - include file for pluginBrowser
|
||||
*
|
||||
* Copyright (c) 2005-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -28,27 +28,29 @@
|
||||
|
||||
#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 QWidget
|
||||
class pluginBrowser : public sideBarWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
pluginBrowser( QWidget * _parent = NULL );
|
||||
pluginBrowser( QWidget * _parent );
|
||||
virtual ~pluginBrowser();
|
||||
|
||||
|
||||
private:
|
||||
QVector<plugin::descriptor> m_pluginDescriptors;
|
||||
|
||||
QWidget * m_view;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
97
include/side_bar.h
Normal file
97
include/side_bar.h
Normal file
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* 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
|
||||
77
include/side_bar_widget.h
Normal file
77
include/side_bar_widget.h
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* 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
|
||||
@@ -33,15 +33,13 @@
|
||||
|
||||
#include "track.h"
|
||||
#include "journalling_object.h"
|
||||
#include "fluiq/collapsible_widget.h"
|
||||
|
||||
|
||||
class QVBoxLayout;
|
||||
class trackContainer;
|
||||
|
||||
|
||||
class trackContainerView : public FLUIQ::CollapsibleWidget,
|
||||
public modelView,
|
||||
class trackContainerView : public QWidget, public modelView,
|
||||
public journallingObject,
|
||||
public serializingObjectHook
|
||||
{
|
||||
@@ -55,22 +53,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 );
|
||||
@@ -81,27 +79,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 );
|
||||
@@ -116,7 +114,7 @@ public:
|
||||
|
||||
virtual QString nodeName( void ) const
|
||||
{
|
||||
return "trackcontainerview";
|
||||
return( "trackcontainerview" );
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +129,7 @@ protected:
|
||||
|
||||
const QList<trackView *> & trackViews( void ) const
|
||||
{
|
||||
return m_trackViews;
|
||||
return( m_trackViews );
|
||||
}
|
||||
|
||||
virtual void dragEnterEvent( QDragEnterEvent * _dee );
|
||||
|
||||
Reference in New Issue
Block a user