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 /kword/KWFrameStyleManager.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 'kword/KWFrameStyleManager.h')
-rw-r--r-- | kword/KWFrameStyleManager.h | 93 |
1 files changed, 49 insertions, 44 deletions
diff --git a/kword/KWFrameStyleManager.h b/kword/KWFrameStyleManager.h index 4e73acc3..c44adb82 100644 --- a/kword/KWFrameStyleManager.h +++ b/kword/KWFrameStyleManager.h @@ -23,16 +23,16 @@ #include "KWFrameStyle.h" #include <kdialogbase.h> -#include <qptrlist.h> +#include <tqptrlist.h> -class QGroupBox; -class QGridLayout; -class QLineEdit; -class QListBox; -class QPushButton; -class QTabWidget; -class QWidget; +class TQGroupBox; +class TQGridLayout; +class TQLineEdit; +class TQListBox; +class TQPushButton; +class TQTabWidget; +class TQWidget; class KWDocument; class KWFrameStyleManagerTab; class KoParagLayoutWidget; @@ -44,26 +44,27 @@ class KWBrushStylePreview; /* Class: KWFrameStylePreview */ /******************************************************************/ -class KWFrameStylePreview : public QWidget +class KWFrameStylePreview : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KWFrameStylePreview( QWidget *parent ) - : QWidget( parent ), frameStyle( 0 ) { + KWFrameStylePreview( TQWidget *tqparent ) + : TQWidget( tqparent ), frameStyle( 0 ) { setBackgroundColor( white ); } void setFrameStyle(KWFrameStyle *_frameStyle); protected: - void paintEvent( QPaintEvent *e ); + void paintEvent( TQPaintEvent *e ); - void setTopBorder(KoBorder _bTop) { frameStyle->setTopBorder( _bTop ); repaint( true ); } - void setBottomBorder(KoBorder _bBottom) { frameStyle->setBottomBorder( _bBottom ); repaint( true ); } - void setRightBorder(KoBorder _bRight) { frameStyle->setRightBorder( _bRight ); repaint( true ); } - void setLeftBorder(KoBorder _bLeft) { frameStyle->setLeftBorder( _bLeft ); repaint( true ); } - void setBackground( const QColor & col ) { frameStyle->setBackgroundColor( col ); repaint( true ); } + void setTopBorder(KoBorder _bTop) { frameStyle->setTopBorder( _bTop ); tqrepaint( true ); } + void setBottomBorder(KoBorder _bBottom) { frameStyle->setBottomBorder( _bBottom ); tqrepaint( true ); } + void setRightBorder(KoBorder _bRight) { frameStyle->setRightBorder( _bRight ); tqrepaint( true ); } + void setLeftBorder(KoBorder _bLeft) { frameStyle->setLeftBorder( _bLeft ); tqrepaint( true ); } + void setBackground( const TQColor & col ) { frameStyle->setBackgroundColor( col ); tqrepaint( true ); } KWFrameStyle *frameStyle; }; @@ -101,14 +102,15 @@ class KWFrameStyleListItem class KWFrameStyleManager : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KWFrameStyleManager( QWidget *_parent, KWDocument *_doc, - const QString & activeStyleName ); + KWFrameStyleManager( TQWidget *_parent, KWDocument *_doc, + const TQString & activeStyleName ); ~KWFrameStyleManager(); protected: - void addStyles(const QPtrList<KWFrameStyle> & style ); + void addStyles(const TQPtrList<KWFrameStyle> & style ); void setupWidget(); void addGeneralTab(); void apply(); @@ -117,21 +119,21 @@ protected: void save(); int frameStyleIndex( int pos ); - QTabWidget *m_tabs; - QListBox *m_stylesList; - QLineEdit *m_nameString; - QPushButton *m_deleteButton; - QPushButton *m_newButton; - QPushButton *m_moveUpButton; - QPushButton *m_moveDownButton; + TQTabWidget *m_tabs; + TQListBox *m_stylesList; + TQLineEdit *m_nameString; + TQPushButton *m_deleteButton; + TQPushButton *m_newButton; + TQPushButton *m_moveUpButton; + TQPushButton *m_moveDownButton; - QGroupBox *previewBox; + TQGroupBox *previewBox; KWFrameStylePreview *preview; KWFrameStyle *m_currentFrameStyle; - QStringList m_styleOrder; - QPtrList<KWFrameStyleListItem> m_frameStyles; - QPtrList<KWFrameStyleManagerTab> m_tabsList; + TQStringList m_styleOrder; + TQPtrList<KWFrameStyleListItem> m_frameStyles; + TQPtrList<KWFrameStyleManagerTab> m_tabsList; int numFrameStyles; bool noSignals; @@ -146,23 +148,24 @@ protected slots: void deleteStyle(); void moveUpStyle(); void moveDownStyle(); - void renameStyle(const QString &); + void renameStyle(const TQString &); void importFromFile(); protected: void addTab( KWFrameStyleManagerTab * tab ); }; -class KWFrameStyleManagerTab : public QWidget { +class KWFrameStyleManagerTab : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KWFrameStyleManagerTab(QWidget *parent) : QWidget(parent) {}; + KWFrameStyleManagerTab(TQWidget *tqparent) : TQWidget(tqparent) {}; /** the new style which is to be displayed */ void setStyle(KWFrameStyle *style) { m_style = style; } /** update the GUI from the current Style*/ virtual void update() = 0; /** return the (i18n-ed) name of the tab */ - virtual QString tabName() = 0; + virtual TQString tabName() = 0; /** save the GUI to the style */ virtual void save() = 0; protected: @@ -172,18 +175,19 @@ protected: class KWFrameStyleBackgroundTab : public KWFrameStyleManagerTab { Q_OBJECT + TQ_OBJECT public: - KWFrameStyleBackgroundTab( QWidget * parent ); + KWFrameStyleBackgroundTab( TQWidget * tqparent ); virtual void update(); virtual void save(); - virtual QString tabName(); + virtual TQString tabName(); protected slots: - void updateBrushConfiguration( const QColor & ); + void updateBrushConfiguration( const TQColor & ); protected: - QBrush m_backgroundColor; - QWidget *bgwidget; - QGridLayout *grid; + TQBrush m_backgroundColor; + TQWidget *bgwidget; + TQGridLayout *grid; KColorButton *brushColor; KWBrushStylePreview *brushPreview; }; @@ -191,16 +195,17 @@ protected: class KWFrameStyleBordersTab : public KWFrameStyleManagerTab { Q_OBJECT + TQ_OBJECT public: - KWFrameStyleBordersTab( QWidget * parent ); + KWFrameStyleBordersTab( TQWidget * tqparent ); ~KWFrameStyleBordersTab(); void setWidget( KoParagLayoutWidget * widget ); virtual void update(); virtual void save(); - virtual QString tabName(); + virtual TQString tabName(); protected: - virtual void resizeEvent( QResizeEvent *e ); + virtual void resizeEvent( TQResizeEvent *e ); KoParagLayoutWidget * m_widget; KoParagLayout *m_borders; // Pity that I'm using such an overdosis for just borders :-( |