summaryrefslogtreecommitdiffstats
path: root/lib/kofficeui
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/kofficeui
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-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/kofficeui')
-rw-r--r--lib/kofficeui/KoBrush.cpp6
-rw-r--r--lib/kofficeui/KoBrush.h24
-rw-r--r--lib/kofficeui/KoCharSelectDia.cpp28
-rw-r--r--lib/kofficeui/KoCharSelectDia.h29
-rw-r--r--lib/kofficeui/KoCommandHistory.cpp104
-rw-r--r--lib/kofficeui/KoCommandHistory.h32
-rw-r--r--lib/kofficeui/KoContextCelp.cpp266
-rw-r--r--lib/kofficeui/KoContextCelp.h141
-rw-r--r--lib/kofficeui/KoEditPath.cpp46
-rw-r--r--lib/kofficeui/KoEditPath.h16
-rw-r--r--lib/kofficeui/KoGeneralPropertyUi.ui28
-rw-r--r--lib/kofficeui/KoGuideLineDia.cpp62
-rw-r--r--lib/kofficeui/KoGuideLineDia.h19
-rw-r--r--lib/kofficeui/KoGuides.cpp216
-rw-r--r--lib/kofficeui/KoGuides.h89
-rw-r--r--lib/kofficeui/KoInsertLink.cpp250
-rw-r--r--lib/kofficeui/KoInsertLink.h101
-rw-r--r--lib/kofficeui/KoKoolBar.cpp74
-rw-r--r--lib/kofficeui/KoKoolBar.h72
-rw-r--r--lib/kofficeui/KoPageLayoutColumns.cpp24
-rw-r--r--lib/kofficeui/KoPageLayoutColumns.h19
-rw-r--r--lib/kofficeui/KoPageLayoutColumnsBase.ui16
-rw-r--r--lib/kofficeui/KoPageLayoutDia.cpp194
-rw-r--r--lib/kofficeui/KoPageLayoutDia.h70
-rw-r--r--lib/kofficeui/KoPageLayoutHeader.cpp14
-rw-r--r--lib/kofficeui/KoPageLayoutHeader.h11
-rw-r--r--lib/kofficeui/KoPageLayoutHeaderBase.ui44
-rw-r--r--lib/kofficeui/KoPageLayoutSize.cpp110
-rw-r--r--lib/kofficeui/KoPageLayoutSize.h25
-rw-r--r--lib/kofficeui/KoPartSelectAction.cpp28
-rw-r--r--lib/kofficeui/KoPartSelectAction.h15
-rw-r--r--lib/kofficeui/KoPartSelectDia.cpp32
-rw-r--r--lib/kofficeui/KoPartSelectDia.h17
-rw-r--r--lib/kofficeui/KoPen.cpp14
-rw-r--r--lib/kofficeui/KoPen.h12
-rw-r--r--lib/kofficeui/KoPictureFilePreview.cpp40
-rw-r--r--lib/kofficeui/KoPictureFilePreview.h7
-rw-r--r--lib/kofficeui/KoRuler.cpp282
-rw-r--r--lib/kofficeui/KoRuler.h71
-rw-r--r--lib/kofficeui/KoSelectAction.cpp50
-rw-r--r--lib/kofficeui/KoSelectAction.h21
-rw-r--r--lib/kofficeui/KoTabBar.cpp248
-rw-r--r--lib/kofficeui/KoTabBar.h53
-rw-r--r--lib/kofficeui/KoTabChooser.cpp34
-rw-r--r--lib/kofficeui/KoTabChooser.h27
-rw-r--r--lib/kofficeui/KoTemplateChooseDia.cpp292
-rw-r--r--lib/kofficeui/KoTemplateChooseDia.h103
-rw-r--r--lib/kofficeui/KoTemplateCreateDia.cpp188
-rw-r--r--lib/kofficeui/KoTemplateCreateDia.h23
-rw-r--r--lib/kofficeui/KoToolBox.cpp80
-rw-r--r--lib/kofficeui/KoToolBox.h51
-rw-r--r--lib/kofficeui/KoTooluButton.cpp600
-rw-r--r--lib/kofficeui/KoTooluButton.h105
-rw-r--r--lib/kofficeui/KoUnitWidgets.cpp154
-rw-r--r--lib/kofficeui/KoUnitWidgets.h36
-rw-r--r--lib/kofficeui/KoZoomAction.cpp80
-rw-r--r--lib/kofficeui/KoZoomAction.h15
-rw-r--r--lib/kofficeui/KoZoomHandler.h20
-rw-r--r--lib/kofficeui/KoZoomMode.cpp4
-rw-r--r--lib/kofficeui/KoZoomMode.h12
-rw-r--r--lib/kofficeui/Kolinestyleaction.cpp28
-rw-r--r--lib/kofficeui/Kolinestyleaction.h15
-rw-r--r--lib/kofficeui/Kolinewidthaction.cpp50
-rw-r--r--lib/kofficeui/Kolinewidthaction.h18
-rw-r--r--lib/kofficeui/kcoloractions.cpp104
-rw-r--r--lib/kofficeui/kcoloractions.h42
-rw-r--r--lib/kofficeui/tests/coloraction_test.cpp52
-rw-r--r--lib/kofficeui/tests/coloraction_test.h9
-rw-r--r--lib/kofficeui/tkaction.cpp96
-rw-r--r--lib/kofficeui/tkaction.h35
-rw-r--r--lib/kofficeui/tkcoloractions.cpp442
-rw-r--r--lib/kofficeui/tkcoloractions.h74
-rw-r--r--lib/kofficeui/tkcombobox.cpp52
-rw-r--r--lib/kofficeui/tkcombobox.h11
-rw-r--r--lib/kofficeui/tktoolbarbutton.cpp210
-rw-r--r--lib/kofficeui/tktoolbarbutton.h67
76 files changed, 3107 insertions, 3042 deletions
diff --git a/lib/kofficeui/KoBrush.cpp b/lib/kofficeui/KoBrush.cpp
index 62b3fa96e..e97561b85 100644
--- a/lib/kofficeui/KoBrush.cpp
+++ b/lib/kofficeui/KoBrush.cpp
@@ -24,8 +24,8 @@
#include <KoXmlNS.h>
KoBrush::KoBrush()
-: m_gColor1( Qt::red )
-, m_gColor2( Qt::green )
+: m_gColor1( TQt::red )
+, m_gColor2( TQt::green )
, m_gType( BCT_GHORZ )
, m_fillType( FT_BRUSH )
, m_unbalanced( false )
@@ -35,7 +35,7 @@ KoBrush::KoBrush()
}
-KoBrush::KoBrush( const QBrush &brush, const QColor &gColor1, const QColor &gColor2,
+KoBrush::KoBrush( const TQBrush &brush, const TQColor &gColor1, const TQColor &gColor2,
BCType gType, FillType fillType, bool unbalanced,
int xfactor, int yfactor )
: m_brush( brush )
diff --git a/lib/kofficeui/KoBrush.h b/lib/kofficeui/KoBrush.h
index 142dbb924..1134b05ef 100644
--- a/lib/kofficeui/KoBrush.h
+++ b/lib/kofficeui/KoBrush.h
@@ -21,12 +21,12 @@
#ifndef KOBRUSH_H
#define KOBRUSH_H
-#include <qbrush.h>
+#include <tqbrush.h>
class KoGenStyle;
class KoGenStyles;
class KoOasisContext;
-class QDomElement;
+class TQDomElement;
enum BCType {
@@ -51,17 +51,17 @@ class KoBrush
{
public:
KoBrush();
- KoBrush( const QBrush &brush, const QColor &gColor1, const QColor &gColor2,
+ KoBrush( const TQBrush &brush, const TQColor &gColor1, const TQColor &gColor2,
BCType gType, FillType fillType, bool unbalanced,
int xfactor, int yfactor );
KoBrush &operator=( const KoBrush &brush );
- void setBrush( const QBrush &brush )
+ void setBrush( const TQBrush &brush )
{ m_brush = brush; }
- void setGColor1( const QColor &gColor1 )
+ void setGColor1( const TQColor &gColor1 )
{ m_gColor1 = gColor1; }
- void setGColor2( const QColor &gColor2 )
+ void setGColor2( const TQColor &gColor2 )
{ m_gColor2 = gColor2; }
void setGType( BCType gType )
{ m_gType = gType; }
@@ -74,11 +74,11 @@ public:
void setGYFactor( int yfactor )
{ m_yfactor = yfactor; }
- QBrush getBrush() const
+ TQBrush getBrush() const
{ return m_brush; }
- QColor getGColor1() const
+ TQColor getGColor1() const
{ return m_gColor1; }
- QColor getGColor2() const
+ TQColor getGColor2() const
{ return m_gColor2; }
BCType getGType() const
{ return m_gType; }
@@ -92,9 +92,9 @@ public:
{ return m_yfactor; }
private:
- QBrush m_brush;
- QColor m_gColor1;
- QColor m_gColor2;
+ TQBrush m_brush;
+ TQColor m_gColor1;
+ TQColor m_gColor2;
BCType m_gType;
FillType m_fillType;
bool m_unbalanced;
diff --git a/lib/kofficeui/KoCharSelectDia.cpp b/lib/kofficeui/KoCharSelectDia.cpp
index 5a0105c63..a7f09b3f4 100644
--- a/lib/kofficeui/KoCharSelectDia.cpp
+++ b/lib/kofficeui/KoCharSelectDia.cpp
@@ -20,7 +20,7 @@
#include "KoCharSelectDia.h"
#include "KoCharSelectDia.moc"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kcharselect.h>
@@ -29,8 +29,8 @@
/* class KoCharSelectDia */
/******************************************************************/
-KoCharSelectDia::KoCharSelectDia( QWidget *parent, const char *name, const QChar &_chr, const QString &_font, bool _enableFont , bool _modal)
- : KDialogBase( Plain, i18n("Select Character"), Ok | Cancel, Ok , parent, name, _modal )
+KoCharSelectDia::KoCharSelectDia( TQWidget *tqparent, const char *name, const TQChar &_chr, const TQString &_font, bool _enableFont , bool _modal)
+ : KDialogBase( Plain, i18n("Select Character"), Ok | Cancel, Ok , tqparent, name, _modal )
{
initDialog(_chr,_font,_enableFont);
@@ -40,8 +40,8 @@ KoCharSelectDia::KoCharSelectDia( QWidget *parent, const char *name, const QChar
setButtonOK( okItem );
}
-KoCharSelectDia::KoCharSelectDia( QWidget *parent, const char *name, const QString &_font, const QChar &_chr, bool _modal )
- : KDialogBase( Plain, i18n("Select Character"), User1 | Close, User1 , parent, name, _modal )
+KoCharSelectDia::KoCharSelectDia( TQWidget *tqparent, const char *name, const TQString &_font, const TQChar &_chr, bool _modal )
+ : KDialogBase( Plain, i18n("Select Character"), User1 | Close, User1 , tqparent, name, _modal )
{
initDialog(_chr,_font,true);
@@ -50,15 +50,15 @@ KoCharSelectDia::KoCharSelectDia( QWidget *parent, const char *name, const QStri
}
-void KoCharSelectDia::initDialog(const QChar &_chr, const QString &_font, bool /*_enableFont*/)
+void KoCharSelectDia::initDialog(const TQChar &_chr, const TQString &_font, bool /*_enableFont*/)
{
- QWidget *page = plainPage();
+ TQWidget *page = plainPage();
- grid = new QGridLayout( page, 1, 1, 0, KDialog::spacingHint() );
+ grid = new TQGridLayout( page, 1, 1, 0, KDialog::spacingHint() );
charSelect = new KCharSelect( page, "", _font, _chr );
- connect(charSelect, SIGNAL(doubleClicked()),this, SLOT(slotDoubleClicked()));
- charSelect->resize( charSelect->sizeHint() );
+ connect(charSelect, TQT_SIGNAL(doubleClicked()),this, TQT_SLOT(slotDoubleClicked()));
+ charSelect->resize( charSelect->tqsizeHint() );
charSelect->enableFontCombo( true );
grid->addWidget( charSelect, 0, 0 );
@@ -77,11 +77,11 @@ void KoCharSelectDia::closeDialog()
KDialogBase::close();
}
-bool KoCharSelectDia::selectChar( QString &_font, QChar &_chr, bool _enableFont, QWidget* parent, const char* name )
+bool KoCharSelectDia::selectChar( TQString &_font, TQChar &_chr, bool _enableFont, TQWidget* tqparent, const char* name )
{
bool res = false;
- KoCharSelectDia *dlg = new KoCharSelectDia( parent, name, _chr, _font, _enableFont );
+ KoCharSelectDia *dlg = new KoCharSelectDia( tqparent, name, _chr, _font, _enableFont );
dlg->setFocus();
if ( dlg->exec() == Accepted )
{
@@ -95,12 +95,12 @@ bool KoCharSelectDia::selectChar( QString &_font, QChar &_chr, bool _enableFont,
return res;
}
-QChar KoCharSelectDia::chr() const
+TQChar KoCharSelectDia::chr() const
{
return charSelect->chr();
}
-QString KoCharSelectDia::font() const
+TQString KoCharSelectDia::font() const
{
return charSelect->font();
}
diff --git a/lib/kofficeui/KoCharSelectDia.h b/lib/kofficeui/KoCharSelectDia.h
index dba5e76ee..507c0704f 100644
--- a/lib/kofficeui/KoCharSelectDia.h
+++ b/lib/kofficeui/KoCharSelectDia.h
@@ -23,9 +23,9 @@
#include <kdialogbase.h>
#include <koffice_export.h>
-class QWidget;
-class QGridLayout;
-class QPushButton;
+class TQWidget;
+class TQGridLayout;
+class TQPushButton;
class KCharSelect;
class KButtonBox;
@@ -36,27 +36,28 @@ class KButtonBox;
class KOFFICEUI_EXPORT KoCharSelectDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
// constructor - destructor
- KoCharSelectDia( QWidget *parent, const char *name, const QChar &_chr,
- const QString &_font, bool _enableFont, bool _modal=true );
+ KoCharSelectDia( TQWidget *tqparent, const char *name, const TQChar &_chr,
+ const TQString &_font, bool _enableFont, bool _modal=true );
//constructor when you want to insert multi char
- KoCharSelectDia( QWidget *parent, const char *name, const QString &_font,
- const QChar &_chr, bool _modal=true );
+ KoCharSelectDia( TQWidget *tqparent, const char *name, const TQString &_font,
+ const TQChar &_chr, bool _modal=true );
~KoCharSelectDia();
// select char dialog
- KOFFICEUI_EXPORT static bool selectChar( QString &_font, QChar &_chr, bool _enableFont = true, QWidget* parent = 0, const char* name = 0);
+ KOFFICEUI_EXPORT static bool selectChar( TQString &_font, TQChar &_chr, bool _enableFont = true, TQWidget* tqparent = 0, const char* name = 0);
// internal
- QChar chr() const;
- QString font() const;
+ TQChar chr() const;
+ TQString font() const;
void closeDialog();
private:
- void initDialog(const QChar &_chr, const QString &_font, bool _enableFont);
+ void initDialog(const TQChar &_chr, const TQString &_font, bool _enableFont);
private slots:
void slotUser1();
@@ -64,13 +65,13 @@ private slots:
protected:
// dialog objects
- QGridLayout *grid;
+ TQGridLayout *grid;
KButtonBox *bbox;
- QPushButton *bOk, *bCancel;
+ TQPushButton *bOk, *bCancel;
KCharSelect *charSelect;
signals:
- void insertChar(QChar,const QString &);
+ void insertChar(TQChar,const TQString &);
};
#endif
diff --git a/lib/kofficeui/KoCommandHistory.cpp b/lib/kofficeui/KoCommandHistory.cpp
index 79f0a14fd..22e8599b9 100644
--- a/lib/kofficeui/KoCommandHistory.cpp
+++ b/lib/kofficeui/KoCommandHistory.cpp
@@ -18,9 +18,9 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
#include <kaction.h>
#include <kcommand.h>
@@ -33,15 +33,15 @@
#include "KoCommandHistory.h"
-KoListBox::KoListBox( QWidget *parent , const char *name , WFlags f)
- : QListBox( parent, name, f)
+KoListBox::KoListBox( TQWidget *tqparent , const char *name , WFlags f)
+ : TQListBox( tqparent, name, f)
{
setVScrollBarMode( AlwaysOn );
}
-void KoListBox::contentsMouseMoveEvent ( QMouseEvent * e)
+void KoListBox::contentsMouseMoveEvent ( TQMouseEvent * e)
{
- QListBoxItem *item_p = itemAt( contentsToViewport(e->pos()));
+ TQListBoxItem *item_p = itemAt( contentsToViewport(e->pos()));
if ( item_p )
{
int itemIndex = index( item_p );
@@ -53,10 +53,10 @@ void KoListBox::contentsMouseMoveEvent ( QMouseEvent * e)
}
}
-QSize KoListBox::sizeHint() const
+TQSize KoListBox::tqsizeHint() const
{
- return QSize(QMIN(maxItemWidth() + verticalScrollBar()->width() + 4, 400),
- QMIN(count() * itemHeight() + horizontalScrollBar()->height() + 4,300));
+ return TQSize(TQMIN(maxItemWidth() + verticalScrollBar()->width() + 4, 400),
+ TQMIN(count() * itemHeight() + horizontalScrollBar()->height() + 4,300));
}
class KoCommandHistory::KoCommandHistoryPrivate {
@@ -70,8 +70,8 @@ public:
KCommand *m_present;
KoListBox *m_undoListBox;
KoListBox *m_redoListBox;
- QLabel *m_undoLabel;
- QLabel *m_redoLabel;
+ TQLabel *m_undoLabel;
+ TQLabel *m_redoLabel;
};
////////////
@@ -91,49 +91,49 @@ KoCommandHistory::KoCommandHistory(KActionCollection * actionCollection, bool wi
if (withMenus)
{
KToolBarPopupAction * undo = new KToolBarPopupAction( i18n("&Undo"), "undo",
- KStdAccel::undo(), this, SLOT( undo() ),
+ KStdAccel::undo(), this, TQT_SLOT( undo() ),
actionCollection, /*KStdAction::stdName( KStdAction::Undo )*/"koffice_undo" );
- connect( undo->popupMenu(), SIGNAL( aboutToShow() ), this, SLOT( slotUndoAboutToShow() ) );
- connect( undo->popupMenu(), SIGNAL( activated( int ) ), this, SLOT( slotUndoActivated( int ) ) );
+ connect( undo->popupMenu(), TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( slotUndoAboutToShow() ) );
+ connect( undo->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotUndoActivated( int ) ) );
m_undo = undo;
m_undoPopup = undo->popupMenu();
d->m_undoListBox = new KoListBox( m_undoPopup );
- d->m_undoListBox->setSelectionMode( QListBox::Multi );
+ d->m_undoListBox->setSelectionMode( TQListBox::Multi );
m_undoPopup->insertItem(d->m_undoListBox);
- d->m_undoLabel = new QLabel( m_undoPopup);
+ d->m_undoLabel = new TQLabel( m_undoPopup);
m_undoPopup->insertItem(d->m_undoLabel);
- connect( d->m_undoListBox, SIGNAL( selected( int ) ), this, SLOT( slotUndoActivated( int ) ) );
- connect( d->m_undoListBox, SIGNAL(clicked ( QListBoxItem *)), this, SLOT( slotUndoActivated( QListBoxItem * ) ) );
+ connect( d->m_undoListBox, TQT_SIGNAL( selected( int ) ), this, TQT_SLOT( slotUndoActivated( int ) ) );
+ connect( d->m_undoListBox, TQT_SIGNAL(clicked ( TQListBoxItem *)), this, TQT_SLOT( slotUndoActivated( TQListBoxItem * ) ) );
- connect( d->m_undoListBox, SIGNAL( changeNumberOfSelectedItem( int )), this, SLOT( slotChangeUndoNumberOfSelectedItem( int )));
+ connect( d->m_undoListBox, TQT_SIGNAL( changeNumberOfSelectedItem( int )), this, TQT_SLOT( slotChangeUndoNumberOfSelectedItem( int )));
KToolBarPopupAction * redo = new KToolBarPopupAction( i18n("&Redo"), "redo",
- KStdAccel::redo(), this, SLOT( redo() ),
+ KStdAccel::redo(), this, TQT_SLOT( redo() ),
actionCollection, /*KStdAction::stdName( KStdAction::Redo )*/
"koffice_redo");
- connect( redo->popupMenu(), SIGNAL( aboutToShow() ), this, SLOT( slotRedoAboutToShow() ) );
- connect( redo->popupMenu(), SIGNAL( activated( int ) ), this, SLOT( slotRedoActivated( int ) ) );
+ connect( redo->popupMenu(), TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( slotRedoAboutToShow() ) );
+ connect( redo->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotRedoActivated( int ) ) );
m_redo = redo;
m_redoPopup = redo->popupMenu();
d->m_redoListBox = new KoListBox( m_redoPopup );
- d->m_redoListBox->setSelectionMode( QListBox::Multi );
+ d->m_redoListBox->setSelectionMode( TQListBox::Multi );
m_redoPopup->insertItem(d->m_redoListBox);
- d->m_redoLabel = new QLabel( m_redoPopup);
+ d->m_redoLabel = new TQLabel( m_redoPopup);
m_redoPopup->insertItem(d->m_redoLabel);
- connect( d->m_redoListBox, SIGNAL( selected( int ) ), this, SLOT( slotRedoActivated( int ) ) );
- connect( d->m_redoListBox, SIGNAL(clicked ( QListBoxItem *)), this, SLOT( slotRedoActivated( QListBoxItem * ) ) );
- connect( d->m_redoListBox, SIGNAL( changeNumberOfSelectedItem( int )), this, SLOT( slotChangeRedoNumberOfSelectedItem( int )));
+ connect( d->m_redoListBox, TQT_SIGNAL( selected( int ) ), this, TQT_SLOT( slotRedoActivated( int ) ) );
+ connect( d->m_redoListBox, TQT_SIGNAL(clicked ( TQListBoxItem *)), this, TQT_SLOT( slotRedoActivated( TQListBoxItem * ) ) );
+ connect( d->m_redoListBox, TQT_SIGNAL( changeNumberOfSelectedItem( int )), this, TQT_SLOT( slotChangeRedoNumberOfSelectedItem( int )));
}
else
{
- m_undo = KStdAction::undo( this, SLOT( undo() ), actionCollection, "koffice_undo");
- m_redo = KStdAction::redo( this, SLOT( redo() ), actionCollection, "koffice_redo");
+ m_undo = KStdAction::undo( this, TQT_SLOT( undo() ), actionCollection, "koffice_undo");
+ m_redo = KStdAction::redo( this, TQT_SLOT( redo() ), actionCollection, "koffice_redo");
m_undoPopup = 0L;
m_redoPopup = 0L;
d->m_redoListBox = 0L;
@@ -173,7 +173,7 @@ void KoCommandHistory::addCommand(KCommand *command, bool execute) {
return;
int index;
- if(d->m_present!=0L && (index=m_commands.findRef(d->m_present))!=-1) {
+ if(d->m_present!=0L && (index=m_commands.tqfindRef(d->m_present))!=-1) {
if (m_first)
--index;
m_commands.insert(index+1, command);
@@ -188,7 +188,7 @@ void KoCommandHistory::addCommand(KCommand *command, bool execute) {
m_first=false;
if (m_undo != 0) {
m_undo->setEnabled(true);
- m_undo->setText(i18n("&Undo: %1").arg(d->m_present->name()));
+ m_undo->setText(i18n("&Undo: %1").tqarg(d->m_present->name()));
}
if((m_redo != 0) && m_redo->isEnabled()) {
m_redo->setEnabled(false);
@@ -203,7 +203,7 @@ void KoCommandHistory::addCommand(KCommand *command, bool execute) {
d->m_present=command;
if (m_undo != 0) {
m_undo->setEnabled(true);
- m_undo->setText(i18n("&Undo: %1").arg(d->m_present->name()));
+ m_undo->setText(i18n("&Undo: %1").tqarg(d->m_present->name()));
}
if (m_redo != 0) {
m_redo->setEnabled(false);
@@ -229,16 +229,16 @@ void KoCommandHistory::undo() {
if (m_redo != 0) {
m_redo->setEnabled(true);
- m_redo->setText(i18n("&Redo: %1").arg(d->m_present->name()));
+ m_redo->setText(i18n("&Redo: %1").tqarg(d->m_present->name()));
}
int index;
- if((index=m_commands.findRef(d->m_present))!=-1 && m_commands.prev()!=0) {
+ if((index=m_commands.tqfindRef(d->m_present))!=-1 && m_commands.prev()!=0) {
d->m_present=m_commands.current();
emit commandExecuted();
emit commandExecuted(commandUndone);
if (m_undo != 0) {
m_undo->setEnabled(true);
- m_undo->setText(i18n("&Undo: %1").arg(d->m_present->name()));
+ m_undo->setText(i18n("&Undo: %1").tqarg(d->m_present->name()));
}
--index;
if(index==d->m_savedAt)
@@ -270,7 +270,7 @@ void KoCommandHistory::redo() {
if(d->m_savedAt==0)
emit documentRestored();
}
- else if((index=m_commands.findRef(d->m_present))!=-1 && m_commands.next()!=0) {
+ else if((index=m_commands.tqfindRef(d->m_present))!=-1 && m_commands.next()!=0) {
d->m_present=m_commands.current();
d->m_present->execute();
emit commandExecuted();
@@ -282,13 +282,13 @@ void KoCommandHistory::redo() {
if (m_undo != 0) {
m_undo->setEnabled(true);
- m_undo->setText(i18n("&Undo: %1").arg(d->m_present->name()));
+ m_undo->setText(i18n("&Undo: %1").tqarg(d->m_present->name()));
}
if(m_commands.next()!=0) {
if (m_redo != 0) {
m_redo->setEnabled(true);
- m_redo->setText(i18n("&Redo: %1").arg(m_commands.current()->name()));
+ m_redo->setText(i18n("&Redo: %1").tqarg(m_commands.current()->name()));
}
}
else {
@@ -301,7 +301,7 @@ void KoCommandHistory::redo() {
void KoCommandHistory::documentSaved() {
if(d->m_present!=0 && !m_first)
- d->m_savedAt=m_commands.findRef(d->m_present);
+ d->m_savedAt=m_commands.tqfindRef(d->m_present);
else if(d->m_present==0 && !m_first)
d->m_savedAt=-42; // this value signals that the document has
// been saved with an empty history.
@@ -331,7 +331,7 @@ void KoCommandHistory::clipCommands() {
if(count<=m_undoLimit && count<=m_redoLimit)
return;
- int index=m_commands.findRef(d->m_present);
+ int index=m_commands.tqfindRef(d->m_present);
if(index>=m_undoLimit) {
for(int i=0; i<=(index-m_undoLimit); ++i) {
m_commands.removeFirst();
@@ -339,7 +339,7 @@ void KoCommandHistory::clipCommands() {
if(d->m_savedAt==-1)
d->m_savedAt=-42;
}
- index=m_commands.findRef(d->m_present); // calculate the new
+ index=m_commands.tqfindRef(d->m_present); // calculate the new
count=m_commands.count(); // values (for the redo-branch :)
// make it easier for us... d->m_savedAt==-1 -> invalid
if(d->m_savedAt!=-42 && d->m_savedAt<-1)
@@ -361,11 +361,11 @@ void KoCommandHistory::slotUndoAboutToShow()
d->m_undoListBox->clear();
slotChangeUndoNumberOfSelectedItem( -1 );
int i = 0;
- QStringList lst;
- if (m_commands.findRef(d->m_present)!=-1)
+ TQStringList lst;
+ if (m_commands.tqfindRef(d->m_present)!=-1)
while ( m_commands.current() && i<10 ) // TODO make number of items configurable ?
{
- lst.append(i18n("Undo: %1").arg(m_commands.current()->name()));
+ lst.append(i18n("Undo: %1").tqarg(m_commands.current()->name()));
m_commands.prev();
}
d->m_undoListBox->insertStringList( lst );
@@ -379,13 +379,13 @@ void KoCommandHistory::slotUndoActivated( int pos )
m_undoPopup->hide();
}
-void KoCommandHistory::slotUndoActivated( QListBoxItem * item)
+void KoCommandHistory::slotUndoActivated( TQListBoxItem * item)
{
if ( item )
slotUndoActivated( item->listBox()->index(item));
}
-void KoCommandHistory::slotRedoActivated( QListBoxItem * item)
+void KoCommandHistory::slotRedoActivated( TQListBoxItem * item)
{
if ( item )
slotRedoActivated( item->listBox()->index(item));
@@ -406,17 +406,17 @@ void KoCommandHistory::slotRedoAboutToShow()
{
d->m_redoListBox->clear();
slotChangeRedoNumberOfSelectedItem( -1 );
- QStringList lst;
+ TQStringList lst;
int i = 0;
if (m_first)
{
d->m_present = m_commands.first();
- lst.append(i18n("Redo: %1").arg(d->m_present->name()));
+ lst.append(i18n("Redo: %1").tqarg(d->m_present->name()));
}
- if (m_commands.findRef(d->m_present)!=-1 && m_commands.next())
+ if (m_commands.tqfindRef(d->m_present)!=-1 && m_commands.next())
while ( m_commands.current() && i<10 ) // TODO make number of items configurable ?
{
- lst.append(i18n("Redo: %1").arg(m_commands.current()->name()));
+ lst.append(i18n("Redo: %1").tqarg(m_commands.current()->name()));
m_commands.next();
}
d->m_redoListBox->insertStringList( lst );
@@ -436,7 +436,7 @@ void KoCommandHistory::updateActions()
if ( m_undo && m_redo )
{
m_undo->setEnabled( !m_first && ( d->m_present != 0L ) );
- m_redo->setEnabled(m_first || (m_commands.findRef(d->m_present)!=-1 && m_commands.next()!=0));
+ m_redo->setEnabled(m_first || (m_commands.tqfindRef(d->m_present)!=-1 && m_commands.next()!=0));
}
}
diff --git a/lib/kofficeui/KoCommandHistory.h b/lib/kofficeui/KoCommandHistory.h
index a36ce6703..08de0e45b 100644
--- a/lib/kofficeui/KoCommandHistory.h
+++ b/lib/kofficeui/KoCommandHistory.h
@@ -21,24 +21,25 @@
#ifndef kocommandhistory_h
#define kocommandhistory_h
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qobject.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqobject.h>
#include <koffice_export.h>
class KAction;
class KActionCollection;
-class QPopupMenu;
+class TQPopupMenu;
class KCommand;
-#include <qlistbox.h>
+#include <tqlistbox.h>
-class KoListBox : public QListBox {
+class KoListBox : public TQListBox {
Q_OBJECT
+ TQ_OBJECT
public:
- KoListBox( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+ KoListBox( TQWidget *tqparent = 0, const char *name = 0, WFlags f = 0 );
protected:
- virtual void contentsMouseMoveEvent ( QMouseEvent * );
- virtual QSize sizeHint() const;
+ virtual void contentsMouseMoveEvent ( TQMouseEvent * );
+ virtual TQSize tqsizeHint() const;
signals:
void changeNumberOfSelectedItem( int );
};
@@ -55,8 +56,9 @@ signals:
*
* @short History of user commands (for undo/redo)
*/
-class KOFFICEUI_EXPORT KoCommandHistory : public QObject {
+class KOFFICEUI_EXPORT KoCommandHistory : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Creates a command history, to store commands.
@@ -83,7 +85,7 @@ public:
/**
* Erases all the undo/redo history.
- * Use this when reloading the data, for instance, since this invalidates
+ * Use this when reloading the data, for instance, since this tqinvalidates
* all the commands.
*/
void clear();
@@ -154,8 +156,8 @@ protected slots:
void slotUndoActivated( int );
void slotRedoAboutToShow();
void slotRedoActivated( int );
- void slotUndoActivated( QListBoxItem *);
- void slotRedoActivated( QListBoxItem *);
+ void slotUndoActivated( TQListBoxItem *);
+ void slotRedoActivated( TQListBoxItem *);
void slotChangeRedoNumberOfSelectedItem( int );
void slotChangeUndoNumberOfSelectedItem( int );
signals:
@@ -183,9 +185,9 @@ signals:
private:
void clipCommands(); // ensures that the limits are kept
- QPtrList<KCommand> m_commands;
+ TQPtrList<KCommand> m_commands;
KAction *m_undo, *m_redo;
- QPopupMenu *m_undoPopup, *m_redoPopup;
+ TQPopupMenu *m_undoPopup, *m_redoPopup;
int m_undoLimit, m_redoLimit;
bool m_first; // attention: it's the first command in the list!
protected:
diff --git a/lib/kofficeui/KoContextCelp.cpp b/lib/kofficeui/KoContextCelp.cpp
index ae28b61ef..830dded42 100644
--- a/lib/kofficeui/KoContextCelp.cpp
+++ b/lib/kofficeui/KoContextCelp.cpp
@@ -19,12 +19,12 @@
#include "KoContextCelp.h"
-#include <qpainter.h>
-#include <qregion.h>
-#include <qfont.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qsimplerichtext.h>
+#include <tqpainter.h>
+#include <tqregion.h>
+#include <tqfont.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqsimplerichtext.h>
#include <kpixmap.h>
#include <klocale.h>
@@ -32,12 +32,12 @@
#include <kiconloader.h>
#include <kcursor.h>
#include <kapplication.h>
-#include <qstring.h>
+#include <tqstring.h>
-KoVerticalLabel::KoVerticalLabel( QWidget* parent, const char* name )
- : QWidget( parent, name, Qt::WRepaintNoErase )
+KoVerticalLabel::KoVerticalLabel( TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name, TQt::WRepaintNoErase )
{
- QFont f( font() );
+ TQFont f( font() );
f.setPointSize( f.pointSize() + 2 );
f.setBold( true );
setFont( f );
@@ -48,24 +48,24 @@ KoVerticalLabel::~KoVerticalLabel()
{
} // KoVerticalLabel::~KoVerticalLabel
-void KoVerticalLabel::setText( const QString& text )
+void KoVerticalLabel::setText( const TQString& text )
{
m_text = text;
- QFontMetrics fm( font() );
+ TQFontMetrics fm( font() );
setMinimumSize( fm.height() + 2, fm.width( m_text ) + 4 );
update();
} // KoVerticalLabel::setText
-void KoVerticalLabel::paintEvent( QPaintEvent* )
+void KoVerticalLabel::paintEvent( TQPaintEvent* )
{
KPixmap pm;
pm.resize( height(), width() );
- QPainter p( &pm );
- p.fillRect( 0, 0, height(), width(), colorGroup().background() );
+ TQPainter p( &pm );
+ p.fillRect( 0, 0, height(), width(), tqcolorGroup().background() );
p.setFont( font() );
p.drawText( 0, 0, height(), width(), AlignCenter, m_text );
p.end();
- QPainter ap( this );
+ TQPainter ap( this );
ap.rotate( 270. );
ap.translate( -height(), 0 );
ap.drawPixmap( 0, 0, pm );
@@ -74,30 +74,30 @@ void KoVerticalLabel::paintEvent( QPaintEvent* )
static unsigned char upbits[] = { 0xc, 0x1e, 0x3f, 0x3f };
static unsigned char downbits[] = { 0x3f, 0x3f, 0x1e, 0xc };
-KoHelpNavButton::KoHelpNavButton( NavDirection d, QWidget* parent )
- : QWidget( parent )
+KoHelpNavButton::KoHelpNavButton( NavDirection d, TQWidget* tqparent )
+ : TQWidget( tqparent )
{
m_pressed = false;
- m_bitmap = QBitmap( 8, 4, ( d == Up ? upbits : downbits ), true );
+ m_bitmap = TQBitmap( 8, 4, ( d == Up ? upbits : downbits ), true );
m_bitmap.setMask( m_bitmap );
setFixedSize( 8, 6 );
setBackgroundMode( PaletteLight );
} // KoHelpNavButton::KoHelpNavButton
-void KoHelpNavButton::paintEvent( QPaintEvent* )
+void KoHelpNavButton::paintEvent( TQPaintEvent* )
{
- QPainter p( this );
+ TQPainter p( this );
if ( isEnabled() )
{
if ( m_pressed )
- p.setPen( colorGroup().highlight() );
+ p.setPen( tqcolorGroup().highlight() );
else
- p.setPen( colorGroup().text() );
+ p.setPen( tqcolorGroup().text() );
p.drawPixmap( 1, 1, m_bitmap );
}
} // KoHelpNavButton::paintEvent
-void KoHelpNavButton::enterEvent( QEvent* )
+void KoHelpNavButton::enterEvent( TQEvent* )
{
if ( isEnabled() )
emit pressed();
@@ -105,7 +105,7 @@ void KoHelpNavButton::enterEvent( QEvent* )
update();
} // KoHelpNavButton::enterEvent
-void KoHelpNavButton::leaveEvent( QEvent* )
+void KoHelpNavButton::leaveEvent( TQEvent* )
{
if ( isEnabled() )
emit released();
@@ -117,39 +117,39 @@ static unsigned char notstickybits[] = { 0x8, 0x1e, 0xc, 0xa, 0x1 };
static unsigned char stickybits[] = { 0xe, 0x11, 0x15, 0x11, 0xe };
static unsigned char closebits[] = { 0x11, 0xa, 0x4, 0xa, 0x11 };
-KoTinyButton::KoTinyButton( Action a, QWidget* parent )
- : QWidget( parent ), m_action( a )
+KoTinyButton::KoTinyButton( Action a, TQWidget* tqparent )
+ : TQWidget( tqparent ), m_action( a )
{
m_pressed = false;
m_toggled = false;
switch ( a )
{
case Sticky:
- m_bitmap = QBitmap( 5, 5, notstickybits, true );
+ m_bitmap = TQBitmap( 5, 5, notstickybits, true );
break;
default:
- m_bitmap = QBitmap( 5, 5, closebits, true );
+ m_bitmap = TQBitmap( 5, 5, closebits, true );
}
m_bitmap.setMask( m_bitmap );
setMinimumSize( 7, 7 );
setBackgroundMode( PaletteBackground );
} // KoTinyButton::KoTinyButton
-void KoTinyButton::paintEvent( QPaintEvent* )
+void KoTinyButton::paintEvent( TQPaintEvent* )
{
- QPainter p( this );
+ TQPainter p( this );
if ( isEnabled() )
{
if ( m_pressed )
- p.setPen( colorGroup().highlight() );
+ p.setPen( tqcolorGroup().highlight() );
else
- p.setPen( colorGroup().text() );
+ p.setPen( tqcolorGroup().text() );
p.drawPixmap( width() / 2 - 2, 1, m_bitmap );
}
} // KoTinyButton::paintEvent
-void KoTinyButton::mousePressEvent( QMouseEvent* )
+void KoTinyButton::mousePressEvent( TQMouseEvent* )
{
if ( isEnabled() )
{
@@ -158,7 +158,7 @@ void KoTinyButton::mousePressEvent( QMouseEvent* )
}
} // KoTinyButton::mousePressEvent
-void KoTinyButton::mouseReleaseEvent( QMouseEvent* )
+void KoTinyButton::mouseReleaseEvent( TQMouseEvent* )
{
if ( isEnabled() && m_pressed )
{
@@ -171,7 +171,7 @@ void KoTinyButton::mouseReleaseEvent( QMouseEvent* )
//switch ( m_action )
//{
// case Sticky:
- m_bitmap = QBitmap( 5, 5, ( m_toggled ? stickybits : notstickybits ), true );
+ m_bitmap = TQBitmap( 5, 5, ( m_toggled ? stickybits : notstickybits ), true );
//}
m_bitmap.setMask( m_bitmap );
}
@@ -179,12 +179,12 @@ void KoTinyButton::mouseReleaseEvent( QMouseEvent* )
}
} // KoTinyButton::mouseReleaseEvent
-KoHelpView::KoHelpView( QWidget* parent )
- : QWidget( parent )
+KoHelpView::KoHelpView( TQWidget* tqparent )
+ : TQWidget( tqparent )
{
currentText = 0L;
setBackgroundMode( PaletteLight );
- parent->installEventFilter( this );
+ tqparent->installEventFilter( this );
setMouseTracking( true );
} // KoHelpView::KoHelpView
@@ -194,16 +194,16 @@ KoHelpView::~KoHelpView()
delete currentText;
} // KoHelpView::~KoHelpView
-void KoHelpView::setText( const QString& text )
+void KoHelpView::setText( const TQString& text )
{
if ( currentText )
delete currentText;
- currentText = new QSimpleRichText( text, font() );
+ currentText = new TQSimpleRichText( text, font() );
currentText->setWidth( width() );
setFixedHeight( currentText->height() );
} // KoHelpView::setText
-void KoHelpView::mousePressEvent( QMouseEvent* e )
+void KoHelpView::mousePressEvent( TQMouseEvent* e )
{
currentAnchor = currentText->anchorAt( e->pos() );
if ( !currentAnchor.isEmpty() )
@@ -212,7 +212,7 @@ void KoHelpView::mousePressEvent( QMouseEvent* e )
e->ignore();
} // KoHelpView::mousePressEvent
-void KoHelpView::mouseReleaseEvent( QMouseEvent* e )
+void KoHelpView::mouseReleaseEvent( TQMouseEvent* e )
{
if ( ( !currentAnchor.isEmpty() ) && ( currentAnchor == currentText->anchorAt( e->pos() ) ) )
{
@@ -224,10 +224,10 @@ void KoHelpView::mouseReleaseEvent( QMouseEvent* e )
else
if (currentAnchor.startsWith("help://")) {
// that's the useful version of a help link
- QString helpapp=currentAnchor.right(currentAnchor.length()-7);
- QString helpanchor;
+ TQString helpapp=currentAnchor.right(currentAnchor.length()-7);
+ TQString helpanchor;
int pos;
- if ((pos=helpapp.find("#"))!=-1) {
+ if ((pos=helpapp.tqfind("#"))!=-1) {
helpanchor=helpapp.right(helpapp.length()-pos-1);
helpapp=helpapp.left(pos);
}
@@ -241,7 +241,7 @@ void KoHelpView::mouseReleaseEvent( QMouseEvent* e )
e->ignore();
} // KoHelpView::mouseReleaseEvent
-void KoHelpView::mouseMoveEvent( QMouseEvent* e )
+void KoHelpView::mouseMoveEvent( TQMouseEvent* e )
{
if ( !currentText->anchorAt( e->pos() ).isEmpty() )
setCursor( KCursor::handCursor() );
@@ -249,11 +249,11 @@ void KoHelpView::mouseMoveEvent( QMouseEvent* e )
setCursor( KCursor::arrowCursor() );
} // KoHelpView::mouseMove
-bool KoHelpView::eventFilter( QObject*, QEvent* e )
+bool KoHelpView::eventFilter( TQObject*, TQEvent* e )
{
- if ( ( currentText ) && ( e->type() == QEvent::Resize ) )
+ if ( ( currentText ) && ( e->type() == TQEvent::Resize ) )
{
- setFixedWidth( ( (QResizeEvent*)e )->size().width() );
+ setFixedWidth( ( (TQResizeEvent*)e )->size().width() );
currentText->setWidth( width() );
setFixedHeight( currentText->height() );
@@ -262,23 +262,23 @@ bool KoHelpView::eventFilter( QObject*, QEvent* e )
return false;
} // KoHelpView::resizeEvent
-void KoHelpView::paintEvent( QPaintEvent* )
+void KoHelpView::paintEvent( TQPaintEvent* )
{
- QPainter p( this );
- currentText->draw( &p, 0, 0, QRect(), colorGroup() );
+ TQPainter p( this );
+ currentText->draw( &p, 0, 0, TQRect(), tqcolorGroup() );
} // KoHelpView::paintEvent
-KoHelpWidget::KoHelpWidget( QString help, QWidget* parent )
- : QWidget( parent )
+KoHelpWidget::KoHelpWidget( TQString help, TQWidget* tqparent )
+ : TQWidget( tqparent )
{
- QGridLayout* layout = new QGridLayout( this, 3, 3 );
- layout->setMargin( 2 );
- layout->addWidget( m_upButton = new KoHelpNavButton( KoHelpNavButton::Up, this ), 0, 1, AlignHCenter );
- layout->addWidget( m_helpViewport = new QWidget( this ), 1, 1 );
- layout->addWidget( m_downButton = new KoHelpNavButton( KoHelpNavButton::Down, this ), 2, 1, AlignHCenter );
- layout->addColSpacing( 0, 5 );
- layout->addColSpacing( 2, 5 );
- layout->setColStretch( 1, 1 );
+ TQGridLayout* tqlayout = new TQGridLayout( this, 3, 3 );
+ tqlayout->setMargin( 2 );
+ tqlayout->addWidget( m_upButton = new KoHelpNavButton( KoHelpNavButton::Up, this ), 0, 1, AlignHCenter );
+ tqlayout->addWidget( m_helpViewport = new TQWidget( this ), 1, 1 );
+ tqlayout->addWidget( m_downButton = new KoHelpNavButton( KoHelpNavButton::Down, this ), 2, 1, AlignHCenter );
+ tqlayout->addColSpacing( 0, 5 );
+ tqlayout->addColSpacing( 2, 5 );
+ tqlayout->setColStretch( 1, 1 );
m_helpView = new KoHelpView( m_helpViewport );
m_helpViewport->setBackgroundMode( PaletteLight );
@@ -286,11 +286,11 @@ KoHelpWidget::KoHelpWidget( QString help, QWidget* parent )
setBackgroundMode( PaletteLight );
- connect( m_upButton, SIGNAL( pressed() ), this, SLOT( startScrollingUp() ) );
- connect( m_downButton, SIGNAL( pressed() ), this, SLOT( startScrollingDown() ) );
- connect( m_upButton, SIGNAL( released() ), this, SLOT( stopScrolling() ) );
- connect( m_downButton, SIGNAL( released() ), this, SLOT( stopScrolling() ) );
- connect( m_helpView, SIGNAL( linkClicked( const QString& ) ), this, SIGNAL( linkClicked( const QString& ) ) );
+ connect( m_upButton, TQT_SIGNAL( pressed() ), this, TQT_SLOT( startScrollingUp() ) );
+ connect( m_downButton, TQT_SIGNAL( pressed() ), this, TQT_SLOT( startScrollingDown() ) );
+ connect( m_upButton, TQT_SIGNAL( released() ), this, TQT_SLOT( stopScrolling() ) );
+ connect( m_downButton, TQT_SIGNAL( released() ), this, TQT_SLOT( stopScrolling() ) );
+ connect( m_helpView, TQT_SIGNAL( linkClicked( const TQString& ) ), this, TQT_SIGNAL( linkClicked( const TQString& ) ) );
} // KoHelpWidget::KoHelpWidget
void KoHelpWidget::updateButtons()
@@ -299,7 +299,7 @@ void KoHelpWidget::updateButtons()
m_downButton->setEnabled( m_helpViewport->height() - m_ypos < m_helpView->height() );
} // KoHelpWidget::updateButtons
-void KoHelpWidget::setText( QString text )
+void KoHelpWidget::setText( TQString text )
{
m_helpView->setText( text );
m_helpView->move( 0, 0 );
@@ -307,7 +307,7 @@ void KoHelpWidget::setText( QString text )
updateButtons();
} // KoHelpWidget::setText
-void KoHelpWidget::resizeEvent( QResizeEvent* )
+void KoHelpWidget::resizeEvent( TQResizeEvent* )
{
updateButtons();
} // KoHelpWidget::resizeEvent
@@ -354,7 +354,7 @@ void KoHelpWidget::scrollDown()
}
} // KoHelpWidget::scrollUp()
-void KoHelpWidget::timerEvent( QTimerEvent* )
+void KoHelpWidget::timerEvent( TQTimerEvent* )
{
if ( m_scrollDown )
scrollDown();
@@ -364,63 +364,63 @@ void KoHelpWidget::timerEvent( QTimerEvent* )
void KoHelpWidget::stopScrolling()
{
- killTimers();
+ TQT_TQOBJECT(this)->killTimers();
} // KoHelpWidget::stopScrolling
-KoContextHelpPopup::KoContextHelpPopup( QWidget* parent )
- : QWidget( parent, "", WType_Dialog | WStyle_Customize | WStyle_NoBorder )
+KoContextHelpPopup::KoContextHelpPopup( TQWidget* tqparent )
+ : TQWidget( tqparent, "", WType_Dialog | WStyle_Customize | WStyle_NoBorder )
{
- QGridLayout* layout = new QGridLayout( this );
- QHBoxLayout* buttonLayout;
- layout->addWidget( m_helpIcon = new QLabel( this ), 0, 0 );
- layout->addWidget( m_helpTitle = new KoVerticalLabel( this ), 1, 0 );
- buttonLayout = new QHBoxLayout( layout );
- //layout->addLayout( buttonLayout, 2, 0 );
- layout->addMultiCellWidget( m_helpViewer = new KoHelpWidget( "", this ), 0, 2, 1, 1 );
+ TQGridLayout* tqlayout = new TQGridLayout( this );
+ TQHBoxLayout* buttonLayout;
+ tqlayout->addWidget( m_helpIcon = new TQLabel( this ), 0, 0 );
+ tqlayout->addWidget( m_helpTitle = new KoVerticalLabel( this ), 1, 0 );
+ buttonLayout = new TQHBoxLayout( tqlayout );
+ //tqlayout->addLayout( buttonLayout, 2, 0 );
+ tqlayout->addMultiCellWidget( m_helpViewer = new KoHelpWidget( "", this ), 0, 2, 1, 1 );
buttonLayout->add( m_close = new KoTinyButton( KoTinyButton::Close, this ) );
buttonLayout->add( m_sticky = new KoTinyButton( KoTinyButton::Sticky, this ) );
- layout->addColSpacing( 2, 2 );
- layout->addRowSpacing( 3, 2 );
- layout->setMargin( 3 );
- layout->setSpacing( 1 );
- layout->setRowStretch( 1, 1 );
+ tqlayout->addColSpacing( 2, 2 );
+ tqlayout->addRowSpacing( 3, 2 );
+ tqlayout->setMargin( 3 );
+ tqlayout->setSpacing( 1 );
+ tqlayout->setRowStretch( 1, 1 );
buttonLayout->setSpacing( 1 );
setMinimumSize( 180, 180 );
m_isSticky = false;
- setFocusPolicy( StrongFocus );
+ setFocusPolicy( TQ_StrongFocus );
- connect( m_close, SIGNAL( clicked() ), this, SIGNAL( wantsToBeClosed() ) );
- connect( m_sticky, SIGNAL( toggled( bool ) ), this, SLOT( setSticky( bool ) ) );
- connect( m_helpViewer, SIGNAL( linkClicked( const QString& ) ), this, SIGNAL( linkClicked( const QString& ) ) );
+ connect( m_close, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( wantsToBeClosed() ) );
+ connect( m_sticky, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( setSticky( bool ) ) );
+ connect( m_helpViewer, TQT_SIGNAL( linkClicked( const TQString& ) ), this, TQT_SIGNAL( linkClicked( const TQString& ) ) );
} // KoContextHelpPopup::KoContextHelpPopup
KoContextHelpPopup::~KoContextHelpPopup()
{
} // KoContextHelpPopup::~KoContextHelpPopup
-void KoContextHelpPopup::setContextHelp( const QString& title, const QString& text, const QPixmap* icon )
+void KoContextHelpPopup::setContextHelp( const TQString& title, const TQString& text, const TQPixmap* icon )
{
m_helpIcon->setPixmap( icon ? *icon : BarIcon( "help" ) );
m_helpTitle->setText( title );
m_helpViewer->setText( text );
} // KoContextHelpPopup::updateHelp
-void KoContextHelpPopup::mousePressEvent( QMouseEvent* e )
+void KoContextHelpPopup::mousePressEvent( TQMouseEvent* e )
{
m_mousePos = e->globalPos() - pos();
} // KoContextHelpPopup::mousePressEvent
-void KoContextHelpPopup::mouseMoveEvent( QMouseEvent* e )
+void KoContextHelpPopup::mouseMoveEvent( TQMouseEvent* e )
{
move( e->globalPos() - m_mousePos );
} // KoContextHelpPopup::mouseMoveEvent
-void KoContextHelpPopup::resizeEvent( QResizeEvent* )
+void KoContextHelpPopup::resizeEvent( TQResizeEvent* )
{
- QBitmap mask( width(), height() );
- QPointArray a;
- QPainter p( &mask );
+ TQBitmap tqmask( width(), height() );
+ TQPointArray a;
+ TQPainter p( &tqmask );
p.fillRect( 0, 0, width(), height(), color1 );
p.setPen( color0 );
p.setBrush( color0 );
@@ -439,18 +439,18 @@ void KoContextHelpPopup::resizeEvent( QResizeEvent* )
p.drawPoint( width() - 5, height() - 3 );
p.drawPoint( width() - 3, height() - 5 );
p.setPen( NoPen );
- p.setBrush( QBrush( color0, Dense4Pattern ) );
+ p.setBrush( TQBrush( color0, Dense4Pattern ) );
p.drawRect( 0, height() - 2, width() - 1, height() - 1 );
p.drawRect( width() - 2, 0, width() - 1, height() - 1 );
p.drawRect( width() - 4, height() - 4, width() - 2, height() - 2 );
p.end();
- setMask( QRegion( mask ) );
+ setMask( TQRegion( tqmask ) );
} // KoContextHelpPopup::resizeEvent
-void KoContextHelpPopup::paintEvent( QPaintEvent* )
+void KoContextHelpPopup::paintEvent( TQPaintEvent* )
{
- QPainter p( this );
- p.fillRect( 0, 0, width(), height(), colorGroup().light() );
+ TQPainter p( this );
+ p.fillRect( 0, 0, width(), height(), tqcolorGroup().light() );
p.setPen( black );
p.drawRect( 0, 0, width(), height() );
p.fillRect( width() - 3, 0, width() - 1, height() - 1, black );
@@ -471,7 +471,7 @@ void KoContextHelpPopup::windowActivationChange( bool )
emit wantsToBeClosed();
} // KoContestHelpPopup::windowActivationChange
-void KoContextHelpPopup::keyPressEvent( QKeyEvent* e )
+void KoContextHelpPopup::keyPressEvent( TQKeyEvent* e )
{
switch ( e->key() )
{
@@ -492,7 +492,7 @@ void KoContextHelpPopup::keyPressEvent( QKeyEvent* e )
}
} // KoContextHelpPopup::keyPressEvent
-void KoContextHelpPopup::keyReleaseEvent( QKeyEvent* e )
+void KoContextHelpPopup::keyReleaseEvent( TQKeyEvent* e )
{
switch ( e->key() )
{
@@ -507,13 +507,13 @@ void KoContextHelpPopup::keyReleaseEvent( QKeyEvent* e )
}
} // KoContextHelpPopup::keyPressEvent
-KoContextHelpAction::KoContextHelpAction( KActionCollection* parent, QWidget* /*popupParent*/ )
- : KToggleAction( i18n( "Context Help" ), BarIcon( "help" ), KShortcut( "CTRL+SHIFT+F1" ), 0, 0, parent, "help_context" )
+KoContextHelpAction::KoContextHelpAction( KActionCollection* tqparent, TQWidget* /*popupParent*/ )
+ : KToggleAction( i18n( "Context Help" ), BarIcon( "help" ), KShortcut( "CTRL+SHIFT+F1" ), 0, 0, tqparent, "help_context" )
{
m_popup = new KoContextHelpPopup( 0L );
- connect( m_popup, SIGNAL( wantsToBeClosed() ), this, SLOT( closePopup() ) );
- connect( this, SIGNAL( toggled( bool ) ), m_popup, SLOT( setShown( bool ) ) );
- connect( m_popup, SIGNAL( linkClicked( const QString& ) ), this, SIGNAL( linkClicked( const QString& ) ) );
+ connect( m_popup, TQT_SIGNAL( wantsToBeClosed() ), this, TQT_SLOT( closePopup() ) );
+ connect( this, TQT_SIGNAL( toggled( bool ) ), m_popup, TQT_SLOT( setShown( bool ) ) );
+ connect( m_popup, TQT_SIGNAL( linkClicked( const TQString& ) ), this, TQT_SIGNAL( linkClicked( const TQString& ) ) );
} // KoContextHelpAction::KoContextHelpAction
KoContextHelpAction::~KoContextHelpAction()
@@ -521,7 +521,7 @@ KoContextHelpAction::~KoContextHelpAction()
delete m_popup;
} // KoContextHelpAction::~KoContextHelpAction
-void KoContextHelpAction::updateHelp( const QString& title, const QString& text, const QPixmap* icon )
+void KoContextHelpAction::updateHelp( const TQString& title, const TQString& text, const TQPixmap* icon )
{
m_popup->setContextHelp( title, text, icon );
} // KoContextHelpAction::updateHelp
@@ -533,28 +533,28 @@ void KoContextHelpAction::closePopup()
} // KoContextHelpAction::closePopup
-KoContextHelpWidget::KoContextHelpWidget( QWidget* parent, const char* name )
- : QWidget( parent, name )
+KoContextHelpWidget::KoContextHelpWidget( TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name )
{
setCaption( i18n( "Context Help" ) );
- QGridLayout* layout = new QGridLayout( this );
- layout->addWidget( m_helpIcon = new QLabel( this ), 0, 0 );
- layout->addWidget( m_helpTitle = new KoVerticalLabel( this ), 1, 0 );
- layout->addMultiCellWidget( m_helpViewer = new KoHelpWidget( "", this ), 0, 1, 1, 1 );
- layout->setMargin( 2 );
- layout->setSpacing( 1 );
- layout->setRowStretch( 1, 1 );
+ TQGridLayout* tqlayout = new TQGridLayout( this );
+ tqlayout->addWidget( m_helpIcon = new TQLabel( this ), 0, 0 );
+ tqlayout->addWidget( m_helpTitle = new KoVerticalLabel( this ), 1, 0 );
+ tqlayout->addMultiCellWidget( m_helpViewer = new KoHelpWidget( "", this ), 0, 1, 1, 1 );
+ tqlayout->setMargin( 2 );
+ tqlayout->setSpacing( 1 );
+ tqlayout->setRowStretch( 1, 1 );
this->setMinimumSize( 180, 120 );
this->show();
setContextHelp( i18n( "Context Help" ), i18n( "Here will be shown help according to your actions" ), 0 );
- connect( m_helpViewer, SIGNAL( linkClicked( const QString& ) ), this, SIGNAL( linkClicked( const QString& ) ) );
+ connect( m_helpViewer, TQT_SIGNAL( linkClicked( const TQString& ) ), this, TQT_SIGNAL( linkClicked( const TQString& ) ) );
} // KoContextHelpWidget::KoContextHelpWidget
KoContextHelpWidget::~KoContextHelpWidget()
{
} // KoContextHelpWidget::~KoContextHelpWidget
-void KoContextHelpWidget::setContextHelp( const QString& title, const QString& text, const QPixmap* icon )
+void KoContextHelpWidget::setContextHelp( const TQString& title, const TQString& text, const TQPixmap* icon )
{
m_helpIcon->setPixmap( icon ? *icon : BarIcon( "help" ) );
m_helpTitle->setText( title );
@@ -562,30 +562,30 @@ void KoContextHelpWidget::setContextHelp( const QString& title, const QString& t
} // KoContextHelpWidget::updateHelp
-KoContextHelpDocker::KoContextHelpDocker( QWidget* parent, const char* name )
- : QDockWindow( parent, name )
+KoContextHelpDocker::KoContextHelpDocker( TQWidget* tqparent, const char* name )
+ : TQDockWindow( tqparent, name )
{
setCaption( i18n( "Context Help" ) );
- QWidget* mainWidget = new QWidget( this );
- QGridLayout* layout = new QGridLayout( mainWidget );
- layout->addWidget( m_helpIcon = new QLabel( mainWidget ), 0, 0 );
- layout->addWidget( m_helpTitle = new KoVerticalLabel( mainWidget ), 1, 0 );
- layout->addMultiCellWidget( m_helpViewer = new KoHelpWidget( "", mainWidget ), 0, 1, 1, 1 );
- layout->setMargin( 2 );
- layout->setSpacing( 1 );
- layout->setRowStretch( 1, 1 );
+ TQWidget* mainWidget = new TQWidget( this );
+ TQGridLayout* tqlayout = new TQGridLayout( mainWidget );
+ tqlayout->addWidget( m_helpIcon = new TQLabel( mainWidget ), 0, 0 );
+ tqlayout->addWidget( m_helpTitle = new KoVerticalLabel( mainWidget ), 1, 0 );
+ tqlayout->addMultiCellWidget( m_helpViewer = new KoHelpWidget( "", mainWidget ), 0, 1, 1, 1 );
+ tqlayout->setMargin( 2 );
+ tqlayout->setSpacing( 1 );
+ tqlayout->setRowStretch( 1, 1 );
mainWidget->setMinimumSize( 180, 120 );
mainWidget->show();
setWidget( mainWidget );
setContextHelp( i18n( "Context Help" ), i18n( "Here will be shown help according to your actions" ), 0 );
- connect( m_helpViewer, SIGNAL( linkClicked( const QString& ) ), this, SIGNAL( linkClicked( const QString& ) ) );
+ connect( m_helpViewer, TQT_SIGNAL( linkClicked( const TQString& ) ), this, TQT_SIGNAL( linkClicked( const TQString& ) ) );
} // KoContextHelpDocker::KoContextHelpDocker
KoContextHelpDocker::~KoContextHelpDocker()
{
} // KoContextHelpDocker::~KoContextHelpDocker
-void KoContextHelpDocker::setContextHelp( const QString& title, const QString& text, const QPixmap* icon )
+void KoContextHelpDocker::setContextHelp( const TQString& title, const TQString& text, const TQPixmap* icon )
{
m_helpIcon->setPixmap( icon ? *icon : BarIcon( "help" ) );
m_helpTitle->setText( title );
diff --git a/lib/kofficeui/KoContextCelp.h b/lib/kofficeui/KoContextCelp.h
index 07f80d8f8..36c513664 100644
--- a/lib/kofficeui/KoContextCelp.h
+++ b/lib/kofficeui/KoContextCelp.h
@@ -20,37 +20,39 @@
#ifndef __KOCONTEXTHELPACTION_H__
#define __KOCONTEXTHELPACTION_H__
-#include <qwidget.h>
-#include <qbitmap.h>
-#include <qdockwindow.h>
+#include <tqwidget.h>
+#include <tqbitmap.h>
+#include <tqdockwindow.h>
#include <kaction.h>
#include <koffice_export.h>
-class QPixmap;
-class QLabel;
-class QSimpleRichText;
+class TQPixmap;
+class TQLabel;
+class TQSimpleRichText;
-class KoVerticalLabel : public QWidget
+class KoVerticalLabel : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoVerticalLabel( QWidget* parent = 0, const char* name = 0 );
+ KoVerticalLabel( TQWidget* tqparent = 0, const char* name = 0 );
~KoVerticalLabel();
public slots:
- void setText( const QString& text );
+ void setText( const TQString& text );
protected:
- void paintEvent( QPaintEvent* );
+ void paintEvent( TQPaintEvent* );
private:
- QString m_text;
+ TQString m_text;
}; // KoVerticalLabel
-class KoHelpNavButton : public QWidget
+class KoHelpNavButton : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum NavDirection {
@@ -58,25 +60,26 @@ class KoHelpNavButton : public QWidget
Down
};
- KoHelpNavButton( NavDirection d, QWidget* parent );
+ KoHelpNavButton( NavDirection d, TQWidget* tqparent );
signals:
void pressed();
void released();
protected:
- void paintEvent( QPaintEvent* );
- void enterEvent( QEvent* );
- void leaveEvent( QEvent* );
+ void paintEvent( TQPaintEvent* );
+ void enterEvent( TQEvent* );
+ void leaveEvent( TQEvent* );
private:
- QBitmap m_bitmap;
+ TQBitmap m_bitmap;
bool m_pressed;
}; // KoHelpNavButton
-class KoTinyButton : public QWidget
+class KoTinyButton : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Action {
@@ -84,62 +87,64 @@ class KoTinyButton : public QWidget
Sticky
};
- KoTinyButton( Action a, QWidget* parent );
+ KoTinyButton( Action a, TQWidget* tqparent );
signals:
void clicked();
void toggled( bool );
protected:
- void paintEvent( QPaintEvent* );
- void mousePressEvent( QMouseEvent* );
- void mouseReleaseEvent( QMouseEvent* );
+ void paintEvent( TQPaintEvent* );
+ void mousePressEvent( TQMouseEvent* );
+ void mouseReleaseEvent( TQMouseEvent* );
private:
- QBitmap m_bitmap;
+ TQBitmap m_bitmap;
bool m_pressed;
Action m_action;
bool m_toggled;
}; // KoTinyButton
-class KoHelpView : public QWidget
+class KoHelpView : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoHelpView( QWidget* parent );
+ KoHelpView( TQWidget* tqparent );
~KoHelpView();
- void setText( const QString& text );
- bool eventFilter( QObject* watched, QEvent* e );
+ void setText( const TQString& text );
+ bool eventFilter( TQObject* watched, TQEvent* e );
signals:
- void linkClicked( const QString& link );
+ void linkClicked( const TQString& link );
protected:
- virtual void mousePressEvent( QMouseEvent* e );
- virtual void mouseReleaseEvent( QMouseEvent* e );
- virtual void mouseMoveEvent( QMouseEvent* e );
- virtual void paintEvent( QPaintEvent* e );
+ virtual void mousePressEvent( TQMouseEvent* e );
+ virtual void mouseReleaseEvent( TQMouseEvent* e );
+ virtual void mouseMoveEvent( TQMouseEvent* e );
+ virtual void paintEvent( TQPaintEvent* e );
private:
- QSimpleRichText* currentText;
- QString currentAnchor;
+ TQSimpleRichText* currentText;
+ TQString currentAnchor;
}; // KoHelpView
-class KoHelpWidget : public QWidget
+class KoHelpWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoHelpWidget( QString help, QWidget* parent );
+ KoHelpWidget( TQString help, TQWidget* tqparent );
- void setText( QString text );
- void timerEvent( QTimerEvent* );
+ void setText( TQString text );
+ void timerEvent( TQTimerEvent* );
void updateButtons();
signals:
- void linkClicked( const QString& link );
+ void linkClicked( const TQString& link );
public slots:
void scrollUp();
@@ -149,12 +154,12 @@ class KoHelpWidget : public QWidget
void stopScrolling();
protected:
- void resizeEvent( QResizeEvent* );
+ void resizeEvent( TQResizeEvent* );
private:
int m_ypos;
bool m_scrollDown;
- QWidget* m_helpViewport;
+ TQWidget* m_helpViewport;
KoHelpView* m_helpView;
KoHelpNavButton* m_upButton;
KoHelpNavButton* m_downButton;
@@ -163,42 +168,43 @@ class KoHelpWidget : public QWidget
/**
* KoContextHelpPopup is the popup displayed by ContextHelpAction.
*/
-class KoContextHelpPopup : public QWidget
+class KoContextHelpPopup : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoContextHelpPopup( QWidget* parent = 0 );
+ KoContextHelpPopup( TQWidget* tqparent = 0 );
~KoContextHelpPopup();
public slots:
- void setContextHelp( const QString& title, const QString& text, const QPixmap* icon = 0 );
+ void setContextHelp( const TQString& title, const TQString& text, const TQPixmap* icon = 0 );
void setSticky( bool sticky ) { m_isSticky = sticky; }
protected:
- virtual void mousePressEvent( QMouseEvent* );
- virtual void mouseMoveEvent( QMouseEvent* );
- virtual void resizeEvent( QResizeEvent* );
- virtual void paintEvent( QPaintEvent* );
+ virtual void mousePressEvent( TQMouseEvent* );
+ virtual void mouseMoveEvent( TQMouseEvent* );
+ virtual void resizeEvent( TQResizeEvent* );
+ virtual void paintEvent( TQPaintEvent* );
virtual void windowActivationChange( bool );
- virtual void keyPressEvent ( QKeyEvent* );
- virtual void keyReleaseEvent ( QKeyEvent* );
+ virtual void keyPressEvent ( TQKeyEvent* );
+ virtual void keyReleaseEvent ( TQKeyEvent* );
signals:
void wantsToBeClosed();
/**
* Connect to this signal to receive the href value of the links clicked.
*/
- void linkClicked( const QString& link );
+ void linkClicked( const TQString& link );
private:
KoHelpWidget* m_helpViewer;
KoVerticalLabel* m_helpTitle;
- QLabel* m_helpIcon;
+ TQLabel* m_helpIcon;
KoTinyButton* m_close;
KoTinyButton* m_sticky;
- QPoint m_mousePos;
+ TQPoint m_mousePos;
bool m_isSticky;
}; // KoContextHelpPopup
@@ -211,69 +217,72 @@ class KoContextHelpPopup : public QWidget
class KOFFICEUI_EXPORT KoContextHelpAction : public KToggleAction
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoContextHelpAction( KActionCollection* parentCollection, QWidget* parent = 0 );
+ KoContextHelpAction( KActionCollection* tqparentCollection, TQWidget* tqparent = 0 );
virtual ~KoContextHelpAction();
public slots:
- void updateHelp( const QString& title, const QString& text, const QPixmap* icon = 0 );
+ void updateHelp( const TQString& title, const TQString& text, const TQPixmap* icon = 0 );
void closePopup();
signals:
/**
* Connect to this signal to receive the href value of the links clicked.
*/
- void linkClicked( const QString& link );
+ void linkClicked( const TQString& link );
private:
KoContextHelpPopup* m_popup;
}; // KoContextHelpAction
-class KoContextHelpWidget : public QWidget
+class KoContextHelpWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoContextHelpWidget( QWidget* parent = 0, const char* name = 0 );
+ KoContextHelpWidget( TQWidget* tqparent = 0, const char* name = 0 );
~KoContextHelpWidget();
public slots:
- void setContextHelp( const QString& title, const QString& text, const QPixmap* icon = 0 );
+ void setContextHelp( const TQString& title, const TQString& text, const TQPixmap* icon = 0 );
signals:
/**
* Connect to this signal to receive the href value of the links clicked.
*/
- void linkClicked( const QString& link );
+ void linkClicked( const TQString& link );
private:
KoHelpWidget* m_helpViewer;
KoVerticalLabel* m_helpTitle;
- QLabel* m_helpIcon;
+ TQLabel* m_helpIcon;
}; // KoContextHelpWidget
-class KoContextHelpDocker : public QDockWindow
+class KoContextHelpDocker : public TQDockWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoContextHelpDocker( QWidget* parent = 0, const char* name = 0 );
+ KoContextHelpDocker( TQWidget* tqparent = 0, const char* name = 0 );
~KoContextHelpDocker();
public slots:
- void setContextHelp( const QString& title, const QString& text, const QPixmap* icon = 0 );
+ void setContextHelp( const TQString& title, const TQString& text, const TQPixmap* icon = 0 );
signals:
/**
* Connect to this signal to receive the href value of the links clicked.
*/
- void linkClicked( const QString& link );
+ void linkClicked( const TQString& link );
private:
KoHelpWidget* m_helpViewer;
KoVerticalLabel* m_helpTitle;
- QLabel* m_helpIcon;
+ TQLabel* m_helpIcon;
}; // KoContextHelpDocker
#endif /* __KOCONTEXTHELPACTION_H__ */
diff --git a/lib/kofficeui/KoEditPath.cpp b/lib/kofficeui/KoEditPath.cpp
index 8f7aa19e0..f84431c72 100644
--- a/lib/kofficeui/KoEditPath.cpp
+++ b/lib/kofficeui/KoEditPath.cpp
@@ -19,26 +19,26 @@
#include <kdeversion.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qlistbox.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqlistbox.h>
#include "KoEditPath.h"
#include <keditlistbox.h>
#include <kfiledialog.h>
#include <kurlrequester.h>
-#include <qhbox.h>
+#include <tqhbox.h>
#include <klineedit.h>
-#include <qvbox.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqvbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
-KoEditPathDia::KoEditPathDia( const QString & _path, QWidget *parent, const char *name )
- : KDialogBase( parent, name , true, "", Ok|Cancel, Ok, true )
+KoEditPathDia::KoEditPathDia( const TQString & _path, TQWidget *tqparent, const char *name )
+ : KDialogBase( tqparent, name , true, "", Ok|Cancel, Ok, true )
{
setCaption( i18n("Edit Path") );
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- QGridLayout * grid = new QGridLayout(page, 5, 2, KDialog::marginHint(), KDialog::spacingHint());
+ TQGridLayout * grid = new TQGridLayout(page, 5, 2, KDialog::marginHint(), KDialog::spacingHint());
urlReq = new KURLRequester();
urlReq->fileDialog()->setMode(KFile::Directory | KFile::LocalOnly);
@@ -49,14 +49,14 @@ KoEditPathDia::KoEditPathDia( const QString & _path, QWidget *parent, const char
tmp,page, "list_editor" , false, KEditListBox::Add|KEditListBox::Remove );
grid->addMultiCellWidget(m_listpath, 0, 4, 0, 0);
- m_listpath->listBox()->insertStringList(QStringList::split(QString(";"), _path));
+ m_listpath->listBox()->insertStringList(TQStringList::split(TQString(";"), _path));
setFocus();
resize( 500, 300);
}
-QString KoEditPathDia::newPath()const
+TQString KoEditPathDia::newPath()const
{
- QString tmp;
+ TQString tmp;
for (int i = 0; i <(int)m_listpath->listBox()->count(); i++)
{
if ( i!=0)
@@ -67,27 +67,27 @@ QString KoEditPathDia::newPath()const
}
-KoChangePathDia::KoChangePathDia( const QString & _path, QWidget *parent, const char *name )
- : KDialogBase( parent, name , true, "", Ok|Cancel, Ok, true )
+KoChangePathDia::KoChangePathDia( const TQString & _path, TQWidget *tqparent, const char *name )
+ : KDialogBase( tqparent, name , true, "", Ok|Cancel, Ok, true )
{
setCaption( i18n("Edit Path") );
- QVBox *page =makeVBoxMainWidget();
- new QLabel( i18n("Location:"), page);
+ TQVBox *page =makeVBoxMainWidget();
+ new TQLabel( i18n("Location:"), page);
m_urlReq = new KURLRequester(page);
- m_urlReq->setMinimumWidth( m_urlReq->sizeHint().width() * 3 );
+ m_urlReq->setMinimumWidth( m_urlReq->tqsizeHint().width() * 3 );
m_urlReq->lineEdit()->setText( _path );
m_urlReq->fileDialog()->setMode(KFile::Directory | KFile::LocalOnly);
- m_defaultPath = new QCheckBox( i18n("Default path"), page );
- connect( m_defaultPath, SIGNAL(toggled ( bool )), this, SLOT( slotChangeDefaultValue( bool )));
+ m_defaultPath = new TQCheckBox( i18n("Default path"), page );
+ connect( m_defaultPath, TQT_SIGNAL(toggled ( bool )), this, TQT_SLOT( slotChangeDefaultValue( bool )));
slotChangeDefaultValue( _path.isEmpty() );
m_defaultPath->setChecked( _path.isEmpty() );
}
-QString KoChangePathDia::newPath() const
+TQString KoChangePathDia::newPath() const
{
- return m_defaultPath->isChecked() ? QString::null : m_urlReq->lineEdit()->text();
+ return m_defaultPath->isChecked() ? TQString() : m_urlReq->lineEdit()->text();
}
void KoChangePathDia::slotChangeDefaultValue( bool _b)
diff --git a/lib/kofficeui/KoEditPath.h b/lib/kofficeui/KoEditPath.h
index 6ec99333f..0b56ccadc 100644
--- a/lib/kofficeui/KoEditPath.h
+++ b/lib/kofficeui/KoEditPath.h
@@ -21,18 +21,19 @@
#define __KOEditPathDia__
#include <kdialogbase.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <koffice_export.h>
class KEditListBox;
class KURLRequester;
-class QCheckBox;
+class TQCheckBox;
class KOFFICEUI_EXPORT KoEditPathDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoEditPathDia( const QString & _path, QWidget *parent, const char *name );
- QString newPath()const;
+ KoEditPathDia( const TQString & _path, TQWidget *tqparent, const char *name );
+ TQString newPath()const;
private:
KEditListBox *m_listpath;
@@ -42,14 +43,15 @@ private:
class KOFFICEUI_EXPORT KoChangePathDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoChangePathDia( const QString & _path, QWidget *parent, const char *name );
- QString newPath()const;
+ KoChangePathDia( const TQString & _path, TQWidget *tqparent, const char *name );
+ TQString newPath()const;
private slots:
void slotChangeDefaultValue( bool );
private:
KURLRequester *m_urlReq;
- QCheckBox *m_defaultPath;
+ TQCheckBox *m_defaultPath;
};
#endif
diff --git a/lib/kofficeui/KoGeneralPropertyUi.ui b/lib/kofficeui/KoGeneralPropertyUi.ui
index 41d4bb981..c3191b469 100644
--- a/lib/kofficeui/KoGeneralPropertyUi.ui
+++ b/lib/kofficeui/KoGeneralPropertyUi.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KoGeneralPropertyUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KoGeneralPropertyUI</cstring>
</property>
@@ -19,15 +19,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout13</cstring>
+ <cstring>tqlayout13</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>nameLabel</cstring>
</property>
@@ -38,14 +38,14 @@
<cstring>nameInput</cstring>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>nameInput</cstring>
</property>
</widget>
</hbox>
</widget>
- <widget class="QCheckBox" row="1" column="0">
+ <widget class="TQCheckBox" row="1" column="0">
<property name="name">
<cstring>protect</cstring>
</property>
@@ -53,7 +53,7 @@
<string>Protect si&amp;ze and position</string>
</property>
</widget>
- <widget class="QCheckBox" row="2" column="0">
+ <widget class="TQCheckBox" row="2" column="0">
<property name="name">
<cstring>keepRatio</cstring>
</property>
@@ -61,7 +61,7 @@
<string>Keep &amp;aspect ratio</string>
</property>
</widget>
- <widget class="QGroupBox" row="3" column="0">
+ <widget class="TQGroupBox" row="3" column="0">
<property name="name">
<cstring>positionGroup</cstring>
</property>
@@ -81,7 +81,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>widthLabel</cstring>
</property>
@@ -92,7 +92,7 @@
<cstring>widthInput</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="2">
+ <widget class="TQLabel" row="1" column="2">
<property name="name">
<cstring>heightLabel</cstring>
</property>
@@ -103,7 +103,7 @@
<cstring>heightInput</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="2">
+ <widget class="TQLabel" row="0" column="2">
<property name="name">
<cstring>topLabel</cstring>
</property>
@@ -114,7 +114,7 @@
<cstring>yInput</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>leftLabel</cstring>
</property>
@@ -157,7 +157,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>21</height>
@@ -189,5 +189,5 @@
<data format="PNG" length="1008">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b749444154388db59541681d551486bf49aef55c4965061b98815a5e20a5790b912c0d66d12c0381361004219bae0a45041111a92d28086a4110eaa68a8bd8b8a97121348b96b810cca6988281111a9c27446720afcc8516efa94e3b2e665e6244832e3c70b8cce5f2cf77cffc734e50d735830882600818060c3004046d1e14759b8f800a7858d7f5a360207cfe8df34f7627ba679d7367f27e7ea27425168bc71fb896ae24bd936eaddf5a5fa6e213e02ef0c00c48af5dbd76364a7837390e9d4a5b98128c0025d608e0f7f6d97b4eefc8389f8617d66f3a0b7c0894a63d395cf48b33d1d390f5bf40ef65f84ab116fcefe00a212f1441b04760ec38882854a0801c866854015e00aeee1203a6ec97273c0ebd57e02b873d1c926dc0daaab271ab400c68a5880989c785d98588a9698fd0ec872302e83120fa33f150ee7226517c95636dc8b73794e52b0e2a08432119174420ef29bd2de5a3b7338ac598f9451069c4dbb0c0a18170608d05147b58c83660a5159d3d1573720e92c482f1a846acad7a56ae3856967ac4719799d316314a53188681606820ec2b0f08dec3f5af1c5a29b3a762e6cf4094286a72dc8ee5fa9725b30b112fbe148211969772b4bfcf7e01100c88b1c682297145447a3b230c1b5291e68aee7ec2e5f74bb24d47b903e75e4b58bfe1c87e50d2d423b2dfdc03627ce5b146c88b120c241d884641519c8bb8fc564ebae99050989a8e60a4a43b19a295926f8356ff20dcd41804814a0947da8fb29370f99d926cb3b157382224472112c08018412b90bf20ef2306b047001392f61455cbda4ddf908e08f1d1905eafe0d2c59c742322cf14ad94b18e853d5734fedd4f5cd23d0e9d8e50f494b555cffc6244b9a34c9d8c4862b874117a5b05e75fced1fb8e380ee94e425e1c50631010657641d04a59b9e2585b2d39f74ac2e4b4a733e979f5cd84380e71fd022a989a0b199bd8e7e3bf23f6500953d3506cc7ac2cf558fe00d66f38bacf846020cf4a5c5f9bdaa2a4df28e96d4b2842ebe37dc275d92fdb7f5f11607e5188e32e2b9fe7a49b4a7abbd79cae203c1232733ae4bbaf95fcbe43ab88a2bf2b5a03f5ae707a27dd4a331997a821110333739ea9e98434f5e4db8d68d2b17427616c02d2390b5502a624fb1e805f8087401dd4754d100416c3ebcf3d2f17a2a4b194aa3270bdb4af17d37633da9b19c139483794bc505cc155e063e047da46ff18700c780ff889bda9f06ff367e033e034f02c303a201ea2e94a11f054bb5ada86c2c151b7d7f73413e02e50ee8ea620080cf038f0442b7a88ff36f37e6bc57f051e04ffd730fd03ef8bd61b5b2ca6900000000049454e44ae426082</data>
</image>
</images>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/lib/kofficeui/KoGuideLineDia.cpp b/lib/kofficeui/KoGuideLineDia.cpp
index db58ed284..d3fb50b18 100644
--- a/lib/kofficeui/KoGuideLineDia.cpp
+++ b/lib/kofficeui/KoGuideLineDia.cpp
@@ -21,34 +21,34 @@
#include "KoGuideLineDia.h"
-#include <qbuttongroup.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
#include <klocale.h>
#include <KoUnitWidgets.h>
-KoGuideLineDia::KoGuideLineDia( QWidget *parent, double pos, double minPos, double maxPos,
+KoGuideLineDia::KoGuideLineDia( TQWidget *tqparent, double pos, double minPos, double maxPos,
KoUnit::Unit unit, const char *name )
-: KDialogBase( parent, name , true, "", Ok | Cancel, Ok, true )
+: KDialogBase( tqparent, name , true, "", Ok | Cancel, Ok, true )
, m_hButton( 0 )
, m_vButton( 0 )
{
setCaption( i18n("Set Guide Line Position") );
- QHBox *page = makeHBoxMainWidget();
- new QLabel( i18n( "Position:" ), page );
- m_position= new KoUnitDoubleSpinBox( page, QMAX( 0.00, minPos ), QMAX( 0.00, maxPos ), 1, QMAX( 0.00, pos ), unit );
+ TQHBox *page = makeHBoxMainWidget();
+ new TQLabel( i18n( "Position:" ), page );
+ m_position= new KoUnitDoubleSpinBox( page, TQMAX( 0.00, minPos ), TQMAX( 0.00, maxPos ), 1, TQMAX( 0.00, pos ), unit );
m_position->setFocus();
}
-KoGuideLineDia::KoGuideLineDia( QWidget *parent, KoPoint &pos, KoRect &rect,
+KoGuideLineDia::KoGuideLineDia( TQWidget *tqparent, KoPoint &pos, KoRect &rect,
KoUnit::Unit unit, const char *name )
-: KDialogBase( parent, name , true, "", Ok | Cancel, Ok, true )
+: KDialogBase( tqparent, name , true, "", Ok | Cancel, Ok, true )
, m_rect( rect )
, m_pos( pos )
, m_positionChanged( false )
@@ -56,25 +56,25 @@ KoGuideLineDia::KoGuideLineDia( QWidget *parent, KoPoint &pos, KoRect &rect,
, m_vButton( 0 )
{
setCaption( i18n("Add Guide Line") );
- QVBox * vbox = makeVBoxMainWidget();
+ TQVBox * vbox = makeVBoxMainWidget();
- QButtonGroup *group = new QButtonGroup( 1, QGroupBox::Horizontal, i18n( "Orientation" ), vbox );
+ TQButtonGroup *group = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Qt::Orientation" ), vbox );
group->setRadioButtonExclusive( true );
- //group->layout();
- m_hButton = new QRadioButton( i18n( "Horizontal" ), group );
- m_vButton = new QRadioButton( i18n( "Vertical" ), group );
+ //group->tqlayout();
+ m_hButton = new TQRadioButton( i18n( "Horizontal" ), group );
+ m_vButton = new TQRadioButton( i18n( "Vertical" ), group );
- connect( group, SIGNAL( clicked( int ) ), this, SLOT( slotOrientationChanged() ) );
+ connect( group, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotOrientationChanged() ) );
m_vButton->setChecked( true );;
- QHBox *hbox = new QHBox( vbox );
- QLabel *label = new QLabel( i18n( "&Position:" ), hbox );
- m_position= new KoUnitDoubleSpinBox( hbox, QMAX( 0.0, m_rect.left() ), QMAX( 0.0, m_rect.right() ), 1, QMAX( 0.0, pos.x() ), unit );
+ TQHBox *hbox = new TQHBox( vbox );
+ TQLabel *label = new TQLabel( i18n( "&Position:" ), hbox );
+ m_position= new KoUnitDoubleSpinBox( hbox, TQMAX( 0.0, m_rect.left() ), TQMAX( 0.0, m_rect.right() ), 1, TQMAX( 0.0, pos.x() ), unit );
m_position->setFocus();
label->setBuddy( m_position );
- connect( m_position, SIGNAL( valueChanged( double ) ), this, SLOT( slotPositionChanged() ) );
+ connect( m_position, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( slotPositionChanged() ) );
}
@@ -101,24 +101,24 @@ void KoGuideLineDia::slotOrientationChanged()
{
if ( m_hButton->isChecked() )
{
- m_position->setMinValue( QMAX( 0.0, m_rect.top() ) );
- m_position->setMaxValue( QMAX( 0.0, m_rect.bottom() ) );
+ m_position->setMinValue( TQMAX( 0.0, m_rect.top() ) );
+ m_position->setMaxValue( TQMAX( 0.0, m_rect.bottom() ) );
if ( ! m_positionChanged )
{
- disconnect( m_position, SIGNAL( valueChanged( double ) ), this, SLOT( slotPositionChanged() ) );
+ disconnect( m_position, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( slotPositionChanged() ) );
m_position->changeValue( m_pos.y() );
- connect( m_position, SIGNAL( valueChanged( double ) ), this, SLOT( slotPositionChanged() ) );
+ connect( m_position, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( slotPositionChanged() ) );
}
}
else if ( m_vButton->isChecked() )
{
- m_position->setMinValue( QMAX( 0.0, m_rect.left() ) );
- m_position->setMaxValue( QMAX( 0.0, m_rect.right() ) );
+ m_position->setMinValue( TQMAX( 0.0, m_rect.left() ) );
+ m_position->setMaxValue( TQMAX( 0.0, m_rect.right() ) );
if ( ! m_positionChanged )
{
- disconnect( m_position, SIGNAL( valueChanged( double ) ), this, SLOT( slotPositionChanged() ) );
+ disconnect( m_position, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( slotPositionChanged() ) );
m_position->changeValue( m_pos.x() );
- connect( m_position, SIGNAL( valueChanged( double ) ), this, SLOT( slotPositionChanged() ) );
+ connect( m_position, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( slotPositionChanged() ) );
}
}
}
diff --git a/lib/kofficeui/KoGuideLineDia.h b/lib/kofficeui/KoGuideLineDia.h
index 8545f35dc..7dc9e0f8f 100644
--- a/lib/kofficeui/KoGuideLineDia.h
+++ b/lib/kofficeui/KoGuideLineDia.h
@@ -29,7 +29,7 @@
class KoUnitDoubleSpinBox;
-class QRadioButton;
+class TQRadioButton;
/**
* @brief Class for setting a guide line position.
@@ -37,18 +37,19 @@ class QRadioButton;
class KoGuideLineDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* @brief Constructor
*
- * @param parent The parent widget
+ * @param tqparent The tqparent widget
* @param pos the actual position of the guide line
* @param minPos the minimal position of the guide line
* @param maxPos the maximal position of the guide line
* @param unit The unit used in the document
- * @param name The name is send to the QObject constructor
+ * @param name The name is send to the TQObject constructor
*/
- KoGuideLineDia( QWidget *parent, double pos, double minPos, double maxPos,
+ KoGuideLineDia( TQWidget *tqparent, double pos, double minPos, double maxPos,
KoUnit::Unit unit, const char *name = 0L );
/**
@@ -58,13 +59,13 @@ public:
* and the orientation of the guide line is changed the value will be set to pos.x()
* or pos.y() according to the orientation.
*
- * @param parent the parent widget
+ * @param tqparent the tqparent widget
* @param pos the actual position of cursor
* @param rect the rect in where the guide can be placed
* @param unit the unit used in the document
- * @param name the name is send to the QObject constructor
+ * @param name the name is send to the TQObject constructor
*/
- KoGuideLineDia( QWidget *parent, KoPoint &pos, KoRect &rect,
+ KoGuideLineDia( TQWidget *tqparent, KoPoint &pos, KoRect &rect,
KoUnit::Unit unit, const char *name = 0L );
/**
* @brief the position
@@ -88,8 +89,8 @@ protected:
KoRect m_rect;
KoPoint m_pos;
bool m_positionChanged;
- QRadioButton * m_hButton;
- QRadioButton * m_vButton;
+ TQRadioButton * m_hButton;
+ TQRadioButton * m_vButton;
KoUnitDoubleSpinBox* m_position;
};
diff --git a/lib/kofficeui/KoGuides.cpp b/lib/kofficeui/KoGuides.cpp
index f6d375f6a..5694889c2 100644
--- a/lib/kofficeui/KoGuides.cpp
+++ b/lib/kofficeui/KoGuides.cpp
@@ -21,9 +21,9 @@
#include "KoGuides.h"
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include <klocale.h>
#include <kpopupmenu.h>
@@ -42,9 +42,9 @@ public:
Popup( KoGuides * guides )
{
m_title = insertTitle( i18n( "Guide Line" ) );
- m_delete = insertItem( i18n( "&Delete" ), guides, SLOT( slotRemove() ) );
+ m_delete = insertItem( i18n( "&Delete" ), guides, TQT_SLOT( slotRemove() ) );
m_seperator = insertSeparator();
- m_pos = insertItem( i18n( "&Set Position..." ), guides, SLOT( slotChangePosition() ) );
+ m_pos = insertItem( i18n( "&Set Position..." ), guides, TQT_SLOT( slotChangePosition() ) );
}
void update( int count )
@@ -69,10 +69,10 @@ private:
int m_pos;
};
-const KoGuides::SnapStatus KoGuides::SNAP_NONE = 0;
-const KoGuides::SnapStatus KoGuides::SNAP_HORIZ = 1;
-const KoGuides::SnapStatus KoGuides::SNAP_VERT = 2;
-const KoGuides::SnapStatus KoGuides::SNAP_BOTH = 3;
+const KoGuides::SnaptqStatus KoGuides::SNAP_NONE = 0;
+const KoGuides::SnaptqStatus KoGuides::SNAP_HORIZ = 1;
+const KoGuides::SnaptqStatus KoGuides::SNAP_VERT = 2;
+const KoGuides::SnaptqStatus KoGuides::SNAP_BOTH = 3;
KoGuides::KoGuides( KoView *view, KoZoomHandler *zoomHandler )
: m_view( view )
@@ -89,26 +89,26 @@ KoGuides::~KoGuides()
}
-void KoGuides::paintGuides( QPainter &painter )
+void KoGuides::paintGuides( TQPainter &painter )
{
//painter.setRasterOp( NotROP );
const KoPageLayout& pl = m_view->koDocument()->pageLayout();
- int width = QMAX( m_view->canvas()->width(), m_zoomHandler->zoomItX( pl.ptWidth ) );
- int height = QMAX( m_view->canvas()->height(), m_zoomHandler->zoomItY( pl.ptHeight ) );
+ int width = TQMAX( m_view->canvas()->width(), m_zoomHandler->zoomItX( pl.ptWidth ) );
+ int height = TQMAX( m_view->canvas()->height(), m_zoomHandler->zoomItY( pl.ptHeight ) );
for ( int i = 0; i < GL_END; ++i )
{
- QValueList<KoGuideLine *>::iterator it = m_guideLines[i].begin();
+ TQValueList<KoGuideLine *>::iterator it = m_guideLines[i].begin();
for ( ; it != m_guideLines[i].end(); ++it )
{
if ( !( *it )->automatic || ( *it )->snapping ) // dont paint autoStyle guides when they are not snapping
{
if ( ( *it )->snapping )
- painter.setPen( QPen( green, 0, DotLine ) );
+ painter.setPen( TQPen( green, 0, DotLine ) );
else if ( ( *it )->selected )
- painter.setPen( QPen( red, 0, DotLine ) );
+ painter.setPen( TQPen( red, 0, DotLine ) );
else
- painter.setPen( QPen( blue, 0, DotLine ) );
+ painter.setPen( TQPen( blue, 0, DotLine ) );
painter.save();
if ( ( *it )->orientation == Qt::Vertical )
@@ -127,14 +127,14 @@ void KoGuides::paintGuides( QPainter &painter )
}
}
-bool KoGuides::mousePressEvent( QMouseEvent *e )
+bool KoGuides::mousePressEvent( TQMouseEvent *e )
{
bool eventProcessed = true;
bool changed = false;
m_mouseSelected = false;
KoPoint p( mapFromScreen( e->pos() ) );
- KoGuideLine * guideLine = find( p, m_zoomHandler->unzoomItY( 2 ) );
+ KoGuideLine * guideLine = tqfind( p, m_zoomHandler->unzoomItY( 2 ) );
if ( guideLine )
{
m_lastPoint = e->pos();
@@ -144,7 +144,7 @@ bool KoGuides::mousePressEvent( QMouseEvent *e )
{
m_mouseSelected = true;
}
- if ( e->state() & Qt::ControlButton )
+ if ( e->state() & TQt::ControlButton )
{
if ( guideLine->selected )
{
@@ -167,7 +167,7 @@ bool KoGuides::mousePressEvent( QMouseEvent *e )
}
else
{
- if ( !( e->state() & Qt::ControlButton ) )
+ if ( !( e->state() & TQt::ControlButton ) )
{
changed = unselectAll();
}
@@ -192,7 +192,7 @@ bool KoGuides::mousePressEvent( QMouseEvent *e )
if ( e->button() == Qt::RightButton && hasSelected() )
{
m_popup->update( m_guideLines[GL_SELECTED].count() );
- m_popup->exec( QCursor::pos() );
+ m_popup->exec( TQCursor::pos() );
emit moveGuides( false );
}
@@ -200,12 +200,12 @@ bool KoGuides::mousePressEvent( QMouseEvent *e )
}
-bool KoGuides::mouseMoveEvent( QMouseEvent *e )
+bool KoGuides::mouseMoveEvent( TQMouseEvent *e )
{
bool eventProcessed = false;
if ( m_mouseSelected )
{
- QPoint p( e->pos() );
+ TQPoint p( e->pos() );
p -= m_lastPoint;
m_lastPoint = e->pos();
moveSelectedBy( p );
@@ -216,10 +216,10 @@ bool KoGuides::mouseMoveEvent( QMouseEvent *e )
else if ( e->state() == Qt::NoButton )
{
KoPoint p( mapFromScreen( e->pos() ) );
- KoGuideLine * guideLine = find( p, m_zoomHandler->unzoomItY( 2 ) );
+ KoGuideLine * guideLine = tqfind( p, m_zoomHandler->unzoomItY( 2 ) );
if ( guideLine )
{
- m_view->canvas()->setCursor( guideLine->orientation == Qt::Vertical ? Qt::sizeHorCursor : Qt::sizeVerCursor );
+ m_view->canvas()->setCursor( guideLine->orientation == Qt::Vertical ? TQt::sizeHorCursor : TQt::sizeVerCursor );
eventProcessed = true;
}
}
@@ -227,7 +227,7 @@ bool KoGuides::mouseMoveEvent( QMouseEvent *e )
}
-bool KoGuides::mouseReleaseEvent( QMouseEvent *e )
+bool KoGuides::mouseReleaseEvent( TQMouseEvent *e )
{
bool eventProcessed = false;
if ( m_mouseSelected )
@@ -236,8 +236,8 @@ bool KoGuides::mouseReleaseEvent( QMouseEvent *e )
if ( m_guideLines[GL_SELECTED].count() == 1 )
{
int x1, y1, x2, y2;
- m_view->canvas()->rect().coords( &x1, &y1, &x2, &y2 );
- QPoint gp( m_view->canvas()->mapFromGlobal( e->globalPos() ) );
+ TQT_TQRECT_OBJECT(m_view->canvas()->rect()).coords( &x1, &y1, &x2, &y2 );
+ TQPoint gp( m_view->canvas()->mapFromGlobal( e->globalPos() ) );
if ( m_guideLines[GL_SELECTED].first()->orientation == Qt::Vertical )
{
if ( gp.x() < x1 || gp.x() > x2 )
@@ -249,10 +249,10 @@ bool KoGuides::mouseReleaseEvent( QMouseEvent *e )
removeSelected();
}
}
- KoGuideLine * guideLine = find( p, m_zoomHandler->unzoomItY( 2 ) );
+ KoGuideLine * guideLine = tqfind( p, m_zoomHandler->unzoomItY( 2 ) );
if ( guideLine )
{
- m_view->canvas()->setCursor( guideLine->orientation == Qt::Vertical ? Qt::sizeHorCursor : Qt::sizeVerCursor );
+ m_view->canvas()->setCursor( guideLine->orientation == Qt::Vertical ? TQt::sizeHorCursor : TQt::sizeVerCursor );
}
m_mouseSelected = false;
eventProcessed = true;
@@ -263,12 +263,12 @@ bool KoGuides::mouseReleaseEvent( QMouseEvent *e )
}
-bool KoGuides::keyPressEvent( QKeyEvent *e )
+bool KoGuides::keyPressEvent( TQKeyEvent *e )
{
bool eventProcessed = false;
switch( e->key() )
{
- case Qt::Key_Delete:
+ case TQt::Key_Delete:
if ( hasSelected() )
{
removeSelected();
@@ -283,18 +283,18 @@ bool KoGuides::keyPressEvent( QKeyEvent *e )
return eventProcessed;
}
-void KoGuides::setGuideLines( const QValueList<double> &horizontalPos, const QValueList<double> &verticalPos )
+void KoGuides::setGuideLines( const TQValueList<double> &horizontalPos, const TQValueList<double> &verticalPos )
{
removeSelected();
- QValueList<KoGuideLine *>::iterator it = m_guideLines[GL].begin();
+ TQValueList<KoGuideLine *>::iterator it = m_guideLines[GL].begin();
for ( ; it != m_guideLines[GL].end(); ++it )
{
delete ( *it );
}
m_guideLines[GL].clear();
- QValueList<double>::ConstIterator posIt = horizontalPos.begin();
+ TQValueList<double>::ConstIterator posIt = horizontalPos.begin();
for ( ; posIt != horizontalPos.end(); ++posIt )
{
KoGuideLine *guideLine = new KoGuideLine( Qt::Horizontal, *posIt, false );
@@ -309,16 +309,16 @@ void KoGuides::setGuideLines( const QValueList<double> &horizontalPos, const QVa
paint();
}
-void KoGuides::setAutoGuideLines( const QValueList<double> &horizontalPos, const QValueList<double> &verticalPos )
+void KoGuides::setAutoGuideLines( const TQValueList<double> &horizontalPos, const TQValueList<double> &verticalPos )
{
- QValueList<KoGuideLine *>::iterator it = m_guideLines[GL_AUTOMATIC].begin();
+ TQValueList<KoGuideLine *>::iterator it = m_guideLines[GL_AUTOMATIC].begin();
for ( ; it != m_guideLines[GL_AUTOMATIC].end(); ++it )
{
delete ( *it );
}
m_guideLines[GL_AUTOMATIC].clear();
- QValueList<double>::ConstIterator posIt = horizontalPos.begin();
+ TQValueList<double>::ConstIterator posIt = horizontalPos.begin();
for ( ; posIt != horizontalPos.end(); ++posIt )
{
KoGuideLine *guideLine = new KoGuideLine( Qt::Horizontal, *posIt, true );
@@ -333,12 +333,12 @@ void KoGuides::setAutoGuideLines( const QValueList<double> &horizontalPos, const
}
-void KoGuides::getGuideLines( QValueList<double> &horizontalPos, QValueList<double> &verticalPos ) const
+void KoGuides::getGuideLines( TQValueList<double> &horizontalPos, TQValueList<double> &verticalPos ) const
{
horizontalPos.clear();
verticalPos.clear();
- QValueList<KoGuideLine *>::const_iterator it = m_guideLines[GL].begin();
+ TQValueList<KoGuideLine *>::const_iterator it = m_guideLines[GL].begin();
for ( ; it != m_guideLines[GL].end(); ++it )
{
if ( ( *it )->orientation == Qt::Horizontal )
@@ -365,123 +365,123 @@ void KoGuides::getGuideLines( QValueList<double> &horizontalPos, QValueList<doub
}
-void KoGuides::snapToGuideLines( KoRect &rect, int snap, SnapStatus &snapStatus, KoPoint &diff )
+void KoGuides::snapToGuideLines( KoRect &rect, int snap, SnaptqStatus &snaptqStatus, KoPoint &diff )
{
- if( !(snapStatus & SNAP_VERT))
+ if( !(snaptqStatus & SNAP_VERT))
diff.setX(10000);
- if( !(snapStatus & SNAP_HORIZ))
+ if( !(snaptqStatus & SNAP_HORIZ))
diff.setY(10000);
for ( int i = 0; i < GL_END; ++i )
{
- QValueList<KoGuideLine *>::const_iterator it = m_guideLines[i].begin();
+ TQValueList<KoGuideLine *>::const_iterator it = m_guideLines[i].begin();
for ( ; it != m_guideLines[i].end(); ++it )
{
if ( ( *it )->orientation == Qt::Horizontal )
{
double tmp = (*it)->position - rect.top();
- if ( snapStatus & SNAP_HORIZ || QABS( tmp ) < m_zoomHandler->unzoomItY( snap ) )
+ if ( snaptqStatus & SNAP_HORIZ || TQABS( tmp ) < m_zoomHandler->unzoomItY( snap ) )
{
- if(QABS( tmp ) < QABS(diff.y()))
+ if(TQABS( tmp ) < TQABS(diff.y()))
{
diff.setY( tmp );
- snapStatus |= SNAP_HORIZ;
+ snaptqStatus |= SNAP_HORIZ;
}
}
tmp = (*it)->position - rect.bottom();
- if ( snapStatus & SNAP_HORIZ || QABS( tmp ) < m_zoomHandler->unzoomItY( snap ) )
+ if ( snaptqStatus & SNAP_HORIZ || TQABS( tmp ) < m_zoomHandler->unzoomItY( snap ) )
{
- if(QABS( tmp ) < QABS(diff.y()))
+ if(TQABS( tmp ) < TQABS(diff.y()))
{
diff.setY( tmp );
- snapStatus |= SNAP_HORIZ;
+ snaptqStatus |= SNAP_HORIZ;
}
}
}
else
{
double tmp = (*it)->position - rect.left();
- if ( snapStatus & SNAP_VERT || QABS( tmp ) < m_zoomHandler->unzoomItX( snap ) )
+ if ( snaptqStatus & SNAP_VERT || TQABS( tmp ) < m_zoomHandler->unzoomItX( snap ) )
{
- if(QABS( tmp ) < QABS(diff.x()))
+ if(TQABS( tmp ) < TQABS(diff.x()))
{
diff.setX( tmp );
- snapStatus |= SNAP_VERT;
+ snaptqStatus |= SNAP_VERT;
}
}
tmp = (*it)->position - rect.right();
- if ( snapStatus & SNAP_VERT || QABS( tmp ) < m_zoomHandler->unzoomItX( snap ) )
+ if ( snaptqStatus & SNAP_VERT || TQABS( tmp ) < m_zoomHandler->unzoomItX( snap ) )
{
- if(QABS( tmp ) < QABS(diff.x()))
+ if(TQABS( tmp ) < TQABS(diff.x()))
{
diff.setX( tmp );
- snapStatus |= SNAP_VERT;
+ snaptqStatus |= SNAP_VERT;
}
}
}
}
}
- if(!(snapStatus & SNAP_VERT))
+ if(!(snaptqStatus & SNAP_VERT))
diff.setX( 0 );
- if(!(snapStatus & SNAP_HORIZ))
+ if(!(snaptqStatus & SNAP_HORIZ))
diff.setY( 0 );
}
-void KoGuides::snapToGuideLines( KoPoint &pos, int snap, SnapStatus &snapStatus, KoPoint &diff )
+void KoGuides::snapToGuideLines( KoPoint &pos, int snap, SnaptqStatus &snaptqStatus, KoPoint &diff )
{
- if( !(snapStatus & SNAP_VERT))
+ if( !(snaptqStatus & SNAP_VERT))
diff.setX(10000);
- if( !(snapStatus & SNAP_HORIZ))
+ if( !(snaptqStatus & SNAP_HORIZ))
diff.setY(10000);
for ( int i = 0; i < GL_END; ++i )
{
- QValueList<KoGuideLine *>::const_iterator it = m_guideLines[i].begin();
+ TQValueList<KoGuideLine *>::const_iterator it = m_guideLines[i].begin();
for ( ; it != m_guideLines[i].end(); ++it )
{
if ( ( *it )->orientation == Qt::Horizontal )
{
double tmp = (*it)->position - pos.y();
- if ( snapStatus & SNAP_HORIZ || QABS( tmp ) < m_zoomHandler->unzoomItY( snap ) )
+ if ( snaptqStatus & SNAP_HORIZ || TQABS( tmp ) < m_zoomHandler->unzoomItY( snap ) )
{
- if(QABS( tmp ) < QABS(diff.y()))
+ if(TQABS( tmp ) < TQABS(diff.y()))
{
diff.setY( tmp );
- snapStatus |= SNAP_HORIZ;
+ snaptqStatus |= SNAP_HORIZ;
}
}
}
else
{
double tmp = (*it)->position - pos.x();
- if ( snapStatus & SNAP_VERT || QABS( tmp ) < m_zoomHandler->unzoomItX( snap ) )
+ if ( snaptqStatus & SNAP_VERT || TQABS( tmp ) < m_zoomHandler->unzoomItX( snap ) )
{
- if(QABS( tmp ) < QABS(diff.x()))
+ if(TQABS( tmp ) < TQABS(diff.x()))
{
diff.setX( tmp );
- snapStatus |= SNAP_VERT;
+ snaptqStatus |= SNAP_VERT;
}
}
}
}
}
- if(!(snapStatus & SNAP_VERT))
+ if(!(snaptqStatus & SNAP_VERT))
diff.setX( 0 );
- if(!(snapStatus & SNAP_HORIZ))
+ if(!(snaptqStatus & SNAP_HORIZ))
diff.setY( 0 );
}
-void KoGuides::repaintSnapping( const KoRect &snappedRect )
+void KoGuides::tqrepaintSnapping( const KoRect &snappedRect )
{
bool needRepaint = false;
for ( int i = 0; i < GL_END; ++i )
{
- QValueList<KoGuideLine *>::const_iterator it = m_guideLines[i].begin();
+ TQValueList<KoGuideLine *>::const_iterator it = m_guideLines[i].begin();
for ( ; it != m_guideLines[i].end(); ++it )
{
if ( ( *it )->orientation == Qt::Horizontal )
@@ -530,15 +530,15 @@ void KoGuides::repaintSnapping( const KoRect &snappedRect )
}
-void KoGuides::repaintSnapping( const KoPoint &snappedPoint, SnapStatus snapStatus )
+void KoGuides::tqrepaintSnapping( const KoPoint &snappedPoint, SnaptqStatus snaptqStatus )
{
bool needRepaint = false;
for ( int i = 0; i < GL_END; ++i )
{
- QValueList<KoGuideLine *>::const_iterator it = m_guideLines[i].begin();
+ TQValueList<KoGuideLine *>::const_iterator it = m_guideLines[i].begin();
for ( ; it != m_guideLines[i].end(); ++it )
{
- if ( ( *it )->orientation == Qt::Horizontal && ( snapStatus & SNAP_HORIZ ) )
+ if ( ( *it )->orientation == Qt::Horizontal && ( snaptqStatus & SNAP_HORIZ ) )
{
if( virtuallyEqual( snappedPoint.y(), (*it)->position ) )
{
@@ -556,7 +556,7 @@ void KoGuides::repaintSnapping( const KoPoint &snappedPoint, SnapStatus snapStat
}
else
{
- if ( snapStatus & SNAP_VERT )
+ if ( snaptqStatus & SNAP_VERT )
{
if( virtuallyEqual( snappedPoint.x(), (*it)->position ) )
{
@@ -585,13 +585,13 @@ void KoGuides::repaintSnapping( const KoPoint &snappedPoint, SnapStatus snapStat
}
-void KoGuides::repaintAfterSnapping()
+void KoGuides::tqrepaintAfterSnapping()
{
bool needRepaint = false;
for ( int i = 0; i < GL_END; ++i )
{
- QValueList<KoGuideLine *>::const_iterator it = m_guideLines[i].begin();
+ TQValueList<KoGuideLine *>::const_iterator it = m_guideLines[i].begin();
for ( ; it != m_guideLines[i].end(); ++it )
{
if ( ( *it )->snapping )
@@ -615,7 +615,7 @@ void KoGuides::diffNextGuide( KoRect &rect, KoPoint &diff )
{
for ( int i = 0; i < GL_END; ++i )
{
- QValueList<KoGuideLine *>::const_iterator it = m_guideLines[i].begin();
+ TQValueList<KoGuideLine *>::const_iterator it = m_guideLines[i].begin();
for ( ; it != m_guideLines[i].end(); ++it )
{
if ( ( *it )->orientation == Qt::Horizontal )
@@ -677,11 +677,11 @@ void KoGuides::diffNextGuide( KoRect &rect, KoPoint &diff )
}
-void KoGuides::moveGuide( const QPoint &pos, bool horizontal, int rulerWidth )
+void KoGuides::moveGuide( const TQPoint &pos, bool horizontal, int rulerWidth )
{
int x = pos.x() - rulerWidth;
int y = pos.y() - rulerWidth;
- QPoint p( x, y );
+ TQPoint p( x, y );
if ( !m_insertGuide )
{
if ( ! horizontal && x > 0 )
@@ -696,25 +696,25 @@ void KoGuides::moveGuide( const QPoint &pos, bool horizontal, int rulerWidth )
}
if ( m_insertGuide )
{
- QMouseEvent e( QEvent::MouseButtonPress, p, Qt::LeftButton, Qt::LeftButton );
+ TQMouseEvent e( TQEvent::MouseButtonPress, p, Qt::LeftButton, Qt::LeftButton );
mousePressEvent( &e );
}
}
else
{
- QMouseEvent e( QEvent::MouseMove, p, Qt::NoButton, Qt::LeftButton );
+ TQMouseEvent e( TQEvent::MouseMove, p, Qt::NoButton, Qt::LeftButton );
mouseMoveEvent( &e );
}
}
-void KoGuides::addGuide( const QPoint &pos, bool /* horizontal */, int rulerWidth )
+void KoGuides::addGuide( const TQPoint &pos, bool /* horizontal */, int rulerWidth )
{
int x = pos.x() - rulerWidth;
int y = pos.y() - rulerWidth;
- QPoint p( x, y );
+ TQPoint p( x, y );
m_insertGuide = false;
- QMouseEvent e( QEvent::MouseButtonRelease, p, Qt::LeftButton, Qt::LeftButton );
+ TQMouseEvent e( TQEvent::MouseButtonRelease, p, Qt::LeftButton, Qt::LeftButton );
mouseReleaseEvent( &e );
}
@@ -722,21 +722,21 @@ void KoGuides::addGuide( const QPoint &pos, bool /* horizontal */, int rulerWidt
void KoGuides::slotChangePosition()
{
KoPoint p( mapFromScreen( m_lastPoint ) );
- KoGuideLine * guideLine = find( p, m_zoomHandler->unzoomItY( 2 ) );
+ KoGuideLine * guideLine = tqfind( p, m_zoomHandler->unzoomItY( 2 ) );
const KoPageLayout& pl = m_view->koDocument()->pageLayout();
double max = 0.0;
if ( guideLine->orientation == Qt::Vertical )
{
- max = QMAX( pl.ptWidth, m_zoomHandler->unzoomItX( m_view->canvas()->size().width() + m_view->canvasXOffset() - 1 ) );
+ max = TQMAX( pl.ptWidth, m_zoomHandler->unzoomItX( m_view->canvas()->size().width() + m_view->canvasXOffset() - 1 ) );
}
else
{
- max = QMAX( pl.ptHeight, m_zoomHandler->unzoomItY( m_view->canvas()->size().height() + m_view->canvasYOffset() - 1 ) );
+ max = TQMAX( pl.ptHeight, m_zoomHandler->unzoomItY( m_view->canvas()->size().height() + m_view->canvasYOffset() - 1 ) );
}
KoGuideLineDia dia( 0, guideLine->position, 0.0, max, m_view->koDocument()->unit() );
- if ( dia.exec() == QDialog::Accepted )
+ if ( dia.exec() == TQDialog::Accepted )
{
guideLine->position = dia.pos();
paint();
@@ -754,11 +754,11 @@ void KoGuides::slotRemove()
void KoGuides::paint()
{
- m_view->canvas()->repaint( false );
+ m_view->canvas()->tqrepaint( false );
}
-void KoGuides::add( Qt::Orientation o, QPoint &pos )
+void KoGuides::add( Qt::Orientation o, TQPoint &pos )
{
KoPoint p( mapFromScreen( pos ) );
KoGuideLine *guideLine = new KoGuideLine( o, o == Qt::Vertical ? p.x(): p.y() );
@@ -790,7 +790,7 @@ bool KoGuides::unselectAll()
{
bool selected = m_guideLines[GL_SELECTED].empty() == false;
- QValueList<KoGuideLine *>::iterator it = m_guideLines[GL_SELECTED].begin();
+ TQValueList<KoGuideLine *>::iterator it = m_guideLines[GL_SELECTED].begin();
for ( ; it != m_guideLines[GL_SELECTED].end(); ++it )
{
( *it )->selected = false;
@@ -804,7 +804,7 @@ bool KoGuides::unselectAll()
void KoGuides::removeSelected()
{
- QValueList<KoGuideLine *>::iterator it = m_guideLines[GL_SELECTED].begin();
+ TQValueList<KoGuideLine *>::iterator it = m_guideLines[GL_SELECTED].begin();
for ( ; it != m_guideLines[GL_SELECTED].end(); ++it )
{
delete ( *it );
@@ -819,16 +819,16 @@ bool KoGuides::hasSelected()
}
-KoGuides::KoGuideLine * KoGuides::find( KoPoint &p, double diff )
+KoGuides::KoGuideLine * KoGuides::tqfind( KoPoint &p, double diff )
{
- QValueList<KoGuideLine *>::iterator it = m_guideLines[GL_SELECTED].begin();
+ TQValueList<KoGuideLine *>::iterator it = m_guideLines[GL_SELECTED].begin();
for ( ; it != m_guideLines[GL_SELECTED].end(); ++it )
{
- if ( ( *it )->orientation == Qt::Vertical && QABS( ( *it )->position - p.x() ) < diff )
+ if ( ( *it )->orientation == Qt::Vertical && TQABS( ( *it )->position - p.x() ) < diff )
{
return *it;
}
- if ( ( *it )->orientation == Qt::Horizontal && QABS( ( *it )->position - p.y() ) < diff )
+ if ( ( *it )->orientation == Qt::Horizontal && TQABS( ( *it )->position - p.y() ) < diff )
{
return *it;
}
@@ -837,11 +837,11 @@ KoGuides::KoGuideLine * KoGuides::find( KoPoint &p, double diff )
it = m_guideLines[GL].begin();
for ( ; it != m_guideLines[GL].end(); ++it )
{
- if ( ( *it )->orientation == Qt::Vertical && QABS( ( *it )->position - p.x() ) < diff )
+ if ( ( *it )->orientation == Qt::Vertical && TQABS( ( *it )->position - p.x() ) < diff )
{
return *it;
}
- if ( ( *it )->orientation == Qt::Horizontal && QABS( ( *it )->position - p.y() ) < diff )
+ if ( ( *it )->orientation == Qt::Horizontal && TQABS( ( *it )->position - p.y() ) < diff )
{
return *it;
}
@@ -850,16 +850,16 @@ KoGuides::KoGuideLine * KoGuides::find( KoPoint &p, double diff )
}
-void KoGuides::moveSelectedBy( QPoint &p )
+void KoGuides::moveSelectedBy( TQPoint &p )
{
KoPoint point( m_zoomHandler->unzoomPoint( p ) );
if ( m_guideLines[GL_SELECTED].count() > 1 )
{
const KoPageLayout& pl = m_view->koDocument()->pageLayout();
- double right = QMAX( pl.ptWidth, m_zoomHandler->unzoomItX( m_view->canvas()->width() + m_view->canvasXOffset() - 1 ) );
- double bottom = QMAX( pl.ptHeight, m_zoomHandler->unzoomItY( m_view->canvas()->height() + m_view->canvasYOffset() - 1 ) );
+ double right = TQMAX( pl.ptWidth, m_zoomHandler->unzoomItX( m_view->canvas()->width() + m_view->canvasXOffset() - 1 ) );
+ double bottom = TQMAX( pl.ptHeight, m_zoomHandler->unzoomItY( m_view->canvas()->height() + m_view->canvasYOffset() - 1 ) );
- QValueList<KoGuideLine *>::iterator it = m_guideLines[GL_SELECTED].begin();
+ TQValueList<KoGuideLine *>::iterator it = m_guideLines[GL_SELECTED].begin();
for ( ; it != m_guideLines[GL_SELECTED].end(); ++it )
{
if ( ( *it )->orientation == Qt::Vertical )
@@ -888,7 +888,7 @@ void KoGuides::moveSelectedBy( QPoint &p )
}
}
}
- QValueList<KoGuideLine *>::iterator it = m_guideLines[GL_SELECTED].begin();
+ TQValueList<KoGuideLine *>::iterator it = m_guideLines[GL_SELECTED].begin();
for ( ; it != m_guideLines[GL_SELECTED].end(); ++it )
{
( *it )->snapping = false;
@@ -905,7 +905,7 @@ void KoGuides::moveSelectedBy( QPoint &p )
}
-KoPoint KoGuides::mapFromScreen( const QPoint & pos )
+KoPoint KoGuides::mapFromScreen( const TQPoint & pos )
{
int x = pos.x() + m_view->canvasXOffset();
int y = pos.y() + m_view->canvasYOffset();
@@ -915,11 +915,11 @@ KoPoint KoGuides::mapFromScreen( const QPoint & pos )
}
-QPoint KoGuides::mapToScreen( const KoPoint & pos )
+TQPoint KoGuides::mapToScreen( const KoPoint & pos )
{
int x = m_zoomHandler->zoomItX( pos.x() ) - m_view->canvasXOffset();
int y = m_zoomHandler->zoomItY( pos.y() ) - m_view->canvasYOffset();
- return QPoint( x, y );
+ return TQPoint( x, y );
}
diff --git a/lib/kofficeui/KoGuides.h b/lib/kofficeui/KoGuides.h
index c084c0133..e3529c720 100644
--- a/lib/kofficeui/KoGuides.h
+++ b/lib/kofficeui/KoGuides.h
@@ -22,20 +22,21 @@
#ifndef KOGUIDES_H
#define KOGUIDES_H
-#include <qevent.h>
-#include <qobject.h>
+#include <tqevent.h>
+#include <tqobject.h>
#include <koffice_export.h>
-class QPaintDevice;
+class TQPaintDevice;
class KoPoint;
class KoRect;
class KoView;
class KoZoomHandler;
-class KOFFICEUI_EXPORT KoGuides : public QObject
+class KOFFICEUI_EXPORT KoGuides : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* @brief Constructor
@@ -55,10 +56,10 @@ public:
*
* @param painter with which the guides are painted
*/
- void paintGuides( QPainter &painter );
+ void paintGuides( TQPainter &painter );
- typedef int SnapStatus;
- static const SnapStatus SNAP_NONE, SNAP_HORIZ, SNAP_VERT, SNAP_BOTH;
+ typedef int SnaptqStatus;
+ static const SnaptqStatus SNAP_NONE, SNAP_HORIZ, SNAP_VERT, SNAP_BOTH;
/**
* @brief Handle mousePressEvent
@@ -70,14 +71,14 @@ public:
* gets toggled.
* If no guide is under the position all guides get deselected.
*
- * @param e QMouseEvent
+ * @param e TQMouseEvent
*
* @return true if the event was handled
* @return false otherwise
* The event counts a not handled when only guides where
* deselected.
*/
- bool mousePressEvent( QMouseEvent *e );
+ bool mousePressEvent( TQMouseEvent *e );
/**
* @brief Handle mouseMoveEvent
@@ -86,31 +87,31 @@ public:
* selected guides.
* If the mouse is moved over a guide line the cursor gets updated.
*
- * @param e QMouseEvent
+ * @param e TQMouseEvent
*
* @return true if the event was handled (guide moved, cursor changed as
* guide lies below)
* @return false otherwise
*/
- bool mouseMoveEvent( QMouseEvent *e );
+ bool mouseMoveEvent( TQMouseEvent *e );
/**
*
- * @param e QMouseEvent
+ * @param e TQMouseEvent
*
* @return true if the event was handled
* @return false otherwise
*/
- bool mouseReleaseEvent( QMouseEvent *e );
+ bool mouseReleaseEvent( TQMouseEvent *e );
/**
*
- * @param e QKeyEvent
+ * @param e TQKeyEvent
*
* @return true if the event was handled
* @return false otherwise
*/
- bool keyPressEvent( QKeyEvent *e );
+ bool keyPressEvent( TQKeyEvent *e );
/**
* @brief Set the guide lines.
@@ -120,7 +121,7 @@ public:
* @param horizontalPos A list of the position of the horizontal guide lines.
* @param verticalPos A list of the position of the vertical guide lines.
*/
- void setGuideLines( const QValueList<double> &horizontalPos, const QValueList<double> &verticalPos );
+ void setGuideLines( const TQValueList<double> &horizontalPos, const TQValueList<double> &verticalPos );
/**
* @brief Set the positions for snapping of auto guide lines
@@ -130,7 +131,7 @@ public:
* @param horizontalPos A list of the position of the horizontal guide lines.
* @param verticalPos A list of the position of the vertical guide lines.
*/
- void setAutoGuideLines( const QValueList<double> &horizontalPos, const QValueList<double> &verticalPos );
+ void setAutoGuideLines( const TQValueList<double> &horizontalPos, const TQValueList<double> &verticalPos );
/**
* @brief Get the position of the guide lines
@@ -141,23 +142,23 @@ public:
* @param horizontalPos A list of the position of the horizontal guide lines.
* @param verticalPos A list of the position of the vertical guide lines.
*/
- void getGuideLines( QValueList<double> &horizontalPos, QValueList<double> &verticalPos ) const;
+ void getGuideLines( TQValueList<double> &horizontalPos, TQValueList<double> &verticalPos ) const;
/**
* @brief Snap rect to guidelines
*
* This looks for a guide which is in reach for the guide as defined in snap.
- * This method has the abillity to combine more calls. The snapStatus and diff args are both input and
- * output. On first call you should set snapStatus to 0. The return value would then show in which
+ * This method has the abillity to combine more calls. The snaptqStatus and diff args are both input and
+ * output. On first call you should set snaptqStatus to 0. The return value would then show in which
* directions it has snapped. If you combine several KoGuides you can let these output arguments
* be input for the next koGuide. That way you'll always catch the nearest guide.
*
* @param rect the rect which should be snapped
* @param snap the distance within the guide should snap - but always snap if already snapped
- * @param snapStatus if horiz,vert or both directions are snapped (both in and out param).
+ * @param snaptqStatus if horiz,vert or both directions are snapped (both in and out param).
* @param diff distance away from guide. Only valid if status is snapping (both in and out param)
*/
- void snapToGuideLines( KoRect &rect, int snap, SnapStatus &snapStatus, KoPoint &diff );
+ void snapToGuideLines( KoRect &rect, int snap, SnaptqStatus &snaptqStatus, KoPoint &diff );
/**
* @brief Snap rect to guidelines
@@ -166,36 +167,36 @@ public:
*
* @param pos the position which should be snapped
* @param snap the distance wherein the guide should snap - but always snap if already snapped
- * @param snapStatus if horiz,vert or both directions are snapped (both in and out param)
+ * @param snaptqStatus if horiz,vert or both directions are snapped (both in and out param)
* @param diff distance away from guide. Only valid if status is snapping (both in and out param)
*/
- void snapToGuideLines( KoPoint &pos, int snap, SnapStatus &snapStatus, KoPoint &diff );
+ void snapToGuideLines( KoPoint &pos, int snap, SnaptqStatus &snaptqStatus, KoPoint &diff );
/**
- * @brief repaint guides if any changed snapping status
+ * @brief tqrepaint guides if any changed snapping status
*
* This issues a paint request if any guides have changed snapping status.
*
* @param snappedRect the rect after it has been snapped
*/
- void repaintSnapping( const KoRect &snappedRect );
+ void tqrepaintSnapping( const KoRect &snappedRect );
/**
- * @brief repaint guides if any changed snapping status
+ * @brief tqrepaint guides if any changed snapping status
*
* This issues a paint request if any guides have changed snapping status.
*
* @param snappedPoint the point after it has been snapped
*/
- void repaintSnapping( const KoPoint &snappedPoint, SnapStatus snapStatus );
+ void tqrepaintSnapping( const KoPoint &snappedPoint, SnaptqStatus snaptqStatus );
/**
- * @brief repaint guides so none is snapped
+ * @brief tqrepaint guides so none is snapped
*
* This issues a paint request if any guides have changed snapping status.
* It also effectively un-snaps all since it doesn't take an argument
*/
- void repaintAfterSnapping( );
+ void tqrepaintAfterSnapping( );
/**
* @brief Find the closesed disance to the next guide within the given distance
@@ -210,7 +211,7 @@ public slots:
/**
* @brief Move Guide
*
- * This slot can be connected to void KoRuler::moveGuide( const QPoint &, bool, int );
+ * This slot can be connected to void KoRuler::moveGuide( const TQPoint &, bool, int );
* It will add a new guide when you move from the ruler to the canvas. After that it
* moves the guide.
*
@@ -218,19 +219,19 @@ public slots:
* @param horizontal true if the guide is horizontal, false if vertical
* @param rulerWidth The witdth of the ruler as the pos is seen from the ruler widget.
*/
- void moveGuide( const QPoint &pos, bool horizontal, int rulerWidth );
+ void moveGuide( const TQPoint &pos, bool horizontal, int rulerWidth );
/**
* @brief Add Guide
*
- * This slot can be connected to void KoRuler::addGuide( const QPoint &, bool, int );
+ * This slot can be connected to void KoRuler::addGuide( const TQPoint &, bool, int );
* It will finish the inserting of a guide from moveGuide().
*
* @param pos The pos of the mouse
* @param horizontal true if the guide is horizontal, false if vertical
* @param rulerWidth The witdth of the ruler as the pos is seen from the ruler widget.
*/
- void addGuide( const QPoint &pos, bool horizontal, int rulerWidth );
+ void addGuide( const TQPoint &pos, bool horizontal, int rulerWidth );
signals:
/**
@@ -252,9 +253,9 @@ signals:
/**
* @brief This signal is emitted when guides start/stop painting.
*
- * With this signal it is possible to only repaint the guides in the paint
+ * With this signal it is possible to only tqrepaint the guides in the paint
* method of the canvas. Just set/unset a flag when this signal is emmited.
- * This signal is emitted before and after a repaint is done.
+ * This signal is emitted before and after a tqrepaint is done.
*
* @param state true when starting painting guides, false when stopping.
*/
@@ -300,7 +301,7 @@ private:
* @param pos where to insert the guide
* @param o orientation of the guide line
*/
- void add( Qt::Orientation o, QPoint &pos );
+ void add( Qt::Orientation o, TQPoint &pos );
/**
* @brief Select a guide
@@ -350,7 +351,7 @@ private:
* @return the fould guide
* @return 0 if none is found
*/
- KoGuideLine * find( KoPoint &p, double diff );
+ KoGuideLine * tqfind( KoPoint &p, double diff );
/**
* @brief Move selected guides.
@@ -360,7 +361,7 @@ private:
*
* @param pos position of the mouse
*/
- void moveSelectedBy( QPoint &p );
+ void moveSelectedBy( TQPoint &p );
/**
* @brief Map pos from screen
@@ -369,7 +370,7 @@ private:
*
* @return pos in document
*/
- KoPoint mapFromScreen( const QPoint & pos );
+ KoPoint mapFromScreen( const TQPoint & pos );
/**
* @brief Map pos to screen
@@ -378,7 +379,7 @@ private:
*
* @return pos on screen
*/
- QPoint mapToScreen( const KoPoint & pos );
+ TQPoint mapToScreen( const KoPoint & pos );
/**
* @brief Check if the both values are nearly the same.
@@ -389,7 +390,7 @@ private:
* @return true if they are the same
* @return false otherwise
*/
- bool virtuallyEqual( double a, double b ) { return QABS( a - b ) < 1E-4; }
+ bool virtuallyEqual( double a, double b ) { return TQABS( a - b ) < 1E-4; }
/// view
KoView * m_view;
@@ -405,10 +406,10 @@ private:
};
/// array of list of the different guide line types
- QValueList<KoGuideLine *> m_guideLines[GL_END];
+ TQValueList<KoGuideLine *> m_guideLines[GL_END];
/// used to save the last mouse position
- QPoint m_lastPoint;
+ TQPoint m_lastPoint;
/// true if a guide is selected at the moment
bool m_mouseSelected;
/// true if a guide is inserted at the moment
diff --git a/lib/kofficeui/KoInsertLink.cpp b/lib/kofficeui/KoInsertLink.cpp
index 56c19081a..947624b9e 100644
--- a/lib/kofficeui/KoInsertLink.cpp
+++ b/lib/kofficeui/KoInsertLink.cpp
@@ -20,11 +20,11 @@
#include <kapplication.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qvbox.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
#include <kdebug.h>
-#include <qlabel.h>
-#include <qcombobox.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
#include <klineedit.h>
#include <kurlrequester.h>
@@ -36,38 +36,38 @@
using namespace KOfficePrivate;
-KoInsertLinkDia::KoInsertLinkDia( QWidget *parent, const char *name, bool displayBookmarkLink )
+KoInsertLinkDia::KoInsertLinkDia( TQWidget *tqparent, const char *name, bool displayBookmarkLink )
: KDialogBase( KDialogBase::IconList, i18n("Insert Link"),
KDialogBase::Ok | KDialogBase::Cancel,
- KDialogBase::Ok, parent, name )
+ KDialogBase::Ok, tqparent, name )
{
bookmarkLink = 0L;
- QVBox *page=addVBoxPage(i18n("Internet"), QString::null,BarIcon("html",KIcon::SizeMedium));
+ TQVBox *page=addVBoxPage(i18n("Internet"), TQString(),BarIcon("html",KIcon::SizeMedium));
internetLink = new internetLinkPage(page );
- connect(internetLink,SIGNAL(textChanged()),this,SLOT(slotTextChanged ( )));
+ connect(internetLink,TQT_SIGNAL(textChanged()),this,TQT_SLOT(slotTextChanged ( )));
- page=addVBoxPage(i18n("Mail & News"), QString::null,BarIcon("mail_generic",KIcon::SizeMedium));
+ page=addVBoxPage(i18n("Mail & News"), TQString(),BarIcon("mail_generic",KIcon::SizeMedium));
mailLink = new mailLinkPage(page );
- connect(mailLink,SIGNAL(textChanged()),this,SLOT(slotTextChanged ()));
+ connect(mailLink,TQT_SIGNAL(textChanged()),this,TQT_SLOT(slotTextChanged ()));
- page=addVBoxPage(i18n("File"), QString::null,BarIcon("filenew",KIcon::SizeMedium));
+ page=addVBoxPage(i18n("File"), TQString(),BarIcon("filenew",KIcon::SizeMedium));
fileLink = new fileLinkPage(page );
- connect(fileLink,SIGNAL(textChanged()),this,SLOT(slotTextChanged ()));
+ connect(fileLink,TQT_SIGNAL(textChanged()),this,TQT_SLOT(slotTextChanged ()));
if ( displayBookmarkLink)
{
- page=addVBoxPage(i18n("Bookmark"), QString::null,BarIcon("bookmark",KIcon::SizeMedium));
+ page=addVBoxPage(i18n("Bookmark"), TQString(),BarIcon("bookmark",KIcon::SizeMedium));
bookmarkLink = new bookmarkLinkPage(page );
- connect(bookmarkLink,SIGNAL(textChanged()),this,SLOT(slotTextChanged ()));
+ connect(bookmarkLink,TQT_SIGNAL(textChanged()),this,TQT_SLOT(slotTextChanged ()));
}
- connect( this, SIGNAL( aboutToShowPage(QWidget *) ), this, SLOT( tabChanged(QWidget *) ) );
+ connect( this, TQT_SIGNAL( aboutToShowPage(TQWidget *) ), this, TQT_SLOT( tabChanged(TQWidget *) ) );
slotTextChanged ( );
resize(400,300);
}
-void KoInsertLinkDia::tabChanged(QWidget *)
+void KoInsertLinkDia::tabChanged(TQWidget *)
{
switch( activePageIndex() )
{
@@ -98,11 +98,11 @@ void KoInsertLinkDia::slotTextChanged ( )
currentText = linkName();
}
-bool KoInsertLinkDia::createLinkDia(QString & _linkName, QString & _hrefName, const QStringList& bkmlist, bool displayBookmarkLink, QWidget* parent, const char* name)
+bool KoInsertLinkDia::createLinkDia(TQString & _linkName, TQString & _hrefName, const TQStringList& bkmlist, bool displayBookmarkLink, TQWidget* tqparent, const char* name)
{
bool res = false;
- KoInsertLinkDia *dlg = new KoInsertLinkDia( parent, name, displayBookmarkLink );
+ KoInsertLinkDia *dlg = new KoInsertLinkDia( tqparent, name, displayBookmarkLink );
dlg->setHrefLinkName(_hrefName,_linkName, bkmlist);
if ( dlg->exec() == Accepted )
{
@@ -115,7 +115,7 @@ bool KoInsertLinkDia::createLinkDia(QString & _linkName, QString & _hrefName, co
return res;
}
-void KoInsertLinkDia::setHrefLinkName(const QString &_href, const QString &_link, const QStringList & bkmlist)
+void KoInsertLinkDia::setHrefLinkName(const TQString &_href, const TQString &_link, const TQStringList & bkmlist)
{
if ( bookmarkLink)
bookmarkLink->setBookmarkList(bkmlist);
@@ -129,25 +129,25 @@ void KoInsertLinkDia::setHrefLinkName(const QString &_href, const QString &_link
}
return;
}
- if(_href.find("http://")!=-1 || _href.find("https://")!=-1 ||_href.find("ftp://")!=-1 )
+ if(_href.tqfind("http://")!=-1 || _href.tqfind("https://")!=-1 ||_href.tqfind("ftp://")!=-1 )
{
internetLink->setHrefName(_href);
internetLink->setLinkName(_link);
showPage(0);
}
- else if(_href.find("file:/")!=-1)
+ else if(_href.tqfind("file:/")!=-1)
{
fileLink->setHrefName(_href);
fileLink->setLinkName(_link);
showPage(2);
}
- else if(_href.find("mailto:")!=-1 || _href.find("news:")!=-1)
+ else if(_href.tqfind("mailto:")!=-1 || _href.tqfind("news:")!=-1)
{
mailLink->setHrefName(_href);
mailLink->setLinkName(_link);
showPage(1);
}
- else if(_href.find("bkm://")!=-1)
+ else if(_href.tqfind("bkm://")!=-1)
{
if ( bookmarkLink )
{
@@ -159,9 +159,9 @@ void KoInsertLinkDia::setHrefLinkName(const QString &_href, const QString &_link
slotTextChanged ( );
}
-QString KoInsertLinkDia::linkName() const
+TQString KoInsertLinkDia::linkName() const
{
- QString result;
+ TQString result;
switch(activePageIndex())
{
case 0:
@@ -185,9 +185,9 @@ QString KoInsertLinkDia::linkName() const
return result;
}
-QString KoInsertLinkDia::hrefName() const
+TQString KoInsertLinkDia::hrefName() const
{
- QString result;
+ TQString result;
switch(activePageIndex())
{
case 0:
@@ -217,27 +217,27 @@ void KoInsertLinkDia::slotOk()
}
-internetLinkPage::internetLinkPage( QWidget *parent , char *name )
- : QWidget(parent,name)
+internetLinkPage::internetLinkPage( TQWidget *tqparent , char *name )
+ : TQWidget(tqparent,name)
{
- QVBoxLayout *lay1 = new QVBoxLayout( this );
+ TQVBoxLayout *lay1 = new TQVBoxLayout( this );
lay1->setSpacing( KDialog::spacingHint() );
- QVBoxLayout *lay2 = new QVBoxLayout( lay1);
+ TQVBoxLayout *lay2 = new TQVBoxLayout( lay1);
lay2->setSpacing( KDialog::spacingHint() );
- QLabel* tmpQLabel = new QLabel( this);
+ TQLabel* tmpTQLabel = new TQLabel( this);
- lay2->addWidget(tmpQLabel);
- tmpQLabel->setText(i18n("Text to display:"));
+ lay2->addWidget(tmpTQLabel);
+ tmpTQLabel->setText(i18n("Text to display:"));
- m_linkName = new QLineEdit( this );
+ m_linkName = new TQLineEdit( this );
lay2->addWidget(m_linkName);
- tmpQLabel = new QLabel( this);
- lay2->addWidget(tmpQLabel);
+ tmpTQLabel = new TQLabel( this);
+ lay2->addWidget(tmpTQLabel);
- tmpQLabel->setText(i18n("Internet address:"));
- m_hrefName = new QLineEdit( this );
+ tmpTQLabel->setText(i18n("Internet address:"));
+ m_hrefName = new TQLineEdit( this );
lay2->addWidget(m_hrefName);
@@ -245,72 +245,72 @@ internetLinkPage::internetLinkPage( QWidget *parent , char *name )
m_linkName->setFocus();
- connect(m_linkName,SIGNAL(textChanged ( const QString & )),this,SLOT(textChanged ( const QString & )));
- connect(m_hrefName,SIGNAL(textChanged ( const QString & )),this,SLOT(textChanged ( const QString & )));
+ connect(m_linkName,TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(textChanged ( const TQString & )));
+ connect(m_hrefName,TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(textChanged ( const TQString & )));
KSeparator* bar1 = new KSeparator( KSeparator::HLine, this);
bar1->setFixedHeight( 10 );
lay2->addWidget( bar1 );
}
-QString internetLinkPage::createInternetLink()
+TQString internetLinkPage::createInternetLink()
{
- QString result=m_hrefName->text();
+ TQString result=m_hrefName->text();
if(result.isEmpty())
return result;
- if(result.find("http://")==-1 && result.find("https://")==-1 && result.find("ftp://")==-1)
+ if(result.tqfind("http://")==-1 && result.tqfind("https://")==-1 && result.tqfind("ftp://")==-1)
result = "http://"+result;
return result;
}
-void internetLinkPage::setLinkName(const QString & _name)
+void internetLinkPage::setLinkName(const TQString & _name)
{
m_linkName->setText(_name);
}
-void internetLinkPage::setHrefName(const QString &_name)
+void internetLinkPage::setHrefName(const TQString &_name)
{
m_hrefName->setText(_name);
}
-QString internetLinkPage::linkName()const
+TQString internetLinkPage::linkName()const
{
return m_linkName->text();
}
-QString internetLinkPage::hrefName()
+TQString internetLinkPage::hrefName()
{
return createInternetLink();
}
-void internetLinkPage::textChanged ( const QString & )
+void internetLinkPage::textChanged ( const TQString & )
{
emit textChanged();
}
-bookmarkLinkPage::bookmarkLinkPage( QWidget *parent , char *name )
- : QWidget(parent,name)
+bookmarkLinkPage::bookmarkLinkPage( TQWidget *tqparent , char *name )
+ : TQWidget(tqparent,name)
{
- QVBoxLayout *lay1 = new QVBoxLayout( this );
+ TQVBoxLayout *lay1 = new TQVBoxLayout( this );
lay1->setSpacing( KDialog::spacingHint() );
- QVBoxLayout *lay2 = new QVBoxLayout( lay1);
+ TQVBoxLayout *lay2 = new TQVBoxLayout( lay1);
lay2->setSpacing( KDialog::spacingHint() );
- QLabel* tmpQLabel = new QLabel( this);
+ TQLabel* tmpTQLabel = new TQLabel( this);
- lay2->addWidget(tmpQLabel);
- tmpQLabel->setText(i18n("Text to display:"));
+ lay2->addWidget(tmpTQLabel);
+ tmpTQLabel->setText(i18n("Text to display:"));
- m_linkName = new QLineEdit( this );
+ m_linkName = new TQLineEdit( this );
lay2->addWidget(m_linkName);
- tmpQLabel = new QLabel( this);
- lay2->addWidget(tmpQLabel);
+ tmpTQLabel = new TQLabel( this);
+ lay2->addWidget(tmpTQLabel);
- tmpQLabel->setText(i18n("Bookmark name:"));
- m_hrefName = new QComboBox( this );
+ tmpTQLabel->setText(i18n("Bookmark name:"));
+ m_hrefName = new TQComboBox( this );
lay2->addWidget(m_hrefName);
@@ -318,37 +318,37 @@ bookmarkLinkPage::bookmarkLinkPage( QWidget *parent , char *name )
m_linkName->setFocus();
- connect(m_linkName,SIGNAL(textChanged ( const QString & )),this,SLOT(textChanged ( const QString & )));
- connect(m_hrefName,SIGNAL(textChanged ( const QString & )),this,SLOT(textChanged ( const QString & )));
+ connect(m_linkName,TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(textChanged ( const TQString & )));
+ connect(m_hrefName,TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(textChanged ( const TQString & )));
KSeparator* bar1 = new KSeparator( KSeparator::HLine, this);
bar1->setFixedHeight( 10 );
lay2->addWidget( bar1 );
}
-QString bookmarkLinkPage::createBookmarkLink()
+TQString bookmarkLinkPage::createBookmarkLink()
{
- QString result=m_hrefName->currentText();
+ TQString result=m_hrefName->currentText();
if(result.isEmpty())
return result;
- if(result.find("bkm://")==-1)
+ if(result.tqfind("bkm://")==-1)
result = "bkm://"+result;
return result;
}
-void bookmarkLinkPage::setLinkName(const QString & _name)
+void bookmarkLinkPage::setLinkName(const TQString & _name)
{
m_linkName->setText(_name);
}
-void bookmarkLinkPage::setHrefName(const QString &_name)
+void bookmarkLinkPage::setHrefName(const TQString &_name)
{
m_hrefName->setCurrentText(_name);
}
-void bookmarkLinkPage::setBookmarkList(const QStringList & bkmlist)
+void bookmarkLinkPage::setBookmarkList(const TQStringList & bkmlist)
{
m_hrefName->clear();
m_hrefName->insertStringList(bkmlist, 0);
@@ -357,119 +357,119 @@ void bookmarkLinkPage::setBookmarkList(const QStringList & bkmlist)
//m_hrefName->setEditable(true);
}
-QString bookmarkLinkPage::linkName()const
+TQString bookmarkLinkPage::linkName()const
{
return m_linkName->text();
}
-QString bookmarkLinkPage::hrefName()
+TQString bookmarkLinkPage::hrefName()
{
return createBookmarkLink();
}
-void bookmarkLinkPage::textChanged ( const QString & )
+void bookmarkLinkPage::textChanged ( const TQString & )
{
emit textChanged();
}
-mailLinkPage::mailLinkPage( QWidget *parent , char *name )
- : QWidget(parent,name)
+mailLinkPage::mailLinkPage( TQWidget *tqparent , char *name )
+ : TQWidget(tqparent,name)
{
- QVBoxLayout *lay1 = new QVBoxLayout( this );
+ TQVBoxLayout *lay1 = new TQVBoxLayout( this );
lay1->setSpacing( KDialog::spacingHint() );
- QVBoxLayout *lay2 = new QVBoxLayout( lay1);
+ TQVBoxLayout *lay2 = new TQVBoxLayout( lay1);
lay2->setSpacing( KDialog::spacingHint() );
- QLabel* tmpQLabel = new QLabel( this);
+ TQLabel* tmpTQLabel = new TQLabel( this);
- lay2->addWidget(tmpQLabel);
- tmpQLabel->setText(i18n("Text to display:"));
+ lay2->addWidget(tmpTQLabel);
+ tmpTQLabel->setText(i18n("Text to display:"));
- m_linkName = new QLineEdit( this );
+ m_linkName = new TQLineEdit( this );
lay2->addWidget(m_linkName);
- tmpQLabel = new QLabel( this);
- lay2->addWidget(tmpQLabel);
+ tmpTQLabel = new TQLabel( this);
+ lay2->addWidget(tmpTQLabel);
- tmpQLabel->setText(i18n("Target:"));
- m_hrefName = new QLineEdit( this );
+ tmpTQLabel->setText(i18n("Target:"));
+ m_hrefName = new TQLineEdit( this );
lay2->addWidget(m_hrefName);
lay2->addStretch( 1 );
- connect(m_linkName,SIGNAL(textChanged ( const QString & )),this,SLOT(textChanged ( const QString & )));
- connect(m_hrefName,SIGNAL(textChanged ( const QString & )),this,SLOT(textChanged ( const QString & )));
+ connect(m_linkName,TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(textChanged ( const TQString & )));
+ connect(m_hrefName,TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(textChanged ( const TQString & )));
KSeparator* bar1 = new KSeparator( KSeparator::HLine, this);
bar1->setFixedHeight( 10 );
lay2->addWidget( bar1 );
}
-QString mailLinkPage::createMailLink()
+TQString mailLinkPage::createMailLink()
{
- QString result=m_hrefName->text();
+ TQString result=m_hrefName->text();
if(result.isEmpty())
return result;
- if(result.find("mailto:")==-1 && result.find("news:")==-1)
+ if(result.tqfind("mailto:")==-1 && result.tqfind("news:")==-1)
result = "mailto:"+result;
return result;
}
-void mailLinkPage::setLinkName(const QString & _name)
+void mailLinkPage::setLinkName(const TQString & _name)
{
m_linkName->setText(_name);
}
-void mailLinkPage::setHrefName(const QString &_name)
+void mailLinkPage::setHrefName(const TQString &_name)
{
m_hrefName->setText(_name);
}
-QString mailLinkPage::linkName()const
+TQString mailLinkPage::linkName()const
{
return m_linkName->text();
}
-QString mailLinkPage::hrefName()
+TQString mailLinkPage::hrefName()
{
return createMailLink();
}
-void mailLinkPage::textChanged ( const QString & )
+void mailLinkPage::textChanged ( const TQString & )
{
emit textChanged();
}
-fileLinkPage::fileLinkPage( QWidget *parent , char *name )
- : QWidget(parent,name)
+fileLinkPage::fileLinkPage( TQWidget *tqparent , char *name )
+ : TQWidget(tqparent,name)
{
- QVBoxLayout *lay1 = new QVBoxLayout( this );
+ TQVBoxLayout *lay1 = new TQVBoxLayout( this );
lay1->setSpacing( KDialog::spacingHint() );
- QVBoxLayout *lay2 = new QVBoxLayout( lay1);
+ TQVBoxLayout *lay2 = new TQVBoxLayout( lay1);
lay2->setSpacing( KDialog::spacingHint() );
- QLabel* tmpQLabel = new QLabel( this);
+ TQLabel* tmpTQLabel = new TQLabel( this);
- lay2->addWidget(tmpQLabel);
- tmpQLabel->setText(i18n("Text to display:"));
+ lay2->addWidget(tmpTQLabel);
+ tmpTQLabel->setText(i18n("Text to display:"));
- m_linkName = new QLineEdit( this );
+ m_linkName = new TQLineEdit( this );
lay2->addWidget(m_linkName);
- tmpQLabel = new QLabel( this);
- lay2->addWidget(tmpQLabel);
- tmpQLabel->setText(i18n("Recent file:"));
+ tmpTQLabel = new TQLabel( this);
+ lay2->addWidget(tmpTQLabel);
+ tmpTQLabel->setText(i18n("Recent file:"));
- QComboBox * recentFile = new QComboBox( this );
+ TQComboBox * recentFile = new TQComboBox( this );
recentFile->setMaximumWidth( kapp->desktop()->width()*3/4 );
lay2->addWidget(recentFile);
- QStringList fileList = KRecentDocument::recentDocuments();
- QStringList lst;
+ TQStringList fileList = KRecentDocument::recentDocuments();
+ TQStringList lst;
lst <<"";
- for (QStringList::ConstIterator it = fileList.begin();it != fileList.end(); ++it)
+ for (TQStringList::ConstIterator it = fileList.begin();it != fileList.end(); ++it)
{
KDesktopFile f(*it, true /* read only */);
if ( !f.readURL().isEmpty())
@@ -484,64 +484,64 @@ fileLinkPage::fileLinkPage( QWidget *parent , char *name )
else
recentFile->insertStringList( lst);
- recentFile->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+ recentFile->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed );
- connect( recentFile , SIGNAL(highlighted ( const QString &)), this, SLOT( slotSelectRecentFile( const QString & )));
+ connect( recentFile , TQT_SIGNAL(highlighted ( const TQString &)), this, TQT_SLOT( slotSelectRecentFile( const TQString & )));
- tmpQLabel = new QLabel( this);
- lay2->addWidget(tmpQLabel);
+ tmpTQLabel = new TQLabel( this);
+ lay2->addWidget(tmpTQLabel);
- tmpQLabel->setText(i18n("File location:"));
+ tmpTQLabel->setText(i18n("File location:"));
m_hrefName = new KURLRequester( this );
lay2->addWidget(m_hrefName);
lay2->addStretch( 1 );
- connect(m_linkName,SIGNAL(textChanged ( const QString & )),this,SLOT(textChanged ( const QString & )));
- connect(m_hrefName,SIGNAL(textChanged ( const QString & )),this,SLOT(textChanged ( const QString & )));
+ connect(m_linkName,TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(textChanged ( const TQString & )));
+ connect(m_hrefName,TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(textChanged ( const TQString & )));
KSeparator* bar1 = new KSeparator( KSeparator::HLine, this);
bar1->setFixedHeight( 10 );
lay2->addWidget( bar1 );
}
-void fileLinkPage::slotSelectRecentFile( const QString &_file )
+void fileLinkPage::slotSelectRecentFile( const TQString &_file )
{
m_hrefName->lineEdit()->setText(_file );
}
-QString fileLinkPage::createFileLink()
+TQString fileLinkPage::createFileLink()
{
- QString result=m_hrefName->lineEdit()->text();
+ TQString result=m_hrefName->lineEdit()->text();
if(result.isEmpty())
return result;
- if(result.find("file:/")==-1)
+ if(result.tqfind("file:/")==-1)
result = "file://"+result;
return result;
}
-void fileLinkPage::setLinkName(const QString & _name)
+void fileLinkPage::setLinkName(const TQString & _name)
{
m_linkName->setText(_name);
}
-void fileLinkPage::setHrefName(const QString &_name)
+void fileLinkPage::setHrefName(const TQString &_name)
{
m_hrefName->lineEdit()->setText(_name);
}
-QString fileLinkPage::linkName()const
+TQString fileLinkPage::linkName()const
{
return m_linkName->text();
}
-QString fileLinkPage::hrefName()
+TQString fileLinkPage::hrefName()
{
return createFileLink();
}
-void fileLinkPage::textChanged ( const QString & )
+void fileLinkPage::textChanged ( const TQString & )
{
emit textChanged();
}
diff --git a/lib/kofficeui/KoInsertLink.h b/lib/kofficeui/KoInsertLink.h
index 79d5eeca8..cb10a7f05 100644
--- a/lib/kofficeui/KoInsertLink.h
+++ b/lib/kofficeui/KoInsertLink.h
@@ -22,27 +22,28 @@
#include <kdialogbase.h>
#include <koffice_export.h>
-class QLineEdit;
+class TQLineEdit;
class KURLRequester;
namespace KOfficePrivate {
/**
* @internal
*/
-class internetLinkPage : public QWidget
+class internetLinkPage : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- internetLinkPage( QWidget *parent = 0, char *name = 0 );
- QString linkName()const;
- QString hrefName();
- void setLinkName(const QString & _name);
- void setHrefName(const QString &_name);
+ internetLinkPage( TQWidget *tqparent = 0, char *name = 0 );
+ TQString linkName()const;
+ TQString hrefName();
+ void setLinkName(const TQString & _name);
+ void setHrefName(const TQString &_name);
private:
- QString createInternetLink();
- QLineEdit* m_linkName, *m_hrefName;
+ TQString createInternetLink();
+ TQLineEdit* m_linkName, *m_hrefName;
private slots:
- void textChanged ( const QString & );
+ void textChanged ( const TQString & );
signals:
void textChanged();
};
@@ -50,22 +51,23 @@ signals:
/**
* @internal
*/
-class bookmarkLinkPage : public QWidget
+class bookmarkLinkPage : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- bookmarkLinkPage( QWidget *parent = 0, char *name = 0 );
- QString linkName()const;
- QString hrefName();
- void setLinkName(const QString & _name);
- void setHrefName(const QString &_name);
- void setBookmarkList(const QStringList &bkmlist);
+ bookmarkLinkPage( TQWidget *tqparent = 0, char *name = 0 );
+ TQString linkName()const;
+ TQString hrefName();
+ void setLinkName(const TQString & _name);
+ void setHrefName(const TQString &_name);
+ void setBookmarkList(const TQStringList &bkmlist);
private:
- QString createBookmarkLink();
- QLineEdit* m_linkName;
- QComboBox *m_hrefName;
+ TQString createBookmarkLink();
+ TQLineEdit* m_linkName;
+ TQComboBox *m_hrefName;
private slots:
- void textChanged ( const QString & );
+ void textChanged ( const TQString & );
signals:
void textChanged();
};
@@ -73,21 +75,22 @@ signals:
/**
* @internal
*/
-class mailLinkPage : public QWidget
+class mailLinkPage : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- mailLinkPage( QWidget *parent = 0, char *name = 0 );
- QString linkName()const;
- QString hrefName();
- void setLinkName(const QString & _name);
- void setHrefName(const QString &_name);
+ mailLinkPage( TQWidget *tqparent = 0, char *name = 0 );
+ TQString linkName()const;
+ TQString hrefName();
+ void setLinkName(const TQString & _name);
+ void setHrefName(const TQString &_name);
private slots:
- void textChanged ( const QString & );
+ void textChanged ( const TQString & );
private:
- QString createMailLink();
- QLineEdit* m_linkName, *m_hrefName;
+ TQString createMailLink();
+ TQLineEdit* m_linkName, *m_hrefName;
signals:
void textChanged();
};
@@ -95,22 +98,23 @@ signals:
/**
* @internal
*/
-class fileLinkPage : public QWidget
+class fileLinkPage : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- fileLinkPage( QWidget *parent = 0, char *name = 0 );
- QString linkName()const;
- QString hrefName();
- void setLinkName(const QString & _name);
- void setHrefName(const QString &_name);
+ fileLinkPage( TQWidget *tqparent = 0, char *name = 0 );
+ TQString linkName()const;
+ TQString hrefName();
+ void setLinkName(const TQString & _name);
+ void setHrefName(const TQString &_name);
private slots:
- void textChanged ( const QString & );
- void slotSelectRecentFile( const QString & );
+ void textChanged ( const TQString & );
+ void slotSelectRecentFile( const TQString & );
private:
- QString createFileLink();
- QLineEdit* m_linkName;
+ TQString createFileLink();
+ TQLineEdit* m_linkName;
KURLRequester* m_hrefName;
signals:
void textChanged();
@@ -123,26 +127,27 @@ signals:
class KOFFICEUI_EXPORT KoInsertLinkDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoInsertLinkDia( QWidget *parent, const char *name = 0,bool displayBookmarkLink=true );
- static bool createLinkDia(QString & linkName, QString & hrefName, const QStringList& bkmlist, bool displayBookmarkLink = true,
- QWidget* parent = 0, const char* name = 0);
+ KoInsertLinkDia( TQWidget *tqparent, const char *name = 0,bool displayBookmarkLink=true );
+ static bool createLinkDia(TQString & linkName, TQString & hrefName, const TQStringList& bkmlist, bool displayBookmarkLink = true,
+ TQWidget* tqparent = 0, const char* name = 0);
//internal
- QString linkName() const;
- QString hrefName() const;
- void setHrefLinkName(const QString &_href, const QString &_link, const QStringList & bkmlist);
+ TQString linkName() const;
+ TQString hrefName() const;
+ void setHrefLinkName(const TQString &_href, const TQString &_link, const TQStringList & bkmlist);
protected slots:
virtual void slotOk();
void slotTextChanged ( );
- void tabChanged(QWidget *);
+ void tabChanged(TQWidget *);
private:
KOfficePrivate::fileLinkPage *fileLink;
KOfficePrivate::mailLinkPage *mailLink;
KOfficePrivate::internetLinkPage *internetLink;
KOfficePrivate::bookmarkLinkPage *bookmarkLink;
- QString currentText;
+ TQString currentText;
};
#endif
diff --git a/lib/kofficeui/KoKoolBar.cpp b/lib/kofficeui/KoKoolBar.cpp
index 9715ce5e5..5f42caae3 100644
--- a/lib/kofficeui/KoKoolBar.cpp
+++ b/lib/kofficeui/KoKoolBar.cpp
@@ -20,19 +20,19 @@
#include <KoKoolBar.h>
#include <kiconloader.h>
-#include <qpainter.h>
-#include <qpushbutton.h>
+#include <tqpainter.h>
+#include <tqpushbutton.h>
static int g_koKoolBarId = 0;
-KoKoolBar::KoKoolBar( QWidget *_parent, const char *_name ) :
- QWidget( _parent, _name ), m_iActiveGroup( -1 )
+KoKoolBar::KoKoolBar( TQWidget *_parent, const char *_name ) :
+ TQWidget( _parent, _name ), m_iActiveGroup( -1 )
{
m_mapGroups.setAutoDelete( true );
m_pBox = new KoKoolBarBox( this );
}
-int KoKoolBar::insertGroup( const QString& _text )
+int KoKoolBar::insertGroup( const TQString& _text )
{
KoKoolBarGroup *p = new KoKoolBarGroup( this, _text );
m_mapGroups.insert( p->id(), p );
@@ -44,8 +44,8 @@ int KoKoolBar::insertGroup( const QString& _text )
return p->id();
}
-int KoKoolBar::insertItem( int _grp, const QPixmap& _pix, const QString& _text,
- QObject *_obj, const char *_slot )
+int KoKoolBar::insertItem( int _grp, const TQPixmap& _pix, const TQString& _text,
+ TQObject *_obj, const char *_slot )
{
KoKoolBarGroup* g = m_mapGroups[ _grp ];
if ( !g )
@@ -53,7 +53,7 @@ int KoKoolBar::insertItem( int _grp, const QPixmap& _pix, const QString& _text,
KoKoolBarItem *item = new KoKoolBarItem( g, _pix, _text );
if ( _obj != 0L && _slot != 0L )
- connect( item, SIGNAL( pressed( int, int ) ), _obj, _slot );
+ connect( item, TQT_SIGNAL( pressed( int, int ) ), _obj, _slot );
g->append( item );
if ( g->id() == m_iActiveGroup )
@@ -79,7 +79,7 @@ void KoKoolBar::removeGroup( int _grp )
}
else
{
- QIntDictIterator<KoKoolBarGroup> it( m_mapGroups );
+ TQIntDictIterator<KoKoolBarGroup> it( m_mapGroups );
g = it.current();
m_iActiveGroup = g->id();
m_pBox->setActiveGroup( g );
@@ -101,7 +101,7 @@ void KoKoolBar::removeItem( int _grp, int _id )
m_pBox->update();
}
-void KoKoolBar::renameItem( int _grp, int _id, const QString & _text )
+void KoKoolBar::renameItem( int _grp, int _id, const TQString & _text )
{
KoKoolBarGroup* g = m_mapGroups[ _grp ];
if ( !g )
@@ -129,7 +129,7 @@ void KoKoolBar::setActiveGroup( int _grp )
resizeEvent( 0L );
}
-void KoKoolBar::resizeEvent( QResizeEvent * ev )
+void KoKoolBar::resizeEvent( TQResizeEvent * ev )
{
if ( m_iActiveGroup == -1 )
return;
@@ -141,16 +141,16 @@ void KoKoolBar::resizeEvent( QResizeEvent * ev )
return;
// Go behind g
- QIntDictIterator<KoKoolBarGroup> it( m_mapGroups );
+ TQIntDictIterator<KoKoolBarGroup> it( m_mapGroups );
while( it.current() != g )
++it;
// Position of g
- QIntDictIterator<KoKoolBarGroup> pos = it;
+ TQIntDictIterator<KoKoolBarGroup> pos = it;
++it;
// How many left ?
int result = 0;
- QIntDictIterator<KoKoolBarGroup> i = it;
+ TQIntDictIterator<KoKoolBarGroup> i = it;
while( i.current() )
{
++result;
@@ -208,7 +208,7 @@ void KoKoolBar::enableGroup( int _grp, bool _enable )
}
KoKoolBarBox::KoKoolBarBox( KoKoolBar *_bar ) :
- QFrame( _bar ), m_pBar( _bar ),
+ TQFrame( _bar ), m_pBar( _bar ),
m_pButtonUp( 0L ), m_pButtonDown( 0L )
{
m_iYOffset = 0;
@@ -218,7 +218,7 @@ KoKoolBarBox::KoKoolBarBox( KoKoolBar *_bar ) :
setFrameShape( StyledPanel );
setFrameShadow( Sunken );
// setBackgroundMode( PaletteBase );
- setBackgroundColor( colorGroup().background() );
+ setBackgroundColor( tqcolorGroup().background() );
}
void KoKoolBarBox::setActiveGroup( KoKoolBarGroup *_grp )
@@ -237,21 +237,21 @@ bool KoKoolBarBox::needsScrolling() const
return ( maxHeight() > height() );
}
-void KoKoolBarBox::resizeEvent( QResizeEvent * )
+void KoKoolBarBox::resizeEvent( TQResizeEvent * )
{
if ( needsScrolling() )
{
if ( m_pButtonUp == 0L )
{
- m_pButtonUp = new QPushButton( this );
- m_pButtonUp->setPixmap( QPixmap( UserIcon( "koKoolBarUp" ) ) );
- connect( m_pButtonUp, SIGNAL( clicked() ), this, SLOT( scrollUp() ) );
+ m_pButtonUp = new TQPushButton( this );
+ m_pButtonUp->setPixmap( TQPixmap( UserIcon( "koKoolBarUp" ) ) );
+ connect( m_pButtonUp, TQT_SIGNAL( clicked() ), this, TQT_SLOT( scrollUp() ) );
}
if ( m_pButtonDown == 0L )
{
- m_pButtonDown = new QPushButton( this );
- m_pButtonDown->setPixmap( QPixmap( UserIcon( "koKoolBarDown" ) ) );
- connect( m_pButtonDown, SIGNAL( clicked() ), this, SLOT( scrollDown() ) );
+ m_pButtonDown = new TQPushButton( this );
+ m_pButtonDown->setPixmap( TQPixmap( UserIcon( "koKoolBarDown" ) ) );
+ connect( m_pButtonDown, TQT_SIGNAL( clicked() ), this, TQT_SLOT( scrollDown() ) );
}
m_pButtonUp->show();
m_pButtonUp->raise();
@@ -275,7 +275,7 @@ KoKoolBarItem* KoKoolBarBox::findByPos( int _abs_y ) const
int y = 0;
- QIntDictIterator<KoKoolBarItem> it = m_pGroup->iterator();
+ TQIntDictIterator<KoKoolBarItem> it = m_pGroup->iterator();
for ( ; it.current(); ++it )
{
int dy = it.current()->height();
@@ -291,7 +291,7 @@ int KoKoolBarBox::maxHeight() const
{
int y = 0;
- QIntDictIterator<KoKoolBarItem> it = m_pGroup->iterator();
+ TQIntDictIterator<KoKoolBarItem> it = m_pGroup->iterator();
for ( ; it.current(); ++it )
y += it.current()->height();
@@ -324,7 +324,7 @@ void KoKoolBarBox::scrollUp()
int i = 0;
m_iYIcon--;
- QIntDictIterator<KoKoolBarItem> it = m_pGroup->iterator();
+ TQIntDictIterator<KoKoolBarItem> it = m_pGroup->iterator();
for ( ; i < m_iYIcon && it.current(); ++it )
{
y += it.current()->height();
@@ -334,7 +334,7 @@ void KoKoolBarBox::scrollUp()
int old = m_iYOffset;
m_iYOffset = y;
- QWidget::scroll( 0, old - m_iYOffset, contentsRect() );
+ TQWidget::scroll( 0, old - m_iYOffset, contentsRect() );
updateScrollButtons();
}
@@ -347,7 +347,7 @@ void KoKoolBarBox::scrollDown()
int i = 0;
m_iYIcon++;
- QIntDictIterator<KoKoolBarItem> it = m_pGroup->iterator();
+ TQIntDictIterator<KoKoolBarItem> it = m_pGroup->iterator();
for ( ; i < m_iYIcon && it.current(); ++it )
{
y += it.current()->height();
@@ -360,7 +360,7 @@ void KoKoolBarBox::scrollDown()
int old = m_iYOffset;
m_iYOffset = y;
- QWidget::scroll( 0, old - m_iYOffset, contentsRect() );
+ TQWidget::scroll( 0, old - m_iYOffset, contentsRect() );
updateScrollButtons();
}
@@ -381,14 +381,14 @@ void KoKoolBarBox::updateScrollButtons()
m_pButtonDown->setGeometry( width() - bs, height() - bs, bs, bs );
}
-void KoKoolBarBox::drawContents( QPainter * painter )
+void KoKoolBarBox::drawContents( TQPainter * painter )
{
if ( m_pGroup == 0L )
return;
int y = -m_iYOffset;
- QIntDictIterator<KoKoolBarItem> it = m_pGroup->iterator();
+ TQIntDictIterator<KoKoolBarItem> it = m_pGroup->iterator();
for ( ; it.current(); ++it )
{
if ( y + it.current()->height() >= 0 && y <= height() ) // visible ?
@@ -406,16 +406,16 @@ void KoKoolBarBox::drawContents( QPainter * painter )
}
}
-KoKoolBarGroup::KoKoolBarGroup( KoKoolBar *_bar, const QString& _text ) :
+KoKoolBarGroup::KoKoolBarGroup( KoKoolBar *_bar, const TQString& _text ) :
m_pBar( _bar )
{
m_mapItems.setAutoDelete( true );
- m_pButton = new QPushButton( _text, _bar );
+ m_pButton = new TQPushButton( _text, _bar );
m_bEnabled = true;
- connect( m_pButton, SIGNAL( clicked() ), this, SLOT( pressed() ) );
+ connect( m_pButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( pressed() ) );
m_id = g_koKoolBarId++;
}
@@ -434,7 +434,7 @@ void KoKoolBarGroup::pressed()
m_pBar->setActiveGroup( m_id );
}
-KoKoolBarItem::KoKoolBarItem( KoKoolBarGroup *_grp, const QPixmap& _pix, const QString&_text )
+KoKoolBarItem::KoKoolBarItem( KoKoolBarGroup *_grp, const TQPixmap& _pix, const TQString&_text )
: m_pGroup( _grp )
{
m_pixmap = _pix;
@@ -444,7 +444,7 @@ KoKoolBarItem::KoKoolBarItem( KoKoolBarGroup *_grp, const QPixmap& _pix, const Q
calc( _grp->bar() );
}
-void KoKoolBarItem::calc( QWidget *_widget )
+void KoKoolBarItem::calc( TQWidget *_widget )
{
m_iHeight = pixmap().height() + 8;
@@ -465,7 +465,7 @@ int main( int argc, char **argv )
KApplication app( argc, argv );
KoKoolBar bar;
int file = bar.insertGroup("File");
- QPixmap pix;
+ TQPixmap pix;
pix.load( "/opt/kde/share/icons/image.xpm" );
bar.insertItem( file, pix );
pix.load( "/opt/kde/share/icons/html.xpm" );
diff --git a/lib/kofficeui/KoKoolBar.h b/lib/kofficeui/KoKoolBar.h
index 5e6f91fc5..445b5fee2 100644
--- a/lib/kofficeui/KoKoolBar.h
+++ b/lib/kofficeui/KoKoolBar.h
@@ -21,21 +21,22 @@
#ifndef __ko_koolbar_h__
#define __ko_koolbar_h__
-#include <qframe.h>
-#include <qpixmap.h>
-#include <qintdict.h>
+#include <tqframe.h>
+#include <tqpixmap.h>
+#include <tqintdict.h>
#include <koffice_export.h>
-class QPushButton;
-class QPixmap;
+class TQPushButton;
+class TQPixmap;
class KoKoolBar;
class KoKoolBarGroup;
-class KoKoolBarItem : public QObject
+class KoKoolBarItem : public TQObject
{
private:
Q_OBJECT
+ TQ_OBJECT
public:
- KoKoolBarItem( KoKoolBarGroup *_grp, const QPixmap& _pix, const QString& _text = QString::null );
+ KoKoolBarItem( KoKoolBarGroup *_grp, const TQPixmap& _pix, const TQString& _text = TQString() );
int id() const { return m_id; }
void press();
@@ -43,62 +44,64 @@ public:
void setEnabled( bool _e ) { m_bEnabled = _e; }
int height() const { return m_iHeight; }
- QPixmap pixmap() const { return m_pixmap; }
- void setText( const QString & text ) { m_strText = text; }
- QString text() const { return m_strText; }
+ TQPixmap pixmap() const { return m_pixmap; }
+ void setText( const TQString & text ) { m_strText = text; }
+ TQString text() const { return m_strText; }
signals:
void pressed( int _group, int _id );
void pressed();
protected:
- void calc( QWidget* );
+ void calc( TQWidget* );
int m_iHeight;
KoKoolBarGroup* m_pGroup;
- QString m_strText;
- QPixmap m_pixmap;
+ TQString m_strText;
+ TQPixmap m_pixmap;
int m_id;
bool m_bEnabled;
class KoKoolBarItemPrivate;
KoKoolBarItemPrivate *d;
};
-class KoKoolBarGroup : public QObject
+class KoKoolBarGroup : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoKoolBarGroup( KoKoolBar *_bar, const QString& _text );
+ KoKoolBarGroup( KoKoolBar *_bar, const TQString& _text );
~KoKoolBarGroup();
void append( KoKoolBarItem *_i ) { m_mapItems.insert( _i->id(), _i ); }
void remove( int _id );
KoKoolBar* bar() const { return m_pBar; }
- QPushButton* button() const { return m_pButton; }
+ TQPushButton* button() const { return m_pButton; }
int id() const { return m_id; }
bool isEnabled() const { return m_bEnabled; }
void setEnabled( bool _e ) { m_bEnabled = _e; }
KoKoolBarItem* item( int _id ) const { return m_mapItems[ _id ]; }
int items() const { return m_mapItems.size(); }
- QIntDictIterator<KoKoolBarItem> iterator() const { return QIntDictIterator<KoKoolBarItem>( m_mapItems ); }
+ TQIntDictIterator<KoKoolBarItem> iterator() const { return TQIntDictIterator<KoKoolBarItem>( m_mapItems ); }
public slots:
void pressed();
protected:
- QIntDict<KoKoolBarItem> m_mapItems;
+ TQIntDict<KoKoolBarItem> m_mapItems;
KoKoolBar* m_pBar;
- QString m_strText;
+ TQString m_strText;
int m_id;
- QPushButton* m_pButton;
+ TQPushButton* m_pButton;
bool m_bEnabled;
class KoKoolBarGroupPrivate;
KoKoolBarGroupPrivate *d;
};
-class KoKoolBarBox : public QFrame
+class KoKoolBarBox : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
KoKoolBarBox( KoKoolBar *_bar );
@@ -112,9 +115,9 @@ protected slots:
void scrollDown();
protected:
- virtual void resizeEvent( QResizeEvent *_ev );
- virtual void drawContents( QPainter * );
- virtual void mousePressEvent( QMouseEvent *_ev )
+ virtual void resizeEvent( TQResizeEvent *_ev );
+ virtual void drawContents( TQPainter * );
+ virtual void mousePressEvent( TQMouseEvent *_ev )
{ KoKoolBarItem *item = findByPos( _ev->pos().y() + m_iYOffset ); if ( !item ) return; item->press(); }
KoKoolBarItem* findByPos( int _abs_y ) const;
@@ -128,34 +131,35 @@ protected:
int m_iYOffset;
int m_iYIcon;
KoKoolBarGroup *m_pGroup;
- QPushButton* m_pButtonUp;
- QPushButton* m_pButtonDown;
+ TQPushButton* m_pButtonUp;
+ TQPushButton* m_pButtonDown;
class KoKoolBarBoxPrivate;
KoKoolBarBoxPrivate *d;
};
-class KOFFICEUI_EXPORT KoKoolBar : public QWidget
+class KOFFICEUI_EXPORT KoKoolBar : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoKoolBar( QWidget *_parent = 0L, const char *_name = 0L );
+ KoKoolBar( TQWidget *_parent = 0L, const char *_name = 0L );
virtual ~KoKoolBar() { };
- virtual int insertGroup( const QString& _text );
- virtual int insertItem( int _grp, const QPixmap& _pix, const QString& _text = QString::null,
- QObject *_obj = 0L, const char *_slot = 0L );
+ virtual int insertGroup( const TQString& _text );
+ virtual int insertItem( int _grp, const TQPixmap& _pix, const TQString& _text = TQString(),
+ TQObject *_obj = 0L, const char *_slot = 0L );
virtual void removeGroup( int _grp );
virtual void removeItem( int _grp, int _id );
- virtual void renameItem( int _grp, int _id, const QString & _text );
+ virtual void renameItem( int _grp, int _id, const TQString & _text );
virtual void setActiveGroup( int _grp );
virtual int activeGroup() const { return m_iActiveGroup; }
virtual void enableItem( int _grp, int _id, bool _enable );
virtual void enableGroup( int _grp, bool _enable );
protected:
- virtual void resizeEvent( QResizeEvent *_ev );
+ virtual void resizeEvent( TQResizeEvent *_ev );
- QIntDict<KoKoolBarGroup> m_mapGroups;
+ TQIntDict<KoKoolBarGroup> m_mapGroups;
int m_iActiveGroup;
KoKoolBarBox* m_pBox;
diff --git a/lib/kofficeui/KoPageLayoutColumns.cpp b/lib/kofficeui/KoPageLayoutColumns.cpp
index db5e3e25e..60057c88e 100644
--- a/lib/kofficeui/KoPageLayoutColumns.cpp
+++ b/lib/kofficeui/KoPageLayoutColumns.cpp
@@ -22,28 +22,28 @@
#include <KoUnit.h>
#include <KoUnitWidgets.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
-KoPageLayoutColumns::KoPageLayoutColumns(QWidget *parent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& layout)
- : KoPageLayoutColumnsBase(parent) {
+KoPageLayoutColumns::KoPageLayoutColumns(TQWidget *tqparent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& tqlayout)
+ : KoPageLayoutColumnsBase(tqparent) {
m_columns = columns;
- QHBoxLayout *lay = new QHBoxLayout(previewPane);
- m_preview = new KoPagePreview( previewPane, "Preview", layout );
+ TQHBoxLayout *lay = new TQHBoxLayout(previewPane);
+ m_preview = new KoPagePreview( previewPane, "Preview", tqlayout );
lay->addWidget(m_preview);
- lay = new QHBoxLayout(columnSpacingPane);
+ lay = new TQHBoxLayout(columnSpacingPane);
m_spacing = new KoUnitDoubleSpinBox( columnSpacingPane );
m_spacing->setValue( m_columns.ptColumnSpacing );
m_spacing->setUnit( unit );
double dStep = KoUnit::fromUserValue( 0.2, unit );
- m_spacing->setMinMaxStep( 0, layout.ptWidth/2, dStep );
+ m_spacing->setMinMaxStep( 0, tqlayout.ptWidth/2, dStep );
lay->addWidget(m_spacing);
labelSpacing->setBuddy( m_spacing );
nColumns->setValue( m_columns.columns );
m_preview->setPageColumns( m_columns );
- connect( nColumns, SIGNAL( valueChanged( int ) ), this, SLOT( nColChanged( int ) ) );
- connect( m_spacing, SIGNAL( valueChangedPt(double) ), this, SLOT( nSpaceChanged( double ) ) );
+ connect( nColumns, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( nColChanged( int ) ) );
+ connect( m_spacing, TQT_SIGNAL( valueChangedPt(double) ), this, TQT_SLOT( nSpaceChanged( double ) ) );
}
void KoPageLayoutColumns::setEnableColumns(bool on) {
@@ -63,8 +63,8 @@ void KoPageLayoutColumns::nSpaceChanged( double spacing ) {
emit propertyChange(m_columns);
}
-void KoPageLayoutColumns::setLayout(KoPageLayout &layout) {
- m_preview->setPageLayout( layout );
+void KoPageLayoutColumns::setLayout(KoPageLayout &tqlayout) {
+ m_preview->setPageLayout( tqlayout );
}
#include <KoPageLayoutColumns.moc>
diff --git a/lib/kofficeui/KoPageLayoutColumns.h b/lib/kofficeui/KoPageLayoutColumns.h
index be0a4a493..016eb767f 100644
--- a/lib/kofficeui/KoPageLayoutColumns.h
+++ b/lib/kofficeui/KoPageLayoutColumns.h
@@ -19,14 +19,14 @@
// Description: Page Layout Dialog (sources)
-#ifndef kopagelayoutcolumns_h
-#define kopagelayoutcolumns_h
+#ifndef kopagetqlayoutcolumns_h
+#define kopagetqlayoutcolumns_h
#include <KoUnit.h>
#include <KoPageLayout.h>
#include <KoPageLayoutColumnsBase.h>
-class QWidget;
+class TQWidget;
class KoUnitDoubleSpinBox;
class KoPagePreview;
@@ -35,22 +35,23 @@ class KoPagePreview;
*/
class KoPageLayoutColumns : public KoPageLayoutColumnsBase {
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Contructor
- * @param parent the parent widget
+ * @param tqparent the tqparent widget
* @param columns the KoColumns data structure that this dialog should be initialzed with
* @param unit the unit-type (mm/cm/inch) that the dialog should show
- * @param layout the page layout that the preview should be initialzed with.
+ * @param tqlayout the page tqlayout that the preview should be initialzed with.
*/
- KoPageLayoutColumns(QWidget *parent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& layout);
+ KoPageLayoutColumns(TQWidget *tqparent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& tqlayout);
/**
- * Update the page preview widget with the param layout.
- * @param layout the new layout
+ * Update the page preview widget with the param tqlayout.
+ * @param tqlayout the new tqlayout
*/
- void setLayout(KoPageLayout &layout);
+ void setLayout(KoPageLayout &tqlayout);
public slots:
/**
diff --git a/lib/kofficeui/KoPageLayoutColumnsBase.ui b/lib/kofficeui/KoPageLayoutColumnsBase.ui
index 1ffe032d7..780bc792a 100644
--- a/lib/kofficeui/KoPageLayoutColumnsBase.ui
+++ b/lib/kofficeui/KoPageLayoutColumnsBase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KoPageLayoutColumnsBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KoPageLayoutColumnsBase</cstring>
</property>
@@ -16,7 +16,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QFrame" row="1" column="1">
+ <widget class="TQFrame" row="1" column="1">
<property name="name">
<cstring>columnSpacingPane</cstring>
</property>
@@ -27,7 +27,7 @@
<enum>Raised</enum>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -38,7 +38,7 @@
<cstring>nColumns</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>labelSpacing</cstring>
</property>
@@ -56,14 +56,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QFrame" row="0" column="2" rowspan="3" colspan="1">
+ <widget class="TQFrame" row="0" column="2" rowspan="3" colspan="1">
<property name="name">
<cstring>previewPane</cstring>
</property>
@@ -82,7 +82,7 @@
<enum>Raised</enum>
</property>
</widget>
- <widget class="QSpinBox" row="0" column="1">
+ <widget class="TQSpinBox" row="0" column="1">
<property name="name">
<cstring>nColumns</cstring>
</property>
@@ -95,5 +95,5 @@
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/lib/kofficeui/KoPageLayoutDia.cpp b/lib/kofficeui/KoPageLayoutDia.cpp
index 13194df15..1f07358a0 100644
--- a/lib/kofficeui/KoPageLayoutDia.cpp
+++ b/lib/kofficeui/KoPageLayoutDia.cpp
@@ -33,26 +33,26 @@
#include <kiconloader.h>
#include <kmessagebox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qlineedit.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qhbox.h>
-#include <qvgroupbox.h>
-#include <qhbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqlineedit.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqhbox.h>
+#include <tqvgroupbox.h>
+#include <tqhbuttongroup.h>
/******************************************************************/
/* class KoPagePreview */
/******************************************************************/
/*===================== constrcutor ==============================*/
-KoPagePreview::KoPagePreview( QWidget* parent, const char *name, const KoPageLayout& layout )
- : QGroupBox( i18n( "Page Preview" ), parent, name )
+KoPagePreview::KoPagePreview( TQWidget* tqparent, const char *name, const KoPageLayout& tqlayout )
+ : TQGroupBox( i18n( "Page Preview" ), tqparent, name )
{
- setPageLayout( layout );
+ setPageLayout( tqlayout );
columns = 1;
setMinimumSize( 150, 150 );
}
@@ -62,47 +62,47 @@ KoPagePreview::~KoPagePreview()
{
}
-/*=================== set layout =================================*/
-void KoPagePreview::setPageLayout( const KoPageLayout &layout )
+/*=================== set tqlayout =================================*/
+void KoPagePreview::setPageLayout( const KoPageLayout &tqlayout )
{
// resolution[XY] is in pixel per pt
double resolutionX = POINT_TO_INCH( static_cast<double>(KoGlobal::dpiX()) );
double resolutionY = POINT_TO_INCH( static_cast<double>(KoGlobal::dpiY()) );
- m_pageWidth = layout.ptWidth * resolutionX;
- m_pageHeight = layout.ptHeight * resolutionY;
+ m_pageWidth = tqlayout.ptWidth * resolutionX;
+ m_pageHeight = tqlayout.ptHeight * resolutionY;
double zh = 110.0 / m_pageHeight;
double zw = 110.0 / m_pageWidth;
- double z = QMIN( zw, zh );
+ double z = TQMIN( zw, zh );
m_pageWidth *= z;
m_pageHeight *= z;
- m_textFrameX = layout.ptLeft * resolutionX * z;
- m_textFrameY = layout.ptTop * resolutionY * z;
- m_textFrameWidth = m_pageWidth - ( layout.ptLeft + layout.ptRight ) * resolutionX * z;
- m_textFrameHeight = m_pageHeight - ( layout.ptTop + layout.ptBottom ) * resolutionY * z;
+ m_textFrameX = tqlayout.ptLeft * resolutionX * z;
+ m_textFrameY = tqlayout.ptTop * resolutionY * z;
+ m_textFrameWidth = m_pageWidth - ( tqlayout.ptLeft + tqlayout.ptRight ) * resolutionX * z;
+ m_textFrameHeight = m_pageHeight - ( tqlayout.ptTop + tqlayout.ptBottom ) * resolutionY * z;
- repaint( true );
+ tqrepaint( true );
}
-/*=================== set layout =================================*/
+/*=================== set tqlayout =================================*/
void KoPagePreview::setPageColumns( const KoColumns &_columns )
{
columns = _columns.columns;
- repaint( true );
+ tqrepaint( true );
}
/*======================== draw contents =========================*/
-void KoPagePreview::drawContents( QPainter *painter )
+void KoPagePreview::drawContents( TQPainter *painter )
{
double cw = m_textFrameWidth;
if(columns!=1)
cw/=static_cast<double>(columns);
painter->setBrush( white );
- painter->setPen( QPen( black ) );
+ painter->setPen( TQPen( black ) );
int x=static_cast<int>( ( width() - m_pageWidth ) * 0.5 );
int y=static_cast<int>( ( height() - m_pageHeight ) * 0.5 );
@@ -111,7 +111,7 @@ void KoPagePreview::drawContents( QPainter *painter )
//painter->drawRect( x + 1, y + 1, w, h);
painter->drawRect( x, y, w, h );
- painter->setBrush( QBrush( black, HorPattern ) );
+ painter->setBrush( TQBrush( black, HorPattern ) );
if ( m_textFrameWidth == m_pageWidth || m_textFrameHeight == m_pageHeight )
painter->setPen( NoPen );
else
@@ -128,16 +128,16 @@ void KoPagePreview::drawContents( QPainter *painter )
/******************************************************************/
/*==================== constructor ===============================*/
-KoPageLayoutDia::KoPageLayoutDia( QWidget* parent, const char* name,
- const KoPageLayout& layout,
+KoPageLayoutDia::KoPageLayoutDia( TQWidget* tqparent, const char* name,
+ const KoPageLayout& tqlayout,
const KoHeadFoot& hf, int tabs,
KoUnit::Unit unit, bool modal )
: KDialogBase( KDialogBase::Tabbed, i18n("Page Layout"), KDialogBase::Ok | KDialogBase::Cancel,
- KDialogBase::Ok, parent, name, modal)
+ KDialogBase::Ok, tqparent, name, modal)
{
flags = tabs;
- m_layout = layout;
+ m_layout = tqlayout;
m_unit = unit;
m_pageSizeTab = 0;
m_columnsTab = 0;
@@ -148,23 +148,23 @@ KoPageLayoutDia::KoPageLayoutDia( QWidget* parent, const char* name,
if ( tabs & FORMAT_AND_BORDERS ) setupTab1( true );
if ( tabs & HEADER_AND_FOOTER ) setupTab2( hf );
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQ_StrongFocus );
setFocus();
}
/*==================== constructor ===============================*/
-KoPageLayoutDia::KoPageLayoutDia( QWidget* parent, const char* name,
- const KoPageLayout& layout,
+KoPageLayoutDia::KoPageLayoutDia( TQWidget* tqparent, const char* name,
+ const KoPageLayout& tqlayout,
const KoHeadFoot& hf,
const KoColumns& columns,
const KoKWHeaderFooter& kwhf,
int tabs, KoUnit::Unit unit )
: KDialogBase( KDialogBase::Tabbed, i18n("Page Layout"), KDialogBase::Ok | KDialogBase::Cancel,
- KDialogBase::Ok, parent, name, true)
+ KDialogBase::Ok, tqparent, name, true)
{
flags = tabs;
- m_layout = layout;
+ m_layout = tqlayout;
m_column = columns;
m_unit = unit;
m_pageSizeTab = 0;
@@ -176,7 +176,7 @@ KoPageLayoutDia::KoPageLayoutDia( QWidget* parent, const char* name,
if ( tabs & COLUMNS ) setupTab3();
if ( tabs & KW_HEADER_AND_FOOTER ) setupTab4(kwhf);
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQ_StrongFocus );
setFocus();
}
@@ -186,14 +186,14 @@ KoPageLayoutDia::~KoPageLayoutDia()
}
/*======================= show dialog ============================*/
-bool KoPageLayoutDia::pageLayout( KoPageLayout& layout, KoHeadFoot& hf, int tabs, KoUnit::Unit& unit, QWidget* parent )
+bool KoPageLayoutDia::pageLayout( KoPageLayout& tqlayout, KoHeadFoot& hf, int tabs, KoUnit::Unit& unit, TQWidget* tqparent )
{
bool res = false;
- KoPageLayoutDia *dlg = new KoPageLayoutDia( parent, "PageLayout", layout, hf, tabs, unit );
+ KoPageLayoutDia *dlg = new KoPageLayoutDia( tqparent, "PageLayout", tqlayout, hf, tabs, unit );
- if ( dlg->exec() == QDialog::Accepted ) {
+ if ( dlg->exec() == TQDialog::Accepted ) {
res = true;
- if ( tabs & FORMAT_AND_BORDERS ) layout = dlg->layout();
+ if ( tabs & FORMAT_AND_BORDERS ) tqlayout = dlg->tqlayout();
if ( tabs & HEADER_AND_FOOTER ) hf = dlg->headFoot();
unit = dlg->unit();
}
@@ -204,15 +204,15 @@ bool KoPageLayoutDia::pageLayout( KoPageLayout& layout, KoHeadFoot& hf, int tabs
}
/*======================= show dialog ============================*/
-bool KoPageLayoutDia::pageLayout( KoPageLayout& layout, KoHeadFoot& hf, KoColumns& columns,
- KoKWHeaderFooter &_kwhf, int tabs, KoUnit::Unit& unit, QWidget* parent )
+bool KoPageLayoutDia::pageLayout( KoPageLayout& tqlayout, KoHeadFoot& hf, KoColumns& columns,
+ KoKWHeaderFooter &_kwhf, int tabs, KoUnit::Unit& unit, TQWidget* tqparent )
{
bool res = false;
- KoPageLayoutDia *dlg = new KoPageLayoutDia( parent, "PageLayout", layout, hf, columns, _kwhf, tabs, unit );
+ KoPageLayoutDia *dlg = new KoPageLayoutDia( tqparent, "PageLayout", tqlayout, hf, columns, _kwhf, tabs, unit );
- if ( dlg->exec() == QDialog::Accepted ) {
+ if ( dlg->exec() == TQDialog::Accepted ) {
res = true;
- if ( tabs & FORMAT_AND_BORDERS ) layout = dlg->layout();
+ if ( tabs & FORMAT_AND_BORDERS ) tqlayout = dlg->tqlayout();
if ( tabs & HEADER_AND_FOOTER ) hf = dlg->headFoot();
if ( tabs & COLUMNS ) columns = dlg->columns();
if ( tabs & KW_HEADER_AND_FOOTER ) _kwhf = dlg->headerFooter();
@@ -224,7 +224,7 @@ bool KoPageLayoutDia::pageLayout( KoPageLayout& layout, KoHeadFoot& hf, KoColumn
return res;
}
-/*===================== get a standard page layout ===============*/
+/*===================== get a standard page tqlayout ===============*/
KoPageLayout KoPageLayoutDia::standardLayout()
{
return KoPageLayout::standardLayout();
@@ -252,121 +252,121 @@ const KoKWHeaderFooter& KoPageLayoutDia::headerFooter()
/*================ setup page size & margins tab ==================*/
void KoPageLayoutDia::setupTab1( bool enableBorders )
{
- QWidget *tab1 = addPage(i18n( "Page Size && &Margins" ));
- QHBoxLayout *lay = new QHBoxLayout(tab1);
+ TQWidget *tab1 = addPage(i18n( "Page Size && &Margins" ));
+ TQHBoxLayout *lay = new TQHBoxLayout(tab1);
m_pageSizeTab = new KoPageLayoutSize(tab1, m_layout, m_unit, m_column, !(flags & DISABLE_UNIT), enableBorders );
lay->addWidget(m_pageSizeTab);
m_pageSizeTab->show();
- connect (m_pageSizeTab, SIGNAL( propertyChange(KoPageLayout&)),
- this, SLOT (sizeUpdated( KoPageLayout&)));
+ connect (m_pageSizeTab, TQT_SIGNAL( propertyChange(KoPageLayout&)),
+ this, TQT_SLOT (sizeUpdated( KoPageLayout&)));
}
-void KoPageLayoutDia::sizeUpdated(KoPageLayout &layout) {
- m_layout.ptWidth = layout.ptWidth;
- m_layout.ptHeight = layout.ptHeight;
- m_layout.ptLeft = layout.ptLeft;
- m_layout.ptRight = layout.ptRight;
- m_layout.ptTop = layout.ptTop;
- m_layout.ptBottom = layout.ptBottom;
- m_layout.format = layout.format;
- m_layout.orientation = layout.orientation;
+void KoPageLayoutDia::sizeUpdated(KoPageLayout &tqlayout) {
+ m_layout.ptWidth = tqlayout.ptWidth;
+ m_layout.ptHeight = tqlayout.ptHeight;
+ m_layout.ptLeft = tqlayout.ptLeft;
+ m_layout.ptRight = tqlayout.ptRight;
+ m_layout.ptTop = tqlayout.ptTop;
+ m_layout.ptBottom = tqlayout.ptBottom;
+ m_layout.format = tqlayout.format;
+ m_layout.orientation = tqlayout.orientation;
if(m_columnsTab)
- m_columnsTab->setLayout(layout);
+ m_columnsTab->setLayout(tqlayout);
}
/*================ setup header and footer tab ===================*/
void KoPageLayoutDia::setupTab2( const KoHeadFoot& hf )
{
- QWidget *tab2 = addPage(i18n( "H&eader && Footer" ));
- QGridLayout *grid2 = new QGridLayout( tab2, 7, 2, 0, KDialog::spacingHint() );
+ TQWidget *tab2 = addPage(i18n( "H&eader && Footer" ));
+ TQGridLayout *grid2 = new TQGridLayout( tab2, 7, 2, 0, KDialog::spacingHint() );
// ------------- header ---------------
- QGroupBox *gHead = new QGroupBox( 0, Qt::Vertical, i18n( "Head Line" ), tab2 );
- gHead->layout()->setSpacing(KDialog::spacingHint());
- gHead->layout()->setMargin(KDialog::marginHint());
- QGridLayout *headGrid = new QGridLayout( gHead->layout(), 2, 3 );
+ TQGroupBox *gHead = new TQGroupBox( 0, Qt::Vertical, i18n( "Head Line" ), tab2 );
+ gHead->tqlayout()->setSpacing(KDialog::spacingHint());
+ gHead->tqlayout()->setMargin(KDialog::marginHint());
+ TQGridLayout *headGrid = new TQGridLayout( gHead->tqlayout(), 2, 3 );
- QLabel *lHeadLeft = new QLabel( i18n( "Left:" ), gHead );
+ TQLabel *lHeadLeft = new TQLabel( i18n( "Left:" ), gHead );
headGrid->addWidget( lHeadLeft, 0, 0 );
- eHeadLeft = new QLineEdit( gHead );
+ eHeadLeft = new TQLineEdit( gHead );
headGrid->addWidget( eHeadLeft, 1, 0 );
eHeadLeft->setText( hf.headLeft );
- QLabel *lHeadMid = new QLabel( i18n( "Mid:" ), gHead );
+ TQLabel *lHeadMid = new TQLabel( i18n( "Mid:" ), gHead );
headGrid->addWidget( lHeadMid, 0, 1 );
- eHeadMid = new QLineEdit( gHead );
+ eHeadMid = new TQLineEdit( gHead );
headGrid->addWidget( eHeadMid, 1, 1 );
eHeadMid->setText( hf.headMid );
- QLabel *lHeadRight = new QLabel( i18n( "Right:" ), gHead );
+ TQLabel *lHeadRight = new TQLabel( i18n( "Right:" ), gHead );
headGrid->addWidget( lHeadRight, 0, 2 );
- eHeadRight = new QLineEdit( gHead );
+ eHeadRight = new TQLineEdit( gHead );
headGrid->addWidget( eHeadRight, 1, 2 );
eHeadRight->setText( hf.headRight );
grid2->addMultiCellWidget( gHead, 0, 1, 0, 1 );
// ------------- footer ---------------
- QGroupBox *gFoot = new QGroupBox( 0, Qt::Vertical, i18n( "Foot Line" ), tab2 );
- gFoot->layout()->setSpacing(KDialog::spacingHint());
- gFoot->layout()->setMargin(KDialog::marginHint());
- QGridLayout *footGrid = new QGridLayout( gFoot->layout(), 2, 3 );
+ TQGroupBox *gFoot = new TQGroupBox( 0, Qt::Vertical, i18n( "Foot Line" ), tab2 );
+ gFoot->tqlayout()->setSpacing(KDialog::spacingHint());
+ gFoot->tqlayout()->setMargin(KDialog::marginHint());
+ TQGridLayout *footGrid = new TQGridLayout( gFoot->tqlayout(), 2, 3 );
- QLabel *lFootLeft = new QLabel( i18n( "Left:" ), gFoot );
+ TQLabel *lFootLeft = new TQLabel( i18n( "Left:" ), gFoot );
footGrid->addWidget( lFootLeft, 0, 0 );
- eFootLeft = new QLineEdit( gFoot );
+ eFootLeft = new TQLineEdit( gFoot );
footGrid->addWidget( eFootLeft, 1, 0 );
eFootLeft->setText( hf.footLeft );
- QLabel *lFootMid = new QLabel( i18n( "Mid:" ), gFoot );
+ TQLabel *lFootMid = new TQLabel( i18n( "Mid:" ), gFoot );
footGrid->addWidget( lFootMid, 0, 1 );
- eFootMid = new QLineEdit( gFoot );
+ eFootMid = new TQLineEdit( gFoot );
footGrid->addWidget( eFootMid, 1, 1 );
eFootMid->setText( hf.footMid );
- QLabel *lFootRight = new QLabel( i18n( "Right:" ), gFoot );
+ TQLabel *lFootRight = new TQLabel( i18n( "Right:" ), gFoot );
footGrid->addWidget( lFootRight, 0, 2 );
- eFootRight = new QLineEdit( gFoot );
+ eFootRight = new TQLineEdit( gFoot );
footGrid->addWidget( eFootRight, 1, 2 );
eFootRight->setText( hf.footRight );
grid2->addMultiCellWidget( gFoot, 2, 3, 0, 1 );
- QLabel *lMacros2 = new QLabel( i18n( "You can insert several tags in the text:" ), tab2 );
+ TQLabel *lMacros2 = new TQLabel( i18n( "You can insert several tags in the text:" ), tab2 );
grid2->addMultiCellWidget( lMacros2, 4, 4, 0, 1 );
- QLabel *lMacros3 = new QLabel( i18n("<qt><ul><li>&lt;sheet&gt; The sheet name</li>"
+ TQLabel *lMacros3 = new TQLabel( i18n("<qt><ul><li>&lt;sheet&gt; The sheet name</li>"
"<li>&lt;page&gt; The current page</li>"
"<li>&lt;pages&gt; The total number of pages</li>"
"<li>&lt;name&gt; The filename or URL</li>"
"<li>&lt;file&gt; The filename with complete path or the URL</li></ul></qt>"), tab2 );
- grid2->addMultiCellWidget( lMacros3, 5, 6, 0, 0, Qt::AlignTop );
+ grid2->addMultiCellWidget( lMacros3, 5, 6, 0, 0, TQt::AlignTop );
- QLabel *lMacros4 = new QLabel( i18n("<qt><ul><li>&lt;time&gt; The current time</li>"
+ TQLabel *lMacros4 = new TQLabel( i18n("<qt><ul><li>&lt;time&gt; The current time</li>"
"<li>&lt;date&gt; The current date</li>"
"<li>&lt;author&gt; Your full name</li>"
"<li>&lt;org&gt; Your organization</li>"
"<li>&lt;email&gt; Your email address</li></ul></qt>"), tab2 );
- grid2->addMultiCellWidget( lMacros4, 5, 6, 1, 1, Qt::AlignTop );
+ grid2->addMultiCellWidget( lMacros4, 5, 6, 1, 1, TQt::AlignTop );
}
/*================================================================*/
void KoPageLayoutDia::setupTab3()
{
- QWidget *tab3 = addPage(i18n( "Col&umns" ));
- QHBoxLayout *lay = new QHBoxLayout(tab3);
+ TQWidget *tab3 = addPage(i18n( "Col&umns" ));
+ TQHBoxLayout *lay = new TQHBoxLayout(tab3);
m_columnsTab = new KoPageLayoutColumns(tab3, m_column, m_unit, m_layout);
- m_columnsTab->layout()->setMargin(0);
+ m_columnsTab->tqlayout()->setMargin(0);
lay->addWidget(m_columnsTab);
m_columnsTab->show();
- connect (m_columnsTab, SIGNAL( propertyChange(KoColumns&)),
- this, SLOT (columnsUpdated( KoColumns&)));
+ connect (m_columnsTab, TQT_SIGNAL( propertyChange(KoColumns&)),
+ this, TQT_SLOT (columnsUpdated( KoColumns&)));
}
void KoPageLayoutDia::columnsUpdated(KoColumns &columns) {
@@ -379,10 +379,10 @@ void KoPageLayoutDia::columnsUpdated(KoColumns &columns) {
/*================================================================*/
void KoPageLayoutDia::setupTab4(const KoKWHeaderFooter kwhf )
{
- QWidget *tab4 = addPage(i18n( "H&eader && Footer" ));
- QHBoxLayout *lay = new QHBoxLayout(tab4);
+ TQWidget *tab4 = addPage(i18n( "H&eader && Footer" ));
+ TQHBoxLayout *lay = new TQHBoxLayout(tab4);
m_headerTab = new KoPageLayoutHeader(tab4, m_unit, kwhf);
- m_headerTab->layout()->setMargin(0);
+ m_headerTab->tqlayout()->setMargin(0);
lay->addWidget(m_headerTab);
m_headerTab->show();
diff --git a/lib/kofficeui/KoPageLayoutDia.h b/lib/kofficeui/KoPageLayoutDia.h
index f3f1d932e..05f8f3db7 100644
--- a/lib/kofficeui/KoPageLayoutDia.h
+++ b/lib/kofficeui/KoPageLayoutDia.h
@@ -22,16 +22,16 @@
#ifndef __KOPGLAYOUTDIA_H__
#define __KOPGLAYOUTDIA_H__
-#include <qgroupbox.h>
+#include <tqgroupbox.h>
#include <KoGlobal.h>
#include <KoUnit.h>
#include <kdialogbase.h>
#include <KoPageLayout.h>
-class QButtonGroup;
-class QComboBox;
-class QLineEdit;
-class QCheckBox;
+class TQButtonGroup;
+class TQComboBox;
+class TQLineEdit;
+class TQCheckBox;
class KoUnitDoubleSpinBox;
class KoPageLayoutColumns;
class KoPageLayoutSize;
@@ -44,23 +44,24 @@ enum { FORMAT_AND_BORDERS = 1, HEADER_AND_FOOTER = 2, COLUMNS = 4, DISABLE_BORDE
* KoPagePreview.
* Internal to KoPageLayoutDia.
*/
-class KoPagePreview : public QGroupBox
+class KoPagePreview : public TQGroupBox
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* constructor
*/
- KoPagePreview( QWidget*, const char*, const KoPageLayout & );
+ KoPagePreview( TQWidget*, const char*, const KoPageLayout & );
/**
* destructor
*/
~KoPagePreview();
/**
- * set page layout
+ * set page tqlayout
*/
void setPageLayout( const KoPageLayout& );
void setPageColumns( const KoColumns& );
@@ -68,7 +69,7 @@ public:
protected:
// paint page
- void drawContents( QPainter* );
+ void drawContents( TQPainter* );
double m_pageHeight, m_pageWidth, m_textFrameX, m_textFrameY, m_textFrameWidth, m_textFrameHeight;
int columns;
@@ -77,44 +78,45 @@ protected:
class KoPageLayoutDiaPrivate;
/**
- * With this dialog the user can specify the layout of the paper during printing.
+ * With this dialog the user can specify the tqlayout of the paper during printing.
*/
class KOFFICEUI_EXPORT KoPageLayoutDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
*
- * @param parent The parent of the dialog.
+ * @param tqparent The tqparent of the dialog.
* @param name The name of the dialog.
- * @param layout The layout.
+ * @param tqlayout The tqlayout.
* @param headfoot The header and the footer.
* @param flags a variable with all features this dialog should show.
* @param unit The unit to use for displaying the values to the user.
* @param modal Whether the dialog is modal or not.
*/
- KoPageLayoutDia( QWidget* parent, const char* name,
- const KoPageLayout& layout,
+ KoPageLayoutDia( TQWidget* tqparent, const char* name,
+ const KoPageLayout& tqlayout,
const KoHeadFoot& headfoot,
int flags, KoUnit::Unit unit, bool modal=true );
/**
* Constructor.
*
- * @param parent The parent of the dialog.
+ * @param tqparent The tqparent of the dialog.
* @param name The name of the dialog.
- * @param layout The layout.
+ * @param tqlayout The tqlayout.
* @param headfoot The header and the footer.
* @param columns The number of columns on the page.
* @param kwheadfoot The KWord header and footer.
* @param tabs The number of tabs.
* @param unit The unit to use for displaying the values to the user
*/
- KoPageLayoutDia( QWidget* parent, const char* name,
- const KoPageLayout& layout,
+ KoPageLayoutDia( TQWidget* tqparent, const char* name,
+ const KoPageLayout& tqlayout,
const KoHeadFoot& headfoot,
const KoColumns& columns,
const KoKWHeaderFooter& kwheadfoot,
@@ -126,26 +128,26 @@ public:
~KoPageLayoutDia();
/**
- * Show page layout dialog.
+ * Show page tqlayout dialog.
* See constructor for documentation on the parameters
*/
- static bool pageLayout( KoPageLayout&, KoHeadFoot&, int tabs, KoUnit::Unit& unit, QWidget* parent = 0 );
+ static bool pageLayout( KoPageLayout&, KoHeadFoot&, int tabs, KoUnit::Unit& unit, TQWidget* tqparent = 0 );
/**
- * Show page layout dialog.
+ * Show page tqlayout dialog.
* See constructor for documentation on the parameters
*/
- static bool pageLayout( KoPageLayout&, KoHeadFoot&, KoColumns&, KoKWHeaderFooter&, int tabs, KoUnit::Unit& unit, QWidget* parent = 0 );
+ static bool pageLayout( KoPageLayout&, KoHeadFoot&, KoColumns&, KoKWHeaderFooter&, int tabs, KoUnit::Unit& unit, TQWidget* tqparent = 0 );
/**
- * Retrieves a standard page layout.
+ * Retrieves a standard page tqlayout.
* Deprecated: better use KoPageLayout::standardLayout()
*/
static KDE_DEPRECATED KoPageLayout standardLayout();
/**
- * Returns the layout
+ * Returns the tqlayout
*/
- const KoPageLayout& layout() const { return m_layout; }
+ const KoPageLayout& tqlayout() const { return m_layout; }
/**
* Returns the header and footer information
@@ -168,14 +170,14 @@ private:
void setupTab4( const KoKWHeaderFooter kwhf );
// dialog objects
- QLineEdit *eHeadLeft;
- QLineEdit *eHeadMid;
- QLineEdit *eHeadRight;
- QLineEdit *eFootLeft;
- QLineEdit *eFootMid;
- QLineEdit *eFootRight;
-
- // layout
+ TQLineEdit *eHeadLeft;
+ TQLineEdit *eHeadMid;
+ TQLineEdit *eHeadRight;
+ TQLineEdit *eFootLeft;
+ TQLineEdit *eFootMid;
+ TQLineEdit *eFootRight;
+
+ // tqlayout
KoPageLayout m_layout;
KoColumns m_column;
@@ -187,7 +189,7 @@ protected slots:
virtual void slotOk();
private slots:
- void sizeUpdated(KoPageLayout &layout);
+ void sizeUpdated(KoPageLayout &tqlayout);
void columnsUpdated(KoColumns &columns);
private:
diff --git a/lib/kofficeui/KoPageLayoutHeader.cpp b/lib/kofficeui/KoPageLayoutHeader.cpp
index ad5e018c3..b436447b3 100644
--- a/lib/kofficeui/KoPageLayoutHeader.cpp
+++ b/lib/kofficeui/KoPageLayoutHeader.cpp
@@ -20,21 +20,21 @@
#include <KoPageLayoutHeader.moc>
#include <KoUnitWidgets.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
-KoPageLayoutHeader::KoPageLayoutHeader(QWidget *parent, KoUnit::Unit unit, const KoKWHeaderFooter &kwhf)
- : KoPageLayoutHeaderBase(parent) {
+KoPageLayoutHeader::KoPageLayoutHeader(TQWidget *tqparent, KoUnit::Unit unit, const KoKWHeaderFooter &kwhf)
+ : KoPageLayoutHeaderBase(tqparent) {
m_headerFooters = kwhf;
- QHBoxLayout *lay = new QHBoxLayout(headerSpacingPane);
+ TQHBoxLayout *lay = new TQHBoxLayout(headerSpacingPane);
m_headerSpacing = new KoUnitDoubleSpinBox( headerSpacingPane, 0.0, 999.0, 0.5, kwhf.ptHeaderBodySpacing, unit );
lay->addWidget(m_headerSpacing);
- lay = new QHBoxLayout(footerSpacingPane);
+ lay = new TQHBoxLayout(footerSpacingPane);
m_footerSpacing = new KoUnitDoubleSpinBox( footerSpacingPane, 0.0, 999.0, 0.5, kwhf.ptFooterBodySpacing, unit );
lay->addWidget(m_footerSpacing);
- lay = new QHBoxLayout(footnotePane);
+ lay = new TQHBoxLayout(footnotePane);
m_footnoteSpacing = new KoUnitDoubleSpinBox( footnotePane, 0.0, 999.0, 0.5, kwhf.ptFootNoteBodySpacing, unit );
lay->addWidget(m_footnoteSpacing);
diff --git a/lib/kofficeui/KoPageLayoutHeader.h b/lib/kofficeui/KoPageLayoutHeader.h
index 52239714b..f1f9664fc 100644
--- a/lib/kofficeui/KoPageLayoutHeader.h
+++ b/lib/kofficeui/KoPageLayoutHeader.h
@@ -16,14 +16,14 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef kopagelayoutheader_h
-#define kopagelayoutheader_h
+#ifndef kopagetqlayoutheader_h
+#define kopagetqlayoutheader_h
#include <KoUnit.h>
#include <KoPageLayout.h>
#include <KoPageLayoutHeaderBase.h>
-class QWidget;
+class TQWidget;
class KoUnitDoubleSpinBox;
class KoPagePreview;
@@ -32,15 +32,16 @@ class KoPagePreview;
*/
class KoPageLayoutHeader : public KoPageLayoutHeaderBase {
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Contructor
- * @param parent the parent widget
+ * @param tqparent the tqparent widget
* @param unit the unit-type (mm/cm/inch) that the dialog should show
* @param kwhf the data that this widget will be filled with initially
*/
- KoPageLayoutHeader(QWidget *parent, KoUnit::Unit unit, const KoKWHeaderFooter &kwhf);
+ KoPageLayoutHeader(TQWidget *tqparent, KoUnit::Unit unit, const KoKWHeaderFooter &kwhf);
/**
* @return the altered data as it is currently set by the user.
*/
diff --git a/lib/kofficeui/KoPageLayoutHeaderBase.ui b/lib/kofficeui/KoPageLayoutHeaderBase.ui
index d46ca98ec..4488c6f44 100644
--- a/lib/kofficeui/KoPageLayoutHeaderBase.ui
+++ b/lib/kofficeui/KoPageLayoutHeaderBase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KoPageLayoutHeaderBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KoPageLayoutHeaderBase</cstring>
</property>
@@ -16,7 +16,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox1</cstring>
</property>
@@ -27,7 +27,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>rhFirst</cstring>
</property>
@@ -35,7 +35,7 @@
<string>Different header for the first page</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>rhEvenOdd</cstring>
</property>
@@ -43,9 +43,9 @@
<string>Different header for even and odd pages</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>tqlayout1</cstring>
</property>
<hbox>
<property name="name">
@@ -61,14 +61,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -76,7 +76,7 @@
<string>Spacing between header and body:</string>
</property>
</widget>
- <widget class="QFrame">
+ <widget class="TQFrame">
<property name="name">
<cstring>headerSpacingPane</cstring>
</property>
@@ -91,7 +91,7 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox2</cstring>
</property>
@@ -102,7 +102,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>rfFirst</cstring>
</property>
@@ -110,7 +110,7 @@
<string>Different footer for the first page</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>rfEvenOdd</cstring>
</property>
@@ -118,9 +118,9 @@
<string>Different footer for even and odd pages</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<hbox>
<property name="name">
@@ -136,14 +136,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>41</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -151,7 +151,7 @@
<string>Spacing between footer and body:</string>
</property>
</widget>
- <widget class="QFrame">
+ <widget class="TQFrame">
<property name="name">
<cstring>footerSpacingPane</cstring>
</property>
@@ -166,7 +166,7 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox3</cstring>
</property>
@@ -187,14 +187,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel5</cstring>
</property>
@@ -202,7 +202,7 @@
<string>Spacing between footnote and body:</string>
</property>
</widget>
- <widget class="QFrame">
+ <widget class="TQFrame">
<property name="name">
<cstring>footnotePane</cstring>
</property>
@@ -217,5 +217,5 @@
</widget>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/lib/kofficeui/KoPageLayoutSize.cpp b/lib/kofficeui/KoPageLayoutSize.cpp
index 6fdb23e62..c58685744 100644
--- a/lib/kofficeui/KoPageLayoutSize.cpp
+++ b/lib/kofficeui/KoPageLayoutSize.cpp
@@ -27,143 +27,143 @@
#include <kmessagebox.h>
#include <kdebug.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qhbox.h>
-#include <qvgroupbox.h>
-#include <qhbuttongroup.h>
-
-KoPageLayoutSize::KoPageLayoutSize(QWidget *parent, const KoPageLayout& layout, KoUnit::Unit unit,const KoColumns& columns, bool unitChooser, bool enableBorders)
- : QWidget(parent), m_blockSignals(false) {
- m_layout = layout;
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqhbox.h>
+#include <tqvgroupbox.h>
+#include <tqhbuttongroup.h>
+
+KoPageLayoutSize::KoPageLayoutSize(TQWidget *tqparent, const KoPageLayout& tqlayout, KoUnit::Unit unit,const KoColumns& columns, bool unitChooser, bool enableBorders)
+ : TQWidget(tqparent), m_blockSignals(false) {
+ m_layout = tqlayout;
m_unit = unit;
- QGridLayout *grid1 = new QGridLayout( this, 5, 2, 0, KDialog::spacingHint() );
+ TQGridLayout *grid1 = new TQGridLayout( this, 5, 2, 0, KDialog::spacingHint() );
if ( unitChooser ) {
// ------------- unit _______________
- QWidget* unitFrame = new QWidget( this );
- grid1->addWidget( unitFrame, 0, 0, Qt::AlignLeft );
- QBoxLayout* unitLayout = new QHBoxLayout( unitFrame, 0, KDialog::spacingHint() );
+ TQWidget* unitFrame = new TQWidget( this );
+ grid1->addWidget( unitFrame, 0, 0, TQt::AlignLeft );
+ TQBoxLayout* unitLayout = new TQHBoxLayout( unitFrame, 0, KDialog::spacingHint() );
// label unit
- QLabel *lpgUnit = new QLabel( i18n( "Unit:" ), unitFrame );
- unitLayout->addWidget( lpgUnit, 0, Qt::AlignRight | Qt::AlignVCenter );
+ TQLabel *lpgUnit = new TQLabel( i18n( "Unit:" ), unitFrame );
+ unitLayout->addWidget( lpgUnit, 0, TQt::AlignRight | TQt::AlignVCenter );
// combo unit
- QComboBox *cpgUnit = new QComboBox( false, unitFrame, "cpgUnit" );
+ TQComboBox *cpgUnit = new TQComboBox( false, unitFrame, "cpgUnit" );
lpgUnit->setBuddy( cpgUnit );
cpgUnit->insertStringList( KoUnit::listOfUnitName() );
cpgUnit->setCurrentItem( unit );
- unitLayout->addWidget( cpgUnit, 0, Qt::AlignLeft | Qt::AlignVCenter );
- connect( cpgUnit, SIGNAL( activated( int ) ), this, SLOT( setUnitInt( int ) ) );
+ unitLayout->addWidget( cpgUnit, 0, TQt::AlignLeft | TQt::AlignVCenter );
+ connect( cpgUnit, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( setUnitInt( int ) ) );
}
else {
- QString str=KoUnit::unitDescription(unit);
+ TQString str=KoUnit::unitDescription(unit);
- QLabel *lpgUnit = new QLabel( i18n("All values are given in %1.").arg(str), this );
- grid1->addWidget( lpgUnit, 0, 0, Qt::AlignLeft );
+ TQLabel *lpgUnit = new TQLabel( i18n("All values are given in %1.").tqarg(str), this );
+ grid1->addWidget( lpgUnit, 0, 0, TQt::AlignLeft );
}
// -------------- page size -----------------
- QVGroupBox *formatFrame = new QVGroupBox( i18n( "Page Size" ), this );
+ TQVGroupBox *formatFrame = new TQVGroupBox( i18n( "Page Size" ), this );
grid1->addWidget( formatFrame, 1, 0 );
- QHBox *formatPageSize = new QHBox( formatFrame );
+ TQHBox *formatPageSize = new TQHBox( formatFrame );
formatPageSize->setSpacing( KDialog::spacingHint() );
// label page size
- QLabel *lpgFormat = new QLabel( i18n( "&Size:" ), formatPageSize );
+ TQLabel *lpgFormat = new TQLabel( i18n( "&Size:" ), formatPageSize );
// combo size
- cpgFormat = new QComboBox( false, formatPageSize, "cpgFormat" );
+ cpgFormat = new TQComboBox( false, formatPageSize, "cpgFormat" );
cpgFormat->insertStringList( KoPageFormat::allFormats() );
lpgFormat->setBuddy( cpgFormat );
- connect( cpgFormat, SIGNAL( activated( int ) ), this, SLOT( formatChanged( int ) ) );
+ connect( cpgFormat, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( formatChanged( int ) ) );
// spacer
- formatPageSize->setStretchFactor( new QWidget( formatPageSize ), 10 );
+ formatPageSize->setStretchFactor( new TQWidget( formatPageSize ), 10 );
- QHBox *formatCustomSize = new QHBox( formatFrame );
+ TQHBox *formatCustomSize = new TQHBox( formatFrame );
formatCustomSize->setSpacing( KDialog::spacingHint() );
// label width
- QLabel *lpgWidth = new QLabel( i18n( "&Width:" ), formatCustomSize );
+ TQLabel *lpgWidth = new TQLabel( i18n( "&Width:" ), formatCustomSize );
// linedit width
epgWidth = new KoUnitDoubleSpinBox( formatCustomSize, "Width" );
lpgWidth->setBuddy( epgWidth );
if ( m_layout.format != PG_CUSTOM )
epgWidth->setEnabled( false );
- connect( epgWidth, SIGNAL( valueChangedPt(double) ), this, SLOT( widthChanged(double) ) );
+ connect( epgWidth, TQT_SIGNAL( valueChangedPt(double) ), this, TQT_SLOT( widthChanged(double) ) );
// label height
- QLabel *lpgHeight = new QLabel( i18n( "&Height:" ), formatCustomSize );
+ TQLabel *lpgHeight = new TQLabel( i18n( "&Height:" ), formatCustomSize );
// linedit height
epgHeight = new KoUnitDoubleSpinBox( formatCustomSize, "Height" );
lpgHeight->setBuddy( epgHeight );
if ( m_layout.format != PG_CUSTOM )
epgHeight->setEnabled( false );
- connect( epgHeight, SIGNAL( valueChangedPt(double ) ), this, SLOT( heightChanged(double) ) );
+ connect( epgHeight, TQT_SIGNAL( valueChangedPt(double ) ), this, TQT_SLOT( heightChanged(double) ) );
// --------------- orientation ---------------
- m_orientGroup = new QHButtonGroup( i18n( "Orientation" ), this );
+ m_orientGroup = new TQHButtonGroup( i18n( "Qt::Orientation" ), this );
m_orientGroup->setInsideSpacing( KDialog::spacingHint() );
grid1->addWidget( m_orientGroup, 2, 0 );
- QLabel* lbPortrait = new QLabel( m_orientGroup );
- lbPortrait->setPixmap( QPixmap( UserIcon( "koPortrait" ) ) );
+ TQLabel* lbPortrait = new TQLabel( m_orientGroup );
+ lbPortrait->setPixmap( TQPixmap( UserIcon( "koPortrait" ) ) );
lbPortrait->setMaximumWidth( lbPortrait->pixmap()->width() );
- new QRadioButton( i18n("&Portrait"), m_orientGroup );
+ new TQRadioButton( i18n("&Portrait"), m_orientGroup );
- QLabel* lbLandscape = new QLabel( m_orientGroup );
- lbLandscape->setPixmap( QPixmap( UserIcon( "koLandscape" ) ) );
+ TQLabel* lbLandscape = new TQLabel( m_orientGroup );
+ lbLandscape->setPixmap( TQPixmap( UserIcon( "koLandscape" ) ) );
lbLandscape->setMaximumWidth( lbLandscape->pixmap()->width() );
- new QRadioButton( i18n("La&ndscape"), m_orientGroup );
+ new TQRadioButton( i18n("La&ndscape"), m_orientGroup );
- connect( m_orientGroup, SIGNAL (clicked (int)), this, SLOT( orientationChanged(int) ));
+ connect( m_orientGroup, TQT_SIGNAL (clicked (int)), this, TQT_SLOT( orientationChanged(int) ));
// --------------- page margins ---------------
- QVGroupBox *marginsFrame = new QVGroupBox( i18n( "Margins" ), this );
+ TQVGroupBox *marginsFrame = new TQVGroupBox( i18n( "Margins" ), this );
marginsFrame->setColumnLayout( 0, Qt::Vertical );
marginsFrame->setMargin( KDialog::marginHint() );
grid1->addWidget( marginsFrame, 3, 0 );
- QGridLayout *marginsLayout = new QGridLayout( marginsFrame->layout(), 3, 3,
+ TQGridLayout *marginsLayout = new TQGridLayout( marginsFrame->tqlayout(), 3, 3,
KDialog::spacingHint() );
// left margin
ebrLeft = new KoUnitDoubleSpinBox( marginsFrame, "Left" );
marginsLayout->addWidget( ebrLeft, 1, 0 );
- connect( ebrLeft, SIGNAL( valueChangedPt( double ) ), this, SLOT( leftChanged( double ) ) );
+ connect( ebrLeft, TQT_SIGNAL( valueChangedPt( double ) ), this, TQT_SLOT( leftChanged( double ) ) );
// right margin
ebrRight = new KoUnitDoubleSpinBox( marginsFrame, "Right" );
marginsLayout->addWidget( ebrRight, 1, 2 );
- connect( ebrRight, SIGNAL( valueChangedPt( double ) ), this, SLOT( rightChanged( double ) ) );
+ connect( ebrRight, TQT_SIGNAL( valueChangedPt( double ) ), this, TQT_SLOT( rightChanged( double ) ) );
// top margin
ebrTop = new KoUnitDoubleSpinBox( marginsFrame, "Top" );
- marginsLayout->addWidget( ebrTop, 0, 1 , Qt::AlignCenter );
- connect( ebrTop, SIGNAL( valueChangedPt( double ) ), this, SLOT( topChanged( double ) ) );
+ marginsLayout->addWidget( ebrTop, 0, 1 , TQt::AlignCenter );
+ connect( ebrTop, TQT_SIGNAL( valueChangedPt( double ) ), this, TQT_SLOT( topChanged( double ) ) );
// bottom margin
ebrBottom = new KoUnitDoubleSpinBox( marginsFrame, "Bottom" );
- marginsLayout->addWidget( ebrBottom, 2, 1, Qt::AlignCenter );
- connect( ebrBottom, SIGNAL( valueChangedPt( double ) ), this, SLOT( bottomChanged( double ) ) );
+ marginsLayout->addWidget( ebrBottom, 2, 1, TQt::AlignCenter );
+ connect( ebrBottom, TQT_SIGNAL( valueChangedPt( double ) ), this, TQT_SLOT( bottomChanged( double ) ) );
// ------------- preview -----------
pgPreview = new KoPagePreview( this, "Preview", m_layout );
grid1->addMultiCellWidget( pgPreview, 1, 3, 1, 1 );
// ------------- spacers -----------
- QWidget* spacer1 = new QWidget( this );
- QWidget* spacer2 = new QWidget( this );
- spacer1->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,
- QSizePolicy::Expanding ) );
- spacer2->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,
- QSizePolicy::Expanding ) );
+ TQWidget* spacer1 = new TQWidget( this );
+ TQWidget* spacer2 = new TQWidget( this );
+ spacer1->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding,
+ TQSizePolicy::Expanding ) );
+ spacer2->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding,
+ TQSizePolicy::Expanding ) );
grid1->addWidget( spacer1, 4, 0 );
grid1->addWidget( spacer2, 4, 1 );
diff --git a/lib/kofficeui/KoPageLayoutSize.h b/lib/kofficeui/KoPageLayoutSize.h
index ebdf49b62..aa5f23bd7 100644
--- a/lib/kofficeui/KoPageLayoutSize.h
+++ b/lib/kofficeui/KoPageLayoutSize.h
@@ -17,37 +17,38 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef kopagelayoutsize_h
-#define kopagelayoutsize_h
+#ifndef kopagetqlayoutsize_h
+#define kopagetqlayoutsize_h
-#include <qgroupbox.h>
+#include <tqgroupbox.h>
#include <KoGlobal.h>
#include <KoUnit.h>
#include <kdialogbase.h>
#include <KoPageLayout.h>
#include <KoPageLayoutDia.h>
-class QComboBox;
+class TQComboBox;
class KoUnitDoubleSpinBox;
class KoPageLayoutColumns;
/**
* This class is a widget that shows the KoPageLayout data structure and allows the user to change it.
*/
-class KoPageLayoutSize : public QWidget {
+class KoPageLayoutSize : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Contructor
- * @param parent the parent widget
- * @param layout the page layout that this widget should be initialzed with.
+ * @param tqparent the tqparent widget
+ * @param tqlayout the page tqlayout that this widget should be initialzed with.
* @param unit the unit-type (mm/cm/inch) that the dialog should show
* @param columns the KoColumns (amout of columns) that the preview should be initialized with
* @param unitChooser if true a combobox with the unit-type is shown for the user to change
* @param enableBorders if true enable the user to change the margins (aka borders) of the page
*/
- KoPageLayoutSize(QWidget *parent, const KoPageLayout& layout, KoUnit::Unit unit,
+ KoPageLayoutSize(TQWidget *tqparent, const KoPageLayout& tqlayout, KoUnit::Unit unit,
const KoColumns& columns, bool unitChooser, bool enableBorders);
/**
@@ -77,14 +78,14 @@ public slots:
signals:
/**
* Emitted whenever the user changed something in the dialog.
- * @param layout the update layout structure with currently displayed info.
+ * @param tqlayout the update tqlayout structure with currently displayed info.
* Note that the info may not be fully correct and physically possible (in which
* case queryClose will return false)
*/
- void propertyChange(KoPageLayout &layout);
+ void propertyChange(KoPageLayout &tqlayout);
protected:
- QComboBox *cpgFormat;
+ TQComboBox *cpgFormat;
KoUnitDoubleSpinBox *epgWidth;
KoUnitDoubleSpinBox *epgHeight;
KoUnitDoubleSpinBox *ebrLeft;
@@ -92,7 +93,7 @@ protected:
KoUnitDoubleSpinBox *ebrTop;
KoUnitDoubleSpinBox *ebrBottom;
KoPagePreview *pgPreview;
- QButtonGroup *m_orientGroup;
+ TQButtonGroup *m_orientGroup;
protected slots:
void formatChanged( int );
diff --git a/lib/kofficeui/KoPartSelectAction.cpp b/lib/kofficeui/KoPartSelectAction.cpp
index f6795cf9c..0e5747256 100644
--- a/lib/kofficeui/KoPartSelectAction.cpp
+++ b/lib/kofficeui/KoPartSelectAction.cpp
@@ -21,26 +21,26 @@
#include <kdebug.h>
-KoPartSelectAction::KoPartSelectAction( const QString& text, QObject* parent, const char* name )
- : KActionMenu( text, parent, name )
+KoPartSelectAction::KoPartSelectAction( const TQString& text, TQObject* tqparent, const char* name )
+ : KActionMenu( text, tqparent, name )
{
init();
}
-KoPartSelectAction::KoPartSelectAction( const QString& text, const QString& icon,
- QObject* parent, const char* name )
- : KActionMenu( text, icon, parent, name )
+KoPartSelectAction::KoPartSelectAction( const TQString& text, const TQString& icon,
+ TQObject* tqparent, const char* name )
+ : KActionMenu( text, icon, tqparent, name )
{
init();
}
-KoPartSelectAction::KoPartSelectAction( const QString& text, const QString& icon,
- QObject* receiver, const char* slot,
- QObject* parent, const char* name )
- : KActionMenu( text, icon, parent, name )
+KoPartSelectAction::KoPartSelectAction( const TQString& text, const TQString& icon,
+ TQObject* receiver, const char* slot,
+ TQObject* tqparent, const char* name )
+ : KActionMenu( text, icon, tqparent, name )
{
if (receiver)
- connect( this, SIGNAL( activated() ), receiver, slot );
+ connect( this, TQT_SIGNAL( activated() ), receiver, slot );
init();
}
@@ -48,12 +48,12 @@ void KoPartSelectAction::init()
{
// Query for documents
m_lstEntries = KoDocumentEntry::query();
- QValueList<KoDocumentEntry>::Iterator it = m_lstEntries.begin();
+ TQValueList<KoDocumentEntry>::Iterator it = m_lstEntries.begin();
for( ; it != m_lstEntries.end(); ++it ) {
KService::Ptr serv = (*it).service();
if (!serv->genericName().isEmpty()) {
- KAction *action = new KAction( serv->genericName().replace('&',"&&"), serv->icon(), 0,
- this, SLOT( slotActionActivated() ),
+ KAction *action = new KAction( serv->genericName().tqreplace('&',"&&"), serv->icon(), 0,
+ this, TQT_SLOT( slotActionActivated() ),
parentCollection(), serv->name().latin1() );
insert( action );
}
@@ -64,7 +64,7 @@ void KoPartSelectAction::init()
// Called when selecting a part
void KoPartSelectAction::slotActionActivated()
{
- QString servName = QString::fromLatin1( sender()->name() );
+ TQString servName = TQString::tqfromLatin1( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() );
KService::Ptr serv = KService::serviceByName( servName );
m_documentEntry = KoDocumentEntry( serv );
emit activated();
diff --git a/lib/kofficeui/KoPartSelectAction.h b/lib/kofficeui/KoPartSelectAction.h
index 4926dd9e9..f6a69e737 100644
--- a/lib/kofficeui/KoPartSelectAction.h
+++ b/lib/kofficeui/KoPartSelectAction.h
@@ -30,17 +30,18 @@
class KOFFICEUI_EXPORT KoPartSelectAction : public KActionMenu
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoPartSelectAction( const QString& text, QObject* parent = 0, const char* name = 0 );
- KoPartSelectAction( const QString& text, const QString& icon,
- QObject* parent = 0, const char* name = 0 );
- KoPartSelectAction( const QString& text, const QString& icon,
- QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
+ KoPartSelectAction( const TQString& text, TQObject* tqparent = 0, const char* name = 0 );
+ KoPartSelectAction( const TQString& text, const TQString& icon,
+ TQObject* tqparent = 0, const char* name = 0 );
+ KoPartSelectAction( const TQString& text, const TQString& icon,
+ TQObject* receiver, const char* slot, TQObject* tqparent, const char* name = 0 );
KoDocumentEntry documentEntry() const { return m_documentEntry; }
- //virtual void plug(QWidget* widget, int index);
+ //virtual void plug(TQWidget* widget, int index);
protected:
void init();
@@ -50,7 +51,7 @@ protected slots:
void slotActionActivated();
private:
- QValueList<KoDocumentEntry> m_lstEntries;
+ TQValueList<KoDocumentEntry> m_lstEntries;
KoDocumentEntry m_documentEntry;
};
diff --git a/lib/kofficeui/KoPartSelectDia.cpp b/lib/kofficeui/KoPartSelectDia.cpp
index 773d1b886..4c3e376ec 100644
--- a/lib/kofficeui/KoPartSelectDia.cpp
+++ b/lib/kofficeui/KoPartSelectDia.cpp
@@ -21,7 +21,7 @@
#include <kiconloader.h>
#include <klocale.h>
-#include <qlistview.h>
+#include <tqlistview.h>
/****************************************************
*
@@ -29,37 +29,37 @@
*
****************************************************/
-KoPartSelectDia::KoPartSelectDia( QWidget* parent, const char* name ) :
- KDialogBase( parent, name, TRUE, i18n("Insert Object"), KDialogBase::Ok | KDialogBase::Cancel )
+KoPartSelectDia::KoPartSelectDia( TQWidget* tqparent, const char* name ) :
+ KDialogBase( tqparent, name, TRUE, i18n("Insert Object"), KDialogBase::Ok | KDialogBase::Cancel )
{
- listview = new QListView( this );
+ listview = new TQListView( this );
listview->addColumn( i18n( "Object" ) );
listview->addColumn( i18n( "Comment" ) );
listview->setAllColumnsShowFocus( TRUE );
listview->setShowSortIndicator( TRUE );
setMainWidget( listview );
- connect( listview, SIGNAL( doubleClicked( QListViewItem * ) ),
- this, SLOT( slotOk() ) );
- connect( listview, SIGNAL( selectionChanged( QListViewItem * ) ),
- this, SLOT( selectionChanged( QListViewItem * ) ) );
+ connect( listview, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ),
+ this, TQT_SLOT( slotOk() ) );
+ connect( listview, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ),
+ this, TQT_SLOT( selectionChanged( TQListViewItem * ) ) );
// Query for documents
m_lstEntries = KoDocumentEntry::query();
- QValueList<KoDocumentEntry>::Iterator it = m_lstEntries.begin();
+ TQValueList<KoDocumentEntry>::Iterator it = m_lstEntries.begin();
for( ; it != m_lstEntries.end(); ++it ) {
KService::Ptr serv = (*it).service();
if (!serv->genericName().isEmpty()) {
- QListViewItem *item = new QListViewItem( listview, serv->name(), serv->genericName() );
+ TQListViewItem *item = new TQListViewItem( listview, serv->name(), serv->genericName() );
item->setPixmap( 0, SmallIcon( serv->icon() ) );
}
}
selectionChanged( 0 );
setFocus();
- resize( listview->sizeHint().width() + 20, 300 );
+ resize( listview->tqsizeHint().width() + 20, 300 );
}
-void KoPartSelectDia::selectionChanged( QListViewItem *item )
+void KoPartSelectDia::selectionChanged( TQListViewItem *item )
{
enableButtonOK( item != 0 );
}
@@ -67,7 +67,7 @@ void KoPartSelectDia::selectionChanged( QListViewItem *item )
KoDocumentEntry KoPartSelectDia::entry()
{
if ( listview->currentItem() ) {
- QValueList<KoDocumentEntry>::Iterator it = m_lstEntries.begin();
+ TQValueList<KoDocumentEntry>::Iterator it = m_lstEntries.begin();
for ( ; it != m_lstEntries.end(); ++it ) {
if ( ( *it ).service()->name() == listview->currentItem()->text( 0 ) )
return *it;
@@ -76,13 +76,13 @@ KoDocumentEntry KoPartSelectDia::entry()
return KoDocumentEntry();
}
-KoDocumentEntry KoPartSelectDia::selectPart( QWidget *parent )
+KoDocumentEntry KoPartSelectDia::selectPart( TQWidget *tqparent )
{
KoDocumentEntry e;
- KoPartSelectDia *dlg = new KoPartSelectDia( parent, "PartSelect" );
+ KoPartSelectDia *dlg = new KoPartSelectDia( tqparent, "PartSelect" );
dlg->setFocus();
- if (dlg->exec() == QDialog::Accepted)
+ if (dlg->exec() == TQDialog::Accepted)
e = dlg->entry();
delete dlg;
diff --git a/lib/kofficeui/KoPartSelectDia.h b/lib/kofficeui/KoPartSelectDia.h
index b7af305d4..f131a857a 100644
--- a/lib/kofficeui/KoPartSelectDia.h
+++ b/lib/kofficeui/KoPartSelectDia.h
@@ -23,9 +23,9 @@
#include <kdialogbase.h>
#include <KoQueryTrader.h>
-class QListView;
-class QListViewItem;
-class QPushButton;
+class TQListView;
+class TQListViewItem;
+class TQPushButton;
/**
* This dialog presents the user all available
@@ -36,13 +36,14 @@ class QPushButton;
class KOFFICEUI_EXPORT KoPartSelectDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
*/
- KoPartSelectDia( QWidget* parent = 0, const char* name = 0 );
+ KoPartSelectDia( TQWidget* tqparent = 0, const char* name = 0 );
/**
* Retrieves the result of the part selection.
@@ -57,14 +58,14 @@ public:
* @returns the KoDocumentEntry of the selected KOffice components
* or an empty entry.
*/
- static KoDocumentEntry selectPart( QWidget *parent = 0L );
+ static KoDocumentEntry selectPart( TQWidget *tqparent = 0L );
private slots:
- void selectionChanged( QListViewItem * );
+ void selectionChanged( TQListViewItem * );
private:
- QValueList<KoDocumentEntry> m_lstEntries;
- QListView *listview;
+ TQValueList<KoDocumentEntry> m_lstEntries;
+ TQListView *listview;
};
#endif
diff --git a/lib/kofficeui/KoPen.cpp b/lib/kofficeui/KoPen.cpp
index 4fa77af1f..c1aad91e8 100644
--- a/lib/kofficeui/KoPen.cpp
+++ b/lib/kofficeui/KoPen.cpp
@@ -22,21 +22,21 @@
#include <../kotext/KoTextZoomHandler.h>
KoPen::KoPen()
- : QPen()
+ : TQPen()
{
m_pointWidth = 1.0;
}
-KoPen::KoPen(const QColor& _color, double _pointWidth, Qt::PenStyle _style)
- : QPen()
+KoPen::KoPen(const TQColor& _color, double _pointWidth, Qt::PenStyle _style)
+ : TQPen()
{
setColor(_color);
setPointWidth(_pointWidth);
setStyle(_style);
}
-KoPen::KoPen(const QColor& _color)
- : QPen(_color)
+KoPen::KoPen(const TQColor& _color)
+ : TQPen(_color)
{
m_pointWidth = 1.0;
}
@@ -60,9 +60,9 @@ void KoPen::setPointWidth(double w)
m_pointWidth = w;
}
-QPen KoPen::zoomedPen(KoZoomHandler* zoomHandler)
+TQPen KoPen::zoomedPen(KoZoomHandler* zoomHandler)
{
- QPen pen = *this;
+ TQPen pen = *this;
pen.setWidth(zoomHandler->zoomItY(m_pointWidth));
return pen;
diff --git a/lib/kofficeui/KoPen.h b/lib/kofficeui/KoPen.h
index 87124cef9..84a7ea668 100644
--- a/lib/kofficeui/KoPen.h
+++ b/lib/kofficeui/KoPen.h
@@ -20,19 +20,19 @@
#ifndef KOPEN_H
#define KOPEN_H
-#include <qpen.h>
+#include <tqpen.h>
class KoZoomHandler;
/**
* Pen that handles line widths in points
*/
-class KoPen : public QPen
+class KoPen : public TQPen
{
public:
KoPen();
- KoPen(const QColor& _color, double _pointWidth, Qt::PenStyle _style);
- KoPen(const QColor& _color);
+ KoPen(const TQColor& _color, double _pointWidth, Qt::PenStyle _style);
+ KoPen(const TQColor& _color);
~KoPen();
/**
@@ -58,8 +58,8 @@ class KoPen : public QPen
/// KoPen width in points
double pointWidth() const { return m_pointWidth; }
- /// Returns a zoomed QPen
- QPen zoomedPen(KoZoomHandler* zoomHandler);
+ /// Returns a zoomed TQPen
+ TQPen zoomedPen(KoZoomHandler* zoomHandler);
private:
double m_pointWidth;
diff --git a/lib/kofficeui/KoPictureFilePreview.cpp b/lib/kofficeui/KoPictureFilePreview.cpp
index 7f27b9402..fade4e9a6 100644
--- a/lib/kofficeui/KoPictureFilePreview.cpp
+++ b/lib/kofficeui/KoPictureFilePreview.cpp
@@ -23,11 +23,11 @@
#include <kdialog.h>
#include <klocale.h>
#include <kurl.h>
-#include <qbitmap.h>
-#include <qlayout.h>
-#include <qfileinfo.h>
-#include <qpainter.h>
-#include <qscrollview.h>
+#include <tqbitmap.h>
+#include <tqlayout.h>
+#include <tqfileinfo.h>
+#include <tqpainter.h>
+#include <tqscrollview.h>
#include <kdebug.h>
@@ -38,11 +38,11 @@
* It is a scrollview, to have scrollbars if the image is big,
* and it supports both pixmaps and cliparts
*/
-class KoPictureFilePreviewWidget : public QScrollView
+class KoPictureFilePreviewWidget : public TQScrollView
{
public:
- KoPictureFilePreviewWidget( QWidget *parent )
- : QScrollView( parent ) { viewport()->setBackgroundMode( PaletteBase ); }
+ KoPictureFilePreviewWidget( TQWidget *tqparent )
+ : TQScrollView( tqparent ) { viewport()->setBackgroundMode( PaletteBase ); }
bool setPicture( const KURL& url )
{
@@ -65,33 +65,33 @@ public:
m_size = picture.getOriginalSize();
m_picture = picture;
resizeContents( m_size.width(), m_size.height() );
- repaintContents();
+ tqrepaintContents();
return true;
}
void setNullPicture(void)
{
m_picture=KoPicture();
- m_size=QSize();
+ m_size=TQSize();
}
- void drawContents( QPainter *p, int, int, int, int )
+ void drawContents( TQPainter *p, int, int, int, int )
{
- p->setBackgroundColor( Qt::white );
+ p->setBackgroundColor( TQt::white );
// Be sure that the background is white (for transparency)
- p->fillRect(0, 0, m_size.width(), m_size.height(), QBrush( Qt::white ));
+ p->fillRect(0, 0, m_size.width(), m_size.height(), TQBrush( TQt::white ));
m_picture.draw( *p, 0 ,0, m_size.width(), m_size.height());
}
private:
KoPicture m_picture;
- QSize m_size;
+ TQSize m_size;
};
-KoPictureFilePreview::KoPictureFilePreview( QWidget *parent )
- : KPreviewWidgetBase( parent )
+KoPictureFilePreview::KoPictureFilePreview( TQWidget *tqparent )
+ : KPreviewWidgetBase( tqparent )
{
- QVBoxLayout *vb = new QVBoxLayout( this, KDialog::marginHint() );
+ TQVBoxLayout *vb = new TQVBoxLayout( this, KDialog::marginHint() );
m_widget = new KoPictureFilePreviewWidget( this );
vb->addWidget( m_widget, 1 );
}
@@ -106,14 +106,14 @@ void KoPictureFilePreview::clearPreview()
m_widget->setNullPicture();
}
-QString KoPictureFilePreview::clipartPattern()
+TQString KoPictureFilePreview::clipartPattern()
{
return i18n( "*.svg *.wmf *.qpic|Clipart (*.svg *.wmf *.qpic)" );
}
-QStringList KoPictureFilePreview::clipartMimeTypes()
+TQStringList KoPictureFilePreview::clipartMimeTypes()
{
- QStringList lst;
+ TQStringList lst;
lst << "image/svg+xml";
lst << "image/x-wmf";
lst << "image/x-vnd.trolltech.qpicture";
diff --git a/lib/kofficeui/KoPictureFilePreview.h b/lib/kofficeui/KoPictureFilePreview.h
index 28d6a3e69..820f9b10a 100644
--- a/lib/kofficeui/KoPictureFilePreview.h
+++ b/lib/kofficeui/KoPictureFilePreview.h
@@ -33,9 +33,10 @@ class KoPictureFilePreviewWidget;
class KOFFICEUI_EXPORT KoPictureFilePreview : public KPreviewWidgetBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoPictureFilePreview( QWidget *parent );
+ KoPictureFilePreview( TQWidget *tqparent );
/**
* @return a list of patterns of all supported clipart formats.
@@ -43,12 +44,12 @@ public:
* These patterns can be passed to KFileDialog::getOpenFileName
* for instance.
*/
- static QString clipartPattern();
+ static TQString clipartPattern();
/**
* @return list of mimetypes for all supported clipart formats.
*/
- static QStringList clipartMimeTypes();
+ static TQStringList clipartMimeTypes();
public slots:
virtual void showPreview(const KURL &url);
diff --git a/lib/kofficeui/KoRuler.cpp b/lib/kofficeui/KoRuler.cpp
index e0ced4662..8e936874b 100644
--- a/lib/kofficeui/KoRuler.cpp
+++ b/lib/kofficeui/KoRuler.cpp
@@ -26,10 +26,10 @@
#include <kglobalsettings.h>
#include <kdebug.h>
#include <kiconloader.h>
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qpopupmenu.h>
-#include <qtooltip.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqpopupmenu.h>
+#include <tqtooltip.h>
#include <KoPageLayout.h>
class KoRulerPrivate {
@@ -38,13 +38,13 @@ public:
}
~KoRulerPrivate() {}
- QWidget *canvas;
+ TQWidget *canvas;
int flags;
int oldMx, oldMy;
bool whileMovingBorderLeft, whileMovingBorderRight;
bool whileMovingBorderTop, whileMovingBorderBottom;
- QPixmap pmFirst, pmLeft;
- KoPageLayout layout;
+ TQPixmap pmFirst, pmLeft;
+ KoPageLayout tqlayout;
KoTabChooser *tabChooser;
KoTabulatorList tabList;
// Do we have to remove a certain tab in the DC Event?
@@ -53,7 +53,7 @@ public:
KoTabulator currTab;
// The action we're currently doing - basically only valid between press and release time
KoRuler::Action action;
- QPopupMenu *rb_menu;
+ TQPopupMenu *rb_menu;
int mRemoveTab, mPageLayout; // menu item ids
int frameEnd;
double i_right;
@@ -79,9 +79,9 @@ const int KoRuler::F_HELPLINES = 4;
const int KoRuler::F_NORESIZE = 8;
/*================================================================*/
-KoRuler::KoRuler( QWidget *_parent, QWidget *_canvas, Orientation _orientation,
+KoRuler::KoRuler( TQWidget *_parent, TQWidget *_canvas, Qt::Orientation _orientation,
const KoPageLayout& _layout, int _flags, KoUnit::Unit _unit, KoTabChooser *_tabChooser )
- : QFrame( _parent ), buffer( width(), height() ), m_zoom(1.0), m_1_zoom(1.0),
+ : TQFrame( _parent ), buffer( width(), height() ), m_zoom(1.0), m_1_zoom(1.0),
m_unit( _unit )
{
setWFlags( WResizeNoErase | WRepaintNoErase );
@@ -93,7 +93,7 @@ KoRuler::KoRuler( QWidget *_parent, QWidget *_canvas, Orientation _orientation,
d->canvas = _canvas;
orientation = _orientation;
- d->layout = _layout;
+ d->tqlayout = _layout;
d->flags = _flags;
d->m_bReadWrite=true;
@@ -125,18 +125,18 @@ KoRuler::KoRuler( QWidget *_parent, QWidget *_canvas, Orientation _orientation,
d->removeTab.type = T_INVALID;
if ( orientation == Qt::Horizontal ) {
- frameStart = qRound( zoomIt(d->layout.ptLeft) );
- d->frameEnd = qRound( zoomIt(d->layout.ptWidth - d->layout.ptRight) );
+ frameStart = tqRound( zoomIt(d->tqlayout.ptLeft) );
+ d->frameEnd = tqRound( zoomIt(d->tqlayout.ptWidth - d->tqlayout.ptRight) );
} else {
- frameStart = qRound( zoomIt(d->layout.ptTop) );
- d->frameEnd = qRound( zoomIt(d->layout.ptHeight - d->layout.ptBottom) );
+ frameStart = tqRound( zoomIt(d->tqlayout.ptTop) );
+ d->frameEnd = tqRound( zoomIt(d->tqlayout.ptHeight - d->tqlayout.ptBottom) );
}
m_bFrameStartSet = false;
setupMenu();
// For compatibility, emitting doubleClicked shall emit openPageLayoutDia
- connect( this, SIGNAL( doubleClicked() ), this, SIGNAL( openPageLayoutDia() ) );
+ connect( this, TQT_SIGNAL( doubleClicked() ), this, TQT_SIGNAL( openPageLayoutDia() ) );
}
/*================================================================*/
@@ -156,8 +156,8 @@ void KoRuler::setMousePos( int mx, int my )
{
if ( !showMPos || ( mx == mposX && my == mposY ) ) return;
- QPainter p( this );
- p.setRasterOp( Qt::NotROP );
+ TQPainter p( this );
+ p.setRasterOp( TQt::NotROP );
if ( orientation == Qt::Horizontal ) {
if ( hasToDelete )
@@ -201,23 +201,23 @@ double KoRuler::lineDistance() const
}
/*================================================================*/
-void KoRuler::drawHorizontal( QPainter *_painter )
+void KoRuler::drawHorizontal( TQPainter *_painter )
{
- QFont font = KGlobalSettings::toolBarFont();
- QFontMetrics fm( font );
- resize( width(), QMAX( fm.height() + 4, 20 ) );
+ TQFont font = KGlobalSettings::toolBarFont();
+ TQFontMetrics fm( font );
+ resize( width(), TQMAX( fm.height() + 4, 20 ) );
// Use a double-buffer pixmap
- QPainter p( &buffer );
- p.fillRect( 0, 0, width(), height(), QBrush( colorGroup().brush( QColorGroup::Background ) ) );
+ TQPainter p( &buffer );
+ p.fillRect( 0, 0, width(), height(), TQBrush( tqcolorGroup().brush( TQColorGroup::Background ) ) );
- int totalw = qRound( zoomIt(d->layout.ptWidth) );
- QString str;
+ int totalw = tqRound( zoomIt(d->tqlayout.ptWidth) );
+ TQString str;
- p.setBrush( colorGroup().brush( QColorGroup::Base ) );
+ p.setBrush( tqcolorGroup().brush( TQColorGroup::Base ) );
// Draw white rect
- QRect r;
+ TQRect r;
if ( !d->whileMovingBorderLeft )
r.setLeft( -diffx + frameStart );
else
@@ -237,9 +237,9 @@ void KoRuler::drawHorizontal( QPainter *_painter )
int maxwidth = 0;
for ( double i = 0.0;i <= (double)totalw;i += dist ) {
- str = QString::number( KoUnit::toUserValue( i / m_zoom, m_unit ) );
+ str = TQString::number( KoUnit::toUserValue( i / m_zoom, m_unit ) );
int textwidth = fm.width( str );
- maxwidth = QMAX( maxwidth, textwidth );
+ maxwidth = TQMAX( maxwidth, textwidth );
}
// Make sure that the ruler stays readable at lower zoom levels
@@ -248,11 +248,11 @@ void KoRuler::drawHorizontal( QPainter *_painter )
}
for ( double i = 0.0;i <= (double)totalw;i += dist ) {
- str = QString::number( KoUnit::toUserValue( i / m_zoom, m_unit ) );
+ str = TQString::number( KoUnit::toUserValue( i / m_zoom, m_unit ) );
int textwidth = fm.width( str );
- maxwidth = QMAX( maxwidth, textwidth );
- p.drawText( qRound(i) - diffx - qRound(textwidth * 0.5),
- qRound(( height() - fm.height() ) * 0.5),
+ maxwidth = TQMAX( maxwidth, textwidth );
+ p.drawText( tqRound(i) - diffx - tqRound(textwidth * 0.5),
+ tqRound(( height() - fm.height() ) * 0.5),
textwidth, height(), AlignLeft | AlignTop, str );
}
@@ -261,7 +261,7 @@ void KoRuler::drawHorizontal( QPainter *_painter )
if ( dist > maxwidth + 2 )
{
for ( double i = dist * 0.5;i <= (double)totalw;i += dist ) {
- int ii=qRound(i);
+ int ii=tqRound(i);
p.drawLine( ii - diffx, 7, ii - diffx, height() - 7 );
}
}
@@ -271,7 +271,7 @@ void KoRuler::drawHorizontal( QPainter *_painter )
if ( dist * 0.5 > maxwidth + 2 )
{
for ( double i = dist * 0.25;i <= (double)totalw;i += dist * 0.5 ) {
- int ii=qRound(i);
+ int ii=tqRound(i);
p.drawLine( ii - diffx, 9, ii - diffx, height() - 9 );
}
}
@@ -279,13 +279,13 @@ void KoRuler::drawHorizontal( QPainter *_painter )
// Draw ending bar (at page width)
//int constant=zoomIt(1);
//p.drawLine( totalw - diffx + constant, 1, totalw - diffx + constant, height() - 1 );
- //p.setPen( colorGroup().color( QColorGroup::Base ) );
+ //p.setPen( tqcolorGroup().color( TQColorGroup::Base ) );
//p.drawLine( totalw - diffx, 1, totalw - diffx, height() - 1 );
// Draw starting bar (at 0)
- //p.setPen( colorGroup().color( QColorGroup::Text ) );
+ //p.setPen( tqcolorGroup().color( TQColorGroup::Text ) );
//p.drawLine( -diffx, 1, -diffx, height() - 1 );
- //p.setPen( colorGroup().color( QColorGroup::Base ) );
+ //p.setPen( tqcolorGroup().color( TQColorGroup::Base ) );
//p.drawLine( -diffx - constant, 1, -diffx - constant, height() - 1 );
// Draw the indents triangles
@@ -294,20 +294,20 @@ void KoRuler::drawHorizontal( QPainter *_painter )
double halfPixmapWidth = d->pmFirst.width() * 0.5;
// Cumulate i_first with correct indent
double firstLineIdent = i_first + ( d->rtl ? d->i_right : i_left );
- p.drawPixmap( qRound( static_cast<double>(r.left()) + applyRtlAndZoom( firstLineIdent ) - halfPixmapWidth ),
+ p.drawPixmap( tqRound( static_cast<double>(r.left()) + applyRtlAndZoom( firstLineIdent ) - halfPixmapWidth ),
top, d->pmFirst );
int bottom = height() - d->pmLeft.height() - 1;
halfPixmapWidth = d->pmLeft.width() * 0.5;
- p.drawPixmap( qRound( static_cast<double>(r.left()) + zoomIt(i_left) - halfPixmapWidth ),
+ p.drawPixmap( tqRound( static_cast<double>(r.left()) + zoomIt(i_left) - halfPixmapWidth ),
bottom, d->pmLeft );
- p.drawPixmap( qRound( static_cast<double>(r.right()) - zoomIt(d->i_right) - halfPixmapWidth ),
+ p.drawPixmap( tqRound( static_cast<double>(r.right()) - zoomIt(d->i_right) - halfPixmapWidth ),
bottom, d->pmLeft );
}
// Show the mouse position
if ( d->action == A_NONE && showMPos ) {
- p.setPen( colorGroup().color( QColorGroup::Text ) );
+ p.setPen( tqcolorGroup().color( TQColorGroup::Text ) );
p.drawLine( mposX, 1, mposX, height() - 1 );
}
hasToDelete = false;
@@ -321,11 +321,11 @@ void KoRuler::drawHorizontal( QPainter *_painter )
}
/*================================================================*/
-void KoRuler::drawTabs( QPainter &_painter )
+void KoRuler::drawTabs( TQPainter &_painter )
{
int ptPos = 0;
- _painter.setPen( QPen( colorGroup().color( QColorGroup::Text ), 2, SolidLine ) );
+ _painter.setPen( TQPen( tqcolorGroup().color( TQColorGroup::Text ), 2, SolidLine ) );
// Check if we're in a mousemove event, removing a tab.
// In that case, we'll have to skip drawing that one.
bool willRemove = d->mousePressed && willRemoveTab( d->oldMy ) && d->currTab.type != T_INVALID;
@@ -334,7 +334,7 @@ void KoRuler::drawTabs( QPainter &_painter )
for ( ; it != d->tabList.end() ; it++ ) {
if ( willRemove && equals( d->currTab.ptPos, (*it).ptPos ) )
continue;
- ptPos = qRound(applyRtlAndZoom((*it).ptPos)) - diffx + frameStart;
+ ptPos = tqRound(applyRtlAndZoom((*it).ptPos)) - diffx + frameStart;
switch ( (*it).type ) {
case T_LEFT: {
ptPos -= 4;
@@ -356,7 +356,7 @@ void KoRuler::drawTabs( QPainter &_painter )
_painter.drawLine( ptPos + 4, height() - 4, ptPos + 20 - 4, height() - 4 );
_painter.drawLine( ptPos + 20 / 2, 4, ptPos + 20 / 2, height() - 4 );
_painter.fillRect( ptPos + 20 / 2 + 2, height() - 9, 3, 3,
- colorGroup().color( QColorGroup::Text ) );
+ tqcolorGroup().color( TQColorGroup::Text ) );
} break;
default: break;
}
@@ -364,28 +364,28 @@ void KoRuler::drawTabs( QPainter &_painter )
}
/*================================================================*/
-void KoRuler::drawVertical( QPainter *_painter )
+void KoRuler::drawVertical( TQPainter *_painter )
{
- QFont font = KGlobalSettings::toolBarFont();
- QFontMetrics fm( font );
- resize( QMAX( fm.height() + 4, 20 ), height() );
+ TQFont font = KGlobalSettings::toolBarFont();
+ TQFontMetrics fm( font );
+ resize( TQMAX( fm.height() + 4, 20 ), height() );
- QPainter p( &buffer );
- p.fillRect( 0, 0, width(), height(), QBrush( colorGroup().brush( QColorGroup::Background ) ) );
+ TQPainter p( &buffer );
+ p.fillRect( 0, 0, width(), height(), TQBrush( tqcolorGroup().brush( TQColorGroup::Background ) ) );
- int totalh = qRound( zoomIt(d->layout.ptHeight) );
+ int totalh = tqRound( zoomIt(d->tqlayout.ptHeight) );
// Clip rect - this gives basically always a rect like (2,2,width-2,height-2)
- QRect paintRect = _painter->clipRegion( QPainter::CoordPainter ).boundingRect();
+ TQRect paintRect = _painter->clipRegion( TQPainter::CoordPainter ).boundingRect();
// Ruler rect
- QRect rulerRect( 0, -diffy, width(), totalh );
+ TQRect rulerRect( 0, -diffy, width(), totalh );
if ( paintRect.intersects( rulerRect ) ) {
- QString str;
+ TQString str;
- p.setBrush( colorGroup().brush( QColorGroup::Base ) );
+ p.setBrush( tqcolorGroup().brush( TQColorGroup::Base ) );
// Draw white rect
- QRect r;
+ TQRect r;
if ( !d->whileMovingBorderTop )
r.setTop( -diffy + frameStart );
else
@@ -405,9 +405,9 @@ void KoRuler::drawVertical( QPainter *_painter )
int maxheight = 0;
for ( double i = 0.0;i <= (double)totalh;i += dist ) {
- str = QString::number( KoUnit::toUserValue( i / m_zoom, m_unit ) );
+ str = TQString::number( KoUnit::toUserValue( i / m_zoom, m_unit ) );
int textwidth = fm.width( str );
- maxheight = QMAX( maxheight, textwidth );
+ maxheight = TQMAX( maxheight, textwidth );
}
// Make sure that the ruler stays readable at lower zoom levels
@@ -416,15 +416,15 @@ void KoRuler::drawVertical( QPainter *_painter )
}
for ( double i = 0.0;i <= (double)totalh;i += dist ) {
- str = QString::number( KoUnit::toUserValue( i / m_zoom, m_unit ) );
+ str = TQString::number( KoUnit::toUserValue( i / m_zoom, m_unit ) );
int textwidth = fm.width( str );
- int yOffset = qRound(i) - diffy + qRound(textwidth * 0.5);
+ int yOffset = tqRound(i) - diffy + tqRound(textwidth * 0.5);
if(yOffset > paintRect.bottom())
break; // stop drawing when outside the to-paint-region
int textheight = fm.height();
- maxheight = QMAX( maxheight, textwidth );
+ maxheight = TQMAX( maxheight, textwidth );
p.save();
- p.translate( qRound(( width() - textheight ) * 0.5), yOffset);
+ p.translate( tqRound(( width() - textheight ) * 0.5), yOffset);
p.rotate( -90 );
p.drawText( 0, 0, textwidth + 1, textheight, AlignLeft | AlignTop, str );
p.restore();
@@ -434,7 +434,7 @@ void KoRuler::drawVertical( QPainter *_painter )
if ( dist > maxheight + 2 )
{
for ( double i = dist * 0.5;i <= (double)totalh;i += dist ) {
- int ii=qRound(i) - diffy;
+ int ii=tqRound(i) - diffy;
if(ii > paintRect.bottom())
break; // stop drawing when outside the to-paint-region
p.drawLine( 7, ii, width() - 7, ii);
@@ -445,7 +445,7 @@ void KoRuler::drawVertical( QPainter *_painter )
if ( dist * 0.5 > maxheight + 2 )
{
for ( double i = dist * 0.25;i <=(double)totalh;i += dist *0.5 ) {
- int ii=qRound(i) - diffy;
+ int ii=tqRound(i) - diffy;
if(ii > paintRect.bottom())
break; // stop drawing when outside the to-paint-region
p.drawLine( 9, ii, width() - 9, ii);
@@ -454,19 +454,19 @@ void KoRuler::drawVertical( QPainter *_painter )
// Draw ending bar (at page height)
//p.drawLine( 1, totalh - diffy + 1, width() - 1, totalh - diffy + 1 );
- //p.setPen( colorGroup().color( QColorGroup::Base ) );
+ //p.setPen( tqcolorGroup().color( TQColorGroup::Base ) );
//p.drawLine( 1, totalh - diffy, width() - 1, totalh - diffy );
// Draw starting bar (at 0)
- //p.setPen( colorGroup().color( QColorGroup::Text ) );
+ //p.setPen( tqcolorGroup().color( TQColorGroup::Text ) );
//p.drawLine( 1, -diffy, width() - 1, -diffy );
- //p.setPen( colorGroup().color( QColorGroup::Base ) );
+ //p.setPen( tqcolorGroup().color( TQColorGroup::Base ) );
//p.drawLine( 1, -diffy - 1, width() - 1, -diffy - 1 );
}
// Show the mouse position
if ( d->action == A_NONE && showMPos ) {
- p.setPen( colorGroup().color( QColorGroup::Text ) );
+ p.setPen( tqcolorGroup().color( TQColorGroup::Text ) );
p.drawLine( 1, mposY, width() - 1, mposY );
}
hasToDelete = false;
@@ -475,7 +475,7 @@ void KoRuler::drawVertical( QPainter *_painter )
_painter->drawPixmap( 0, 0, buffer );
}
-void KoRuler::mousePressEvent( QMouseEvent *e )
+void KoRuler::mousePressEvent( TQMouseEvent *e )
{
if( !d->m_bReadWrite)
return;
@@ -486,20 +486,20 @@ void KoRuler::mousePressEvent( QMouseEvent *e )
d->removeTab.type = T_INVALID;
switch ( e->button() ) {
- case RightButton:
+ case Qt::RightButton:
if(d->currTab.type == T_INVALID || !(d->flags & F_TABS))
d->rb_menu->setItemEnabled(d->mRemoveTab, false);
else
d->rb_menu->setItemEnabled(d->mRemoveTab, true);
- d->rb_menu->popup( QCursor::pos() );
+ d->rb_menu->popup( TQCursor::pos() );
d->action = A_NONE;
d->mousePressed = false;
return;
- case MidButton:
+ case Qt::MidButton:
// MMB shall do like double-click (it opens a dialog).
handleDoubleClick();
return;
- case LeftButton:
+ case Qt::LeftButton:
if ( d->action == A_BR_RIGHT || d->action == A_BR_LEFT ) {
if ( d->action == A_BR_RIGHT )
d->whileMovingBorderRight = true;
@@ -516,8 +516,8 @@ void KoRuler::mousePressEvent( QMouseEvent *e )
d->whileMovingBorderBottom = true;
if ( d->canvas ) {
- QPainter p( d->canvas );
- p.setRasterOp( Qt::NotROP );
+ TQPainter p( d->canvas );
+ p.setRasterOp( TQt::NotROP );
p.drawLine( 0, d->oldMy, d->canvas->width(), d->oldMy );
p.end();
}
@@ -527,7 +527,7 @@ void KoRuler::mousePressEvent( QMouseEvent *e )
drawLine(d->oldMx, -1);
} else if ( d->action == A_TAB ) {
if ( d->canvas && d->currTab.type != T_INVALID ) {
- drawLine( qRound( applyRtlAndZoom(d->currTab.ptPos) ) + frameStart - diffx, -1 );
+ drawLine( tqRound( applyRtlAndZoom(d->currTab.ptPos) ) + frameStart - diffx, -1 );
}
} else if ( d->tabChooser && ( d->flags & F_TABS ) && d->tabChooser->getCurrTabType() != 0 ) {
int left = frameStart - diffx;
@@ -572,7 +572,7 @@ void KoRuler::mousePressEvent( QMouseEvent *e )
else if ( d->flags & F_HELPLINES )
{
setCursor( orientation == Qt::Horizontal ?
- Qt::sizeVerCursor : Qt::sizeHorCursor );
+ TQt::sizeVerCursor : TQt::sizeHorCursor );
d->action = A_HELPLINES;
}
default:
@@ -580,7 +580,7 @@ void KoRuler::mousePressEvent( QMouseEvent *e )
}
}
-void KoRuler::mouseReleaseEvent( QMouseEvent *e )
+void KoRuler::mouseReleaseEvent( TQMouseEvent *e )
{
d->mousePressed = false;
@@ -598,19 +598,19 @@ void KoRuler::mouseReleaseEvent( QMouseEvent *e )
if ( d->canvas )
drawLine(d->oldMx, -1);
update();
- emit newPageLayout( d->layout );
+ emit newPageLayout( d->tqlayout );
} else if ( d->action == A_BR_TOP || d->action == A_BR_BOTTOM ) {
d->whileMovingBorderTop = false;
d->whileMovingBorderBottom = false;
if ( d->canvas ) {
- QPainter p( d->canvas );
- p.setRasterOp( Qt::NotROP );
+ TQPainter p( d->canvas );
+ p.setRasterOp( TQt::NotROP );
p.drawLine( 0, d->oldMy, d->canvas->width(), d->oldMy );
p.end();
}
update();
- emit newPageLayout( d->layout );
+ emit newPageLayout( d->tqlayout );
} else if ( d->action == A_FIRST_INDENT ) {
if ( d->canvas )
drawLine(d->oldMx, -1);
@@ -628,7 +628,7 @@ void KoRuler::mouseReleaseEvent( QMouseEvent *e )
emit newRightIndent( d->i_right );
} else if ( d->action == A_TAB ) {
if ( d->canvas && !fakeMovement ) {
- drawLine( qRound( applyRtlAndZoom( d->currTab.ptPos ) ) + frameStart - diffx, -1);
+ drawLine( tqRound( applyRtlAndZoom( d->currTab.ptPos ) ) + frameStart - diffx, -1);
}
if ( willRemoveTab( e->y() ) )
{
@@ -662,29 +662,29 @@ void KoRuler::mouseReleaseEvent( QMouseEvent *e )
d->currTab.type = T_INVALID; // added (DF)
}
-void KoRuler::mouseMoveEvent( QMouseEvent *e )
+void KoRuler::mouseMoveEvent( TQMouseEvent *e )
{
hasToDelete = false;
int pw = d->frameEnd - frameStart;
- int ph = qRound(zoomIt(d->layout.ptHeight));
+ int ph = tqRound(zoomIt(d->tqlayout.ptHeight));
int left = frameStart - diffx;
- int top = qRound(zoomIt(d->layout.ptTop));
+ int top = tqRound(zoomIt(d->tqlayout.ptTop));
top -= diffy;
int right = d->frameEnd - diffx;
- int bottom = qRound(zoomIt(d->layout.ptBottom));
+ int bottom = tqRound(zoomIt(d->tqlayout.ptBottom));
bottom = ph - bottom - diffy;
// Cumulate first-line-indent
- int ip_first = qRound( zoomIt( i_first + ( d->rtl ? d->i_right : i_left) ) );
- int ip_left = qRound(zoomIt(i_left));
- int ip_right = qRound(zoomIt(d->i_right));
+ int ip_first = tqRound( zoomIt( i_first + ( d->rtl ? d->i_right : i_left) ) );
+ int ip_left = tqRound(zoomIt(i_left));
+ int ip_right = tqRound(zoomIt(d->i_right));
int mx = e->x();
mx = mx+diffx < 0 ? 0 : mx;
int my = e->y();
my = my+diffy < 0 ? 0 : my;
- QToolTip::remove( this);
+ TQToolTip::remove( this);
switch ( orientation ) {
case Qt::Horizontal: {
if ( !d->mousePressed ) {
@@ -693,21 +693,21 @@ void KoRuler::mouseMoveEvent( QMouseEvent *e )
/////// ######
// At the moment, moving the left and right border indicators
// is disabled when setFrameStartEnd has been called (i.e. in KWord)
- // Changing the layout margins directly from it would be utterly wrong
+ // Changing the tqlayout margins directly from it would be utterly wrong
// (just try the 2-columns modes...). What needs to be done is:
// emitting a signal frameResized in mouseReleaseEvent, when a left/right
// border has been moved, and in kword we need to update the margins from
// there, if the left border of the 1st column or the right border of the
// last column was moved... and find what to do with the other borders.
- // And for normal frames, resize the frame without touching the page layout.
+ // And for normal frames, resize the frame without touching the page tqlayout.
// All that is too much for now -> disabling.
if ( !m_bFrameStartSet )
{
if ( mx > left - 5 && mx < left + 5 ) {
- setCursor( Qt::sizeHorCursor );
+ setCursor( TQt::sizeHorCursor );
d->action = A_BR_LEFT;
} else if ( mx > right - 5 && mx < right + 5 ) {
- setCursor( Qt::sizeHorCursor );
+ setCursor( TQt::sizeHorCursor );
d->action = A_BR_RIGHT;
}
}
@@ -715,17 +715,17 @@ void KoRuler::mouseMoveEvent( QMouseEvent *e )
int firstX = d->rtl ? right - ip_first : left + ip_first;
if ( mx > firstX - 5 && mx < firstX + 5 &&
my >= 2 && my <= d->pmFirst.size().height() + 2 ) {
- QToolTip::add( this, i18n("First line indent") );
+ TQToolTip::add( this, i18n("First line indent") );
setCursor( ArrowCursor );
d->action = A_FIRST_INDENT;
} else if ( mx > left + ip_left - 5 && mx < left + ip_left + 5 &&
my >= height() - d->pmLeft.size().height() - 2 && my <= height() - 2 ) {
- QToolTip::add( this, i18n("Left indent") );
+ TQToolTip::add( this, i18n("Left indent") );
setCursor( ArrowCursor );
d->action = A_LEFT_INDENT;
} else if ( mx > right - ip_right - 5 && mx < right - ip_right + 5 &&
my >= height() - d->pmLeft.size().height() - 2 && my <= height() - 2 ) {
- QToolTip::add( this, i18n("Right indent") );
+ TQToolTip::add( this, i18n("Right indent") );
setCursor( ArrowCursor );
d->action = A_RIGHT_INDENT;
}
@@ -737,7 +737,7 @@ void KoRuler::mouseMoveEvent( QMouseEvent *e )
int newPos=mx;
if( newPos!=right && gridSize!=0.0 && (e->state() & ShiftButton)==0) { // apply grid.
double grid=zoomIt(gridSize * 16);
- newPos=qRound( ((newPos * 16 / grid) * grid) / 16 );
+ newPos=tqRound( ((newPos * 16 / grid) * grid) / 16 );
}
if(newPos-left < 0) newPos=left;
else if (right-newPos < 0) newPos=right;
@@ -747,7 +747,7 @@ void KoRuler::mouseMoveEvent( QMouseEvent *e )
case A_BR_LEFT: {
if ( d->canvas && mx < right-10 && mx+diffx-2 > 0) {
drawLine( d->oldMx, mx );
- d->layout.ptLeft = unZoomIt(static_cast<double>(mx + diffx));
+ d->tqlayout.ptLeft = unZoomIt(static_cast<double>(mx + diffx));
if( ip_left > right-left-15 ) {
ip_left=right-left-15;
ip_left=ip_left<0 ? 0 : ip_left;
@@ -770,7 +770,7 @@ void KoRuler::mouseMoveEvent( QMouseEvent *e )
case A_BR_RIGHT: {
if ( d->canvas && mx > left+10 && mx+diffx <= pw-2) {
drawLine( d->oldMx, mx );
- d->layout.ptRight = unZoomIt(static_cast<double>(pw - ( mx + diffx )));
+ d->tqlayout.ptRight = unZoomIt(static_cast<double>(pw - ( mx + diffx )));
if( ip_left > right-left-15 ) {
ip_left=right-left-15;
ip_left=ip_left<0 ? 0 : ip_left;
@@ -830,8 +830,8 @@ void KoRuler::mouseMoveEvent( QMouseEvent *e )
if ( d->canvas) {
if (d->rtl) newValue = unZoomIt(pw) - newValue;
if(newValue == d->currTab.ptPos) break; // no change
- QPainter p( d->canvas );
- p.setRasterOp( Qt::NotROP );
+ TQPainter p( d->canvas );
+ p.setRasterOp( TQt::NotROP );
// prevent 1st drawLine when we just created a new tab
// (it's a NOT line)
double pt;
@@ -839,18 +839,18 @@ void KoRuler::mouseMoveEvent( QMouseEvent *e )
if( d->currTab != d->removeTab )
{
pt = applyRtlAndZoom(d->currTab.ptPos);
- pt_fr = qRound(pt) + frameStart - diffx;
+ pt_fr = tqRound(pt) + frameStart - diffx;
p.drawLine( pt_fr, 0, pt_fr, d->canvas->height() );
}
- KoTabulatorList::Iterator it = d->tabList.find( d->currTab );
+ KoTabulatorList::Iterator it = d->tabList.tqfind( d->currTab );
Q_ASSERT( it != d->tabList.end() );
if ( it != d->tabList.end() )
(*it).ptPos = newValue;
d->currTab.ptPos = newValue;
pt = applyRtlAndZoom( newValue );
- pt_fr = qRound(pt) + frameStart - diffx;
+ pt_fr = tqRound(pt) + frameStart - diffx;
p.drawLine( pt_fr, 0, pt_fr, d->canvas->height() );
p.end();
@@ -878,24 +878,24 @@ void KoRuler::mouseMoveEvent( QMouseEvent *e )
if ( d->flags & F_NORESIZE )
break;
if ( my > top - 5 && my < top + 5 ) {
- QToolTip::add( this, i18n("Top margin") );
- setCursor( Qt::sizeVerCursor );
+ TQToolTip::add( this, i18n("Top margin") );
+ setCursor( TQt::sizeVerCursor );
d->action = A_BR_TOP;
} else if ( my > bottom - 5 && my < bottom + 5 ) {
- QToolTip::add( this, i18n("Bottom margin") );
- setCursor( Qt::sizeVerCursor );
+ TQToolTip::add( this, i18n("Bottom margin") );
+ setCursor( TQt::sizeVerCursor );
d->action = A_BR_BOTTOM;
}
} else {
switch ( d->action ) {
case A_BR_TOP: {
if ( d->canvas && my < bottom-20 && my+diffy-2 > 0) {
- QPainter p( d->canvas );
- p.setRasterOp( Qt::NotROP );
+ TQPainter p( d->canvas );
+ p.setRasterOp( TQt::NotROP );
p.drawLine( 0, d->oldMy, d->canvas->width(), d->oldMy );
p.drawLine( 0, my, d->canvas->width(), my );
p.end();
- d->layout.ptTop = unZoomIt(static_cast<double>(my + diffy));
+ d->tqlayout.ptTop = unZoomIt(static_cast<double>(my + diffy));
d->oldMx = mx;
d->oldMy = my;
update();
@@ -905,12 +905,12 @@ void KoRuler::mouseMoveEvent( QMouseEvent *e )
} break;
case A_BR_BOTTOM: {
if ( d->canvas && my > top+20 && my+diffy < ph-2) {
- QPainter p( d->canvas );
- p.setRasterOp( Qt::NotROP );
+ TQPainter p( d->canvas );
+ p.setRasterOp( TQt::NotROP );
p.drawLine( 0, d->oldMy, d->canvas->width(), d->oldMy );
p.drawLine( 0, my, d->canvas->width(), my );
p.end();
- d->layout.ptBottom = unZoomIt(static_cast<double>(ph - ( my + diffy )));
+ d->tqlayout.ptBottom = unZoomIt(static_cast<double>(ph - ( my + diffy )));
d->oldMx = mx;
d->oldMy = my;
update();
@@ -934,13 +934,13 @@ void KoRuler::mouseMoveEvent( QMouseEvent *e )
d->oldMy = my;
}
-void KoRuler::resizeEvent( QResizeEvent *e )
+void KoRuler::resizeEvent( TQResizeEvent *e )
{
- QFrame::resizeEvent( e );
+ TQFrame::resizeEvent( e );
buffer.resize( size() );
}
-void KoRuler::mouseDoubleClickEvent( QMouseEvent* )
+void KoRuler::mouseDoubleClickEvent( TQMouseEvent* )
{
handleDoubleClick();
}
@@ -984,7 +984,7 @@ void KoRuler::handleDoubleClick()
// Double-clicked nothing
d->action = A_NONE;
- emit doubleClicked(); // usually page layout dialog
+ emit doubleClicked(); // usually page tqlayout dialog
}
void KoRuler::setTabList( const KoTabulatorList & _tabList )
@@ -1005,7 +1005,7 @@ double KoRuler::makeIntern( double _v )
void KoRuler::setupMenu()
{
- d->rb_menu = new QPopupMenu();
+ d->rb_menu = new TQPopupMenu();
Q_CHECK_PTR( d->rb_menu );
for ( uint i = 0 ; i <= KoUnit::U_LASTUNIT ; ++i )
{
@@ -1014,12 +1014,12 @@ void KoRuler::setupMenu()
if ( m_unit == unit )
d->rb_menu->setItemChecked( i, true );
}
- connect( d->rb_menu, SIGNAL( activated( int ) ), SLOT( slotMenuActivated( int ) ) );
+ connect( d->rb_menu, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotMenuActivated( int ) ) );
d->rb_menu->insertSeparator();
- d->mPageLayout=d->rb_menu->insertItem(i18n("Page Layout..."), this, SLOT(pageLayoutDia()));
+ d->mPageLayout=d->rb_menu->insertItem(i18n("Page Layout..."), this, TQT_SLOT(pageLayoutDia()));
d->rb_menu->insertSeparator();
- d->mRemoveTab=d->rb_menu->insertItem(i18n("Remove Tabulator"), this, SLOT(rbRemoveTab()));
+ d->mRemoveTab=d->rb_menu->insertItem(i18n("Remove Tabulator"), this, TQT_SLOT(rbRemoveTab()));
d->rb_menu->setItemEnabled( d->mRemoveTab, false );
}
@@ -1029,7 +1029,7 @@ void KoRuler::uncheckMenu()
d->rb_menu->setItemChecked( i, false );
}
-void KoRuler::setUnit( const QString& _unit )
+void KoRuler::setUnit( const TQString& _unit )
{
setUnit( KoUnit::unit( _unit ) );
}
@@ -1077,9 +1077,9 @@ void KoRuler::searchTab(int mx) {
d->currTab.type = T_INVALID;
KoTabulatorList::ConstIterator it = d->tabList.begin();
for ( ; it != d->tabList.end() ; ++it ) {
- pos = qRound(applyRtlAndZoom((*it).ptPos)) - diffx + frameStart;
+ pos = tqRound(applyRtlAndZoom((*it).ptPos)) - diffx + frameStart;
if ( mx > pos - 5 && mx < pos + 5 ) {
- setCursor( Qt::sizeHorCursor );
+ setCursor( TQt::sizeHorCursor );
d->action = A_TAB;
d->currTab = *it;
break;
@@ -1089,8 +1089,8 @@ void KoRuler::searchTab(int mx) {
void KoRuler::drawLine(int oldX, int newX) {
- QPainter p( d->canvas );
- p.setRasterOp( Qt::NotROP );
+ TQPainter p( d->canvas );
+ p.setRasterOp( TQt::NotROP );
p.drawLine( oldX, 0, oldX, d->canvas->height() );
if(newX!=-1)
p.drawLine( newX, 0, newX, d->canvas->height() );
@@ -1176,26 +1176,26 @@ void KoRuler::slotMenuActivated( int i )
}
}
-QSize KoRuler::minimumSizeHint() const
+TQSize KoRuler::tqminimumSizeHint() const
{
- QSize size;
- QFont font = KGlobalSettings::toolBarFont();
- QFontMetrics fm( font );
+ TQSize size;
+ TQFont font = KGlobalSettings::toolBarFont();
+ TQFontMetrics fm( font );
- size.setWidth( QMAX( fm.height() + 4, 20 ) );
- size.setHeight( QMAX( fm.height() + 4, 20 ) );
+ size.setWidth( TQMAX( fm.height() + 4, 20 ) );
+ size.setHeight( TQMAX( fm.height() + 4, 20 ) );
return size;
}
-QSize KoRuler::sizeHint() const
+TQSize KoRuler::tqsizeHint() const
{
- return minimumSizeHint();
+ return tqminimumSizeHint();
}
void KoRuler::setPageLayout( const KoPageLayout& _layout )
{
- d->layout = _layout;
+ d->tqlayout = _layout;
update();
}
diff --git a/lib/kofficeui/KoRuler.h b/lib/kofficeui/KoRuler.h
index 77d169f43..5cea5678f 100644
--- a/lib/kofficeui/KoRuler.h
+++ b/lib/kofficeui/KoRuler.h
@@ -24,8 +24,8 @@
#ifndef koRuler_h
#define koRuler_h
-#include <qframe.h>
-#include <qpixmap.h>
+#include <tqframe.h>
+#include <tqpixmap.h>
#include <kdemacros.h>
#include <koffice_export.h>
@@ -34,7 +34,7 @@
#include <KoUnit.h>
class KoPageLayout;
-class QPainter;
+class TQPainter;
enum KoTabulators { T_LEFT = 0, T_CENTER = 1, T_RIGHT = 2, T_DEC_PNT = 3, T_INVALID = -1 };
enum KoTabulatorFilling { TF_BLANK = 0, TF_DOTS = 1, TF_LINE = 2, TF_DASH = 3, TF_DASH_DOT = 4, TF_DASH_DOT_DOT = 5};
@@ -63,11 +63,11 @@ struct KoTabulator {
/**
* Alignment character.
*/
- QChar alignChar;
+ TQChar alignChar;
bool operator==( const KoTabulator & t ) const {
- return QABS( ptPos - t.ptPos ) < 1E-4 && type == t.type &&
- filling == t.filling && QABS( ptWidth - t.ptWidth ) < 1E-4;
+ return TQABS( ptPos - t.ptPos ) < 1E-4 && type == t.type &&
+ filling == t.filling && TQABS( ptWidth - t.ptWidth ) < 1E-4;
}
bool operator!=( const KoTabulator & t ) const {
return !operator==(t);
@@ -84,7 +84,7 @@ struct KoTabulator {
}
};
-typedef QValueList<KoTabulator> KoTabulatorList;
+typedef TQValueList<KoTabulator> KoTabulatorList;
class KoRulerPrivate;
@@ -96,11 +96,12 @@ class KoRulerPrivate;
* and supports zooming, tabulators, paragraph indents, showing the mouse position, etc.
*
* It also offers a popupmenu upon right-clicking, for changing the unit,
- * the page layout, or removing a tab.
+ * the page tqlayout, or removing a tab.
*/
-class KOFFICEUI_EXPORT KoRuler : public QFrame
+class KOFFICEUI_EXPORT KoRuler : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
friend class KoRulerPrivate; // for the Action enum
public:
static const int F_TABS;
@@ -112,7 +113,7 @@ public:
* Create a ruler
* TODO document params
*/
- KoRuler( QWidget *_parent, QWidget *_canvas, Orientation _orientation,
+ KoRuler( TQWidget *_parent, TQWidget *_canvas, Qt::Orientation _orientation,
const KoPageLayout& _layout, int _flags, KoUnit::Unit _unit,
KoTabChooser *_tabChooser = 0L );
~KoRuler();
@@ -122,7 +123,7 @@ public:
* example "mm", "pt" or "inch".
* @deprecated You should use the KoUnit::Unit variant instead.
*/
- void setUnit( const QString& unit ) KDE_DEPRECATED ;
+ void setUnit( const TQString& unit ) KDE_DEPRECATED ;
/**
* Set the unit to be used.
*/
@@ -138,7 +139,7 @@ public:
const double& zoom() const { return m_zoom; }
/**
- * Set the page layout, see @ref KoPageLayout.
+ * Set the page tqlayout, see @ref KoPageLayout.
* This defines the size of the page and the margins,
* from which the size of the ruler is deducted.
*/
@@ -159,7 +160,7 @@ public:
/**
* Set a global offset to the X and Y coordinates.
- * Usually the main drawing area is a QScrollView, and this is called
+ * Usually the main drawing area is a TQScrollView, and this is called
* with contentsX() and contentsY(), each time those values change.
*/
void setOffset( int _diffx, int _diffy );
@@ -243,14 +244,14 @@ public:
void setPageLayoutMenuItemEnabled(bool b);
/**
- * Reimplemented from QWidget
+ * Reimplemented from TQWidget
*/
- virtual QSize minimumSizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
/**
- * Reimplemented from QWidget
+ * Reimplemented from TQWidget
*/
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
signals:
void newPageLayout( const KoPageLayout & );
@@ -267,28 +268,28 @@ signals:
void tabListChanged( const KoTabulatorList & );
void unitChanged( KoUnit::Unit );
- void addGuide(const QPoint &, bool, int );
- void moveGuide( const QPoint &, bool, int );
- void addHelpline(const QPoint &, bool );
- void moveHelpLines( const QPoint &, bool );
+ void addGuide(const TQPoint &, bool, int );
+ void moveGuide( const TQPoint &, bool, int );
+ void addHelpline(const TQPoint &, bool );
+ void moveHelpLines( const TQPoint &, bool );
protected:
enum Action {A_NONE, A_BR_LEFT, A_BR_RIGHT, A_BR_TOP, A_BR_BOTTOM,
A_LEFT_INDENT, A_FIRST_INDENT, A_TAB, A_RIGHT_INDENT,
A_HELPLINES };
- void drawContents( QPainter *_painter )
+ void drawContents( TQPainter *_painter )
{ orientation == Qt::Horizontal ? drawHorizontal( _painter ) : drawVertical( _painter ); }
- void drawHorizontal( QPainter *_painter );
- void drawVertical( QPainter *_painter );
- void drawTabs( QPainter &_painter );
+ void drawHorizontal( TQPainter *_painter );
+ void drawVertical( TQPainter *_painter );
+ void drawTabs( TQPainter &_painter );
- void mousePressEvent( QMouseEvent *e );
- void mouseReleaseEvent( QMouseEvent *e );
- void mouseMoveEvent( QMouseEvent *e );
- void mouseDoubleClickEvent( QMouseEvent* );
- void resizeEvent( QResizeEvent *e );
+ void mousePressEvent( TQMouseEvent *e );
+ void mouseReleaseEvent( TQMouseEvent *e );
+ void mouseMoveEvent( TQMouseEvent *e );
+ void mouseDoubleClickEvent( TQMouseEvent* );
+ void resizeEvent( TQResizeEvent *e );
void handleDoubleClick();
double makeIntern( double _v );
@@ -314,7 +315,7 @@ private:
Qt::Orientation orientation;
int diffx, diffy;
double i_left, i_first;
- QPixmap buffer;
+ TQPixmap buffer;
double m_zoom, m_1_zoom;
KoUnit::Unit m_unit;
bool hasToDelete;
@@ -342,13 +343,13 @@ inline double KoRuler::zoomIt(const double &value) const {
inline int KoRuler::zoomIt(const int &value) const {
if (m_zoom==1.0)
return value;
- return qRound(m_zoom*value);
+ return tqRound(m_zoom*value);
}
inline unsigned int KoRuler::zoomIt(const unsigned int &value) const {
if (m_zoom==1.0)
return value;
- return static_cast<unsigned int>(qRound(m_zoom*value));
+ return static_cast<unsigned int>(tqRound(m_zoom*value));
}
inline double KoRuler::unZoomIt(const double &value) const {
@@ -360,13 +361,13 @@ inline double KoRuler::unZoomIt(const double &value) const {
inline int KoRuler::unZoomIt(const int &value) const {
if(m_zoom==1.0)
return value;
- return qRound(value*m_1_zoom);
+ return tqRound(value*m_1_zoom);
}
inline unsigned int KoRuler::unZoomIt(const unsigned int &value) const {
if(m_zoom==1.0)
return value;
- return static_cast<unsigned int>(qRound(value*m_1_zoom));
+ return static_cast<unsigned int>(tqRound(value*m_1_zoom));
}
#endif
diff --git a/lib/kofficeui/KoSelectAction.cpp b/lib/kofficeui/KoSelectAction.cpp
index 68237b6af..9fd10314a 100644
--- a/lib/kofficeui/KoSelectAction.cpp
+++ b/lib/kofficeui/KoSelectAction.cpp
@@ -19,10 +19,10 @@
#include "KoSelectAction.h"
-#include <qpixmap.h>
-#include <qbitmap.h>
-#include <qwhatsthis.h>
-#include <qmenubar.h>
+#include <tqpixmap.h>
+#include <tqbitmap.h>
+#include <tqwhatsthis.h>
+#include <tqmenubar.h>
#include <kpopupmenu.h>
#include <kapplication.h>
@@ -51,22 +51,22 @@ class KoSelectAction::KoSelectActionPrivate
int m_currentSelection;
};
-KoSelectAction::KoSelectAction(const QString &text, const QString& icon,
- QObject* parent, const char* name) : KAction(text, icon, 0, parent, name)
+KoSelectAction::KoSelectAction(const TQString &text, const TQString& icon,
+ TQObject* tqparent, const char* name) : KAction(text, icon, 0, tqparent, name)
{
d = new KoSelectActionPrivate;
setShowCurrentSelection(true);
- connect(popupMenu(), SIGNAL(activated(int)), this, SLOT(execute(int)));
+ connect(popupMenu(), TQT_SIGNAL(activated(int)), this, TQT_SLOT(execute(int)));
}
-KoSelectAction::KoSelectAction(const QString &text, const QString& icon, const QObject* receiver,
- const char* slot, QObject* parent, const char* name) : KAction(text, icon, 0, parent, name)
+KoSelectAction::KoSelectAction(const TQString &text, const TQString& icon, const TQObject* receiver,
+ const char* slot, TQObject* tqparent, const char* name) : KAction(text, icon, 0, tqparent, name)
{
d = new KoSelectActionPrivate;
- connect(this, SIGNAL(selectionChanged(int)), receiver, slot);
- connect(popupMenu(), SIGNAL(activated(int)), this, SLOT(execute(int)));
+ connect(this, TQT_SIGNAL(selectionChanged(int)), receiver, slot);
+ connect(popupMenu(), TQT_SIGNAL(activated(int)), this, TQT_SLOT(execute(int)));
}
KoSelectAction::~KoSelectAction()
@@ -79,20 +79,20 @@ KPopupMenu* KoSelectAction::popupMenu() const
return d->m_popup;
}
-void KoSelectAction::popup(const QPoint& global)
+void KoSelectAction::popup(const TQPoint& global)
{
popupMenu()->popup(global);
}
-int KoSelectAction::plug(QWidget* widget, int index)
+int KoSelectAction::plug(TQWidget* widget, int index)
{
// This function is copied from KActionMenu::plug
if (kapp && !kapp->authorizeKAction(name()))
return -1;
kdDebug(129) << "KAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis
- if ( widget->inherits("QPopupMenu") )
+ if ( widget->inherits(TQPOPUPMENU_OBJECT_NAME_STRING) )
{
- QPopupMenu* menu = static_cast<QPopupMenu*>( widget );
+ TQPopupMenu* menu = static_cast<TQPopupMenu*>( widget );
int id;
if ( hasIconSet() )
@@ -105,7 +105,7 @@ int KoSelectAction::plug(QWidget* widget, int index)
menu->setItemEnabled( id, false );
addContainer( menu, id );
- connect( menu, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( menu, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
return containerCount() - 1;
}
@@ -116,8 +116,8 @@ int KoSelectAction::plug(QWidget* widget, int index)
int id_ = KAction::getToolButtonID();
if ( icon().isEmpty() && !iconSet().isNull() ) {
- bar->insertButton( iconSet().pixmap(), id_, SIGNAL( clicked() ), this,
- SLOT( slotActivated() ), isEnabled(), plainText(),
+ bar->insertButton( iconSet().pixmap(), id_, TQT_SIGNAL( clicked() ), this,
+ TQT_SLOT( slotActivated() ), isEnabled(), plainText(),
index );
} else {
KInstance *instance;
@@ -128,25 +128,25 @@ int KoSelectAction::plug(QWidget* widget, int index)
instance = KGlobal::instance();
}
- bar->insertButton( icon(), id_, SIGNAL( clicked() ), this,
- SLOT( slotActivated() ), isEnabled(), plainText(),
+ bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this,
+ TQT_SLOT( slotActivated() ), isEnabled(), plainText(),
index, instance );
}
addContainer( bar, id_ );
if (!whatsThis().isEmpty())
- QWhatsThis::add( bar->getButton(id_), whatsThis() );
+ TQWhatsThis::add( bar->getButton(id_), whatsThis() );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
bar->getButton(id_)->setPopup(popupMenu(), true );
return containerCount() - 1;
}
- else if ( widget->inherits( "QMenuBar" ) )
+ else if ( widget->inherits( TQMENUBAR_OBJECT_NAME_STRING ) )
{
- QMenuBar *bar = static_cast<QMenuBar *>( widget );
+ TQMenuBar *bar = static_cast<TQMenuBar *>( widget );
int id;
@@ -156,7 +156,7 @@ int KoSelectAction::plug(QWidget* widget, int index)
bar->setItemEnabled( id, false );
addContainer( bar, id );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
return containerCount() - 1;
}
diff --git a/lib/kofficeui/KoSelectAction.h b/lib/kofficeui/KoSelectAction.h
index 6cdae7c4d..4bad1005c 100644
--- a/lib/kofficeui/KoSelectAction.h
+++ b/lib/kofficeui/KoSelectAction.h
@@ -22,7 +22,7 @@
#include <kaction.h>
#include <koffice_export.h>
class KPopupMenu;
-class QPoint;
+class TQPoint;
/** An action that provides a menu with items that can be selected.
* The main difference between this action and a KSelectAction is that
@@ -31,24 +31,25 @@ class QPoint;
class KOFFICEUI_EXPORT KoSelectAction : public KAction
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Constructs a KoSelectAction with a text and an icon.
* @param text The text that will be displayed.
* @param icon The dynamically loaded icon that goes with this action.
- * @param parent This action's parent.
+ * @param tqparent This action's tqparent.
* @param name An internal name for this action.
*/
- KoSelectAction(const QString& text, const QString& icon, QObject* parent = 0, const char* name = 0);
+ KoSelectAction(const TQString& text, const TQString& icon, TQObject* tqparent = 0, const char* name = 0);
/** Same as above, but it also connects a slot to the selectionChanged(int) signal.
* @param text The text that will be displayed.
* @param icon The dynamically loaded icon that goes with this action.
- * @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke when a selectionChanged(int) signal is emited.
- * @param parent This action's parent.
+ * @param receiver The SLOT's tqparent.
+ * @param slot The TQT_SLOT to invoke when a selectionChanged(int) signal is emited.
+ * @param tqparent This action's tqparent.
* @param name An internal name for this action.
*/
- KoSelectAction(const QString& text, const QString& icon, const QObject* receiver,
- const char* slot, QObject* parent, const char* name = 0);
+ KoSelectAction(const TQString& text, const TQString& icon, const TQObject* receiver,
+ const char* slot, TQObject* tqparent, const char* name = 0);
~KoSelectAction();
/** Returns a pointer to the popup menu. */
@@ -56,9 +57,9 @@ class KOFFICEUI_EXPORT KoSelectAction : public KAction
/** Shows the popup menu.
* @param global Position at which the popup menu is shown.
*/
- void popup(const QPoint& global);
+ void popup(const TQPoint& global);
- virtual int plug(QWidget* widget, int index = -1);
+ virtual int plug(TQWidget* widget, int index = -1);
/** Returns the index of the currently selected item. */
virtual int currentSelection();
diff --git a/lib/kofficeui/KoTabBar.cpp b/lib/kofficeui/KoTabBar.cpp
index d73025b45..002f3ebea 100644
--- a/lib/kofficeui/KoTabBar.cpp
+++ b/lib/kofficeui/KoTabBar.cpp
@@ -24,23 +24,23 @@
#include "KoTabBar.h"
-#include <qdrawutil.h>
-#include <qpainter.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qstyle.h>
-#include <qtimer.h>
-#include <qtoolbutton.h>
-#include <qvaluevector.h>
-#include <qwidget.h>
+#include <tqdrawutil.h>
+#include <tqpainter.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
+#include <tqtoolbutton.h>
+#include <tqvaluevector.h>
+#include <tqwidget.h>
// TODO
// improvement possibilities
// - use offscreen buffer to reduce flicker even more
-// - keep track of tabs, only (re)layout when necessary
+// - keep track of tabs, only (re)tqlayout when necessary
// - paint all tabs to buffer, show only by shifting
// - customizable button pixmaps
-// - use QStyle to paint the tabs & buttons (is it good/possible?)
+// - use TQStyle to paint the tabs & buttons (is it good/possible?)
class KoTabBarPrivate
@@ -49,22 +49,22 @@ public:
KoTabBar* tabbar;
// scroll buttons
- QToolButton* scrollFirstButton;
- QToolButton* scrollLastButton;
- QToolButton* scrollBackButton;
- QToolButton* scrollForwardButton;
+ TQToolButton* scrollFirstButton;
+ TQToolButton* scrollLastButton;
+ TQToolButton* scrollBackButton;
+ TQToolButton* scrollForwardButton;
// read-only: no mouse drag, double-click, right-click
bool readOnly;
- // if true, layout is from right to left
+ // if true, tqlayout is from right to left
bool reverseLayout;
// list of all tabs, in order of appearance
- QStringList tabs;
+ TQStringList tabs;
- // array of QRect for each visible tabs
- QValueVector<QRect> tabRects;
+ // array of TQRect for each visible tabs
+ TQValueVector<TQRect> tabRects;
// leftmost tab (or rightmost if reverseLayout)
int firstTab;
@@ -91,20 +91,20 @@ public:
bool autoScroll;
// calculate the bounding rectangle for each visible tab
- void layoutTabs();
+ void tqlayoutTabs();
// reposition scroll buttons
- void layoutButtons();
+ void tqlayoutButtons();
// find a tab whose bounding rectangle contains the pos
// return -1 if no such tab is found
- int tabAt( const QPoint& pos );
+ int tabAt( const TQPoint& pos );
// draw a single tab
- void drawTab( QPainter& painter, QRect& rect, const QString& text, bool active );
+ void drawTab( TQPainter& painter, TQRect& rect, const TQString& text, bool active );
// draw a marker to indicate tab moving
- void drawMoveMarker( QPainter& painter, int x, int y );
+ void drawMoveMarker( TQPainter& painter, int x, int y );
// update the enable/disable status of scroll buttons
void updateButtons();
@@ -176,16 +176,16 @@ static const char * arrow_right_xpm[] = {
" "};
-void KoTabBarPrivate::layoutTabs()
+void KoTabBarPrivate::tqlayoutTabs()
{
tabRects.clear();
- QPainter painter( tabbar );
+ TQPainter painter( tabbar );
- QFont f = painter.font();
+ TQFont f = painter.font();
f.setBold( true );
painter.setFont( f );
- QFontMetrics fm = painter.fontMetrics();
+ TQFontMetrics fm = painter.fontMetrics();
if( !reverseLayout )
{
@@ -193,12 +193,12 @@ void KoTabBarPrivate::layoutTabs()
int x = 0;
for( unsigned c = 0; c < tabs.count(); c++ )
{
- QRect rect;
+ TQRect rect;
if( (int)c >= firstTab-1 )
{
- QString text = tabs[ c ];
+ TQString text = tabs[ c ];
int tw = fm.width( text ) + 4;
- rect = QRect( x, 0, tw + 20, tabbar->height() );
+ rect = TQRect( x, 0, tw + 20, tabbar->height() );
x = x + tw + 20;
}
tabRects.append( rect );
@@ -218,12 +218,12 @@ void KoTabBarPrivate::layoutTabs()
int x = tabbar->width() - offset;
for( unsigned c = 0; c < tabs.count(); c++ )
{
- QRect rect;
+ TQRect rect;
if( (int)c >= firstTab-1 )
{
- QString text = tabs[ c ];
+ TQString text = tabs[ c ];
int tw = fm.width( text ) + 4;
- rect = QRect( x - tw - 20, 0, tw + 20, tabbar->height() );
+ rect = TQRect( x - tw - 20, 0, tw + 20, tabbar->height() );
x = x - tw - 20;
}
tabRects.append( rect );
@@ -239,21 +239,21 @@ void KoTabBarPrivate::layoutTabs()
}
}
-int KoTabBarPrivate::tabAt( const QPoint& pos )
+int KoTabBarPrivate::tabAt( const TQPoint& pos )
{
for( unsigned i = 0; i < tabRects.count(); i++ )
{
- QRect rect = tabRects[ i ];
+ TQRect rect = tabRects[ i ];
if( rect.isNull() ) continue;
- if( rect.contains( pos ) ) return i;
+ if( rect.tqcontains( pos ) ) return i;
}
return -1; // not found
}
-void KoTabBarPrivate::drawTab( QPainter& painter, QRect& rect, const QString& text, bool active )
+void KoTabBarPrivate::drawTab( TQPainter& painter, TQRect& rect, const TQString& text, bool active )
{
- QPointArray polygon;
+ TQPointArray polygon;
if( !reverseLayout )
polygon.setPoints( 6, rect.x(), rect.y(),
@@ -273,24 +273,24 @@ void KoTabBarPrivate::drawTab( QPainter& painter, QRect& rect, const QString& te
painter.save();
// fill it first
- QBrush bg = tabbar->colorGroup().background();
- if( active ) bg = tabbar->colorGroup().base();
+ TQBrush bg = tabbar->tqcolorGroup().background();
+ if( active ) bg = TQBrush(tabbar->tqcolorGroup().base());
painter.setBrush( bg );
- painter.setPen( QPen( Qt::NoPen ) );
+ painter.setPen( TQPen( TQt::NoPen ) );
painter.drawPolygon( polygon );
// draw the lines
- painter.setPen( tabbar->colorGroup().dark() );
+ painter.setPen( tabbar->tqcolorGroup().dark() );
if( !active )
painter.drawLine( rect.x()-25, rect.y(), rect.right()+25, rect.top() );
- // Qt4: painter.setRenderHint( QPainter::Antialiasing );
+ // TQt4: painter.setRenderHint( TQPainter::Antialiasing );
painter.drawPolyline( polygon );
- painter.setPen( tabbar->colorGroup().buttonText() );
- QFont f = painter.font();
+ painter.setPen( tabbar->tqcolorGroup().buttonText() );
+ TQFont f = painter.font();
if( active ) f.setBold( true );
painter.setFont( f );
- QFontMetrics fm = painter.fontMetrics();
+ TQFontMetrics fm = painter.fontMetrics();
int tx = rect.x() + ( rect.width() - fm.width( text ) ) / 2;
int ty = rect.y() + ( rect.height() - fm.height() ) / 2 + fm.ascent();
painter.drawText( tx, ty, text );
@@ -298,17 +298,17 @@ void KoTabBarPrivate::drawTab( QPainter& painter, QRect& rect, const QString& te
painter.restore();
}
-void KoTabBarPrivate::drawMoveMarker( QPainter& painter, int x, int y )
+void KoTabBarPrivate::drawMoveMarker( TQPainter& painter, int x, int y )
{
- QPointArray movmark;
+ TQPointArray movmark;
movmark.setPoints( 3, x, y, x + 7, y, x + 4, y + 6);
- QBrush oldBrush = painter.brush();
- painter.setBrush( Qt::black );
+ TQBrush oldBrush = painter.brush();
+ painter.setBrush( TQt::black );
painter.drawPolygon(movmark);
painter.setBrush( oldBrush );
}
-void KoTabBarPrivate::layoutButtons()
+void KoTabBarPrivate::tqlayoutButtons()
{
int bw = tabbar->height();
int w = tabbar->width();
@@ -347,8 +347,8 @@ void KoTabBarPrivate::updateButtons()
}
// creates a new tabbar
-KoTabBar::KoTabBar( QWidget* parent, const char* name )
- : QWidget( parent, name, Qt::WResizeNoErase | Qt::WRepaintNoErase )
+KoTabBar::KoTabBar( TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name, TQt::WResizeNoErase | TQt::WRepaintNoErase )
{
d = new KoTabBarPrivate;
d->tabbar = this;
@@ -363,19 +363,19 @@ KoTabBar::KoTabBar( QWidget* parent, const char* name )
d->offset = 64;
// initialize the scroll buttons
- d->scrollFirstButton = new QToolButton( this );
- connect( d->scrollFirstButton, SIGNAL( clicked() ),
- this, SLOT( scrollFirst() ) );
- d->scrollLastButton = new QToolButton( this );
- connect( d->scrollLastButton, SIGNAL( clicked() ),
- this, SLOT( scrollLast() ) );
- d->scrollBackButton = new QToolButton( this );
- connect( d->scrollBackButton, SIGNAL( clicked() ),
- this, SLOT( scrollBack() ) );
- d->scrollForwardButton = new QToolButton( this );
- connect( d->scrollForwardButton, SIGNAL( clicked() ),
- this, SLOT( scrollForward() ) );
- d->layoutButtons();
+ d->scrollFirstButton = new TQToolButton( this );
+ connect( d->scrollFirstButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( scrollFirst() ) );
+ d->scrollLastButton = new TQToolButton( this );
+ connect( d->scrollLastButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( scrollLast() ) );
+ d->scrollBackButton = new TQToolButton( this );
+ connect( d->scrollBackButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( scrollBack() ) );
+ d->scrollForwardButton = new TQToolButton( this );
+ connect( d->scrollForwardButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( scrollForward() ) );
+ d->tqlayoutButtons();
d->updateButtons();
}
@@ -386,7 +386,7 @@ KoTabBar::~KoTabBar()
}
// adds a new visible tab
-void KoTabBar::addTab( const QString& text )
+void KoTabBar::addTab( const TQString& text )
{
d->tabs.append( text );
@@ -394,9 +394,9 @@ void KoTabBar::addTab( const QString& text )
}
// removes a tab
-void KoTabBar::removeTab( const QString& text )
+void KoTabBar::removeTab( const TQString& text )
{
- int i = d->tabs.findIndex( text );
+ int i = d->tabs.tqfindIndex( text );
if ( i == -1 ) return;
if ( d->activeTab == i + 1 )
@@ -437,16 +437,16 @@ void KoTabBar::setReverseLayout( bool reverse )
if( reverse != d->reverseLayout )
{
d->reverseLayout = reverse;
- d->layoutTabs();
- d->layoutButtons();
+ d->tqlayoutTabs();
+ d->tqlayoutButtons();
d->updateButtons();
update();
}
}
-void KoTabBar::setTabs( const QStringList& list )
+void KoTabBar::setTabs( const TQStringList& list )
{
- QString left, active;
+ TQString left, active;
if( d->activeTab > 0 )
active = d->tabs[ d->activeTab-1 ];
@@ -457,7 +457,7 @@ void KoTabBar::setTabs( const QStringList& list )
if( !left.isNull() )
{
- d->firstTab = d->tabs.findIndex( left ) + 1;
+ d->firstTab = d->tabs.tqfindIndex( left ) + 1;
if( d->firstTab > (int)d->tabs.count() )
d->firstTab = 1;
if( d->firstTab <= 0 )
@@ -471,7 +471,7 @@ void KoTabBar::setTabs( const QStringList& list )
update();
}
-QStringList KoTabBar::tabs() const
+TQStringList KoTabBar::tabs() const
{
return d->tabs;
}
@@ -505,7 +505,7 @@ void KoTabBar::scrollBack()
d->firstTab--;
if( d->firstTab < 1 ) d->firstTab = 1;
- d->layoutTabs();
+ d->tqlayoutTabs();
d->updateButtons();
update();
}
@@ -519,7 +519,7 @@ void KoTabBar::scrollForward()
if( d->firstTab > (int)d->tabs.count() )
d->firstTab = d->tabs.count();
- d->layoutTabs();
+ d->tqlayoutTabs();
d->updateButtons();
update();
}
@@ -530,7 +530,7 @@ void KoTabBar::scrollFirst()
return;
d->firstTab = 1;
- d->layoutTabs();
+ d->tqlayoutTabs();
d->updateButtons();
update();
}
@@ -540,7 +540,7 @@ void KoTabBar::scrollLast()
if ( !canScrollForward() )
return;
- d->layoutTabs();
+ d->tqlayoutTabs();
if( !d->reverseLayout )
{
@@ -561,18 +561,18 @@ void KoTabBar::scrollLast()
int x = d->tabRects[ d->tabRects.count()-1 ].x();
if( x > 0 ) break;
d->firstTab++;
- d->layoutTabs();
+ d->tqlayoutTabs();
}
}
- d->layoutTabs();
+ d->tqlayoutTabs();
d->updateButtons();
update();
}
-void KoTabBar::ensureVisible( const QString& tab )
+void KoTabBar::ensureVisible( const TQString& tab )
{
- int i = d->tabs.findIndex( tab );
+ int i = d->tabs.tqfindIndex( tab );
if ( i == -1 )
return;
i++;
@@ -592,8 +592,8 @@ void KoTabBar::ensureVisible( const QString& tab )
void KoTabBar::moveTab( unsigned tab, unsigned target )
{
- QString tabName = d->tabs[ tab ];
- QStringList::Iterator it;
+ TQString tabName = d->tabs[ tab ];
+ TQStringList::Iterator it;
it = d->tabs.at( tab );
d->tabs.remove( it );
@@ -610,9 +610,9 @@ void KoTabBar::moveTab( unsigned tab, unsigned target )
update();
}
-void KoTabBar::setActiveTab( const QString& text )
+void KoTabBar::setActiveTab( const TQString& text )
{
- int i = d->tabs.findIndex( text );
+ int i = d->tabs.tqfindIndex( text );
if ( i == -1 )
return;
@@ -635,7 +635,7 @@ void KoTabBar::autoScrollBack()
if( !canScrollBack() )
d->autoScroll = false;
else
- QTimer::singleShot( 400, this, SLOT( autoScrollBack() ) );
+ TQTimer::singleShot( 400, this, TQT_SLOT( autoScrollBack() ) );
}
void KoTabBar::autoScrollForward()
@@ -647,10 +647,10 @@ void KoTabBar::autoScrollForward()
if( !canScrollForward() )
d->autoScroll = false;
else
- QTimer::singleShot( 400, this, SLOT( autoScrollForward() ) );
+ TQTimer::singleShot( 400, this, TQT_SLOT( autoScrollForward() ) );
}
-void KoTabBar::paintEvent( QPaintEvent* )
+void KoTabBar::paintEvent( TQPaintEvent* )
{
if ( d->tabs.count() == 0 )
{
@@ -658,36 +658,36 @@ void KoTabBar::paintEvent( QPaintEvent* )
return;
}
- QPainter painter;
- QPixmap pm( size() );
- pm.fill( colorGroup().background() );
- painter.begin( &pm, this );
+ TQPainter painter;
+ TQPixmap pm( size() );
+ pm.fill( tqcolorGroup().background() );
+ painter.tqbegin( TQT_TQPAINTDEVICE(&pm), this );
- painter.setPen( colorGroup().dark() );
+ painter.setPen( tqcolorGroup().dark() );
painter.drawLine( 0, 0, width(), 0 );
if( !d->reverseLayout )
painter.translate( 5, 0 );
- d->layoutTabs();
+ d->tqlayoutTabs();
d->updateButtons();
// draw first all non-active, visible tabs
for( int c = d->tabRects.count()-1; c>=0; c-- )
{
- QRect rect = d->tabRects[ c ];
+ TQRect rect = d->tabRects[ c ];
if( rect.isNull() ) continue;
- QString text = d->tabs[ c ];
+ TQString text = d->tabs[ c ];
d->drawTab( painter, rect, text, false );
}
// draw the active tab
if( d->activeTab > 0 )
{
- QRect rect = d->tabRects[ d->activeTab-1 ];
+ TQRect rect = d->tabRects[ d->activeTab-1 ];
if( !rect.isNull() )
{
- QString text = d->tabs[ d->activeTab-1 ];
+ TQString text = d->tabs[ d->activeTab-1 ];
d->drawTab( painter, rect, text, true );
}
}
@@ -695,8 +695,8 @@ void KoTabBar::paintEvent( QPaintEvent* )
// draw the move marker
if( d->targetTab > 0 )
{
- int p = QMIN( d->targetTab, (int)d->tabRects.count() );
- QRect rect = d->tabRects[ p-1 ];
+ int p = TQMIN( d->targetTab, (int)d->tabRects.count() );
+ TQRect rect = d->tabRects[ p-1 ];
if( !rect.isNull() )
{
int x = !d->reverseLayout ? rect.x() : rect.right()-7;
@@ -715,35 +715,35 @@ void KoTabBar::paintEvent( QPaintEvent* )
}
-void KoTabBar::resizeEvent( QResizeEvent* )
+void KoTabBar::resizeEvent( TQResizeEvent* )
{
- d->layoutButtons();
+ d->tqlayoutButtons();
d->updateButtons();
update();
}
-QSize KoTabBar::sizeHint() const
+TQSize KoTabBar::tqsizeHint() const
{
- return QSize( 40, style().pixelMetric( QStyle::PM_ScrollBarExtent, this ) );
+ return TQSize( 40, tqstyle().tqpixelMetric( TQStyle::PM_ScrollBarExtent, this ) );
}
-void KoTabBar::renameTab( const QString& old_name, const QString& new_name )
+void KoTabBar::renameTab( const TQString& old_name, const TQString& new_name )
{
- QStringList::Iterator it = d->tabs.find( old_name );
+ TQStringList::Iterator it = d->tabs.tqfind( old_name );
(*it) = new_name;
update();
}
-QString KoTabBar::activeTab() const
+TQString KoTabBar::activeTab() const
{
if( d->activeTab == 0 )
- return QString::null;
+ return TQString();
else
return d->tabs[ d->activeTab ];
}
-void KoTabBar::mousePressEvent( QMouseEvent* ev )
+void KoTabBar::mousePressEvent( TQMouseEvent* ev )
{
if ( d->tabs.count() == 0 )
{
@@ -751,10 +751,10 @@ void KoTabBar::mousePressEvent( QMouseEvent* ev )
return;
}
- d->layoutTabs();
+ d->tqlayoutTabs();
- QPoint pos = ev->pos();
- if( !d->reverseLayout ) pos = pos - QPoint( d->offset,0 );
+ TQPoint pos = ev->pos();
+ if( !d->reverseLayout ) pos = pos - TQPoint( d->offset,0 );
int tab = d->tabAt( pos ) + 1;
if( ( tab > 0 ) && ( tab != d->activeTab ) )
@@ -769,30 +769,30 @@ void KoTabBar::mousePressEvent( QMouseEvent* ev )
scrollForward();
}
- if( ev->button() == RightButton )
+ if( ev->button() == Qt::RightButton )
if( !d->readOnly )
emit contextMenu( ev->globalPos() );
}
-void KoTabBar::mouseReleaseEvent( QMouseEvent* ev )
+void KoTabBar::mouseReleaseEvent( TQMouseEvent* ev )
{
if ( d->readOnly ) return;
d->autoScroll = false;
- if ( ev->button() == LeftButton && d->targetTab != 0 )
+ if ( ev->button() == Qt::LeftButton && d->targetTab != 0 )
{
emit tabMoved( d->activeTab-1, d->targetTab-1 );
d->targetTab = 0;
}
}
-void KoTabBar::mouseMoveEvent( QMouseEvent* ev )
+void KoTabBar::mouseMoveEvent( TQMouseEvent* ev )
{
if ( d->readOnly ) return;
- QPoint pos = ev->pos();
- if( !d->reverseLayout) pos = pos - QPoint( d->offset,0 );
+ TQPoint pos = ev->pos();
+ if( !d->reverseLayout) pos = pos - TQPoint( d->offset,0 );
// check if user drags a tab to move it
int i = d->tabAt( pos ) + 1;
@@ -811,7 +811,7 @@ void KoTabBar::mouseMoveEvent( QMouseEvent* ev )
// drag past the very latest visible tab
// e.g move a tab to the last ordering position
- QRect r = d->tabRects[ d->tabRects.count()-1 ];
+ TQRect r = d->tabRects[ d->tabRects.count()-1 ];
bool moveToLast = false;
if( r.isValid() )
{
@@ -848,7 +848,7 @@ void KoTabBar::mouseMoveEvent( QMouseEvent* ev )
}
}
-void KoTabBar::mouseDoubleClickEvent( QMouseEvent* ev )
+void KoTabBar::mouseDoubleClickEvent( TQMouseEvent* ev )
{
int offset = d->reverseLayout ? 0 : d->offset;
if( ev->pos().x() > offset )
@@ -856,7 +856,7 @@ void KoTabBar::mouseDoubleClickEvent( QMouseEvent* ev )
emit doubleClicked();
}
-void KoTabBar::wheelEvent( QWheelEvent * e )
+void KoTabBar::wheelEvent( TQWheelEvent * e )
{
if ( d->tabs.count() == 0 )
{
diff --git a/lib/kofficeui/KoTabBar.h b/lib/kofficeui/KoTabBar.h
index e582c3d22..1ab9d6dc7 100644
--- a/lib/kofficeui/KoTabBar.h
+++ b/lib/kofficeui/KoTabBar.h
@@ -25,8 +25,8 @@
#ifndef kotabbar_h
#define kotabbar_h
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
#include <koffice_export.h>
class KoTabBarPrivate;
@@ -58,21 +58,22 @@ class KoTabBarPrivate;
*
* @short A bar with tabs and scroll buttons.
*/
-class KOFFICEUI_EXPORT KoTabBar : public QWidget
+class KOFFICEUI_EXPORT KoTabBar : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY( QString activeTab READ activeTab WRITE setActiveTab )
- Q_PROPERTY( bool readOnly READ readOnly WRITE setReadOnly )
- Q_PROPERTY( QStringList tabs READ tabs WRITE setTabs )
- Q_PROPERTY( unsigned count READ count )
+ TQ_PROPERTY( TQString activeTab READ activeTab WRITE setActiveTab )
+ TQ_PROPERTY( bool readOnly READ readOnly WRITE setReadOnly )
+ TQ_PROPERTY( TQStringList tabs READ tabs WRITE setTabs )
+ TQ_PROPERTY( unsigned count READ count )
public:
/**
* Creates a new tabbar.
*/
- KoTabBar( QWidget* parent = 0, const char *name = 0 );
+ KoTabBar( TQWidget* tqparent = 0, const char *name = 0 );
/**
* Destroy the tabbar.
@@ -93,7 +94,7 @@ public:
/**
* Returns all the tab as list of strings.
*/
- QStringList tabs() const;
+ TQStringList tabs() const;
/**
* Returns number of tabs.
@@ -104,7 +105,7 @@ public:
/**
* Returns the active tab.
*/
- QString activeTab() const;
+ TQString activeTab() const;
/**
* Returns true if it is possible to scroll one tab back.
@@ -123,14 +124,14 @@ public:
/**
* Ensures that specified tab is visible.
*/
- void ensureVisible( const QString& tab );
+ void ensureVisible( const TQString& tab );
public slots:
/**
* Replaces all tabs with the list of strings.
*/
- void setTabs( const QStringList& list );
+ void setTabs( const TQStringList& list );
/**
* Sets the tab bar to be read only.
@@ -150,19 +151,19 @@ public slots:
/**
* Adds a tab to the tab bar.
*/
- void addTab( const QString& text );
+ void addTab( const TQString& text );
/**
* Removes a tab from the bar. If the tab was the active one then
* no tab will be active.
* It is recommended to call setActiveTab after a call to this function.
*/
- void removeTab( const QString& text );
+ void removeTab( const TQString& text );
/**
* Renames a tab.
*/
- void renameTab( const QString& old_name, const QString& new_name );
+ void renameTab( const TQString& old_name, const TQString& new_name );
/**
* Moves a tab to another position and reorder other tabs.
@@ -211,21 +212,21 @@ public slots:
/**
* Sets active tab.
*/
- void setActiveTab( const QString& text );
+ void setActiveTab( const TQString& text );
/**
* Removes all tabs.
*/
void clear();
- QSize sizeHint() const;
+ TQSize tqsizeHint() const;
signals:
/**
* Emitted if the active tab changed.
*/
- void tabChanged( const QString& _text );
+ void tabChanged( const TQString& _text );
/**
* This signal is emitted whenever a tab is dragged, moved and
@@ -243,7 +244,7 @@ signals:
* This signal is emitted whenever the tab bar is right-clicked.
* Typically it is used to popup a context menu.
*/
- void contextMenu( const QPoint& pos );
+ void contextMenu( const TQPoint& pos );
/**
* This signal is emitted whenever the tab bar is double-clicked.
@@ -255,13 +256,13 @@ protected slots:
void autoScrollForward();
protected:
- virtual void paintEvent ( QPaintEvent* ev );
- virtual void resizeEvent( QResizeEvent* ev );
- virtual void mousePressEvent ( QMouseEvent* ev );
- virtual void mouseReleaseEvent ( QMouseEvent* ev );
- virtual void mouseDoubleClickEvent ( QMouseEvent* ev );
- virtual void mouseMoveEvent ( QMouseEvent* ev );
- virtual void wheelEvent ( QWheelEvent * e );
+ virtual void paintEvent ( TQPaintEvent* ev );
+ virtual void resizeEvent( TQResizeEvent* ev );
+ virtual void mousePressEvent ( TQMouseEvent* ev );
+ virtual void mouseReleaseEvent ( TQMouseEvent* ev );
+ virtual void mouseDoubleClickEvent ( TQMouseEvent* ev );
+ virtual void mouseMoveEvent ( TQMouseEvent* ev );
+ virtual void wheelEvent ( TQWheelEvent * e );
private:
KoTabBarPrivate *d;
diff --git a/lib/kofficeui/KoTabChooser.cpp b/lib/kofficeui/KoTabChooser.cpp
index 414db6bbf..71a123420 100644
--- a/lib/kofficeui/KoTabChooser.cpp
+++ b/lib/kofficeui/KoTabChooser.cpp
@@ -22,9 +22,9 @@
/******************************************************************/
#include <KoTabChooser.h>
-#include <qpainter.h>
-#include <qpopupmenu.h>
-#include <qcursor.h>
+#include <tqpainter.h>
+#include <tqpopupmenu.h>
+#include <tqcursor.h>
#include <klocale.h>
@@ -43,8 +43,8 @@ public:
/******************************************************************/
/*================================================================*/
-KoTabChooser::KoTabChooser( QWidget *parent, int _flags )
- : QFrame( parent, "" )
+KoTabChooser::KoTabChooser( TQWidget *tqparent, int _flags )
+ : TQFrame( tqparent, "" )
{
setFrameStyle( MenuBarPanel );
flags = _flags;
@@ -63,7 +63,7 @@ KoTabChooser::KoTabChooser( QWidget *parent, int _flags )
}
/*================================================================*/
-void KoTabChooser::mousePressEvent( QMouseEvent *e )
+void KoTabChooser::mousePressEvent( TQMouseEvent *e )
{
if ( currType == 0 ) return;
@@ -71,7 +71,7 @@ void KoTabChooser::mousePressEvent( QMouseEvent *e )
return;
switch ( e->button() ) {
- case LeftButton: case MidButton: {
+ case Qt::LeftButton: case Qt::MidButton: {
switch ( currType ) {
case TAB_LEFT: {
if ( flags & TAB_CENTER ) currType = TAB_CENTER;
@@ -94,10 +94,10 @@ void KoTabChooser::mousePressEvent( QMouseEvent *e )
else if ( flags & TAB_RIGHT ) currType = TAB_RIGHT;
} break;
}
- repaint( true );
+ tqrepaint( true );
} break;
- case RightButton: {
- QPoint pnt( QCursor::pos() );
+ case Qt::RightButton: {
+ TQPoint pnt( TQCursor::pos() );
rb_menu->setItemChecked( mLeft, false );
rb_menu->setItemChecked( mCenter, false );
@@ -122,11 +122,11 @@ void KoTabChooser::mousePressEvent( QMouseEvent *e )
}
/*================================================================*/
-void KoTabChooser::drawContents( QPainter *painter )
+void KoTabChooser::drawContents( TQPainter *painter )
{
if ( currType == 0 ) return;
- painter->setPen( QPen( black, 2, SolidLine ) );
+ painter->setPen( TQPen( black, 2, SolidLine ) );
switch ( currType ) {
case TAB_LEFT: {
@@ -153,12 +153,12 @@ void KoTabChooser::drawContents( QPainter *painter )
/*================================================================*/
void KoTabChooser::setupMenu()
{
- rb_menu = new QPopupMenu();
+ rb_menu = new TQPopupMenu();
Q_CHECK_PTR( rb_menu );
- mLeft = rb_menu->insertItem( i18n( "Tabulator &Left" ), this, SLOT( rbLeft() ) );
- mCenter = rb_menu->insertItem( i18n( "Tabulator &Center" ), this, SLOT( rbCenter() ) );
- mRight = rb_menu->insertItem( i18n( "Tabulator &Right" ), this, SLOT( rbRight() ) );
- mDecPoint = rb_menu->insertItem( i18n( "Tabulator &Decimal Point" ), this, SLOT( rbDecPoint() ) );
+ mLeft = rb_menu->insertItem( i18n( "Tabulator &Left" ), this, TQT_SLOT( rbLeft() ) );
+ mCenter = rb_menu->insertItem( i18n( "Tabulator &Center" ), this, TQT_SLOT( rbCenter() ) );
+ mRight = rb_menu->insertItem( i18n( "Tabulator &Right" ), this, TQT_SLOT( rbRight() ) );
+ mDecPoint = rb_menu->insertItem( i18n( "Tabulator &Decimal Point" ), this, TQT_SLOT( rbDecPoint() ) );
rb_menu->setCheckable( false );
}
diff --git a/lib/kofficeui/KoTabChooser.h b/lib/kofficeui/KoTabChooser.h
index 7a49f4958..f479ff940 100644
--- a/lib/kofficeui/KoTabChooser.h
+++ b/lib/kofficeui/KoTabChooser.h
@@ -20,11 +20,11 @@
#ifndef koTabChooser_h
#define koTabChooser_h
-#include <qframe.h>
+#include <tqframe.h>
#include <koffice_export.h>
-class QMouseEvent;
-class QPainter;
-class QPopupMenu;
+class TQMouseEvent;
+class TQPainter;
+class TQPopupMenu;
/**
* class KoTabChooser
@@ -32,9 +32,10 @@ class QPopupMenu;
class KoTabChooserPrivate;
-class KOFFICEUI_EXPORT KoTabChooser : public QFrame
+class KOFFICEUI_EXPORT KoTabChooser : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
enum { TAB_LEFT = 1,
@@ -43,7 +44,7 @@ public:
TAB_DEC_PNT = 8,
TAB_ALL = TAB_LEFT | TAB_CENTER | TAB_RIGHT | TAB_DEC_PNT };
- KoTabChooser( QWidget *parent, int _flags );
+ KoTabChooser( TQWidget *tqparent, int _flags );
~KoTabChooser();
int getCurrTabType() { return currType; }
@@ -55,13 +56,13 @@ public:
void setReadWrite(bool _readWrite);
protected:
- void mousePressEvent( QMouseEvent *e );
- void drawContents( QPainter *painter );
+ void mousePressEvent( TQMouseEvent *e );
+ void drawContents( TQPainter *painter );
void setupMenu();
int flags;
int currType;
- QPopupMenu *rb_menu;
+ TQPopupMenu *rb_menu;
int mLeft;
int mRight;
int mCenter;
@@ -70,10 +71,10 @@ protected:
KoTabChooserPrivate *d;
protected slots:
- void rbLeft() { currType = TAB_LEFT; repaint( true ); }
- void rbCenter() { currType = TAB_CENTER; repaint( true ); }
- void rbRight() { currType = TAB_RIGHT; repaint( true ); }
- void rbDecPoint() { currType = TAB_DEC_PNT; repaint( true ); }
+ void rbLeft() { currType = TAB_LEFT; tqrepaint( true ); }
+ void rbCenter() { currType = TAB_CENTER; tqrepaint( true ); }
+ void rbRight() { currType = TAB_RIGHT; tqrepaint( true ); }
+ void rbDecPoint() { currType = TAB_DEC_PNT; tqrepaint( true ); }
};
diff --git a/lib/kofficeui/KoTemplateChooseDia.cpp b/lib/kofficeui/KoTemplateChooseDia.cpp
index 1c2fd843c..bd7a63f8e 100644
--- a/lib/kofficeui/KoTemplateChooseDia.cpp
+++ b/lib/kofficeui/KoTemplateChooseDia.cpp
@@ -46,31 +46,31 @@
#include <kapplication.h>
#include <kaboutdata.h>
-#include <qapplication.h>
-#include <qlayout.h>
-#include <qtabwidget.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qpoint.h>
-#include <qobjectlist.h>
-#include <qvgroupbox.h>
-#include <qtooltip.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqpoint.h>
+#include <tqobjectlist.h>
+#include <tqvgroupbox.h>
+#include <tqtooltip.h>
class MyFileDialog : public KFileDialog
{
public :
MyFileDialog(
- const QString& startDir=0,
- const QString& filter =0,
- QWidget *parent=0,
+ const TQString& startDir=0,
+ const TQString& filter =0,
+ TQWidget *tqparent=0,
const char *name=0,
bool modal=0)
- : KFileDialog (startDir, filter, parent, name, modal),
+ : KFileDialog (startDir, filter, tqparent, name, modal),
m_slotOkCalled( false ) {}
KURL currentURL()
{
- setResult( QDialog::Accepted ); // selectedURL tests for it
+ setResult( TQDialog::Accepted ); // selectedURL tests for it
return KFileDialog::selectedURL();
}
@@ -81,10 +81,10 @@ class MyFileDialog : public KFileDialog
KURL url = currentURL();
if ( url.isLocalFile() )
{
- ok = QFile::exists( url.path() );
+ ok = TQFile::exists( url.path() );
if ( !ok ) {
// Maybe offer to create a new document with that name? (see alos KoDocument::openFile)
- KMessageBox::error( this, i18n( "The file %1 does not exist." ).arg( url.path() ) );
+ KMessageBox::error( this, i18n( "The file %1 does not exist." ).tqarg( url.path() ) );
}
}
return ok;
@@ -119,10 +119,10 @@ private:
class KoTemplateChooseDiaPrivate {
public:
- KoTemplateChooseDiaPrivate(const QCString& templateType, KInstance* instance,
- const QCString &format,
- const QString &nativeName,
- const QStringList& extraNativeMimeTypes,
+ KoTemplateChooseDiaPrivate(const TQCString& templateType, KInstance* instance,
+ const TQCString &format,
+ const TQString &nativeName,
+ const TQStringList& extraNativeMimeTypes,
const KoTemplateChooseDia::DialogType &dialogType) :
m_templateType(templateType), m_instance(instance), m_format(format),
m_nativeName(nativeName), m_extraNativeMimeTypes( extraNativeMimeTypes ),
@@ -135,41 +135,41 @@ class KoTemplateChooseDiaPrivate {
~KoTemplateChooseDiaPrivate() {}
- QCString m_templateType;
+ TQCString m_templateType;
KInstance* m_instance;
- QCString m_format;
- QString m_nativeName;
- QStringList m_extraNativeMimeTypes;
+ TQCString m_format;
+ TQString m_nativeName;
+ TQStringList m_extraNativeMimeTypes;
KoTemplateChooseDia::DialogType m_dialogType;
KoTemplateTree *tree;
- QString m_templateName;
- QString m_fullTemplateName;
+ TQString m_templateName;
+ TQString m_fullTemplateName;
KoTemplateChooseDia::ReturnType m_returnType;
bool m_nostartupdlg;
// the main widget
- QWidget *m_mainwidget;
+ TQWidget *m_mainwidget;
// do not show this dialog at startup
- QCheckBox *m_nodiag;
+ TQCheckBox *m_nodiag;
// choose a template
KJanusWidget * m_jwidget;
KFileIconView *m_recent;
- QVGroupBox * boxdescription;
+ TQVGroupBox * boxdescription;
KTextEdit * textedit;
// choose a file
MyFileDialog *m_filedialog;
- // for the layout
- QTabWidget* tabWidget;
- QWidget* newTab;
- QWidget* existingTab;
- QWidget* recentTab;
+ // for the tqlayout
+ TQTabWidget* tabWidget;
+ TQWidget* newTab;
+ TQWidget* existingTab;
+ TQWidget* recentTab;
};
@@ -178,13 +178,13 @@ class KoTemplateChooseDiaPrivate {
/******************************************************************/
/*================================================================*/
-KoTemplateChooseDia::KoTemplateChooseDia(QWidget *parent, const char *name, KInstance* instance,
- const QCString &format,
- const QString &nativeName,
- const QStringList &extraNativeMimeTypes,
+KoTemplateChooseDia::KoTemplateChooseDia(TQWidget *tqparent, const char *name, KInstance* instance,
+ const TQCString &format,
+ const TQString &nativeName,
+ const TQStringList &extraNativeMimeTypes,
const DialogType &dialogType,
- const QCString& templateType) :
- KDialogBase(parent, name, true, i18n("Open Document"), KDialogBase::Ok | KDialogBase::Cancel,
+ const TQCString& templateType) :
+ KDialogBase(tqparent, name, true, i18n("Open Document"), KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Ok)
{
d = new KoTemplateChooseDiaPrivate(
@@ -195,8 +195,8 @@ KoTemplateChooseDia::KoTemplateChooseDia(QWidget *parent, const char *name, KIns
extraNativeMimeTypes,
dialogType);
- QPushButton* ok = actionButton( KDialogBase::Ok );
- QPushButton* cancel = actionButton( KDialogBase::Cancel );
+ TQPushButton* ok = actionButton( KDialogBase::Ok );
+ TQPushButton* cancel = actionButton( KDialogBase::Cancel );
cancel->setAutoDefault(false);
ok->setDefault(true);
//enableButtonOK(false);
@@ -227,30 +227,30 @@ static bool cancelQuits() {
return onlyDoc && onlyMainWindow && kapp->instanceName() != "koshell"; // hack for koshell
}
-KoTemplateChooseDia::ReturnType KoTemplateChooseDia::choose(KInstance* instance, QString &file,
+KoTemplateChooseDia::ReturnType KoTemplateChooseDia::choose(KInstance* instance, TQString &file,
const KoTemplateChooseDia::DialogType &dialogType,
- const QCString& templateType,
- QWidget* parent)
+ const TQCString& templateType,
+ TQWidget* tqparent)
{
- const QString nativeName = instance->aboutData()->programName();
- const QCString format = KoDocument::readNativeFormatMimeType( instance );
- const QStringList extraNativeMimeTypes = KoDocument::readExtraNativeMimeTypes( instance );
+ const TQString nativeName = instance->aboutData()->programName();
+ const TQCString format = KoDocument::readNativeFormatMimeType( instance );
+ const TQStringList extraNativeMimeTypes = KoDocument::readExtraNativeMimeTypes( instance );
// Maybe the above two can be combined into one call, for speed:
//KoDocument::getNativeMimeTypeInfo( instance, nativeName, extraNativeMimeTypes );
return choose( instance, file, format, nativeName, extraNativeMimeTypes,
- dialogType, templateType, parent );
+ dialogType, templateType, tqparent );
}
-KoTemplateChooseDia::ReturnType KoTemplateChooseDia::choose(KInstance* instance, QString &file,
- const QCString &format,
- const QString &nativeName,
- const QStringList& extraNativeMimeTypes,
+KoTemplateChooseDia::ReturnType KoTemplateChooseDia::choose(KInstance* instance, TQString &file,
+ const TQCString &format,
+ const TQString &nativeName,
+ const TQStringList& extraNativeMimeTypes,
const DialogType &dialogType,
- const QCString& templateType,
- QWidget* parent )
+ const TQCString& templateType,
+ TQWidget* tqparent )
{
KoTemplateChooseDia *dlg = new KoTemplateChooseDia(
- parent, "Choose", instance, format,
+ tqparent, "Choose", instance, format,
nativeName, extraNativeMimeTypes, dialogType, templateType );
KoTemplateChooseDia::ReturnType rt = Cancel;
@@ -264,7 +264,7 @@ KoTemplateChooseDia::ReturnType KoTemplateChooseDia::choose(KInstance* instance,
else
{
dlg->resize( 700, 480 );
- if ( dlg->exec() == QDialog::Accepted )
+ if ( dlg->exec() == TQDialog::Accepted )
{
file = dlg->getFullTemplate();
rt = dlg->getReturnType();
@@ -280,11 +280,11 @@ bool KoTemplateChooseDia::noStartupDlg() const {
}
-QString KoTemplateChooseDia::getTemplate() const{
+TQString KoTemplateChooseDia::getTemplate() const{
return d->m_templateName;
}
-QString KoTemplateChooseDia::getFullTemplate() const{
+TQString KoTemplateChooseDia::getFullTemplate() const{
return d->m_fullTemplateName;
}
@@ -298,33 +298,33 @@ KoTemplateChooseDia::DialogType KoTemplateChooseDia::getDialogType() const {
/*================================================================*/
// private
-void KoTemplateChooseDia::setupRecentDialog(QWidget * widgetbase, QGridLayout * layout)
+void KoTemplateChooseDia::setupRecentDialog(TQWidget * widgetbase, TQGridLayout * tqlayout)
{
d->m_recent = new KoTCDRecentFilesIconView(widgetbase, "recent files");
// I prefer the icons to be in "most recent first" order (DF)
- d->m_recent->setSorting( static_cast<QDir::SortSpec>( QDir::Time | QDir::Reversed ) );
- layout->addWidget(d->m_recent,0,0);
+ d->m_recent->setSorting( static_cast<TQDir::SortSpec>( TQDir::Time | TQDir::Reversed ) );
+ tqlayout->addWidget(d->m_recent,0,0);
- QString oldGroup = d->m_instance->config()->group();
+ TQString oldGroup = d->m_instance->config()->group();
d->m_instance->config()->setGroup( "RecentFiles" );
int i = 0;
- QString value;
+ TQString value;
do {
- QString key=QString( "File%1" ).arg( i );
+ TQString key=TQString( "File%1" ).tqarg( i );
value=d->m_instance->config()->readPathEntry( key );
if ( !value.isEmpty() ) {
// Support for kdelibs-3.5's new RecentFiles format: name[url]
- QString s = value;
+ TQString s = value;
if ( s.endsWith("]") )
{
- int pos = s.find("[");
+ int pos = s.tqfind("[");
s = s.mid( pos + 1, s.length() - pos - 2);
}
KURL url(s);
- if(!url.isLocalFile() || QFile::exists(url.path())) {
+ if(!url.isLocalFile() || TQFile::exists(url.path())) {
KFileItem *item = new KFileItem( KFileItem::Unknown, KFileItem::Unknown, url );
d->m_recent->insertItem(item);
}
@@ -335,82 +335,82 @@ void KoTemplateChooseDia::setupRecentDialog(QWidget * widgetbase, QGridLayout *
d->m_instance->config()->setGroup( oldGroup );
d->m_recent->showPreviews();
- connect(d->m_recent, SIGNAL( doubleClicked ( QIconViewItem * ) ),
- this, SLOT( recentSelected( QIconViewItem * ) ) );
+ connect(d->m_recent, TQT_SIGNAL( doubleClicked ( TQIconViewItem * ) ),
+ this, TQT_SLOT( recentSelected( TQIconViewItem * ) ) );
}
/*================================================================*/
// private
-void KoTemplateChooseDia::setupFileDialog(QWidget * widgetbase, QGridLayout * layout)
+void KoTemplateChooseDia::setupFileDialog(TQWidget * widgetbase, TQGridLayout * tqlayout)
{
- QString dir = QString::null;
- QPoint point( 0, 0 );
+ TQString dir = TQString();
+ TQPoint point( 0, 0 );
d->m_filedialog=new MyFileDialog(dir,
- QString::null,
+ TQString(),
widgetbase,
"file dialog",
false);
- layout->addWidget(d->m_filedialog,0,0);
+ tqlayout->addWidget(d->m_filedialog,0,0);
d->m_filedialog->reparent( widgetbase , point );
//d->m_filedialog->setOperationMode( KFileDialog::Opening);
- QObjectList *l = d->m_filedialog->queryList( "QPushButton" );
- QObjectListIt childit( *l );
- QObject *obj;
+ TQObjectList *l = d->m_filedialog->queryList( TQPUSHBUTTON_OBJECT_NAME_STRING );
+ TQObjectListIt childit( *l );
+ TQObject *obj;
while ( (obj = childit.current()) != 0 ) {
++childit;
- ((QPushButton*)obj)->hide();
+ ((TQPushButton*)obj)->hide();
}
delete l;
d->m_filedialog->setSizeGripEnabled ( FALSE );
- QStringList mimeFilter = KoFilterManager::mimeFilter( d->m_format, KoFilterManager::Import );
- QStringList::Iterator mimeFilterIt = mimeFilter.at( 1 );
- for ( QStringList::ConstIterator it = d->m_extraNativeMimeTypes.begin();
+ TQStringList mimeFilter = KoFilterManager::mimeFilter( d->m_format, KoFilterManager::Import );
+ TQStringList::Iterator mimeFilterIt = mimeFilter.at( 1 );
+ for ( TQStringList::ConstIterator it = d->m_extraNativeMimeTypes.begin();
it != d->m_extraNativeMimeTypes.end(); ++it ) {
mimeFilterIt = mimeFilter.insert( mimeFilterIt, *it );
++mimeFilterIt;
}
d->m_filedialog->setMimeFilter( mimeFilter );
- connect(d->m_filedialog, SIGNAL( okClicked() ),
- this, SLOT ( slotOk() ));
+ connect(d->m_filedialog, TQT_SIGNAL( okClicked() ),
+ this, TQT_SLOT ( slotOk() ));
- connect(d->m_filedialog, SIGNAL( cancelClicked() ),
- this, SLOT ( slotCancel() ));
+ connect(d->m_filedialog, TQT_SIGNAL( cancelClicked() ),
+ this, TQT_SLOT ( slotCancel() ));
}
/*================================================================*/
// private
-void KoTemplateChooseDia::setupTemplateDialog(QWidget * widgetbase, QGridLayout * layout)
+void KoTemplateChooseDia::setupTemplateDialog(TQWidget * widgetbase, TQGridLayout * tqlayout)
{
d->m_jwidget = new KJanusWidget(
widgetbase,
"kjanuswidget",
KJanusWidget::IconList);
- layout->addWidget(d->m_jwidget,0,0);
+ tqlayout->addWidget(d->m_jwidget,0,0);
- d->boxdescription = new QVGroupBox(
+ d->boxdescription = new TQVGroupBox(
i18n("Selected Template"),
widgetbase,
"boxdescription");
- layout->addWidget(d->boxdescription, 1, 0 );
+ tqlayout->addWidget(d->boxdescription, 1, 0 );
// config
KConfigGroup grp( d->m_instance->config(), "TemplateChooserDialog" );
int templateNum = grp.readNumEntry( "TemplateTab", -1 );
- QString templateName = grp.readPathEntry( "TemplateName" );
+ TQString templateName = grp.readPathEntry( "TemplateName" );
if ( templateName.isEmpty() && d->tree->defaultTemplate() )
templateName = d->tree->defaultTemplate()->name(); //select the default template for the app
// item which will be selected initially
- QIconViewItem * itemtoselect = 0;
+ TQIconViewItem * itemtoselect = 0;
// count the templates inserted
int entriesnumber = 0;
@@ -424,32 +424,32 @@ void KoTemplateChooseDia::setupTemplateDialog(QWidget * widgetbase, QGridLayout
if ( d->tree->defaultGroup() == group )
defaultTemplateGroup = entriesnumber; //select the default template group for the app
- QFrame * frame = d->m_jwidget->addPage (
+ TQFrame * frame = d->m_jwidget->addPage (
group->name(),
group->name(),
group->first()->loadPicture(d->m_instance));
- QGridLayout * layout = new QGridLayout(frame);
+ TQGridLayout * tqlayout = new TQGridLayout(frame);
KoTCDIconCanvas *canvas = new KoTCDIconCanvas( frame );
- layout->addWidget(canvas,0,0);
+ tqlayout->addWidget(canvas,0,0);
- canvas->setBackgroundColor( colorGroup().base() );
- canvas->setResizeMode(QIconView::Adjust);
+ canvas->setBackgroundColor( tqcolorGroup().base() );
+ canvas->setResizeMode(TQIconView::Adjust);
canvas->setWordWrapIconText( true );
canvas->show();
- QIconViewItem * tempitem = canvas->load(group, templateName, d->m_instance);
+ TQIconViewItem * tempitem = canvas->load(group, templateName, d->m_instance);
if (tempitem)
itemtoselect = tempitem;
canvas->sort();
- canvas->setSelectionMode(QIconView::Single);
+ canvas->setSelectionMode(TQIconView::Single);
- connect( canvas, SIGNAL( clicked ( QIconViewItem * ) ),
- this, SLOT( currentChanged( QIconViewItem * ) ) );
+ connect( canvas, TQT_SIGNAL( clicked ( TQIconViewItem * ) ),
+ this, TQT_SLOT( currentChanged( TQIconViewItem * ) ) );
- connect( canvas, SIGNAL( doubleClicked( QIconViewItem * ) ),
- this, SLOT( chosen(QIconViewItem *) ) );
+ connect( canvas, TQT_SIGNAL( doubleClicked( TQIconViewItem * ) ),
+ this, TQT_SLOT( chosen(TQIconViewItem *) ) );
entriesnumber++;
}
@@ -478,12 +478,12 @@ void KoTemplateChooseDia::setupTemplateDialog(QWidget * widgetbase, QGridLayout
currentChanged(itemtoselect);
// setup the checkbox
- QString translatedstring = i18n("Always start %1 with the selected template").arg(d->m_nativeName);
+ TQString translatedstring = i18n("Always start %1 with the selected template").tqarg(d->m_nativeName);
- d->m_nodiag = new QCheckBox ( translatedstring , widgetbase);
- layout->addWidget(d->m_nodiag, 2, 0);
- QString startwithoutdialog = grp.readEntry( "NoStartDlg" );
- bool ischecked = startwithoutdialog == QString("yes");
+ d->m_nodiag = new TQCheckBox ( translatedstring , widgetbase);
+ tqlayout->addWidget(d->m_nodiag, 2, 0);
+ TQString startwithoutdialog = grp.readEntry( "NoStartDlg" );
+ bool ischecked = startwithoutdialog == TQString("yes");
// When not starting up, display a tri-state button telling whether
// the user actually choosed the template to start with next times (bug:77542)
@@ -503,20 +503,20 @@ void KoTemplateChooseDia::setupTemplateDialog(QWidget * widgetbase, QGridLayout
void KoTemplateChooseDia::setupDialog()
{
- QGridLayout *maingrid=new QGridLayout( d->m_mainwidget, 1, 1, 2, 6);
+ TQGridLayout *maingrid=new TQGridLayout( d->m_mainwidget, 1, 1, 2, 6);
KConfigGroup grp( d->m_instance->config(), "TemplateChooserDialog" );
if (d->m_dialogType == Everything)
{
// the user may want to start with his favorite template
- if (grp.readEntry( "NoStartDlg" ) == QString("yes") )
+ if (grp.readEntry( "NoStartDlg" ) == TQString("yes") )
{
d->m_nostartupdlg = true;
d->m_returnType = Empty;
// no default template, just start with an empty document
- if (grp.readEntry("LastReturnType") == QString("Empty") )
+ if (grp.readEntry("LastReturnType") == TQString("Empty") )
return;
// start with the default template
@@ -524,7 +524,7 @@ void KoTemplateChooseDia::setupDialog()
d->m_fullTemplateName = grp.readPathEntry( "FullTemplateName" );
// be paranoid : invalid template means empty template
- if (!QFile::exists(d->m_fullTemplateName))
+ if (!TQFile::exists(d->m_fullTemplateName))
return;
if (d->m_fullTemplateName.length() < 2)
@@ -537,29 +537,29 @@ void KoTemplateChooseDia::setupDialog()
if ( cancelQuits() )
setButtonCancel( KStdGuiItem::quit() );
- d->tabWidget = new QTabWidget( d->m_mainwidget, "tabWidget" );
+ d->tabWidget = new TQTabWidget( d->m_mainwidget, "tabWidget" );
maingrid->addWidget( d->tabWidget, 0, 0 );
// new document
- d->newTab = new QWidget( d->tabWidget, "newTab" );
+ d->newTab = new TQWidget( d->tabWidget, "newTab" );
d->tabWidget->insertTab( d->newTab, i18n( "&Create Document" ) );
- QGridLayout * newTabLayout = new QGridLayout( d->newTab, 1, 1, KDialogBase::marginHint(), KDialogBase::spacingHint());
+ TQGridLayout * newTabLayout = new TQGridLayout( d->newTab, 1, 1, KDialogBase::marginHint(), KDialogBase::spacingHint());
// existing document
- d->existingTab = new QWidget( d->tabWidget, "existingTab" );
+ d->existingTab = new TQWidget( d->tabWidget, "existingTab" );
d->tabWidget->insertTab( d->existingTab, i18n( "Open &Existing Document" ) );
- QGridLayout * existingTabLayout = new QGridLayout( d->existingTab, 1, 1, 0, KDialog::spacingHint());
+ TQGridLayout * existingTabLayout = new TQGridLayout( d->existingTab, 1, 1, 0, KDialog::spacingHint());
// recent document
- d->recentTab = new QWidget( d->tabWidget, "recentTab" );
+ d->recentTab = new TQWidget( d->tabWidget, "recentTab" );
d->tabWidget->insertTab( d->recentTab, i18n( "Open &Recent Document" ) );
- QGridLayout * recentTabLayout = new QGridLayout( d->recentTab, 1, 1, KDialogBase::marginHint(), KDialog::spacingHint());
+ TQGridLayout * recentTabLayout = new TQGridLayout( d->recentTab, 1, 1, KDialogBase::marginHint(), KDialog::spacingHint());
setupTemplateDialog(d->newTab, newTabLayout);
setupFileDialog(d->existingTab, existingTabLayout);
setupRecentDialog(d->recentTab, recentTabLayout);
- QString tabhighlighted = grp.readEntry("LastReturnType");
+ TQString tabhighlighted = grp.readEntry("LastReturnType");
if ( tabhighlighted == "Template" )
d->tabWidget->setCurrentPage(0); // CreateDocument tab
else if (tabhighlighted == "File" )
@@ -586,11 +586,11 @@ void KoTemplateChooseDia::setupDialog()
/*================================================================*/
// private SLOT
-void KoTemplateChooseDia::currentChanged( QIconViewItem * item)
+void KoTemplateChooseDia::currentChanged( TQIconViewItem * item)
{
if (item)
{
- QIconView* canvas = item->iconView();
+ TQIconView* canvas = item->iconView();
// set text in the textarea
d->textedit->setText( descriptionText(
@@ -610,7 +610,7 @@ void KoTemplateChooseDia::currentChanged( QIconViewItem * item)
/*================================================================*/
// private SLOT
-void KoTemplateChooseDia::chosen(QIconViewItem * item)
+void KoTemplateChooseDia::chosen(TQIconViewItem * item)
{
// the user double clicked on a template
if (item)
@@ -622,7 +622,7 @@ void KoTemplateChooseDia::chosen(QIconViewItem * item)
/* */
// private SLOT
-void KoTemplateChooseDia::recentSelected( QIconViewItem * item)
+void KoTemplateChooseDia::recentSelected( TQIconViewItem * item)
{
if (item)
{
@@ -642,7 +642,7 @@ void KoTemplateChooseDia::slotOk()
static const char* const s_returnTypes[] = { 0 /*Cancel ;)*/, "Template", "File", "Empty" };
if ( d->m_returnType <= Empty )
{
- grp.writeEntry( "LastReturnType", QString::fromLatin1(s_returnTypes[d->m_returnType]) );
+ grp.writeEntry( "LastReturnType", TQString::tqfromLatin1(s_returnTypes[d->m_returnType]) );
if (d->m_returnType == Template)
{
grp.writeEntry( "TemplateTab", d->m_jwidget->activePageIndex() );
@@ -654,10 +654,10 @@ void KoTemplateChooseDia::slotOk()
{
// The checkbox m_nodiag is in tri-state mode for new documents
// fixes bug:77542
- if (d->m_nodiag->state() == QButton::On) {
+ if (d->m_nodiag->state() == TQButton::On) {
grp.writeEntry( "NoStartDlg", "yes");
}
- else if (d->m_nodiag->state() == QButton::Off) {
+ else if (d->m_nodiag->state() == TQButton::Off) {
grp.writeEntry( "NoStartDlg", "no");
}
}
@@ -665,7 +665,7 @@ void KoTemplateChooseDia::slotOk()
else
{
kdWarning(30003) << "Unsupported template chooser result: " << d->m_returnType << endl;
- grp.writeEntry( "LastReturnType", QString::null );
+ grp.writeEntry( "LastReturnType", TQString() );
}
KDialogBase::slotOk();
}
@@ -704,9 +704,9 @@ bool KoTemplateChooseDia::collectInfo()
if (! item)
return false;
KURL url = item->url();
- if(url.isLocalFile() && !QFile::exists(url.path()))
+ if(url.isLocalFile() && !TQFile::exists(url.path()))
{
- KMessageBox::error( this, i18n( "The file %1 does not exist." ).arg( url.path() ) );
+ KMessageBox::error( this, i18n( "The file %1 does not exist." ).tqarg( url.path() ) );
return false;
}
d->m_fullTemplateName = url.url();
@@ -731,9 +731,9 @@ bool KoTemplateChooseDia::collectInfo()
/*================================================================*/
//private
-QString KoTemplateChooseDia::descriptionText(const QString &name, const QString &description)
+TQString KoTemplateChooseDia::descriptionText(const TQString &name, const TQString &description)
{
- QString descrText(i18n("Name:"));
+ TQString descrText(i18n("Name:"));
descrText += " " + name;
descrText += "\n";
descrText += i18n("Description:");
@@ -746,14 +746,14 @@ QString KoTemplateChooseDia::descriptionText(const QString &name, const QString
/*================================================================*/
-QIconViewItem * KoTCDIconCanvas::load( KoTemplateGroup *group, const QString& name, KInstance* instance )
+TQIconViewItem * KoTCDIconCanvas::load( KoTemplateGroup *group, const TQString& name, KInstance* instance )
{
- QIconViewItem * itemtoreturn = 0;
+ TQIconViewItem * itemtoreturn = 0;
for (KoTemplate *t=group->first(); t!=0L; t=group->next()) {
if (t->isHidden())
continue;
- QIconViewItem *item = new KoTCDIconViewItem(
+ TQIconViewItem *item = new KoTCDIconViewItem(
this,
t->name(),
t->loadPicture(instance),
@@ -780,7 +780,7 @@ KoTCDRecentFilesIconView::~KoTCDRecentFilesIconView()
removeToolTip();
}
-void KoTCDRecentFilesIconView::showToolTip( QIconViewItem* item )
+void KoTCDRecentFilesIconView::showToolTip( TQIconViewItem* item )
{
removeToolTip();
if ( !item )
@@ -792,25 +792,25 @@ void KoTCDRecentFilesIconView::showToolTip( QIconViewItem* item )
// KFileIconView would need a virtual method for deciding if a tooltip should be shown,
// and another one for deciding what's the text of the tooltip...
const KFileItem *fi = ( (KFileIconViewItem*)item )->fileInfo();
- QString toolTipText = fi->url().prettyURL( 0, KURL::StripFileProtocol );
- toolTip = new QLabel( QString::fromLatin1(" %1 ").arg(toolTipText), 0,
+ TQString toolTipText = fi->url().prettyURL( 0, KURL::StripFileProtocol );
+ toolTip = new TQLabel( TQString::tqfromLatin1(" %1 ").tqarg(toolTipText), 0,
"myToolTip",
WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM );
- toolTip->setFrameStyle( QFrame::Plain | QFrame::Box );
+ toolTip->setFrameStyle( TQFrame::Plain | TQFrame::Box );
toolTip->setLineWidth( 1 );
- toolTip->setAlignment( AlignLeft | AlignTop );
- toolTip->move( QCursor::pos() + QPoint( 14, 14 ) );
+ toolTip->tqsetAlignment( AlignLeft | AlignTop );
+ toolTip->move( TQCursor::pos() + TQPoint( 14, 14 ) );
toolTip->adjustSize();
- QRect screen = QApplication::desktop()->screenGeometry(
- QApplication::desktop()->screenNumber(QCursor::pos()));
+ TQRect screen = TQApplication::desktop()->screenGeometry(
+ TQApplication::desktop()->screenNumber(TQCursor::pos()));
if (toolTip->x()+toolTip->width() > screen.right()) {
toolTip->move(toolTip->x()+screen.right()-toolTip->x()-toolTip->width(), toolTip->y());
}
if (toolTip->y()+toolTip->height() > screen.bottom()) {
toolTip->move(toolTip->x(), screen.bottom()-toolTip->y()-toolTip->height()+toolTip->y());
}
- toolTip->setFont( QToolTip::font() );
- toolTip->setPalette( QToolTip::palette(), TRUE );
+ toolTip->setFont( TQToolTip::font() );
+ toolTip->tqsetPalette( TQToolTip::palette(), TRUE );
toolTip->show();
}
@@ -820,7 +820,7 @@ void KoTCDRecentFilesIconView::removeToolTip()
toolTip = 0;
}
-void KoTCDRecentFilesIconView::hideEvent( QHideEvent *ev )
+void KoTCDRecentFilesIconView::hideEvent( TQHideEvent *ev )
{
removeToolTip();
KFileIconView::hideEvent( ev );
diff --git a/lib/kofficeui/KoTemplateChooseDia.h b/lib/kofficeui/KoTemplateChooseDia.h
index 41389b20e..98188ad15 100644
--- a/lib/kofficeui/KoTemplateChooseDia.h
+++ b/lib/kofficeui/KoTemplateChooseDia.h
@@ -34,7 +34,7 @@
class KoTCDIconViewItem;
class KoTemplateTree;
class KoTemplateGroup;
-class QGridLayout;
+class TQGridLayout;
/**
* Our reimplementation of KIconCanvas used within the template-chooser dialog.
@@ -43,15 +43,16 @@ class QGridLayout;
class KoTCDIconCanvas : public KIconCanvas
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoTCDIconCanvas( QWidget *parent = 0, const char *name = 0L )
- : KIconCanvas( parent, name ) {}
+ KoTCDIconCanvas( TQWidget *tqparent = 0, const char *name = 0L )
+ : KIconCanvas( tqparent, name ) {}
bool isCurrentValid() { return currentItem(); }
- QIconViewItem * load(KoTemplateGroup *group, const QString& name, KInstance* instance);
+ TQIconViewItem * load(KoTemplateGroup *group, const TQString& name, KInstance* instance);
protected:
- virtual void keyPressEvent( QKeyEvent *e ) {
+ virtual void keyPressEvent( TQKeyEvent *e ) {
if ( e->key() == Key_Return || e->key() == Key_Enter )
e->ignore();
else
@@ -63,29 +64,29 @@ class KoTCDIconCanvas : public KIconCanvas
class KoTCDIconViewItem : public KIconViewItem
{
public:
- KoTCDIconViewItem(QIconView *parent=0)
- : KIconViewItem ( parent )
+ KoTCDIconViewItem(TQIconView *tqparent=0)
+ : KIconViewItem ( tqparent )
{}
- KoTCDIconViewItem(QIconView *parent=0, const QString &text=0, const QPixmap &icon=0,
- const QString &descr=0, const QString &fullname=0)
- : KIconViewItem(parent, text, icon)
+ KoTCDIconViewItem(TQIconView *tqparent=0, const TQString &text=0, const TQPixmap &icon=0,
+ const TQString &descr=0, const TQString &fullname=0)
+ : KIconViewItem(tqparent, text, icon)
{
m_descr = descr;
m_full = fullname;
}
- QString getDescr() const { return m_descr; }
- QString getFName() const { return m_full; }
+ TQString getDescr() const { return m_descr; }
+ TQString getFName() const { return m_full; }
private :
- QString m_descr;
- QString m_full;
+ TQString m_descr;
+ TQString m_full;
};
#include <kfileiconview.h>
-#include <qlabel.h>
+#include <tqlabel.h>
/**
* Our reimplementation of KFileIconView used as the "recent files" view
* within the template-chooser dialog.
@@ -93,27 +94,28 @@ class KoTCDIconViewItem : public KIconViewItem
*/
class KoTCDRecentFilesIconView : public KFileIconView {
Q_OBJECT
+ TQ_OBJECT
public:
- KoTCDRecentFilesIconView( QWidget* parent, const char* name ) :
- KFileIconView( parent, name ), toolTip(0)
+ KoTCDRecentFilesIconView( TQWidget* tqparent, const char* name ) :
+ KFileIconView( tqparent, name ), toolTip(0)
{
- connect( this, SIGNAL( onItem( QIconViewItem * ) ),
- SLOT( showToolTip( QIconViewItem * ) ) );
- connect( this, SIGNAL( onViewport() ),
- SLOT( removeToolTip() ) );
+ connect( this, TQT_SIGNAL( onItem( TQIconViewItem * ) ),
+ TQT_SLOT( showToolTip( TQIconViewItem * ) ) );
+ connect( this, TQT_SIGNAL( onViewport() ),
+ TQT_SLOT( removeToolTip() ) );
}
virtual ~KoTCDRecentFilesIconView();
protected:
/**
* Reimplemented to remove an eventual tooltip
*/
- virtual void hideEvent( QHideEvent * );
+ virtual void hideEvent( TQHideEvent * );
private slots:
- void showToolTip( QIconViewItem* );
+ void showToolTip( TQIconViewItem* );
void removeToolTip();
private:
- QLabel* toolTip;
+ TQLabel* toolTip;
};
class KInstance;
@@ -131,6 +133,7 @@ class KoTemplateChooseDiaPrivate;
class KOFFICEUI_EXPORT KoTemplateChooseDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -165,33 +168,33 @@ public:
* @param dialogType the type of the dialog
* @param templateType the template type of your application (see kword or
* kpresenter for details)
- * @param parent pointer to parent widget
+ * @param tqparent pointer to tqparent widget
* @return The return type (see above)
*/
- static ReturnType choose(KInstance* instance, QString &file,
+ static ReturnType choose(KInstance* instance, TQString &file,
const DialogType &dialogType,
- const QCString& templateType,
- QWidget* parent);
+ const TQCString& templateType,
+ TQWidget* tqparent);
private:
/// Ditto, with extraNativeMimeTypes added
- static ReturnType choose(KInstance* instance, QString &file,
- const QCString &format,
- const QString &nativeName,
- const QStringList& extraNativeMimeTypes,
+ static ReturnType choose(KInstance* instance, TQString &file,
+ const TQCString &format,
+ const TQString &nativeName,
+ const TQStringList& extraNativeMimeTypes,
const DialogType &dialogType=Everything,
- const QCString& templateType="",
- QWidget* parent = 0);
+ const TQCString& templateType="",
+ TQWidget* tqparent = 0);
public:
/**
* Method to get the current template
*/
- QString getTemplate() const;
+ TQString getTemplate() const;
/**
* Method to get the "full" template (path+template)
*/
- QString getFullTemplate() const;
+ TQString getFullTemplate() const;
/**
* The ReturnType (call this one after exec())
*/
@@ -210,8 +213,8 @@ protected slots:
private:
/**
*
- * @param parent parent the parent of the dialog
- * @param name the Qt internal name
+ * @param tqparent tqparent the tqparent of the dialog
+ * @param name the TQt internal name
* @param instance the KInstance of your app
* @param format is the mimetype of the app (e.g. application/x-kspread)
* @param nativeName is the name of your app (e.g KSpread)
@@ -221,29 +224,29 @@ private:
*
* @return The return type (see above)
*/
- KoTemplateChooseDia(QWidget *parent, const char *name, KInstance* instance,
- const QCString &format,
- const QString &nativeName,
- const QStringList &extraNativeMimeTypes,
+ KoTemplateChooseDia(TQWidget *tqparent, const char *name, KInstance* instance,
+ const TQCString &format,
+ const TQString &nativeName,
+ const TQStringList &extraNativeMimeTypes,
const DialogType &dialogType=Everything,
- const QCString& templateType="");
+ const TQCString& templateType="");
private:
KoTemplateChooseDiaPrivate *d;
- QString descriptionText(const QString &name, const QString &description);
+ TQString descriptionText(const TQString &name, const TQString &description);
void setupDialog();
- void setupTemplateDialog(QWidget * widgetbase, QGridLayout * layout);
- void setupFileDialog(QWidget * widgetbase, QGridLayout * layout);
- void setupRecentDialog(QWidget * widgetbase, QGridLayout * layout);
+ void setupTemplateDialog(TQWidget * widgetbase, TQGridLayout * tqlayout);
+ void setupFileDialog(TQWidget * widgetbase, TQGridLayout * tqlayout);
+ void setupRecentDialog(TQWidget * widgetbase, TQGridLayout * tqlayout);
bool collectInfo();
bool noStartupDlg() const;
private slots:
- void chosen(QIconViewItem *);
- void currentChanged( QIconViewItem * );
- void recentSelected( QIconViewItem * );
+ void chosen(TQIconViewItem *);
+ void currentChanged( TQIconViewItem * );
+ void recentSelected( TQIconViewItem * );
};
#endif
diff --git a/lib/kofficeui/KoTemplateCreateDia.cpp b/lib/kofficeui/KoTemplateCreateDia.cpp
index 0e89bb997..756c6e2a9 100644
--- a/lib/kofficeui/KoTemplateCreateDia.cpp
+++ b/lib/kofficeui/KoTemplateCreateDia.cpp
@@ -22,15 +22,15 @@
#include <KoTemplateCreateDia.h>
-#include <qfile.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qheader.h>
-#include <qcheckbox.h>
-#include <qtooltip.h>
+#include <tqfile.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
+#include <tqheader.h>
+#include <tqcheckbox.h>
+#include <tqtooltip.h>
#include <ktempfile.h>
#include <klineedit.h>
@@ -55,8 +55,8 @@
class KoTemplateCreateDiaPrivate {
public:
- KoTemplateCreateDiaPrivate( QWidget* /*parent*/, KInstance * instance)
- : m_instance( instance ), m_tempFile( QString::null, ".png" )
+ KoTemplateCreateDiaPrivate( TQWidget* /*tqparent*/, KInstance * instance)
+ : m_instance( instance ), m_tempFile( TQString(), ".png" )
{
m_tree=0L;
m_name=0L;
@@ -76,14 +76,14 @@ public:
KoTemplateTree *m_tree;
KLineEdit *m_name;
- QRadioButton *m_default, *m_custom;
- QPushButton *m_select;
- QLabel *m_preview;
- QString m_customFile;
- QPixmap m_customPixmap;
+ TQRadioButton *m_default, *m_custom;
+ TQPushButton *m_select;
+ TQLabel *m_preview;
+ TQString m_customFile;
+ TQPixmap m_customPixmap;
KListView *m_groups;
- QPushButton *m_add, *m_remove;
- QCheckBox *m_defaultTemplate;
+ TQPushButton *m_add, *m_remove;
+ TQCheckBox *m_defaultTemplate;
KInstance *m_instance;
bool m_changed;
/// Temp file for remote picture file
@@ -97,28 +97,28 @@ public:
*
****************************************************************************/
-KoTemplateCreateDia::KoTemplateCreateDia( const QCString &templateType, KInstance *instance,
- const QString &file, const QPixmap &pix, QWidget *parent ) :
- KDialogBase( parent, "template create dia", true, i18n( "Create Template" ),
+KoTemplateCreateDia::KoTemplateCreateDia( const TQCString &templateType, KInstance *instance,
+ const TQString &file, const TQPixmap &pix, TQWidget *tqparent ) :
+ KDialogBase( tqparent, "template create dia", true, i18n( "Create Template" ),
KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok ), m_file(file), m_pixmap(pix) {
- d=new KoTemplateCreateDiaPrivate( parent, instance );
+ d=new KoTemplateCreateDiaPrivate( tqparent, instance );
- QFrame *mainwidget=makeMainWidget();
- QHBoxLayout *mbox=new QHBoxLayout(mainwidget, 0, KDialogBase::spacingHint());
- QVBoxLayout *leftbox=new QVBoxLayout(mbox);
+ TQFrame *mainwidget=makeMainWidget();
+ TQHBoxLayout *mbox=new TQHBoxLayout(mainwidget, 0, KDialogBase::spacingHint());
+ TQVBoxLayout *leftbox=new TQVBoxLayout(mbox);
- QLabel *label=new QLabel(i18n("Name:"), mainwidget);
+ TQLabel *label=new TQLabel(i18n("Name:"), mainwidget);
leftbox->addSpacing(label->fontMetrics().height()/2);
- QHBoxLayout *namefield=new QHBoxLayout(leftbox);
+ TQHBoxLayout *namefield=new TQHBoxLayout(leftbox);
namefield->addWidget(label);
d->m_name=new KLineEdit(mainwidget);
d->m_name->setFocus();
- connect(d->m_name, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotNameChanged(const QString &)));
+ connect(d->m_name, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(slotNameChanged(const TQString &)));
namefield->addWidget(d->m_name);
- label=new QLabel(i18n("Group:"), mainwidget);
+ label=new TQLabel(i18n("Group:"), mainwidget);
leftbox->addWidget(label);
d->m_groups=new KListView(mainwidget);
leftbox->addWidget(d->m_groups);
@@ -131,54 +131,54 @@ KoTemplateCreateDia::KoTemplateCreateDia( const QCString &templateType, KInstanc
fillGroupTree();
d->m_groups->sort();
- QHBoxLayout *bbox=new QHBoxLayout(leftbox);
- d->m_add=new QPushButton(i18n("&Add Group..."), mainwidget);
- connect(d->m_add, SIGNAL(clicked()), this, SLOT(slotAddGroup()));
+ TQHBoxLayout *bbox=new TQHBoxLayout(leftbox);
+ d->m_add=new TQPushButton(i18n("&Add Group..."), mainwidget);
+ connect(d->m_add, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddGroup()));
bbox->addWidget(d->m_add);
- d->m_remove=new QPushButton(i18n("&Remove"), mainwidget);
- connect(d->m_remove, SIGNAL(clicked()), this, SLOT(slotRemove()));
+ d->m_remove=new TQPushButton(i18n("&Remove"), mainwidget);
+ connect(d->m_remove, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemove()));
bbox->addWidget(d->m_remove);
- QVBoxLayout *rightbox=new QVBoxLayout(mbox);
- QGroupBox *pixbox=new QGroupBox(i18n("Picture"), mainwidget);
+ TQVBoxLayout *rightbox=new TQVBoxLayout(mbox);
+ TQGroupBox *pixbox=new TQGroupBox(i18n("Picture"), mainwidget);
rightbox->addWidget(pixbox);
- QVBoxLayout *pixlayout=new QVBoxLayout(pixbox, KDialogBase::marginHint(),
+ TQVBoxLayout *pixtqlayout=new TQVBoxLayout(pixbox, KDialogBase::marginHint(),
KDialogBase::spacingHint());
- pixlayout->addSpacing(pixbox->fontMetrics().height()/2);
- pixlayout->addStretch(1);
- d->m_default=new QRadioButton(i18n("&Default"), pixbox);
+ pixtqlayout->addSpacing(pixbox->fontMetrics().height()/2);
+ pixtqlayout->addStretch(1);
+ d->m_default=new TQRadioButton(i18n("&Default"), pixbox);
d->m_default->setChecked(true);
- connect(d->m_default, SIGNAL(clicked()), this, SLOT(slotDefault()));
- pixlayout->addWidget(d->m_default);
- QHBoxLayout *custombox=new QHBoxLayout(pixlayout);
- d->m_custom=new QRadioButton(i18n("Custom"), pixbox);
+ connect(d->m_default, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDefault()));
+ pixtqlayout->addWidget(d->m_default);
+ TQHBoxLayout *custombox=new TQHBoxLayout(pixtqlayout);
+ d->m_custom=new TQRadioButton(i18n("Custom"), pixbox);
d->m_custom->setChecked(false);
- connect(d->m_custom, SIGNAL(clicked()), this, SLOT(slotCustom()));
+ connect(d->m_custom, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCustom()));
custombox->addWidget(d->m_custom);
- d->m_select=new QPushButton(i18n("&Select..."), pixbox);
- connect(d->m_select, SIGNAL(clicked()), this, SLOT(slotSelect()));
+ d->m_select=new TQPushButton(i18n("&Select..."), pixbox);
+ connect(d->m_select, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelect()));
custombox->addWidget(d->m_select, 1);
custombox->addStretch(1);
- pixlayout->addStretch(1);
- label=new QLabel(i18n("Preview:"), pixbox);
- pixlayout->addWidget(label);
- QHBoxLayout *previewbox=new QHBoxLayout(pixlayout);
+ pixtqlayout->addStretch(1);
+ label=new TQLabel(i18n("Preview:"), pixbox);
+ pixtqlayout->addWidget(label);
+ TQHBoxLayout *previewbox=new TQHBoxLayout(pixtqlayout);
previewbox->addStretch(10);
- d->m_preview=new QLabel(pixbox); // setPixmap() -> auto resize?
+ d->m_preview=new TQLabel(pixbox); // setPixmap() -> auto resize?
previewbox->addWidget(d->m_preview);
previewbox->addStretch(10);
- pixlayout->addStretch(8);
+ pixtqlayout->addStretch(8);
- d->m_defaultTemplate = new QCheckBox( i18n("Use the new template as default"), mainwidget );
+ d->m_defaultTemplate = new TQCheckBox( i18n("Use the new template as default"), mainwidget );
d->m_defaultTemplate->setChecked( true );
- QToolTip::add( d->m_defaultTemplate, i18n("Use the new template every time %1 starts").arg(instance->aboutData()->programName() ) );
+ TQToolTip::add( d->m_defaultTemplate, i18n("Use the new template every time %1 starts").tqarg(instance->aboutData()->programName() ) );
rightbox->addWidget( d->m_defaultTemplate );
enableButtonOK(false);
d->m_changed=false;
updatePixmap();
- connect(d->m_groups,SIGNAL( selectionChanged()),this,SLOT(slotSelectionChanged()));
+ connect(d->m_groups,TQT_SIGNAL( selectionChanged()),this,TQT_SLOT(slotSelectionChanged()));
d->m_remove->setEnabled(d->m_groups->currentItem());
}
@@ -189,7 +189,7 @@ KoTemplateCreateDia::~KoTemplateCreateDia() {
void KoTemplateCreateDia::slotSelectionChanged()
{
- const QListViewItem* item = d->m_groups->currentItem();
+ const TQListViewItem* item = d->m_groups->currentItem();
d->m_remove->setEnabled( item );
if ( ! item )
return;
@@ -200,10 +200,10 @@ void KoTemplateCreateDia::slotSelectionChanged()
}
}
-void KoTemplateCreateDia::createTemplate( const QCString &templateType, KInstance *instance,
- const QString &file, const QPixmap &pix, QWidget *parent ) {
+void KoTemplateCreateDia::createTemplate( const TQCString &templateType, KInstance *instance,
+ const TQString &file, const TQPixmap &pix, TQWidget *tqparent ) {
- KoTemplateCreateDia *dia = new KoTemplateCreateDia( templateType, instance, file, pix, parent );
+ KoTemplateCreateDia *dia = new KoTemplateCreateDia( templateType, instance, file, pix, tqparent );
dia->exec();
delete dia;
}
@@ -211,7 +211,7 @@ void KoTemplateCreateDia::createTemplate( const QCString &templateType, KInstanc
void KoTemplateCreateDia::slotOk() {
// get the current item, if there is one...
- QListViewItem *item=d->m_groups->currentItem();
+ TQListViewItem *item=d->m_groups->currentItem();
if(!item)
item=d->m_groups->firstChild();
if(!item) { // safe :)
@@ -221,14 +221,14 @@ void KoTemplateCreateDia::slotOk() {
}
// is it a group or a template? anyway - get the group :)
if(item->depth()!=0)
- item=item->parent();
+ item=item->tqparent();
if(!item) { // *very* safe :P
d->m_tree->writeTemplateTree();
KDialogBase::slotCancel();
return;
}
- KoTemplateGroup *group=d->m_tree->find(item->text(0));
+ KoTemplateGroup *group=d->m_tree->tqfind(item->text(0));
if(!group) { // even safer
d->m_tree->writeTemplateTree();
KDialogBase::slotCancel();
@@ -242,20 +242,20 @@ void KoTemplateCreateDia::slotOk() {
}
// copy the tmp file and the picture the app provides
- QString dir=d->m_tree->instance()->dirs()->saveLocation(d->m_tree->templateType());
+ TQString dir=d->m_tree->instance()->dirs()->saveLocation(d->m_tree->templateType());
dir+=group->name();
- QString templateDir=dir+"/.source/";
- QString iconDir=dir+"/.icon/";
+ TQString templateDir=dir+"/.source/";
+ TQString iconDir=dir+"/.icon/";
- QString file=KoTemplates::stripWhiteSpace(d->m_name->text());
- QString tmpIcon=".icon/"+file;
+ TQString file=KoTemplates::stripWhiteSpace(d->m_name->text());
+ TQString tmpIcon=".icon/"+file;
tmpIcon+=".png";
- QString icon=iconDir+file;
+ TQString icon=iconDir+file;
icon+=".png";
// try to find the extension for the template file :P
- const int pos = m_file.findRev( '.' );
- QString ext;
+ const int pos = m_file.tqfindRev( '.' );
+ TQString ext;
if ( pos > -1 )
ext = m_file.mid( pos );
else
@@ -263,7 +263,7 @@ void KoTemplateCreateDia::slotOk() {
KURL dest;
dest.setPath(templateDir+file+ext);
- if ( QFile::exists( dest.prettyURL(0, KURL::StripFileProtocol) ) )
+ if ( TQFile::exists( dest.prettyURL(0, KURL::StripFileProtocol) ) )
{
do
{
@@ -276,9 +276,9 @@ void KoTemplateCreateDia::slotOk() {
}
bool ignore = false;
kdDebug(30004) << "Trying to create template: " << d->m_name->text() << "URL=" << ".source/"+file+ext << " ICON=" << tmpIcon << endl;
- KoTemplate *t=new KoTemplate(d->m_name->text(), QString::null, ".source/"+file+ext, tmpIcon, "", "", false, true);
+ KoTemplate *t=new KoTemplate(d->m_name->text(), TQString(), ".source/"+file+ext, tmpIcon, "", "", false, true);
if(!group->add(t)) {
- KoTemplate *existingTemplate=group->find(d->m_name->text());
+ KoTemplate *existingTemplate=group->tqfind(d->m_name->text());
if(existingTemplate && !existingTemplate->isHidden()) {
if(KMessageBox::warningYesNo(this, i18n("Do you really want to overwrite"
" the existing '%1' template?").
@@ -319,9 +319,9 @@ void KoTemplateCreateDia::slotOk() {
// if there's a .directory file, we copy this one, too
bool ready=false;
- QStringList tmp=group->dirs();
- for(QStringList::ConstIterator it=tmp.begin(); it!=tmp.end() && !ready; ++it) {
- if((*it).contains(dir)==0) {
+ TQStringList tmp=group->dirs();
+ for(TQStringList::ConstIterator it=tmp.begin(); it!=tmp.end() && !ready; ++it) {
+ if((*it).tqcontains(dir)==0) {
orig.setPath( (*it)+".directory" );
// Check if we can read the file
if( KIO::NetAccess::exists(orig, true, this) ) {
@@ -367,7 +367,7 @@ void KoTemplateCreateDia::slotSelect() {
d->m_default->setChecked(false);
d->m_custom->setChecked(true);
- QString name = KIconDialog::getIcon();
+ TQString name = KIconDialog::getIcon();
if( name.isEmpty() ) {
if(d->m_customFile.isEmpty()) {
d->m_default->setChecked(true);
@@ -376,13 +376,13 @@ void KoTemplateCreateDia::slotSelect() {
return;
}
// ### TODO: do a better remote loading without having to have d->m_tempFile
- QString path = KGlobal::iconLoader()->iconPath(name, KIcon::Desktop);
+ TQString path = KGlobal::iconLoader()->iconPath(name, KIcon::Desktop);
d->m_customFile = path;
- d->m_customPixmap=QPixmap();
+ d->m_customPixmap=TQPixmap();
updatePixmap();
}
-void KoTemplateCreateDia::slotNameChanged(const QString &name) {
+void KoTemplateCreateDia::slotNameChanged(const TQString &name) {
if( ( name.stripWhiteSpace().isEmpty() || !d->m_groups->firstChild() ) && !d->m_changed )
enableButtonOK(false);
@@ -392,20 +392,20 @@ void KoTemplateCreateDia::slotNameChanged(const QString &name) {
void KoTemplateCreateDia::slotAddGroup() {
bool ok=false;
- const QString name ( KInputDialog::getText( i18n("Add Group"), i18n("Enter group name:"), QString::null, &ok, this ) );
+ const TQString name ( KInputDialog::getText( i18n("Add Group"), i18n("Enter group name:"), TQString(), &ok, this ) );
if(!ok)
return;
- KoTemplateGroup *group=d->m_tree->find(name);
+ KoTemplateGroup *group=d->m_tree->tqfind(name);
if(group && !group->isHidden())
{
KMessageBox::information( this, i18n("This name is already used."), i18n("Add Group") );
return;
}
- QString dir=d->m_tree->instance()->dirs()->saveLocation(d->m_tree->templateType());
+ TQString dir=d->m_tree->instance()->dirs()->saveLocation(d->m_tree->templateType());
dir+=name;
KoTemplateGroup *newGroup=new KoTemplateGroup(name, dir, 0, true);
d->m_tree->add(newGroup);
- QListViewItem *item=new QListViewItem(d->m_groups, name);
+ TQListViewItem *item=new TQListViewItem(d->m_groups, name);
d->m_groups->setCurrentItem(item);
d->m_groups->sort();
d->m_name->setFocus();
@@ -415,12 +415,12 @@ void KoTemplateCreateDia::slotAddGroup() {
void KoTemplateCreateDia::slotRemove() {
- QListViewItem *item=d->m_groups->currentItem();
+ TQListViewItem *item=d->m_groups->currentItem();
if(!item)
return;
- QString what;
- QString removed;
+ TQString what;
+ TQString removed;
if (item->depth()==0) {
what = i18n("Do you really want to remove that group?");
removed = i18n("Remove Group");
@@ -436,14 +436,14 @@ void KoTemplateCreateDia::slotRemove() {
}
if(item->depth()==0) {
- KoTemplateGroup *group=d->m_tree->find(item->text(0));
+ KoTemplateGroup *group=d->m_tree->tqfind(item->text(0));
if(group)
group->setHidden(true);
}
else {
bool done=false;
for(KoTemplateGroup *g=d->m_tree->first(); g!=0L && !done; g=d->m_tree->next()) {
- KoTemplate *t=g->find(item->text(0));
+ KoTemplate *t=g->tqfind(item->text(0));
if(t) {
t->setHidden(true);
done=true;
@@ -465,7 +465,7 @@ void KoTemplateCreateDia::updatePixmap() {
if(d->m_customPixmap.isNull()) {
kdDebug(30004) << "Trying to load picture " << d->m_customFile << endl;
// use the code in KoTemplate to load the image... hacky, I know :)
- KoTemplate t("foo", "bar", QString::null, d->m_customFile);
+ KoTemplate t("foo", "bar", TQString(), d->m_customFile);
d->m_customPixmap=t.loadPicture(d->m_tree->instance());
}
else
@@ -485,11 +485,11 @@ void KoTemplateCreateDia::fillGroupTree() {
for(KoTemplateGroup *group=d->m_tree->first(); group!=0L; group=d->m_tree->next()) {
if(group->isHidden())
continue;
- QListViewItem *groupItem=new QListViewItem(d->m_groups, group->name());
+ TQListViewItem *groupItem=new TQListViewItem(d->m_groups, group->name());
for(KoTemplate *t=group->first(); t!=0L; t=group->next()) {
if(t->isHidden())
continue;
- (void)new QListViewItem(groupItem, t->name());
+ (void)new TQListViewItem(groupItem, t->name());
}
}
}
diff --git a/lib/kofficeui/KoTemplateCreateDia.h b/lib/kofficeui/KoTemplateCreateDia.h
index eb7035920..659a9f994 100644
--- a/lib/kofficeui/KoTemplateCreateDia.h
+++ b/lib/kofficeui/KoTemplateCreateDia.h
@@ -25,12 +25,12 @@
#include <kdialogbase.h>
#include <koffice_export.h>
-class QString;
-class QPixmap;
-class QWidget;
+class TQString;
+class TQPixmap;
+class TQWidget;
class KInstance;
class KLineEdit;
-class QListViewItem;
+class TQListViewItem;
class KoTemplateCreateDiaPrivate;
/****************************************************************************
@@ -42,14 +42,15 @@ class KoTemplateCreateDiaPrivate;
class KOFFICEUI_EXPORT KoTemplateCreateDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoTemplateCreateDia( const QCString &templateType, KInstance *instance,
- const QString &file, const QPixmap &pix, QWidget *parent=0L );
+ KoTemplateCreateDia( const TQCString &templateType, KInstance *instance,
+ const TQString &file, const TQPixmap &pix, TQWidget *tqparent=0L );
~KoTemplateCreateDia();
- static void createTemplate( const QCString &templateType, KInstance *instance,
- const QString &file, const QPixmap &pix, QWidget *parent=0L );
+ static void createTemplate( const TQCString &templateType, KInstance *instance,
+ const TQString &file, const TQPixmap &pix, TQWidget *tqparent=0L );
protected:
void slotOk();
@@ -58,7 +59,7 @@ private slots:
void slotDefault();
void slotCustom();
void slotSelect();
- void slotNameChanged(const QString &name);
+ void slotNameChanged(const TQString &name);
void slotAddGroup();
void slotRemove();
@@ -67,8 +68,8 @@ private:
void updatePixmap();
void fillGroupTree();
- QString m_file;
- QPixmap m_pixmap;
+ TQString m_file;
+ TQPixmap m_pixmap;
KoTemplateCreateDiaPrivate *d;
};
diff --git a/lib/kofficeui/KoToolBox.cpp b/lib/kofficeui/KoToolBox.cpp
index 60a3a2bf9..ca7db5a71 100644
--- a/lib/kofficeui/KoToolBox.cpp
+++ b/lib/kofficeui/KoToolBox.cpp
@@ -17,15 +17,15 @@
Boston, MA 02110-1301, USA.
*/
-#include <qbuttongroup.h>
-#include <qnamespace.h>
-#include <qtoolbutton.h>
-#include <qlabel.h>
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qtoolbar.h>
-#include <qdockwindow.h>
+#include <tqbuttongroup.h>
+#include <tqnamespace.h>
+#include <tqtoolbutton.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqtoolbar.h>
+#include <tqdockwindow.h>
#include <kdebug.h>
#include <kparts/event.h>
@@ -45,14 +45,14 @@
#endif
KoToolBox::KoToolBox( KMainWindow *mainWin, const char* name, KInstance* instance, int numberOfTooltypes )
- : KToolBar( mainWin, Qt::DockLeft, false, name, true, true), m_instance(instance)
+ : KToolBar( mainWin, TQt::DockLeft, false, name, true, true), m_instance(instance)
{
setFullSize( false );
setMargin(2);
- m_buttonGroup = new QButtonGroup( 0L );
+ m_buttonGroup = new TQButtonGroup( 0L );
m_buttonGroup->setExclusive( true );
- connect( m_buttonGroup, SIGNAL( pressed( int ) ), this, SLOT( slotButtonPressed( int ) ) );
+ connect( m_buttonGroup, TQT_SIGNAL( pressed( int ) ), this, TQT_SLOT( slotButtonPressed( int ) ) );
m_tools.setAutoDelete( true );
// Create separate lists for the various sorts of tools
@@ -83,7 +83,7 @@ void KoToolBox::slotButtonPressed( int id )
}
-void KoToolBox::registerTool( KAction *tool, int toolType, Q_UINT32 priority )
+void KoToolBox::registerTool( KAction *tool, int toolType, TQ_UINT32 priority )
{
uint prio = priority;
ToolList * tl = m_tools.at(toolType);
@@ -91,18 +91,18 @@ void KoToolBox::registerTool( KAction *tool, int toolType, Q_UINT32 priority )
(*tl)[prio] = tool;
}
-QToolButton *KoToolBox::createButton(QWidget * parent, const char* iconName, QString tooltip)
+TQToolButton *KoToolBox::createButton(TQWidget * tqparent, const char* iconName, TQString tooltip)
{
- QToolButton *button = new QToolButton(parent);
+ TQToolButton *button = new TQToolButton(tqparent);
if ( iconName && *iconName ) {
- QPixmap pixmap = BarIcon( iconName, m_instance );
+ TQPixmap pixmap = BarIcon( iconName, m_instance );
button->setPixmap( pixmap );
button->setToggleButton( true );
}
if ( !tooltip.isEmpty() ) {
- QToolTip::add( button, tooltip );
+ TQToolTip::add( button, tooltip );
}
return button;
}
@@ -125,7 +125,7 @@ void KoToolBox::setupTools()
KAction *tool = it.data();
if(! tool)
continue;
- QToolButton *bn = createButton(tools->getNextParent(), tool->icon().latin1(), tool->toolTip());
+ TQToolButton *bn = createButton(tools->getNextParent(), tool->icon().latin1(), tool->toolTip());
tools->add(bn);
m_buttonGroup->insert( bn, id++ );
m_idToActionMap.append( tool );
@@ -145,7 +145,7 @@ void KoToolBox::setOrientation ( Qt::Orientation o )
o = o == Qt::Vertical ? Qt::Horizontal : Qt::Vertical;
}
- QDockWindow::setOrientation( o );
+ TQDockWindow::setOrientation( o );
for (uint i = 0; i < m_toolBoxes.count(); ++i) {
ToolArea *t = m_toolBoxes.at(i);
@@ -171,12 +171,12 @@ void KoToolBox::enableTools(bool enable)
it.data()->setEnabled(enable);
}
m_buttonGroup->setEnabled(enable);
- for (Q_UINT32 i = 0; i < m_numberOfButtons; ++i) {
- m_buttonGroup->find( i )->setEnabled( enable );
+ for (TQ_UINT32 i = 0; i < m_numberOfButtons; ++i) {
+ m_buttonGroup->tqfind( i )->setEnabled( enable );
}
}
-void KoToolBox::slotSetTool(const QString & toolname)
+void KoToolBox::slotSetTool(const TQString & toolname)
{
for (uint i = 0; i < m_idToActionMap.count(); ++i) {
KAction * a = m_idToActionMap.at(i);
@@ -193,25 +193,25 @@ void KoToolBox::slotSetTool(const QString & toolname)
// class ToolArea
-ToolArea::ToolArea(QWidget *parent)
- : QWidget(parent), m_left(true)
+ToolArea::ToolArea(TQWidget *tqparent)
+ : TQWidget(tqparent), m_left(true)
{
- m_layout = new QBoxLayout(this, QBoxLayout::LeftToRight, 0, 0, 0);
- QWidget *w = new QWidget(this);
+ m_layout = new TQBoxLayout(this, TQBoxLayout::LeftToRight, 0, 0, 0);
+ TQWidget *w = new TQWidget(this);
m_layout->addWidget(w);
- QGridLayout *grid = new QGridLayout(w, 2, 2);
- m_leftRow = new QWidget(w);
+ TQGridLayout *grid = new TQGridLayout(w, 2, 2);
+ m_leftRow = new TQWidget(w);
grid->addWidget(m_leftRow, 0, 0);
- m_leftLayout = new QBoxLayout(m_leftRow, QBoxLayout::TopToBottom, 0, 1, 0);
+ m_leftLayout = new TQBoxLayout(m_leftRow, TQBoxLayout::TopToBottom, 0, 1, 0);
- w = new QWidget(this);
+ w = new TQWidget(this);
m_layout->addWidget(w);
- grid = new QGridLayout(w, 2, 2);
- m_rightRow = new QWidget(w);
+ grid = new TQGridLayout(w, 2, 2);
+ m_rightRow = new TQWidget(w);
grid->addWidget(m_rightRow, 0, 0);
- m_rightLayout = new QBoxLayout(m_rightRow, QBoxLayout::TopToBottom, 0, 1, 0);
+ m_rightLayout = new TQBoxLayout(m_rightRow, TQBoxLayout::TopToBottom, 0, 1, 0);
}
@@ -220,7 +220,7 @@ ToolArea::~ToolArea()
}
-void ToolArea::add(QWidget *button)
+void ToolArea::add(TQWidget *button)
{
if (m_left)
m_leftLayout->addWidget(button);
@@ -231,7 +231,7 @@ void ToolArea::add(QWidget *button)
}
-QWidget* ToolArea::getNextParent()
+TQWidget* ToolArea::getNextParent()
{
if (m_left)
return m_leftRow;
@@ -241,15 +241,15 @@ QWidget* ToolArea::getNextParent()
void ToolArea::setOrientation ( Qt::Orientation o )
{
- QBoxLayout::Direction dir = (o != Qt::Horizontal
- ? QBoxLayout::TopToBottom
- : QBoxLayout::LeftToRight);
+ TQBoxLayout::Direction dir = (o != Qt::Horizontal
+ ? TQBoxLayout::TopToBottom
+ : TQBoxLayout::LeftToRight);
m_leftLayout->setDirection(dir);
m_rightLayout->setDirection(dir);
m_layout->setDirection(o == Qt::Horizontal
- ? QBoxLayout::TopToBottom
- : QBoxLayout::LeftToRight);
+ ? TQBoxLayout::TopToBottom
+ : TQBoxLayout::LeftToRight);
}
diff --git a/lib/kofficeui/KoToolBox.h b/lib/kofficeui/KoToolBox.h
index 81e1c7512..9a04986e6 100644
--- a/lib/kofficeui/KoToolBox.h
+++ b/lib/kofficeui/KoToolBox.h
@@ -19,17 +19,17 @@
#ifndef _KO_TOOLBOX_H_
#define _KO_TOOLBOX_H_
-#include <qtoolbutton.h>
-#include <qptrvector.h>
-#include <qtoolbar.h>
+#include <tqtoolbutton.h>
+#include <tqptrvector.h>
+#include <tqtoolbar.h>
#include <koffice_export.h>
#include <ktoolbar.h>
-class QWidget;
+class TQWidget;
class KAction;
class KMainWindow;
class KDualColorButton;
-class QGridLayout;
+class TQGridLayout;
class ToolArea;
@@ -45,6 +45,7 @@ class ToolArea;
class KOFFICEUI_EXPORT KoToolBox : public KToolBar {
Q_OBJECT
+ TQ_OBJECT
public:
@@ -55,62 +56,62 @@ public:
// there is a separate list, and the tool is categorized correctly.
// The tool is not yet added to the widgets; call setupTools()
// to do that. We don't store the tool.
- void registerTool(KAction * tool, int toolType, Q_UINT32 priority);
+ void registerTool(KAction * tool, int toolType, TQ_UINT32 priority);
// Called when all tools have been added by the tool controller
void setupTools();
public slots:
- virtual void setOrientation ( Orientation o );
+ virtual void setOrientation ( Qt::Orientation o );
void slotButtonPressed( int id );
void slotPressButton( int id );
// Enables or disables all buttons and the corresponding actions.
void enableTools(bool enable);
- void slotSetTool(const QString & toolname);
+ void slotSetTool(const TQString & toolname);
private:
- QToolButton * createButton(QWidget * parent, const char* iconName, QString tooltip);
+ TQToolButton * createButton(TQWidget * tqparent, const char* iconName, TQString tooltip);
private:
- Q_UINT32 m_numberOfButtons;
+ TQ_UINT32 m_numberOfButtons;
- QButtonGroup * m_buttonGroup; // The invisible group of all toolbuttons, so only one can be active at a given time
+ TQButtonGroup * m_buttonGroup; // The invisible group of all toolbuttons, so only one can be active at a given time
- QPtrList<ToolArea> m_toolBoxes; // For every ToolArea
+ TQPtrList<ToolArea> m_toolBoxes; // For every ToolArea
- typedef QMap< int, KAction*> ToolList; // The priority ordered list of tools for a certain tooltype
+ typedef TQMap< int, KAction*> ToolList; // The priority ordered list of tools for a certain tooltype
- QPtrList<ToolList> m_tools;
- QPtrList<KAction> m_idToActionMap; // Map the buttongroup id's to actions for easy activating.
+ TQPtrList<ToolList> m_tools;
+ TQPtrList<KAction> m_idToActionMap; // Map the buttongroup id's to actions for easy activating.
KInstance* m_instance;
};
-class ToolArea : public QWidget {
+class ToolArea : public TQWidget {
public:
- ToolArea(QWidget *parent);
+ ToolArea(TQWidget *tqparent);
~ToolArea();
void setOrientation ( Qt::Orientation o );
- void add(QWidget *button);
+ void add(TQWidget *button);
- QWidget* getNextParent();
+ TQWidget* getNextParent();
private:
- QPtrList<QWidget> m_children;
- QBoxLayout *m_layout;
+ TQPtrList<TQWidget> m_tqchildren;
+ TQBoxLayout *m_layout;
- QWidget *m_leftRow;
- QBoxLayout *m_leftLayout;
+ TQWidget *m_leftRow;
+ TQBoxLayout *m_leftLayout;
- QWidget *m_rightRow;
- QBoxLayout *m_rightLayout;
+ TQWidget *m_rightRow;
+ TQBoxLayout *m_rightLayout;
bool m_left;
};
diff --git a/lib/kofficeui/KoTooluButton.cpp b/lib/kofficeui/KoTooluButton.cpp
index c5e893d5f..566a37228 100644
--- a/lib/kofficeui/KoTooluButton.cpp
+++ b/lib/kofficeui/KoTooluButton.cpp
@@ -17,13 +17,13 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qtooltip.h>
-#include <qpainter.h>
-#include <qdrawutil.h>
-#include <qpixmap.h>
-#include <qstyle.h>
-#include <qpopupmenu.h>
+#include <tqapplication.h>
+#include <tqtooltip.h>
+#include <tqpainter.h>
+#include <tqdrawutil.h>
+#include <tqpixmap.h>
+#include <tqstyle.h>
+#include <tqpopupmenu.h>
#include <kglobalsettings.h>
#include <ktoolbar.h>
@@ -41,8 +41,8 @@ namespace {
int ARROW_WIDTH = 12;
}
-KoColorPanel::KoColorPanel( QWidget* parent, const char* name ) :
- QWidget( parent, name, WStaticContents | WRepaintNoErase | WResizeNoErase )
+KoColorPanel::KoColorPanel( TQWidget* tqparent, const char* name ) :
+ TQWidget( tqparent, name, WStaticContents | WRepaintNoErase | WResizeNoErase )
{
setMouseTracking( true );
setAcceptDrops( true );
@@ -53,52 +53,52 @@ KoColorPanel::~KoColorPanel()
{
}
-QSize KoColorPanel::sizeHint() const
+TQSize KoColorPanel::tqsizeHint() const
{
- return minimumSizeHint();
+ return tqminimumSizeHint();
}
-QSize KoColorPanel::minimumSizeHint() const
+TQSize KoColorPanel::tqminimumSizeHint() const
{
- return QSize( COLS << 4, lines() << 4 );
+ return TQSize( COLS << 4, lines() << 4 );
}
-QPopupMenu* KoColorPanel::createColorPopup( KoColorPanel::MenuStyle style, const QColor& defaultColor,
- const QObject* receiver, const char* slot,
- QWidget* parent, const char* name )
+TQPopupMenu* KoColorPanel::createColorPopup( KoColorPanel::MenuStyle style, const TQColor& defaultColor,
+ const TQObject* receiver, const char* slot,
+ TQWidget* tqparent, const char* name )
{
- QPopupMenu* menu = new QPopupMenu( parent, name );
+ TQPopupMenu* menu = new TQPopupMenu( tqparent, name );
KoColorPopupProxy* proxy = 0;
if ( defaultColor.isValid() ) {
- QPixmap pixmap( 12, 12 );
- QPainter p( &pixmap );
+ TQPixmap pixmap( 12, 12 );
+ TQPainter p( &pixmap );
p.fillRect( 0, 0, 12, 12, defaultColor );
p.end();
- proxy = new KoColorPopupProxy( defaultColor, 0, menu, "color proxy" );
- connect( proxy, SIGNAL( colorSelected( const QColor& ) ), receiver, slot );
- menu->insertItem( QIconSet( pixmap ), i18n( "Default Color" ), proxy, SLOT( slotDefaultColor() ) );
+ proxy = new KoColorPopupProxy( defaultColor, 0, TQT_TQOBJECT(menu), "color proxy" );
+ connect( proxy, TQT_SIGNAL( colorSelected( const TQColor& ) ), receiver, slot );
+ menu->insertItem( TQIconSet( pixmap ), i18n( "Default Color" ), proxy, TQT_SLOT( slotDefaultColor() ) );
menu->insertSeparator();
}
KoColorPanel* panel = new KoColorPanel( menu, "default colors" );
panel->insertDefaultColors();
- connect( panel, SIGNAL( colorSelected( const QColor& ) ), receiver, slot );
+ connect( panel, TQT_SIGNAL( colorSelected( const TQColor& ) ), receiver, slot );
menu->insertItem( panel );
if ( style == CustomColors ) {
menu->insertSeparator();
panel = new KoColorPanel( menu, "custom panel" );
- connect( panel, SIGNAL( colorSelected( const QColor& ) ), receiver, slot );
+ connect( panel, TQT_SIGNAL( colorSelected( const TQColor& ) ), receiver, slot );
menu->insertItem( panel );
if ( !proxy ) {
- proxy = new KoColorPopupProxy( QColor(), panel, menu, "color proxy" );
- connect( proxy, SIGNAL( colorSelected( const QColor& ) ), receiver, slot );
+ proxy = new KoColorPopupProxy( TQColor(), panel, TQT_TQOBJECT(menu), "color proxy" );
+ connect( proxy, TQT_SIGNAL( colorSelected( const TQColor& ) ), receiver, slot );
}
else
proxy->setRecentColorPanel( panel );
menu->insertSeparator();
- menu->insertItem( i18n( "More Colors..." ), proxy, SLOT( slotMoreColors() ) );
+ menu->insertItem( i18n( "More Colors..." ), proxy, TQT_SLOT( slotMoreColors() ) );
}
return menu;
@@ -109,21 +109,21 @@ void KoColorPanel::clear()
if ( m_colorMap.isEmpty() )
return;
- QSize area( minimumSizeHint() );
+ TQSize area( tqminimumSizeHint() );
m_colorMap.clear();
init();
updateGeometry();
erase( 0, 0, area.width(), area.height() );
}
-void KoColorPanel::insertColor( const QColor& color )
+void KoColorPanel::insertColor( const TQColor& color )
{
Position pos = m_nextPosition;
if ( insertColor( color, true ) ) // we want checking for external users
finalizeInsertion( pos );
}
-void KoColorPanel::insertColor( const QColor& color, const QString& toolTip )
+void KoColorPanel::insertColor( const TQColor& color, const TQString& toolTip )
{
Position pos = m_nextPosition;
if ( insertColor( color, toolTip, true ) ) // we want checking for external users
@@ -136,190 +136,190 @@ void KoColorPanel::insertDefaultColors()
return;
m_defaultsAdded = true;
- int currentRow = m_nextPosition.y; // we have to repaint this row below
+ int currentRow = m_nextPosition.y; // we have to tqrepaint this row below
// Note: No checking for duplicates, so take care when you modify that list
- insertColor(QColor( 255 , 0 , 0 ), i18n( "color", "Red" ), false);
- insertColor(QColor( 255 , 165 , 0 ), i18n( "color", "Orange" ), false);
- insertColor(QColor( 255 , 0 , 255 ), i18n( "color", "Magenta" ), false);
- insertColor(QColor( 0 , 0 , 255 ), i18n( "color", "Blue" ), false);
- insertColor(QColor( 0 , 255 , 255 ), i18n( "color", "Cyan" ), false);
- insertColor(QColor( 0 , 255 , 0 ), i18n( "color", "Green" ), false);
- insertColor(QColor( 255 , 255 , 0 ), i18n( "color", "Yellow" ), false);
- insertColor(QColor( 165 , 42 , 42 ), i18n( "color", "Brown" ), false);
- insertColor(QColor( 139 , 0 , 0 ), i18n( "color", "DarkRed" ), false);
- insertColor(QColor( 255 , 140 , 0 ), i18n( "color", "DarkOrange" ), false);
- insertColor(QColor( 139 , 0 , 139 ), i18n( "color", "DarkMagenta" ), false);
- insertColor(QColor( 0 , 0 , 139 ), i18n( "color", "DarkBlue" ), false);
- insertColor(QColor( 0 , 139 , 139 ), i18n( "color", "DarkCyan" ), false);
- insertColor(QColor( 0 , 100 , 0 ), i18n( "color", "DarkGreen" ), false);
- insertColor(QColor( 130 , 127 , 0 ), i18n( "color", "DarkYellow" ), false);
- insertColor(QColor( 255 , 255 , 255 ), i18n( "color", "White" ), false);
+ insertColor(TQColor( 255 , 0 , 0 ), i18n( "color", "Red" ), false);
+ insertColor(TQColor( 255 , 165 , 0 ), i18n( "color", "Orange" ), false);
+ insertColor(TQColor( 255 , 0 , 255 ), i18n( "color", "Magenta" ), false);
+ insertColor(TQColor( 0 , 0 , 255 ), i18n( "color", "Blue" ), false);
+ insertColor(TQColor( 0 , 255 , 255 ), i18n( "color", "Cyan" ), false);
+ insertColor(TQColor( 0 , 255 , 0 ), i18n( "color", "Green" ), false);
+ insertColor(TQColor( 255 , 255 , 0 ), i18n( "color", "Yellow" ), false);
+ insertColor(TQColor( 165 , 42 , 42 ), i18n( "color", "Brown" ), false);
+ insertColor(TQColor( 139 , 0 , 0 ), i18n( "color", "DarkRed" ), false);
+ insertColor(TQColor( 255 , 140 , 0 ), i18n( "color", "DarkOrange" ), false);
+ insertColor(TQColor( 139 , 0 , 139 ), i18n( "color", "DarkMagenta" ), false);
+ insertColor(TQColor( 0 , 0 , 139 ), i18n( "color", "DarkBlue" ), false);
+ insertColor(TQColor( 0 , 139 , 139 ), i18n( "color", "DarkCyan" ), false);
+ insertColor(TQColor( 0 , 100 , 0 ), i18n( "color", "DarkGreen" ), false);
+ insertColor(TQColor( 130 , 127 , 0 ), i18n( "color", "DarkYellow" ), false);
+ insertColor(TQColor( 255 , 255 , 255 ), i18n( "color", "White" ), false);
// xgettext:no-c-format
- insertColor(QColor( 229 , 229 , 229 ), i18n( "color", "Gray 90%" ), false);
+ insertColor(TQColor( 229 , 229 , 229 ), i18n( "color", "Gray 90%" ), false);
// xgettext:no-c-format
- insertColor(QColor( 204 , 204 , 204 ), i18n( "color", "Gray 80%" ), false);
+ insertColor(TQColor( 204 , 204 , 204 ), i18n( "color", "Gray 80%" ), false);
// xgettext:no-c-format
- insertColor(QColor( 178 , 178 , 178 ), i18n( "color", "Gray 70%" ), false);
+ insertColor(TQColor( 178 , 178 , 178 ), i18n( "color", "Gray 70%" ), false);
// xgettext:no-c-format
- insertColor(QColor( 153 , 153 , 153 ), i18n( "color", "Gray 60%" ), false);
+ insertColor(TQColor( 153 , 153 , 153 ), i18n( "color", "Gray 60%" ), false);
// xgettext:no-c-format
- insertColor(QColor( 127 , 127 , 127 ), i18n( "color", "Gray 50%" ), false);
+ insertColor(TQColor( 127 , 127 , 127 ), i18n( "color", "Gray 50%" ), false);
// xgettext:no-c-format
- insertColor(QColor( 102 , 102 , 102 ), i18n( "color", "Gray 40%" ), false);
+ insertColor(TQColor( 102 , 102 , 102 ), i18n( "color", "Gray 40%" ), false);
// xgettext:no-c-format
- insertColor(QColor( 76 , 76 , 76 ), i18n( "color", "Gray 30%" ), false);
+ insertColor(TQColor( 76 , 76 , 76 ), i18n( "color", "Gray 30%" ), false);
// xgettext:no-c-format
- insertColor(QColor( 51 , 51 , 51 ), i18n( "color", "Gray 20%" ), false);
+ insertColor(TQColor( 51 , 51 , 51 ), i18n( "color", "Gray 20%" ), false);
// xgettext:no-c-format
- insertColor(QColor( 25 , 25 , 25 ), i18n( "color", "Gray 10%" ), false);
- insertColor(QColor( 0 , 0 , 0 ), i18n( "color", "Black" ), false);
- insertColor(QColor( 255 , 255 , 240 ), i18n( "color", "Ivory" ), false);
- insertColor(QColor( 255 , 250 , 250 ), i18n( "color", "Snow" ), false);
- insertColor(QColor( 245 , 255 , 250 ), i18n( "color", "MintCream" ), false);
- insertColor(QColor( 255 , 250 , 240 ), i18n( "color", "FloralWhite" ), false);
- insertColor(QColor( 255 , 255 , 224 ), i18n( "color", "LightYellow" ), false);
- insertColor(QColor( 240 , 255 , 255 ), i18n( "color", "Azure" ), false);
- insertColor(QColor( 248 , 248 , 255 ), i18n( "color", "GhostWhite" ), false);
- insertColor(QColor( 240 , 255 , 240 ), i18n( "color", "Honeydew" ), false);
- insertColor(QColor( 255 , 245 , 238 ), i18n( "color", "Seashell" ), false);
- insertColor(QColor( 240 , 248 , 255 ), i18n( "color", "AliceBlue" ), false);
- insertColor(QColor( 255 , 248 , 220 ), i18n( "color", "Cornsilk" ), false);
- insertColor(QColor( 255 , 240 , 245 ), i18n( "color", "LavenderBlush" ), false);
- insertColor(QColor( 253 , 245 , 230 ), i18n( "color", "OldLace" ), false);
- insertColor(QColor( 245 , 245 , 245 ), i18n( "color", "WhiteSmoke" ), false);
- insertColor(QColor( 255 , 250 , 205 ), i18n( "color", "LemonChiffon" ), false);
- insertColor(QColor( 224 , 255 , 255 ), i18n( "color", "LightCyan" ), false);
- insertColor(QColor( 250 , 250 , 210 ), i18n( "color", "LightGoldenrodYellow" ), false);
- insertColor(QColor( 250 , 240 , 230 ), i18n( "color", "Linen" ), false);
- insertColor(QColor( 245 , 245 , 220 ), i18n( "color", "Beige" ), false);
- insertColor(QColor( 255 , 239 , 213 ), i18n( "color", "PapayaWhip" ), false);
- insertColor(QColor( 255 , 235 , 205 ), i18n( "color", "BlanchedAlmond" ), false);
- insertColor(QColor( 250 , 235 , 215 ), i18n( "color", "AntiqueWhite" ), false);
- insertColor(QColor( 255 , 228 , 225 ), i18n( "color", "MistyRose" ), false);
- insertColor(QColor( 230 , 230 , 250 ), i18n( "color", "Lavender" ), false);
- insertColor(QColor( 255 , 228 , 196 ), i18n( "color", "Bisque" ), false);
- insertColor(QColor( 255 , 228 , 181 ), i18n( "color", "Moccasin" ), false);
- insertColor(QColor( 255 , 222 , 173 ), i18n( "color", "NavajoWhite" ), false);
- insertColor(QColor( 255 , 218 , 185 ), i18n( "color", "PeachPuff" ), false);
- insertColor(QColor( 238 , 232 , 170 ), i18n( "color", "PaleGoldenrod" ), false);
- insertColor(QColor( 245 , 222 , 179 ), i18n( "color", "Wheat" ), false);
- insertColor(QColor( 220 , 220 , 220 ), i18n( "color", "Gainsboro" ), false);
- insertColor(QColor( 240 , 230 , 140 ), i18n( "color", "Khaki" ), false);
- insertColor(QColor( 175 , 238 , 238 ), i18n( "color", "PaleTurquoise" ), false);
- insertColor(QColor( 255 , 192 , 203 ), i18n( "color", "Pink" ), false);
- insertColor(QColor( 238 , 221 , 130 ), i18n( "color", "LightGoldenrod" ), false);
- insertColor(QColor( 211 , 211 , 211 ), i18n( "color", "LightGray" ), false);
- insertColor(QColor( 255 , 182 , 193 ), i18n( "color", "LightPink" ), false);
- insertColor(QColor( 176 , 224 , 230 ), i18n( "color", "PowderBlue" ), false);
- insertColor(QColor( 127 , 255 , 212 ), i18n( "color", "Aquamarine" ), false);
- insertColor(QColor( 216 , 191 , 216 ), i18n( "color", "Thistle" ), false);
- insertColor(QColor( 173 , 216 , 230 ), i18n( "color", "LightBlue" ), false);
- insertColor(QColor( 152 , 251 , 152 ), i18n( "color", "PaleGreen" ), false);
- insertColor(QColor( 255 , 215 , 0 ), i18n( "color", "Gold" ), false);
- insertColor(QColor( 173 , 255 , 47 ), i18n( "color", "GreenYellow" ), false);
- insertColor(QColor( 176 , 196 , 222 ), i18n( "color", "LightSteelBlue" ), false);
- insertColor(QColor( 144 , 238 , 144 ), i18n( "color", "LightGreen" ), false);
- insertColor(QColor( 221 , 160 , 221 ), i18n( "color", "Plum" ), false);
- insertColor(QColor( 190 , 190 , 190 ), i18n( "color", "Gray" ), false);
- insertColor(QColor( 222 , 184 , 135 ), i18n( "color", "BurlyWood" ), false);
- insertColor(QColor( 135 , 206 , 250 ), i18n( "color", "LightSkyBlue" ), false);
- insertColor(QColor( 255 , 160 , 122 ), i18n( "color", "LightSalmon" ), false);
- insertColor(QColor( 135 , 206 , 235 ), i18n( "color", "SkyBlue" ), false);
- insertColor(QColor( 210 , 180 , 140 ), i18n( "color", "Tan" ), false);
- insertColor(QColor( 238 , 130 , 238 ), i18n( "color", "Violet" ), false);
- insertColor(QColor( 244 , 164 , 96 ), i18n( "color", "SandyBrown" ), false);
- insertColor(QColor( 233 , 150 , 122 ), i18n( "color", "DarkSalmon" ), false);
- insertColor(QColor( 189 , 183 , 107 ), i18n( "color", "DarkKhaki" ), false);
- insertColor(QColor( 127 , 255 , 0 ), i18n( "color", "Chartreuse" ), false);
- insertColor(QColor( 169 , 169 , 169 ), i18n( "color", "DarkGray" ), false);
- insertColor(QColor( 124 , 252 , 0 ), i18n( "color", "LawnGreen" ), false);
- insertColor(QColor( 255 , 105 , 180 ), i18n( "color", "HotPink" ), false);
- insertColor(QColor( 250 , 128 , 114 ), i18n( "color", "Salmon" ), false);
- insertColor(QColor( 240 , 128 , 128 ), i18n( "color", "LightCoral" ), false);
- insertColor(QColor( 64 , 224 , 208 ), i18n( "color", "Turquoise" ), false);
- insertColor(QColor( 143 , 188 , 143 ), i18n( "color", "DarkSeaGreen" ), false);
- insertColor(QColor( 218 , 112 , 214 ), i18n( "color", "Orchid" ), false);
- insertColor(QColor( 102 , 205 , 170 ), i18n( "color", "MediumAquamarine" ), false);
- insertColor(QColor( 255 , 127 , 80 ), i18n( "color", "Coral" ), false);
- insertColor(QColor( 154 , 205 , 50 ), i18n( "color", "YellowGreen" ), false);
- insertColor(QColor( 218 , 165 , 32 ), i18n( "color", "Goldenrod" ), false);
- insertColor(QColor( 72 , 209 , 204 ), i18n( "color", "MediumTurquoise" ), false);
- insertColor(QColor( 188 , 143 , 143 ), i18n( "color", "RosyBrown" ), false);
- insertColor(QColor( 219 , 112 , 147 ), i18n( "color", "PaleVioletRed" ), false);
- insertColor(QColor( 0 , 250 , 154 ), i18n( "color", "MediumSpringGreen" ), false);
- insertColor(QColor( 255 , 99 , 71 ), i18n( "color", "Tomato" ), false);
- insertColor(QColor( 0 , 255 , 127 ), i18n( "color", "SpringGreen" ), false);
- insertColor(QColor( 205 , 133 , 63 ), i18n( "color", "Peru" ), false);
- insertColor(QColor( 100 , 149 , 237 ), i18n( "color", "CornflowerBlue" ), false);
- insertColor(QColor( 132 , 112 , 255 ), i18n( "color", "LightSlateBlue" ), false);
- insertColor(QColor( 147 , 112 , 219 ), i18n( "color", "MediumPurple" ), false);
- insertColor(QColor( 186 , 85 , 211 ), i18n( "color", "MediumOrchid" ), false);
- insertColor(QColor( 95 , 158 , 160 ), i18n( "color", "CadetBlue" ), false);
- insertColor(QColor( 0 , 206 , 209 ), i18n( "color", "DarkTurquoise" ), false);
- insertColor(QColor( 0 , 191 , 255 ), i18n( "color", "DeepSkyBlue" ), false);
- insertColor(QColor( 119 , 136 , 153 ), i18n( "color", "LightSlateGray" ), false);
- insertColor(QColor( 184 , 134 , 11 ), i18n( "color", "DarkGoldenrod" ), false);
- insertColor(QColor( 123 , 104 , 238 ), i18n( "color", "MediumSlateBlue" ), false);
- insertColor(QColor( 205 , 92 , 92 ), i18n( "color", "IndianRed" ), false);
- insertColor(QColor( 210 , 105 , 30 ), i18n( "color", "Chocolate" ), false);
- insertColor(QColor( 60 , 179 , 113 ), i18n( "color", "MediumSeaGreen" ), false);
- insertColor(QColor( 50 , 205 , 50 ), i18n( "color", "LimeGreen" ), false);
- insertColor(QColor( 32 , 178 , 170 ), i18n( "color", "LightSeaGreen" ), false);
- insertColor(QColor( 112 , 128 , 144 ), i18n( "color", "SlateGray" ), false);
- insertColor(QColor( 30 , 144 , 255 ), i18n( "color", "DodgerBlue" ), false);
- insertColor(QColor( 255 , 69 , 0 ), i18n( "color", "OrangeRed" ), false);
- insertColor(QColor( 255 , 20 , 147 ), i18n( "color", "DeepPink" ), false);
- insertColor(QColor( 70 , 130 , 180 ), i18n( "color", "SteelBlue" ), false);
- insertColor(QColor( 106 , 90 , 205 ), i18n( "color", "SlateBlue" ), false);
- insertColor(QColor( 107 , 142 , 35 ), i18n( "color", "OliveDrab" ), false);
- insertColor(QColor( 65 , 105 , 225 ), i18n( "color", "RoyalBlue" ), false);
- insertColor(QColor( 208 , 32 , 144 ), i18n( "color", "VioletRed" ), false);
- insertColor(QColor( 153 , 50 , 204 ), i18n( "color", "DarkOrchid" ), false);
- insertColor(QColor( 160 , 32 , 240 ), i18n( "color", "Purple" ), false);
- insertColor(QColor( 105 , 105 , 105 ), i18n( "color", "DimGray" ), false);
- insertColor(QColor( 138 , 43 , 226 ), i18n( "color", "BlueViolet" ), false);
- insertColor(QColor( 160 , 82 , 45 ), i18n( "color", "Sienna" ), false);
- insertColor(QColor( 199 , 21 , 133 ), i18n( "color", "MediumVioletRed" ), false);
- insertColor(QColor( 176 , 48 , 96 ), i18n( "color", "Maroon" ), false);
- insertColor(QColor( 46 , 139 , 87 ), i18n( "color", "SeaGreen" ), false);
- insertColor(QColor( 85 , 107 , 47 ), i18n( "color", "DarkOliveGreen" ), false);
- insertColor(QColor( 34 , 139 , 34 ), i18n( "color", "ForestGreen" ), false);
- insertColor(QColor( 139 , 69 , 19 ), i18n( "color", "SaddleBrown" ), false);
- insertColor(QColor( 148 , 0 , 211 ), i18n( "color", "DarkViolet" ), false);
- insertColor(QColor( 178 , 34 , 34 ), i18n( "color", "FireBrick" ), false);
- insertColor(QColor( 72 , 61 , 139 ), i18n( "color", "DarkSlateBlue" ), false);
- insertColor(QColor( 47 , 79 , 79 ), i18n( "color", "DarkSlateGray" ), false);
- insertColor(QColor( 25 , 25 , 112 ), i18n( "color", "MidnightBlue" ), false);
- insertColor(QColor( 0 , 0 , 205 ), i18n( "color", "MediumBlue" ), false);
- insertColor(QColor( 0 , 0 , 128 ), i18n( "color", "Navy" ), false);
-
- finalizeInsertion( m_nextPosition ); // with a no-op paint() call as we repaint anyway
+ insertColor(TQColor( 25 , 25 , 25 ), i18n( "color", "Gray 10%" ), false);
+ insertColor(TQColor( 0 , 0 , 0 ), i18n( "color", "Black" ), false);
+ insertColor(TQColor( 255 , 255 , 240 ), i18n( "color", "Ivory" ), false);
+ insertColor(TQColor( 255 , 250 , 250 ), i18n( "color", "Snow" ), false);
+ insertColor(TQColor( 245 , 255 , 250 ), i18n( "color", "MintCream" ), false);
+ insertColor(TQColor( 255 , 250 , 240 ), i18n( "color", "FloralWhite" ), false);
+ insertColor(TQColor( 255 , 255 , 224 ), i18n( "color", "LightYellow" ), false);
+ insertColor(TQColor( 240 , 255 , 255 ), i18n( "color", "Azure" ), false);
+ insertColor(TQColor( 248 , 248 , 255 ), i18n( "color", "GhostWhite" ), false);
+ insertColor(TQColor( 240 , 255 , 240 ), i18n( "color", "Honeydew" ), false);
+ insertColor(TQColor( 255 , 245 , 238 ), i18n( "color", "Seashell" ), false);
+ insertColor(TQColor( 240 , 248 , 255 ), i18n( "color", "AliceBlue" ), false);
+ insertColor(TQColor( 255 , 248 , 220 ), i18n( "color", "Cornsilk" ), false);
+ insertColor(TQColor( 255 , 240 , 245 ), i18n( "color", "LavenderBlush" ), false);
+ insertColor(TQColor( 253 , 245 , 230 ), i18n( "color", "OldLace" ), false);
+ insertColor(TQColor( 245 , 245 , 245 ), i18n( "color", "WhiteSmoke" ), false);
+ insertColor(TQColor( 255 , 250 , 205 ), i18n( "color", "LemonChiffon" ), false);
+ insertColor(TQColor( 224 , 255 , 255 ), i18n( "color", "LightCyan" ), false);
+ insertColor(TQColor( 250 , 250 , 210 ), i18n( "color", "LightGoldenrodYellow" ), false);
+ insertColor(TQColor( 250 , 240 , 230 ), i18n( "color", "Linen" ), false);
+ insertColor(TQColor( 245 , 245 , 220 ), i18n( "color", "Beige" ), false);
+ insertColor(TQColor( 255 , 239 , 213 ), i18n( "color", "PapayaWhip" ), false);
+ insertColor(TQColor( 255 , 235 , 205 ), i18n( "color", "BlanchedAlmond" ), false);
+ insertColor(TQColor( 250 , 235 , 215 ), i18n( "color", "AntiqueWhite" ), false);
+ insertColor(TQColor( 255 , 228 , 225 ), i18n( "color", "MistyRose" ), false);
+ insertColor(TQColor( 230 , 230 , 250 ), i18n( "color", "Lavender" ), false);
+ insertColor(TQColor( 255 , 228 , 196 ), i18n( "color", "Bisque" ), false);
+ insertColor(TQColor( 255 , 228 , 181 ), i18n( "color", "Moccasin" ), false);
+ insertColor(TQColor( 255 , 222 , 173 ), i18n( "color", "NavajoWhite" ), false);
+ insertColor(TQColor( 255 , 218 , 185 ), i18n( "color", "PeachPuff" ), false);
+ insertColor(TQColor( 238 , 232 , 170 ), i18n( "color", "PaleGoldenrod" ), false);
+ insertColor(TQColor( 245 , 222 , 179 ), i18n( "color", "Wheat" ), false);
+ insertColor(TQColor( 220 , 220 , 220 ), i18n( "color", "Gainsboro" ), false);
+ insertColor(TQColor( 240 , 230 , 140 ), i18n( "color", "Khaki" ), false);
+ insertColor(TQColor( 175 , 238 , 238 ), i18n( "color", "PaleTurquoise" ), false);
+ insertColor(TQColor( 255 , 192 , 203 ), i18n( "color", "Pink" ), false);
+ insertColor(TQColor( 238 , 221 , 130 ), i18n( "color", "LightGoldenrod" ), false);
+ insertColor(TQColor( 211 , 211 , 211 ), i18n( "color", "LightGray" ), false);
+ insertColor(TQColor( 255 , 182 , 193 ), i18n( "color", "LightPink" ), false);
+ insertColor(TQColor( 176 , 224 , 230 ), i18n( "color", "PowderBlue" ), false);
+ insertColor(TQColor( 127 , 255 , 212 ), i18n( "color", "Aquamarine" ), false);
+ insertColor(TQColor( 216 , 191 , 216 ), i18n( "color", "Thistle" ), false);
+ insertColor(TQColor( 173 , 216 , 230 ), i18n( "color", "LightBlue" ), false);
+ insertColor(TQColor( 152 , 251 , 152 ), i18n( "color", "PaleGreen" ), false);
+ insertColor(TQColor( 255 , 215 , 0 ), i18n( "color", "Gold" ), false);
+ insertColor(TQColor( 173 , 255 , 47 ), i18n( "color", "GreenYellow" ), false);
+ insertColor(TQColor( 176 , 196 , 222 ), i18n( "color", "LightSteelBlue" ), false);
+ insertColor(TQColor( 144 , 238 , 144 ), i18n( "color", "LightGreen" ), false);
+ insertColor(TQColor( 221 , 160 , 221 ), i18n( "color", "Plum" ), false);
+ insertColor(TQColor( 190 , 190 , 190 ), i18n( "color", "Gray" ), false);
+ insertColor(TQColor( 222 , 184 , 135 ), i18n( "color", "BurlyWood" ), false);
+ insertColor(TQColor( 135 , 206 , 250 ), i18n( "color", "LightSkyBlue" ), false);
+ insertColor(TQColor( 255 , 160 , 122 ), i18n( "color", "LightSalmon" ), false);
+ insertColor(TQColor( 135 , 206 , 235 ), i18n( "color", "SkyBlue" ), false);
+ insertColor(TQColor( 210 , 180 , 140 ), i18n( "color", "Tan" ), false);
+ insertColor(TQColor( 238 , 130 , 238 ), i18n( "color", "Violet" ), false);
+ insertColor(TQColor( 244 , 164 , 96 ), i18n( "color", "SandyBrown" ), false);
+ insertColor(TQColor( 233 , 150 , 122 ), i18n( "color", "DarkSalmon" ), false);
+ insertColor(TQColor( 189 , 183 , 107 ), i18n( "color", "DarkKhaki" ), false);
+ insertColor(TQColor( 127 , 255 , 0 ), i18n( "color", "Chartreuse" ), false);
+ insertColor(TQColor( 169 , 169 , 169 ), i18n( "color", "DarkGray" ), false);
+ insertColor(TQColor( 124 , 252 , 0 ), i18n( "color", "LawnGreen" ), false);
+ insertColor(TQColor( 255 , 105 , 180 ), i18n( "color", "HotPink" ), false);
+ insertColor(TQColor( 250 , 128 , 114 ), i18n( "color", "Salmon" ), false);
+ insertColor(TQColor( 240 , 128 , 128 ), i18n( "color", "LightCoral" ), false);
+ insertColor(TQColor( 64 , 224 , 208 ), i18n( "color", "Turquoise" ), false);
+ insertColor(TQColor( 143 , 188 , 143 ), i18n( "color", "DarkSeaGreen" ), false);
+ insertColor(TQColor( 218 , 112 , 214 ), i18n( "color", "Orchid" ), false);
+ insertColor(TQColor( 102 , 205 , 170 ), i18n( "color", "MediumAquamarine" ), false);
+ insertColor(TQColor( 255 , 127 , 80 ), i18n( "color", "Coral" ), false);
+ insertColor(TQColor( 154 , 205 , 50 ), i18n( "color", "YellowGreen" ), false);
+ insertColor(TQColor( 218 , 165 , 32 ), i18n( "color", "Goldenrod" ), false);
+ insertColor(TQColor( 72 , 209 , 204 ), i18n( "color", "MediumTurquoise" ), false);
+ insertColor(TQColor( 188 , 143 , 143 ), i18n( "color", "RosyBrown" ), false);
+ insertColor(TQColor( 219 , 112 , 147 ), i18n( "color", "PaleVioletRed" ), false);
+ insertColor(TQColor( 0 , 250 , 154 ), i18n( "color", "MediumSpringGreen" ), false);
+ insertColor(TQColor( 255 , 99 , 71 ), i18n( "color", "Tomato" ), false);
+ insertColor(TQColor( 0 , 255 , 127 ), i18n( "color", "SpringGreen" ), false);
+ insertColor(TQColor( 205 , 133 , 63 ), i18n( "color", "Peru" ), false);
+ insertColor(TQColor( 100 , 149 , 237 ), i18n( "color", "CornflowerBlue" ), false);
+ insertColor(TQColor( 132 , 112 , 255 ), i18n( "color", "LightSlateBlue" ), false);
+ insertColor(TQColor( 147 , 112 , 219 ), i18n( "color", "MediumPurple" ), false);
+ insertColor(TQColor( 186 , 85 , 211 ), i18n( "color", "MediumOrchid" ), false);
+ insertColor(TQColor( 95 , 158 , 160 ), i18n( "color", "CadetBlue" ), false);
+ insertColor(TQColor( 0 , 206 , 209 ), i18n( "color", "DarkTurquoise" ), false);
+ insertColor(TQColor( 0 , 191 , 255 ), i18n( "color", "DeepSkyBlue" ), false);
+ insertColor(TQColor( 119 , 136 , 153 ), i18n( "color", "LightSlateGray" ), false);
+ insertColor(TQColor( 184 , 134 , 11 ), i18n( "color", "DarkGoldenrod" ), false);
+ insertColor(TQColor( 123 , 104 , 238 ), i18n( "color", "MediumSlateBlue" ), false);
+ insertColor(TQColor( 205 , 92 , 92 ), i18n( "color", "IndianRed" ), false);
+ insertColor(TQColor( 210 , 105 , 30 ), i18n( "color", "Chocolate" ), false);
+ insertColor(TQColor( 60 , 179 , 113 ), i18n( "color", "MediumSeaGreen" ), false);
+ insertColor(TQColor( 50 , 205 , 50 ), i18n( "color", "LimeGreen" ), false);
+ insertColor(TQColor( 32 , 178 , 170 ), i18n( "color", "LightSeaGreen" ), false);
+ insertColor(TQColor( 112 , 128 , 144 ), i18n( "color", "SlateGray" ), false);
+ insertColor(TQColor( 30 , 144 , 255 ), i18n( "color", "DodgerBlue" ), false);
+ insertColor(TQColor( 255 , 69 , 0 ), i18n( "color", "OrangeRed" ), false);
+ insertColor(TQColor( 255 , 20 , 147 ), i18n( "color", "DeepPink" ), false);
+ insertColor(TQColor( 70 , 130 , 180 ), i18n( "color", "SteelBlue" ), false);
+ insertColor(TQColor( 106 , 90 , 205 ), i18n( "color", "SlateBlue" ), false);
+ insertColor(TQColor( 107 , 142 , 35 ), i18n( "color", "OliveDrab" ), false);
+ insertColor(TQColor( 65 , 105 , 225 ), i18n( "color", "RoyalBlue" ), false);
+ insertColor(TQColor( 208 , 32 , 144 ), i18n( "color", "VioletRed" ), false);
+ insertColor(TQColor( 153 , 50 , 204 ), i18n( "color", "DarkOrchid" ), false);
+ insertColor(TQColor( 160 , 32 , 240 ), i18n( "color", "Purple" ), false);
+ insertColor(TQColor( 105 , 105 , 105 ), i18n( "color", "DimGray" ), false);
+ insertColor(TQColor( 138 , 43 , 226 ), i18n( "color", "BlueViolet" ), false);
+ insertColor(TQColor( 160 , 82 , 45 ), i18n( "color", "Sienna" ), false);
+ insertColor(TQColor( 199 , 21 , 133 ), i18n( "color", "MediumVioletRed" ), false);
+ insertColor(TQColor( 176 , 48 , 96 ), i18n( "color", "Maroon" ), false);
+ insertColor(TQColor( 46 , 139 , 87 ), i18n( "color", "SeaGreen" ), false);
+ insertColor(TQColor( 85 , 107 , 47 ), i18n( "color", "DarkOliveGreen" ), false);
+ insertColor(TQColor( 34 , 139 , 34 ), i18n( "color", "ForestGreen" ), false);
+ insertColor(TQColor( 139 , 69 , 19 ), i18n( "color", "SaddleBrown" ), false);
+ insertColor(TQColor( 148 , 0 , 211 ), i18n( "color", "DarkViolet" ), false);
+ insertColor(TQColor( 178 , 34 , 34 ), i18n( "color", "FireBrick" ), false);
+ insertColor(TQColor( 72 , 61 , 139 ), i18n( "color", "DarkSlateBlue" ), false);
+ insertColor(TQColor( 47 , 79 , 79 ), i18n( "color", "DarkSlateGray" ), false);
+ insertColor(TQColor( 25 , 25 , 112 ), i18n( "color", "MidnightBlue" ), false);
+ insertColor(TQColor( 0 , 0 , 205 ), i18n( "color", "MediumBlue" ), false);
+ insertColor(TQColor( 0 , 0 , 128 ), i18n( "color", "Navy" ), false);
+
+ finalizeInsertion( m_nextPosition ); // with a no-op paint() call as we tqrepaint anyway
updateGeometry();
- // we have to repaint the "old" current row explicitly due
+ // we have to tqrepaint the "old" current row explicitly due
// to WStaticContents
update( 0, currentRow << 4, COLS << 4, 16 );
}
-void KoColorPanel::mousePressEvent( QMouseEvent* e )
+void KoColorPanel::mousePressEvent( TQMouseEvent* e )
{
if ( e->button() == Qt::LeftButton )
m_pressedPos = e->pos();
}
-void KoColorPanel::mouseReleaseEvent( QMouseEvent* )
+void KoColorPanel::mouseReleaseEvent( TQMouseEvent* )
{
- if ( isVisible() && parentWidget() && parentWidget()->inherits( "QPopupMenu" ) )
- parentWidget()->close();
+ if ( isVisible() && tqparentWidget() && tqparentWidget()->inherits( TQPOPUPMENU_OBJECT_NAME_STRING ) )
+ tqparentWidget()->close();
emit colorSelected( mapToColor( m_pressedPos ) );
}
-void KoColorPanel::mouseMoveEvent( QMouseEvent* e )
+void KoColorPanel::mouseMoveEvent( TQMouseEvent* e )
{
if ( e->state() & Qt::LeftButton ) {
- QPoint p = m_pressedPos - e->pos();
- if ( p.manhattanLength() > QApplication::startDragDistance() ) {
- QColor color( mapToColor( m_pressedPos ) );
+ TQPoint p = m_pressedPos - e->pos();
+ if ( p.manhattanLength() > TQApplication::startDragDistance() ) {
+ TQColor color( mapToColor( m_pressedPos ) );
if ( color.isValid() ) {
KColorDrag *drag = new KColorDrag( color, this, name() );
drag->dragCopy();
@@ -330,13 +330,13 @@ void KoColorPanel::mouseMoveEvent( QMouseEvent* e )
updateFocusPosition( mapToPosition( e->pos() ) );
}
-void KoColorPanel::paintEvent( QPaintEvent* e )
+void KoColorPanel::paintEvent( TQPaintEvent* e )
{
int lns = lines();
int startRow, endRow, startCol, endCol;
paintArea( e->rect(), startRow, endRow, startCol, endCol );
- QPainter p( this );
+ TQPainter p( this );
// First clear all the areas we won't paint on later (only if the widget isn't erased)
if ( !e->erased() ) {
@@ -368,8 +368,8 @@ void KoColorPanel::paintEvent( QPaintEvent* e )
// The "active" element (if there is one)
if ( hasFocus() && m_focusPosition.x != -1 && m_focusPosition.y != -1 &&
mapFromPosition( m_focusPosition ).intersects( e->rect() ) )
- style().drawPrimitive( QStyle::PE_Panel, &p, QRect( m_focusPosition.x << 4, m_focusPosition.y << 4, TILESIZE, TILESIZE ),
- colorGroup(), QStyle::Style_Sunken | QStyle::Style_Enabled );
+ tqstyle().tqdrawPrimitive( TQStyle::PE_Panel, &p, TQRect( m_focusPosition.x << 4, m_focusPosition.y << 4, TILESIZE, TILESIZE ),
+ tqcolorGroup(), TQStyle::Style_Sunken | TQStyle::Style_Enabled );
--lns; // Attention: We just avoid some lns - 1 statements
@@ -377,7 +377,7 @@ void KoColorPanel::paintEvent( QPaintEvent* e )
if ( !m_colorMap.isEmpty() ) {
int currentRow = startRow, currentCol = startCol;
while ( currentRow < endRow && currentCol < endCol ) {
- QMap<Position, QColor>::ConstIterator it = m_colorMap.find( Position( currentCol, currentRow ) );
+ TQMap<Position, TQColor>::ConstIterator it = m_colorMap.tqfind( Position( currentCol, currentRow ) );
if( it != m_colorMap.end() )
p.fillRect( ( currentCol << 4 ) + 2, ( currentRow << 4 ) + 2, 12, 12, it.data() );
@@ -397,58 +397,58 @@ void KoColorPanel::paintEvent( QPaintEvent* e )
}
}
-void KoColorPanel::keyPressEvent( QKeyEvent* e )
+void KoColorPanel::keyPressEvent( TQKeyEvent* e )
{
Position newPos( validPosition( m_focusPosition ) );
- if ( e->key() == Qt::Key_Up ) {
+ if ( e->key() == TQt::Key_Up ) {
if ( newPos.y == 0 )
e->ignore();
else
--newPos.y;
}
- else if ( e->key() == Qt::Key_Down ) {
+ else if ( e->key() == TQt::Key_Down ) {
if ( newPos < Position( m_colorMap.count() % COLS, lines() - 2 ) )
++newPos.y;
else
e->ignore();
}
- else if ( e->key() == Qt::Key_Left ) {
+ else if ( e->key() == TQt::Key_Left ) {
if ( newPos.x == 0 )
e->ignore();
else
--newPos.x;
}
- else if ( e->key() == Qt::Key_Right ) {
+ else if ( e->key() == TQt::Key_Right ) {
if ( newPos.x < COLS - 1 && newPos < Position( m_colorMap.count() % COLS - 1, lines() - 1 ) )
++newPos.x;
else
e->ignore();
}
- else if ( e->key() == Qt::Key_Return ) {
- if ( isVisible() && parentWidget() && parentWidget()->inherits( "QPopupMenu" ) )
- parentWidget()->close();
+ else if ( e->key() == TQt::Key_Return ) {
+ if ( isVisible() && tqparentWidget() && tqparentWidget()->inherits( TQPOPUPMENU_OBJECT_NAME_STRING ) )
+ tqparentWidget()->close();
emit colorSelected( mapToColor( m_focusPosition ) );
}
updateFocusPosition( newPos );
}
-void KoColorPanel::focusInEvent( QFocusEvent* e )
+void KoColorPanel::focusInEvent( TQFocusEvent* e )
{
if ( !m_colorMap.isEmpty() && m_focusPosition.x == -1 && m_focusPosition.y == -1 ) {
m_focusPosition.x = 0;
m_focusPosition.y = 0;
}
- QWidget::focusInEvent( e );
+ TQWidget::focusInEvent( e );
}
-void KoColorPanel::dragEnterEvent( QDragEnterEvent* e )
+void KoColorPanel::dragEnterEvent( TQDragEnterEvent* e )
{
e->accept( KColorDrag::canDecode( e ) );
}
-void KoColorPanel::dropEvent( QDropEvent* e )
+void KoColorPanel::dropEvent( TQDropEvent* e )
{
- QColor color;
+ TQColor color;
if ( KColorDrag::decode( e, color ) )
insertColor( color );
}
@@ -458,13 +458,13 @@ void KoColorPanel::finalizeInsertion( const Position& pos )
paint( pos );
if ( !isFocusEnabled() )
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQ_StrongFocus );
// Did we start a new row?
if ( m_nextPosition.x == 1 )
updateGeometry();
}
-bool KoColorPanel::insertColor( const QColor& color, bool checking )
+bool KoColorPanel::insertColor( const TQColor& color, bool checking )
{
if ( checking && isAvailable( color ) )
return false;
@@ -479,52 +479,52 @@ bool KoColorPanel::insertColor( const QColor& color, bool checking )
return true;
}
-bool KoColorPanel::insertColor( const QColor& color, const QString& toolTip, bool checking )
+bool KoColorPanel::insertColor( const TQColor& color, const TQString& toolTip, bool checking )
{
if ( checking && isAvailable( color ) )
return false;
// Remember the "old" m_nextPosition -- this is the place where the newly
// inserted color will be located
- QRect rect( mapFromPosition( m_nextPosition ) );
+ TQRect rect( mapFromPosition( m_nextPosition ) );
insertColor( color, false ); // check only once ;)
- QToolTip::add( this, rect, toolTip );
+ TQToolTip::add( this, rect, toolTip );
return true;
}
-bool KoColorPanel::isAvailable( const QColor& color )
+bool KoColorPanel::isAvailable( const TQColor& color )
{
// O(n) checking on insert, but this is better than O(n) checking
// on every mouse move...
- QMap<Position, QColor>::ConstIterator it = m_colorMap.begin();
- QMap<Position, QColor>::ConstIterator end = m_colorMap.end();
+ TQMap<Position, TQColor>::ConstIterator it = m_colorMap.begin();
+ TQMap<Position, TQColor>::ConstIterator end = m_colorMap.end();
for ( ; it != end; ++it )
if ( it.data() == color )
return true;
return false;
}
-KoColorPanel::Position KoColorPanel::mapToPosition( const QPoint& point ) const
+KoColorPanel::Position KoColorPanel::mapToPosition( const TQPoint& point ) const
{
return Position( point.x() >> 4, point.y() >> 4 );
}
-QColor KoColorPanel::mapToColor( const QPoint& point ) const
+TQColor KoColorPanel::mapToColor( const TQPoint& point ) const
{
return mapToColor( mapToPosition( point ) );
}
-QColor KoColorPanel::mapToColor( const KoColorPanel::Position& position ) const
+TQColor KoColorPanel::mapToColor( const KoColorPanel::Position& position ) const
{
- QMap<Position, QColor>::ConstIterator it = m_colorMap.find( position );
+ TQMap<Position, TQColor>::ConstIterator it = m_colorMap.tqfind( position );
if ( it != m_colorMap.end() )
return it.data();
- return QColor();
+ return TQColor();
}
-QRect KoColorPanel::mapFromPosition( const KoColorPanel::Position& position ) const
+TQRect KoColorPanel::mapFromPosition( const KoColorPanel::Position& position ) const
{
- return QRect( position.x << 4, position.y << 4, TILESIZE, TILESIZE );
+ return TQRect( position.x << 4, position.y << 4, TILESIZE, TILESIZE );
}
KoColorPanel::Position KoColorPanel::validPosition( const Position& position )
@@ -558,7 +558,7 @@ int KoColorPanel::lines() const
return ( m_colorMap.count() - 1 ) / COLS + 1;
}
-void KoColorPanel::paintArea( const QRect& rect, int& startRow, int& endRow, int& startCol, int& endCol ) const
+void KoColorPanel::paintArea( const TQRect& rect, int& startRow, int& endRow, int& startCol, int& endCol ) const
{
startRow = rect.top() >> 4;
endRow = ( rect.bottom() >> 4 ) + 1;
@@ -568,7 +568,7 @@ void KoColorPanel::paintArea( const QRect& rect, int& startRow, int& endRow, int
void KoColorPanel::updateFocusPosition( const Position& newPosition )
{
- QPainter p( this );
+ TQPainter p( this );
// restore the old tile where we had the focus before
if ( m_focusPosition.x != -1 && m_focusPosition.y != -1 )
@@ -576,11 +576,11 @@ void KoColorPanel::updateFocusPosition( const Position& newPosition )
m_focusPosition = newPosition;
- QMap<Position, QColor>::ConstIterator it = m_colorMap.find( m_focusPosition );
+ TQMap<Position, TQColor>::ConstIterator it = m_colorMap.tqfind( m_focusPosition );
if ( it != m_colorMap.end() ) {
// draw at the new focus position
- style().drawPrimitive( QStyle::PE_Panel, &p, QRect( m_focusPosition.x << 4, m_focusPosition.y << 4, TILESIZE, TILESIZE ),
- colorGroup(), QStyle::Style_Sunken | QStyle::Style_Enabled );
+ tqstyle().tqdrawPrimitive( TQStyle::PE_Panel, &p, TQRect( m_focusPosition.x << 4, m_focusPosition.y << 4, TILESIZE, TILESIZE ),
+ tqcolorGroup(), TQStyle::Style_Sunken | TQStyle::Style_Enabled );
p.fillRect( ( m_focusPosition.x << 4 ) + 2, ( m_focusPosition.y << 4 ) + 2, 12, 12, it.data() );
}
@@ -588,18 +588,18 @@ void KoColorPanel::updateFocusPosition( const Position& newPosition )
void KoColorPanel::paint( const Position& position )
{
- QMap<Position, QColor>::ConstIterator it = m_colorMap.find( position );
+ TQMap<Position, TQColor>::ConstIterator it = m_colorMap.tqfind( position );
if ( it == m_colorMap.end() )
return;
erase( mapFromPosition( position ) );
- QPainter p( this );
+ TQPainter p( this );
p.fillRect( ( position.x << 4 ) + 2, ( position.y << 4 ) + 2, 12, 12, it.data() );
}
void KoColorPanel::init()
{
- setFocusPolicy( QWidget::NoFocus ); // it's empty
+ setFocusPolicy( TQ_NoFocus ); // it's empty
m_nextPosition.x = 0;
m_nextPosition.y = 0;
m_focusPosition.x = -1;
@@ -613,8 +613,8 @@ bool operator<( const KoColorPanel::Position& lhs, const KoColorPanel::Position&
}
-KoColorPopupProxy::KoColorPopupProxy( const QColor& defaultColor, KoColorPanel* recentColors, QObject* parent, const char* name ) :
- QObject( parent, name ), m_defaultColor( defaultColor ), m_recentColors( recentColors )
+KoColorPopupProxy::KoColorPopupProxy( const TQColor& defaultColor, KoColorPanel* recentColors, TQObject* tqparent, const char* name ) :
+ TQObject( tqparent, name ), m_defaultColor( defaultColor ), m_recentColors( recentColors )
{
}
@@ -633,28 +633,28 @@ void KoColorPopupProxy::slotMoreColors()
if ( !m_recentColors )
return;
- QColor newColor;
- QWidget* p = 0;
- if ( parent() && parent()->isWidgetType() )
- p = static_cast<QWidget*>( parent() );
+ TQColor newColor;
+ TQWidget* p = 0;
+ if ( tqparent() && tqparent()->isWidgetType() )
+ p = TQT_TQWIDGET( tqparent() );
- if ( KColorDialog::getColor( newColor, p ) == QDialog::Accepted ) {
+ if ( KColorDialog::getColor( newColor, p ) == TQDialog::Accepted ) {
m_recentColors->insertColor( newColor );
emit colorSelected( newColor );
}
}
-KoToolButton::KoToolButton( const QString& icon, int id, QWidget* parent,
- const char* name, const QString& txt, KInstance* _instance ) :
- KToolBarButton( icon, id, parent, name, txt, _instance ), m_arrowPressed( false )
+KoToolButton::KoToolButton( const TQString& icon, int id, TQWidget* tqparent,
+ const char* name, const TQString& txt, KInstance* _instance ) :
+ KToolBarButton( icon, id, tqparent, name, txt, _instance ), m_arrowPressed( false )
{
init();
}
-KoToolButton::KoToolButton( const QPixmap& pixmap, int id, QWidget* parent,
- const char* name, const QString& txt ) :
- KToolBarButton( pixmap, id, parent, name, txt ), m_arrowPressed( false )
+KoToolButton::KoToolButton( const TQPixmap& pixmap, int id, TQWidget* tqparent,
+ const char* name, const TQString& txt ) :
+ KToolBarButton( pixmap, id, tqparent, name, txt ), m_arrowPressed( false )
{
init();
}
@@ -663,79 +663,79 @@ KoToolButton::~KoToolButton()
{
}
-QSize KoToolButton::sizeHint() const
+TQSize KoToolButton::tqsizeHint() const
{
- return minimumSizeHint();
+ return tqminimumSizeHint();
}
-QSize KoToolButton::minimumSizeHint() const
+TQSize KoToolButton::tqminimumSizeHint() const
{
- QSize size = KToolBarButton::minimumSizeHint();
+ TQSize size = KToolBarButton::tqminimumSizeHint();
size.setWidth( size.width() + ARROW_WIDTH );
return size;
}
-QSize KoToolButton::minimumSize() const
+TQSize KoToolButton::tqminimumSize() const
{
- return minimumSizeHint();
+ return tqminimumSizeHint();
}
-void KoToolButton::colorSelected( const QColor& color )
+void KoToolButton::colorSelected( const TQColor& color )
{
- kdDebug() << "selected::: " << color.name() << endl;
+ kdDebug() << "selected::: " << TQString(color.name()) << endl;
}
-void KoToolButton::drawButton(QPainter *_painter)
+void KoToolButton::drawButton(TQPainter *_painter)
{
- QStyle::SFlags flags = QStyle::Style_Default;
- QStyle::SCFlags active = QStyle::SC_None;
- QStyle::SCFlags arrowActive = QStyle::SC_None;
- QStyleOption opt;
- QColorGroup cg( colorGroup() );
+ TQStyle::SFlags flags = TQStyle::Style_Default;
+ TQStyle::SCFlags active = TQStyle::SC_None;
+ TQStyle::SCFlags arrowActive = TQStyle::SC_None;
+ TQStyleOption opt;
+ TQColorGroup cg( tqcolorGroup() );
if ( isEnabled() ) {
- flags |= QStyle::Style_Enabled;
+ flags |= TQStyle::Style_Enabled;
if ( KToolBarButton::isRaised() || m_arrowPressed )
- flags |= QStyle::Style_Raised;
+ flags |= TQStyle::Style_Raised;
}
if ( isOn() )
- flags |= QStyle::Style_On;
+ flags |= TQStyle::Style_On;
- QStyle::SFlags arrowFlags = flags;
+ TQStyle::SFlags arrowFlags = flags;
if ( isDown() && !m_arrowPressed ) {
- flags |= QStyle::Style_Down;
- active |= QStyle::SC_ToolButton;
+ flags |= TQStyle::Style_Down;
+ active |= TQStyle::SC_ToolButton;
}
if ( m_arrowPressed )
- arrowActive |= QStyle::SC_ToolButton;
+ arrowActive |= TQStyle::SC_ToolButton;
// Draw styled toolbuttons
_painter->setClipRect( 0, 0, width() - ARROW_WIDTH, height() );
- style().drawComplexControl( QStyle::CC_ToolButton, _painter, this, QRect( 0, 0, width() - ARROW_WIDTH, height() ), cg,
- flags, QStyle::SC_ToolButton, active, opt );
+ tqstyle().tqdrawComplexControl( TQStyle::CC_ToolButton, _painter, this, TQRect( 0, 0, width() - ARROW_WIDTH, height() ), cg,
+ flags, TQStyle::SC_ToolButton, active, opt );
_painter->setClipRect( width() - ARROW_WIDTH, 0, ARROW_WIDTH, height() );
- style().drawComplexControl( QStyle::CC_ToolButton, _painter, this, QRect( width(), 0, ARROW_WIDTH, height() ), cg,
- arrowFlags, QStyle::SC_ToolButton, arrowActive, opt );
+ tqstyle().tqdrawComplexControl( TQStyle::CC_ToolButton, _painter, this, TQRect( width(), 0, ARROW_WIDTH, height() ), cg,
+ arrowFlags, TQStyle::SC_ToolButton, arrowActive, opt );
_painter->setClipping( false );
// ...and the arrow indicating the popup
- style().drawPrimitive( QStyle::PE_ArrowDown, _painter, QRect( width() - ARROW_WIDTH - 1, 0, ARROW_WIDTH, height() ),
+ tqstyle().tqdrawPrimitive( TQStyle::PE_ArrowDown, _painter, TQRect( width() - ARROW_WIDTH - 1, 0, ARROW_WIDTH, height() ),
cg, flags, opt );
if ( KToolBarButton::isRaised() || m_arrowPressed )
- qDrawShadeLine( _painter, width() - ARROW_WIDTH - 1, 0, width() - ARROW_WIDTH - 1, height() - 1, colorGroup(), true );
+ qDrawShadeLine( _painter, width() - ARROW_WIDTH - 1, 0, width() - ARROW_WIDTH - 1, height() - 1, tqcolorGroup(), true );
int dx, dy;
- QFont tmp_font( KGlobalSettings::toolBarFont() );
- QFontMetrics fm( tmp_font );
- QRect textRect;
+ TQFont tmp_font( KGlobalSettings::toolBarFont() );
+ TQFontMetrics fm( tmp_font );
+ TQRect textRect;
int textFlags = 0;
if ( static_cast<KToolBar::IconText>( iconTextMode() ) == KToolBar::IconOnly ) { // icon only
- QPixmap pixmap = iconSet().pixmap( QIconSet::Automatic,
- isEnabled() ? ( KToolBarButton::isActive() ? QIconSet::Active : QIconSet::Normal ) :
- QIconSet::Disabled, isOn() ? QIconSet::On : QIconSet::Off );
+ TQPixmap pixmap = iconSet().pixmap( TQIconSet::Automatic,
+ isEnabled() ? ( KToolBarButton::isActive() ? TQIconSet::Active : TQIconSet::Normal ) :
+ TQIconSet::Disabled, isOn() ? TQIconSet::On : TQIconSet::Off );
if ( !pixmap.isNull() ) {
dx = ( width() - ARROW_WIDTH - pixmap.width() ) / 2;
dy = ( height() - pixmap.height() ) / 2;
@@ -744,9 +744,9 @@ void KoToolButton::drawButton(QPainter *_painter)
}
}
else if ( static_cast<KToolBar::IconText>( iconTextMode() ) == KToolBar::IconTextRight ) { // icon and text (if any)
- QPixmap pixmap = iconSet().pixmap( QIconSet::Automatic,
- isEnabled() ? ( KToolBarButton::isActive() ? QIconSet::Active : QIconSet::Normal ) :
- QIconSet::Disabled, isOn() ? QIconSet::On : QIconSet::Off );
+ TQPixmap pixmap = iconSet().pixmap( TQIconSet::Automatic,
+ isEnabled() ? ( KToolBarButton::isActive() ? TQIconSet::Active : TQIconSet::Normal ) :
+ TQIconSet::Disabled, isOn() ? TQIconSet::On : TQIconSet::Off );
if( !pixmap.isNull()) {
dx = 4;
dy = ( height() - pixmap.height() ) / 2;
@@ -762,7 +762,7 @@ void KoToolButton::drawButton(QPainter *_painter)
dx = 4;
dy = 0;
buttonShift( dx, dy );
- textRect = QRect( dx, dy, width() - dx, height() );
+ textRect = TQRect( dx, dy, width() - dx, height() );
}
}
else if ( static_cast<KToolBar::IconText>( iconTextMode() ) == KToolBar::TextOnly ) {
@@ -771,13 +771,13 @@ void KoToolButton::drawButton(QPainter *_painter)
dx = ( width() - ARROW_WIDTH - fm.width( textLabel() ) ) / 2;
dy = ( height() - fm.lineSpacing() ) / 2;
buttonShift( dx, dy );
- textRect = QRect( dx, dy, fm.width(textLabel()), fm.lineSpacing() );
+ textRect = TQRect( dx, dy, fm.width(textLabel()), fm.lineSpacing() );
}
}
else if ( static_cast<KToolBar::IconText>( iconTextMode() ) == KToolBar::IconTextBottom ) {
- QPixmap pixmap = iconSet().pixmap( QIconSet::Automatic,
- isEnabled() ? ( KToolBarButton::isActive() ? QIconSet::Active : QIconSet::Normal ) :
- QIconSet::Disabled, isOn() ? QIconSet::On : QIconSet::Off );
+ TQPixmap pixmap = iconSet().pixmap( TQIconSet::Automatic,
+ isEnabled() ? ( KToolBarButton::isActive() ? TQIconSet::Active : TQIconSet::Normal ) :
+ TQIconSet::Disabled, isOn() ? TQIconSet::On : TQIconSet::Off );
if( !pixmap.isNull()) {
dx = ( width() - ARROW_WIDTH - pixmap.width() ) / 2;
dy = ( height() - fm.lineSpacing() - pixmap.height() ) / 2;
@@ -790,7 +790,7 @@ void KoToolButton::drawButton(QPainter *_painter)
dx = ( width() - ARROW_WIDTH - fm.width( textLabel() ) ) / 2;
dy = height() - fm.lineSpacing() - 4;
buttonShift( dx, dy );
- textRect = QRect( dx, dy, fm.width( textLabel() ), fm.lineSpacing() );
+ textRect = TQRect( dx, dy, fm.width( textLabel() ), fm.lineSpacing() );
}
}
@@ -798,20 +798,20 @@ void KoToolButton::drawButton(QPainter *_painter)
if (!textLabel().isNull() && !textRect.isNull()) {
_painter->setFont( KGlobalSettings::toolBarFont() );
if ( !isEnabled() )
- _painter->setPen( palette().disabled().dark() );
+ _painter->setPen( tqpalette().disabled().dark() );
else if( KToolBarButton::isRaised() )
_painter->setPen( KGlobalSettings::toolBarHighlightColor() );
else
- _painter->setPen( colorGroup().buttonText() );
+ _painter->setPen( tqcolorGroup().buttonText() );
_painter->drawText( textRect, textFlags, textLabel() );
}
}
-bool KoToolButton::eventFilter( QObject* o, QEvent* e )
+bool KoToolButton::eventFilter( TQObject* o, TQEvent* e )
{
- if ( o == m_popup ) {
- if ( e->type() == QEvent::MouseButtonPress )
- if ( hitArrow( mapFromGlobal( static_cast<QMouseEvent*>( e )->globalPos() ) ) ) {
+ if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_popup) ) {
+ if ( e->type() == TQEvent::MouseButtonPress )
+ if ( hitArrow( mapFromGlobal( TQT_TQMOUSEEVENT( e )->globalPos() ) ) ) {
kdDebug() << "KoToolButton::eventFilter-------------->" << endl;
m_popup->close();
m_arrowPressed = false;
@@ -820,39 +820,39 @@ bool KoToolButton::eventFilter( QObject* o, QEvent* e )
return false;
}
- if ( e->type() == QEvent::MouseButtonPress ) {
- m_arrowPressed = hitArrow( static_cast<QMouseEvent*>( e )->pos() );
+ if ( e->type() == TQEvent::MouseButtonPress ) {
+ m_arrowPressed = hitArrow( TQT_TQMOUSEEVENT( e )->pos() );
if ( m_arrowPressed )
- m_popup->popup( mapToGlobal( QPoint( 0, height() ) ) );
+ m_popup->popup( mapToGlobal( TQPoint( 0, height() ) ) );
}
- else if ( e->type() == QEvent::MouseButtonRelease )
+ else if ( e->type() == TQEvent::MouseButtonRelease )
m_arrowPressed = false;
return KToolBarButton::eventFilter( o, e );
}
void KoToolButton::init()
{
- m_popup = KoColorPanel::createColorPopup( KoColorPanel::CustomColors, Qt::yellow, this,
- SLOT( colorSelected( const QColor& ) ),
+ m_popup = KoColorPanel::createColorPopup( KoColorPanel::CustomColors, TQt::yellow, TQT_TQOBJECT(this),
+ TQT_SLOT( colorSelected( const TQColor& ) ),
this, "no-name" );
// We are interested in the mouse clicks on the arrow button
m_popup->installEventFilter( this );
- ARROW_WIDTH = style().pixelMetric(QStyle::PM_MenuButtonIndicator) + 4;
+ ARROW_WIDTH = tqstyle().tqpixelMetric(TQStyle::PM_MenuButtonIndicator) + 4;
kdDebug() << "##################### Arrow: " << ARROW_WIDTH << endl;
}
void KoToolButton::buttonShift( int& dx, int& dy )
{
if ( isDown() && !m_arrowPressed ) {
- dx += style().pixelMetric( QStyle::PM_ButtonShiftHorizontal );
- dy += style().pixelMetric( QStyle::PM_ButtonShiftVertical );
+ dx += tqstyle().tqpixelMetric( TQStyle::PM_ButtonShiftHorizontal );
+ dy += tqstyle().tqpixelMetric( TQStyle::PM_ButtonShiftVertical );
}
}
-bool KoToolButton::hitArrow( const QPoint& pos )
+bool KoToolButton::hitArrow( const TQPoint& pos )
{
- return QRect( width() - ARROW_WIDTH, 0, ARROW_WIDTH, height() ).contains( pos );
+ return TQRect( width() - ARROW_WIDTH, 0, ARROW_WIDTH, height() ).tqcontains( pos );
}
#include <KoTooluButton.moc>
diff --git a/lib/kofficeui/KoTooluButton.h b/lib/kofficeui/KoTooluButton.h
index b933eeee9..d4c339443 100644
--- a/lib/kofficeui/KoTooluButton.h
+++ b/lib/kofficeui/KoTooluButton.h
@@ -21,44 +21,45 @@
#define _kotoolbutton_h_
#include <ktoolbarbutton.h>
-#include <qmap.h>
-#include <qpoint.h>
+#include <tqmap.h>
+#include <tqpoint.h>
-class QPopupMenu;
+class TQPopupMenu;
-class KoColorPanel : public QWidget
+class KoColorPanel : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoColorPanel( QWidget* parent = 0, const char* name = 0 );
+ KoColorPanel( TQWidget* tqparent = 0, const char* name = 0 );
virtual ~KoColorPanel();
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
+ virtual TQSize tqsizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
enum MenuStyle { Plain, CustomColors };
- static QPopupMenu* createColorPopup( MenuStyle style, const QColor& defaultColor,
- const QObject* receiver, const char* slot,
- QWidget* parent, const char* name );
+ static TQPopupMenu* createColorPopup( MenuStyle style, const TQColor& defaultColor,
+ const TQObject* receiver, const char* slot,
+ TQWidget* tqparent, const char* name );
public slots:
void clear();
- void insertColor( const QColor& color );
- void insertColor( const QColor& color, const QString& toolTip );
+ void insertColor( const TQColor& color );
+ void insertColor( const TQColor& color, const TQString& toolTip );
void insertDefaultColors();
signals:
- void colorSelected( const QColor& color );
+ void colorSelected( const TQColor& color );
protected:
- virtual void mousePressEvent( QMouseEvent* e );
- virtual void mouseReleaseEvent( QMouseEvent* e );
- virtual void mouseMoveEvent( QMouseEvent* e );
- virtual void paintEvent( QPaintEvent* e );
- virtual void keyPressEvent( QKeyEvent* e );
- virtual void focusInEvent( QFocusEvent* e );
- virtual void dragEnterEvent( QDragEnterEvent* e );
- virtual void dropEvent( QDropEvent* e );
+ virtual void mousePressEvent( TQMouseEvent* e );
+ virtual void mouseReleaseEvent( TQMouseEvent* e );
+ virtual void mouseMoveEvent( TQMouseEvent* e );
+ virtual void paintEvent( TQPaintEvent* e );
+ virtual void keyPressEvent( TQKeyEvent* e );
+ virtual void focusInEvent( TQFocusEvent* e );
+ virtual void dragEnterEvent( TQDragEnterEvent* e );
+ virtual void dropEvent( TQDropEvent* e );
private:
// The position of the 16x16 tiles in "tile steps"
@@ -72,29 +73,29 @@ private:
friend bool operator<( const KoColorPanel::Position& lhs, const KoColorPanel::Position& rhs );
void finalizeInsertion( const Position& pos );
- bool insertColor( const QColor& color, bool checking );
- bool insertColor( const QColor& color, const QString& toolTip, bool checking );
- bool isAvailable( const QColor& color );
-
- Position mapToPosition( const QPoint& point ) const;
- QColor mapToColor( const QPoint& point ) const;
- QColor mapToColor( const Position& position ) const;
- QRect mapFromPosition( const Position& position ) const;
+ bool insertColor( const TQColor& color, bool checking );
+ bool insertColor( const TQColor& color, const TQString& toolTip, bool checking );
+ bool isAvailable( const TQColor& color );
+
+ Position mapToPosition( const TQPoint& point ) const;
+ TQColor mapToColor( const TQPoint& point ) const;
+ TQColor mapToColor( const Position& position ) const;
+ TQRect mapFromPosition( const Position& position ) const;
Position validPosition( const Position& position );
int lines() const;
- void paintArea( const QRect& rect, int& startRow, int& endRow, int& startCol, int& endCol ) const;
+ void paintArea( const TQRect& rect, int& startRow, int& endRow, int& startCol, int& endCol ) const;
void updateFocusPosition( const Position& newPosition );
void paint( const Position& position );
void init();
Position m_nextPosition, m_focusPosition;
- QMap<Position, QColor> m_colorMap;
- QPoint m_pressedPos;
+ TQMap<Position, TQColor> m_colorMap;
+ TQPoint m_pressedPos;
bool m_defaultsAdded;
};
-// Needed for the use of KoColorPanel::Position in QMap
+// Needed for the use of KoColorPanel::Position in TQMap
bool operator<( const KoColorPanel::Position& lhs, const KoColorPanel::Position& rhs );
@@ -102,11 +103,12 @@ bool operator<( const KoColorPanel::Position& lhs, const KoColorPanel::Position&
// color item in the color-panel popup is activated. Additionally
// it's used to provide the color select dialog and manages the recent
// colors... hacky
-class KoColorPopupProxy : public QObject
+class KoColorPopupProxy : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoColorPopupProxy( const QColor& defaultColor, KoColorPanel* recentColors, QObject* parent, const char* name );
+ KoColorPopupProxy( const TQColor& defaultColor, KoColorPanel* recentColors, TQObject* tqparent, const char* name );
virtual ~KoColorPopupProxy() {}
void setRecentColorPanel( KoColorPanel* recentColors );
@@ -116,10 +118,10 @@ public slots:
void slotMoreColors();
signals:
- void colorSelected( const QColor& color );
+ void colorSelected( const TQColor& color );
private:
- QColor m_defaultColor;
+ TQColor m_defaultColor;
KoColorPanel* m_recentColors;
};
@@ -128,6 +130,7 @@ private:
class KoToolButton : public KToolBarButton
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Construct a button with an icon loaded by the button itself.
@@ -136,12 +139,12 @@ public:
*
* @param icon Name of icon to load (may be absolute or relative)
* @param id Id of this button
- * @param parent This button's parent
+ * @param tqparent This button's tqparent
* @param name This button's internal name
* @param txt This button's text (in a tooltip or otherwise)
*/
- KoToolButton( const QString& icon, int id, QWidget* parent,
- const char* name = 0L, const QString& txt = QString::null,
+ KoToolButton( const TQString& icon, int id, TQWidget* tqparent,
+ const char* name = 0L, const TQString& txt = TQString(),
KInstance* _instance = KGlobal::instance() );
/**
@@ -151,32 +154,32 @@ public:
*
* @param icon Name of icon to load (may be absolute or relative)
* @param id Id of this button
- * @param parent This button's parent
+ * @param tqparent This button's tqparent
* @param name This button's internal name
* @param txt This button's text (in a tooltip or otherwise)
*/
- KoToolButton( const QPixmap& pixmap, int id, QWidget* parent,
- const char* name = 0L, const QString& txt = QString::null );
+ KoToolButton( const TQPixmap& pixmap, int id, TQWidget* tqparent,
+ const char* name = 0L, const TQString& txt = TQString() );
virtual ~KoToolButton();
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
- virtual QSize minimumSize() const;
+ virtual TQSize tqsizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
+ virtual TQSize tqminimumSize() const;
public slots:
- void colorSelected( const QColor& color );
+ void colorSelected( const TQColor& color );
protected:
- virtual void drawButton(QPainter *p);
- virtual bool eventFilter( QObject* o, QEvent* e );
+ virtual void drawButton(TQPainter *p);
+ virtual bool eventFilter( TQObject* o, TQEvent* e );
private:
void init();
void buttonShift( int& dx, int& dy );
- bool hitArrow( const QPoint& pos );
+ bool hitArrow( const TQPoint& pos );
- QPopupMenu* m_popup;
+ TQPopupMenu* m_popup;
bool m_arrowPressed;
};
diff --git a/lib/kofficeui/KoUnitWidgets.cpp b/lib/kofficeui/KoUnitWidgets.cpp
index 008998820..a9b4fbcf2 100644
--- a/lib/kofficeui/KoUnitWidgets.cpp
+++ b/lib/kofficeui/KoUnitWidgets.cpp
@@ -23,27 +23,27 @@
#include <kdebug.h>
#include <kglobal.h>
#include <klocale.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
// ----------------------------------------------------------------
// Support classes
-KoUnitDoubleValidator::KoUnitDoubleValidator( KoUnitDoubleBase *base, QObject *parent, const char *name )
-: KDoubleValidator( parent, name ), m_base( base )
+KoUnitDoubleValidator::KoUnitDoubleValidator( KoUnitDoubleBase *base, TQObject *tqparent, const char *name )
+: KDoubleValidator( tqparent, name ), m_base( base )
{
}
-QValidator::State
-KoUnitDoubleValidator::validate( QString &s, int &pos ) const
+TQValidator::State
+KoUnitDoubleValidator::validate( TQString &s, int &pos ) const
{
kdDebug(30004) << "KoUnitDoubleValidator::validate : " << s << " at " << pos << endl;
- QValidator::State result = Acceptable;
+ TQValidator::State result = Acceptable;
- QRegExp regexp ("([ a-zA-Z]+)$"); // Letters or spaces at end
+ TQRegExp regexp ("([ a-zA-Z]+)$"); // Letters or spaces at end
const int res = regexp.search( s );
if ( res == -1 )
@@ -53,9 +53,9 @@ KoUnitDoubleValidator::validate( QString &s, int &pos ) const
return Intermediate;
}
- // ### TODO: are all the QString::stripWhiteSpace really necessary?
- const QString number ( s.left( res ).stripWhiteSpace() );
- const QString unitName ( regexp.cap( 1 ).stripWhiteSpace().lower() );
+ // ### TODO: are all the TQString::stripWhiteSpace really necessary?
+ const TQString number ( s.left( res ).stripWhiteSpace() );
+ const TQString unitName ( regexp.cap( 1 ).stripWhiteSpace().lower() );
kdDebug(30004) << "Split:" << number << ":" << unitName << ":" << endl;
@@ -88,25 +88,25 @@ KoUnitDoubleValidator::validate( QString &s, int &pos ) const
}
-QString KoUnitDoubleBase::getVisibleText( double value ) const
+TQString KoUnitDoubleBase::getVisibleText( double value ) const
{
- const QString num ( QString( "%1%2").arg( KGlobal::locale()->formatNumber( value, m_precision ), KoUnit::unitName( m_unit ) ) );
- kdDebug(30004) << "getVisibleText: " << QString::number( value, 'f', 12 ) << " => " << num << endl;
+ const TQString num ( TQString( "%1%2").tqarg( KGlobal::locale()->formatNumber( value, m_precision ), KoUnit::unitName( m_unit ) ) );
+ kdDebug(30004) << "getVisibleText: " << TQString::number( value, 'f', 12 ) << " => " << num << endl;
return num;
}
-double KoUnitDoubleBase::toDouble( const QString& str, bool* ok ) const
+double KoUnitDoubleBase::toDouble( const TQString& str, bool* ok ) const
{
- QString str2( str );
+ TQString str2( str );
/* KLocale::readNumber wants the thousand separator exactly at 1000.
But when editing, it might be anywhere. So we need to remove it. */
- const QString sep( KGlobal::locale()->thousandsSeparator() );
+ const TQString sep( KGlobal::locale()->thousandsSeparator() );
if ( !sep.isEmpty() )
str2.remove( sep );
str2.remove( KoUnit::unitName( m_unit ) );
const double dbl = KGlobal::locale()->readNumber( str2, ok );
if ( ok )
- kdDebug(30004) << "toDouble:" << str << ": => :" << str2 << ": => " << QString::number( dbl, 'f', 12 ) << endl;
+ kdDebug(30004) << "toDouble:" << str << ": => :" << str2 << ": => " << TQString::number( dbl, 'f', 12 ) << endl;
else
kdWarning(30004) << "toDouble error:" << str << ": => :" << str2 << ":" << endl;
return dbl;
@@ -117,42 +117,42 @@ double KoUnitDoubleBase::toDouble( const QString& str, bool* ok ) const
// Widget classes
-KoUnitDoubleSpinBox::KoUnitDoubleSpinBox( QWidget *parent, const char *name )
- : KDoubleSpinBox( parent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 )
+KoUnitDoubleSpinBox::KoUnitDoubleSpinBox( TQWidget *tqparent, const char *name )
+ : KDoubleSpinBox( tqparent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 )
, m_lowerInPoints( -9999 )
, m_upperInPoints( 9999 )
, m_stepInPoints( 1 )
{
KDoubleSpinBox::setPrecision( 2 );
- m_validator = new KoUnitDoubleValidator( this, this );
- QSpinBox::setValidator( m_validator );
+ m_validator = new KoUnitDoubleValidator( this, TQT_TQOBJECT(this) );
+ TQSpinBox::setValidator( m_validator );
setAcceptLocalizedNumbers( true );
setUnit( KoUnit::U_PT );
- connect(this, SIGNAL(valueChanged( double )), SLOT(privateValueChanged()));
+ connect(this, TQT_SIGNAL(valueChanged( double )), TQT_SLOT(privateValueChanged()));
}
-KoUnitDoubleSpinBox::KoUnitDoubleSpinBox( QWidget *parent,
+KoUnitDoubleSpinBox::KoUnitDoubleSpinBox( TQWidget *tqparent,
double lower, double upper,
double step,
double value,
KoUnit::Unit unit,
unsigned int precision,
const char *name )
- : KDoubleSpinBox( lower, upper, step, value, precision, parent, name ),
+ : KDoubleSpinBox( lower, upper, step, value, precision, tqparent, name ),
KoUnitDoubleBase( unit, precision ),
m_lowerInPoints( lower ), m_upperInPoints( upper ), m_stepInPoints( step )
{
m_unit = KoUnit::U_PT;
- m_validator = new KoUnitDoubleValidator( this, this );
- QSpinBox::setValidator( m_validator );
+ m_validator = new KoUnitDoubleValidator( this, TQT_TQOBJECT(this) );
+ TQSpinBox::setValidator( m_validator );
setAcceptLocalizedNumbers( true );
setUnit( unit );
changeValue( value );
setLineStep( 0.5 );
- connect(this, SIGNAL(valueChanged( double )), SLOT(privateValueChanged()));
+ connect(this, TQT_SIGNAL(valueChanged( double )), TQT_SLOT(privateValueChanged()));
}
void
@@ -219,24 +219,24 @@ void KoUnitDoubleSpinBox::setMinMaxStep( double min, double max, double step )
// ----------------------------------------------------------------
-KoUnitDoubleLineEdit::KoUnitDoubleLineEdit( QWidget *parent, const char *name )
- : KLineEdit( parent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ), m_value( 0.0 ), m_lower( 0.0 ), m_upper( 9999.99 ),
+KoUnitDoubleLineEdit::KoUnitDoubleLineEdit( TQWidget *tqparent, const char *name )
+ : KLineEdit( tqparent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ), m_value( 0.0 ), m_lower( 0.0 ), m_upper( 9999.99 ),
m_lowerInPoints( 0.0 ), m_upperInPoints( 9999.99 )
{
- setAlignment( Qt::AlignRight );
- m_validator = new KoUnitDoubleValidator( this, this );
+ tqsetAlignment( TQt::AlignRight );
+ m_validator = new KoUnitDoubleValidator( this, TQT_TQOBJECT(this) );
setValidator( m_validator );
setUnit( KoUnit::U_PT );
changeValue( KoUnit::ptToUnit( 0.0, KoUnit::U_PT ) );
}
-KoUnitDoubleLineEdit::KoUnitDoubleLineEdit( QWidget *parent, double lower, double upper, double value, KoUnit::Unit unit,
+KoUnitDoubleLineEdit::KoUnitDoubleLineEdit( TQWidget *tqparent, double lower, double upper, double value, KoUnit::Unit unit,
unsigned int precision, const char *name )
- : KLineEdit( parent, name ), KoUnitDoubleBase( unit, precision ), m_value( value ), m_lower( lower ), m_upper( upper ),
+ : KLineEdit( tqparent, name ), KoUnitDoubleBase( unit, precision ), m_value( value ), m_lower( lower ), m_upper( upper ),
m_lowerInPoints( lower ), m_upperInPoints( upper )
{
- setAlignment( Qt::AlignRight );
- m_validator = new KoUnitDoubleValidator( this, this );
+ tqsetAlignment( TQt::AlignRight );
+ m_validator = new KoUnitDoubleValidator( this, TQT_TQOBJECT(this) );
setValidator( m_validator );
setUnit( unit );
changeValue( KoUnit::ptToUnit( value, unit ) );
@@ -260,10 +260,10 @@ KoUnitDoubleLineEdit::setUnit( KoUnit::Unit unit )
}
bool
-KoUnitDoubleLineEdit::eventFilter( QObject* o, QEvent* ev )
+KoUnitDoubleLineEdit::eventFilter( TQObject* o, TQEvent* ev )
{
#if 0
- if( ev->type() == QEvent::FocusOut || ev->type() == QEvent::Leave || ev->type() == QEvent::Hide )
+ if( ev->type() == TQEvent::FocusOut || ev->type() == TQEvent::Leave || ev->type() == TQEvent::Hide )
{
bool ok;
double value = toDouble( text(), &ok );
@@ -272,7 +272,7 @@ KoUnitDoubleLineEdit::eventFilter( QObject* o, QEvent* ev )
}
else
#endif
- return QLineEdit::eventFilter( o, ev );
+ return TQLineEdit::eventFilter( o, ev );
}
double KoUnitDoubleLineEdit::value( void ) const
@@ -284,34 +284,34 @@ double KoUnitDoubleLineEdit::value( void ) const
// ----------------------------------------------------------------
-KoUnitDoubleComboBox::KoUnitDoubleComboBox( QWidget *parent, const char *name )
- : KComboBox( true, parent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ), m_value( 0.0 ), m_lower( 0.0 ), m_upper( 9999.99 ), m_lowerInPoints( 0.0 ), m_upperInPoints( 9999.99 )
+KoUnitDoubleComboBox::KoUnitDoubleComboBox( TQWidget *tqparent, const char *name )
+ : KComboBox( true, tqparent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ), m_value( 0.0 ), m_lower( 0.0 ), m_upper( 9999.99 ), m_lowerInPoints( 0.0 ), m_upperInPoints( 9999.99 )
{
- lineEdit()->setAlignment( Qt::AlignRight );
- m_validator = new KoUnitDoubleValidator( this, this );
+ lineEdit()->tqsetAlignment( TQt::AlignRight );
+ m_validator = new KoUnitDoubleValidator( this, TQT_TQOBJECT(this) );
lineEdit()->setValidator( m_validator );
setUnit( KoUnit::U_PT );
changeValue( KoUnit::ptToUnit( 0.0, KoUnit::U_PT ) );
- connect( this, SIGNAL( activated( int ) ), this, SLOT( slotActivated( int ) ) );
+ connect( this, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotActivated( int ) ) );
}
-KoUnitDoubleComboBox::KoUnitDoubleComboBox( QWidget *parent, double lower, double upper, double value, KoUnit::Unit unit,
+KoUnitDoubleComboBox::KoUnitDoubleComboBox( TQWidget *tqparent, double lower, double upper, double value, KoUnit::Unit unit,
unsigned int precision, const char *name )
- : KComboBox( true, parent, name ), KoUnitDoubleBase( unit, precision ), m_value( value ), m_lower( lower ), m_upper( upper ),
+ : KComboBox( true, tqparent, name ), KoUnitDoubleBase( unit, precision ), m_value( value ), m_lower( lower ), m_upper( upper ),
m_lowerInPoints( lower ), m_upperInPoints( upper )
{
- lineEdit()->setAlignment( Qt::AlignRight );
- m_validator = new KoUnitDoubleValidator( this, this );
+ lineEdit()->tqsetAlignment( TQt::AlignRight );
+ m_validator = new KoUnitDoubleValidator( this, TQT_TQOBJECT(this) );
lineEdit()->setValidator( m_validator );
setUnit( unit );
changeValue( KoUnit::ptToUnit( value, unit ) );
- connect( this, SIGNAL( activated( int ) ), this, SLOT( slotActivated( int ) ) );
+ connect( this, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotActivated( int ) ) );
}
void
KoUnitDoubleComboBox::changeValue( double value )
{
- QString oldLabel = lineEdit()->text();
+ TQString oldLabel = lineEdit()->text();
updateValue( value );
if( lineEdit()->text() != oldLabel )
emit valueChanged( m_value );
@@ -352,10 +352,10 @@ KoUnitDoubleComboBox::setUnit( KoUnit::Unit unit )
}
bool
-KoUnitDoubleComboBox::eventFilter( QObject* o, QEvent* ev )
+KoUnitDoubleComboBox::eventFilter( TQObject* o, TQEvent* ev )
{
#if 0
- if( ev->type() == QEvent::FocusOut || ev->type() == QEvent::Leave || ev->type() == QEvent::Hide )
+ if( ev->type() == TQEvent::FocusOut || ev->type() == TQEvent::Leave || ev->type() == TQEvent::Hide )
{
bool ok;
double value = toDouble( lineEdit()->text(), &ok );
@@ -364,7 +364,7 @@ KoUnitDoubleComboBox::eventFilter( QObject* o, QEvent* ev )
}
else
#endif
- return QComboBox::eventFilter( o, ev );
+ return TQComboBox::eventFilter( o, ev );
}
double KoUnitDoubleComboBox::value( void ) const
@@ -376,51 +376,51 @@ double KoUnitDoubleComboBox::value( void ) const
// ----------------------------------------------------------------
-KoUnitDoubleSpinComboBox::KoUnitDoubleSpinComboBox( QWidget *parent, const char *name )
- : QWidget( parent ), m_step( 1.0 )
+KoUnitDoubleSpinComboBox::KoUnitDoubleSpinComboBox( TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent ), m_step( 1.0 )
{
- QGridLayout *layout = new QGridLayout( this, 2, 3 );
- //layout->setMargin( 2 );
- QPushButton *up = new QPushButton( "+", this );
+ TQGridLayout *tqlayout = new TQGridLayout( this, 2, 3 );
+ //tqlayout->setMargin( 2 );
+ TQPushButton *up = new TQPushButton( "+", this );
//up->setFlat( true );
up->setMaximumHeight( 15 );
up->setMaximumWidth( 15 );
- layout->addWidget( up, 0, 0 );
- connect( up, SIGNAL( clicked() ), this, SLOT( slotUpClicked() ) );
+ tqlayout->addWidget( up, 0, 0 );
+ connect( up, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotUpClicked() ) );
- QPushButton *down = new QPushButton( "-", this );
+ TQPushButton *down = new TQPushButton( "-", this );
down->setMaximumHeight( 15 );
down->setMaximumWidth( 15 );
- layout->addWidget( down, 1, 0 );
- connect( down, SIGNAL( clicked() ), this, SLOT( slotDownClicked() ) );
+ tqlayout->addWidget( down, 1, 0 );
+ connect( down, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDownClicked() ) );
m_combo = new KoUnitDoubleComboBox( this, KoUnit::ptToUnit( 0.0, KoUnit::U_PT ), KoUnit::ptToUnit( 9999.99, KoUnit::U_PT ), 0.0, KoUnit::U_PT, 2, name );
- connect( m_combo, SIGNAL( valueChanged( double ) ), this, SIGNAL( valueChanged( double ) ) );
- layout->addMultiCellWidget( m_combo, 0, 1, 2, 2 );
+ connect( m_combo, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SIGNAL( valueChanged( double ) ) );
+ tqlayout->addMultiCellWidget( m_combo, 0, 1, 2, 2 );
}
-KoUnitDoubleSpinComboBox::KoUnitDoubleSpinComboBox( QWidget *parent, double lower, double upper, double step, double value,
+KoUnitDoubleSpinComboBox::KoUnitDoubleSpinComboBox( TQWidget *tqparent, double lower, double upper, double step, double value,
KoUnit::Unit unit, unsigned int precision, const char *name )
- : QWidget( parent ), m_step( step )//, m_lowerInPoints( lower ), m_upperInPoints( upper )
+ : TQWidget( tqparent ), m_step( step )//, m_lowerInPoints( lower ), m_upperInPoints( upper )
{
- QGridLayout *layout = new QGridLayout( this, 2, 3 );
- //layout->setMargin( 2 );
- QPushButton *up = new QPushButton( "+", this );
+ TQGridLayout *tqlayout = new TQGridLayout( this, 2, 3 );
+ //tqlayout->setMargin( 2 );
+ TQPushButton *up = new TQPushButton( "+", this );
//up->setFlat( true );
up->setMaximumHeight( 15 );
up->setMaximumWidth( 15 );
- layout->addWidget( up, 0, 0 );
- connect( up, SIGNAL( clicked() ), this, SLOT( slotUpClicked() ) );
+ tqlayout->addWidget( up, 0, 0 );
+ connect( up, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotUpClicked() ) );
- QPushButton *down = new QPushButton( "-", this );
+ TQPushButton *down = new TQPushButton( "-", this );
down->setMaximumHeight( 15 );
down->setMaximumWidth( 15 );
- layout->addWidget( down, 1, 0 );
- connect( down, SIGNAL( clicked() ), this, SLOT( slotDownClicked() ) );
+ tqlayout->addWidget( down, 1, 0 );
+ connect( down, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDownClicked() ) );
m_combo = new KoUnitDoubleComboBox( this, KoUnit::ptToUnit( lower, unit ), KoUnit::ptToUnit( upper, unit ), value, unit, precision, name );
- connect( m_combo, SIGNAL( valueChanged( double ) ), this, SIGNAL( valueChanged( double ) ) );
- layout->addMultiCellWidget( m_combo, 0, 1, 2, 2 );
+ connect( m_combo, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SIGNAL( valueChanged( double ) ) );
+ tqlayout->addMultiCellWidget( m_combo, 0, 1, 2, 2 );
}
void
diff --git a/lib/kofficeui/KoUnitWidgets.h b/lib/kofficeui/KoUnitWidgets.h
index 957b1b36d..dbdcb9c0c 100644
--- a/lib/kofficeui/KoUnitWidgets.h
+++ b/lib/kofficeui/KoUnitWidgets.h
@@ -44,9 +44,9 @@ class KoUnitDoubleBase;
class KOFFICEUI_EXPORT KoUnitDoubleValidator : public KDoubleValidator
{
public:
- KoUnitDoubleValidator( KoUnitDoubleBase *base, QObject *parent, const char *name = 0 );
+ KoUnitDoubleValidator( KoUnitDoubleBase *base, TQObject *tqparent, const char *name = 0 );
- virtual QValidator::State validate( QString &, int & ) const;
+ virtual TQValidator::State validate( TQString &, int & ) const;
private:
KoUnitDoubleBase *m_base;
@@ -80,14 +80,14 @@ protected:
* @param value the number as double
* @return the resulting string
*/
- QString getVisibleText( double value ) const;
+ TQString getVisibleText( double value ) const;
/**
* Transfrom a string into a double, while taking care of locale specific symbols.
* @param str the string to transform into a number
* @param ok true, if the conversion was succesful
* @return the value as double
*/
- double toDouble( const QString& str, bool* ok ) const;
+ double toDouble( const TQString& str, bool* ok ) const;
protected:
KoUnitDoubleValidator *m_validator;
@@ -107,10 +107,11 @@ protected:
class KOFFICEUI_EXPORT KoUnitDoubleSpinBox : public KDoubleSpinBox, public KoUnitDoubleBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoUnitDoubleSpinBox( QWidget *parent = 0L, const char *name = 0L );
+ KoUnitDoubleSpinBox( TQWidget *tqparent = 0L, const char *name = 0L );
// lower, upper, step and value are in pt
- KoUnitDoubleSpinBox( QWidget *parent, double lower, double upper, double step, double value = 0.0,
+ KoUnitDoubleSpinBox( TQWidget *tqparent, double lower, double upper, double step, double value = 0.0,
KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 );
// added so the class can be used in .ui files(by Tymoteusz Majewski, maju7@o2.pl)
virtual void changeValue( double );
@@ -135,7 +136,7 @@ public:
void setMinMaxStep( double min, double max, double step );
signals:
- /// emitted like valueChanged in the parent, but this one emits the point value
+ /// emitted like valueChanged in the tqparent, but this one emits the point value
void valueChangedPt( double );
@@ -157,9 +158,10 @@ private slots:
class KOFFICEUI_EXPORT KoUnitDoubleLineEdit : public KLineEdit, public KoUnitDoubleBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoUnitDoubleLineEdit( QWidget *parent = 0L, const char *name = 0L );
- KoUnitDoubleLineEdit( QWidget *parent, double lower, double upper, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 );
+ KoUnitDoubleLineEdit( TQWidget *tqparent = 0L, const char *name = 0L );
+ KoUnitDoubleLineEdit( TQWidget *tqparent, double lower, double upper, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 );
virtual void changeValue( double );
virtual void setUnit( KoUnit::Unit = KoUnit::U_PT );
@@ -168,7 +170,7 @@ public:
double value( void ) const;
protected:
- bool eventFilter( QObject* obj, QEvent* ev );
+ bool eventFilter( TQObject* obj, TQEvent* ev );
private:
double m_value;
@@ -185,9 +187,10 @@ private:
class KOFFICEUI_EXPORT KoUnitDoubleComboBox : public KComboBox, public KoUnitDoubleBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoUnitDoubleComboBox( QWidget *parent = 0L, const char *name = 0L );
- KoUnitDoubleComboBox( QWidget *parent, double lower, double upper, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 );
+ KoUnitDoubleComboBox( TQWidget *tqparent = 0L, const char *name = 0L );
+ KoUnitDoubleComboBox( TQWidget *tqparent, double lower, double upper, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 );
virtual void changeValue( double );
void updateValue( double );
@@ -198,7 +201,7 @@ public:
void insertItem( double, int index = -1 );
protected:
- bool eventFilter( QObject* obj, QEvent* ev );
+ bool eventFilter( TQObject* obj, TQEvent* ev );
signals:
void valueChanged(double);
@@ -218,12 +221,13 @@ protected:
* Combo box (with spin control) for double precision numbers with unit display
* \since 1.4 (change of behavior)
*/
-class KOFFICEUI_EXPORT KoUnitDoubleSpinComboBox : public QWidget
+class KOFFICEUI_EXPORT KoUnitDoubleSpinComboBox : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoUnitDoubleSpinComboBox( QWidget *parent = 0L, const char *name = 0L );
- KoUnitDoubleSpinComboBox( QWidget *parent, double lower, double upper, double step, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 );
+ KoUnitDoubleSpinComboBox( TQWidget *tqparent = 0L, const char *name = 0L );
+ KoUnitDoubleSpinComboBox( TQWidget *tqparent, double lower, double upper, double step, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 );
void insertItem( double, int index = -1 );
void updateValue( double );
diff --git a/lib/kofficeui/KoZoomAction.cpp b/lib/kofficeui/KoZoomAction.cpp
index 5f53f007d..5455a159d 100644
--- a/lib/kofficeui/KoZoomAction.cpp
+++ b/lib/kofficeui/KoZoomAction.cpp
@@ -18,70 +18,70 @@
#include <KoZoomAction.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
+#include <tqvaluelist.h>
#include <klocale.h>
-KoZoomAction::KoZoomAction( const QString& text, const QIconSet& pix,
- const KShortcut& cut, QObject* parent, const char* name ):
- KSelectAction( text, pix, cut, parent, name )
+KoZoomAction::KoZoomAction( const TQString& text, const TQIconSet& pix,
+ const KShortcut& cut, TQObject* tqparent, const char* name ):
+ KSelectAction( text, pix, cut, tqparent, name )
{
init();
}
-KoZoomAction::KoZoomAction( const QString& text, const QString& pix,
- const KShortcut& cut, QObject* parent, const char* name ):
- KSelectAction( text, pix, cut, parent, name )
+KoZoomAction::KoZoomAction( const TQString& text, const TQString& pix,
+ const KShortcut& cut, TQObject* tqparent, const char* name ):
+ KSelectAction( text, pix, cut, tqparent, name )
{
init();
}
-void KoZoomAction::setZoom( const QString& text )
+void KoZoomAction::setZoom( const TQString& text )
{
bool ok = false;
- QString t = text;
+ TQString t = text;
int zoom = t.remove( '%' ).toInt( &ok );
// where we'll store sorted new zoom values
- QValueList<int> list;
+ TQValueList<int> list;
if( zoom > 10 ) list.append( zoom );
// "Captured" non-empty sequence of digits
- QRegExp regexp("(\\d+)");
+ TQRegExp regexp("(\\d+)");
- const QStringList itemsList( items() );
- for( QStringList::ConstIterator it = itemsList.begin(); it != itemsList.end(); ++it )
+ const TQStringList itemsList( items() );
+ for( TQStringList::ConstIterator it = itemsList.begin(); it != itemsList.end(); ++it )
{
regexp.search( *it );
const int val=regexp.cap(1).toInt( &ok );
//zoom : limit inferior=10
- if( ok && val>9 && list.contains( val )==0 )
+ if( ok && val>9 && list.tqcontains( val )==0 )
list.append( val );
}
qHeapSort( list );
// update items with new sorted zoom values
- QStringList values;
- for (QValueList<int>::Iterator it = list.begin(); it != list.end(); ++it )
- values.append( i18n("%1%").arg(*it) );
+ TQStringList values;
+ for (TQValueList<int>::Iterator it = list.begin(); it != list.end(); ++it )
+ values.append( i18n("%1%").tqarg(*it) );
setItems( values );
- QString zoomStr = i18n("%1%").arg( zoom );
- setCurrentItem( values.findIndex( zoomStr ) );
+ TQString zoomStr = i18n("%1%").tqarg( zoom );
+ setCurrentItem( values.tqfindIndex( zoomStr ) );
}
void KoZoomAction::setZoom( int zoom )
{
- setZoom( QString::number( zoom ) );
+ setZoom( TQString::number( zoom ) );
}
-void KoZoomAction::activated( const QString& text )
+void KoZoomAction::activated( const TQString& text )
{
setZoom( text );
emit zoomChanged( text );
@@ -91,25 +91,25 @@ void KoZoomAction::init()
{
setEditable( true );
- QStringList values;
- values << i18n("%1%").arg("33");
- values << i18n("%1%").arg("50");
- values << i18n("%1%").arg("75");
- values << i18n("%1%").arg("100");
- values << i18n("%1%").arg("125");
- values << i18n("%1%").arg("150");
- values << i18n("%1%").arg("200");
- values << i18n("%1%").arg("250");
- values << i18n("%1%").arg("350");
- values << i18n("%1%").arg("400");
- values << i18n("%1%").arg("450");
- values << i18n("%1%").arg("500");
+ TQStringList values;
+ values << i18n("%1%").tqarg("33");
+ values << i18n("%1%").tqarg("50");
+ values << i18n("%1%").tqarg("75");
+ values << i18n("%1%").tqarg("100");
+ values << i18n("%1%").tqarg("125");
+ values << i18n("%1%").tqarg("150");
+ values << i18n("%1%").tqarg("200");
+ values << i18n("%1%").tqarg("250");
+ values << i18n("%1%").tqarg("350");
+ values << i18n("%1%").tqarg("400");
+ values << i18n("%1%").tqarg("450");
+ values << i18n("%1%").tqarg("500");
setItems( values );
- setCurrentItem( values.findIndex( i18n("%1%").arg( 100 ) ) );
+ setCurrentItem( values.tqfindIndex( i18n("%1%").tqarg( 100 ) ) );
- connect( this, SIGNAL( activated( const QString& ) ),
- SLOT( activated( const QString& ) ) );
+ connect( this, TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SLOT( activated( const TQString& ) ) );
}
#include "KoZoomAction.moc"
diff --git a/lib/kofficeui/KoZoomAction.h b/lib/kofficeui/KoZoomAction.h
index 326e4f043..d714259ad 100644
--- a/lib/kofficeui/KoZoomAction.h
+++ b/lib/kofficeui/KoZoomAction.h
@@ -31,20 +31,21 @@
class KOFFICEUI_EXPORT KoZoomAction : public KSelectAction
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Creates a new zoom action.
*/
- KoZoomAction( const QString& text, const QIconSet& pix,
- const KShortcut& cut = KShortcut(), QObject* parent = 0, const char* name = 0 );
+ KoZoomAction( const TQString& text, const TQIconSet& pix,
+ const KShortcut& cut = KShortcut(), TQObject* tqparent = 0, const char* name = 0 );
/**
* Creates a new zoom action.
*/
- KoZoomAction( const QString& text, const QString& pix,
- const KShortcut& cut = KShortcut(), QObject* parent = 0, const char* name = 0 );
+ KoZoomAction( const TQString& text, const TQString& pix,
+ const KShortcut& cut = KShortcut(), TQObject* tqparent = 0, const char* name = 0 );
public slots:
@@ -52,7 +53,7 @@ public slots:
* Sets the zoom. If it's not yet on the list of zoom values, it will be inserted
* into the list at proper place so that the the values remain sorted.
*/
- void setZoom( const QString& zoom );
+ void setZoom( const TQString& zoom );
/**
* Sets the zoom. If it's not yet on the list of zoom values, it will be inserted
@@ -62,7 +63,7 @@ public slots:
protected slots:
- void activated( const QString& text );
+ void activated( const TQString& text );
signals:
@@ -70,7 +71,7 @@ signals:
* Signal zoomChanged is triggered when user changes the zoom value, either by
* choosing it from the list or by entering new value.
*/
- void zoomChanged( const QString& zoom );
+ void zoomChanged( const TQString& zoom );
protected:
diff --git a/lib/kofficeui/KoZoomHandler.h b/lib/kofficeui/KoZoomHandler.h
index 903d2e119..ab5dbe158 100644
--- a/lib/kofficeui/KoZoomHandler.h
+++ b/lib/kofficeui/KoZoomHandler.h
@@ -103,17 +103,17 @@ public:
// Input: pt. Output: pixels. Resolution and zoom are applied.
int zoomItX( double z ) const {
- return qRound( m_zoomedResolutionX * z );
+ return tqRound( m_zoomedResolutionX * z );
}
int zoomItY( double z ) const {
- return qRound( m_zoomedResolutionY * z );
+ return tqRound( m_zoomedResolutionY * z );
}
- QPoint zoomPoint( const KoPoint & p ) const {
- return QPoint( zoomItX( p.x() ), zoomItY( p.y() ) );
+ TQPoint zoomPoint( const KoPoint & p ) const {
+ return TQPoint( zoomItX( p.x() ), zoomItY( p.y() ) );
}
- QRect zoomRect( const KoRect & r ) const {
- QRect _r;
+ TQRect zoomRect( const KoRect & r ) const {
+ TQRect _r;
_r.setCoords( zoomItX( r.left() ), zoomItY( r.top() ),
zoomItX( r.right() ), zoomItY( r.bottom() ) );
return _r;
@@ -128,8 +128,8 @@ public:
* (like when inserting a picture), but then please take
* care of it afterwards, when you know the reference point.
*/
- QSize zoomSize( const KoSize & s ) const {
- return QSize( zoomItX( s.width() ), zoomItY( s.height() ) );
+ TQSize zoomSize( const KoSize & s ) const {
+ return TQSize( zoomItX( s.width() ), zoomItY( s.height() ) );
}
// Input: pixels. Output: pt.
@@ -139,10 +139,10 @@ public:
double unzoomItY( int y ) const {
return static_cast<double>( y ) / m_zoomedResolutionY;
}
- KoPoint unzoomPoint( const QPoint & p ) const {
+ KoPoint unzoomPoint( const TQPoint & p ) const {
return KoPoint( unzoomItX( p.x() ), unzoomItY( p.y() ) );
}
- KoRect unzoomRect( const QRect & r ) const {
+ KoRect unzoomRect( const TQRect & r ) const {
KoRect _r;
_r.setCoords( unzoomItX( r.left() ), unzoomItY( r.top() ),
unzoomItX( r.right() ), unzoomItY( r.bottom() ) );
diff --git a/lib/kofficeui/KoZoomMode.cpp b/lib/kofficeui/KoZoomMode.cpp
index 4df4a7fa1..ae49a3036 100644
--- a/lib/kofficeui/KoZoomMode.cpp
+++ b/lib/kofficeui/KoZoomMode.cpp
@@ -27,12 +27,12 @@ const char* KoZoomMode::modes[] =
I18N_NOOP("%1%")
};
-QString KoZoomMode::toString(Mode mode)
+TQString KoZoomMode::toString(Mode mode)
{
return i18n(modes[mode]);
}
-KoZoomMode::Mode KoZoomMode::toMode(const QString& mode)
+KoZoomMode::Mode KoZoomMode::toMode(const TQString& mode)
{
if(mode == i18n(modes[ZOOM_WIDTH]))
return ZOOM_WIDTH;
diff --git a/lib/kofficeui/KoZoomMode.h b/lib/kofficeui/KoZoomMode.h
index 3e012f288..3c09d482d 100644
--- a/lib/kofficeui/KoZoomMode.h
+++ b/lib/kofficeui/KoZoomMode.h
@@ -20,7 +20,7 @@
#ifndef _KOZOOMMODE_H_
#define _KOZOOMMODE_H_
-#include <qstring.h>
+#include <tqstring.h>
#include "koffice_export.h"
/**
@@ -37,15 +37,15 @@ public:
};
/// \param mode the mode name
- /// \return the to Mode converted QString \c mode
- static Mode toMode(const QString& mode);
+ /// \return the to Mode converted TQString \c mode
+ static Mode toMode(const TQString& mode);
- /// \return the to QString converted and translated Mode \c mode
- static QString toString(Mode mode);
+ /// \return the to TQString converted and translated Mode \c mode
+ static TQString toString(Mode mode);
/// \param mode the mode name
/// \return true if \c mode isn't dependent on windowsize
- static bool isConstant(const QString& mode)
+ static bool isConstant(const TQString& mode)
{ return toMode(mode) == ZOOM_CONSTANT; }
private:
static const char * modes[];
diff --git a/lib/kofficeui/Kolinestyleaction.cpp b/lib/kofficeui/Kolinestyleaction.cpp
index da3415c77..0ef475183 100644
--- a/lib/kofficeui/Kolinestyleaction.cpp
+++ b/lib/kofficeui/Kolinestyleaction.cpp
@@ -19,9 +19,9 @@
#include "Kolinestyleaction.h"
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qbitmap.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqbitmap.h>
#include <kpopupmenu.h>
#include <kdebug.h>
@@ -32,7 +32,7 @@ class KoLineStyleAction::KoLineStyleActionPrivate
public:
KoLineStyleActionPrivate()
{
- m_currentStyle = Qt::SolidLine;
+ m_currentStyle = TQt::SolidLine;
}
~KoLineStyleActionPrivate()
@@ -42,16 +42,16 @@ class KoLineStyleAction::KoLineStyleActionPrivate
int m_currentStyle;
};
-KoLineStyleAction::KoLineStyleAction(const QString &text, const QString& icon,
- QObject* parent, const char* name) : KoSelectAction(text, icon, parent, name)
+KoLineStyleAction::KoLineStyleAction(const TQString &text, const TQString& icon,
+ TQObject* tqparent, const char* name) : KoSelectAction(text, icon, tqparent, name)
{
d = new KoLineStyleActionPrivate;
createMenu();
}
-KoLineStyleAction::KoLineStyleAction(const QString &text, const QString& icon, const QObject* receiver,
- const char* slot, QObject* parent, const char* name) : KoSelectAction(text, icon, receiver, slot, parent, name)
+KoLineStyleAction::KoLineStyleAction(const TQString &text, const TQString& icon, const TQObject* receiver,
+ const char* slot, TQObject* tqparent, const char* name) : KoSelectAction(text, icon, receiver, slot, tqparent, name)
{
d = new KoLineStyleActionPrivate;
@@ -66,11 +66,11 @@ KoLineStyleAction::~KoLineStyleAction()
void KoLineStyleAction::createMenu()
{
KPopupMenu* popup = popupMenu();
- QBitmap mask;
- QPixmap pix(70, 21);
- QPainter p(&pix, popup);
+ TQBitmap tqmask;
+ TQPixmap pix(70, 21);
+ TQPainter p(&pix, popup);
int cindex = 0;
- QPen pen;
+ TQPen pen;
pen.setWidth(2);
popup->insertItem(i18n("None"),cindex++);
@@ -79,8 +79,8 @@ void KoLineStyleAction::createMenu()
pen.setStyle(static_cast<Qt::PenStyle>(i));
p.setPen(pen);
p.drawLine(0, 10, pix.width(), 10);
- mask = pix;
- pix.setMask(mask);
+ tqmask = pix;
+ pix.setMask(tqmask);
popup->insertItem(pix,cindex++);
}
}
diff --git a/lib/kofficeui/Kolinestyleaction.h b/lib/kofficeui/Kolinestyleaction.h
index ff8086f80..6d8d9e919 100644
--- a/lib/kofficeui/Kolinestyleaction.h
+++ b/lib/kofficeui/Kolinestyleaction.h
@@ -26,24 +26,25 @@
class KOFFICEUI_EXPORT KoLineStyleAction : public KoSelectAction
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Constructs a KoLineStyleAction with a text and an icon.
* @param text The text that will be displayed.
* @param icon The dynamically loaded icon that goes with this action.
- * @param parent This action's parent.
+ * @param tqparent This action's tqparent.
* @param name An internal name for this action.
*/
- KoLineStyleAction(const QString& text, const QString& icon, QObject* parent = 0, const char* name = 0);
+ KoLineStyleAction(const TQString& text, const TQString& icon, TQObject* tqparent = 0, const char* name = 0);
/** Same as above, but it also connects a slot to the selectionChanged(int) signal.
* @param text The text that will be displayed.
* @param icon The dynamically loaded icon that goes with this action.
- * @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke when a selectionChanged(int) signal is emited.
- * @param parent This action's parent.
+ * @param receiver The SLOT's tqparent.
+ * @param slot The TQT_SLOT to invoke when a selectionChanged(int) signal is emited.
+ * @param tqparent This action's tqparent.
* @param name An internal name for this action.
*/
- KoLineStyleAction(const QString& text, const QString& icon, const QObject* receiver,
- const char* slot, QObject* parent, const char* name = 0);
+ KoLineStyleAction(const TQString& text, const TQString& icon, const TQObject* receiver,
+ const char* slot, TQObject* tqparent, const char* name = 0);
~KoLineStyleAction();
protected:
diff --git a/lib/kofficeui/Kolinewidthaction.cpp b/lib/kofficeui/Kolinewidthaction.cpp
index 611481cb3..6b693d3c8 100644
--- a/lib/kofficeui/Kolinewidthaction.cpp
+++ b/lib/kofficeui/Kolinewidthaction.cpp
@@ -19,13 +19,13 @@
#include "Kolinewidthaction.h"
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qbitmap.h>
-#include <qwhatsthis.h>
-#include <qmenubar.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqbitmap.h>
+#include <tqwhatsthis.h>
+#include <tqmenubar.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <kpopupmenu.h>
#include <kapplication.h>
@@ -55,22 +55,22 @@ class KoLineWidthAction::KoLineWidthActionPrivate
KoUnit::Unit m_unit;
};
-KoLineWidthAction::KoLineWidthAction(const QString &text, const QString& icon,
- QObject* parent, const char* name) : KoSelectAction(text, icon, parent, name)
+KoLineWidthAction::KoLineWidthAction(const TQString &text, const TQString& icon,
+ TQObject* tqparent, const char* name) : KoSelectAction(text, icon, tqparent, name)
{
d = new KoLineWidthActionPrivate;
createMenu();
}
-KoLineWidthAction::KoLineWidthAction(const QString &text, const QString& icon, const QObject* receiver,
- const char* slot, QObject* parent, const char* name) : KoSelectAction(text, icon, parent, name)
+KoLineWidthAction::KoLineWidthAction(const TQString &text, const TQString& icon, const TQObject* receiver,
+ const char* slot, TQObject* tqparent, const char* name) : KoSelectAction(text, icon, tqparent, name)
{
d = new KoLineWidthActionPrivate;
createMenu();
- connect(this, SIGNAL(lineWidthChanged(double)), receiver, slot);
+ connect(this, TQT_SIGNAL(lineWidthChanged(double)), receiver, slot);
}
KoLineWidthAction::~KoLineWidthAction()
@@ -81,19 +81,19 @@ KoLineWidthAction::~KoLineWidthAction()
void KoLineWidthAction::createMenu()
{
KPopupMenu* popup = popupMenu();
- QBitmap mask;
- QPixmap pix(70, 21);
- QPainter p(&pix, popup);
+ TQBitmap tqmask;
+ TQPixmap pix(70, 21);
+ TQPainter p(&pix, popup);
int cindex = 0;
- QPen pen;
+ TQPen pen;
for(int i = 1; i <= 10; i++) {
pix.fill(white);
- pen.setWidth(qRound(i * POINT_TO_INCH(static_cast<double>(KoGlobal::dpiY()))));
+ pen.setWidth(tqRound(i * POINT_TO_INCH(static_cast<double>(KoGlobal::dpiY()))));
p.setPen(pen);
p.drawLine(0, 10, pix.width(), 10);
- mask = pix;
- pix.setMask(mask);
+ tqmask = pix;
+ pix.setMask(tqmask);
popup->insertItem(pix,cindex++);
}
@@ -109,7 +109,7 @@ void KoLineWidthAction::execute(int index)
d->m_currentWidth = (double) index + 1.0;
ok = true;
} if(index == 11) { // Custom width dialog...
- KoLineWidthChooser dlg(qApp->activeWindow());
+ KoLineWidthChooser dlg(TQT_TQWIDGET(tqApp->activeWindow()));
dlg.setUnit(d->m_unit);
dlg.setWidth(d->m_currentWidth);
@@ -162,16 +162,16 @@ class KoLineWidthChooser::KoLineWidthChooserPrivate
KoUnitDoubleSpinBox* m_lineWidthUSBox;
};
-KoLineWidthChooser::KoLineWidthChooser(QWidget* parent, const char* name)
- : KDialogBase(parent, name, true, i18n("Custom Line Width"), Ok|Cancel, Ok)
+KoLineWidthChooser::KoLineWidthChooser(TQWidget* tqparent, const char* name)
+ : KDialogBase(tqparent, name, true, i18n("Custom Line Width"), Ok|Cancel, Ok)
{
d = new KoLineWidthChooserPrivate;
// Create the ui
- QWidget* mainWidget = new QWidget(this);
+ TQWidget* mainWidget = new TQWidget(this);
setMainWidget(mainWidget);
- QGridLayout* gl = new QGridLayout(mainWidget, 1, 2, KDialog::marginHint(), KDialog::spacingHint());
- QLabel* textLbl = new QLabel(i18n("Line width:"), mainWidget);
+ TQGridLayout* gl = new TQGridLayout(mainWidget, 1, 2, KDialog::marginHint(), KDialog::spacingHint());
+ TQLabel* textLbl = new TQLabel(i18n("Line width:"), mainWidget);
d->m_lineWidthUSBox = new KoUnitDoubleSpinBox(mainWidget, 0.0, 1000.0, 0.1, 1.0, KoUnit::U_PT, 2);
gl->addWidget(textLbl, 0, 0);
gl->addWidget(d->m_lineWidthUSBox, 0, 1);
diff --git a/lib/kofficeui/Kolinewidthaction.h b/lib/kofficeui/Kolinewidthaction.h
index fe03de72e..31991fb48 100644
--- a/lib/kofficeui/Kolinewidthaction.h
+++ b/lib/kofficeui/Kolinewidthaction.h
@@ -30,24 +30,25 @@
class KOFFICEUI_EXPORT KoLineWidthAction : public KoSelectAction
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Constructs a KoLineWidthAction with a text and an icon.
* @param text The text that will be displayed.
* @param icon The dynamically loaded icon that goes with this action.
- * @param parent This action's parent.
+ * @param tqparent This action's tqparent.
* @param name An internal name for this action.
*/
- KoLineWidthAction(const QString& text, const QString& icon, QObject* parent = 0, const char* name = 0);
+ KoLineWidthAction(const TQString& text, const TQString& icon, TQObject* tqparent = 0, const char* name = 0);
/** Same as above, but it also connects a slot to the selectionChanged(int) signal.
* @param text The text that will be displayed.
* @param icon The dynamically loaded icon that goes with this action.
- * @param receiver The SLOT's parent.
- * @param slot The SLOT to invoke when a lineWidthChanged(double) signal is emited.
- * @param parent This action's parent.
+ * @param receiver The SLOT's tqparent.
+ * @param slot The TQT_SLOT to invoke when a lineWidthChanged(double) signal is emited.
+ * @param tqparent This action's tqparent.
* @param name An internal name for this action.
*/
- KoLineWidthAction(const QString& text, const QString& icon, const QObject* receiver,
- const char* slot, QObject* parent, const char* name = 0);
+ KoLineWidthAction(const TQString& text, const TQString& icon, const TQObject* receiver,
+ const char* slot, TQObject* tqparent, const char* name = 0);
~KoLineWidthAction();
/** Returns the currently selected line width */
@@ -87,8 +88,9 @@ class KOFFICEUI_EXPORT KoLineWidthAction : public KoSelectAction
class KoLineWidthChooser : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoLineWidthChooser(QWidget* parent = 0, const char* name = 0);
+ KoLineWidthChooser(TQWidget* tqparent = 0, const char* name = 0);
~KoLineWidthChooser();
/** Returns the selected line width in points. */
diff --git a/lib/kofficeui/kcoloractions.cpp b/lib/kofficeui/kcoloractions.cpp
index a2d707d4a..a0f514e2d 100644
--- a/lib/kofficeui/kcoloractions.cpp
+++ b/lib/kofficeui/kcoloractions.cpp
@@ -19,57 +19,57 @@
#include <kcoloractions.h>
-#include <qpopupmenu.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
+#include <tqpopupmenu.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
#include <kapplication.h>
#include <ktoolbar.h>
#include <ktoolbarbutton.h>
#include <kdebug.h>
-KColorAction::KColorAction( const QString& text, int accel,
- QObject* parent, const char* name )
- : KAction( text, accel, parent, name )
+KColorAction::KColorAction( const TQString& text, int accel,
+ TQObject* tqparent, const char* name )
+ : KAction( text, accel, tqparent, name )
{
typ = TextColor;
init();
}
-KColorAction::KColorAction( const QString& text, int accel,
- QObject* receiver, const char* slot, QObject* parent,
+KColorAction::KColorAction( const TQString& text, int accel,
+ TQObject* receiver, const char* slot, TQObject* tqparent,
const char* name )
- : KAction( text, accel, receiver, slot, parent, name )
+ : KAction( text, accel, receiver, slot, tqparent, name )
{
typ = TextColor;
init();
}
-KColorAction::KColorAction( const QString& text, Type type, int accel,
- QObject* parent, const char* name )
- : KAction( text, accel, parent, name )
+KColorAction::KColorAction( const TQString& text, Type type, int accel,
+ TQObject* tqparent, const char* name )
+ : KAction( text, accel, tqparent, name )
{
typ = type;
init();
}
-KColorAction::KColorAction( const QString& text, Type type, int accel,
- QObject* receiver, const char* slot, QObject* parent,
+KColorAction::KColorAction( const TQString& text, Type type, int accel,
+ TQObject* receiver, const char* slot, TQObject* tqparent,
const char* name )
- : KAction( text, accel, receiver, slot, parent, name )
+ : KAction( text, accel, receiver, slot, tqparent, name )
{
typ = type;
init();
}
-KColorAction::KColorAction( QObject* parent, const char* name )
- : KAction( parent, name )
+KColorAction::KColorAction( TQObject* tqparent, const char* name )
+ : KAction( tqparent, name )
{
typ = TextColor;
init();
}
-void KColorAction::setColor( const QColor &c )
+void KColorAction::setColor( const TQColor &c )
{
if ( c == col )
return;
@@ -78,7 +78,7 @@ void KColorAction::setColor( const QColor &c )
createPixmap();
}
-QColor KColorAction::color() const
+TQColor KColorAction::color() const
{
return col;
}
@@ -99,15 +99,15 @@ KColorAction::Type KColorAction::type() const
void KColorAction::init()
{
- col = Qt::black;
+ col = TQt::black;
createPixmap();
}
void KColorAction::createPixmap()
{
int r, g, b;
- QCString pix;
- QCString line;
+ TQCString pix;
+ TQCString line;
col.rgb( &r, &g, &b );
@@ -211,16 +211,16 @@ void KColorAction::createPixmap()
} break;
}
- QPixmap pixmap( pix );
- setIconSet( QIconSet( pixmap ) );
+ TQPixmap pixmap( pix );
+ setIconSet( TQIconSet( pixmap ) );
}
-KSelectColorAction::KSelectColorAction( const QString& text, Type type,
- const QObject* receiver, const char* slot,
- KActionCollection* parent, const char* name ) :
- KAction( text, KShortcut(), receiver, slot, parent, name ), m_type( type ),
- m_color( Qt::black )
+KSelectColorAction::KSelectColorAction( const TQString& text, Type type,
+ const TQObject* receiver, const char* slot,
+ KActionCollection* tqparent, const char* name ) :
+ KAction( text, KShortcut(), receiver, slot, tqparent, name ), m_type( type ),
+ m_color( TQt::black )
{
}
@@ -228,7 +228,7 @@ KSelectColorAction::~KSelectColorAction()
{
}
-int KSelectColorAction::plug( QWidget* w, int index )
+int KSelectColorAction::plug( TQWidget* w, int index )
{
if (w == 0) {
kdWarning() << "KSelectColorAction::plug called with 0 argument\n";
@@ -237,25 +237,25 @@ int KSelectColorAction::plug( QWidget* w, int index )
if (kapp && !kapp->authorizeKAction(name()))
return -1;
- if ( w->inherits("QPopupMenu") )
+ if ( w->inherits(TQPOPUPMENU_OBJECT_NAME_STRING) )
{
- QPopupMenu* menu = static_cast<QPopupMenu*>( w );
+ TQPopupMenu* menu = static_cast<TQPopupMenu*>( w );
int id;
if ( hasIcon() )
{
/* ###### CHECK: We're not allowed to specify the instance in iconSet()
KInstance *instance;
- if ( parentCollection() )
- instance = parentCollection()->instance();
+ if ( tqparentCollection() )
+ instance = tqparentCollection()->instance();
else
instance = KGlobal::instance();
*/
id = menu->insertItem( iconSet( KIcon::Small, 0 ), text(), this,//dsweet
- SLOT( slotActivated() ), 0, -1, index );
+ TQT_SLOT( slotActivated() ), 0, -1, index );
}
else
- id = menu->insertItem( text(), this, SLOT( slotActivated() ), //dsweet
+ id = menu->insertItem( text(), this, TQT_SLOT( slotActivated() ), //dsweet
0, -1, index );
updateShortcut( menu, id );
@@ -266,10 +266,10 @@ int KSelectColorAction::plug( QWidget* w, int index )
menu->setItemEnabled( id, false );
if ( !whatsThis().isEmpty() )
- menu->setWhatsThis( id, whatsThisWithIcon() );
+ menu->tqsetWhatsThis( id, whatsThisWithIcon() );
addContainer( menu, id );
- connect( menu, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( menu, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
if ( parentCollection() )
parentCollection()->connectHighlight( menu, this );
@@ -287,28 +287,28 @@ int KSelectColorAction::plug( QWidget* w, int index )
else
instance = KGlobal::instance();
- if ( icon().isEmpty() ) // old code using QIconSet directly
+ if ( icon().isEmpty() ) // old code using TQIconSet directly
{
- bar->insertButton( iconSet( KIcon::Small ).pixmap(), id_, SIGNAL( clicked() ), this,
- SLOT( slotActivated() ),
+ bar->insertButton( iconSet( KIcon::Small ).pixmap(), id_, TQT_SIGNAL( clicked() ), this,
+ TQT_SLOT( slotActivated() ),
isEnabled(), plainText(), index );
}
else
- bar->insertButton( icon(), id_, SIGNAL( clicked() ), this,
- SLOT( slotActivated() ),
+ bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this,
+ TQT_SLOT( slotActivated() ),
isEnabled(), plainText(), index, instance );
- bar->getButton( id_ )->setName( QCString("toolbutton_")+name() );
+ bar->getButton( id_ )->setName( TQCString("toolbutton_")+name() );
if ( !whatsThis().isEmpty() )
- QWhatsThis::add( bar->getButton(id_), whatsThisWithIcon() );
+ TQWhatsThis::add( bar->getButton(id_), whatsThisWithIcon() );
if ( !toolTip().isEmpty() )
- QToolTip::add( bar->getButton(id_), toolTip() );
+ TQToolTip::add( bar->getButton(id_), toolTip() );
addContainer( bar, id_ );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
if ( parentCollection() )
parentCollection()->connectHighlight( bar, this );
@@ -319,7 +319,7 @@ int KSelectColorAction::plug( QWidget* w, int index )
return -1;
}
-QColor KSelectColorAction::color() const
+TQColor KSelectColorAction::color() const
{
return m_color;
}
@@ -329,7 +329,7 @@ KSelectColorAction::Type KSelectColorAction::type() const
return m_type;
}
-void KSelectColorAction::setColor( const QColor &/*c*/ )
+void KSelectColorAction::setColor( const TQColor &/*c*/ )
{
}
@@ -337,11 +337,11 @@ void KSelectColorAction::setType( Type /*t*/ )
{
}
-QString KSelectColorAction::whatsThisWithIcon() const
+TQString KSelectColorAction::whatsThisWithIcon() const
{
- QString text = whatsThis();
+ TQString text = whatsThis();
if (!icon().isEmpty())
- return QString::fromLatin1("<img source=\"small|%1\"> %2").arg(icon()).arg(text);
+ return TQString::tqfromLatin1("<img source=\"small|%1\"> %2").tqarg(icon()).tqarg(text);
return text;
}
diff --git a/lib/kofficeui/kcoloractions.h b/lib/kofficeui/kcoloractions.h
index b20be7477..22910672b 100644
--- a/lib/kofficeui/kcoloractions.h
+++ b/lib/kofficeui/kcoloractions.h
@@ -29,6 +29,7 @@
class KColorAction : public KAction
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Type {
@@ -38,19 +39,19 @@ public:
};
// Create default (text) color action
- KColorAction( const QString& text, int accel = 0, QObject* parent = 0, const char* name = 0 );
- KColorAction( const QString& text, int accel,
- QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
- KColorAction( QObject* parent = 0, const char* name = 0 );
+ KColorAction( const TQString& text, int accel = 0, TQObject* tqparent = 0, const char* name = 0 );
+ KColorAction( const TQString& text, int accel,
+ TQObject* receiver, const char* slot, TQObject* tqparent, const char* name = 0 );
+ KColorAction( TQObject* tqparent = 0, const char* name = 0 );
// Create a color action of a given type
- KColorAction( const QString& text, Type type, int accel = 0,
- QObject* parent = 0, const char* name = 0 );
- KColorAction( const QString& text, Type type, int accel,
- QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
+ KColorAction( const TQString& text, Type type, int accel = 0,
+ TQObject* tqparent = 0, const char* name = 0 );
+ KColorAction( const TQString& text, Type type, int accel,
+ TQObject* receiver, const char* slot, TQObject* tqparent, const char* name = 0 );
- virtual void setColor( const QColor &c );
- QColor color() const;
+ virtual void setColor( const TQColor &c );
+ TQColor color() const;
virtual void setType( Type type );
Type type() const;
@@ -59,7 +60,7 @@ private:
void init();
void createPixmap();
- QColor col;
+ TQColor col;
Type typ;
};
@@ -67,6 +68,7 @@ private:
class KSelectColorAction : public KAction
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Type {
TextColor,
@@ -74,28 +76,28 @@ public:
FillColor
};
- KSelectColorAction( const QString& text, Type type,
- const QObject* receiver, const char* slot,
- KActionCollection* parent, const char* name );
+ KSelectColorAction( const TQString& text, Type type,
+ const TQObject* receiver, const char* slot,
+ KActionCollection* tqparent, const char* name );
virtual ~KSelectColorAction();
- virtual int plug( QWidget* w, int index = -1 );
+ virtual int plug( TQWidget* w, int index = -1 );
- QColor color() const;
+ TQColor color() const;
Type type() const;
public slots:
- virtual void setColor( const QColor &c );
+ virtual void setColor( const TQColor &c );
virtual void setType( Type t );
signals:
- void colorSelected( const QColor& color );
+ void colorSelected( const TQColor& color );
private:
- QString whatsThisWithIcon() const; // duplicated, as it's private in kaction
+ TQString whatsThisWithIcon() const; // duplicated, as it's private in kaction
Type m_type;
- QColor m_color;
+ TQColor m_color;
};
#endif
diff --git a/lib/kofficeui/tests/coloraction_test.cpp b/lib/kofficeui/tests/coloraction_test.cpp
index 538f9707f..1ce9f42a5 100644
--- a/lib/kofficeui/tests/coloraction_test.cpp
+++ b/lib/kofficeui/tests/coloraction_test.cpp
@@ -18,10 +18,10 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qvgroupbox.h>
-#include <qpopupmenu.h>
-#include <qmenubar.h>
+#include <tqlayout.h>
+#include <tqvgroupbox.h>
+#include <tqpopupmenu.h>
+#include <tqmenubar.h>
#include <kdebug.h>
#include <ktoolbar.h>
@@ -34,43 +34,43 @@
#include <time.h>
-TopLevel::TopLevel( QWidget* parent, const char* name) : QMainWindow( parent, name )
+TopLevel::TopLevel( TQWidget* tqparent, const char* name) : TQMainWindow( tqparent, name )
{
- setCaption( QString::fromLatin1( "KColorAction test application" ) );
+ setCaption( TQString::tqfromLatin1( "KColorAction test application" ) );
- QWidget *w = new QWidget( this );
+ TQWidget *w = new TQWidget( this );
setCentralWidget( w );
- QBoxLayout* l = new QHBoxLayout( w, KDialog::marginHint(), KDialog::spacingHint() );
- QGroupBox* b1 = new QVGroupBox( QString::fromLatin1( "KoColorPanel 1" ), w );
+ TQBoxLayout* l = new TQHBoxLayout( w, KDialog::marginHint(), KDialog::spacingHint() );
+ TQGroupBox* b1 = new TQVGroupBox( TQString::tqfromLatin1( "KoColorPanel 1" ), w );
panel = new KoColorPanel( b1, "panel1" );
- connect( panel, SIGNAL( colorSelected( const QColor& ) ), SLOT( slotColorSelected( const QColor& ) ) );
+ connect( panel, TQT_SIGNAL( colorSelected( const TQColor& ) ), TQT_SLOT( slotColorSelected( const TQColor& ) ) );
//panel->insertDefaultColors();
l->addWidget( b1 );
- b1 = new QVGroupBox( QString::fromLatin1( "KoColorPanel 2" ), w );
+ b1 = new TQVGroupBox( TQString::tqfromLatin1( "KoColorPanel 2" ), w );
( void ) new KoColorPanel( b1, "panel2" );
l->addWidget( b1 );
- QPopupMenu* file = new QPopupMenu( this );
+ TQPopupMenu* file = new TQPopupMenu( this );
menuBar()->insertItem( "&File", file );
- file->insertItem( "Custom + Default", KoColorPanel::createColorPopup( KoColorPanel::CustomColors, Qt::red, this,
- SLOT( slotColorSelected( const QColor& ) ), file, "blah" ) );
- file->insertItem( "Custom", KoColorPanel::createColorPopup( KoColorPanel::CustomColors, QColor(), this,
- SLOT( slotColorSelected( const QColor& ) ), file, "blah" ) );
- file->insertItem( "Plain + Default", KoColorPanel::createColorPopup( KoColorPanel::Plain, Qt::green, this,
- SLOT( slotColorSelected( const QColor& ) ), file, "blah" ) );
- file->insertItem( "Plain", KoColorPanel::createColorPopup( KoColorPanel::Plain, QColor(), this,
- SLOT( slotColorSelected( const QColor& ) ), file, "blah" ) );
+ file->insertItem( "Custom + Default", KoColorPanel::createColorPopup( KoColorPanel::CustomColors, TQt::red, this,
+ TQT_SLOT( slotColorSelected( const TQColor& ) ), file, "blah" ) );
+ file->insertItem( "Custom", KoColorPanel::createColorPopup( KoColorPanel::CustomColors, TQColor(), this,
+ TQT_SLOT( slotColorSelected( const TQColor& ) ), file, "blah" ) );
+ file->insertItem( "Plain + Default", KoColorPanel::createColorPopup( KoColorPanel::Plain, TQt::green, this,
+ TQT_SLOT( slotColorSelected( const TQColor& ) ), file, "blah" ) );
+ file->insertItem( "Plain", KoColorPanel::createColorPopup( KoColorPanel::Plain, TQColor(), this,
+ TQT_SLOT( slotColorSelected( const TQColor& ) ), file, "blah" ) );
file->insertSeparator();
- file->insertItem( "Default Colors", this, SLOT( defaultColors() ), CTRL+Key_D );
- file->insertItem( "Insert Random Color", this, SLOT( insertRandomColor() ), CTRL+Key_R );
+ file->insertItem( "Default Colors", this, TQT_SLOT( defaultColors() ), CTRL+Key_D );
+ file->insertItem( "Insert Random Color", this, TQT_SLOT( insertRandomColor() ), CTRL+Key_R );
file->insertSeparator();
- file->insertItem( "Clear", this, SLOT( clearColors() ), CTRL+Key_C );
+ file->insertItem( "Clear", this, TQT_SLOT( clearColors() ), CTRL+Key_C );
file->insertSeparator();
- file->insertItem( "&Quit", qApp, SLOT( closeAllWindows() ), CTRL+Key_Q );
+ file->insertItem( "&Quit", tqApp, TQT_SLOT( closeAllWindows() ), CTRL+Key_Q );
KToolBar* toolBar = new KToolBar( this );
addDockWindow( toolBar );
@@ -79,7 +79,7 @@ TopLevel::TopLevel( QWidget* parent, const char* name) : QMainWindow( parent, na
void TopLevel::insertRandomColor()
{
- panel->insertColor( qRgb( rand() % 256, rand() % 256, rand() % 256 ) );
+ panel->insertColor( tqRgb( rand() % 256, rand() % 256, rand() % 256 ) );
}
void TopLevel::defaultColors()
@@ -92,7 +92,7 @@ void TopLevel::clearColors()
panel->clear();
}
-void TopLevel::slotColorSelected( const QColor& color )
+void TopLevel::slotColorSelected( const TQColor& color )
{
kdDebug() << "#### selected: " << color.name() << endl;
}
diff --git a/lib/kofficeui/tests/coloraction_test.h b/lib/kofficeui/tests/coloraction_test.h
index d29f9c5af..a2f0f2cf3 100644
--- a/lib/kofficeui/tests/coloraction_test.h
+++ b/lib/kofficeui/tests/coloraction_test.h
@@ -21,21 +21,22 @@
#ifndef _COLORACTIONTEST_H
#define _COLORACTIONTEST_H
-#include <qmainwindow.h>
+#include <tqmainwindow.h>
class KoColorPanel;
-class TopLevel : public QMainWindow
+class TopLevel : public TQMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
- TopLevel( QWidget* parent = 0, const char* name = 0 );
+ TopLevel( TQWidget* tqparent = 0, const char* name = 0 );
public slots:
void insertRandomColor();
void defaultColors();
void clearColors();
- void slotColorSelected( const QColor& color );
+ void slotColorSelected( const TQColor& color );
private:
KoColorPanel* panel;
diff --git a/lib/kofficeui/tkaction.cpp b/lib/kofficeui/tkaction.cpp
index f627df563..4af7d8d9f 100644
--- a/lib/kofficeui/tkaction.cpp
+++ b/lib/kofficeui/tkaction.cpp
@@ -21,19 +21,19 @@
#include "tktoolbarbutton.h"
#include "tkcombobox.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <ktoolbar.h>
#include <kiconloader.h>
#define SET_FOR_ALL_CONTAINER(WIDGET_TYPE,METHOD_NAME,VALUE) \
for( int id = 0; id < containerCount(); ++id ) { \
- QWidget* w = container(id); \
+ TQWidget* w = container(id); \
if ( w->inherits("KToolBar") ) { \
- QWidget* r = static_cast<KToolBar*>(w)->getWidget(itemId(id)); \
+ TQWidget* r = static_cast<KToolBar*>(w)->getWidget(itemId(id)); \
if (qstrcmp(r->name(),"KTToolBarLayout")==0) \
- r = (QWidget*)r->child("widget"); \
+ r = (TQWidget*)r->child("widget"); \
if ( r && r->inherits(#WIDGET_TYPE) ) { \
WIDGET_TYPE* b = static_cast<WIDGET_TYPE*>(r); \
b->METHOD_NAME(VALUE); \
@@ -41,8 +41,8 @@
} \
}
-TKAction::TKAction(QObject* parent, const char* name)
-: KAction( "", 0, parent, name )
+TKAction::TKAction(TQObject* tqparent, const char* name)
+: KAction( "", 0, tqparent, name )
{
m_imode = TK::IconOnly;
}
@@ -51,7 +51,7 @@ TKAction::~TKAction()
{
}
-int TKAction::plug(QWidget* widget, int index)
+int TKAction::plug(TQWidget* widget, int index)
{
if ( widget->inherits("KToolBar") ) {
KToolBar* bar = static_cast<KToolBar*>(widget);
@@ -65,13 +65,13 @@ int TKAction::plug(QWidget* widget, int index)
TKToolBarButton* b = new TKToolBarButton(icon(),plainText(),bar,name(),instance);
// we don't need clicked() and buttonClicked(), do we?
- // connect(b,SIGNAL(clicked()),SLOT(slotActivated()));
+ // connect(b,TQT_SIGNAL(clicked()),TQT_SLOT(slotActivated()));
b->setIconMode(m_imode);
initToolBarButton(b);
bar->insertWidget( id_, 100, b, index );
addContainer(bar,id_);
- connect( bar, SIGNAL(destroyed()), this, SLOT(slotDestroyed()) );
+ connect( bar, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed()) );
return containerCount() - 1;
}
@@ -80,7 +80,7 @@ int TKAction::plug(QWidget* widget, int index)
void TKAction::initToolBarButton(TKToolBarButton* button)
{
- connect(button,SIGNAL(buttonClicked()),SLOT(slotActivated()));
+ connect(button,TQT_SIGNAL(buttonClicked()),TQT_SLOT(slotActivated()));
}
TK::IconMode TKAction::iconMode()
@@ -94,13 +94,13 @@ void TKAction::setIconMode(TK::IconMode mode)
SET_FOR_ALL_CONTAINER(TKToolBarButton,setIconMode,mode)
}
-void TKAction::setText(const QString& text)
+void TKAction::setText(const TQString& text)
{
KAction::setText(text);
updateLayout();
}
-void TKAction::setIcon(const QString& icon)
+void TKAction::setIcon(const TQString& icon)
{
KAction::setIcon(icon);
updateLayout();
@@ -110,9 +110,9 @@ void TKAction::updateLayout()
{
int len = containerCount();
for( int id = 0; id < len; ++id ) {
- QWidget* w = container( id );
+ TQWidget* w = container( id );
if (w->inherits("KToolBar")) {
- QWidget* r = static_cast<KToolBar*>(w)->getWidget(itemId(id));
+ TQWidget* r = static_cast<KToolBar*>(w)->getWidget(itemId(id));
if (qstrcmp(r->name(),"KTToolBarLayout")==0) {
updateLayout(r);
}
@@ -120,29 +120,29 @@ void TKAction::updateLayout()
}
}
-QWidget* TKAction::createLayout(QWidget* parent, QWidget* children)
+TQWidget* TKAction::createLayout(TQWidget* tqparent, TQWidget* tqchildren)
{
- QWidget* base = new QWidget(parent,"KTToolBarLayout");
- QLabel* textLabel = new QLabel(base,"text");
+ TQWidget* base = new TQWidget(tqparent,"KTToolBarLayout");
+ TQLabel* textLabel = new TQLabel(base,"text");
textLabel->setMinimumHeight(1);
- QLabel* pixLabel = new QLabel(base,"pixmap");
- children->reparent(base,QPoint(0,0));
- children->setName("widget");
- QHBoxLayout* layout = new QHBoxLayout(base,0,3);
- layout->setResizeMode(QLayout::Minimum);
- layout->addWidget(textLabel);
- layout->addWidget(pixLabel);
- layout->addWidget(children,1);
+ TQLabel* pixLabel = new TQLabel(base,"pixmap");
+ tqchildren->reparent(base,TQPoint(0,0));
+ tqchildren->setName("widget");
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(base,0,3);
+ tqlayout->setResizeMode(TQLayout::Minimum);
+ tqlayout->addWidget(textLabel);
+ tqlayout->addWidget(pixLabel);
+ tqlayout->addWidget(tqchildren,1);
updateLayout(base);
return base;
}
-void TKAction::updateLayout(QWidget* base)
+void TKAction::updateLayout(TQWidget* base)
{
- QLabel* textLabel = (QLabel*)base->child("text");
- QLabel* pixLabel = (QLabel*)base->child("pixmap");
- QWidget* w = (QWidget*)base->child("widget");
+ TQLabel* textLabel = (TQLabel*)base->child("text");
+ TQLabel* pixLabel = (TQLabel*)base->child("pixmap");
+ TQWidget* w = (TQWidget*)base->child("widget");
if (!textLabel || !pixLabel || !w)
return;
@@ -153,7 +153,7 @@ void TKAction::updateLayout(QWidget* base)
} else
textLabel->hide();
- QPixmap pix;
+ TQPixmap pix;
if (hasIcon())
pix = iconSet(KIcon::Small).pixmap();
@@ -166,13 +166,13 @@ void TKAction::updateLayout(QWidget* base)
} else
pixLabel->hide();
- base->setFixedWidth( w->sizeHint().width() +
- (textLabel->isVisible() ? textLabel->sizeHint().width():0) +
- (pixLabel->isVisible() ? pixLabel->sizeHint().width():0) );
+ base->setFixedWidth( w->tqsizeHint().width() +
+ (textLabel->isVisible() ? textLabel->tqsizeHint().width():0) +
+ (pixLabel->isVisible() ? pixLabel->tqsizeHint().width():0) );
}
/******************************************************************************/
-TKBaseSelectAction::TKBaseSelectAction( QObject* parent, const char* name )
-: TKAction(parent,name)
+TKBaseSelectAction::TKBaseSelectAction( TQObject* tqparent, const char* name )
+: TKAction(tqparent,name)
{
m_current = 0;
m_editable = false;
@@ -182,7 +182,7 @@ TKBaseSelectAction::~TKBaseSelectAction()
{
}
-int TKBaseSelectAction::plug(QWidget* widget, int index)
+int TKBaseSelectAction::plug(TQWidget* widget, int index)
{
if ( widget->inherits("KToolBar") )
{
@@ -191,13 +191,13 @@ int TKBaseSelectAction::plug(QWidget* widget, int index)
TKComboBox* cb = new TKComboBox(m_editable,bar);
initComboBox(cb);
- cb->setMinimumWidth( cb->sizeHint().width() );
- QWidget* base = createLayout(bar,cb);
+ cb->setMinimumWidth( cb->tqsizeHint().width() );
+ TQWidget* base = createLayout(bar,cb);
bar->insertWidget( id_, 100, base, index );
addContainer( bar, id_ );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
setCurrentItem(currentItem());
@@ -213,7 +213,7 @@ int TKBaseSelectAction::currentItem()
void TKBaseSelectAction::initComboBox(TKComboBox* cb)
{
- connect(cb,SIGNAL(activated(int)),SLOT(slotActivated(int)));
+ connect(cb,TQT_SIGNAL(activated(int)),TQT_SLOT(slotActivated(int)));
}
void TKBaseSelectAction::setEditable(bool editable)
@@ -248,8 +248,8 @@ void TKBaseSelectAction::activate(int id)
emit activated(id);
}
/******************************************************************************/
-TKSelectAction::TKSelectAction( QObject* parent, const char* name )
-: TKBaseSelectAction(parent,name)
+TKSelectAction::TKSelectAction( TQObject* tqparent, const char* name )
+: TKBaseSelectAction(tqparent,name)
{
}
@@ -260,16 +260,16 @@ TKSelectAction::~TKSelectAction()
void TKSelectAction::initComboBox(TKComboBox* cb)
{
TKBaseSelectAction::initComboBox(cb);
- connect(cb,SIGNAL(activated(const QString&)),SLOT(slotActivated(const QString&)));
+ connect(cb,TQT_SIGNAL(activated(const TQString&)),TQT_SLOT(slotActivated(const TQString&)));
cb->insertStringList(items());
}
-void TKSelectAction::slotActivated(const QString& text)
+void TKSelectAction::slotActivated(const TQString& text)
{
emit activated(text);
}
-void TKSelectAction::setItems(const QStringList& lst )
+void TKSelectAction::setItems(const TQStringList& lst )
{
m_list = lst;
m_current = -1;
@@ -281,7 +281,7 @@ void TKSelectAction::setItems(const QStringList& lst )
setEnabled ( lst.count() > 0 || m_editable );
}
-QStringList TKSelectAction::items() const
+TQStringList TKSelectAction::items() const
{
return m_list;
}
@@ -291,7 +291,7 @@ void TKSelectAction::clear()
SET_FOR_ALL_CONTAINER(TKComboBox,clear, )
}
-void TKSelectAction::setEditText(const QString& text)
+void TKSelectAction::setEditText(const TQString& text)
{
SET_FOR_ALL_CONTAINER(TKComboBox,setEditText,text)
}
diff --git a/lib/kofficeui/tkaction.h b/lib/kofficeui/tkaction.h
index 648ffc90d..119fbc852 100644
--- a/lib/kofficeui/tkaction.h
+++ b/lib/kofficeui/tkaction.h
@@ -21,7 +21,7 @@
#define TKACTION_H
#include <kaction.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <koffice_export.h>
namespace TK {
enum IconMode { IconOnly, IconAndText, TextOnly };
@@ -32,25 +32,26 @@ class TKComboBox;
class KOFFICEUI_EXPORT TKAction : public KAction
{ Q_OBJECT
+ TQ_OBJECT
public:
- TKAction(QObject* parent, const char* name);
+ TKAction(TQObject* tqparent, const char* name);
~TKAction();
- virtual int plug(QWidget* widget, int index = -1);
+ virtual int plug(TQWidget* widget, int index = -1);
TK::IconMode iconMode();
protected:
virtual void initToolBarButton(TKToolBarButton*);
- QWidget* createLayout(QWidget* parent, QWidget* children);
+ TQWidget* createLayout(TQWidget* tqparent, TQWidget* tqchildren);
void updateLayout();
- virtual void updateLayout(QWidget*);
+ virtual void updateLayout(TQWidget*);
public slots:
virtual void setIconMode(TK::IconMode);
- void setText(const QString&);
- void setIcon(const QString&);
+ void setText(const TQString&);
+ void setIcon(const TQString&);
private:
TK::IconMode m_imode;
@@ -60,12 +61,13 @@ private:
/******************************************************************************/
class KOFFICEUI_EXPORT TKBaseSelectAction : public TKAction
{ Q_OBJECT
+ TQ_OBJECT
friend class TKSelectAction;
public:
- TKBaseSelectAction(QObject* parent, const char* name);
+ TKBaseSelectAction(TQObject* tqparent, const char* name);
~TKBaseSelectAction();
- virtual int plug(QWidget* widget, int index = -1);
+ virtual int plug(TQWidget* widget, int index = -1);
int currentItem();
bool isEditable();
@@ -94,28 +96,29 @@ private:
/******************************************************************************/
class KOFFICEUI_EXPORT TKSelectAction : public TKBaseSelectAction
{ Q_OBJECT
+ TQ_OBJECT
public:
- TKSelectAction(QObject* parent, const char* name);
+ TKSelectAction(TQObject* tqparent, const char* name);
~TKSelectAction();
- QStringList items() const;
+ TQStringList items() const;
public slots:
- virtual void setItems(const QStringList& );
- virtual void setEditText(const QString&);
+ virtual void setItems(const TQStringList& );
+ virtual void setEditText(const TQString&);
virtual void clear();
protected:
virtual void initComboBox(TKComboBox*);
protected slots:
- void slotActivated(const QString&);
+ void slotActivated(const TQString&);
signals:
- void activated(const QString&);
+ void activated(const TQString&);
private:
- QStringList m_list;
+ TQStringList m_list;
class TKSelectActionPrivate;
TKSelectActionPrivate *d;
};
diff --git a/lib/kofficeui/tkcoloractions.cpp b/lib/kofficeui/tkcoloractions.cpp
index 408599167..1f17efb67 100644
--- a/lib/kofficeui/tkcoloractions.cpp
+++ b/lib/kofficeui/tkcoloractions.cpp
@@ -22,18 +22,18 @@
#include "tkcoloractions.h"
#include "tktoolbarbutton.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kcolordialog.h>
#include <ktoolbar.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kdebug.h>
-#include <qapplication.h>
+#include <tqapplication.h>
-TKColorPopupMenu::TKColorPopupMenu( QWidget* parent, const char* name )
-: KPopupMenu(parent,name)
+TKColorPopupMenu::TKColorPopupMenu( TQWidget* tqparent, const char* name )
+: KPopupMenu(tqparent,name)
{
}
@@ -43,7 +43,7 @@ TKColorPopupMenu::~TKColorPopupMenu()
void TKColorPopupMenu::updateItemSize()
{
- styleChange(style());
+ styleChange(tqstyle());
}
/****************************************************************************************/
class TKSelectColorActionPrivate
@@ -53,32 +53,32 @@ public:
{
}
bool defaultColorMenu;
- QColor defaultColor;
+ TQColor defaultColor;
};
-TKSelectColorAction::TKSelectColorAction( const QString& text, Type type, QObject* parent, const char* name, bool menuDefaultColor )
-: TKAction(parent,name)
+TKSelectColorAction::TKSelectColorAction( const TQString& text, Type type, TQObject* tqparent, const char* name, bool menuDefaultColor )
+: TKAction(tqparent,name)
{
d=new TKSelectColorActionPrivate();
d->defaultColorMenu=menuDefaultColor;
- d->defaultColor=QColor();
+ d->defaultColor=TQColor();
setText(text);
m_type = type;
init();
}
-TKSelectColorAction::TKSelectColorAction( const QString& text, Type type,
- QObject* receiver, const char* slot,
- QObject* parent, const char* name, bool menuDefaultColor)
-: TKAction(parent,name)
+TKSelectColorAction::TKSelectColorAction( const TQString& text, Type type,
+ TQObject* receiver, const char* slot,
+ TQObject* tqparent, const char* name, bool menuDefaultColor)
+: TKAction(tqparent,name)
{
d=new TKSelectColorActionPrivate();
d->defaultColorMenu=menuDefaultColor;
- d->defaultColor=QColor();
+ d->defaultColor=TQColor();
setText(text);
m_type = type;
- connect( this, SIGNAL( activated() ), receiver, slot );
+ connect( this, TQT_SIGNAL( activated() ), receiver, slot );
init();
}
@@ -87,10 +87,10 @@ void TKSelectColorAction::init()
m_pStandardColor = new TKColorPanel();
m_pRecentColor = new TKColorPanel();
- connect(m_pStandardColor,SIGNAL(colorSelected(const QColor&)),SLOT(panelColorSelected(const QColor&)));
- connect(m_pStandardColor,SIGNAL(reject()),SLOT(panelReject()));
- connect(m_pRecentColor,SIGNAL(colorSelected(const QColor&)),SLOT(panelColorSelected(const QColor&)));
- connect(m_pRecentColor,SIGNAL(reject()),SLOT(panelReject()));
+ connect(m_pStandardColor,TQT_SIGNAL(colorSelected(const TQColor&)),TQT_SLOT(panelColorSelected(const TQColor&)));
+ connect(m_pStandardColor,TQT_SIGNAL(reject()),TQT_SLOT(panelReject()));
+ connect(m_pRecentColor,TQT_SIGNAL(colorSelected(const TQColor&)),TQT_SLOT(panelColorSelected(const TQColor&)));
+ connect(m_pRecentColor,TQT_SIGNAL(reject()),TQT_SLOT(panelReject()));
m_pRecentColor->clear();
@@ -102,17 +102,17 @@ void TKSelectColorAction::init()
switch (m_type) {
case TextColor:
- m_pMenu->insertItem(i18n("More Text Colors..."),this,SLOT(selectColorDialog()));
+ m_pMenu->insertItem(i18n("More Text Colors..."),this,TQT_SLOT(selectColorDialog()));
setCurrentColor(black);
setIcon("textcolor");
break;
case LineColor:
- m_pMenu->insertItem(i18n("More Line Colors..."),this,SLOT(selectColorDialog()));
+ m_pMenu->insertItem(i18n("More Line Colors..."),this,TQT_SLOT(selectColorDialog()));
setCurrentColor(black);
setIcon("color_line");
break;
case FillColor:
- m_pMenu->insertItem(i18n("More Fill Colors..."),this,SLOT(selectColorDialog()));
+ m_pMenu->insertItem(i18n("More Fill Colors..."),this,TQT_SLOT(selectColorDialog()));
setCurrentColor(white);
setIcon("color_fill");
break;
@@ -122,11 +122,11 @@ void TKSelectColorAction::init()
if(d->defaultColorMenu)
{
m_pMenu->insertSeparator();
- m_pMenu->insertItem(i18n("Default Color"),this,SLOT(defaultColor()));
+ m_pMenu->insertItem(i18n("Default Color"),this,TQT_SLOT(defaultColor()));
}
- connect(m_pStandardColor,SIGNAL(sizeChanged()),m_pMenu,SLOT(updateItemSize()));
- connect(m_pRecentColor,SIGNAL(sizeChanged()),m_pMenu,SLOT(updateItemSize()));
+ connect(m_pStandardColor,TQT_SIGNAL(sizeChanged()),m_pMenu,TQT_SLOT(updateItemSize()));
+ connect(m_pRecentColor,TQT_SIGNAL(sizeChanged()),m_pMenu,TQT_SLOT(updateItemSize()));
}
TKSelectColorAction::~TKSelectColorAction()
@@ -137,7 +137,7 @@ TKSelectColorAction::~TKSelectColorAction()
void TKSelectColorAction::initToolBarButton(TKToolBarButton* b)
{
- QWhatsThis::add( b, whatsThis() );
+ TQWhatsThis::add( b, whatsThis() );
TKAction::initToolBarButton(b);
b->setDelayedPopup( popupMenu() );
updatePixmap(b);
@@ -150,7 +150,7 @@ void TKSelectColorAction::defaultColor()
emit activated();
}
-void TKSelectColorAction::setDefaultColor(const QColor &_col)
+void TKSelectColorAction::setDefaultColor(const TQColor &_col)
{
d->defaultColor=_col;
}
@@ -158,29 +158,29 @@ void TKSelectColorAction::setDefaultColor(const QColor &_col)
void TKSelectColorAction::updatePixmap()
{
for( int id = 0; id < containerCount(); ++id ) {
- QWidget* w = container(id);
+ TQWidget* w = container(id);
if ( w->inherits("KToolBar") ) {
- QWidget* r = static_cast<KToolBar*>(w)->getWidget(itemId(id));
+ TQWidget* r = static_cast<KToolBar*>(w)->getWidget(itemId(id));
if ( r->inherits("TKToolBarButton") ) {
updatePixmap(static_cast<TKToolBarButton*>(r));
}
}
- else if(w->inherits("QPopupMenu") ) {
- QPixmap pix =iconSet(KIcon::Small).pixmap(QIconSet::Automatic,QIconSet::Active);
+ else if(w->inherits(TQPOPUPMENU_OBJECT_NAME_STRING) ) {
+ TQPixmap pix =iconSet(KIcon::Small).pixmap(TQIconSet::Automatic,TQIconSet::Active);
if ( pix.isNull() )
return;
- QPainter p(&pix);
+ TQPainter p(&pix);
switch (m_type) {
case TextColor:
- p.fillRect(QRect(0,12,16,5), m_pCurrentColor);
+ p.fillRect(TQRect(0,12,16,5), m_pCurrentColor);
break;
case LineColor:
- p.fillRect(QRect(0,13,16,5), m_pCurrentColor);
- p.fillRect(QRect(3,12,1,1), m_pCurrentColor);
+ p.fillRect(TQRect(0,13,16,5), m_pCurrentColor);
+ p.fillRect(TQRect(3,12,1,1), m_pCurrentColor);
break;
case FillColor:
- p.fillRect(QRect(0,13,16,5), m_pCurrentColor);
- p.fillRect(QRect(1,10,5,3), m_pCurrentColor);
+ p.fillRect(TQRect(0,13,16,5), m_pCurrentColor);
+ p.fillRect(TQRect(1,10,5,3), m_pCurrentColor);
break;
case Color:
break;
@@ -198,19 +198,19 @@ void TKSelectColorAction::updatePixmap(TKToolBarButton* b)
// Not much point in painting with an invalid color
if (!m_pCurrentColor.isValid())
return;
- QPixmap pix =b->getActivePixmap();
- QPainter p(&pix);
+ TQPixmap pix =b->getActivePixmap();
+ TQPainter p(&pix);
switch (m_type) {
case TextColor:
- p.fillRect(QRect(0,12,16,5), m_pCurrentColor);
+ p.fillRect(TQRect(0,12,16,5), m_pCurrentColor);
break;
case LineColor:
- p.fillRect(QRect(0,13,16,5), m_pCurrentColor);
- p.fillRect(QRect(3,12,1,1), m_pCurrentColor);
+ p.fillRect(TQRect(0,13,16,5), m_pCurrentColor);
+ p.fillRect(TQRect(3,12,1,1), m_pCurrentColor);
break;
case FillColor:
- p.fillRect(QRect(0,13,16,5), m_pCurrentColor);
- p.fillRect(QRect(1,10,5,3), m_pCurrentColor);
+ p.fillRect(TQRect(0,13,16,5), m_pCurrentColor);
+ p.fillRect(TQRect(1,10,5,3), m_pCurrentColor);
break;
case Color:
break;
@@ -219,7 +219,7 @@ void TKSelectColorAction::updatePixmap(TKToolBarButton* b)
b->setPixmap(pix);
}
-void TKSelectColorAction::setCurrentColor( const QColor& color )
+void TKSelectColorAction::setCurrentColor( const TQColor& color )
{
if ( color == m_pCurrentColor )
return;
@@ -229,18 +229,18 @@ void TKSelectColorAction::setCurrentColor( const QColor& color )
updatePixmap();
}
-void TKSelectColorAction::setActiveColor( const QColor& color )
+void TKSelectColorAction::setActiveColor( const TQColor& color )
{
m_pStandardColor->setActiveColor(color);
}
void TKSelectColorAction::selectColorDialog()
{
- QColor c = color();
+ TQColor c = color();
if ( d->defaultColorMenu )
{
- if ( KColorDialog::getColor(c,d->defaultColor, qApp->activeWindow()) == QDialog::Accepted )
+ if ( KColorDialog::getColor(c,d->defaultColor, TQT_TQWIDGET(tqApp->activeWindow())) == TQDialog::Accepted )
{
setCurrentColor(c);
m_pRecentColor->insertColor(m_pCurrentColor);
@@ -250,7 +250,7 @@ void TKSelectColorAction::selectColorDialog()
}
else
{
- if ( KColorDialog::getColor(c, qApp->activeWindow()) == QDialog::Accepted )
+ if ( KColorDialog::getColor(c, TQT_TQWIDGET(tqApp->activeWindow())) == TQDialog::Accepted )
{
setCurrentColor(c);
m_pRecentColor->insertColor(m_pCurrentColor);
@@ -272,7 +272,7 @@ void TKSelectColorAction::activate()
emit activated();
}
-void TKSelectColorAction::panelColorSelected( const QColor& color )
+void TKSelectColorAction::panelColorSelected( const TQColor& color )
{
m_pMenu->hide();
setCurrentColor(color);
@@ -297,8 +297,8 @@ public:
};
/****************************************************************************************/
-TKColorPanel::TKColorPanel( QWidget* parent, const char* name )
-: QWidget(parent,name)
+TKColorPanel::TKColorPanel( TQWidget* tqparent, const char* name )
+: TQWidget(tqparent,name)
{
d = new TKColorPanel::TKColorPanelPrivate();
m_activeColor = black;
@@ -315,7 +315,7 @@ void TKColorPanel::setNumCols( int col )
m_iWidth = col;
resetGrid();
- QDictIterator<TKColorPanelButton> it(m_pColorDict);
+ TQDictIterator<TKColorPanelButton> it(m_pColorDict);
while ( it.current() ) {
addToGrid(it.current());
++it;
@@ -333,7 +333,7 @@ void TKColorPanel::resetGrid()
m_iY = 0;
delete m_pLayout;
- m_pLayout = new QGridLayout(this,0,m_iWidth+1,0,0);
+ m_pLayout = new TQGridLayout(this,0,m_iWidth+1,0,0);
emit sizeChanged();
}
@@ -348,16 +348,16 @@ void TKColorPanel::clear()
resetGrid();
}
-void TKColorPanel::insertColor( const QColor& color, const QString& text )
+void TKColorPanel::insertColor( const TQColor& color, const TQString& text )
{
if (m_pColorDict[color.name()])
return;
insertColor(color);
- QToolTip::add(m_pColorDict[color.name()],text);
+ TQToolTip::add(m_pColorDict[color.name()],text);
}
-void TKColorPanel::insertColor( const QColor& color )
+void TKColorPanel::insertColor( const TQColor& color )
{
if (m_pColorDict[color.name()])
return;
@@ -368,7 +368,7 @@ void TKColorPanel::insertColor( const QColor& color )
if ( m_activeColor == color )
f->setActive(true);
- connect(f,SIGNAL(selected(const QColor&)),SLOT(selected(const QColor&)));
+ connect(f,TQT_SIGNAL(selected(const TQColor&)),TQT_SLOT(selected(const TQColor&)));
addToGrid(f);
}
@@ -385,7 +385,7 @@ void TKColorPanel::addToGrid( TKColorPanelButton* f )
emit sizeChanged();
}
-void TKColorPanel::setActiveColor( const QColor& color )
+void TKColorPanel::setActiveColor( const TQColor& color )
{
TKColorPanelButton* b = m_pColorDict[m_activeColor.name()];
if (b)
@@ -398,19 +398,19 @@ void TKColorPanel::setActiveColor( const QColor& color )
b->setActive(true);
}
-void TKColorPanel::mouseReleaseEvent( QMouseEvent* )
+void TKColorPanel::mouseReleaseEvent( TQMouseEvent* )
{
reject();
}
-void TKColorPanel::showEvent( QShowEvent *e )
+void TKColorPanel::showEvent( TQShowEvent *e )
{
if ( !d->panelCreated )
fillPanel();
- QWidget::showEvent(e);
+ TQWidget::showEvent(e);
}
-void TKColorPanel::selected( const QColor& color )
+void TKColorPanel::selected( const TQColor& color )
{
emit colorSelected(color);
}
@@ -421,161 +421,161 @@ void TKColorPanel::fillPanel()
blockSignals(true); // don't emit sizeChanged() all the time
// ### TODO: names without space (e.g. red) are lower case in rgb.txt
- insertColor(QColor( 255, 0, 0 ), i18n( "color", "Red"));
- insertColor(QColor( 255, 165, 0 ), i18n( "color", "Orange"));
- insertColor(QColor( 255, 0, 255 ), i18n( "color", "Magenta"));
- insertColor(QColor( 0, 0, 255 ), i18n( "color", "Blue"));
- insertColor(QColor( 0, 255, 255 ), i18n( "color", "Cyan"));
- insertColor(QColor( 0, 255, 0 ), i18n( "color", "Green"));
- insertColor(QColor( 255, 255, 0 ), i18n( "color", "Yellow"));
- insertColor(QColor( 165, 42, 42 ), i18n( "color", "Brown"));
- insertColor(QColor( 139, 0, 0 ), i18n( "color", "DarkRed"));
- insertColor(QColor( 255, 140, 0 ), i18n( "color", "DarkOrange"));
- insertColor(QColor( 139, 0, 139 ), i18n( "color", "DarkMagenta"));
- insertColor(QColor( 0, 0, 139 ), i18n( "color", "DarkBlue"));
- insertColor(QColor( 0, 139, 139 ), i18n( "color", "DarkCyan"));
- insertColor(QColor( 0, 100, 0 ), i18n( "color", "DarkGreen"));
- insertColor(QColor( 130, 127, 0 ), i18n( "color", "DarkYellow")); // ### not in rgb.txt
-
- insertColor(QColor( 255, 255, 255 ), i18n( "color", "White"));
- insertColor(QColor( 229, 229, 229 ), i18n( "color", "Gray 90%")); // ### not in rgb.txt
- insertColor(QColor( 204, 204, 204 ), i18n( "color", "Gray 80%")); // ### not in rgb.txt
- insertColor(QColor( 178, 178, 178 ), i18n( "color", "Gray 70%")); // ### not in rgb.txt
- insertColor(QColor( 153, 153, 153 ), i18n( "color", "Gray 60%")); // ### not in rgb.txt
- insertColor(QColor( 127, 127, 127 ), i18n( "color", "Gray 50%")); // ### not in rgb.txt
- insertColor(QColor( 102, 102, 102 ), i18n( "color", "Gray 40%")); // ### not in rgb.txt
- insertColor(QColor( 76, 76, 76 ), i18n( "color", "Gray 30%")); // ### not in rgb.txt
- insertColor(QColor( 51, 51, 51 ), i18n( "color", "Gray 20%")); // ### not in rgb.txt
- insertColor(QColor( 25, 25, 25 ), i18n( "color", "Gray 10%")); // ### not in rgb.txt
- insertColor(QColor( 0, 0, 0 ), i18n( "color", "Black"));
-
- insertColor(QColor( 255, 255, 240 ), i18n( "color", "Ivory"));
- insertColor(QColor( 255, 250, 250 ), i18n( "color", "Snow"));
- insertColor(QColor( 245, 255, 250 ), i18n( "color", "MintCream"));
- insertColor(QColor( 255, 250, 240 ), i18n( "color", "FloralWhite"));
- insertColor(QColor( 255, 255, 224 ), i18n( "color", "LightYellow"));
- insertColor(QColor( 240, 255, 255 ), i18n( "color", "Azure"));
- insertColor(QColor( 248, 248, 255 ), i18n( "color", "GhostWhite"));
- insertColor(QColor( 240, 255, 240 ), i18n( "color", "Honeydew"));
- insertColor(QColor( 255, 245, 238 ), i18n( "color", "Seashell"));
- insertColor(QColor( 240, 248, 255 ), i18n( "color", "AliceBlue"));
- insertColor(QColor( 255, 248, 220 ), i18n( "color", "Cornsilk"));
- insertColor(QColor( 255, 240, 245 ), i18n( "color", "LavenderBlush"));
- insertColor(QColor( 253, 245, 230 ), i18n( "color", "OldLace"));
- insertColor(QColor( 245, 245, 245 ), i18n( "color", "WhiteSmoke"));
- insertColor(QColor( 255, 250, 205 ), i18n( "color", "LemonChiffon"));
- insertColor(QColor( 224, 255, 255 ), i18n( "color", "LightCyan"));
- insertColor(QColor( 250, 250, 210 ), i18n( "color", "LightGoldenrodYellow"));
- insertColor(QColor( 250, 240, 230 ), i18n( "color", "Linen"));
- insertColor(QColor( 245, 245, 220 ), i18n( "color", "Beige"));
- insertColor(QColor( 255, 239, 213 ), i18n( "color", "PapayaWhip"));
- insertColor(QColor( 255, 235, 205 ), i18n( "color", "BlanchedAlmond"));
- insertColor(QColor( 250, 235, 215 ), i18n( "color", "AntiqueWhite"));
- insertColor(QColor( 255, 228, 225 ), i18n( "color", "MistyRose"));
- insertColor(QColor( 230, 230, 250 ), i18n( "color", "Lavender"));
- insertColor(QColor( 255, 228, 196 ), i18n( "color", "Bisque"));
- insertColor(QColor( 255, 228, 181 ), i18n( "color", "Moccasin"));
- insertColor(QColor( 255, 222, 173 ), i18n( "color", "NavajoWhite"));
- insertColor(QColor( 255, 218, 185 ), i18n( "color", "PeachPuff"));
- insertColor(QColor( 238, 232, 170 ), i18n( "color", "PaleGoldenrod"));
- insertColor(QColor( 245, 222, 179 ), i18n( "color", "Wheat"));
- insertColor(QColor( 220, 220, 220 ), i18n( "color", "Gainsboro"));
- insertColor(QColor( 240, 230, 140 ), i18n( "color", "Khaki"));
- insertColor(QColor( 175, 238, 238 ), i18n( "color", "PaleTurquoise"));
- insertColor(QColor( 255, 192, 203 ), i18n( "color", "Pink"));
- insertColor(QColor( 238, 221, 130 ), i18n( "color", "LightGoldenrod"));
- insertColor(QColor( 211, 211, 211 ), i18n( "color", "LightGray"));
- insertColor(QColor( 255, 182, 193 ), i18n( "color", "LightPink"));
- insertColor(QColor( 176, 224, 230 ), i18n( "color", "PowderBlue"));
- insertColor(QColor( 127, 255, 212 ), i18n( "color", "Aquamarine"));
- insertColor(QColor( 216, 191, 216 ), i18n( "color", "Thistle"));
- insertColor(QColor( 173, 216, 230 ), i18n( "color", "LightBlue"));
- insertColor(QColor( 152, 251, 152 ), i18n( "color", "PaleGreen"));
- insertColor(QColor( 255, 215, 0 ), i18n( "color", "Gold"));
- insertColor(QColor( 173, 255, 47 ), i18n( "color", "GreenYellow"));
- insertColor(QColor( 176, 196, 222 ), i18n( "color", "LightSteelBlue"));
- insertColor(QColor( 144, 238, 144 ), i18n( "color", "LightGreen"));
- insertColor(QColor( 221, 160, 221 ), i18n( "color", "Plum"));
- insertColor(QColor( 190, 190, 190 ), i18n( "color", "Gray"));
- insertColor(QColor( 222, 184, 135 ), i18n( "color", "BurlyWood"));
- insertColor(QColor( 135, 206, 250 ), i18n( "color", "LightSkyblue"));
- insertColor(QColor( 255, 160, 122 ), i18n( "color", "LightSalmon"));
- insertColor(QColor( 135, 206, 235 ), i18n( "color", "SkyBlue"));
- insertColor(QColor( 210, 180, 140 ), i18n( "color", "Tan"));
- insertColor(QColor( 238, 130, 238 ), i18n( "color", "Violet"));
- insertColor(QColor( 244, 164, 96 ), i18n( "color", "SandyBrown"));
- insertColor(QColor( 233, 150, 122 ), i18n( "color", "DarkSalmon"));
- insertColor(QColor( 189, 183, 107 ), i18n( "color", "DarkKhaki"));
- insertColor(QColor( 127, 255, 0 ), i18n( "color", "Chartreuse"));
- insertColor(QColor( 169, 169, 169 ), i18n( "color", "DarkGray"));
- insertColor(QColor( 124, 252, 0 ), i18n( "color", "LawnGreen"));
- insertColor(QColor( 255, 105, 180 ), i18n( "color", "HotPink"));
- insertColor(QColor( 250, 128, 114 ), i18n( "color", "Salmon"));
- insertColor(QColor( 240, 128, 128 ), i18n( "color", "LightCoral"));
- insertColor(QColor( 64, 224, 208 ), i18n( "color", "Turquoise"));
- insertColor(QColor( 143, 188, 143 ), i18n( "color", "DarkSeagreen"));
- insertColor(QColor( 218, 112, 214 ), i18n( "color", "Orchid"));
- insertColor(QColor( 102, 205, 170 ), i18n( "color", "MediumAquamarine"));
- insertColor(QColor( 255, 127, 80 ), i18n( "color", "Coral"));
- insertColor(QColor( 154, 205, 50 ), i18n( "color", "YellowGreen"));
- insertColor(QColor( 218, 165, 32 ), i18n( "color", "Goldenrod"));
- insertColor(QColor( 72, 209, 204 ), i18n( "color", "MediumTurquoise"));
- insertColor(QColor( 188, 143, 143 ), i18n( "color", "RosyBrown"));
- insertColor(QColor( 219, 112, 147 ), i18n( "color", "PaleVioletRed"));
- insertColor(QColor( 0, 250, 154 ), i18n( "color", "MediumSpringGreen"));
- insertColor(QColor( 255, 99, 71 ), i18n( "color", "Tomato"));
- insertColor(QColor( 0, 255, 127 ), i18n( "color", "SpringGreen"));
- insertColor(QColor( 205, 133, 63 ), i18n( "color", "Peru"));
- insertColor(QColor( 100, 149, 237 ), i18n( "color", "CornflowerBlue"));
- insertColor(QColor( 132, 112, 255 ), i18n( "color", "LightSlateBlue"));
- insertColor(QColor( 147, 112, 219 ), i18n( "color", "MediumPurple"));
- insertColor(QColor( 186, 85, 211 ), i18n( "color", "MediumOrchid"));
- insertColor(QColor( 95, 158, 160 ), i18n( "color", "CadetBlue"));
- insertColor(QColor( 0, 206, 209 ), i18n( "color", "DarkTurquoise"));
- insertColor(QColor( 0, 191, 255 ), i18n( "color", "DeepSkyblue"));
- insertColor(QColor( 119, 136, 153 ), i18n( "color", "LightSlateGray"));
- insertColor(QColor( 184, 134, 11 ), i18n( "color", "DarkGoldenrod"));
- insertColor(QColor( 123, 104, 238 ), i18n( "color", "MediumSlateBlue"));
- insertColor(QColor( 205, 92, 92 ), i18n( "color", "IndianRed"));
- insertColor(QColor( 210, 105, 30 ), i18n( "color", "Chocolate"));
- insertColor(QColor( 60, 179, 113 ), i18n( "color", "MediumSeaGreen"));
- insertColor(QColor( 50, 205, 50 ), i18n( "color", "LimeGreen"));
- insertColor(QColor( 32, 178, 170 ), i18n( "color", "LightSeaGreen"));
- insertColor(QColor( 112, 128, 144 ), i18n( "color", "SlateGray"));
- insertColor(QColor( 30, 144, 255 ), i18n( "color", "DodgerBlue"));
- insertColor(QColor( 255, 69, 0 ), i18n( "color", "OrangeRed"));
- insertColor(QColor( 255, 20, 147 ), i18n( "color", "DeepPink"));
- insertColor(QColor( 70, 130, 180 ), i18n( "color", "SteelBlue"));
- insertColor(QColor( 106, 90, 205 ), i18n( "color", "SlateBlue"));
- insertColor(QColor( 107, 142, 35 ), i18n( "color", "OliveDrab"));
- insertColor(QColor( 65, 105, 225 ), i18n( "color", "RoyalBlue"));
- insertColor(QColor( 208, 32, 144 ), i18n( "color", "VioletRed"));
- insertColor(QColor( 153, 50, 204 ), i18n( "color", "DarkOrchid"));
- insertColor(QColor( 160, 32, 240 ), i18n( "color", "Purple"));
- insertColor(QColor( 105, 105, 105 ), i18n( "color", "DimGray"));
- insertColor(QColor( 138, 43, 226 ), i18n( "color", "BlueViolet"));
- insertColor(QColor( 160, 82, 45 ), i18n( "color", "Sienna"));
- insertColor(QColor( 199, 21, 133 ), i18n( "color", "MediumVioletRed"));
- insertColor(QColor( 176, 48, 96 ), i18n( "color", "Maroon"));
- insertColor(QColor( 46, 139, 87 ), i18n( "color", "SeaGreen"));
- insertColor(QColor( 85, 107, 47 ), i18n( "color", "DarkOliveGreen"));
- insertColor(QColor( 34, 139, 34 ), i18n( "color", "ForestGreen"));
- insertColor(QColor( 139, 69, 19 ), i18n( "color", "SaddleBrown"));
- insertColor(QColor( 148, 0, 211 ), i18n( "color", "DarkViolet"));
- insertColor(QColor( 178, 34, 34 ), i18n( "color", "FireBrick"));
- insertColor(QColor( 72, 61, 139 ), i18n( "color", "DarkSlateBlue"));
- insertColor(QColor( 47, 79, 79 ), i18n( "color", "DarkSlateGray"));
- insertColor(QColor( 25, 25, 112 ), i18n( "color", "MidnightBlue"));
- insertColor(QColor( 0, 0, 205 ), i18n( "color", "MediumBlue"));
- insertColor(QColor( 0, 0, 128 ), i18n( "color", "Navy"));
+ insertColor(TQColor( 255, 0, 0 ), i18n( "color", "Red"));
+ insertColor(TQColor( 255, 165, 0 ), i18n( "color", "Orange"));
+ insertColor(TQColor( 255, 0, 255 ), i18n( "color", "Magenta"));
+ insertColor(TQColor( 0, 0, 255 ), i18n( "color", "Blue"));
+ insertColor(TQColor( 0, 255, 255 ), i18n( "color", "Cyan"));
+ insertColor(TQColor( 0, 255, 0 ), i18n( "color", "Green"));
+ insertColor(TQColor( 255, 255, 0 ), i18n( "color", "Yellow"));
+ insertColor(TQColor( 165, 42, 42 ), i18n( "color", "Brown"));
+ insertColor(TQColor( 139, 0, 0 ), i18n( "color", "DarkRed"));
+ insertColor(TQColor( 255, 140, 0 ), i18n( "color", "DarkOrange"));
+ insertColor(TQColor( 139, 0, 139 ), i18n( "color", "DarkMagenta"));
+ insertColor(TQColor( 0, 0, 139 ), i18n( "color", "DarkBlue"));
+ insertColor(TQColor( 0, 139, 139 ), i18n( "color", "DarkCyan"));
+ insertColor(TQColor( 0, 100, 0 ), i18n( "color", "DarkGreen"));
+ insertColor(TQColor( 130, 127, 0 ), i18n( "color", "DarkYellow")); // ### not in rgb.txt
+
+ insertColor(TQColor( 255, 255, 255 ), i18n( "color", "White"));
+ insertColor(TQColor( 229, 229, 229 ), i18n( "color", "Gray 90%")); // ### not in rgb.txt
+ insertColor(TQColor( 204, 204, 204 ), i18n( "color", "Gray 80%")); // ### not in rgb.txt
+ insertColor(TQColor( 178, 178, 178 ), i18n( "color", "Gray 70%")); // ### not in rgb.txt
+ insertColor(TQColor( 153, 153, 153 ), i18n( "color", "Gray 60%")); // ### not in rgb.txt
+ insertColor(TQColor( 127, 127, 127 ), i18n( "color", "Gray 50%")); // ### not in rgb.txt
+ insertColor(TQColor( 102, 102, 102 ), i18n( "color", "Gray 40%")); // ### not in rgb.txt
+ insertColor(TQColor( 76, 76, 76 ), i18n( "color", "Gray 30%")); // ### not in rgb.txt
+ insertColor(TQColor( 51, 51, 51 ), i18n( "color", "Gray 20%")); // ### not in rgb.txt
+ insertColor(TQColor( 25, 25, 25 ), i18n( "color", "Gray 10%")); // ### not in rgb.txt
+ insertColor(TQColor( 0, 0, 0 ), i18n( "color", "Black"));
+
+ insertColor(TQColor( 255, 255, 240 ), i18n( "color", "Ivory"));
+ insertColor(TQColor( 255, 250, 250 ), i18n( "color", "Snow"));
+ insertColor(TQColor( 245, 255, 250 ), i18n( "color", "MintCream"));
+ insertColor(TQColor( 255, 250, 240 ), i18n( "color", "FloralWhite"));
+ insertColor(TQColor( 255, 255, 224 ), i18n( "color", "LightYellow"));
+ insertColor(TQColor( 240, 255, 255 ), i18n( "color", "Azure"));
+ insertColor(TQColor( 248, 248, 255 ), i18n( "color", "GhostWhite"));
+ insertColor(TQColor( 240, 255, 240 ), i18n( "color", "Honeydew"));
+ insertColor(TQColor( 255, 245, 238 ), i18n( "color", "Seashell"));
+ insertColor(TQColor( 240, 248, 255 ), i18n( "color", "AliceBlue"));
+ insertColor(TQColor( 255, 248, 220 ), i18n( "color", "Cornsilk"));
+ insertColor(TQColor( 255, 240, 245 ), i18n( "color", "LavenderBlush"));
+ insertColor(TQColor( 253, 245, 230 ), i18n( "color", "OldLace"));
+ insertColor(TQColor( 245, 245, 245 ), i18n( "color", "WhiteSmoke"));
+ insertColor(TQColor( 255, 250, 205 ), i18n( "color", "LemonChiffon"));
+ insertColor(TQColor( 224, 255, 255 ), i18n( "color", "LightCyan"));
+ insertColor(TQColor( 250, 250, 210 ), i18n( "color", "LightGoldenrodYellow"));
+ insertColor(TQColor( 250, 240, 230 ), i18n( "color", "Linen"));
+ insertColor(TQColor( 245, 245, 220 ), i18n( "color", "Beige"));
+ insertColor(TQColor( 255, 239, 213 ), i18n( "color", "PapayaWhip"));
+ insertColor(TQColor( 255, 235, 205 ), i18n( "color", "BlanchedAlmond"));
+ insertColor(TQColor( 250, 235, 215 ), i18n( "color", "AntiqueWhite"));
+ insertColor(TQColor( 255, 228, 225 ), i18n( "color", "MistyRose"));
+ insertColor(TQColor( 230, 230, 250 ), i18n( "color", "Lavender"));
+ insertColor(TQColor( 255, 228, 196 ), i18n( "color", "Bisque"));
+ insertColor(TQColor( 255, 228, 181 ), i18n( "color", "Moccasin"));
+ insertColor(TQColor( 255, 222, 173 ), i18n( "color", "NavajoWhite"));
+ insertColor(TQColor( 255, 218, 185 ), i18n( "color", "PeachPuff"));
+ insertColor(TQColor( 238, 232, 170 ), i18n( "color", "PaleGoldenrod"));
+ insertColor(TQColor( 245, 222, 179 ), i18n( "color", "Wheat"));
+ insertColor(TQColor( 220, 220, 220 ), i18n( "color", "Gainsboro"));
+ insertColor(TQColor( 240, 230, 140 ), i18n( "color", "Khaki"));
+ insertColor(TQColor( 175, 238, 238 ), i18n( "color", "PaleTurquoise"));
+ insertColor(TQColor( 255, 192, 203 ), i18n( "color", "Pink"));
+ insertColor(TQColor( 238, 221, 130 ), i18n( "color", "LightGoldenrod"));
+ insertColor(TQColor( 211, 211, 211 ), i18n( "color", "LightGray"));
+ insertColor(TQColor( 255, 182, 193 ), i18n( "color", "LightPink"));
+ insertColor(TQColor( 176, 224, 230 ), i18n( "color", "PowderBlue"));
+ insertColor(TQColor( 127, 255, 212 ), i18n( "color", "Aquamarine"));
+ insertColor(TQColor( 216, 191, 216 ), i18n( "color", "Thistle"));
+ insertColor(TQColor( 173, 216, 230 ), i18n( "color", "LightBlue"));
+ insertColor(TQColor( 152, 251, 152 ), i18n( "color", "PaleGreen"));
+ insertColor(TQColor( 255, 215, 0 ), i18n( "color", "Gold"));
+ insertColor(TQColor( 173, 255, 47 ), i18n( "color", "GreenYellow"));
+ insertColor(TQColor( 176, 196, 222 ), i18n( "color", "LightSteelBlue"));
+ insertColor(TQColor( 144, 238, 144 ), i18n( "color", "LightGreen"));
+ insertColor(TQColor( 221, 160, 221 ), i18n( "color", "Plum"));
+ insertColor(TQColor( 190, 190, 190 ), i18n( "color", "Gray"));
+ insertColor(TQColor( 222, 184, 135 ), i18n( "color", "BurlyWood"));
+ insertColor(TQColor( 135, 206, 250 ), i18n( "color", "LightSkyblue"));
+ insertColor(TQColor( 255, 160, 122 ), i18n( "color", "LightSalmon"));
+ insertColor(TQColor( 135, 206, 235 ), i18n( "color", "SkyBlue"));
+ insertColor(TQColor( 210, 180, 140 ), i18n( "color", "Tan"));
+ insertColor(TQColor( 238, 130, 238 ), i18n( "color", "Violet"));
+ insertColor(TQColor( 244, 164, 96 ), i18n( "color", "SandyBrown"));
+ insertColor(TQColor( 233, 150, 122 ), i18n( "color", "DarkSalmon"));
+ insertColor(TQColor( 189, 183, 107 ), i18n( "color", "DarkKhaki"));
+ insertColor(TQColor( 127, 255, 0 ), i18n( "color", "Chartreuse"));
+ insertColor(TQColor( 169, 169, 169 ), i18n( "color", "DarkGray"));
+ insertColor(TQColor( 124, 252, 0 ), i18n( "color", "LawnGreen"));
+ insertColor(TQColor( 255, 105, 180 ), i18n( "color", "HotPink"));
+ insertColor(TQColor( 250, 128, 114 ), i18n( "color", "Salmon"));
+ insertColor(TQColor( 240, 128, 128 ), i18n( "color", "LightCoral"));
+ insertColor(TQColor( 64, 224, 208 ), i18n( "color", "Turquoise"));
+ insertColor(TQColor( 143, 188, 143 ), i18n( "color", "DarkSeagreen"));
+ insertColor(TQColor( 218, 112, 214 ), i18n( "color", "Orchid"));
+ insertColor(TQColor( 102, 205, 170 ), i18n( "color", "MediumAquamarine"));
+ insertColor(TQColor( 255, 127, 80 ), i18n( "color", "Coral"));
+ insertColor(TQColor( 154, 205, 50 ), i18n( "color", "YellowGreen"));
+ insertColor(TQColor( 218, 165, 32 ), i18n( "color", "Goldenrod"));
+ insertColor(TQColor( 72, 209, 204 ), i18n( "color", "MediumTurquoise"));
+ insertColor(TQColor( 188, 143, 143 ), i18n( "color", "RosyBrown"));
+ insertColor(TQColor( 219, 112, 147 ), i18n( "color", "PaleVioletRed"));
+ insertColor(TQColor( 0, 250, 154 ), i18n( "color", "MediumSpringGreen"));
+ insertColor(TQColor( 255, 99, 71 ), i18n( "color", "Tomato"));
+ insertColor(TQColor( 0, 255, 127 ), i18n( "color", "SpringGreen"));
+ insertColor(TQColor( 205, 133, 63 ), i18n( "color", "Peru"));
+ insertColor(TQColor( 100, 149, 237 ), i18n( "color", "CornflowerBlue"));
+ insertColor(TQColor( 132, 112, 255 ), i18n( "color", "LightSlateBlue"));
+ insertColor(TQColor( 147, 112, 219 ), i18n( "color", "MediumPurple"));
+ insertColor(TQColor( 186, 85, 211 ), i18n( "color", "MediumOrchid"));
+ insertColor(TQColor( 95, 158, 160 ), i18n( "color", "CadetBlue"));
+ insertColor(TQColor( 0, 206, 209 ), i18n( "color", "DarkTurquoise"));
+ insertColor(TQColor( 0, 191, 255 ), i18n( "color", "DeepSkyblue"));
+ insertColor(TQColor( 119, 136, 153 ), i18n( "color", "LightSlateGray"));
+ insertColor(TQColor( 184, 134, 11 ), i18n( "color", "DarkGoldenrod"));
+ insertColor(TQColor( 123, 104, 238 ), i18n( "color", "MediumSlateBlue"));
+ insertColor(TQColor( 205, 92, 92 ), i18n( "color", "IndianRed"));
+ insertColor(TQColor( 210, 105, 30 ), i18n( "color", "Chocolate"));
+ insertColor(TQColor( 60, 179, 113 ), i18n( "color", "MediumSeaGreen"));
+ insertColor(TQColor( 50, 205, 50 ), i18n( "color", "LimeGreen"));
+ insertColor(TQColor( 32, 178, 170 ), i18n( "color", "LightSeaGreen"));
+ insertColor(TQColor( 112, 128, 144 ), i18n( "color", "SlateGray"));
+ insertColor(TQColor( 30, 144, 255 ), i18n( "color", "DodgerBlue"));
+ insertColor(TQColor( 255, 69, 0 ), i18n( "color", "OrangeRed"));
+ insertColor(TQColor( 255, 20, 147 ), i18n( "color", "DeepPink"));
+ insertColor(TQColor( 70, 130, 180 ), i18n( "color", "SteelBlue"));
+ insertColor(TQColor( 106, 90, 205 ), i18n( "color", "SlateBlue"));
+ insertColor(TQColor( 107, 142, 35 ), i18n( "color", "OliveDrab"));
+ insertColor(TQColor( 65, 105, 225 ), i18n( "color", "RoyalBlue"));
+ insertColor(TQColor( 208, 32, 144 ), i18n( "color", "VioletRed"));
+ insertColor(TQColor( 153, 50, 204 ), i18n( "color", "DarkOrchid"));
+ insertColor(TQColor( 160, 32, 240 ), i18n( "color", "Purple"));
+ insertColor(TQColor( 105, 105, 105 ), i18n( "color", "DimGray"));
+ insertColor(TQColor( 138, 43, 226 ), i18n( "color", "BlueViolet"));
+ insertColor(TQColor( 160, 82, 45 ), i18n( "color", "Sienna"));
+ insertColor(TQColor( 199, 21, 133 ), i18n( "color", "MediumVioletRed"));
+ insertColor(TQColor( 176, 48, 96 ), i18n( "color", "Maroon"));
+ insertColor(TQColor( 46, 139, 87 ), i18n( "color", "SeaGreen"));
+ insertColor(TQColor( 85, 107, 47 ), i18n( "color", "DarkOliveGreen"));
+ insertColor(TQColor( 34, 139, 34 ), i18n( "color", "ForestGreen"));
+ insertColor(TQColor( 139, 69, 19 ), i18n( "color", "SaddleBrown"));
+ insertColor(TQColor( 148, 0, 211 ), i18n( "color", "DarkViolet"));
+ insertColor(TQColor( 178, 34, 34 ), i18n( "color", "FireBrick"));
+ insertColor(TQColor( 72, 61, 139 ), i18n( "color", "DarkSlateBlue"));
+ insertColor(TQColor( 47, 79, 79 ), i18n( "color", "DarkSlateGray"));
+ insertColor(TQColor( 25, 25, 112 ), i18n( "color", "MidnightBlue"));
+ insertColor(TQColor( 0, 0, 205 ), i18n( "color", "MediumBlue"));
+ insertColor(TQColor( 0, 0, 128 ), i18n( "color", "Navy"));
blockSignals(false); // Signals allowed again
emit sizeChanged(); // one call should be enough ;)
}
/****************************************************************************************/
-TKColorPanelButton::TKColorPanelButton( const QColor& color, QWidget* parent, const char* name )
-: QFrame(parent,name), m_Color(color), m_bActive(false)
+TKColorPanelButton::TKColorPanelButton( const TQColor& color, TQWidget* tqparent, const char* name )
+: TQFrame(tqparent,name), m_Color(color), m_bActive(false)
{
setFixedSize(16,16);
setFrameStyle( NoFrame );
@@ -585,23 +585,23 @@ TKColorPanelButton::~TKColorPanelButton()
{
}
-void TKColorPanelButton::enterEvent( QEvent* )
+void TKColorPanelButton::enterEvent( TQEvent* )
{
if (!m_bActive)
setFrameStyle( Panel | Sunken );
}
-void TKColorPanelButton::leaveEvent( QEvent* )
+void TKColorPanelButton::leaveEvent( TQEvent* )
{
if (!m_bActive)
setFrameStyle( NoFrame );
}
-void TKColorPanelButton::paintEvent( QPaintEvent* ev )
+void TKColorPanelButton::paintEvent( TQPaintEvent* ev )
{
- QFrame::paintEvent(ev);
+ TQFrame::paintEvent(ev);
- QPainter p(this,this);
+ TQPainter p(this,this);
p.fillRect(2,2,12,12,m_Color);
p.setPen(gray);
p.drawRect(2,2,12,12);
@@ -614,7 +614,7 @@ void TKColorPanelButton::setActive( bool f )
setFrameStyle( m_bActive ? Panel | Sunken : NoFrame );
}
-void TKColorPanelButton::mouseReleaseEvent( QMouseEvent* )
+void TKColorPanelButton::mouseReleaseEvent( TQMouseEvent* )
{
emit selected(m_Color);
}
diff --git a/lib/kofficeui/tkcoloractions.h b/lib/kofficeui/tkcoloractions.h
index 0d8179a1c..0c5ccb1ab 100644
--- a/lib/kofficeui/tkcoloractions.h
+++ b/lib/kofficeui/tkcoloractions.h
@@ -24,16 +24,17 @@
#include "tkaction.h"
#include <koffice_export.h>
#include <kpopupmenu.h>
-#include <qdict.h>
+#include <tqdict.h>
-class QGridLayout;
+class TQGridLayout;
class TKColorPanel;
class TKSelectColorActionPrivate;
class TKColorPopupMenu : public KPopupMenu
{ Q_OBJECT
+ TQ_OBJECT
public:
- TKColorPopupMenu( QWidget* parent = 0, const char* name = 0 );
+ TKColorPopupMenu( TQWidget* tqparent = 0, const char* name = 0 );
~TKColorPopupMenu();
public slots:
@@ -42,6 +43,7 @@ public slots:
/****************************************************************************************/
class KOFFICEUI_EXPORT TKSelectColorAction : public TKAction
{ Q_OBJECT
+ TQ_OBJECT
public:
enum Type {
TextColor,
@@ -50,30 +52,30 @@ public:
Color
};
- TKSelectColorAction( const QString& text, Type type, QObject* parent, const char* name, bool menuDefaultColor=false);
- TKSelectColorAction( const QString& text, Type type,
- QObject* receiver, const char* slot,
- QObject* parent, const char* name,bool menuDefaultColor=false );
+ TKSelectColorAction( const TQString& text, Type type, TQObject* tqparent, const char* name, bool menuDefaultColor=false);
+ TKSelectColorAction( const TQString& text, Type type,
+ TQObject* receiver, const char* slot,
+ TQObject* tqparent, const char* name,bool menuDefaultColor=false );
virtual ~TKSelectColorAction();
- QColor color() const { return m_pCurrentColor; }
+ TQColor color() const { return m_pCurrentColor; }
KPopupMenu* popupMenu() const { return m_pMenu; }
- void setDefaultColor(const QColor &_col);
+ void setDefaultColor(const TQColor &_col);
public slots:
- void setCurrentColor( const QColor& );
- void setActiveColor( const QColor& );
+ void setCurrentColor( const TQColor& );
+ void setActiveColor( const TQColor& );
virtual void activate();
signals:
- void colorSelected( const QColor& );
+ void colorSelected( const TQColor& );
protected slots:
void selectColorDialog();
- void panelColorSelected( const QColor& );
+ void panelColorSelected( const TQColor& );
void panelReject();
virtual void slotActivated();
void defaultColor();
@@ -90,32 +92,33 @@ protected:
TKColorPanel* m_pRecentColor;
int m_type;
- QColor m_pCurrentColor;
+ TQColor m_pCurrentColor;
private:
TKSelectColorActionPrivate *d;
};
/****************************************************************************************/
-class TKColorPanelButton : public QFrame
+class TKColorPanelButton : public TQFrame
{ Q_OBJECT
+ TQ_OBJECT
public:
- TKColorPanelButton( const QColor&, QWidget* parent, const char* name = 0 );
+ TKColorPanelButton( const TQColor&, TQWidget* tqparent, const char* name = 0 );
~TKColorPanelButton();
void setActive( bool );
- QColor panelColor() const { return m_Color; }
+ TQColor panelColor() const { return m_Color; }
signals:
- void selected( const QColor& );
+ void selected( const TQColor& );
protected:
- virtual void paintEvent( QPaintEvent* );
- virtual void enterEvent( QEvent* );
- virtual void leaveEvent( QEvent* );
- virtual void mouseReleaseEvent( QMouseEvent* );
+ virtual void paintEvent( TQPaintEvent* );
+ virtual void enterEvent( TQEvent* );
+ virtual void leaveEvent( TQEvent* );
+ virtual void mouseReleaseEvent( TQMouseEvent* );
- QColor m_Color;
+ TQColor m_Color;
bool m_bActive;
private:
@@ -123,24 +126,25 @@ private:
TKColorPanelButtonPrivate *d;
};
/****************************************************************************************/
-class TKColorPanel : public QWidget
+class TKColorPanel : public TQWidget
{ Q_OBJECT
+ TQ_OBJECT
public:
- TKColorPanel( QWidget* parent = 0L, const char* name = 0 );
+ TKColorPanel( TQWidget* tqparent = 0L, const char* name = 0 );
~TKColorPanel();
- void setActiveColor( const QColor& );
+ void setActiveColor( const TQColor& );
void setNumCols( int col );
void clear();
public slots:
- void insertColor( const QColor& );
- void insertColor( const QColor&, const QString& );
- void selected( const QColor& );
+ void insertColor( const TQColor& );
+ void insertColor( const TQColor&, const TQString& );
+ void selected( const TQColor& );
signals:
- void colorSelected( const QColor& );
+ void colorSelected( const TQColor& );
void reject();
void sizeChanged();
@@ -148,16 +152,16 @@ protected:
void addToGrid( TKColorPanelButton* );
void resetGrid();
- virtual void mouseReleaseEvent( QMouseEvent* );
- virtual void showEvent( QShowEvent *e );
+ virtual void mouseReleaseEvent( TQMouseEvent* );
+ virtual void showEvent( TQShowEvent *e );
- QGridLayout* m_pLayout;
+ TQGridLayout* m_pLayout;
int m_iWidth;
int m_iX;
int m_iY;
- QColor m_activeColor;
- QDict<TKColorPanelButton> m_pColorDict;
+ TQColor m_activeColor;
+ TQDict<TKColorPanelButton> m_pColorDict;
private:
void fillPanel();
diff --git a/lib/kofficeui/tkcombobox.cpp b/lib/kofficeui/tkcombobox.cpp
index 525afb444..903f394e6 100644
--- a/lib/kofficeui/tkcombobox.cpp
+++ b/lib/kofficeui/tkcombobox.cpp
@@ -19,21 +19,21 @@
*/
#include "tkcombobox.h"
-#include <qlistbox.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qdrawutil.h>
+#include <tqlistbox.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqdrawutil.h>
#include <kapplication.h>
-TKComboBox::TKComboBox(QWidget* parent, const char* name)
-: QComboBox(false,parent,name)
+TKComboBox::TKComboBox(TQWidget* tqparent, const char* name)
+: TQComboBox(false,tqparent,name)
{
}
-TKComboBox::TKComboBox( bool isEditable, QWidget* parent, const char* name )
-: QComboBox(isEditable,parent,name)
+TKComboBox::TKComboBox( bool isEditable, TQWidget* tqparent, const char* name )
+: TQComboBox(isEditable,tqparent,name)
{
}
@@ -41,35 +41,35 @@ TKComboBox::~TKComboBox()
{
}
-void TKComboBox::paintEvent(QPaintEvent*)
+void TKComboBox::paintEvent(TQPaintEvent*)
{
- QRect r;
+ TQRect r;
if (editable()){
#ifdef __GNUC__
#warning "Left out for now, lacking a style expert (Werner)"
#endif
- //r = QRect( style().comboButtonRect( 0, 0, width(), height() ) );
- r = QRect(4, 2, width()-height()-2, height()-4);
+ //r = TQRect( style().comboButtonRect( 0, 0, width(), height() ) );
+ r = TQRect(4, 2, width()-height()-2, height()-4);
} else {
- r = QRect(4, 2, width()-height()-2, height()-4);
+ r = TQRect(4, 2, width()-height()-2, height()-4);
}
int by = 2;
int bx = r.x() + r.width();
int bw = width() - bx - 2;
int bh = height()-4;
- QPainter p( this );
- const QColorGroup& g = colorGroup();
+ TQPainter p( this );
+ const TQColorGroup& g = tqcolorGroup();
- QRect fr(2,2,width()-4,height()-4);
+ TQRect fr(2,2,width()-4,height()-4);
if ( hasFocus()) {
- p.fillRect( fr, g.brush( QColorGroup::Highlight ) );
+ p.fillRect( fr, g.brush( TQColorGroup::Highlight ) );
} else {
- p.fillRect( fr, g.brush( QColorGroup::Base ) );
+ p.fillRect( fr, g.brush( TQColorGroup::Base ) );
}
- QRect r1(1,1,width()-1,height()-1);
+ TQRect r1(1,1,width()-1,height()-1);
qDrawShadePanel( &p, r1, g, true, 1 );
static const char* arrow_down[] = {
@@ -84,14 +84,14 @@ void TKComboBox::paintEvent(QPaintEvent*)
" XXX ",
" X "};
- QPixmap pixmap(arrow_down);
+ TQPixmap pixmap(arrow_down);
- style().drawControl( QStyle::CE_PushButton, &p, this, QRect( bx, by, bw, bh ), colorGroup() );
- style().drawItem( &p, QRect( bx, by, bw, bh), AlignCenter, colorGroup(), isEnabled(), &pixmap, QString::null );
+ tqstyle().tqdrawControl( TQStyle::CE_PushButton, &p, this, TQRect( bx, by, bw, bh ), tqcolorGroup() );
+ tqstyle().drawItem( &p, TQRect( bx, by, bw, bh), AlignCenter, tqcolorGroup(), isEnabled(), &pixmap, TQString() );
if ( hasFocus()) {
- style().drawPrimitive( QStyle::PE_FocusRect, &p, fr, g );
+ tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, fr, g );
}
if (!editable()) {
@@ -100,9 +100,9 @@ void TKComboBox::paintEvent(QPaintEvent*)
p.setBackgroundColor( g.background() );
if ( listBox()->item(currentItem()) ) {
- QListBoxItem * item = listBox()->item(currentItem());
- const QPixmap *pix = item->pixmap();
- QString text = item->text();
+ TQListBoxItem * item = listBox()->item(currentItem());
+ const TQPixmap *pix = item->pixmap();
+ TQString text = item->text();
int x = r.x();
if ( pix ) {
p.drawPixmap( x, r.y() + ( r.height() - pix->height() ) / 2 +1, *pix );
diff --git a/lib/kofficeui/tkcombobox.h b/lib/kofficeui/tkcombobox.h
index 8b036dd6a..5ddcc5637 100644
--- a/lib/kofficeui/tkcombobox.h
+++ b/lib/kofficeui/tkcombobox.h
@@ -20,18 +20,19 @@
#ifndef TKCOMBOBOX_H
#define TKCOMBOBOX_H
-#include <qcombobox.h>
-class TKComboBox : public QComboBox
+#include <tqcombobox.h>
+class TKComboBox : public TQComboBox
{ Q_OBJECT
+ TQ_OBJECT
public:
- TKComboBox(QWidget* parent=0, const char* name=0);
- TKComboBox(bool isEditable, QWidget* parent=0, const char* name=0);
+ TKComboBox(TQWidget* tqparent=0, const char* name=0);
+ TKComboBox(bool isEditable, TQWidget* tqparent=0, const char* name=0);
~TKComboBox();
void activate();
protected:
- void paintEvent(QPaintEvent*);
+ void paintEvent(TQPaintEvent*);
private:
class TKComboBoxPrivate;
diff --git a/lib/kofficeui/tktoolbarbutton.cpp b/lib/kofficeui/tktoolbarbutton.cpp
index b6baba1ab..e8040496b 100644
--- a/lib/kofficeui/tktoolbarbutton.cpp
+++ b/lib/kofficeui/tktoolbarbutton.cpp
@@ -19,13 +19,13 @@
*/
#include <tktoolbarbutton.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qpopupmenu.h>
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qdrawutil.h>
-#include <qstyle.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqpopupmenu.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqdrawutil.h>
+#include <tqstyle.h>
#include <kdeversion.h>
#include <kapplication.h>
@@ -49,14 +49,14 @@ public:
m_autoRaised = true;
ignoreNextMousePress = false;
- m_text = QString::null;
- m_iconName = QString::null;
+ m_text = TQString();
+ m_iconName = TQString();
m_arrowPressed = false;
m_delayTimer = 0L;
m_popup = 0L;
- m_disabledIconName = QString::null;
- m_defaultIconName = QString::null;
+ m_disabledIconName = TQString();
+ m_defaultIconName = TQString();
m_instance = KGlobal::instance();
}
@@ -75,33 +75,33 @@ public:
bool m_arrowPressed;
bool ignoreNextMousePress;
- QString m_text;
- QString m_iconName;
- QString m_disabledIconName;
- QString m_defaultIconName;
+ TQString m_text;
+ TQString m_iconName;
+ TQString m_disabledIconName;
+ TQString m_defaultIconName;
TK::IconMode m_iconMode;
- QTimer *m_delayTimer;
- QPopupMenu *m_popup;
+ TQTimer *m_delayTimer;
+ TQPopupMenu *m_popup;
KInstance *m_instance;
};
-TKToolBarButton::TKToolBarButton( const QString& icon, const QString& txt,
- QWidget* parent, const char* name,
+TKToolBarButton::TKToolBarButton( const TQString& icon, const TQString& txt,
+ TQWidget* tqparent, const char* name,
KInstance *instance )
-: QToolButton(parent,name)
+: TQToolButton(tqparent,name)
{
d = new TKToolBarButtonPrivate;
d->m_text = txt;
d->m_instance = instance;
- setFocusPolicy( NoFocus );
+ setFocusPolicy( TQ_NoFocus );
- connect(this, SIGNAL(clicked()), SLOT(slotClicked()) );
- connect(this, SIGNAL(pressed()), SLOT(slotPressed()) );
- connect(this, SIGNAL(released()), SLOT(slotReleased()) );
+ connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(slotClicked()) );
+ connect(this, TQT_SIGNAL(pressed()), TQT_SLOT(slotPressed()) );
+ connect(this, TQT_SIGNAL(released()), TQT_SLOT(slotReleased()) );
installEventFilter(this);
@@ -109,17 +109,17 @@ TKToolBarButton::TKToolBarButton( const QString& icon, const QString& txt,
modeChange();
}
-TKToolBarButton::TKToolBarButton( const QPixmap& pixmap, const QString& txt, QWidget* parent, const char* name )
-: QToolButton(parent,name )
+TKToolBarButton::TKToolBarButton( const TQPixmap& pixmap, const TQString& txt, TQWidget* tqparent, const char* name )
+: TQToolButton(tqparent,name )
{
d = new TKToolBarButtonPrivate;
d->m_text = txt;
- setFocusPolicy( NoFocus );
+ setFocusPolicy( TQ_NoFocus );
- connect(this, SIGNAL(clicked()), SLOT(slotClicked()) );
- connect(this, SIGNAL(pressed()), SLOT(slotPressed()) );
- connect(this, SIGNAL(released()), SLOT(slotReleased()) );
+ connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(slotClicked()) );
+ connect(this, TQT_SIGNAL(pressed()), TQT_SLOT(slotPressed()) );
+ connect(this, TQT_SIGNAL(released()), TQT_SLOT(slotReleased()) );
installEventFilter(this);
@@ -132,14 +132,14 @@ TKToolBarButton::~TKToolBarButton()
delete d;
}
-QString TKToolBarButton::text()
+TQString TKToolBarButton::text()
{
return d->m_text;
}
void TKToolBarButton::modeChange()
{
- QToolTip::add(this,d->m_text);
+ TQToolTip::add(this,d->m_text);
int border = 3;
int w = 2*border;
@@ -147,24 +147,24 @@ void TKToolBarButton::modeChange()
if (pixmap()) {
w += pixmap()->width();
- h = QMAX(h,pixmap()->height()+2*border);
+ h = TQMAX(h,pixmap()->height()+2*border);
if (d->m_iconMode == TK::IconAndText && !d->m_text.isEmpty())
w += border;
}
if ((d->m_iconMode==TK::IconAndText||d->m_iconMode==TK::TextOnly) && !d->m_text.isEmpty())
{
- QFont tmp_font = KGlobalSettings::toolBarFont();
- QFontMetrics fm(tmp_font);
+ TQFont tmp_font = KGlobalSettings::toolBarFont();
+ TQFontMetrics fm(tmp_font);
- h = QMAX(h,fm.lineSpacing()+2*border);
+ h = TQMAX(h,fm.lineSpacing()+2*border);
w += fm.width(d->m_text);
}
if (d->m_popup && !d->m_isToggle)
w += 11;
- QSize size(w,h);
+ TQSize size(w,h);
setMinimumSize(size);
updateGeometry();
@@ -175,17 +175,17 @@ void TKToolBarButton::setEnabled( bool enabled )
if (isEnabled()==enabled)
return;
- QToolButton::setPixmap( (enabled ? defaultPixmap : disabledPixmap) );
- QToolButton::setEnabled( enabled );
+ TQToolButton::setPixmap( (enabled ? defaultPixmap : disabledPixmap) );
+ TQToolButton::setEnabled( enabled );
}
-void TKToolBarButton::setText( const QString& text)
+void TKToolBarButton::setText( const TQString& text)
{
d->m_text = text;
- repaint(false);
+ tqrepaint(false);
}
-void TKToolBarButton::setIcon( const QString& icon )
+void TKToolBarButton::setIcon( const TQString& icon )
{
d->m_iconName = icon;
int iconSize = 16;
@@ -195,31 +195,31 @@ void TKToolBarButton::setIcon( const QString& icon )
setDefaultPixmap( BarIcon(icon, iconSize, KIcon::DefaultState, d->m_instance) );
}
-void TKToolBarButton::setDisabledIcon( const QString &icon )
+void TKToolBarButton::setDisabledIcon( const TQString &icon )
{
d->m_disabledIconName = icon;
int iconSize = 16;
setDisabledPixmap( BarIcon(icon, iconSize, KIcon::DisabledState, d->m_instance) );
}
-void TKToolBarButton::setDefaultIcon( const QString &icon )
+void TKToolBarButton::setDefaultIcon( const TQString &icon )
{
d->m_defaultIconName = icon;
int iconSize = 16;
setDefaultPixmap( BarIcon(icon, iconSize, KIcon::DefaultState, d->m_instance) );
}
-QPixmap TKToolBarButton::getActivePixmap() const
+TQPixmap TKToolBarButton::getActivePixmap() const
{
return activePixmap;
}
-void TKToolBarButton::setPixmap( const QPixmap &pixmap )
+void TKToolBarButton::setPixmap( const TQPixmap &pixmap )
{
setPixmap( pixmap, true );
}
-void TKToolBarButton::setPixmap( const QPixmap &pixmap, bool generate )
+void TKToolBarButton::setPixmap( const TQPixmap &pixmap, bool generate )
{
activePixmap = pixmap;
@@ -236,22 +236,22 @@ void TKToolBarButton::setPixmap( const QPixmap &pixmap, bool generate )
disabledPixmap = activePixmap;
}
- QToolButton::setPixmap( isEnabled() ? defaultPixmap : disabledPixmap );
+ TQToolButton::setPixmap( isEnabled() ? defaultPixmap : disabledPixmap );
}
-void TKToolBarButton::setDefaultPixmap( const QPixmap &pixmap )
+void TKToolBarButton::setDefaultPixmap( const TQPixmap &pixmap )
{
defaultPixmap = pixmap;
- QToolButton::setPixmap( isEnabled() ? defaultPixmap : disabledPixmap );
+ TQToolButton::setPixmap( isEnabled() ? defaultPixmap : disabledPixmap );
}
-void TKToolBarButton::setDisabledPixmap( const QPixmap &pixmap )
+void TKToolBarButton::setDisabledPixmap( const TQPixmap &pixmap )
{
disabledPixmap = pixmap;
- QToolButton::setPixmap( isEnabled() ? defaultPixmap : disabledPixmap );
+ TQToolButton::setPixmap( isEnabled() ? defaultPixmap : disabledPixmap );
}
-void TKToolBarButton::setPopup(QPopupMenu *p)
+void TKToolBarButton::setPopup(TQPopupMenu *p)
{
d->m_popup = p;
d->m_popup->setFont(KGlobalSettings::toolBarFont());
@@ -260,19 +260,19 @@ void TKToolBarButton::setPopup(QPopupMenu *p)
modeChange();
}
-QPopupMenu *TKToolBarButton::popup()
+TQPopupMenu *TKToolBarButton::popup()
{
return d->m_popup;
}
-void TKToolBarButton::setDelayedPopup (QPopupMenu *p, bool toggle )
+void TKToolBarButton::setDelayedPopup (TQPopupMenu *p, bool toggle )
{
d->m_isPopup = true;
setToggle(toggle);
if (!d->m_delayTimer) {
- d->m_delayTimer = new QTimer(this);
- connect(d->m_delayTimer, SIGNAL(timeout()), this, SLOT(slotDelayTimeout()));
+ d->m_delayTimer = new TQTimer(this);
+ connect(d->m_delayTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotDelayTimeout()));
}
setPopup(p);
@@ -281,7 +281,7 @@ void TKToolBarButton::setDelayedPopup (QPopupMenu *p, bool toggle )
void TKToolBarButton::setRaised(bool f)
{
d->m_isRaised = f;
- repaint(false);
+ tqrepaint(false);
}
void TKToolBarButton::setAutoRaised(bool f)
@@ -289,55 +289,55 @@ void TKToolBarButton::setAutoRaised(bool f)
d->m_autoRaised = f;
}
-void TKToolBarButton::leaveEvent(QEvent *)
+void TKToolBarButton::leaveEvent(TQEvent *)
{
if (!d->m_isToggle && !(d->m_popup && d->m_popup->isVisible()) ) {
- QToolButton::setPixmap(isEnabled() ? defaultPixmap : disabledPixmap);
+ TQToolButton::setPixmap(isEnabled() ? defaultPixmap : disabledPixmap);
if (d->m_autoRaised)
setRaised(false);
}
}
-void TKToolBarButton::enterEvent(QEvent *)
+void TKToolBarButton::enterEvent(TQEvent *)
{
if (!d->m_isToggle) {
if (isEnabled()) {
- QToolButton::setPixmap(activePixmap);
+ TQToolButton::setPixmap(activePixmap);
if (d->m_autoRaised)
setRaised(true);
} else {
- QToolButton::setPixmap(disabledPixmap);
+ TQToolButton::setPixmap(disabledPixmap);
}
- repaint(false);
+ tqrepaint(false);
}
}
-bool TKToolBarButton::eventFilter(QObject *o, QEvent *ev)
+bool TKToolBarButton::eventFilter(TQObject *o, TQEvent *ev)
{
- if ( o == this )
- if (ev->type() == QEvent::MouseButtonPress && d->m_popup && d->m_isPopup ) {
+ if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) )
+ if (ev->type() == TQEvent::MouseButtonPress && d->m_popup && d->m_isPopup ) {
if (!d->m_isToggle) {
- d->m_arrowPressed = arrowPressed( mapFromGlobal(QCursor::pos()) );
+ d->m_arrowPressed = arrowPressed( mapFromGlobal(TQCursor::pos()) );
} else {
d->m_delayTimer->start(POPUP_DELAY);
}
}
- if ( o == d->m_popup) {
+ if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(d->m_popup)) {
switch (ev->type())
{
- case QEvent::Show:
+ case TQEvent::Show:
on(true);
return false;
- case QEvent::Hide:
+ case TQEvent::Hide:
on(false);
setDown(false);
- if ( !geometry().contains(parentWidget()->mapFromGlobal(QCursor::pos())) )
+ if ( !tqgeometry().tqcontains(tqparentWidget()->mapFromGlobal(TQCursor::pos())) )
leaveEvent(0L);
return false;
break;
- case QEvent::MouseButtonPress: {
- d->m_arrowPressed = arrowPressed( mapFromGlobal(QCursor::pos()) );
+ case TQEvent::MouseButtonPress: {
+ d->m_arrowPressed = arrowPressed( mapFromGlobal(TQCursor::pos()) );
d->ignoreNextMousePress = d->m_arrowPressed;
break;
}
@@ -348,19 +348,19 @@ bool TKToolBarButton::eventFilter(QObject *o, QEvent *ev)
return false;
}
-void TKToolBarButton::drawButton( QPainter* p )
+void TKToolBarButton::drawButton( TQPainter* p )
{
#define DRAW_PIXMAP_AND_TEXT \
int x = 3;\
if (pixmap()) {\
- style().drawItem( p, QRect( x, 0, pixmap()->width(), height() ), AlignCenter, colorGroup(), isEnabled(), pixmap(), QString::null );\
+ tqstyle().drawItem( p, TQRect( x, 0, pixmap()->width(), height() ), AlignCenter, tqcolorGroup(), isEnabled(), pixmap(), TQString() );\
if (d->m_iconMode==TK::IconAndText && !d->m_text.isEmpty()) {\
x += pixmap()->width() + 3;\
}\
}\
if ((d->m_iconMode==TK::IconAndText||d->m_iconMode==TK::TextOnly) && !d->m_text.isEmpty()) {\
- QFontMetrics fm(KGlobalSettings::toolBarFont());\
- style().drawItem( p, QRect( x, 0, fm.width(d->m_text), height() ), AlignCenter, colorGroup(), isEnabled(), 0, d->m_text );\
+ TQFontMetrics fm(KGlobalSettings::toolBarFont());\
+ tqstyle().drawItem( p, TQRect( x, 0, fm.width(d->m_text), height() ), AlignCenter, tqcolorGroup(), isEnabled(), 0, d->m_text );\
}
const char* arrow[] = {
@@ -371,45 +371,45 @@ void TKToolBarButton::drawButton( QPainter* p )
".#####.",
"..###..",
"...#..."};
- QPixmap arrow_pix(arrow);
+ TQPixmap arrow_pix(arrow);
bool f = d->m_isOn || isDown();
if (d->m_popup && !d->m_isToggle)
{
if (d->m_isPopup)
{
- QStyle::SFlags flags = QStyle::Style_Default;
- if (isEnabled()) flags |= QStyle::Style_Enabled;
- if (isOn()) flags |= QStyle::Style_On;
- if (d->m_isRaised) flags |= QStyle::Style_Raised;
- if (hasFocus()) flags |= QStyle::Style_HasFocus;
-
- style().drawComplexControl( QStyle::CC_ToolButton, p, this, QRect( 0, 0, width()-12, height() ), colorGroup(), flags, QStyle::SC_ToolButton );
- style().drawComplexControl( QStyle::CC_ToolButton, p, this, QRect( width()-13, 0, 13, height() ), colorGroup(), flags, QStyle::SC_ToolButton );
- style().drawItem( p, QRect( width()-13, 0, 13, height() ), AlignCenter, colorGroup(), isEnabled(), &arrow_pix, QString::null );
+ TQStyle::SFlags flags = TQStyle::Style_Default;
+ if (isEnabled()) flags |= TQStyle::Style_Enabled;
+ if (isOn()) flags |= TQStyle::Style_On;
+ if (d->m_isRaised) flags |= TQStyle::Style_Raised;
+ if (hasFocus()) flags |= TQStyle::Style_HasFocus;
+
+ tqstyle().tqdrawComplexControl( TQStyle::CC_ToolButton, p, this, TQRect( 0, 0, width()-12, height() ), tqcolorGroup(), flags, TQStyle::SC_ToolButton );
+ tqstyle().tqdrawComplexControl( TQStyle::CC_ToolButton, p, this, TQRect( width()-13, 0, 13, height() ), tqcolorGroup(), flags, TQStyle::SC_ToolButton );
+ tqstyle().drawItem( p, TQRect( width()-13, 0, 13, height() ), AlignCenter, tqcolorGroup(), isEnabled(), &arrow_pix, TQString() );
if ( d->m_isRaised )
- qDrawShadeLine( p, width()-12, 0, width()-12, height(), colorGroup(), true );
+ qDrawShadeLine( p, width()-12, 0, width()-12, height(), tqcolorGroup(), true );
DRAW_PIXMAP_AND_TEXT
} else {
- style().drawControl( QStyle::CE_PushButton, p, this, QRect( 0, 0, width(), height() ), isEnabled() ? colorGroup() : palette().disabled(), f );
+ tqstyle().tqdrawControl( TQStyle::CE_PushButton, p, this, TQRect( 0, 0, width(), height() ), isEnabled() ? tqcolorGroup() : tqpalette().disabled(), f );
DRAW_PIXMAP_AND_TEXT
int z = f ? 1:0;
p->drawPixmap(width()-11+z,(height()-4)/2+z ,arrow_pix);
}
} else {
- style().drawControl( QStyle::CE_PushButton, p, this, QRect( 0, 0, width(), height() ), isEnabled() ? colorGroup() : palette().disabled(), f );
+ tqstyle().tqdrawControl( TQStyle::CE_PushButton, p, this, TQRect( 0, 0, width(), height() ), isEnabled() ? tqcolorGroup() : tqpalette().disabled(), f );
DRAW_PIXMAP_AND_TEXT
}
}
-void TKToolBarButton::paletteChange(const QPalette &)
+void TKToolBarButton::paletteChange(const TQPalette &)
{
makeDisabledPixmap();
if ( !isEnabled() )
- QToolButton::setPixmap( disabledPixmap );
+ TQToolButton::setPixmap( disabledPixmap );
else
- QToolButton::setPixmap( defaultPixmap );
- repaint(false);
+ TQToolButton::setPixmap( defaultPixmap );
+ tqrepaint(false);
}
void TKToolBarButton::makeDefaultPixmap()
@@ -430,19 +430,19 @@ void TKToolBarButton::makeDisabledPixmap()
disabledPixmap = effect.apply(activePixmap, KIcon::Toolbar, KIcon::DisabledState);
}
-QSize TKToolBarButton::sizeHint() const
+TQSize TKToolBarButton::tqsizeHint() const
{
- return minimumSize();
+ return tqminimumSize();
}
-QSize TKToolBarButton::minimumSizeHint() const
+TQSize TKToolBarButton::tqminimumSizeHint() const
{
- return minimumSize();
+ return tqminimumSize();
}
void TKToolBarButton::showMenu()
{
- QPoint p ( mapToGlobal( QPoint( 0, 0 ) ) );
+ TQPoint p ( mapToGlobal( TQPoint( 0, 0 ) ) );
const int deskHeight = KGlobalSettings::desktopGeometry(this).height();
if ( p.y() + height() + d->m_popup->height() > deskHeight )
p.setY( p.y() - d->m_popup->height() );
@@ -502,7 +502,7 @@ void TKToolBarButton::slotToggled()
void TKToolBarButton::on(bool flag)
{
d->m_isOn = flag;
- repaint();
+ tqrepaint();
}
void TKToolBarButton::toggle()
@@ -514,19 +514,19 @@ void TKToolBarButton::setToggle(bool flag)
{
d->m_isToggle = flag;
if (flag == true)
- connect(this, SIGNAL(toggled(bool)), this, SLOT(slotToggled()));
+ connect(this, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggled()));
else
- disconnect(this, SIGNAL(toggled(bool)), this, SLOT(slotToggled()));
+ disconnect(this, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggled()));
modeChange();
- repaint();
+ tqrepaint();
}
void TKToolBarButton::setIconMode( TK::IconMode m )
{
d->m_iconMode = m;
modeChange();
- repaint();
+ tqrepaint();
}
#include <tktoolbarbutton.moc>
diff --git a/lib/kofficeui/tktoolbarbutton.h b/lib/kofficeui/tktoolbarbutton.h
index a47246724..680c19b19 100644
--- a/lib/kofficeui/tktoolbarbutton.h
+++ b/lib/kofficeui/tktoolbarbutton.h
@@ -22,23 +22,24 @@
#include <tkaction.h>
-#include <qpixmap.h>
-#include <qtoolbutton.h>
+#include <tqpixmap.h>
+#include <tqtoolbutton.h>
#include <kglobal.h>
class KToolBar;
class KInstance;
-class QPopupMenu;
-class QPainter;
+class TQPopupMenu;
+class TQPainter;
-class TKToolBarButton : public QToolButton
+class TKToolBarButton : public TQToolButton
{ Q_OBJECT
+ TQ_OBJECT
public:
- TKToolBarButton(const QString& icon, const QString& txt,
- QWidget* parent = 0, const char *name=0L,
+ TKToolBarButton(const TQString& icon, const TQString& txt,
+ TQWidget* tqparent = 0, const char *name=0L,
KInstance *_instance = KGlobal::instance());
- TKToolBarButton(const QPixmap&, const QString&, QWidget* parent=0, const char* name=0);
+ TKToolBarButton(const TQPixmap&, const TQString&, TQWidget* tqparent=0, const char* name=0);
~TKToolBarButton();
void setIconMode(TK::IconMode);
@@ -60,7 +61,7 @@ public:
*
* @param pixmap The active pixmap
*/
- virtual void setPixmap(const QPixmap &pixmap);
+ virtual void setPixmap(const TQPixmap &pixmap);
/**
* Set the pixmap directly for this button. This pixmap should be
@@ -73,7 +74,7 @@ public:
* @param generate If true, then the other pixmaps will be
* automatically generated using configurable effects
*/
- virtual void setPixmap(const QPixmap &pixmap, bool generate);
+ virtual void setPixmap(const TQPixmap &pixmap, bool generate);
/**
* Force the button to use this pixmap as the default one rather
@@ -81,7 +82,7 @@ public:
*
* @param pixmap The pixmap to use as the default (normal) one
*/
- virtual void setDefaultPixmap(const QPixmap& pixmap);
+ virtual void setDefaultPixmap(const TQPixmap& pixmap);
/**
* Force the button to use this pixmap when disabled one rather then
@@ -89,7 +90,7 @@ public:
*
* @param pixmap The pixmap to use when disabled
*/
- virtual void setDisabledPixmap(const QPixmap& pixmap);
+ virtual void setDisabledPixmap(const TQPixmap& pixmap);
/**
* Set the text for this button. The text will be either used as a
@@ -97,8 +98,8 @@ public:
*
* @param text The button (or tooltip) text
*/
- virtual void setText(const QString &text);
- QString text();
+ virtual void setText(const TQString &text);
+ TQString text();
/**
* Set the icon for this button. This icon should be the active
@@ -108,7 +109,7 @@ public:
*
* @param icon The name of the active pixmap
*/
- virtual void setIcon(const QString &icon);
+ virtual void setIcon(const TQString &icon);
/**
* Force the button to use this icon as the default one rather
@@ -116,7 +117,7 @@ public:
*
* @param icon The icon to use as the default (normal) one
*/
- virtual void setDefaultIcon(const QString& icon);
+ virtual void setDefaultIcon(const TQString& icon);
/**
* Force the button to use this icon when disabled one rather then
@@ -124,7 +125,7 @@ public:
*
* @param icon The icon to use when disabled
*/
- virtual void setDisabledIcon(const QString& icon);
+ virtual void setDisabledIcon(const TQString& icon);
/**
* Turn this button on or off
@@ -150,7 +151,7 @@ public:
/**
* Return a pointer to this button's popup menu (if it exists)
*/
- QPopupMenu *popup();
+ TQPopupMenu *popup();
/**
* Give this button a popup menu. There will not be a delay when
@@ -159,7 +160,7 @@ public:
*
* @param p The new popup menu
*/
- void setPopup (QPopupMenu *p);
+ void setPopup (TQPopupMenu *p);
/**
* Gives this button a delayed popup menu.
@@ -175,12 +176,12 @@ public:
* @param p the new popup menu
* @param toggle if true, makes the button "sticky" (toggled)
*/
- void setDelayedPopup(QPopupMenu *p, bool toggle = false);
+ void setDelayedPopup(TQPopupMenu *p, bool toggle = false);
- QPixmap getActivePixmap() const;
+ TQPixmap getActivePixmap() const;
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
+ virtual TQSize tqsizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
signals:
void buttonClicked();
@@ -192,26 +193,26 @@ public slots:
void modeChange();
protected:
- void paletteChange(const QPalette &);
- void leaveEvent(QEvent *e);
- void enterEvent(QEvent *e);
- void drawButton(QPainter *p);
- bool eventFilter (QObject *o, QEvent *e);
+ void paletteChange(const TQPalette &);
+ void leaveEvent(TQEvent *e);
+ void enterEvent(TQEvent *e);
+ void drawButton(TQPainter *p);
+ bool eventFilter (TQObject *o, TQEvent *e);
void showMenu();
void makeDefaultPixmap();
void makeDisabledPixmap();
- bool arrowPressed( const QPoint& pos ) {
+ bool arrowPressed( const TQPoint& pos ) {
int x = pos.x();
int y = pos.y();
return (x > width() - 12 && x <= width() && y > 0 && y < height());
}
private:
- QPixmap defaultPixmap;
- QPixmap activePixmap;
- QPixmap disabledPixmap;
- virtual void setIcon(const QPixmap &p) { QButton::setIcon(p); }
+ TQPixmap defaultPixmap;
+ TQPixmap activePixmap;
+ TQPixmap disabledPixmap;
+ virtual void setIcon(const TQPixmap &p) { TQButton::setIcon(p); }
class TKToolBarButtonPrivate;
TKToolBarButtonPrivate *d;