summaryrefslogtreecommitdiffstats
path: root/kate/tabbarextension/plugin_katetabbarextension.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kate/tabbarextension/plugin_katetabbarextension.cpp')
-rw-r--r--kate/tabbarextension/plugin_katetabbarextension.cpp116
1 files changed, 58 insertions, 58 deletions
diff --git a/kate/tabbarextension/plugin_katetabbarextension.cpp b/kate/tabbarextension/plugin_katetabbarextension.cpp
index 7004ff8..cfc4619 100644
--- a/kate/tabbarextension/plugin_katetabbarextension.cpp
+++ b/kate/tabbarextension/plugin_katetabbarextension.cpp
@@ -37,11 +37,11 @@
#include <kiconloader.h>
#include <kfiledialog.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qgroupbox.h>
-#include <qcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqgroupbox.h>
+#include <tqcheckbox.h>
// END
class PluginView : public KXMLGUIClient
@@ -72,8 +72,8 @@ KatePluginFactory::~KatePluginFactory()
delete s_instance;
}
-QObject* KatePluginFactory::createObject(
- QObject* parent, const char* name, const char*, const QStringList & )
+TQObject* KatePluginFactory::createObject(
+ TQObject* parent, const char* name, const char*, const TQStringList & )
{
return new KatePluginTabBarExtension( parent, name );
}
@@ -82,7 +82,7 @@ KInstance* KatePluginFactory::s_instance = 0L;
// BEGIN KatePluginTabBarExtension
KatePluginTabBarExtension::KatePluginTabBarExtension(
- QObject* parent, const char* name )
+ TQObject* parent, const char* name )
: Kate::Plugin ( (Kate::Application*)parent, name ),
pConfig(new KConfig("katetabbarextensionpluginrc"))
{
@@ -122,8 +122,8 @@ void KatePluginTabBarExtension::addView(Kate::MainWindow *win)
KToolBar* toolbar = dynamic_cast<KToolBar*>
(win->guiFactory()->container("tabbarExtensionToolBar", view));
if (toolbar) {
- connect(toolbar, SIGNAL( orientationChanged(Orientation) ),
- view->tabbar, SLOT( slotMoved(Orientation) ));
+ connect(toolbar, TQT_SIGNAL( orientationChanged(Orientation) ),
+ view->tabbar, TQT_SLOT( slotMoved(Orientation) ));
}
}
@@ -152,12 +152,12 @@ void KatePluginTabBarExtension::removeView(Kate::MainWindow *win)
}
Kate::PluginConfigPage* KatePluginTabBarExtension::configPage(
- uint, QWidget *w, const char* /*name*/)
+ uint, TQWidget *w, const char* /*name*/)
{
KateTabBarExtensionConfigPage* p = new KateTabBarExtensionConfigPage(this, w);
initConfigPage( p );
- connect( p, SIGNAL(configPageApplyRequest(KateTabBarExtensionConfigPage*)),
- SLOT(applyConfig(KateTabBarExtensionConfigPage*)) );
+ connect( p, TQT_SIGNAL(configPageApplyRequest(KateTabBarExtensionConfigPage*)),
+ TQT_SLOT(applyConfig(KateTabBarExtensionConfigPage*)) );
return (Kate::PluginConfigPage*)p;
}
@@ -175,8 +175,8 @@ void KatePluginTabBarExtension::applyConfig( KateTabBarExtensionConfigPage* p )
// BEGIN KateTabBarButton
KateTabBarButton::KateTabBarButton(Kate::ViewManager* pViewManager,
- Kate::Document *pDoc, QWidget * parent, const char * name)
- : QPushButton(parent, name),
+ Kate::Document *pDoc, TQWidget * parent, const char * name)
+ : TQPushButton(parent, name),
modified(false),
myDocID(pDoc->documentNumber()),
doc(pDoc),
@@ -184,11 +184,11 @@ KateTabBarButton::KateTabBarButton(Kate::ViewManager* pViewManager,
{
setFlat(true);
setToggleButton(true);
- setFocusPolicy(QWidget::NoFocus);
+ setFocusPolicy(TQWidget::NoFocus);
setText(pDoc->docName());
- connect(this, SIGNAL(toggled(bool)), SLOT(setOn(bool)));
+ connect(this, TQT_SIGNAL(toggled(bool)), TQT_SLOT(setOn(bool)));
}
KateTabBarButton::~KateTabBarButton() {}
@@ -204,29 +204,29 @@ void KateTabBarButton::setDirty(bool d)
setIconSet(SmallIconSet("cancel"));
} else {
if (modified) setIconSet(SmallIconSet("modified"));
- else setIconSet(QIconSet());
+ else setIconSet(TQIconSet());
}
}
-void KateTabBarButton::setText( const QString& newText)
+void KateTabBarButton::setText( const TQString& newText)
{
- QToolTip::remove(this);
+ TQToolTip::remove(this);
if (newText.length() > 20) {
// squeeze to length 17+3=20
- QPushButton::setText(newText.left(9) + "..." + newText.right(8));
- QToolTip::add(this, newText);
+ TQPushButton::setText(newText.left(9) + "..." + newText.right(8));
+ TQToolTip::add(this, newText);
} else {
- QPushButton::setText(newText);
+ TQPushButton::setText(newText);
}
}
-QString KateTabBarButton::fullName() const
+TQString KateTabBarButton::fullName() const
{
if (doc) {
return doc->docName();
} else {
- return QString("");
+ return TQString("");
}
}
@@ -234,45 +234,45 @@ void KateTabBarButton::triggerModified()
{
modified = !modified;
if (modified) {
- QColor c(255, 0, 0);
+ TQColor c(255, 0, 0);
setPaletteForegroundColor( c );
setIconSet(SmallIconSet("modified"));
} else {
- QColor c(KGlobalSettings::textColor());
+ TQColor c(KGlobalSettings::textColor());
setPaletteForegroundColor( c );
- setIconSet(QIconSet());
+ setIconSet(TQIconSet());
}
}
void KateTabBarButton::setOn(bool on)
{
- disconnect( SIGNAL(toggled(bool)));
+ disconnect( TQT_SIGNAL(toggled(bool)));
// kdDebug() << "setOn: " << (int)on << endl;
if ((!on) && viewManager->activeView()->document()->documentNumber()
== documentNumber()) {
// kdDebug() << "setOn aborted " << endl;
- QPushButton::setOn(true);
+ TQPushButton::setOn(true);
} else {
- QPushButton::setOn(on);
+ TQPushButton::setOn(on);
if (on) emit myToggled(this);
}
- connect(this, SIGNAL(toggled(bool)), SLOT(setOn(bool)));
+ connect(this, TQT_SIGNAL(toggled(bool)), TQT_SLOT(setOn(bool)));
}
// END KateTabBarButton
// BEGIN KateTabBarExtension
KateTabBarExtension::KateTabBarExtension( Kate::DocumentManager *pDocManager,
Kate::MainWindow *win, bool bHorizOrientation, bool bSort,
- QWidget* parent, const char* name, WFlags f )
- : QWidget(parent, name, f),
+ TQWidget* parent, const char* name, WFlags f )
+ : TQWidget(parent, name, f),
pCurrentTab(0), m_win(win), m_docManager(pDocManager), m_sort(false)
{
if (bHorizOrientation) {
- top = new QBoxLayout(this, QBoxLayout::LeftToRight);
+ top = new TQBoxLayout(this, TQBoxLayout::LeftToRight);
m_orientation = Qt::Horizontal;
} else {
- top = new QBoxLayout(this, QBoxLayout::TopToBottom);
+ top = new TQBoxLayout(this, TQBoxLayout::TopToBottom);
m_orientation = Qt::Vertical;
}
@@ -282,13 +282,13 @@ KateTabBarExtension::KateTabBarExtension( Kate::DocumentManager *pDocManager,
slotDocumentCreated (pDocManager->document(i));
}
- connect(m_win->viewManager(), SIGNAL(viewChanged()), SLOT(slotViewChanged()));
+ connect(m_win->viewManager(), TQT_SIGNAL(viewChanged()), TQT_SLOT(slotViewChanged()));
connect(pDocManager,
- SIGNAL(documentCreated(Kate::Document *)),
- SLOT(slotDocumentCreated(Kate::Document *)));
+ TQT_SIGNAL(documentCreated(Kate::Document *)),
+ TQT_SLOT(slotDocumentCreated(Kate::Document *)));
connect(pDocManager,
- SIGNAL(documentDeleted(uint)),
- SLOT(slotDocumentDeleted(uint)));
+ TQT_SIGNAL(documentDeleted(uint)),
+ TQT_SLOT(slotDocumentDeleted(uint)));
setSortByName(bSort);
}
@@ -300,11 +300,11 @@ void KateTabBarExtension::slotMoved(Orientation o)
// the tabbar moved (top, right, bottom, left or fluently)
switch (o) {
case Qt::Vertical:
- top->setDirection(QBoxLayout::TopToBottom);
+ top->setDirection(TQBoxLayout::TopToBottom);
break;
case Qt::Horizontal:
- top->setDirection(QBoxLayout::LeftToRight);
+ top->setDirection(TQBoxLayout::LeftToRight);
break;
}
@@ -357,15 +357,15 @@ void KateTabBarExtension::slotDocumentCreated (Kate::Document *doc)
if (!doc) return;
KateTabBarButton* tab = new KateTabBarButton(m_win->viewManager(), doc, this);
- connect(tab, SIGNAL(myToggled(KateTabBarButton*)),
- SLOT(slotActivateView(KateTabBarButton*)));
- connect(doc, SIGNAL(nameChanged(Kate::Document *)),
- SLOT(slotNameChanged(Kate::Document *)));
- connect(doc, SIGNAL(modStateChanged(Kate::Document *)),
- SLOT(slotModChanged(Kate::Document *)));
+ connect(tab, TQT_SIGNAL(myToggled(KateTabBarButton*)),
+ TQT_SLOT(slotActivateView(KateTabBarButton*)));
+ connect(doc, TQT_SIGNAL(nameChanged(Kate::Document *)),
+ TQT_SLOT(slotNameChanged(Kate::Document *)));
+ connect(doc, TQT_SIGNAL(modStateChanged(Kate::Document *)),
+ TQT_SLOT(slotModChanged(Kate::Document *)));
connect(doc,
- SIGNAL(modifiedOnDisc(Kate::Document *, bool, unsigned char)),
- SLOT(slotModifiedOnDisc(Kate::Document *, bool, unsigned char)));
+ TQT_SIGNAL(modifiedOnDisc(Kate::Document *, bool, unsigned char)),
+ TQT_SLOT(slotModifiedOnDisc(Kate::Document *, bool, unsigned char)));
if(doc->isModified()) tab->triggerModified();
tab->show();
top->addWidget(tab);
@@ -475,22 +475,22 @@ void KateTabBarExtension::slotViewChanged ()
// BEGIN KateTabBarExtensionConfigPage
KateTabBarExtensionConfigPage::KateTabBarExtensionConfigPage(
- QObject* /*parent*/ /*= 0L*/, QWidget *parentWidget /*= 0L*/)
+ TQObject* /*parent*/ /*= 0L*/, TQWidget *parentWidget /*= 0L*/)
: Kate::PluginConfigPage( parentWidget )
{
- QVBoxLayout* top = new QVBoxLayout(this, 0,
+ TQVBoxLayout* top = new TQVBoxLayout(this, 0,
KDialogBase::spacingHint());
- QGroupBox* gb = new QGroupBox( i18n("Sorting Behavior"),
+ TQGroupBox* gb = new TQGroupBox( i18n("Sorting Behavior"),
this, "tab_bar_extension_config_page_layout" );
gb->setColumnLayout(1, Qt::Vertical);
gb->setInsideSpacing(KDialogBase::spacingHint());
- pSortAlpha = new QCheckBox(i18n("Sort files alphabetically"), gb);
+ pSortAlpha = new TQCheckBox(i18n("Sort files alphabetically"), gb);
top->add(gb);
top->addStretch(1);
// throw signal changed
- connect(pSortAlpha, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
+ connect(pSortAlpha, TQT_SIGNAL(toggled(bool)), this, TQT_SIGNAL(changed()));
}
KateTabBarExtensionConfigPage::~KateTabBarExtensionConfigPage() {}
@@ -503,8 +503,8 @@ void KateTabBarExtensionConfigPage::apply()
// BEGIN MyPtrList implementaion
-int MyPtrList::compareItems ( QPtrCollection::Item item1_,
- QPtrCollection::Item item2_ )
+int MyPtrList::compareItems ( TQPtrCollection::Item item1_,
+ TQPtrCollection::Item item2_ )
{
KateTabBarButton* item1 = reinterpret_cast<KateTabBarButton*>(item1_);
KateTabBarButton* item2 = reinterpret_cast<KateTabBarButton*>(item2_);