diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/kotext/KoSearchDia.h | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/kotext/KoSearchDia.h')
-rw-r--r-- | lib/kotext/KoSearchDia.h | 151 |
1 files changed, 79 insertions, 72 deletions
diff --git a/lib/kotext/KoSearchDia.h b/lib/kotext/KoSearchDia.h index c83d235d..56570f4d 100644 --- a/lib/kotext/KoSearchDia.h +++ b/lib/kotext/KoSearchDia.h @@ -29,17 +29,17 @@ #include "KoTextIterator.h" #include "KoTextFormat.h" -#include <qcolor.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqcolor.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <koffice_export.h> -class QPushButton; -class QRadioButton; -class QGridLayout; -class QCheckBox; -class QComboBox; -class QSpinBox; +class TQPushButton; +class TQRadioButton; +class TQGridLayout; +class TQCheckBox; +class TQComboBox; +class TQSpinBox; class KColorButton; class KMacroCommand; class KoTextView; @@ -79,31 +79,32 @@ public: KoSearchContext(); ~KoSearchContext(); - QString m_family; - QColor m_color; - QColor m_backGroundColor; + TQString m_family; + TQColor m_color; + TQColor m_backGroundColor; int m_size; KoTextFormat::VerticalAlignment m_vertAlign; KoTextFormat::UnderlineType m_underline; KoTextFormat::StrikeOutType m_strikeOut; KoTextFormat::AttributeStyle m_attribute; - QStringList m_strings; // history + TQStringList m_strings; // history long m_optionsMask; long m_options; - QString m_language; + TQString m_language; }; // // This class represents the GUI elements that correspond to KWSearchContext. // -class KoSearchContextUI : public QObject +class KoSearchContextUI : public TQObject { Q_OBJECT + TQ_OBJECT public: - KoSearchContextUI( KoSearchContext *ctx, QWidget *parent ); + KoSearchContextUI( KoSearchContext *ctx, TQWidget *tqparent ); void setCtxOptions( long options ); - void setCtxHistory( const QStringList & history ); + void setCtxHistory( const TQStringList & history ); KoSearchContext *context() const { return m_ctx;} bool optionSelected() const { return m_bOptionsShown;} private slots: @@ -111,10 +112,10 @@ private slots: private: KoSearchContext *m_ctx; - QGridLayout *m_grid; + TQGridLayout *m_grid; bool m_bOptionsShown; - QPushButton *m_btnShowOptions; - QWidget *m_parent; + TQPushButton *m_btnShowOptions; + TQWidget *m_parent; }; // @@ -124,9 +125,10 @@ class KOTEXT_EXPORT KoSearchDia: public KFindDialog { Q_OBJECT + TQ_OBJECT public: - KoSearchDia( QWidget *parent, const char *name, KoSearchContext *find, bool hasSelection, bool hasCursor ); + KoSearchDia( TQWidget *tqparent, const char *name, KoSearchContext *tqfind, bool hasSelection, bool hasCursor ); KoSearchContext * searchContext() { return m_findUI->context(); } @@ -146,10 +148,11 @@ class KOTEXT_EXPORT KoReplaceDia: public KReplaceDialog { Q_OBJECT + TQ_OBJECT public: - KoReplaceDia( QWidget *parent, const char *name, KoSearchContext *find, KoSearchContext *replace, bool hasSelection, bool hasCursor ); + KoReplaceDia( TQWidget *tqparent, const char *name, KoSearchContext *tqfind, KoSearchContext *tqreplace, bool hasSelection, bool hasCursor ); KoSearchContext * searchContext() { return m_findUI->context(); } @@ -173,10 +176,11 @@ private: class KoTextFind : public KFind { Q_OBJECT + TQ_OBJECT public: - KoTextFind(const QString &pattern, long options, KoFindReplace *_findReplace, QWidget *parent = 0); + KoTextFind(const TQString &pattern, long options, KoFindReplace *_findReplace, TQWidget *tqparent = 0); ~KoTextFind(); - virtual bool validateMatch( const QString &text, int index, int matchedlength ); + virtual bool validateMatch( const TQString &text, int index, int matchedlength ); private: KoFindReplace * m_findReplace; }; @@ -187,31 +191,33 @@ private: class KoTextReplace : public KReplace { Q_OBJECT + TQ_OBJECT public: - KoTextReplace(const QString &pattern, const QString &replacement, long options, KoFindReplace *_findReplace, QWidget *parent = 0); + KoTextReplace(const TQString &pattern, const TQString &replacement, long options, KoFindReplace *_findReplace, TQWidget *tqparent = 0); ~KoTextReplace(); - virtual bool validateMatch( const QString &text, int index, int matchedlength ); + virtual bool validateMatch( const TQString &text, int index, int matchedlength ); private: KoFindReplace * m_findReplace; }; /** - * This class implements the 'find' functionality ( the "search next, prompt" loop ) - * and the 'replace' functionality. Same class, to allow centralizing the findNext() code. + * This class implements the 'tqfind' functionality ( the "search next, prompt" loop ) + * and the 'tqreplace' functionality. Same class, to allow centralizing the findNext() code. */ -class KOTEXT_EXPORT KoFindReplace : public QObject +class KOTEXT_EXPORT KoFindReplace : public TQObject { Q_OBJECT + TQ_OBJECT public: - KoFindReplace( QWidget * parent, KoSearchDia * dialog, const QValueList<KoTextObject *> & lstObject, KoTextView* textView ); - KoFindReplace( QWidget * parent, KoReplaceDia * dialog, const QValueList<KoTextObject *> & lstObject, KoTextView* textView ); + KoFindReplace( TQWidget * tqparent, KoSearchDia * dialog, const TQValueList<KoTextObject *> & lstObject, KoTextView* textView ); + KoFindReplace( TQWidget * tqparent, KoReplaceDia * dialog, const TQValueList<KoTextObject *> & lstObject, KoTextView* textView ); ~KoFindReplace(); KoTextParag *currentParag() { return m_textIterator.currentParag(); } - bool isReplace() const { return m_replace != 0L; } + bool isReplace() const { return m_tqreplace != 0L; } bool shouldRestart(); @@ -238,7 +244,7 @@ public: virtual void highlightPortion(KoTextParag * parag, int index, int length, KoTextDocument *textdoc, KDialogBase* dialog) = 0; /** For KoTextFind and KoTextReplace */ - bool validateMatch( const QString &text, int index, int matchedlength ); + bool validateMatch( const TQString &text, int index, int matchedlength ); protected: void replaceWithAttribut( KoTextCursor * cursor, int index ); @@ -246,26 +252,26 @@ protected: long options() const; void setOptions(long opt); void removeHighlight(); - bool needData() const { return m_find ? m_find->needData() : m_replace->needData(); } - void setData( const QString& data, int startPos = -1 ) { - if ( m_find ) m_find->setData( data, startPos ); - else m_replace->setData( data, startPos ); + bool needData() const { return m_tqfind ? m_tqfind->needData() : m_tqreplace->needData(); } + void setData( const TQString& data, int startPos = -1 ) { + if ( m_tqfind ) m_tqfind->setData( data, startPos ); + else m_tqreplace->setData( data, startPos ); } protected slots: void slotFindNext(); void optionsChanged(); void dialogClosed(); - void highlight( const QString &text, int matchingIndex, int matchingLength ); - void replace( const QString &text, int replacementIndex, int replacedLength, int searchLength ); + void highlight( const TQString &text, int matchingIndex, int matchingLength ); + void tqreplace( const TQString &text, int replacementIndex, int replacedLength, int searchLength ); void slotCurrentParagraphModified( int, int, int ); private: - void connectFind( KFind* find ); + void connectFind( KFind* tqfind ); // Only one of those two will be set - KoTextFind * m_find; - KoTextReplace * m_replace; + KoTextFind * m_tqfind; + KoTextReplace * m_tqreplace; KoSearchContext m_searchContext; KoSearchContext m_replaceContext; @@ -276,7 +282,7 @@ private: KMacroCommand *m_macroCmd; int m_offset; - int m_matchingIndex; // can be removed once we use kde-3.2 (for kfind::index()) + int m_matchingIndex; // can be removed once we use kde-3.2 (for ktqfind::index()) KoTextIterator m_textIterator; @@ -291,8 +297,9 @@ private: class KoFormatDia: public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KoFormatDia( QWidget* parent, const QString & _caption, KoSearchContext *_ctx, const char* name=0L); + KoFormatDia( TQWidget* tqparent, const TQString & _caption, KoSearchContext *_ctx, const char* name=0L); //apply to parameter to context ! void ctxOptions( ); @@ -300,38 +307,38 @@ protected slots: void slotReset(); void slotClear(); private: - QCheckBox *m_checkFamily; - QCheckBox *m_checkSize; - QCheckBox *m_checkColor; - QCheckBox *m_checkBgColor; - QCheckBox *m_checkBold; - QCheckBox *m_checkItalic; - QCheckBox *m_checkShadow; - QCheckBox *m_checkWordByWord; - QCheckBox *m_checkUnderline; - QCheckBox *m_checkVertAlign; - QCheckBox *m_checkStrikeOut; - QCheckBox *m_checkFontAttribute; - QCheckBox *m_checkLanguage; + TQCheckBox *m_checkFamily; + TQCheckBox *m_checkSize; + TQCheckBox *m_checkColor; + TQCheckBox *m_checkBgColor; + TQCheckBox *m_checkBold; + TQCheckBox *m_checkItalic; + TQCheckBox *m_checkShadow; + TQCheckBox *m_checkWordByWord; + TQCheckBox *m_checkUnderline; + TQCheckBox *m_checkVertAlign; + TQCheckBox *m_checkStrikeOut; + TQCheckBox *m_checkFontAttribute; + TQCheckBox *m_checkLanguage; KFontCombo *m_familyItem; - QSpinBox *m_sizeItem; + TQSpinBox *m_sizeItem; KColorButton *m_colorItem; KColorButton *m_bgColorItem; - QRadioButton *m_boldYes; - QRadioButton *m_boldNo; - QRadioButton *m_italicYes; - QRadioButton *m_italicNo; - QRadioButton *m_shadowYes; - QRadioButton *m_shadowNo; - QRadioButton *m_wordByWordYes; - QRadioButton *m_wordByWordNo; - - QComboBox *m_vertAlignItem; - QComboBox *m_underlineItem; - QComboBox *m_strikeOutItem; - QComboBox *m_fontAttributeItem; - QComboBox *m_languageItem; + TQRadioButton *m_boldYes; + TQRadioButton *m_boldNo; + TQRadioButton *m_italicYes; + TQRadioButton *m_italicNo; + TQRadioButton *m_shadowYes; + TQRadioButton *m_shadowNo; + TQRadioButton *m_wordByWordYes; + TQRadioButton *m_wordByWordNo; + + TQComboBox *m_vertAlignItem; + TQComboBox *m_underlineItem; + TQComboBox *m_strikeOutItem; + TQComboBox *m_fontAttributeItem; + TQComboBox *m_languageItem; KoSearchContext *m_ctx; }; |