From 497c792871314bc7a7965f2af941bf452c375127 Mon Sep 17 00:00:00 2001 From: Lukas W Date: Wed, 26 Nov 2014 11:03:35 +0100 Subject: [PATCH] Rename tabButton/tab_button --- include/TabBar.h | 6 +++--- include/{tab_button.h => TabButton.h} | 8 ++++---- plugins/ladspa_browser/ladspa_browser.cpp | 2 +- src/gui/SetupDialog.cpp | 2 +- src/gui/widgets/TabBar.cpp | 14 +++++++------- 5 files changed, 16 insertions(+), 16 deletions(-) rename include/{tab_button.h => TabButton.h} (88%) diff --git a/include/TabBar.h b/include/TabBar.h index 9cfe1dd96..dde54b049 100644 --- a/include/TabBar.h +++ b/include/TabBar.h @@ -33,7 +33,7 @@ #include "export.h" -class tabButton; +class TabButton; class EXPORT TabBar : public QWidget @@ -44,7 +44,7 @@ public: QBoxLayout::Direction _dir = QBoxLayout::LeftToRight ); virtual ~TabBar(); - tabButton * addTab( QWidget * _w, const QString & _text, + TabButton * addTab( QWidget * _w, const QString & _text, int _id, bool _add_stretch = false, bool _text_is_tooltip = false ); void removeTab( int _id ); @@ -73,7 +73,7 @@ protected slots: private: - QMap > m_tabs; + QMap > m_tabs; QBoxLayout * m_layout; bool m_exclusive; diff --git a/include/tab_button.h b/include/TabButton.h similarity index 88% rename from include/tab_button.h rename to include/TabButton.h index f6ae54a03..94f0d9b6b 100644 --- a/include/tab_button.h +++ b/include/TabButton.h @@ -1,5 +1,5 @@ /* - * tab_button.h - declaration of class tabButton + * TabButton.h - declaration of class TabButton * * Copyright (c) 2005-2007 Tobias Doerffel * @@ -29,11 +29,11 @@ #include -class tabButton : public QPushButton +class TabButton : public QPushButton { Q_OBJECT public: - tabButton( const QString & _text, int _id, QWidget * _parent ) : + TabButton( const QString & _text, int _id, QWidget * _parent ) : QPushButton( _text, _parent ), m_id( _id ) { @@ -42,7 +42,7 @@ public: SLOT( slotClicked() ) ); } - ~tabButton() + ~TabButton() { } diff --git a/plugins/ladspa_browser/ladspa_browser.cpp b/plugins/ladspa_browser/ladspa_browser.cpp index 3f6e6cb9b..535a6a470 100644 --- a/plugins/ladspa_browser/ladspa_browser.cpp +++ b/plugins/ladspa_browser/ladspa_browser.cpp @@ -36,7 +36,7 @@ #include "ladspa_description.h" #include "ladspa_port_dialog.h" #include "TabBar.h" -#include "tab_button.h" +#include "TabButton.h" #include "embed.cpp" diff --git a/src/gui/SetupDialog.cpp b/src/gui/SetupDialog.cpp index f919ee6bf..a29114f8b 100644 --- a/src/gui/SetupDialog.cpp +++ b/src/gui/SetupDialog.cpp @@ -33,7 +33,7 @@ #include "SetupDialog.h" #include "TabBar.h" -#include "tab_button.h" +#include "TabButton.h" #include "TabWidget.h" #include "gui_templates.h" #include "Mixer.h" diff --git a/src/gui/widgets/TabBar.cpp b/src/gui/widgets/TabBar.cpp index e5bcf3db2..325767ad1 100644 --- a/src/gui/widgets/TabBar.cpp +++ b/src/gui/widgets/TabBar.cpp @@ -24,7 +24,7 @@ #include "TabBar.h" -#include "tab_button.h" +#include "TabButton.h" #include "gui_templates.h" #include "ToolTip.h" @@ -51,7 +51,7 @@ TabBar::~TabBar() -tabButton * TabBar::addTab( QWidget * _w, const QString & _text, int _id, +TabButton * TabBar::addTab( QWidget * _w, const QString & _text, int _id, bool _add_stretch, bool _text_is_tooltip ) { // already tab with id? @@ -62,7 +62,7 @@ tabButton * TabBar::addTab( QWidget * _w, const QString & _text, int _id, } QString caption = ( _text_is_tooltip ) ? QString( "" ) : _text; // create tab-button - tabButton * b = new tabButton( caption, _id, this ); + TabButton * b = new TabButton( caption, _id, this ); connect( b, SIGNAL( clicked( int ) ), this, SLOT( tabClicked( int ) ) ); b->setIconSize( QSize( 48, 48 ) ); b->setFixedSize( 64, 64 ); @@ -75,7 +75,7 @@ tabButton * TabBar::addTab( QWidget * _w, const QString & _text, int _id, // small workaround, because QBoxLayout::addWidget(...) doesn't // work properly, so we first have to remove all tabs from the // layout and them add them in the correct order - QMap >::iterator it; + QMap >::iterator it; for( it = m_tabs.begin(); it != m_tabs.end(); ++it ) { m_layout->removeWidget( it.value().first ); @@ -136,7 +136,7 @@ void TabBar::setActiveTab( int _id ) int TabBar::activeTab() { - QMap >::iterator it; + QMap >::iterator it; for( it = m_tabs.begin(); it != m_tabs.end(); ++it ) { if( tabState( it.key() ) == true ) @@ -175,7 +175,7 @@ void TabBar::setTabState( int _id, bool _checked ) void TabBar::hideAll( int _exception ) { - QMap >::iterator it; + QMap >::iterator it; for( it = m_tabs.begin(); it != m_tabs.end(); ++it ) { if( it.key() != _exception ) @@ -228,7 +228,7 @@ void TabBar::tabClicked( int _id ) bool TabBar::allHidden() { - QMap >::iterator it; + QMap >::iterator it; for( it = m_tabs.begin(); it != m_tabs.end(); ++it ) { if( !it.value().second->isHidden() )