From 25794f504692e5a36c490438814e9dfda8aaa2dd Mon Sep 17 00:00:00 2001 From: tpearson Date: Sun, 29 May 2011 19:00:37 +0000 Subject: TQt4 port kchmviewer This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kchmviewer@1234150 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/kchmmainwindow.h | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) (limited to 'src/kchmmainwindow.h') diff --git a/src/kchmmainwindow.h b/src/kchmmainwindow.h index 7381567..b4b3f0f 100644 --- a/src/kchmmainwindow.h +++ b/src/kchmmainwindow.h @@ -44,29 +44,30 @@ static const unsigned int OPF_NEW_TAB = 1 << 2; static const unsigned int OPF_BACKGROUND = 1 << 3; //! Those events could be sent to main window to do useful things. See handleUserEvents() -class KCHMUserEvent : public QEvent +class KCHMUserEvent : public TQEvent { public: - KCHMUserEvent( const QString& action, const QStringList& args = QStringList()) - : QEvent( QEvent::User ), m_action(action), m_args(args) {}; + KCHMUserEvent( const TQString& action, const TQStringList& args = TQStringList()) + : TQEvent( TQEvent::User ), m_action(action), m_args(args) {}; - QString m_action; - QStringList m_args; + TQString m_action; + TQStringList m_args; }; class KCHMMainWindow : public KQMainWindow { Q_OBJECT + TQ_OBJECT public: KCHMMainWindow(); ~KCHMMainWindow(); - bool openPage ( const QString &url, unsigned int flags = OPF_CONTENT_TREE ); + bool openPage ( const TQString &url, unsigned int flags = OPF_CONTENT_TREE ); LCHMFile * chmFile() const { return m_chmFile; } - const QString& getOpenedFileName () { return m_chmFilename; } + const TQString& getOpenedFileName () { return m_chmFilename; } KCHMViewWindow * currentBrowser() const; KCHMContentsWindow * contentsWindow() const { return m_contentsWindow; } @@ -75,12 +76,12 @@ class KCHMMainWindow : public KQMainWindow KCHMNavToolbar * navigationToolbar() const { return m_navToolbar; } KCHMSearchWindow * searchWindow() const { return m_searchWindow; } - void showInStatusBar (const QString& text) { statusBar()->message( text, 2000 ); } + void showInStatusBar (const TQString& text) { statusBar()->message( text, 2000 ); } void setTextEncoding (const LCHMTextEncoding * enc); public slots: - void slotOnTreeClicked( QListViewItem *item ); - void slotOnTreeDoubleClicked( QListViewItem *item, const QPoint &, int ); + void slotOnTreeClicked( TQListViewItem *item ); + void slotOnTreeDoubleClicked( TQListViewItem *item, const TQPoint &, int ); void slotAddBookmark ( ); void slotOpenPageInNewTab( ); @@ -91,7 +92,7 @@ class KCHMMainWindow : public KQMainWindow void slotBrowserChanged( KCHMViewWindow * newbrowser ); private slots: - void slotLinkClicked ( const QString & link, bool& follow_link ); + void slotLinkClicked ( const TQString & link, bool& follow_link ); void slotOpenMenuItemActivated(); void slotPrintMenuItemActivated(); @@ -119,12 +120,12 @@ class KCHMMainWindow : public KQMainWindow private: bool parseCmdLineArgs(); - void showEvent( QShowEvent * ); - void closeEvent ( QCloseEvent * e ); + void showEvent( TQShowEvent * ); + void closeEvent ( TQCloseEvent * e ); void setupSignals (); void setupToolbarsAndMenu ( ); - bool loadChmFile ( const QString &fileName, bool call_open_page = true ); + bool loadChmFile ( const TQString &fileName, bool call_open_page = true ); void closeChmFile(); void refreshCurrentBrowser(); void updateHistoryMenu(); @@ -134,13 +135,13 @@ class KCHMMainWindow : public KQMainWindow void showOrHideSearchWindow( int tabindex ); // User events - bool event ( QEvent * e ); + bool event ( TQEvent * e ); bool handleUserEvent( const KCHMUserEvent * event ); - void locateInContentTree( const QString& url ); + void locateInContentTree( const TQString& url ); - QString m_chmFilename; - QString m_aboutDlgMenuText; // to show in KDE or Qt about dialogs + TQString m_chmFilename; + TQString m_aboutDlgMenuText; // to show in KDE or TQt about dialogs KCHMViewWindowMgr * m_viewWindowMgr; KCHMIndexWindow * m_indexWindow; @@ -148,8 +149,8 @@ class KCHMMainWindow : public KQMainWindow KCHMBookmarkWindow * m_bookmarkWindow; KCHMContentsWindow * m_contentsWindow; - KQTabWidget * m_tabWidget; - QSplitter * m_windowSplitter; + KTQTabWidget * m_tabWidget; + TQSplitter * m_windowSplitter; KCHMSearchAndViewToolbar * m_searchToolbar; KCHMNavToolbar * m_navToolbar; @@ -159,7 +160,7 @@ class KCHMMainWindow : public KQMainWindow LCHMFile * m_chmFile; bool m_FirstTimeShow; - KQPopupMenu * m_menuHistory; + KTQPopupMenu * m_menuHistory; int m_tabContextPage; int m_tabIndexPage; @@ -178,7 +179,7 @@ class KCHMMainWindow : public KQMainWindow bool m_useShortAutotest; auto_test_state_t m_autoteststate; - QListViewItemIterator m_autotestlistiterator; + TQListViewItemIterator m_autotestlistiterator; private slots: void runAutoTest(); -- cgit v1.2.3