summaryrefslogtreecommitdiffstats
path: root/languages/cpp/app_templates/kscons_kmdi
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /languages/cpp/app_templates/kscons_kmdi
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/cpp/app_templates/kscons_kmdi')
-rw-r--r--languages/cpp/app_templates/kscons_kmdi/app_part.cpp46
-rw-r--r--languages/cpp/app_templates/kscons_kmdi/app_part.h6
-rw-r--r--languages/cpp/app_templates/kscons_kmdi/appkmdi.cpp64
-rw-r--r--languages/cpp/app_templates/kscons_kmdi/appkmdi.h10
-rw-r--r--languages/cpp/app_templates/kscons_kmdi/appkmdiView.cpp12
-rw-r--r--languages/cpp/app_templates/kscons_kmdi/appkmdiView.h2
-rw-r--r--languages/cpp/app_templates/kscons_kmdi/kmdikonsole.cpp18
-rw-r--r--languages/cpp/app_templates/kscons_kmdi/kmdikonsole.h8
8 files changed, 83 insertions, 83 deletions
diff --git a/languages/cpp/app_templates/kscons_kmdi/app_part.cpp b/languages/cpp/app_templates/kscons_kmdi/app_part.cpp
index 71155138..a851f02a 100644
--- a/languages/cpp/app_templates/kscons_kmdi/app_part.cpp
+++ b/languages/cpp/app_templates/kscons_kmdi/app_part.cpp
@@ -10,30 +10,30 @@
#include <kglobal.h>
#include <klocale.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qmultilineedit.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqmultilineedit.h>
typedef KParts::GenericFactory<%{APPNAMELC}Part> %{APPNAMELC}PartFactory;
K_EXPORT_COMPONENT_FACTORY( lib%{APPNAMELC}part, %{APPNAMELC}PartFactory );
-%{APPNAMELC}Part::%{APPNAMELC}Part( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList & /*args*/)
+%{APPNAMELC}Part::%{APPNAMELC}Part( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList & /*args*/)
: KParts::ReadWritePart(parent)
{
// we need an instance
setInstance( %{APPNAMELC}PartFactory::instance() );
// this should be your custom internal widget
- m_widget = new QMultiLineEdit( parentWidget, widgetName );
+ m_widget = new TQMultiLineEdit( parentWidget, widgetName );
// notify the part that this is our internal widget
setWidget(m_widget);
// create our actions
- KStdAction::open(this, SLOT(fileOpen()), actionCollection());
- KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
- KStdAction::save(this, SLOT(save()), actionCollection());
+ KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
+ KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection());
+ KStdAction::save(this, TQT_SLOT(save()), actionCollection());
// set our XML-UI resource file
setXMLFile("%{APPNAMELC}_part.rc");
@@ -63,12 +63,12 @@ void %{APPNAMELC}Part::setReadWrite(bool rw)
// notify your internal widget of the read-write state
m_widget->setReadOnly(!rw);
if (rw)
- connect(m_widget, SIGNAL(textChanged()),
- this, SLOT(setModified()));
+ connect(m_widget, TQT_SIGNAL(textChanged()),
+ this, TQT_SLOT(setModified()));
else
{
- disconnect(m_widget, SIGNAL(textChanged()),
- this, SLOT(setModified()));
+ disconnect(m_widget, TQT_SIGNAL(textChanged()),
+ this, TQT_SLOT(setModified()));
}
ReadWritePart::setReadWrite(rw);
@@ -94,15 +94,15 @@ void %{APPNAMELC}Part::setModified(bool modified)
bool %{APPNAMELC}Part::openFile()
{
- // m_file is always local so we can use QFile on it
- QFile file(m_file);
+ // m_file is always local so we can use TQFile on it
+ TQFile file(m_file);
if (file.open(IO_ReadOnly) == false)
return false;
- // our example widget is text-based, so we use QTextStream instead
+ // our example widget is text-based, so we use TQTextStream instead
// of a raw QDataStream
- QTextStream stream(&file);
- QString str;
+ TQTextStream stream(&file);
+ TQString str;
while (!stream.eof())
str += stream.readLine() + "\n";
@@ -124,12 +124,12 @@ bool %{APPNAMELC}Part::saveFile()
return false;
// m_file is always local, so we use QFile
- QFile file(m_file);
+ TQFile file(m_file);
if (file.open(IO_WriteOnly) == false)
return false;
- // use QTextStream to dump the text to the file
- QTextStream stream(&file);
+ // use TQTextStream to dump the text to the file
+ TQTextStream stream(&file);
stream << m_widget->text();
file.close();
@@ -142,7 +142,7 @@ void %{APPNAMELC}Part::fileOpen()
// this slot is called whenever the File->Open menu is selected,
// the Open shortcut is pressed (usually CTRL+O) or the Open toolbar
// button is clicked
- QString file_name = KFileDialog::getOpenFileName();
+ TQString file_name = KFileDialog::getOpenFileName();
if (file_name.isEmpty() == false)
openURL(file_name);
@@ -151,7 +151,7 @@ void %{APPNAMELC}Part::fileOpen()
void %{APPNAMELC}Part::fileSaveAs()
{
// this slot is called whenever the File->Save As menu is selected,
- QString file_name = KFileDialog::getSaveFileName();
+ TQString file_name = KFileDialog::getSaveFileName();
if (file_name.isEmpty() == false)
saveAs(file_name);
}
diff --git a/languages/cpp/app_templates/kscons_kmdi/app_part.h b/languages/cpp/app_templates/kscons_kmdi/app_part.h
index e1dd002b..2d4ea947 100644
--- a/languages/cpp/app_templates/kscons_kmdi/app_part.h
+++ b/languages/cpp/app_templates/kscons_kmdi/app_part.h
@@ -27,8 +27,8 @@ public:
/**
* Default constructor
*/
- %{APPNAMELC}Part(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList & /*args*/);
+ %{APPNAMELC}Part(TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList & /*args*/);
/**
* Destructor
@@ -68,7 +68,7 @@ protected slots:
void fileSaveAs();
private:
- QMultiLineEdit *m_widget;
+ TQMultiLineEdit *m_widget;
};
#endif // _%{APPNAMEUC}PART_H_
diff --git a/languages/cpp/app_templates/kscons_kmdi/appkmdi.cpp b/languages/cpp/app_templates/kscons_kmdi/appkmdi.cpp
index be5d8862..4286053a 100644
--- a/languages/cpp/app_templates/kscons_kmdi/appkmdi.cpp
+++ b/languages/cpp/app_templates/kscons_kmdi/appkmdi.cpp
@@ -1,11 +1,11 @@
%{CPP_TEMPLATE}
-#include <qdragobject.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
-#include <qdragobject.h>
-#include <qstatusbar.h>
-#include <qtoolbutton.h>
+#include <tqdragobject.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqdragobject.h>
+#include <tqstatusbar.h>
+#include <tqtoolbutton.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -53,8 +53,8 @@
setStandardMDIMenuEnabled(false);
m_manager = new KParts::PartManager(this);
- connect(m_manager, SIGNAL(activePartChanged(KParts::Part*)),
- this, SLOT(createGUI(KParts::Part*)) );
+ connect(m_manager, TQT_SIGNAL(activePartChanged(KParts::Part*)),
+ this, TQT_SLOT(createGUI(KParts::Part*)) );
#if KDE_IS_VERSION(3, 3, 0)
setToolviewStyle( KMdi::TextAndIcon );
@@ -77,7 +77,7 @@
// and a status bar
statusBar()->show();
- connect( this, SIGNAL( viewActivated( KMdiChildView * ) ), this, SLOT( currentChanged( KMdiChildView * ) ) );
+ connect( this, TQT_SIGNAL( viewActivated( KMdiChildView * ) ), this, TQT_SLOT( currentChanged( KMdiChildView * ) ) );
m_console = new kmdikonsole(this, "konsole");
m_console->setIcon( SmallIcon("konsole") );
@@ -88,11 +88,11 @@
#if KDE_IS_VERSION(3, 3, 0)
if (Settings::showCloseTabsButton())
{
- QToolButton *but = new QToolButton(tabWidget());
+ TQToolButton *but = new TQToolButton(tabWidget());
but->setIconSet(SmallIcon("tab_remove"));
but->adjustSize();
but->hide();
- connect(but, SIGNAL(clicked()), actionCollection()->action( "file_close" ), SIGNAL(activated()));
+ connect(but, TQT_SIGNAL(clicked()), actionCollection()->action( "file_close" ), TQT_SIGNAL(activated()));
tabWidget()->setCornerWidget(but, TopRight);
}
#endif
@@ -124,29 +124,29 @@ void %{APPNAMELC}kmdi::setupActions()
{
setXMLFile("%{APPNAMELC}_shell.rc");
- KStdAction::openNew(this, SLOT(slotFileNew()), actionCollection());
+ KStdAction::openNew(this, TQT_SLOT(slotFileNew()), actionCollection());
- KStdAction::tipOfDay( this, SLOT( showTip() ), actionCollection()
+ KStdAction::tipOfDay( this, TQT_SLOT( showTip() ), actionCollection()
)->setWhatsThis(i18n("This shows useful tips on the use of this application."));
- KStdAction::close(this, SLOT(slotFileClose()), actionCollection());
- KStdAction::quit(this, SLOT(slotFileQuit()), actionCollection());
+ KStdAction::close(this, TQT_SLOT(slotFileClose()), actionCollection());
+ KStdAction::quit(this, TQT_SLOT(slotFileQuit()), actionCollection());
- m_toolbarAction = KStdAction::showToolbar(this, SLOT(optionsShowToolbar()), actionCollection());
- m_statusbarAction = KStdAction::showStatusbar(this, SLOT(optionsShowStatusbar()), actionCollection());
+ m_toolbarAction = KStdAction::showToolbar(this, TQT_SLOT(optionsShowToolbar()), actionCollection());
+ m_statusbarAction = KStdAction::showStatusbar(this, TQT_SLOT(optionsShowStatusbar()), actionCollection());
- KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
- KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection());
+ KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection());
KAction* action = KStdAction::configureToolbars(this,
- SLOT(optionsConfigureToolbars()), actionCollection());
+ TQT_SLOT(optionsConfigureToolbars()), actionCollection());
createGUI( NULL );
}
void %{APPNAMELC}kmdi::showTip()
{
- KTipDialog::showTip(this,QString::null,true);
+ KTipDialog::showTip(this,TQString::null,true);
}
void %{APPNAMELC}kmdi::showTipOnStart()
@@ -170,8 +170,8 @@ void %{APPNAMELC}kmdi::slotFileNew()
void %{APPNAMELC}kmdi::openURL(const KURL & url)
{
// check if the url is not already opened first
- QValueList<%{APPNAMELC}kmdiView*>::iterator it = m_views.begin();
- QValueList<%{APPNAMELC}kmdiView*>::iterator end = m_views.end();
+ TQValueList<%{APPNAMELC}kmdiView*>::iterator it = m_views.begin();
+ TQValueList<%{APPNAMELC}kmdiView*>::iterator end = m_views.end();
for (; it != end; ++it)
{
%{APPNAMELC}kmdiView *view = *it;
@@ -283,9 +283,9 @@ void %{APPNAMELC}kmdi::optionsConfigureKeys()
{
//KKeyDialog::configure(actionCollection());
KKeyDialog dlg( false, this );
- QPtrList<KXMLGUIClient> clients = guiFactory()->clients();
+ TQPtrList<KXMLGUIClient> clients = guiFactory()->clients();
- for( QPtrListIterator<KXMLGUIClient> it( clients ); it.current(); ++it )
+ for( TQPtrListIterator<KXMLGUIClient> it( clients ); it.current(); ++it )
dlg.insert ( (*it)->actionCollection(), (*it)->instance()->aboutData()->programName() );
dlg.configure();
@@ -320,15 +320,15 @@ void %{APPNAMELC}kmdi::optionsPreferences()
KConfigDialog *dialog = new KConfigDialog(this, "settings", Settings::self(), KDialogBase::Swallow);
dialog->addPage(new prefs(), i18n("General"), "package_settings");
- connect(dialog, SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
+ connect(dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(settingsChanged()));
dialog->show();
}
void %{APPNAMELC}kmdi::settingsChanged()
{
// propagate the changes to our views
- /*QValueList<%{APPNAMELC}kmdiView*>::iterator it = m_views.begin();
- QValueList<%{APPNAMELC}kmdiView*>::iterator end = m_views.end();
+ /*TQValueList<%{APPNAMELC}kmdiView*>::iterator it = m_views.begin();
+ TQValueList<%{APPNAMELC}kmdiView*>::iterator end = m_views.end();
for (; it != end; ++it)
{
%{APPNAMELC}kmdiView *view = *it;
@@ -336,19 +336,19 @@ void %{APPNAMELC}kmdi::settingsChanged()
}*/
}
-void %{APPNAMELC}kmdi::changeStatusbar(const QString& text)
+void %{APPNAMELC}kmdi::changeStatusbar(const TQString& text)
{
// display the text on the statusbar
statusBar()->message(text, 2000);
}
-void %{APPNAMELC}kmdi::dragEnterEvent(QDragEnterEvent *event)
+void %{APPNAMELC}kmdi::dragEnterEvent(TQDragEnterEvent *event)
{
// accept uri drops only
event->accept(KURLDrag::canDecode(event));
}
-void %{APPNAMELC}kmdi::dropEvent(QDropEvent *event)
+void %{APPNAMELC}kmdi::dropEvent(TQDropEvent *event)
{
KURL::List urls;
@@ -365,7 +365,7 @@ void %{APPNAMELC}kmdi::dropEvent(QDropEvent *event)
bool %{APPNAMELC}kmdi::queryClose()
{
- QValueList<%{APPNAMELC}kmdiView*>::iterator it;
+ TQValueList<%{APPNAMELC}kmdiView*>::iterator it;
// check if we can close all documents
for (it = m_views.begin(); it != m_views.end(); ++it)
diff --git a/languages/cpp/app_templates/kscons_kmdi/appkmdi.h b/languages/cpp/app_templates/kscons_kmdi/appkmdi.h
index 370a3034..8ff90205 100644
--- a/languages/cpp/app_templates/kscons_kmdi/appkmdi.h
+++ b/languages/cpp/app_templates/kscons_kmdi/appkmdi.h
@@ -3,7 +3,7 @@
#ifndef _%{APPNAMEUC}KMDI_H
#define _%{APPNAMEUC}KMDI_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kapplication.h>
#include <kmdimainfrm.h>
@@ -37,8 +37,8 @@ class %{APPNAMELC}kmdi : public KMdiMainFrm
void openURL( const KURL& );
protected:
- virtual void dragEnterEvent(QDragEnterEvent *event);
- virtual void dropEvent(QDropEvent *event);
+ virtual void dragEnterEvent(TQDragEnterEvent *event);
+ virtual void dropEvent(TQDropEvent *event);
virtual bool queryClose();
private slots:
@@ -57,7 +57,7 @@ class %{APPNAMELC}kmdi : public KMdiMainFrm
void newToolbarConfig();
- void changeStatusbar(const QString& text);
+ void changeStatusbar(const TQString& text);
void currentChanged( KMdiChildView *current );
bool requestClose(KMdiChildView* view);
@@ -68,7 +68,7 @@ class %{APPNAMELC}kmdi : public KMdiMainFrm
void setupAccel();
void setupActions();
- QValueList<%{APPNAMELC}kmdiView*> m_views;
+ TQValueList<%{APPNAMELC}kmdiView*> m_views;
KToggleAction *m_toolbarAction;
KToggleAction *m_statusbarAction;
diff --git a/languages/cpp/app_templates/kscons_kmdi/appkmdiView.cpp b/languages/cpp/app_templates/kscons_kmdi/appkmdiView.cpp
index c4cfbf65..d7c00001 100644
--- a/languages/cpp/app_templates/kscons_kmdi/appkmdiView.cpp
+++ b/languages/cpp/app_templates/kscons_kmdi/appkmdiView.cpp
@@ -1,7 +1,7 @@
%{CPP_TEMPLATE}
-#include <qpixmap.h>
-#include <qlayout.h>
+#include <tqpixmap.h>
+#include <tqlayout.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -13,7 +13,7 @@
#include "%{APPNAMELC}kmdiView.h"
- %{APPNAMELC}kmdiView::%{APPNAMELC}kmdiView( QWidget *parentWidget, const char *name )
+ %{APPNAMELC}kmdiView::%{APPNAMELC}kmdiView( TQWidget *parentWidget, const char *name )
: KMdiChildView( parentWidget, name )
{
m_part = NULL;
@@ -35,11 +35,11 @@
part()->widget()->setFocus();
setFocusProxy(part()->widget());
- QBoxLayout* layout = new QHBoxLayout(this, 0, -1, "kdissertviewlayout" );
- part()->widget()->reparent( this, QPoint(0, 0) );
+ TQBoxLayout* layout = new TQHBoxLayout(this, 0, -1, "kdissertviewlayout" );
+ part()->widget()->reparent( this, TQPoint(0, 0) );
layout->addWidget( part()->widget() );
- // connect( m_part, SIGNAL(stateChanged()), this, SLOT(updateCaption()) );
+ // connect( m_part, TQT_SIGNAL(stateChanged()), this, TQT_SLOT(updateCaption()) );
}
else
{
diff --git a/languages/cpp/app_templates/kscons_kmdi/appkmdiView.h b/languages/cpp/app_templates/kscons_kmdi/appkmdiView.h
index 66e5203b..af05df48 100644
--- a/languages/cpp/app_templates/kscons_kmdi/appkmdiView.h
+++ b/languages/cpp/app_templates/kscons_kmdi/appkmdiView.h
@@ -16,7 +16,7 @@ class %{APPNAMELC}kmdiView : public KMdiChildView
{
Q_OBJECT
public:
- %{APPNAMELC}kmdiView( QWidget *parentWidget=0L, const char *name=0L );
+ %{APPNAMELC}kmdiView( TQWidget *parentWidget=0L, const char *name=0L );
virtual ~%{APPNAMELC}kmdiView();
KParts::ReadWritePart *part() { return m_part; }
diff --git a/languages/cpp/app_templates/kscons_kmdi/kmdikonsole.cpp b/languages/cpp/app_templates/kscons_kmdi/kmdikonsole.cpp
index da41685f..8171c6b8 100644
--- a/languages/cpp/app_templates/kscons_kmdi/kmdikonsole.cpp
+++ b/languages/cpp/app_templates/kscons_kmdi/kmdikonsole.cpp
@@ -1,7 +1,7 @@
%{CPP_TEMPLATE}
-#include <qfileinfo.h>
-#include <qframe.h>
+#include <tqfileinfo.h>
+#include <tqframe.h>
#include <kparts/part.h>
#include <kate/document.h>
@@ -12,7 +12,7 @@
#include "kmdikonsole.h"
-kmdikonsole::kmdikonsole(QWidget *parent, const char *name) : QVBox(parent, name)
+kmdikonsole::kmdikonsole(TQWidget *parent, const char *name) : TQVBox(parent, name)
{
m_haskonsole = false;
respawn();
@@ -31,17 +31,17 @@ void kmdikonsole::respawn()
if (!m_part) return;
- if (m_part->widget()->inherits("QFrame"))
- ((QFrame*)m_part->widget())->setFrameStyle(QFrame::Panel|QFrame::Sunken);
+ if (m_part->widget()->inherits("TQFrame"))
+ ((TQFrame*)m_part->widget())->setFrameStyle(TQFrame::Panel|TQFrame::Sunken);
m_haskonsole=true;
- connect( m_part, SIGNAL(destroyed()), this, SLOT(slotDestroyed()) );
+ connect( m_part, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed()) );
m_part->widget()->show();
show();
}
-void kmdikonsole::setDirectory(const QString &dirname)
+void kmdikonsole::setDirectory(const TQString &dirname)
{
if (m_haskonsole)
{
@@ -51,9 +51,9 @@ void kmdikonsole::setDirectory(const QString &dirname)
}
}
-void kmdikonsole::showEvent(QShowEvent *ev)
+void kmdikonsole::showEvent(TQShowEvent *ev)
{
- QWidget::showEvent(ev);
+ TQWidget::showEvent(ev);
activate();
}
diff --git a/languages/cpp/app_templates/kscons_kmdi/kmdikonsole.h b/languages/cpp/app_templates/kscons_kmdi/kmdikonsole.h
index 83adb417..ef5a2c1e 100644
--- a/languages/cpp/app_templates/kscons_kmdi/kmdikonsole.h
+++ b/languages/cpp/app_templates/kscons_kmdi/kmdikonsole.h
@@ -3,18 +3,18 @@
#ifndef KMDIKONSOLE_H
#define KMDIKONSOLE_H
-#include <qvbox.h>
+#include <tqvbox.h>
class kmdikonsole : public QVBox
{
Q_OBJECT
public:
- kmdikonsole( QWidget* parent, const char* name=0);
+ kmdikonsole( TQWidget* parent, const char* name=0);
~kmdikonsole();
public slots:
- void setDirectory(const QString & dir);
+ void setDirectory(const TQString & dir);
void activate();
private slots:
@@ -22,7 +22,7 @@ class kmdikonsole : public QVBox
void respawn();
protected:
- void showEvent(QShowEvent *ev);
+ void showEvent(TQShowEvent *ev);
private:
KParts::ReadOnlyPart *m_part;