diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:54:04 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:54:04 +0000 |
commit | dc6b8e72fed2586239e3514819238c520636c9d9 (patch) | |
tree | 88b200df0a0b7fab9d6f147596173556f1ed9a13 /kommander/widgets/tabwidget.cpp | |
parent | 6927d4436e54551917f600b706a8d6109e49de1c (diff) | |
download | tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/widgets/tabwidget.cpp')
-rw-r--r-- | kommander/widgets/tabwidget.cpp | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/kommander/widgets/tabwidget.cpp b/kommander/widgets/tabwidget.cpp index ec0a02cf..8ffc95b1 100644 --- a/kommander/widgets/tabwidget.cpp +++ b/kommander/widgets/tabwidget.cpp @@ -18,12 +18,12 @@ #include <kiconloader.h> /* QT INCLUDES */ -#include <qstring.h> -#include <qwidget.h> -#include <qstringlist.h> -#include <qevent.h> -#include <qtabwidget.h> -#include <qtabbar.h> +#include <tqstring.h> +#include <tqwidget.h> +#include <tqstringlist.h> +#include <tqevent.h> +#include <tqtabwidget.h> +#include <tqtabbar.h> /* OTHER INCLUDES */ #include <kommanderwidget.h> @@ -43,31 +43,31 @@ enum Functions { LastFunction }; -TabWidget::TabWidget(QWidget *a_parent, const char *a_name, int a_flags) - : QTabWidget(a_parent, a_name, a_flags), KommanderWidget(this) +TabWidget::TabWidget(TQWidget *a_parent, const char *a_name, int a_flags) + : TQTabWidget(a_parent, a_name, a_flags), KommanderWidget(this) { - QStringList states; + TQStringList states; states << "default"; setStates(states); setDisplayStates(states); KommanderPlugin::setDefaultGroup(Group::DCOP); - KommanderPlugin::registerFunction(TAB_setTabIcon, "setTabIcon(QString widget, int Tab, QString Icon)", i18n("Sets an icon on the specified tab. Index is zero based."), 3); - KommanderPlugin::registerFunction(TAB_tabLabel, "tabLabel(QString widget, int Tab)", i18n("Returns the tab label at the given index. Index is zero based."), 2); - KommanderPlugin::registerFunction(TAB_isTabEnabled, "isTabEnabled(QString widget, int Tab)", i18n("Returns true if tab at specified index is enabled, otherwise returns false."), 2); - KommanderPlugin::registerFunction(TAB_setTabEnabled, "setTabEnabled(QString widget, int Tab, bool Enabled)", i18n("Sets the tab at the given index to enabled or disabled."), 3); - KommanderPlugin::registerFunction(TAB_showTabBar, "showTabBar(QString widget, bool Show)", i18n("Show or hide the tabs on the tab widget."), 2); - KommanderPlugin::registerFunction(TAB_setCurrentPage, "setCurrentPage(QString widget, QString Page)", i18n("Set the current page by name."), 2); - KommanderPlugin::registerFunction(TAB_setTabLabel, "setTabLabel(QString widget, int Tab, QString Text)", i18n("Sets the tab tab label."), 3); + KommanderPlugin::registerFunction(TAB_setTabIcon, "setTabIcon(TQString widget, int Tab, TQString Icon)", i18n("Sets an icon on the specified tab. Index is zero based."), 3); + KommanderPlugin::registerFunction(TAB_tabLabel, "tabLabel(TQString widget, int Tab)", i18n("Returns the tab label at the given index. Index is zero based."), 2); + KommanderPlugin::registerFunction(TAB_isTabEnabled, "isTabEnabled(TQString widget, int Tab)", i18n("Returns true if tab at specified index is enabled, otherwise returns false."), 2); + KommanderPlugin::registerFunction(TAB_setTabEnabled, "setTabEnabled(TQString widget, int Tab, bool Enabled)", i18n("Sets the tab at the given index to enabled or disabled."), 3); + KommanderPlugin::registerFunction(TAB_showTabBar, "showTabBar(TQString widget, bool Show)", i18n("Show or hide the tabs on the tab widget."), 2); + KommanderPlugin::registerFunction(TAB_setCurrentPage, "setCurrentPage(TQString widget, TQString Page)", i18n("Set the current page by name."), 2); + KommanderPlugin::registerFunction(TAB_setTabLabel, "setTabLabel(TQString widget, int Tab, TQString Text)", i18n("Sets the tab tab label."), 3); } TabWidget::~TabWidget() { } -QString TabWidget::currentState() const +TQString TabWidget::currentState() const { - return QString("default"); + return TQString("default"); } bool TabWidget::isKommanderWidget() const @@ -75,22 +75,22 @@ bool TabWidget::isKommanderWidget() const return true; } -QStringList TabWidget::associatedText() const +TQStringList TabWidget::associatedText() const { return KommanderWidget::associatedText(); } -void TabWidget::setAssociatedText(const QStringList& a_at) +void TabWidget::setAssociatedText(const TQStringList& a_at) { KommanderWidget::setAssociatedText(a_at); } -void TabWidget::setPopulationText(const QString& a_text) +void TabWidget::setPopulationText(const TQString& a_text) { KommanderWidget::setPopulationText( a_text ); } -QString TabWidget::populationText() const +TQString TabWidget::populationText() const { return KommanderWidget::populationText(); } @@ -99,16 +99,16 @@ void TabWidget::populate() { } -void TabWidget::showEvent(QShowEvent* e) +void TabWidget::showEvent(TQShowEvent* e) { - QTabWidget::showEvent(e); + TQTabWidget::showEvent(e); emit widgetOpened(); } -void TabWidget::contextMenuEvent( QContextMenuEvent * e ) +void TabWidget::contextMenuEvent( TQContextMenuEvent * e ) { e->accept(); - QPoint p = e->globalPos(); + TQPoint p = e->globalPos(); emit contextMenuRequested(p.x(), p.y()); } @@ -117,11 +117,11 @@ bool TabWidget::isFunctionSupported(int f) return f == DCOP::currentItem || f == DCOP::setCurrentItem || f == DCOP::insertTab || (f >= FirstFunction && f <= LastFunction) ; } -QString TabWidget::handleDCOP(int function, const QStringList& args) +TQString TabWidget::handleDCOP(int function, const TQStringList& args) { switch (function) { case DCOP::currentItem: - return QString::number(currentPageIndex()); + return TQString::number(currentPageIndex()); case DCOP::setCurrentItem: setCurrentPage(args[0].toUInt()); break; @@ -130,31 +130,31 @@ QString TabWidget::handleDCOP(int function, const QStringList& args) break; case TAB_tabLabel: { - QString s = this->label(args[0].toInt()); + TQString s = this->label(args[0].toInt()); return s.remove("&"); break; } case TAB_setTabIcon: { - QWidget *w = page(args[0].toInt()); + TQWidget *w = page(args[0].toInt()); setTabIconSet(w, KGlobal::iconLoader()->loadIcon(args[1], KIcon::NoGroup, KIcon::SizeMedium)); break; } case TAB_isTabEnabled: { - QWidget *w = page(args[0].toInt()); - return QString::number(this->isTabEnabled(w)); + TQWidget *w = page(args[0].toInt()); + return TQString::number(this->isTabEnabled(w)); break; } case TAB_setTabLabel: { - QWidget *w = page(args[0].toInt()); + TQWidget *w = page(args[0].toInt()); setTabLabel(w, args[1]); break; } case TAB_setTabEnabled: { - QWidget *w = page(args[0].toInt()); + TQWidget *w = page(args[0].toInt()); this->setTabEnabled(w, args[1].toInt()); break; } @@ -164,7 +164,7 @@ QString TabWidget::handleDCOP(int function, const QStringList& args) int i = 0; bool found = false; while (i < cnt) { - QString s = this->label(i); + TQString s = this->label(i); if (s.remove("&") == args[0]) { setCurrentPage(i); @@ -173,12 +173,12 @@ QString TabWidget::handleDCOP(int function, const QStringList& args) } i++; } - return QString::number(found); + return TQString::number(found); break; } case TAB_showTabBar: { - QTabBar *t = this->tabBar(); + TQTabBar *t = this->tabBar(); if (args[0].toInt() == 1) t->show(); else @@ -188,7 +188,7 @@ QString TabWidget::handleDCOP(int function, const QStringList& args) default: return KommanderWidget::handleDCOP(function, args); } - return QString(); + return TQString(); } #include "tabwidget.moc" |