diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:44:01 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:44:01 +0000 |
commit | 479f5f799523bffbcc83dff581a2299c047c6fff (patch) | |
tree | 186aae707ed02aac6c7cab2fb14e97f72aca5e36 /xparts/xpart_notepad | |
parent | f1dbff6145c98324ff82e34448b7483727e8ace4 (diff) | |
download | tdebindings-479f5f799523bffbcc83dff581a2299c047c6fff.tar.gz tdebindings-479f5f799523bffbcc83dff581a2299c047c6fff.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1157645 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'xparts/xpart_notepad')
-rw-r--r-- | xparts/xpart_notepad/shell_xparthost.cpp | 10 | ||||
-rw-r--r-- | xparts/xpart_notepad/shell_xparthost.h | 2 | ||||
-rw-r--r-- | xparts/xpart_notepad/xp_notepad.cpp | 34 | ||||
-rw-r--r-- | xparts/xpart_notepad/xp_notepad_factory.cpp | 8 | ||||
-rw-r--r-- | xparts/xpart_notepad/xp_notepad_factory.h | 10 |
5 files changed, 32 insertions, 32 deletions
diff --git a/xparts/xpart_notepad/shell_xparthost.cpp b/xparts/xpart_notepad/shell_xparthost.cpp index bd6a9418..d043d766 100644 --- a/xparts/xpart_notepad/shell_xparthost.cpp +++ b/xparts/xpart_notepad/shell_xparthost.cpp @@ -19,7 +19,7 @@ ShellWindow::ShellWindow() setCentralWidget( m_host->widget() ); - connect(m_host, SIGNAL( actionsInitialized() ), this, SLOT( mergeGUI() ) ); + connect(m_host, TQT_SIGNAL( actionsInitialized() ), this, TQT_SLOT( mergeGUI() ) ); // Launch our XPart child. m_partProcess = new KProcess; @@ -28,11 +28,11 @@ ShellWindow::ShellWindow() m_partProcess->start(); // Init our Gui - (void) new KAction( "Hop", 0, this, SLOT(hop()), actionCollection(), "hop" ); - KStdAction::quit( this, SLOT( close() ), actionCollection() ); + (void) new KAction( "Hop", 0, this, TQT_SLOT(hop()), actionCollection(), "hop" ); + KStdAction::quit( this, TQT_SLOT( close() ), actionCollection() ); KSelectAction *s = new KSelectAction( "http://www.kde.org" , 0, actionCollection(), "location" ); - connect( s, SIGNAL(activated( const QString& ) ), this, SLOT( slotOpenUrl( const QString & ) ) ); + connect( s, TQT_SIGNAL(activated( const TQString& ) ), this, TQT_SLOT( slotOpenUrl( const TQString & ) ) ); s->setEditable(true); kdDebug() << "KShell window created" << endl; @@ -48,7 +48,7 @@ void ShellWindow::hop() kdDebug() << "hop called!" << endl; } -void ShellWindow::slotOpenUrl( const QString &url ) +void ShellWindow::slotOpenUrl( const TQString &url ) { kdDebug() << "this=" << this; kdDebug() << "url=" << url << endl; diff --git a/xparts/xpart_notepad/shell_xparthost.h b/xparts/xpart_notepad/shell_xparthost.h index 02982326..f65cdf1b 100644 --- a/xparts/xpart_notepad/shell_xparthost.h +++ b/xparts/xpart_notepad/shell_xparthost.h @@ -18,7 +18,7 @@ public: public slots: void hop(); - void slotOpenUrl( const QString &url ); + void slotOpenUrl( const TQString &url ); void mergeGUI(); private: diff --git a/xparts/xpart_notepad/xp_notepad.cpp b/xparts/xpart_notepad/xp_notepad.cpp index 57173bbb..18295111 100644 --- a/xparts/xpart_notepad/xp_notepad.cpp +++ b/xparts/xpart_notepad/xp_notepad.cpp @@ -1,8 +1,8 @@ #include <dcopclient.h> #include <kapplication.h> -#include <qmultilineedit.h> -#include <qfile.h> -#include <qtextstream.h> +#include <tqmultilineedit.h> +#include <tqfile.h> +#include <tqtextstream.h> #include <stdio.h> #include <iostream.h> #include <xpart.h> @@ -10,7 +10,7 @@ #include "xparthost_stub.h" -class XPartNotepad : public QMultiLineEdit, virtual public XPart +class XPartNotepad : public TQMultiLineEdit, virtual public XPart { public: @@ -19,7 +19,7 @@ public: setText("This is a xpart component editor"); setReadOnly( false ); resize( 200, 200 ); - QMultiLineEdit::setFocus(); + TQMultiLineEdit::setFocus(); } /** needed by XPartManager to embed the part */ @@ -28,17 +28,17 @@ public: /** used by XPartManager to show the part */ void show() - { printf("show()\n"); QWidget::show(); } + { printf("show()\n"); TQWidget::show(); } /** sent by the XPartHost to query an url */ - bool openURL( const QCString& url ) + bool openURL( const TQCString& url ) { printf("openURL %s\n", (const char *) url ); - QFile f(url); - QString s; + TQFile f(url); + TQString s; if ( ! f.open(IO_ReadOnly) ) { return false; } - QTextStream t( &f ); + TQTextStream t( &f ); while ( !t.eof() ) { s += t.readLine() + "\n"; } @@ -56,20 +56,20 @@ public: * * action, state is used with Toggle actions to * precise the current state. * */ - void activateAction( const QString &name, int state ) + void activateAction( const TQString &name, int state ) { printf("activateAction: %s, %d\n", name.latin1(), state ); } /** are extentions available -> browser extension * / TextEditor ? */ - DCOPRef queryExtension( const QCString& extension ) + DCOPRef queryExtension( const TQCString& extension ) { printf("query Extension : %s\n", (const char * ) extension ); return DCOPRef(); } protected: - void focusInEvent( QFocusEvent * ) - { kdDebug() << "Focus in" << endl; QMultiLineEdit::setFocus(); } - void focusOutEvent( QFocusEvent * ) - { kdDebug() << "Focus Out" << endl;QMultiLineEdit::setFocus(); } + void focusInEvent( TQFocusEvent * ) + { kdDebug() << "Focus in" << endl; TQMultiLineEdit::setFocus(); } + void focusOutEvent( TQFocusEvent * ) + { kdDebug() << "Focus Out" << endl;TQMultiLineEdit::setFocus(); } }; int main( int argc, char **argv ) @@ -84,7 +84,7 @@ int main( int argc, char **argv ) XPartNotepad * xpn = new XPartNotepad("xp_notepad"); app.setMainWidget( xpn ); app.dcopClient()->attach(); - QCString appId = app.dcopClient()->registerAs("xp_notepad", true); + TQCString appId = app.dcopClient()->registerAs("xp_notepad", true); XPartHost_stub xph_stub( argv[1], argv[2] ); DCOPRef xpn_dcopref( xpn ); diff --git a/xparts/xpart_notepad/xp_notepad_factory.cpp b/xparts/xpart_notepad/xp_notepad_factory.cpp index 9d8757a6..59cf0499 100644 --- a/xparts/xpart_notepad/xp_notepad_factory.cpp +++ b/xparts/xpart_notepad/xp_notepad_factory.cpp @@ -38,13 +38,13 @@ extern "C" }; -KParts::Part *XP_NotepadFactory::createPartObject( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const char *className, const QStringList & ) +KParts::Part *XP_NotepadFactory::createPartObject( TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const char *className, const TQStringList & ) { return new XP_NotepadPart( parentWidget, widgetName, parent, name ); } -XP_NotepadPart::XP_NotepadPart(QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name) +XP_NotepadPart::XP_NotepadPart(TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name) : XPartHost_KPart(parentWidget, widgetName, parent, name) { m_partProcess = new KProcess; @@ -62,7 +62,7 @@ XP_NotepadPart::~XP_NotepadPart() delete m_partProcess; } -void XP_NotepadPart::createActions( const QCString &xmlActions ) +void XP_NotepadPart::createActions( const TQCString &xmlActions ) { XPartHost_KPart::createActions( xmlActions ); qDebug("----<<<<<< exit loop"); diff --git a/xparts/xpart_notepad/xp_notepad_factory.h b/xparts/xpart_notepad/xp_notepad_factory.h index 8f112b07..018a5619 100644 --- a/xparts/xpart_notepad/xp_notepad_factory.h +++ b/xparts/xpart_notepad/xp_notepad_factory.h @@ -22,7 +22,7 @@ #define __xp_notepad_factory_h__ #include <kparts/factory.h> -#include <qptrlist.h> +#include <tqptrlist.h> #include <kurl.h> #include "xparthost_kpart.h" @@ -39,7 +39,7 @@ public: XP_NotepadFactory( bool clone = false ) {} virtual ~XP_NotepadFactory() {} - virtual KParts::Part *createPartObject( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const char *className, const QStringList &args ); + virtual KParts::Part *createPartObject( TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const char *className, const TQStringList &args ); }; @@ -50,11 +50,11 @@ class XP_NotepadPart : public XPartHost_KPart Q_OBJECT public: - XP_NotepadPart(QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name); + XP_NotepadPart(TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name); virtual ~XP_NotepadPart(); - virtual void createActions( const QCString &xmlActions ); + virtual void createActions( const TQCString &xmlActions ); private: KProcess *m_partProcess; }; |