summaryrefslogtreecommitdiffstats
path: root/src/kreplacements/kreplacements.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-27 05:58:16 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-27 05:58:16 +0000
commitf636ba5ba2df9d34d56b1c85f24c6598fa1cb645 (patch)
tree5365045e6bce685a7cbaeb81b4797a719e86089f /src/kreplacements/kreplacements.h
parent63862fdfcb61f302ef69e86d40772bb1318d3763 (diff)
downloadkdiff3-f636ba5ba2df9d34d56b1c85f24c6598fa1cb645.tar.gz
kdiff3-f636ba5ba2df9d34d56b1c85f24c6598fa1cb645.zip
TQt4 port kdiff3
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdiff3@1238464 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/kreplacements/kreplacements.h')
-rw-r--r--src/kreplacements/kreplacements.h335
1 files changed, 171 insertions, 164 deletions
diff --git a/src/kreplacements/kreplacements.h b/src/kreplacements/kreplacements.h
index 1402d51..8ae77d3 100644
--- a/src/kreplacements/kreplacements.h
+++ b/src/kreplacements/kreplacements.h
@@ -20,25 +20,25 @@
#include "common.h"
-#include <qobject.h>
-#include <qtabdialog.h>
-#include <qmainwindow.h>
-#include <qaction.h>
-#include <qfiledialog.h>
-#include <qapplication.h>
-#include <qvbox.h>
-#include <qpushbutton.h>
-#include <qstatusbar.h>
-#include <qtoolbar.h>
-#include <qprogressbar.h>
-#include <qpopupmenu.h>
-#include <qstringlist.h>
-#include <qprinter.h>
+#include <tqobject.h>
+#include <tqtabdialog.h>
+#include <tqmainwindow.h>
+#include <tqaction.h>
+#include <tqfiledialog.h>
+#include <tqapplication.h>
+#include <tqvbox.h>
+#include <tqpushbutton.h>
+#include <statusbar.h>
+#include <tqtoolbar.h>
+#include <tqprogressbar.h>
+#include <tqpopupmenu.h>
+#include <tqstringlist.h>
+#include <tqprinter.h>
#include <map>
#include <list>
-QString getTranslationDir();
+TQString getTranslationDir();
class KMainWindow;
@@ -46,61 +46,62 @@ class KURL
{
public:
KURL(){}
- KURL(const QString& s){ m_s = s; }
- static KURL fromPathOrURL( const QString& s ){ return KURL(s); }
- QString url() const { return m_s; }
+ KURL(const TQString& s){ m_s = s; }
+ static KURL fromPathOrURL( const TQString& s ){ return KURL(s); }
+ TQString url() const { return m_s; }
bool isEmpty() const { return m_s.isEmpty(); }
- QString prettyURL() const { return m_s; }
+ TQString prettyURL() const { return m_s; }
bool isLocalFile() const { return true; }
bool isValid() const { return true; }
- QString path() const { return m_s; }
- void setPath( const QString& s ){ m_s=s; }
- QString fileName() const { return m_s; } // not really needed
- void addPath( const QString& s ){ m_s += "/" + s; }
+ TQString path() const { return m_s; }
+ void setPath( const TQString& s ){ m_s=s; }
+ TQString fileName() const { return m_s; } // not really needed
+ void addPath( const TQString& s ){ m_s += "/" + s; }
private:
- QString m_s;
+ TQString m_s;
};
class KMessageBox
{
public:
- static void error( QWidget* parent, const QString& text, const QString& caption=QString() );
- static int warningContinueCancel( QWidget* parent, const QString& text, const QString& caption=QString(),
- const QString& button1=QString("Continue") );
- static void sorry( QWidget* parent, const QString& text, const QString& caption=QString() );
- static void information( QWidget* parent, const QString& text, const QString& caption=QString() );
- static int warningYesNo( QWidget* parent, const QString& text, const QString& caption,
- const QString& button1, const QString& button2 );
+ static void error( TQWidget* tqparent, const TQString& text, const TQString& caption=TQString() );
+ static int warningContinueCancel( TQWidget* tqparent, const TQString& text, const TQString& caption=TQString(),
+ const TQString& button1=TQString("Continue") );
+ static void sorry( TQWidget* tqparent, const TQString& text, const TQString& caption=TQString() );
+ static void information( TQWidget* tqparent, const TQString& text, const TQString& caption=TQString() );
+ static int warningYesNo( TQWidget* tqparent, const TQString& text, const TQString& caption,
+ const TQString& button1, const TQString& button2 );
static int warningYesNoCancel(
- QWidget* parent, const QString& text, const QString& caption,
- const QString& button1, const QString& button2 );
+ TQWidget* tqparent, const TQString& text, const TQString& caption,
+ const TQString& button1, const TQString& button2 );
enum {Cancel=-1, No=0, Yes=1, Continue=1};
};
-#define i18n(x) QObject::tr(x)
+#define i18n(x) TQObject::tr(x)
#define I18N_NOOP(x) x
#define RESTORE(x)
#define _UNLOAD(x)
-typedef QPopupMenu KPopupMenu;
+typedef TQPopupMenu KPopupMenu;
-class KDialogBase : public QTabDialog
+class KDialogBase : public TQTabDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- KDialogBase( int, const QString& caption, int, int, QWidget* parent, const char* name,
+ KDialogBase( int, const TQString& caption, int, int, TQWidget* tqparent, const char* name,
bool /*modal*/, bool );
~KDialogBase();
- void incInitialSize ( const QSize& );
- void setHelp(const QString& helpfilename, const QString& );
+ void incInitialSize ( const TQSize& );
+ void setHelp(const TQString& helpfilename, const TQString& );
enum {IconList, Help, Default, Apply, Ok, Cancel };
- int BarIcon(const QString& iconName, int );
+ int BarIcon(const TQString& iconName, int );
- QVBox* addVBoxPage( const QString& name, const QString& info, int );
- QFrame* addPage( const QString& name, const QString& info, int );
+ TQVBox* addVBoxPage( const TQString& name, const TQString& info, int );
+ TQFrame* addPage( const TQString& name, const TQString& info, int );
int spacingHint();
virtual void accept();
@@ -115,37 +116,37 @@ protected slots:
virtual void slotDefault( void );
};
-class KFileDialog : public QFileDialog
+class KFileDialog : public TQFileDialog
{
public:
- static KURL getSaveURL( const QString &startDir=QString::null,
- const QString &filter=QString::null,
- QWidget *parent=0, const QString &caption=QString::null);
- static KURL getOpenURL( const QString & startDir = QString::null,
- const QString & filter = QString::null,
- QWidget * parent = 0,
- const QString & caption = QString::null );
- static KURL getExistingURL( const QString & startDir = QString::null,
- QWidget * parent = 0,
- const QString & caption = QString::null );
- static QString getSaveFileName (const QString &startDir=QString::null,
- const QString &filter=QString::null,
- QWidget *parent=0,
- const QString &caption=QString::null);
+ static KURL getSaveURL( const TQString &startDir=TQString(),
+ const TQString &filter=TQString(),
+ TQWidget *tqparent=0, const TQString &caption=TQString());
+ static KURL getOpenURL( const TQString & startDir = TQString(),
+ const TQString & filter = TQString(),
+ TQWidget * tqparent = 0,
+ const TQString & caption = TQString() );
+ static KURL getExistingURL( const TQString & startDir = TQString(),
+ TQWidget * tqparent = 0,
+ const TQString & caption = TQString() );
+ static TQString getSaveFileName (const TQString &startDir=TQString(),
+ const TQString &filter=TQString(),
+ TQWidget *tqparent=0,
+ const TQString &caption=TQString());
};
-typedef QStatusBar KStatusBar;
+typedef TQStatusBar KStatusBar;
-class KToolBar : public QToolBar
+class KToolBar : public TQToolBar
{
public:
- KToolBar(QMainWindow* parent);
+ KToolBar(TQMainWindow* tqparent);
enum BarPosition {Top, Bottom, Left, Right};
BarPosition barPos();
void setBarPos(BarPosition);
private:
- QMainWindow* m_pMainWindow;
+ TQMainWindow* m_pMainWindow;
};
class KActionCollection
@@ -158,9 +159,9 @@ public:
class KKeyDialog
{
public:
- static void configure(void*, QWidget*){}
- static void configureKeys(KActionCollection*, const QString&){}
- static void configure(KActionCollection*, const QString&){}
+ static void configure(void*, TQWidget*){}
+ static void configureKeys(KActionCollection*, const TQString&){}
+ static void configure(KActionCollection*, const TQString&){}
};
namespace KParts
@@ -168,9 +169,10 @@ namespace KParts
class ReadWritePart;
}
-class KMainWindow : public QMainWindow
+class KMainWindow : public TQMainWindow
{
Q_OBJECT
+ TQ_OBJECT
private:
KStatusBar m_statusBar;
KActionCollection m_actionCollection;
@@ -178,27 +180,27 @@ protected:
virtual bool queryClose() = 0;
virtual bool queryExit() = 0;
public:
- QPopupMenu* fileMenu;
- QPopupMenu* editMenu;
- QPopupMenu* directoryMenu;
- QPopupMenu* dirCurrentItemMenu;
- QPopupMenu* dirCurrentSyncItemMenu;
- QPopupMenu* movementMenu;
- QPopupMenu* mergeMenu;
- QPopupMenu* diffMenu;
- QPopupMenu* windowsMenu;
- QPopupMenu* settingsMenu;
- QPopupMenu* helpMenu;
+ TQPopupMenu* fileMenu;
+ TQPopupMenu* editMenu;
+ TQPopupMenu* directoryMenu;
+ TQPopupMenu* dirCurrentItemMenu;
+ TQPopupMenu* dirCurrentSyncItemMenu;
+ TQPopupMenu* movementMenu;
+ TQPopupMenu* mergeMenu;
+ TQPopupMenu* diffMenu;
+ TQPopupMenu* windowsMenu;
+ TQPopupMenu* settingsMenu;
+ TQPopupMenu* helpMenu;
KToolBar* m_pToolBar;
- KMainWindow( QWidget* parent, const char* name );
- KToolBar* toolBar(const QString& s = QString::null);
+ KMainWindow( TQWidget* tqparent, const char* name );
+ KToolBar* toolBar(const TQString& s = TQString());
KActionCollection* actionCollection();
void createGUI();
void createGUI(KParts::ReadWritePart*){createGUI();}
- QList<KMainWindow>* memberList;
+ TQList<KMainWindow>* memberList;
public slots:
void slotHelp();
void slotAbout();
@@ -206,33 +208,34 @@ public slots:
class KConfig : public ValueMap
{
- QString m_fileName;
+ TQString m_fileName;
public:
KConfig();
~KConfig();
- void readConfigFile(const QString& configFileName);
+ void readConfigFile(const TQString& configFileName);
- void setGroup(const QString&);
+ void setGroup(const TQString&);
};
-class KAction : public QAction
+class KAction : public TQAction
{
Q_OBJECT
+ TQ_OBJECT
public:
- KAction(const QString& text, const QIconSet& icon, int accel, QObject* receiver, const char* slot, KActionCollection* actionCollection, const char* name, bool bToggle=false, bool bMenu=true);
- KAction(const QString& text, int accel, QObject* receiver, const char* slot, KActionCollection* actionCollection, const char* name, bool bToggle=false, bool bMenu=true);
- void init(QObject* receiver, const char* slot, KActionCollection* actionCollection,
+ KAction(const TQString& text, const TQIconSet& icon, int accel, TQObject* receiver, const char* slot, KActionCollection* actionCollection, const char* name, bool bToggle=false, bool bMenu=true);
+ KAction(const TQString& text, int accel, TQObject* receiver, const char* slot, KActionCollection* actionCollection, const char* name, bool bToggle=false, bool bMenu=true);
+ void init(TQObject* receiver, const char* slot, KActionCollection* actionCollection,
const char* name, bool bToggle, bool bMenu);
- void setStatusText(const QString&);
- void plug(QPopupMenu*);
+ void setStatusText(const TQString&);
+ void plug(TQPopupMenu*);
};
class KToggleAction : public KAction
{
public:
- KToggleAction(const QString& text, const QIconSet& icon, int accel, QObject* receiver, const char* slot, KActionCollection* actionCollection, const char* name, bool bMenu=true);
- KToggleAction(const QString& text, int accel, QObject* receiver, const char* slot, KActionCollection* actionCollection, const char* name, bool bMenu=true);
- KToggleAction(const QString& text, const QIconSet& icon, int accel, KActionCollection* actionCollection, const char* name, bool bMenu=true);
+ KToggleAction(const TQString& text, const TQIconSet& icon, int accel, TQObject* receiver, const char* slot, KActionCollection* actionCollection, const char* name, bool bMenu=true);
+ KToggleAction(const TQString& text, int accel, TQObject* receiver, const char* slot, KActionCollection* actionCollection, const char* name, bool bMenu=true);
+ KToggleAction(const TQString& text, const TQIconSet& icon, int accel, KActionCollection* actionCollection, const char* name, bool bMenu=true);
void setChecked(bool);
bool isChecked();
};
@@ -241,24 +244,24 @@ public:
class KStdAction
{
public:
- static KAction* open( QWidget* parent, const char* slot, KActionCollection* );
- static KAction* save( QWidget* parent, const char* slot, KActionCollection* );
- static KAction* saveAs( QWidget* parent, const char* slot, KActionCollection* );
- static KAction* print( QWidget* parent, const char* slot, KActionCollection* );
- static KAction* quit( QWidget* parent, const char* slot, KActionCollection* );
- static KAction* cut( QWidget* parent, const char* slot, KActionCollection* );
- static KAction* copy( QWidget* parent, const char* slot, KActionCollection* );
- static KAction* paste( QWidget* parent, const char* slot, KActionCollection* );
- static KAction* selectAll( QWidget* parent, const char* slot, KActionCollection* );
- static KToggleAction* showToolbar( QWidget* parent, const char* slot, KActionCollection* );
- static KToggleAction* showStatusbar( QWidget* parent, const char* slot, KActionCollection* );
- static KAction* preferences( QWidget* parent, const char* slot, KActionCollection* );
- static KAction* about( QWidget* parent, const char* slot, KActionCollection* );
- static KAction* aboutQt( KActionCollection* );
- static KAction* help( QWidget* parent, const char* slot, KActionCollection* );
- static KAction* find( QWidget* parent, const char* slot, KActionCollection* );
- static KAction* findNext( QWidget* parent, const char* slot, KActionCollection* );
- static KAction* keyBindings( QWidget* parent, const char* slot, KActionCollection* );
+ static KAction* open( TQWidget* tqparent, const char* slot, KActionCollection* );
+ static KAction* save( TQWidget* tqparent, const char* slot, KActionCollection* );
+ static KAction* saveAs( TQWidget* tqparent, const char* slot, KActionCollection* );
+ static KAction* print( TQWidget* tqparent, const char* slot, KActionCollection* );
+ static KAction* quit( TQWidget* tqparent, const char* slot, KActionCollection* );
+ static KAction* cut( TQWidget* tqparent, const char* slot, KActionCollection* );
+ static KAction* copy( TQWidget* tqparent, const char* slot, KActionCollection* );
+ static KAction* paste( TQWidget* tqparent, const char* slot, KActionCollection* );
+ static KAction* selectAll( TQWidget* tqparent, const char* slot, KActionCollection* );
+ static KToggleAction* showToolbar( TQWidget* tqparent, const char* slot, KActionCollection* );
+ static KToggleAction* showStatusbar( TQWidget* tqparent, const char* slot, KActionCollection* );
+ static KAction* preferences( TQWidget* tqparent, const char* slot, KActionCollection* );
+ static KAction* about( TQWidget* tqparent, const char* slot, KActionCollection* );
+ static KAction* aboutTQt( KActionCollection* );
+ static KAction* help( TQWidget* tqparent, const char* slot, KActionCollection* );
+ static KAction* tqfind( TQWidget* tqparent, const char* slot, KActionCollection* );
+ static KAction* findNext( TQWidget* tqparent, const char* slot, KActionCollection* );
+ static KAction* keyBindings( TQWidget* tqparent, const char* slot, KActionCollection* );
};
class KIcon
@@ -267,40 +270,42 @@ public:
enum {SizeMedium,Small};
};
-class KFontChooser : public QWidget
+class KFontChooser : public TQWidget
{
Q_OBJECT
- QFont m_font;
- QPushButton* m_pSelectFont;
- QLabel* m_pLabel;
- QWidget* m_pParent;
+ TQ_OBJECT
+ TQFont m_font;
+ TQPushButton* m_pSelectFont;
+ TQLabel* m_pLabel;
+ TQWidget* m_pParent;
public:
- KFontChooser( QWidget* pParent, const QString& name, bool, const QStringList&, bool, int );
- QFont font();
- void setFont( const QFont&, bool );
+ KFontChooser( TQWidget* pParent, const TQString& name, bool, const TQStringList&, bool, int );
+ TQFont font();
+ void setFont( const TQFont&, bool );
private slots:
void slotSelectFont();
};
-class KColorButton : public QPushButton
+class KColorButton : public TQPushButton
{
Q_OBJECT
- QColor m_color;
+ TQ_OBJECT
+ TQColor m_color;
public:
- KColorButton(QWidget* parent);
- QColor color();
- void setColor(const QColor&);
- virtual void paintEvent(QPaintEvent* e);
+ KColorButton(TQWidget* tqparent);
+ TQColor color();
+ void setColor(const TQColor&);
+ virtual void paintEvent(TQPaintEvent* e);
public slots:
void slotClicked();
};
-class KPrinter : public QPrinter
+class KPrinter : public TQPrinter
{
public:
KPrinter();
enum e_PageSelection {ApplicationSide};
- QValueList<int> pageList();
+ TQValueList<int> pageList();
void setCurrentPage(int);
void setPageSelection(e_PageSelection);
};
@@ -308,7 +313,7 @@ public:
class KStandardDirs
{
public:
- QString findResource(const QString& resource, const QString& appName);
+ TQString findResource(const TQString& resource, const TQString& appName);
};
struct KCmdLineOptions
@@ -323,30 +328,30 @@ struct KCmdLineOptions
class KAboutData
{
public:
- KAboutData( const QString& name, const QString& appName, const QString& version,
- const QString& description, int licence,
- const QString& copyright, int w, const QString& homepage, const QString& email);
- KAboutData( const QString& name, const QString& appName, const QString& version );
+ KAboutData( const TQString& name, const TQString& appName, const TQString& version,
+ const TQString& description, int licence,
+ const TQString& copyright, int w, const TQString& homepage, const TQString& email);
+ KAboutData( const TQString& name, const TQString& appName, const TQString& version );
void addAuthor(const char* name=0, const char* task=0, const char* email=0, const char* weblink=0);
void addCredit(const char* name=0, const char* task=0, const char* email=0, const char* weblink=0);
enum { License_GPL };
struct AboutDataEntry
{
- AboutDataEntry(const QString& name, const QString& task, const QString& email, const QString& weblink)
+ AboutDataEntry(const TQString& name, const TQString& task, const TQString& email, const TQString& weblink)
: m_name(name), m_task(task), m_email(email), m_weblink(weblink)
{}
- QString m_name;
- QString m_task;
- QString m_email;
- QString m_weblink;
+ TQString m_name;
+ TQString m_task;
+ TQString m_email;
+ TQString m_weblink;
};
std::list<AboutDataEntry> m_authorList;
std::list<AboutDataEntry> m_creditList;
};
-typedef QValueList<QCString> QCStringList;
+typedef TQValueList<TQCString> QCStringList;
class KCmdLineArgs
{
@@ -356,21 +361,21 @@ public:
static void addCmdLineOptions( KCmdLineOptions* options ); // Add our own options.
int count();
- QString arg(int);
+ TQString arg(int);
KURL url(int i){ return KURL(arg(i)); }
void clear();
- QString getOption(const QString&);
- QCStringList getOptionList( const QString& );
- bool isSet(const QString&);
+ TQString getOption(const TQString&);
+ QCStringList getOptionList( const TQString& );
+ bool isSet(const TQString&);
};
class KIconLoader
{
public:
- QPixmap loadIcon(const QString& name, int);
+ TQPixmap loadIcon(const TQString& name, int);
};
-class KApplication : public QApplication
+class KApplication : public TQApplication
{
KConfig m_config;
KIconLoader m_iconLoader;
@@ -384,21 +389,22 @@ public:
extern KApplication* kapp;
-class KLibFactory : public QObject
+class KLibFactory : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- QObject* create(QObject*,const QString&,const QString&);
+ TQObject* create(TQObject*,const TQString&,const TQString&);
};
class KLibLoader
{
public:
static KLibLoader* self();
- KLibFactory* factory(const QString&);
+ KLibFactory* factory(const TQString&);
};
-class KEditToolbar : public QDialog
+class KEditToolbar : public TQDialog
{
public:
KEditToolbar( int ){}
@@ -413,13 +419,13 @@ public:
namespace KIO
{
enum UDSEntry {};
- typedef QValueList<UDSEntry> UDSEntryList;
- class Job : public QObject
+ typedef TQValueList<UDSEntry> UDSEntryList;
+ class Job : public TQObject
{
public:
void kill(bool){}
bool error() {return false;}
- void showErrorDialog( QWidget* ) {}
+ void showErrorDialog( TQWidget* ) {}
};
class SimpleJob : public Job {};
SimpleJob* mkdir( KURL );
@@ -442,9 +448,9 @@ namespace KIO
TransferJob* put( KURL, int, bool, bool, bool );
};
-typedef QProgressBar KProgress;
+typedef TQProgressBar KProgress;
-class KInstance : public QObject
+class KInstance : public TQObject
{
public:
KInstance(KAboutData*){}
@@ -455,49 +461,50 @@ namespace KParts
class MainWindow : public KMainWindow
{
public:
- MainWindow( QWidget* parent, const char* name ) : KMainWindow(parent,name) {}
- void setXMLFile(const QString&){}
+ MainWindow( TQWidget* tqparent, const char* name ) : KMainWindow(tqparent,name) {}
+ void setXMLFile(const TQString&){}
void setAutoSaveSettings(){}
void saveMainWindowSettings(KConfig*){}
void applyMainWindowSettings(KConfig*){}
int factory(){return 0;}
};
- class Part : public QObject
+ class Part : public TQObject
{
public:
KActionCollection* actionCollection();
KApplication* instance();
- void setWidget( QWidget* w ){ m_pWidget=w; }
- QWidget* widget(){return m_pWidget;}
- void setXMLFile(const QString&){}
+ void setWidget( TQWidget* w ){ m_pWidget=w; }
+ TQWidget* widget(){return m_pWidget;}
+ void setXMLFile(const TQString&){}
private:
- QWidget* m_pWidget;
+ TQWidget* m_pWidget;
};
class ReadOnlyPart : public Part
{
public:
ReadOnlyPart(){}
- ReadOnlyPart(QObject*,const QCString&){}
+ ReadOnlyPart(TQObject*,const TQCString&){}
void setInstance( KInstance* ){}
- QString m_file;
+ TQString m_file;
};
class ReadWritePart : public ReadOnlyPart
{
public:
- ReadWritePart(QObject*,const QCString&){}
+ ReadWritePart(TQObject*,const TQCString&){}
void setReadWrite(bool){}
};
class Factory : public KLibFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- virtual KParts::Part* createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const char *classname, const QStringList &args )=0;
+ virtual KParts::Part* createPartObject( TQWidget *tqparentWidget, const char *widgetName,
+ TQObject *tqparent, const char *name,
+ const char *classname, const TQStringList &args )=0;
};
};
#endif