summaryrefslogtreecommitdiffstats
path: root/src/sidebars.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-27 00:40:29 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-27 00:40:29 +0000
commit7a741e43ff09e70396a918956219b8316c48e522 (patch)
tree3d0f60eccd59786cea7236db2d5c4c1f25874515 /src/sidebars.cpp
parenta48487ef0c329434b58b6f920111bb0999f1109e (diff)
downloaddolphin-7a741e43ff09e70396a918956219b8316c48e522.tar.gz
dolphin-7a741e43ff09e70396a918956219b8316c48e522.zip
TQt4 port Dolphin
This enables compilation under Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/dolphin@1229359 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/sidebars.cpp')
-rw-r--r--src/sidebars.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/sidebars.cpp b/src/sidebars.cpp
index b9f8ca6..551c4af 100644
--- a/src/sidebars.cpp
+++ b/src/sidebars.cpp
@@ -20,11 +20,11 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include <qlayout.h>
-#include <qpixmap.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
#include <kiconloader.h>
#include <klocale.h>
-#include <qcombobox.h>
+#include <tqcombobox.h>
#include "dolphinsettings.h"
#include "sidebarssettings.h"
@@ -36,46 +36,46 @@
/**
*
- * @param parent
+ * @param tqparent
*/
-leftSidebar::leftSidebar(QWidget* parent) :
- QWidget(parent),
+leftSidebar::leftSidebar(TQWidget* tqparent) :
+ TQWidget(tqparent),
m_pagesSelector(0),
m_page(0),
- m_layout(0)
+ m_tqlayout(0)
{
- m_layout = new QVBoxLayout(this);
+ m_tqlayout = new TQVBoxLayout(this);
- m_pagesSelector = new QComboBox(this);
+ m_pagesSelector = new TQComboBox(this);
m_pagesSelector->insertItem(i18n("Bookmarks"));
m_pagesSelector->insertItem(i18n("Information"));
// Assure that the combo box has the same height as the URL navigator for
- // a clean layout.
+ // a clean tqlayout.
// TODO: the following 2 lines have been copied from the URLNavigator
// constructor (-> provide a shared height setting?)
- //QFontMetrics fontMetrics(font());
- QFontMetrics fontMetrics(font());
+ //TQFontMetrics fontMetrics(font());
+ TQFontMetrics fontMetrics(font());
m_pagesSelector->setMinimumHeight(fontMetrics.height() + 8);
leftSidebarSettings* settings = DolphinSettings::instance().leftsidebar();
const int selectedIndex = indexForName(settings->selectedPage());
m_pagesSelector->setCurrentItem(selectedIndex);
- m_layout->addWidget(m_pagesSelector);
+ m_tqlayout->addWidget(m_pagesSelector);
createPage(selectedIndex);
- connect(m_pagesSelector, SIGNAL(activated(int)),
- this, SLOT(createPage(int)));
+ connect(m_pagesSelector, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(createPage(int)));
}
leftSidebar::~leftSidebar()
{
}
-QSize leftSidebar::sizeHint() const
+TQSize leftSidebar::tqsizeHint() const
{
- QSize size(QWidget::sizeHint());
+ TQSize size(TQWidget::tqsizeHint());
leftSidebarSettings* settings = DolphinSettings::instance().leftsidebar();
size.setWidth(settings->width());
@@ -95,14 +95,14 @@ void leftSidebar::createPage(int index)
default: break;
}
- m_layout->addWidget(m_page);
+ m_tqlayout->addWidget(m_page);
m_page->show();
leftSidebarSettings* settings = DolphinSettings::instance().leftsidebar();
settings->setSelectedPage(m_pagesSelector->text(index));
}
-int leftSidebar::indexForName(const QString& name) const
+int leftSidebar::indexForName(const TQString& name) const
{
const int count = m_pagesSelector->count();
for (int i = 0; i < count; ++i) {
@@ -114,43 +114,43 @@ int leftSidebar::indexForName(const QString& name) const
return 0;
}
-rightSidebar::rightSidebar(QWidget* parent) :
- QWidget(parent),
+rightSidebar::rightSidebar(TQWidget* tqparent) :
+ TQWidget(tqparent),
m_pagesSelector(0),
m_page(0),
- m_layout(0)
+ m_tqlayout(0)
{
- m_layout = new QVBoxLayout(this);
+ m_tqlayout = new TQVBoxLayout(this);
- m_pagesSelector = new QComboBox(this);
+ m_pagesSelector = new TQComboBox(this);
m_pagesSelector->insertItem(i18n("Bookmarks"));
m_pagesSelector->insertItem(i18n("Information"));
// Assure that the combo box has the same height as the URL navigator for
- // a clean layout.
+ // a clean tqlayout.
// TODO: the following 2 lines have been copied from the URLNavigator
// constructor (-> provide a shared height setting?)
- QFontMetrics fontMetrics(font());
+ TQFontMetrics fontMetrics(font());
m_pagesSelector->setMinimumHeight(fontMetrics.height() + 8);
rightSidebarSettings* settings = DolphinSettings::instance().rightsidebar();
const int selectedIndex = indexForName(settings->selectedPage());
m_pagesSelector->setCurrentItem(selectedIndex);
- m_layout->addWidget(m_pagesSelector);
+ m_tqlayout->addWidget(m_pagesSelector);
createPage(selectedIndex);
- connect(m_pagesSelector, SIGNAL(activated(int)),
- this, SLOT(createPage(int)));
+ connect(m_pagesSelector, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(createPage(int)));
}
rightSidebar::~rightSidebar()
{
}
-QSize rightSidebar::sizeHint() const
+TQSize rightSidebar::tqsizeHint() const
{
- QSize size(QWidget::sizeHint());
+ TQSize size(TQWidget::tqsizeHint());
rightSidebarSettings* settings = DolphinSettings::instance().rightsidebar();
size.setWidth(settings->width());
@@ -170,14 +170,14 @@ void rightSidebar::createPage(int index)
default: break;
}
- m_layout->addWidget(m_page);
+ m_tqlayout->addWidget(m_page);
m_page->show();
rightSidebarSettings* settings = DolphinSettings::instance().rightsidebar();
settings->setSelectedPage(m_pagesSelector->text(index));
}
-int rightSidebar::indexForName(const QString& name) const
+int rightSidebar::indexForName(const TQString& name) const
{
const int count = m_pagesSelector->count();
for (int i = 0; i < count; ++i) {