diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-02 08:02:59 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-02 08:02:59 +0000 |
commit | f9a9340723a73d10f254a509c209c579efcf1c1f (patch) | |
tree | 46558a8c45f8b4f311d3f33c6c7fa376ac7a0349 /yakuake/src/tab_bar.cpp | |
parent | 44cf1a20666f5df2d46e0c0a5fdc1e36028835cf (diff) | |
download | yakuake-f9a9340723a73d10f254a509c209c579efcf1c1f.tar.gz yakuake-f9a9340723a73d10f254a509c209c579efcf1c1f.zip |
TQt4 port yakuake
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/yakuake@1239058 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'yakuake/src/tab_bar.cpp')
-rw-r--r-- | yakuake/src/tab_bar.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/yakuake/src/tab_bar.cpp b/yakuake/src/tab_bar.cpp index 72347db..d97cb9c 100644 --- a/yakuake/src/tab_bar.cpp +++ b/yakuake/src/tab_bar.cpp @@ -15,23 +15,23 @@ #include "tab_bar.moc" #include "settings.h" -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> #include <klocale.h> #include <kpopupmenu.h> -TabBar::TabBar(QWidget* parent, const char* name, bool translucency, const QString & skin) - : TranslucentWidget(parent, name, translucency) +TabBar::TabBar(TQWidget* tqparent, const char* name, bool translucency, const TQString & skin) + : TranslucentWidget(tqparent, name, translucency) { loadSkin(skin); - connect(plus_button, SIGNAL(clicked()), this, SIGNAL(addItem())); - connect(minus_button, SIGNAL(clicked()), this, SIGNAL(removeItem())); - connect(tabs_widget, SIGNAL(itemSelected(int)), this, SIGNAL(itemSelected(int))); - connect(tabs_widget, SIGNAL(addItem()), this, SIGNAL(addItem())); - connect(this, SIGNAL(updateBackground()), this, SLOT(slotUpdateBackground())); + connect(plus_button, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(addItem())); + connect(minus_button, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(removeItem())); + connect(tabs_widget, TQT_SIGNAL(itemSelected(int)), this, TQT_SIGNAL(itemSelected(int))); + connect(tabs_widget, TQT_SIGNAL(addItem()), this, TQT_SIGNAL(addItem())); + connect(this, TQT_SIGNAL(updateBackground()), this, TQT_SLOT(slotUpdateBackground())); } TabBar::~TabBar() @@ -63,12 +63,12 @@ int TabBar::removeItem(int session_id) return tabs_widget->removeItem(session_id); } -const QString TabBar::itemName(int session_id) +const TQString TabBar::itemName(int session_id) { return tabs_widget->itemName(session_id); } -void TabBar::renameItem(int session_id, const QString& name) +void TabBar::renameItem(int session_id, const TQString& name) { tabs_widget->renameItem(session_id, name); } @@ -118,9 +118,9 @@ void TabBar::slotMoveItemRight() tabs_widget->moveItemRight(); } -void TabBar::paintEvent(QPaintEvent*) +void TabBar::paintEvent(TQPaintEvent*) { - QPainter painter(this); + TQPainter painter(this); erase(); @@ -136,7 +136,7 @@ void TabBar::paintEvent(QPaintEvent*) painter.end(); } -void TabBar::resizeEvent(QResizeEvent*) +void TabBar::resizeEvent(TQResizeEvent*) { plus_button->move(plus_position.x(), plus_position.y()); minus_button->move(width() - minus_position.x(), minus_position.y()); @@ -146,29 +146,29 @@ void TabBar::resizeEvent(QResizeEvent*) tabs_widget->refreshBuffer(); } -void TabBar::loadSkin(const QString& skin) +void TabBar::loadSkin(const TQString& skin) { tabs_widget = new TabbedWidget(this, "Tabbed widget", useTranslucency()); - QWhatsThis::add(tabs_widget, i18n("The tab bar allows you to switch between sessions.")); - connect(this, SIGNAL(updateBackground()), tabs_widget, SLOT(slotUpdateBackground())); + TQWhatsThis::add(tabs_widget, i18n("The tab bar allows you to switch between sessions.")); + connect(this, TQT_SIGNAL(updateBackground()), tabs_widget, TQT_SLOT(slotUpdateBackground())); plus_button = new ImageButton(this, "Plus button", useTranslucency()); plus_button->setDelayedPopup(true); - QToolTip::add(plus_button, i18n("New Session")); - QWhatsThis::add(plus_button, i18n("Adds a new session. Press and hold to select session type from menu.")); - connect(this, SIGNAL(updateBackground()), plus_button, SLOT(slotUpdateBackground())); + TQToolTip::add(plus_button, i18n("New Session")); + TQWhatsThis::add(plus_button, i18n("Adds a new session. Press and hold to select session type from menu.")); + connect(this, TQT_SIGNAL(updateBackground()), plus_button, TQT_SLOT(slotUpdateBackground())); minus_button = new ImageButton(this, "Minus button", useTranslucency()); - QToolTip::add(minus_button, i18n("Close Session")); - QWhatsThis::add(minus_button, i18n("Closes the active session.")); - connect(this, SIGNAL(updateBackground()), minus_button, SLOT(slotUpdateBackground())); + TQToolTip::add(minus_button, i18n("Close Session")); + TQWhatsThis::add(minus_button, i18n("Closes the active session.")); + connect(this, TQT_SIGNAL(updateBackground()), minus_button, TQT_SLOT(slotUpdateBackground())); setPixmaps(skin); resize(width(), back_image.height()); } -void TabBar::reloadSkin(const QString& skin) +void TabBar::reloadSkin(const TQString& skin) { setPixmaps(skin); @@ -180,15 +180,15 @@ void TabBar::reloadSkin(const QString& skin) tabs_widget->move(tabs_position.x(), tabs_position.y()); tabs_widget->resize(width() - 2 * tabs_position.x(), tabs_widget->height()); - minus_button->repaint(); - plus_button->repaint(); + minus_button->tqrepaint(); + plus_button->tqrepaint(); tabs_widget->refreshBuffer(); - repaint(); + tqrepaint(); } -void TabBar::setPixmaps(const QString& skin) +void TabBar::setPixmaps(const TQString& skin) { - QUrl url(locate("appdata", skin + "/tabs.skin")); + TQUrl url(locate("appdata", skin + "/tabs.skin")); KConfig config(url.path()); config.setGroup("Tabs"); @@ -196,7 +196,7 @@ void TabBar::setPixmaps(const QString& skin) tabs_position.setX(config.readNumEntry("x", 20)); tabs_position.setY(config.readNumEntry("y", 0)); - tabs_widget->setFontColor(QColor(config.readNumEntry("red", 255), + tabs_widget->setFontColor(TQColor(config.readNumEntry("red", 255), config.readNumEntry("green", 255), config.readNumEntry("blue", 255))); |