summaryrefslogtreecommitdiffstats
path: root/kiconedit
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-02 19:23:46 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-02 19:23:46 +0000
commiteba47f8f0637f451e21348187591e1f1fd58ac74 (patch)
tree448f10b95c656604acc331a3236c1e59bde5c1ad /kiconedit
parentc7e8736c69373f48b0401319757c742e8607431a (diff)
downloadtdegraphics-eba47f8f0637f451e21348187591e1f1fd58ac74.tar.gz
tdegraphics-eba47f8f0637f451e21348187591e1f1fd58ac74.zip
TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1158446 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kiconedit')
-rw-r--r--kiconedit/kcolorgrid.cpp38
-rw-r--r--kiconedit/kcolorgrid.h24
-rw-r--r--kiconedit/kicon.cpp62
-rw-r--r--kiconedit/kicon.h30
-rw-r--r--kiconedit/kiconcolors.cpp22
-rw-r--r--kiconedit/kiconcolors.h16
-rw-r--r--kiconedit/kiconconfig.cpp176
-rw-r--r--kiconedit/kiconconfig.h42
-rw-r--r--kiconedit/kiconedit.cpp192
-rw-r--r--kiconedit/kiconedit.h40
-rw-r--r--kiconedit/kiconeditslots.cpp50
-rw-r--r--kiconedit/kicongrid.cpp246
-rw-r--r--kiconedit/kicongrid.h112
-rw-r--r--kiconedit/knew.cpp66
-rw-r--r--kiconedit/knew.h64
-rw-r--r--kiconedit/kresize.cpp28
-rw-r--r--kiconedit/kresize.h8
-rw-r--r--kiconedit/palettetoolbar.cpp70
-rw-r--r--kiconedit/palettetoolbar.h18
-rw-r--r--kiconedit/properties.cpp16
-rw-r--r--kiconedit/properties.h38
-rw-r--r--kiconedit/utils.cpp18
-rw-r--r--kiconedit/utils.h16
23 files changed, 696 insertions, 696 deletions
diff --git a/kiconedit/kcolorgrid.cpp b/kiconedit/kcolorgrid.cpp
index a3793cb2..35b0dfaa 100644
--- a/kiconedit/kcolorgrid.cpp
+++ b/kiconedit/kcolorgrid.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
@@ -69,8 +69,8 @@ uint KColorArray::closestMatch(uint color)
return c|OPAQUE_MASK;
}
-KColorGrid::KColorGrid(QWidget *parent, const char *name, int space)
- : QWidget(parent, name, Qt::WResizeNoErase|Qt::WRepaintNoErase)
+KColorGrid::KColorGrid(TQWidget *parent, const char *name, int space)
+ : TQWidget(parent, name, Qt::WResizeNoErase|Qt::WRepaintNoErase)
{
//kdDebug(4640) << "KColorGrid - constructor" << endl;
s = space;
@@ -87,17 +87,17 @@ KColorGrid::KColorGrid(QWidget *parent, const char *name, int space)
void KColorGrid::show()
{
//updateScrollBars();
- QWidget::show();
+ TQWidget::show();
}
*/
-void KColorGrid::paintEvent(QPaintEvent *e)
+void KColorGrid::paintEvent(TQPaintEvent *e)
{
//kdDebug(4640) << "KColorGrid::paintEvent" << endl;
//updateScrollBars();
- //QWidget::paintEvent(e);
+ //TQWidget::paintEvent(e);
- const QRect urect = e->rect();
+ const TQRect urect = e->rect();
//kdDebug(4640) << "Update rect = ( " << //urect.left() << ", " << urect.top() << ", " << urect.width() << ", " << urect.height() << " )" << endl;
@@ -107,10 +107,10 @@ void KColorGrid::paintEvent(QPaintEvent *e)
int lastcol = getX(urect.right())+1;
int lastrow = getY(urect.bottom())+1;
- QWMatrix matrix;
- QPixmap pm(urect.width(),urect.height());
+ TQWMatrix matrix;
+ TQPixmap pm(urect.width(),urect.height());
pm.fill(paletteBackgroundColor());
- QPainter p;
+ TQPainter p;
p.begin( &pm );
firstrow = (firstrow < 0) ? 0 : firstrow;
@@ -147,25 +147,25 @@ void KColorGrid::paintEvent(QPaintEvent *e)
p.end();
- bitBlt(this,urect.topLeft(),&pm,QRect(0,0,pm.width(),pm.height()));
+ bitBlt(this,urect.topLeft(),&pm,TQRect(0,0,pm.width(),pm.height()));
}
-void KColorGrid::paintForeground(QPainter* , QPaintEvent* )
+void KColorGrid::paintForeground(TQPainter* , TQPaintEvent* )
{
}
/*
-void KColorGrid::resizeEvent(QResizeEvent *)
+void KColorGrid::resizeEvent(TQResizeEvent *)
{
//kdDebug(4640) << "resize: width: " << width() << " - total: " << totalwidth << endl;
//kdDebug(4640) << "resize: height: " << height() << " - total: " << totalheight << endl;
}
*/
-QSize KColorGrid::sizeHint() const
+TQSize KColorGrid::sizeHint() const
{
- return QSize(totalwidth, totalheight);
+ return TQSize(totalwidth, totalheight);
}
int KColorGrid::getY( int y )
@@ -186,10 +186,10 @@ int KColorGrid::getX( int x )
return (x/cellsize);
}
-const QRect KColorGrid::viewRect()
+const TQRect KColorGrid::viewRect()
{
//kdDebug(4640) << "viewRect" << endl;
- const QRect r(0, 0, width(), height());
+ const TQRect r(0, 0, width(), height());
//kdDebug(4640) << "viewRect - " << x << " x " << y << " - " << w << " x " << h << endl;
return r;
}
@@ -301,8 +301,8 @@ void KColorGrid::setColor( int colNum, uint col, bool update )
void KColorGrid::updateCell( int row, int col, bool )
{
//kdDebug(4640) << "updateCell - before repaint" << endl;
- QWMatrix matrix;
- QPainter p;
+ TQWMatrix matrix;
+ TQPainter p;
p.begin( this );
matrix.translate( (col*cellsize), (row*cellsize) );
p.setWorldMatrix( matrix );
diff --git a/kiconedit/kcolorgrid.h b/kiconedit/kcolorgrid.h
index 2bb7c856..76091b45 100644
--- a/kiconedit/kcolorgrid.h
+++ b/kiconedit/kcolorgrid.h
@@ -21,13 +21,13 @@
#ifndef __KCOLORGRID_H__
#define __KCOLORGRID_H__
-#include <qwidget.h>
-#include <qsize.h>
-#include <qrect.h>
+#include <tqwidget.h>
+#include <tqsize.h>
+#include <tqrect.h>
#include "utils.h"
-#define KArrayUint QMemArray<uint>
+#define KArrayUint TQMemArray<uint>
class KColorArray : public KArrayUint
{
@@ -42,7 +42,7 @@ class KColorGrid : public QWidget
private:
Q_OBJECT
public:
- KColorGrid( QWidget * parent = 0, const char *name = 0, int spacing = 0);
+ KColorGrid( TQWidget * parent = 0, const char *name = 0, int spacing = 0);
virtual ~KColorGrid() {};
enum GridState { Plain, Shaded };
@@ -64,9 +64,9 @@ public:
virtual void setCellSize( int s );
virtual int cellSize() { return cellsize; }
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
- void setSize(const QSize s) { setNumRows(s.height()); setNumCols(s.width()); }
+ void setSize(const TQSize s) { setNumRows(s.height()); setNumCols(s.width()); }
public slots:
//virtual void show();
@@ -77,10 +77,10 @@ signals:
protected:
void updateCell(int row, int col, bool f);
- virtual void paintForeground( QPainter* p, QPaintEvent* e);
- virtual void paintCell( QPainter *p, int row, int col) = 0;
- virtual void paintEvent(QPaintEvent *);
- //virtual void resizeEvent(QResizeEvent *);
+ virtual void paintForeground( TQPainter* p, TQPaintEvent* e);
+ virtual void paintCell( TQPainter *p, int row, int col) = 0;
+ virtual void paintEvent(TQPaintEvent *);
+ //virtual void resizeEvent(TQResizeEvent *);
void setColor(int colNum, uint, bool update = true );
void updateColors();
virtual void setNumRows(int);
@@ -91,7 +91,7 @@ protected:
int getY(int y);
int findCol(int x) { return getX(x); }
int getX(int x);
- const QRect viewRect();
+ const TQRect viewRect();
//private:
int s, cellsize, totalwidth, totalheight;
diff --git a/kiconedit/kicon.cpp b/kiconedit/kicon.cpp
index 92f1bc0b..9da72c9b 100644
--- a/kiconedit/kicon.cpp
+++ b/kiconedit/kicon.cpp
@@ -20,7 +20,7 @@
#include <stdlib.h>
-#include <qimage.h>
+#include <tqimage.h>
#include <kmessagebox.h>
#include <kfiledialog.h>
@@ -32,8 +32,8 @@
#include "kicon.h"
#include "utils.h"
-KIconEditIcon::KIconEditIcon(QObject *parent, const QImage *img, KURL url)
- : QObject(parent)
+KIconEditIcon::KIconEditIcon(TQObject *parent, const TQImage *img, KURL url)
+ : TQObject(parent)
{
f = 0;
_lastdir = "/";
@@ -51,9 +51,9 @@ KIconEditIcon::~KIconEditIcon()
}
-bool KIconEditIcon::open(const QImage *image, KURL url)
+bool KIconEditIcon::open(const TQImage *image, KURL url)
{
- QImage *img = (QImage*)image;
+ TQImage *img = (TQImage*)image;
if(url.isEmpty())
return false;
@@ -64,19 +64,19 @@ bool KIconEditIcon::open(const QImage *image, KURL url)
{
kdDebug(4640) << "KIconEditIcon::open (malformed) " << url.prettyURL() << endl;
- QFileInfo fi(url.url());
+ TQFileInfo fi(url.url());
if(fi.isRelative())
url = "file:" + fi.absFilePath();
if(!url.isValid()) // Giving up
{
- QString msg = i18n("The URL: %1 \nseems to be malformed.\n").arg(url.url());
- KMessageBox::sorry((QWidget*)parent(), msg);
+ TQString msg = i18n("The URL: %1 \nseems to be malformed.\n").arg(url.url());
+ KMessageBox::sorry((TQWidget*)parent(), msg);
return false;
}
}
- QString filename;
+ TQString filename;
if(url.isLocalFile())
{
@@ -84,10 +84,10 @@ bool KIconEditIcon::open(const QImage *image, KURL url)
}
else
{
- if(!KIO::NetAccess::download( url, filename, (QWidget*)parent() ))
+ if(!KIO::NetAccess::download( url, filename, (TQWidget*)parent() ))
{
- QString msg = i18n("There was an error loading:\n%1\n").arg(url.prettyURL());
- KMessageBox::error((QWidget*)parent(), msg);
+ TQString msg = i18n("There was an error loading:\n%1\n").arg(url.prettyURL());
+ KMessageBox::error((TQWidget*)parent(), msg);
return false;
}
}
@@ -101,8 +101,8 @@ bool KIconEditIcon::open(const QImage *image, KURL url)
if(!loadedOk)
{
- QString msg = i18n("There was an error loading:\n%1\n").arg(url.prettyURL());
- KMessageBox::error((QWidget*)parent(), msg);
+ TQString msg = i18n("There was an error loading:\n%1\n").arg(url.prettyURL());
+ KMessageBox::error((TQWidget*)parent(), msg);
}
else
{
@@ -140,11 +140,11 @@ bool KIconEditIcon::open(const QImage *image, KURL url)
-bool KIconEditIcon::promptForFile(const QImage *img)
+bool KIconEditIcon::promptForFile(const TQImage *img)
{
- kdDebug(4640) << "KIconEditIcon::promptForFile(const QImage *img)" << endl;
+ kdDebug(4640) << "KIconEditIcon::promptForFile(const TQImage *img)" << endl;
/*
- QString filter = i18n("*|All Files (*)\n"
+ TQString filter = i18n("*|All Files (*)\n"
"*.xpm|XPM (*.xpm)\n"
"*.png|PNG (*.png)\n"
"*.gif|GIF files (*.gif)\n"
@@ -152,10 +152,10 @@ bool KIconEditIcon::promptForFile(const QImage *img)
"*.ico|Icon files (*.ico)\n");
- KURL url = KFileDialog::getOpenURL( QString::null, filter );
+ KURL url = KFileDialog::getOpenURL( TQString::null, filter );
*/
bool loaded = false;
- KURL url = KFileDialog::getImageOpenURL( QString::null, static_cast<QWidget *>(parent()) );
+ KURL url = KFileDialog::getImageOpenURL( TQString::null, static_cast<TQWidget *>(parent()) );
if( !url.isEmpty() )
{
@@ -167,20 +167,20 @@ bool KIconEditIcon::promptForFile(const QImage *img)
-bool KIconEditIcon::saveAs(const QImage *image)
+bool KIconEditIcon::saveAs(const TQImage *image)
{
kdDebug(4640) << "KIconEditIcon::saveAs" << endl;
- QString file;
+ TQString file;
//Get list of file types..
- KFileDialog *dialog=new KFileDialog(QString::null, QString::null, static_cast<QWidget *>(parent()), "file dialog", true);
+ KFileDialog *dialog=new KFileDialog(TQString::null, TQString::null, static_cast<TQWidget *>(parent()), "file dialog", true);
dialog->setCaption( i18n("Save Icon As") );
dialog->setKeepLocation( true );
dialog->setMimeFilter( KImageIO::mimeTypes(KImageIO::Writing), "image/png" );
dialog->setOperationMode( KFileDialog::Saving );
- if(dialog->exec()==QDialog::Accepted)
+ if(dialog->exec()==TQDialog::Accepted)
{
file = dialog->selectedFile();
if( file.isNull() )
@@ -204,9 +204,9 @@ bool KIconEditIcon::saveAs(const QImage *image)
delete dialog;
- if(QFile::exists(file))
+ if(TQFile::exists(file))
{
- int r=KMessageBox::warningContinueCancel(static_cast<QWidget *>(parent()),
+ int r=KMessageBox::warningContinueCancel(static_cast<TQWidget *>(parent()),
i18n( "A file named \"%1\" already exists. "
"Overwrite it?" ).arg(file),
i18n( "Overwrite File?" ),
@@ -223,10 +223,10 @@ bool KIconEditIcon::saveAs(const QImage *image)
-bool KIconEditIcon::save(const QImage *image, const QString &_filename)
+bool KIconEditIcon::save(const TQImage *image, const TQString &_filename)
{
kdDebug(4640) << "KIconEditIcon::save" << endl;
- QString filename = _filename;
+ TQString filename = _filename;
if(filename.isEmpty())
{
@@ -241,11 +241,11 @@ bool KIconEditIcon::save(const QImage *image, const QString &_filename)
}
}
- QImage *img = (QImage*)image;
+ TQImage *img = (TQImage*)image;
img->setAlphaBuffer(true);
KURL turl(filename);
- QString str = turl.path();
+ TQString str = turl.path();
bool savedOk = false;
/* base image type on file extension - let kimageio
@@ -265,8 +265,8 @@ bool KIconEditIcon::save(const QImage *image, const QString &_filename)
}
else
{
- QString msg = i18n("There was an error saving:\n%1\n").arg(str);
- KMessageBox::error((QWidget*)parent(), msg);
+ TQString msg = i18n("There was an error saving:\n%1\n").arg(str);
+ KMessageBox::error((TQWidget*)parent(), msg);
kdDebug(4640) << "KIconEditIcon::save - " << msg << endl;
}
diff --git a/kiconedit/kicon.h b/kiconedit/kicon.h
index 3af48c14..d808995e 100644
--- a/kiconedit/kicon.h
+++ b/kiconedit/kicon.h
@@ -41,37 +41,37 @@
#include <sys/stat.h>
#include <sys/file.h>
-class QImage;
+class TQImage;
class KIconEditIcon : public QObject
{
Q_OBJECT
public:
- KIconEditIcon(QObject*, const QImage*, KURL url = KURL() );
+ KIconEditIcon(TQObject*, const TQImage*, KURL url = KURL() );
~KIconEditIcon();
bool isLocal() { return local; }
- QString url() { return _url; }
- void setUrl( const QString & u ) { _url = u; };
+ TQString url() { return _url; }
+ void setUrl( const TQString & u ) { _url = u; };
public slots:
- bool open(const QImage*, KURL url = KURL());
- bool promptForFile(const QImage*);
- bool save(const QImage*, const QString &filename=QString::null);
- bool saveAs(const QImage*);
+ bool open(const TQImage*, KURL url = KURL());
+ bool promptForFile(const TQImage*);
+ bool save(const TQImage*, const TQString &filename=TQString::null);
+ bool saveAs(const TQImage*);
signals:
- void newmessage( const QString &);
- void newname(const QString &);
- void addrecent(const QString &);
- void opennewwin(const QString &);
- void loaded(QImage *);
+ void newmessage( const TQString &);
+ void newname(const TQString &);
+ void addrecent(const TQString &);
+ void opennewwin(const TQString &);
+ void loaded(TQImage *);
void saved();
protected:
bool local;
- QString _url;
- QString _lastdir;
+ TQString _url;
+ TQString _lastdir;
FILE *f;
};
diff --git a/kiconedit/kiconcolors.cpp b/kiconedit/kiconcolors.cpp
index 549f74d2..d3046ad4 100644
--- a/kiconedit/kiconcolors.cpp
+++ b/kiconedit/kiconcolors.cpp
@@ -18,14 +18,14 @@
Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
-#include <qdrawutil.h>
+#include <tqpainter.h>
+#include <tqdrawutil.h>
#include <kdebug.h>
#include "kiconcolors.h"
-KDrawColors::KDrawColors(QWidget *parent) : KColorGrid(parent, 0, 3)
+KDrawColors::KDrawColors(TQWidget *parent) : KColorGrid(parent, 0, 3)
{
kdDebug(4640) << "KDrawColors - constructor" << endl;
setCellSize(17);
@@ -35,11 +35,11 @@ KDrawColors::KDrawColors(QWidget *parent) : KColorGrid(parent, 0, 3)
kdDebug(4640) << "KDrawColors - constructor - done" << endl;
}
-void KDrawColors::paintCell( QPainter *painter, int row, int col )
+void KDrawColors::paintCell( TQPainter *painter, int row, int col )
{
//KColorGrid::paintCell(painter, row, col);
uint c = colorAt( row * numCols() + col );
- QBrush brush(c);
+ TQBrush brush(c);
int d = spacing();
qDrawShadePanel( painter, d, d, cellSize()-d, cellSize()-d,
@@ -48,7 +48,7 @@ void KDrawColors::paintCell( QPainter *painter, int row, int col )
painter->drawWinFocusRect( d+1, d+1, cellSize()-(2*d)+1, cellSize()-(2*d)+1 );
}
-void KDrawColors::mouseReleaseEvent( QMouseEvent *e )
+void KDrawColors::mouseReleaseEvent( TQMouseEvent *e )
{
int row = findRow( e->pos().y() );
int col = findCol( e->pos().x() );
@@ -65,7 +65,7 @@ void KDrawColors::mouseReleaseEvent( QMouseEvent *e )
emit newColor(colorAt(cell)|OPAQUE_MASK);
}
-KSysColors::KSysColors(QWidget *parent) : KDrawColors(parent)
+KSysColors::KSysColors(TQWidget *parent) : KDrawColors(parent)
{
kdDebug(4640) << "KSysColors - constructor" << endl;
@@ -85,7 +85,7 @@ KSysColors::KSysColors(QWidget *parent) : KDrawColors(parent)
kdDebug(4640) << "KSysColors - constructor - done" << endl;
}
-KCustomColors::KCustomColors(QWidget *parent) : KDrawColors(parent)
+KCustomColors::KCustomColors(TQWidget *parent) : KDrawColors(parent)
{
kdDebug(4640) << "KCustomColors - constructor" << endl;
setNumRows(3);
@@ -103,12 +103,12 @@ KCustomColors::~KCustomColors()
delete [] freecells;
}
-void KCustomColors::mouseDoubleClickEvent(QMouseEvent *e)
+void KCustomColors::mouseDoubleClickEvent(TQMouseEvent *e)
{
int row = findRow( e->pos().y() );
int col = findCol( e->pos().x() );
int cell = row * numCols() + col;
- QColor color=colorAt(cell);
+ TQColor color=colorAt(cell);
if(KColorDialog::getColor(color))
{
setColor(cell, color.rgb());
@@ -124,7 +124,7 @@ void KCustomColors::addColor(uint c)
int f = getFreeCell();
if(f != -1)
{
- QColor color(c);
+ TQColor color(c);
if(!color.isValid())
{
kdDebug(4640) << "KCustomColors::addColor: Not a valid color: " << c << endl;
diff --git a/kiconedit/kiconcolors.h b/kiconedit/kiconcolors.h
index a4293ff3..71d8b240 100644
--- a/kiconedit/kiconcolors.h
+++ b/kiconedit/kiconcolors.h
@@ -21,7 +21,7 @@
#ifndef __KDRAWCOLORS_H__
#define __KDRAWCOLORS_H__
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kcolordialog.h>
@@ -32,7 +32,7 @@ class KDrawColors : public KColorGrid
{
Q_OBJECT
public:
- KDrawColors(QWidget *parent);
+ KDrawColors(TQWidget *parent);
//bool hasColor(uint);
@@ -40,8 +40,8 @@ signals:
void newColor(uint);
protected:
- virtual void paintCell( QPainter*, int, int );
- virtual void mouseReleaseEvent(QMouseEvent*);
+ virtual void paintCell( TQPainter*, int, int );
+ virtual void mouseReleaseEvent(TQMouseEvent*);
int selected;
};
@@ -50,20 +50,20 @@ class KCustomColors : public KDrawColors
{
Q_OBJECT
public:
- KCustomColors(QWidget *parent);
+ KCustomColors(TQWidget *parent);
~KCustomColors();
void addColor(uint);
void clear();
protected:
- virtual void mouseDoubleClickEvent(QMouseEvent*);
+ virtual void mouseDoubleClickEvent(TQMouseEvent*);
int getFreeCell();
void freeAllCells();
protected:
bool *freecells;
- QPopupMenu *popup;
+ TQPopupMenu *popup;
};
class KSysColors : public KDrawColors
@@ -71,7 +71,7 @@ class KSysColors : public KDrawColors
Q_OBJECT
public:
- KSysColors(QWidget *parent);
+ KSysColors(TQWidget *parent);
};
diff --git a/kiconedit/kiconconfig.cpp b/kiconedit/kiconconfig.cpp
index e7677e30..d4621a0b 100644
--- a/kiconedit/kiconconfig.cpp
+++ b/kiconedit/kiconconfig.cpp
@@ -20,12 +20,12 @@
#include <stdlib.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qvbox.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqvbox.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
#include <kaccel.h>
#include <kbuttonbox.h>
@@ -46,33 +46,33 @@
#endif
// little helper:
-static inline QPixmap loadIcon( const char * name )
+static inline TQPixmap loadIcon( const char * name )
{
return KGlobal::instance()->iconLoader()
- ->loadIcon( QString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium );
+ ->loadIcon( TQString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium );
}
-KTemplateEditDlg::KTemplateEditDlg(QWidget *parent)
+KTemplateEditDlg::KTemplateEditDlg(TQWidget *parent)
: KDialogBase(parent, "KTemplateEditDlg", true, i18n( "Icon Template" ),
Ok|Cancel )
{
- QFrame *frame = makeMainWidget();
- QVBoxLayout *ml = new QVBoxLayout(frame);
- QGroupBox *grp = new QGroupBox(i18n("Template"), frame);
+ TQFrame *frame = makeMainWidget();
+ TQVBoxLayout *ml = new TQVBoxLayout(frame);
+ TQGroupBox *grp = new TQGroupBox(i18n("Template"), frame);
grp->setColumnLayout(0, Qt::Vertical);
grp->layout()->setSpacing(spacingHint());
grp->layout()->setMargin(marginHint());
- QGridLayout *l = new QGridLayout(grp->layout());
+ TQGridLayout *l = new TQGridLayout(grp->layout());
- ln_name = new QLineEdit( grp );
- connect( ln_name, SIGNAL( textChanged( const QString & ) ),
- SLOT( slotTextChanged() ) );
- QLabel* lb_name = new QLabel( ln_name, i18n( "Description:" ), grp );
+ ln_name = new TQLineEdit( grp );
+ connect( ln_name, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SLOT( slotTextChanged() ) );
+ TQLabel* lb_name = new TQLabel( ln_name, i18n( "Description:" ), grp );
ln_path = new KURLRequester(grp);
- connect( ln_path, SIGNAL( textChanged( const QString & ) ),
- SLOT( slotTextChanged() ) );
- QLabel* lb_path = new QLabel( ln_path, i18n( "Path:" ), grp );
+ connect( ln_path, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SLOT( slotTextChanged() ) );
+ TQLabel* lb_path = new TQLabel( ln_path, i18n( "Path:" ), grp );
l->addWidget(lb_name, 0, 0);
l->addWidget(ln_name, 0, 1);
@@ -88,49 +88,49 @@ KTemplateEditDlg::KTemplateEditDlg(QWidget *parent)
void KTemplateEditDlg::slotTextChanged()
{
- QString name = ln_name->text(), path = ln_path->url();
+ TQString name = ln_name->text(), path = ln_path->url();
enableButtonOK(name.length() && path.length());
}
-void KTemplateEditDlg::setName(const QString & name)
+void KTemplateEditDlg::setName(const TQString & name)
{
ln_name->setText(name);
}
-QString KTemplateEditDlg::name()
+TQString KTemplateEditDlg::name()
{
return ln_name->text();
}
-void KTemplateEditDlg::setPath(const QString & path)
+void KTemplateEditDlg::setPath(const TQString & path)
{
ln_path->setURL(path);
}
-QString KTemplateEditDlg::path()
+TQString KTemplateEditDlg::path()
{
return ln_path->url();
}
-KTemplateConfig::KTemplateConfig(QWidget *parent) : QWidget(parent)
+KTemplateConfig::KTemplateConfig(TQWidget *parent) : TQWidget(parent)
{
kdDebug(4640) << "KTemplateConfig constructor" << endl;
btadd = btremove = btedit = 0L;
- QGroupBox* grp = new QGroupBox( i18n( "Templates" ), this );
+ TQGroupBox* grp = new TQGroupBox( i18n( "Templates" ), this );
grp->setColumnLayout( 0, Qt::Horizontal );
templates = new KIconListBox( grp );
- connect( templates, SIGNAL( highlighted( int ) ),
- SLOT( checkSelection( int ) ) );
- connect( templates, SIGNAL(doubleClicked( QListBoxItem * ) ),
- SLOT( edit() ) );
+ connect( templates, TQT_SIGNAL( highlighted( int ) ),
+ TQT_SLOT( checkSelection( int ) ) );
+ connect( templates, TQT_SIGNAL(doubleClicked( TQListBoxItem * ) ),
+ TQT_SLOT( edit() ) );
- QVBoxLayout* ml = new QVBoxLayout( this );
+ TQVBoxLayout* ml = new TQVBoxLayout( this );
ml->addWidget( grp );
- QVBoxLayout* l = new QVBoxLayout( grp->layout(), KDialog::spacingHint() );
+ TQVBoxLayout* l = new TQVBoxLayout( grp->layout(), KDialog::spacingHint() );
l->addWidget( templates );
for( unsigned int i = 0; i < KIconTemplateContainer::self()->count(); i++ )
@@ -139,14 +139,14 @@ KTemplateConfig::KTemplateConfig(QWidget *parent) : QWidget(parent)
KButtonBox *bbox = new KButtonBox( grp );
btadd = bbox->addButton( i18n( "&Add..." ) );
- connect( btadd, SIGNAL( clicked() ), SLOT( add() ) );
+ connect( btadd, TQT_SIGNAL( clicked() ), TQT_SLOT( add() ) );
btedit = bbox->addButton( i18n( "&Edit..." ) );
- connect( btedit, SIGNAL( clicked() ), SLOT( edit() ) );
+ connect( btedit, TQT_SIGNAL( clicked() ), TQT_SLOT( edit() ) );
btedit->setEnabled( false );
btremove = bbox->addButton( i18n( "&Remove" ) );
- connect( btremove, SIGNAL( clicked() ), SLOT( remove() ) );
+ connect( btremove, TQT_SIGNAL( clicked() ), TQT_SLOT( remove() ) );
btremove->setEnabled( false );
bbox->addStretch( 1 );
@@ -224,8 +224,8 @@ void KTemplateConfig::edit()
}
}
-KBackgroundConfig::KBackgroundConfig( QWidget* parent )
- : QWidget( parent )
+KBackgroundConfig::KBackgroundConfig( TQWidget* parent )
+ : TQWidget( parent )
{
kdDebug(4640) << "KBackgroundConfig - constructor" << endl;
@@ -238,57 +238,57 @@ KBackgroundConfig::KBackgroundConfig( QWidget* parent )
if(pix.isNull())
{
kdDebug(4640) << "BGPIX: " << pixpath << " not valid!" << endl;
- QPixmap pmlogo((const char**)logo);
+ TQPixmap pmlogo((const char**)logo);
pix = pmlogo;
}
- QVBoxLayout *mainLayout = new QVBoxLayout( this );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( this );
- QGroupBox *grp1 = new QGroupBox( i18n( "Select Background" ), this );
+ TQGroupBox *grp1 = new TQGroupBox( i18n( "Select Background" ), this );
grp1->setColumnLayout(0, Qt::Vertical );
grp1->layout()->setSpacing( KDialog::spacingHint() );
grp1->layout()->setMargin( KDialog::marginHint() );
mainLayout->addWidget( grp1 );
- QGridLayout *grp1Layout = new QGridLayout( grp1->layout(), 3, 2 );
+ TQGridLayout *grp1Layout = new TQGridLayout( grp1->layout(), 3, 2 );
- QButtonGroup* btngrp = new QButtonGroup( grp1 );
+ TQButtonGroup* btngrp = new TQButtonGroup( grp1 );
btngrp->setExclusive( true );
- btngrp->setFrameStyle( QFrame::NoFrame );
- connect( btngrp, SIGNAL( clicked( int ) ), SLOT( slotBackgroundMode( int ) ) );
+ btngrp->setFrameStyle( TQFrame::NoFrame );
+ connect( btngrp, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( slotBackgroundMode( int ) ) );
grp1Layout->addWidget( btngrp, 0, 0 );
- QVBoxLayout *bgl = new QVBoxLayout( btngrp, 5 );
+ TQVBoxLayout *bgl = new TQVBoxLayout( btngrp, 5 );
- QRadioButton *rbc = new QRadioButton( i18n( "Use co&lor" ), btngrp );
+ TQRadioButton *rbc = new TQRadioButton( i18n( "Use co&lor" ), btngrp );
btngrp->insert( rbc, 0 );
bgl->addWidget( rbc );
- QRadioButton *rbp = new QRadioButton( i18n( "Use pix&map" ), btngrp );
+ TQRadioButton *rbp = new TQRadioButton( i18n( "Use pix&map" ), btngrp );
btngrp->insert( rbp, 1 );
bgl->addWidget( rbp );
bgl->addStretch( 1 );
- QVBox *bbox = new QVBox( grp1 );
+ TQVBox *bbox = new TQVBox( grp1 );
grp1Layout->addWidget( bbox, 0, 1 );
btcolor = new KColorButton(props->bgColor(), bbox) ;
- connect(btcolor, SIGNAL(changed(const QColor &)),
- SLOT( selectColor(const QColor &)));
+ connect(btcolor, TQT_SIGNAL(changed(const TQColor &)),
+ TQT_SLOT( selectColor(const TQColor &)));
- btpix = new QPushButton(i18n( "Choose..." ), bbox);
- connect( btpix, SIGNAL( clicked() ), SLOT( selectPixmap() ) );
+ btpix = new TQPushButton(i18n( "Choose..." ), bbox);
+ connect( btpix, TQT_SIGNAL( clicked() ), TQT_SLOT( selectPixmap() ) );
- QGroupBox *grp2 = new QGroupBox( i18n( "Preview" ), this );
+ TQGroupBox *grp2 = new TQGroupBox( i18n( "Preview" ), this );
mainLayout->addWidget( grp2, 1 );
- QBoxLayout *l2 = new QVBoxLayout( grp2, 15 );
+ TQBoxLayout *l2 = new TQVBoxLayout( grp2, 15 );
l2->addSpacing( 10 );
- lb_ex = new QLabel( grp2 );
- lb_ex->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ lb_ex = new TQLabel( grp2 );
+ lb_ex->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
l2->addWidget( lb_ex );
/*
@@ -297,7 +297,7 @@ KBackgroundConfig::KBackgroundConfig( QWidget* parent )
*/
bgmode = props->bgMode();
- if( bgmode == QWidget::FixedPixmap )
+ if( bgmode == TQWidget::FixedPixmap )
{
btngrp->setButton( 1 );
btcolor->setEnabled( false );
@@ -319,7 +319,7 @@ void KBackgroundConfig::slotBackgroundMode(int id)
{
if(id == 0)
{
- bgmode = QWidget::FixedColor;
+ bgmode = TQWidget::FixedColor;
btpix->setEnabled(false);
btcolor->setEnabled(true);
if(lb_ex)
@@ -327,7 +327,7 @@ void KBackgroundConfig::slotBackgroundMode(int id)
}
else
{
- bgmode = QWidget::FixedPixmap;
+ bgmode = TQWidget::FixedPixmap;
btpix->setEnabled(true);
btcolor->setEnabled(false);
if(lb_ex)
@@ -345,7 +345,7 @@ void KBackgroundConfig::saveSettings()
kdDebug(4640) << "KBackgroundConfig::saveSettings - done" << endl;
}
-void KBackgroundConfig::selectColor(const QColor & newColor)
+void KBackgroundConfig::selectColor(const TQColor & newColor)
{
lb_ex->setBackgroundColor(newColor);
}
@@ -364,7 +364,7 @@ void KBackgroundConfig::selectPixmap()
return;
}
- QPixmap p(url.path());
+ TQPixmap p(url.path());
if( !p.isNull() )
{
@@ -373,70 +373,70 @@ void KBackgroundConfig::selectPixmap()
}
}
-KMiscConfig::KMiscConfig(QWidget *parent) : QWidget(parent)
+KMiscConfig::KMiscConfig(TQWidget *parent) : TQWidget(parent)
{
kdDebug(4640) << "KMiscConfig - constructor" << endl;
KIconEditProperties* props = KIconEditProperties::self();
- QBoxLayout *ml = new QVBoxLayout( this, 0, 5 );
+ TQBoxLayout *ml = new TQVBoxLayout( this, 0, 5 );
- QCheckBox *cbp = new QCheckBox( i18n( "Paste &transparent pixels" ), this );
- connect( cbp, SIGNAL( toggled( bool ) ), SLOT( pasteMode( bool ) ) );
+ TQCheckBox *cbp = new TQCheckBox( i18n( "Paste &transparent pixels" ), this );
+ connect( cbp, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( pasteMode( bool ) ) );
ml->addWidget(cbp);
- QCheckBox *cbr = new QCheckBox( i18n( "Show &rulers" ), this );
- connect( cbr, SIGNAL( toggled( bool ) ), SLOT( showRulers( bool ) ) );
+ TQCheckBox *cbr = new TQCheckBox( i18n( "Show &rulers" ), this );
+ connect( cbr, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( showRulers( bool ) ) );
ml->addWidget(cbr);
- QButtonGroup* btngrp = new QButtonGroup( i18n( "Transparency Display" ), this);
+ TQButtonGroup* btngrp = new TQButtonGroup( i18n( "Transparency Display" ), this);
btngrp->setExclusive( true );
- connect( btngrp, SIGNAL( clicked( int ) ), SLOT( slotTransparencyDisplayType( int ) ) );
+ connect( btngrp, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( slotTransparencyDisplayType( int ) ) );
ml->addWidget( btngrp );
- QVBoxLayout *tgl = new QVBoxLayout( btngrp, KDialog::marginHint(), KDialog::spacingHint() );
+ TQVBoxLayout *tgl = new TQVBoxLayout( btngrp, KDialog::marginHint(), KDialog::spacingHint() );
tgl->insertSpacing(0, 10);
- QHBoxLayout *hl = new QHBoxLayout(tgl);
+ TQHBoxLayout *hl = new TQHBoxLayout(tgl);
- QRadioButton *solidColorRButton = new QRadioButton( i18n( "&Solid color:" ), btngrp );
+ TQRadioButton *solidColorRButton = new TQRadioButton( i18n( "&Solid color:" ), btngrp );
btngrp->insert( solidColorRButton, 0 );
hl->addWidget( solidColorRButton );
m_solidColorButton = new KColorButton(props->transparencySolidColor(), btngrp);
btngrp->insert( m_solidColorButton, 2 );
hl->addWidget(m_solidColorButton);
- //connect(btcolor, SIGNAL(changed(const QColor &)),
- // SLOT( selectColor(const QColor &)));
+ //connect(btcolor, TQT_SIGNAL(changed(const TQColor &)),
+ // TQT_SLOT( selectColor(const TQColor &)));
- QRadioButton *checkerboardRButton = new QRadioButton( i18n( "Checker&board" ), btngrp );
+ TQRadioButton *checkerboardRButton = new TQRadioButton( i18n( "Checker&board" ), btngrp );
btngrp->insert( checkerboardRButton, 1 );
tgl->addWidget( checkerboardRButton );
- QGridLayout *grid = new QGridLayout(tgl, 3, 3);
+ TQGridLayout *grid = new TQGridLayout(tgl, 3, 3);
grid->addColSpacing(0, 40);
grid->setColStretch(1, 1);
grid->setColStretch(2, 1);
- m_checkerboardSizeCombo = new QComboBox(btngrp);
+ m_checkerboardSizeCombo = new TQComboBox(btngrp);
m_checkerboardSizeCombo->insertItem( i18n( "Small" ) );
m_checkerboardSizeCombo->insertItem( i18n( "Medium" ) );
m_checkerboardSizeCombo->insertItem( i18n( "Large" ) );
m_checkerboardSizeCombo->setCurrentItem(props->checkerboardSize());
- QLabel *label = new QLabel(m_checkerboardSizeCombo, i18n("Si&ze:"), btngrp);
+ TQLabel *label = new TQLabel(m_checkerboardSizeCombo, i18n("Si&ze:"), btngrp);
grid->addWidget(label, 0, 1);
grid->addWidget(m_checkerboardSizeCombo, 0, 2);
m_checkerboardColor1Button = new KColorButton(props->checkerboardColor1(), btngrp);
- label = new QLabel(m_checkerboardColor1Button, i18n("Color &1:"), btngrp);
+ label = new TQLabel(m_checkerboardColor1Button, i18n("Color &1:"), btngrp);
grid->addWidget(label, 1, 1);
grid->addWidget(m_checkerboardColor1Button, 1, 2);
m_checkerboardColor2Button = new KColorButton(props->checkerboardColor2(), btngrp);
- label = new QLabel(m_checkerboardColor2Button, i18n("Color &2:"), btngrp);
+ label = new TQLabel(m_checkerboardColor2Button, i18n("Color &2:"), btngrp);
grid->addWidget(label, 2, 1);
grid->addWidget(m_checkerboardColor2Button, 2, 2);
@@ -524,7 +524,7 @@ void KMiscConfig::slotTransparencyDisplayType(int id)
}
}
-KIconConfig::KIconConfig(QWidget *parent)
+KIconConfig::KIconConfig(TQWidget *parent)
: KDialogBase(KDialogBase::IconList, i18n("Configure"),
KDialogBase::Help |
KDialogBase::Ok |
@@ -533,20 +533,20 @@ KIconConfig::KIconConfig(QWidget *parent)
KDialogBase::Ok,
parent, "configDialog", true, true)
{
- setHelp(QString::null);
+ setHelp(TQString::null);
//KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
- connect(this, SIGNAL(finished()), this, SLOT(finis()));
+ connect(this, TQT_SIGNAL(finished()), this, TQT_SLOT(finis()));
- QVBox* page = addVBoxPage(i18n("Icon Templates"), QString::null, loadIcon("icons"));
+ TQVBox* page = addVBoxPage(i18n("Icon Templates"), TQString::null, loadIcon("icons"));
temps = new KTemplateConfig(page);
- page = addVBoxPage(i18n("Background"), QString::null, loadIcon("background"));
+ page = addVBoxPage(i18n("Background"), TQString::null, loadIcon("background"));
backs = new KBackgroundConfig(page);
- page = addVBoxPage(i18n("Icon Grid"), QString::null, loadIcon("kiconedit"));
+ page = addVBoxPage(i18n("Icon Grid"), TQString::null, loadIcon("kiconedit"));
misc = new KMiscConfig(page);
- QSize min(300, 400);
+ TQSize min(300, 400);
if (300 < sizeHint().width()) { min.setWidth(sizeHint().width()); }
if (400 < sizeHint().height()) { min.setHeight(sizeHint().height()); }
diff --git a/kiconedit/kiconconfig.h b/kiconedit/kiconconfig.h
index 04483732..be1450d3 100644
--- a/kiconedit/kiconconfig.h
+++ b/kiconedit/kiconconfig.h
@@ -21,7 +21,7 @@
#ifndef __KICONCONFIG_H__
#define __KICONCONFIG_H__
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kdialogbase.h>
#include "knew.h"
@@ -36,25 +36,25 @@ class KAccel;
class KKeyChooser;
class KColorButton;
class KURLRequester;
-class QComboBox;
+class TQComboBox;
class KTemplateEditDlg : public KDialogBase
{
Q_OBJECT
public:
- KTemplateEditDlg(QWidget *);
+ KTemplateEditDlg(TQWidget *);
~KTemplateEditDlg() {};
- QString name();
- QString path();
- void setName(const QString &);
- void setPath(const QString &);
+ TQString name();
+ TQString path();
+ void setName(const TQString &);
+ void setPath(const TQString &);
public slots:
void slotTextChanged();
protected:
- QLineEdit *ln_name;
+ TQLineEdit *ln_name;
KURLRequester *ln_path;
};
@@ -62,7 +62,7 @@ class KTemplateConfig : public QWidget
{
Q_OBJECT
public:
- KTemplateConfig(QWidget*);
+ KTemplateConfig(TQWidget*);
~KTemplateConfig();
void saveSettings();
@@ -75,19 +75,19 @@ protected slots:
protected:
KIconListBox *templates;
- QPushButton *btadd, *btedit, *btremove;
+ TQPushButton *btadd, *btedit, *btremove;
};
class KBackgroundConfig : public QWidget
{
Q_OBJECT
public:
- KBackgroundConfig(QWidget *parent);
+ KBackgroundConfig(TQWidget *parent);
~KBackgroundConfig();
public slots:
void saveSettings();
- void selectColor(const QColor & newColor);
+ void selectColor(const TQColor & newColor);
void selectPixmap();
signals:
@@ -97,18 +97,18 @@ protected slots:
protected:
KColorButton *btcolor;
- QPushButton *btpix;
- QPixmap pix;
- QString pixpath;
- QWidget::BackgroundMode bgmode;
- QLabel *lb_ex;
+ TQPushButton *btpix;
+ TQPixmap pix;
+ TQString pixpath;
+ TQWidget::BackgroundMode bgmode;
+ TQLabel *lb_ex;
};
class KMiscConfig : public QWidget
{
Q_OBJECT
public:
- KMiscConfig(QWidget *parent);
+ KMiscConfig(TQWidget *parent);
~KMiscConfig();
public slots:
@@ -123,11 +123,11 @@ signals:
protected:
bool pastemode, showrulers;
- QRadioButton *rbp;
+ TQRadioButton *rbp;
KColorButton *m_solidColorButton;
KColorButton *m_checkerboardColor1Button;
KColorButton *m_checkerboardColor2Button;
- QComboBox *m_checkerboardSizeCombo;
+ TQComboBox *m_checkerboardSizeCombo;
};
class KIconConfig : public KDialogBase
@@ -136,7 +136,7 @@ class KIconConfig : public KDialogBase
public:
- KIconConfig(QWidget *parent);
+ KIconConfig(TQWidget *parent);
~KIconConfig();
protected slots:
diff --git a/kiconedit/kiconedit.cpp b/kiconedit/kiconedit.cpp
index 13cd4b89..74325458 100644
--- a/kiconedit/kiconedit.cpp
+++ b/kiconedit/kiconedit.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qwhatsthis.h>
-#include <qtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
#include <kpopupmenu.h>
#include <kstdaction.h>
@@ -33,7 +33,7 @@
WindowList KIconEdit::windowList;
-KIconEdit::KIconEdit(const QImage image, const char *name)
+KIconEdit::KIconEdit(const TQImage image, const char *name)
: KMainWindow(0, name)
{
init();
@@ -74,53 +74,53 @@ void KIconEdit::init()
createGUI();
- connect(this, SIGNAL(newname(const QString &)),
- SLOT( slotUpdateStatusName(const QString &)));
-
- connect( icon, SIGNAL( saved()), SLOT(slotSaved()));
- connect( icon, SIGNAL( loaded(QImage *)), grid, SLOT(load(QImage *)));
- connect( icon, SIGNAL(opennewwin(const QString &)),
- SLOT(slotNewWin(const QString &)));
- connect(icon, SIGNAL(newname(const QString &)),
- SLOT( slotUpdateStatusName(const QString &)));
- connect(icon, SIGNAL(newmessage(const QString &)),
- SLOT( slotUpdateStatusMessage(const QString &)));
- connect(icon, SIGNAL(addrecent(const QString &)),
- SLOT( addRecent(const QString &)));
-
- connect( m_paletteToolBar, SIGNAL( newColor(uint)),
- grid, SLOT(setColorSelection(uint)));
-
- connect( grid, SIGNAL( changed(const QPixmap &) ),
- m_paletteToolBar, SLOT( previewChanged(const QPixmap &) ) );
- connect( grid, SIGNAL( addingcolor(uint) ),
- m_paletteToolBar, SLOT(addColor(uint)));
- connect( grid, SIGNAL( colorschanged(uint, uint*) ),
- m_paletteToolBar, SLOT(addColors(uint, uint*)));
-
- connect(grid, SIGNAL(sizechanged(int, int)),
- SLOT( slotUpdateStatusSize(int, int)));
- connect(grid, SIGNAL(poschanged(int, int)),
- SLOT( slotUpdateStatusPos(int, int)));
- connect(grid, SIGNAL(scalingchanged(int)),
- SLOT( slotUpdateStatusScaling(int)));
- connect(grid, SIGNAL(scalingchanged(int)),
- SLOT( slotUpdateZoom(int)));
- connect( grid, SIGNAL( addingcolor(uint) ),
- SLOT(slotUpdateStatusColors(uint)));
- connect(grid, SIGNAL(colorschanged(uint, uint*)),
- SLOT( slotUpdateStatusColors(uint, uint*)));
- connect(grid, SIGNAL(newmessage(const QString &)),
- SLOT( slotUpdateStatusMessage(const QString &)));
- connect(grid, SIGNAL(clipboarddata(bool)),
- SLOT( slotUpdatePaste(bool)));
- connect(grid, SIGNAL(colorSelected(uint)),
- m_paletteToolBar, SLOT(currentColorChanged(uint)));
- connect(grid, SIGNAL(modifiedchanged(bool)),
- SLOT( slotUpdateStatusModified(bool)));
+ connect(this, TQT_SIGNAL(newname(const TQString &)),
+ TQT_SLOT( slotUpdateStatusName(const TQString &)));
+
+ connect( icon, TQT_SIGNAL( saved()), TQT_SLOT(slotSaved()));
+ connect( icon, TQT_SIGNAL( loaded(TQImage *)), grid, TQT_SLOT(load(TQImage *)));
+ connect( icon, TQT_SIGNAL(opennewwin(const TQString &)),
+ TQT_SLOT(slotNewWin(const TQString &)));
+ connect(icon, TQT_SIGNAL(newname(const TQString &)),
+ TQT_SLOT( slotUpdateStatusName(const TQString &)));
+ connect(icon, TQT_SIGNAL(newmessage(const TQString &)),
+ TQT_SLOT( slotUpdateStatusMessage(const TQString &)));
+ connect(icon, TQT_SIGNAL(addrecent(const TQString &)),
+ TQT_SLOT( addRecent(const TQString &)));
+
+ connect( m_paletteToolBar, TQT_SIGNAL( newColor(uint)),
+ grid, TQT_SLOT(setColorSelection(uint)));
+
+ connect( grid, TQT_SIGNAL( changed(const TQPixmap &) ),
+ m_paletteToolBar, TQT_SLOT( previewChanged(const TQPixmap &) ) );
+ connect( grid, TQT_SIGNAL( addingcolor(uint) ),
+ m_paletteToolBar, TQT_SLOT(addColor(uint)));
+ connect( grid, TQT_SIGNAL( colorschanged(uint, uint*) ),
+ m_paletteToolBar, TQT_SLOT(addColors(uint, uint*)));
+
+ connect(grid, TQT_SIGNAL(sizechanged(int, int)),
+ TQT_SLOT( slotUpdateStatusSize(int, int)));
+ connect(grid, TQT_SIGNAL(poschanged(int, int)),
+ TQT_SLOT( slotUpdateStatusPos(int, int)));
+ connect(grid, TQT_SIGNAL(scalingchanged(int)),
+ TQT_SLOT( slotUpdateStatusScaling(int)));
+ connect(grid, TQT_SIGNAL(scalingchanged(int)),
+ TQT_SLOT( slotUpdateZoom(int)));
+ connect( grid, TQT_SIGNAL( addingcolor(uint) ),
+ TQT_SLOT(slotUpdateStatusColors(uint)));
+ connect(grid, TQT_SIGNAL(colorschanged(uint, uint*)),
+ TQT_SLOT( slotUpdateStatusColors(uint, uint*)));
+ connect(grid, TQT_SIGNAL(newmessage(const TQString &)),
+ TQT_SLOT( slotUpdateStatusMessage(const TQString &)));
+ connect(grid, TQT_SIGNAL(clipboarddata(bool)),
+ TQT_SLOT( slotUpdatePaste(bool)));
+ connect(grid, TQT_SIGNAL(colorSelected(uint)),
+ m_paletteToolBar, TQT_SLOT(currentColorChanged(uint)));
+ connect(grid, TQT_SIGNAL(modifiedchanged(bool)),
+ TQT_SLOT( slotUpdateStatusModified(bool)));
gridview->checkClipboard(); //Not very elegant, but fixes a buglet
- connect(grid, SIGNAL(selecteddata(bool)), SLOT( slotUpdateCopy(bool)));
+ connect(grid, TQT_SIGNAL(selecteddata(bool)), TQT_SLOT( slotUpdateCopy(bool)));
kdDebug(4640) << "Updating statusbar" << endl;
slotUpdateStatusSize(grid->cols(), grid->rows());
@@ -165,7 +165,7 @@ bool KIconEdit::queryClose()
if (grid->isModified())
{
int r = KMessageBox::warningYesNoCancel(this,
- i18n("The current file has been modified.\nDo you want to save it?"), QString::null, KStdGuiItem::save(), KStdGuiItem::discard());
+ i18n("The current file has been modified.\nDo you want to save it?"), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard());
switch(r)
{
@@ -204,7 +204,7 @@ void KIconEdit::readProperties(KConfig *config)
{
kdDebug(4640) << "KIconEdit::readProperties" << endl;
- QString entry = config->readPathEntry("Name"); // no default
+ TQString entry = config->readPathEntry("Name"); // no default
if (entry.isEmpty()) return;
icon->open(&grid->image(), KURL::fromPathOrURL( entry ));
}
@@ -222,12 +222,12 @@ void KIconEdit::writeConfig()
saveMainWindowSettings( config, "MainWindowSettings" );
}
-QSize KIconEdit::sizeHint() const
+TQSize KIconEdit::sizeHint() const
{
if(gridview)
return gridview->sizeHint();
else
- return QSize(-1, -1);
+ return TQSize(-1, -1);
}
void KIconEdit::setupActions()
@@ -240,43 +240,43 @@ void KIconEdit::setupActions()
// File Menu
action = new KAction(i18n("New &Window"), "window_new", cut,
- this, SLOT(slotNewWin()), actionCollection(), "file_new_window");
+ this, TQT_SLOT(slotNewWin()), actionCollection(), "file_new_window");
action->setWhatsThis(i18n("New window\n\nOpens a new icon editor window."));
- action = KStdAction::openNew(this, SLOT(slotNew()), actionCollection());
+ action = KStdAction::openNew(this, TQT_SLOT(slotNew()), actionCollection());
action->setWhatsThis(i18n("New\n\nCreate a new icon, either from a"
" template or by specifying the size"));
- action = KStdAction::open(this, SLOT(slotOpen()), actionCollection());
+ action = KStdAction::open(this, TQT_SLOT(slotOpen()), actionCollection());
action->setWhatsThis(i18n("Open\n\nOpen an existing icon"));
m_actRecent = KStdAction::openRecent(this,
- SLOT(slotOpenRecent(const KURL&)), actionCollection());
+ TQT_SLOT(slotOpenRecent(const KURL&)), actionCollection());
m_actRecent->setMaxItems(15); // FIXME should be configurable!
m_actRecent->loadEntries(kapp->config());
- action = KStdAction::save(this, SLOT(slotSave()), actionCollection());
+ action = KStdAction::save(this, TQT_SLOT(slotSave()), actionCollection());
action->setWhatsThis(i18n("Save\n\nSave the current icon"));
- KStdAction::saveAs(this, SLOT(slotSaveAs()), actionCollection());
+ KStdAction::saveAs(this, TQT_SLOT(slotSaveAs()), actionCollection());
- action = KStdAction::print(this, SLOT(slotPrint()), actionCollection());
+ action = KStdAction::print(this, TQT_SLOT(slotPrint()), actionCollection());
action->setWhatsThis(i18n("Print\n\nOpens a print dialog to let you print"
" the current icon."));
- KStdAction::close(this, SLOT(slotClose()), actionCollection());
+ KStdAction::close(this, TQT_SLOT(slotClose()), actionCollection());
// Edit Menu
- m_actCut = KStdAction::cut(this, SLOT(slotCut()), actionCollection());
+ m_actCut = KStdAction::cut(this, TQT_SLOT(slotCut()), actionCollection());
m_actCut->setWhatsThis(i18n("Cut\n\nCut the current selection out of the"
" icon.\n\n(Tip: You can make both rectangular and circular selections)"));
- m_actCopy = KStdAction::copy(this, SLOT(slotCopy()), actionCollection());
+ m_actCopy = KStdAction::copy(this, TQT_SLOT(slotCopy()), actionCollection());
m_actCopy->setWhatsThis(i18n("Copy\n\nCopy the current selection out of the"
" icon.\n\n(Tip: You can make both rectangular and circular selections)"));
- m_actPaste = KStdAction::paste(this, SLOT(slotPaste()), actionCollection());
+ m_actPaste = KStdAction::paste(this, TQT_SLOT(slotPaste()), actionCollection());
m_actPaste->setWhatsThis(i18n("Paste\n\n"
"Paste the contents of the clipboard into the current icon.\n\n"
"If the contents are larger than the current icon you can paste them"
@@ -285,28 +285,28 @@ void KIconEdit::setupActions()
" if you also want to paste transparency.)"));
m_actPasteNew = new KAction( i18n( "Paste as &New" ), cut, grid,
- SLOT( editPasteAsNew() ), actionCollection(), "edit_paste_as_new" );
+ TQT_SLOT( editPasteAsNew() ), actionCollection(), "edit_paste_as_new" );
- KStdAction::clear(this, SLOT(slotClear()), actionCollection());
- KStdAction::selectAll(this, SLOT(slotSelectAll()), actionCollection());
+ KStdAction::clear(this, TQT_SLOT(slotClear()), actionCollection());
+ KStdAction::selectAll(this, TQT_SLOT(slotSelectAll()), actionCollection());
action = new KAction(i18n("Resi&ze..."), "transform", cut,
- grid, SLOT(editResize()), actionCollection(), "edit_resize");
+ grid, TQT_SLOT(editResize()), actionCollection(), "edit_resize");
action->setWhatsThis(i18n("Resize\n\nSmoothly resizes the icon while"
" trying to preserve the contents"));
action = new KAction(i18n("&GrayScale"), "grayscale", cut,
- grid, SLOT(grayScale()), actionCollection(), "edit_grayscale");
+ grid, TQT_SLOT(grayScale()), actionCollection(), "edit_grayscale");
action->setWhatsThis(i18n("Gray scale\n\nGray scale the current icon.\n"
"(Warning: The result is likely to contain colors not in the icon"
" palette"));
// View Menu
- m_actZoomIn = KStdAction::zoomIn(this, SLOT(slotZoomIn()),
+ m_actZoomIn = KStdAction::zoomIn(this, TQT_SLOT(slotZoomIn()),
actionCollection());
m_actZoomIn->setWhatsThis(i18n("Zoom in\n\nZoom in by one."));
- m_actZoomOut = KStdAction::zoomOut(this, SLOT(slotZoomOut()),
+ m_actZoomOut = KStdAction::zoomOut(this, TQT_SLOT(slotZoomOut()),
actionCollection());
m_actZoomOut->setWhatsThis(i18n("Zoom out\n\nZoom out by one."));
@@ -314,26 +314,26 @@ void KIconEdit::setupActions()
actionCollection(), "view_zoom" );
// xgettext:no-c-format
- action = new KAction( i18n( "100%" ), cut, this, SLOT( slotZoom1() ),
+ action = new KAction( i18n( "100%" ), cut, this, TQT_SLOT( slotZoom1() ),
actionCollection(), "view_zoom_1" );
actMenu->insert( action );
// xgettext:no-c-format
- action = new KAction( i18n( "200%" ), cut, this, SLOT( slotZoom2() ),
+ action = new KAction( i18n( "200%" ), cut, this, TQT_SLOT( slotZoom2() ),
actionCollection(), "view_zoom_2" );
actMenu->insert( action );
// xgettext:no-c-format
- action = new KAction( i18n( "500%" ), cut, this, SLOT( slotZoom5() ),
+ action = new KAction( i18n( "500%" ), cut, this, TQT_SLOT( slotZoom5() ),
actionCollection(), "view_zoom_5" );
actMenu->insert( action );
// xgettext:no-c-format
- action = new KAction( i18n( "1000%" ), cut, this, SLOT( slotZoom10() ),
+ action = new KAction( i18n( "1000%" ), cut, this, TQT_SLOT( slotZoom10() ),
actionCollection(), "view_zoom_10" );
actMenu->insert( action );
// Settings Menu
- KStdAction::keyBindings(this, SLOT(slotConfigureKeys()),
+ KStdAction::keyBindings(this, TQT_SLOT(slotConfigureKeys()),
actionCollection());
- KStdAction::preferences(this, SLOT(slotConfigureSettings()),
+ KStdAction::preferences(this, TQT_SLOT(slotConfigureSettings()),
actionCollection());
createStandardStatusBarAction();
@@ -341,7 +341,7 @@ void KIconEdit::setupActions()
KToggleAction *toggle;
toggle = new KToggleAction( i18n( "Show &Grid" ), "grid",
- cut, this, SLOT( slotShowGrid() ), actionCollection(),
+ cut, this, TQT_SLOT( slotShowGrid() ), actionCollection(),
"options_show_grid" );
toggle->setCheckedState(i18n("Hide &Grid"));
toggle->setWhatsThis( i18n( "Show grid\n\nToggles the grid in the icon"
@@ -350,14 +350,14 @@ void KIconEdit::setupActions()
// Tools Menu
toolAction = new KRadioAction(i18n("Color Picker"), "colorpicker",
- cut, this, SLOT(slotToolPointer()), actionCollection(),
+ cut, this, TQT_SLOT(slotToolPointer()), actionCollection(),
"tool_find_pixel");
toolAction->setExclusiveGroup("toolActions");
toolAction->setWhatsThis(i18n("Color Picker\n\nThe color of the pixel clicked"
" on will be the current draw color"));
toolAction = new KRadioAction(i18n("Freehand"), "paintbrush",
- cut, this, SLOT(slotToolFreehand()), actionCollection(),
+ cut, this, TQT_SLOT(slotToolFreehand()), actionCollection(),
"tool_freehand");
toolAction->setExclusiveGroup("toolActions");
toolAction->setWhatsThis(i18n("Free hand\n\nDraw non-linear lines"));
@@ -366,64 +366,64 @@ void KIconEdit::setupActions()
grid->setTool(KIconEditGrid::Freehand);
toolAction = new KRadioAction(i18n("Rectangle"), "rectangle",
- cut, this, SLOT(slotToolRectangle()), actionCollection(),
+ cut, this, TQT_SLOT(slotToolRectangle()), actionCollection(),
"tool_rectangle");
toolAction->setExclusiveGroup("toolActions");
toolAction->setWhatsThis(i18n("Rectangle\n\nDraw a rectangle"));
toolAction = new KRadioAction(i18n("Filled Rectangle"), "filledrectangle",
- cut, this, SLOT(slotToolFilledRectangle()), actionCollection(),
+ cut, this, TQT_SLOT(slotToolFilledRectangle()), actionCollection(),
"tool_filled_rectangle");
toolAction->setExclusiveGroup("toolActions");
toolAction->setWhatsThis(i18n("Filled rectangle\n\nDraw a filled rectangle"));
toolAction = new KRadioAction(i18n("Circle"), "circle",
- cut, this, SLOT(slotToolCircle()), actionCollection(),
+ cut, this, TQT_SLOT(slotToolCircle()), actionCollection(),
"tool_circle");
toolAction->setExclusiveGroup("toolActions");
toolAction->setWhatsThis(i18n("Circle\n\nDraw a circle"));
toolAction = new KRadioAction(i18n("Filled Circle"), "filledcircle",
- cut, this, SLOT(slotToolFilledCircle()), actionCollection(),
+ cut, this, TQT_SLOT(slotToolFilledCircle()), actionCollection(),
"tool_filled_circle");
toolAction->setExclusiveGroup("toolActions");
toolAction->setWhatsThis(i18n("Filled circle\n\nDraw a filled circle"));
toolAction = new KRadioAction(i18n("Ellipse"), "ellipse",
- cut, this, SLOT(slotToolEllipse()), actionCollection(),
+ cut, this, TQT_SLOT(slotToolEllipse()), actionCollection(),
"tool_ellipse");
toolAction->setExclusiveGroup("toolActions");
toolAction->setWhatsThis(i18n("Ellipse\n\nDraw an ellipse"));
toolAction = new KRadioAction(i18n("Filled Ellipse"), "filledellipse",
- cut, this, SLOT(slotToolFilledEllipse()), actionCollection(),
+ cut, this, TQT_SLOT(slotToolFilledEllipse()), actionCollection(),
"tool_filled_ellipse");
toolAction->setExclusiveGroup("toolActions");
toolAction->setWhatsThis(i18n("Filled ellipse\n\nDraw a filled ellipse"));
toolAction = new KRadioAction(i18n("Spray"), "airbrush",
- cut, this, SLOT(slotToolSpray()), actionCollection(),
+ cut, this, TQT_SLOT(slotToolSpray()), actionCollection(),
"tool_spray");
toolAction->setExclusiveGroup("toolActions");
toolAction->setWhatsThis(i18n("Spray\n\nDraw scattered pixels in the"
" current color"));
toolAction = new KRadioAction(i18n("Flood Fill"), "fill",
- cut, this, SLOT(slotToolFlood()), actionCollection(),
+ cut, this, TQT_SLOT(slotToolFlood()), actionCollection(),
"tool_flood_fill");
toolAction->setExclusiveGroup("toolActions");
toolAction->setWhatsThis(i18n("Flood fill\n\nFill adjoining pixels with"
" the same color with the current color"));
toolAction = new KRadioAction(i18n("Line"), "line",
- cut, this, SLOT(slotToolLine()), actionCollection(),
+ cut, this, TQT_SLOT(slotToolLine()), actionCollection(),
"tool_line");
toolAction->setExclusiveGroup("toolActions");
toolAction->setWhatsThis(i18n("Line\n\nDraw a straight line vertically,"
" horizontally or at 45 deg. angles"));
toolAction = new KRadioAction(i18n("Eraser (Transparent)"), "eraser",
- cut, this, SLOT(slotToolEraser()), actionCollection(),
+ cut, this, TQT_SLOT(slotToolEraser()), actionCollection(),
"tool_eraser");
toolAction->setExclusiveGroup("toolActions");
toolAction->setWhatsThis(i18n("Erase\n\nErase pixels. Set the pixels to"
@@ -432,14 +432,14 @@ void KIconEdit::setupActions()
" to use)"));
toolAction = new KRadioAction(i18n("Rectangular Selection"),
- "selectrect", cut, this, SLOT(slotToolSelectRect()),
+ "selectrect", cut, this, TQT_SLOT(slotToolSelectRect()),
actionCollection(), "edit_select_rectangle");
toolAction->setExclusiveGroup( "toolActions" );
toolAction->setWhatsThis(i18n("Select\n\nSelect a rectangular section"
" of the icon using the mouse."));
toolAction = new KRadioAction(i18n("Circular Selection"),
- "selectcircle", cut, this, SLOT(slotToolSelectCircle()),
+ "selectcircle", cut, this, TQT_SLOT(slotToolSelectCircle()),
actionCollection(), "edit_select_circle");
toolAction->setExclusiveGroup( "toolActions" );
toolAction->setWhatsThis(i18n("Select\n\nSelect a circular section of the"
@@ -451,8 +451,8 @@ void KIconEdit::updateAccels()
actionCollection()->readShortcutSettings();
}
-QWidget *KIconEdit::createContainer( QWidget *parent, int index,
- const QDomElement &element, int &id )
+TQWidget *KIconEdit::createContainer( TQWidget *parent, int index,
+ const TQDomElement &element, int &id )
{
if ( element.attribute( "name" ) == "paletteToolBar" )
{
@@ -468,11 +468,11 @@ bool KIconEdit::setupStatusBar()
{
statusbar = statusBar();
- QString str = i18n("Statusbar\n\nThe statusbar gives information on"
+ TQString str = i18n("Statusbar\n\nThe statusbar gives information on"
" the status of the current icon. The fields are:\n\n"
"\t- Application messages\n\t- Cursor position\n\t- Size\n\t- Zoom factor\n"
"\t- Number of colors");
- QWhatsThis::add(statusBar(), str);
+ TQWhatsThis::add(statusBar(), str);
statusbar->insertFixedItem("99999,99999", 0, true);
statusbar->insertFixedItem("99999 x 99999", 1, true);
@@ -489,7 +489,7 @@ bool KIconEdit::setupStatusBar()
return true;
}
-void KIconEdit::addRecent(const QString & path)
+void KIconEdit::addRecent(const TQString & path)
{
m_actRecent->addURL(KURL( path ));
}
diff --git a/kiconedit/kiconedit.h b/kiconedit/kiconedit.h
index 54227206..021223de 100644
--- a/kiconedit/kiconedit.h
+++ b/kiconedit/kiconedit.h
@@ -21,9 +21,9 @@
#ifndef __KICONEDIT_H__
#define __KICONEDIT_H__
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
#include <kmainwindow.h>
#include <kiconloader.h>
@@ -43,11 +43,11 @@
class KIconEdit;
class KCommandHistory;
-typedef QPtrList<KIconEdit> WindowList;
+typedef TQPtrList<KIconEdit> WindowList;
-class QWhatsThis;
-class QToolButton;
-class QLabel;
+class TQWhatsThis;
+class TQToolButton;
+class TQLabel;
class PaletteToolBar;
/**
@@ -61,14 +61,14 @@ class KIconEdit : public KMainWindow
Q_OBJECT
public:
KIconEdit( KURL url = KURL(), const char *name = "kiconedit");
- KIconEdit( const QImage image, const char *name = "kiconedit");
+ KIconEdit( const TQImage image, const char *name = "kiconedit");
~KIconEdit();
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
static WindowList windowList;
signals:
- void newname(const QString &);
+ void newname(const TQString &);
public slots:
virtual void saveProperties(KConfig*);
@@ -76,7 +76,7 @@ public slots:
void updateProperties();
protected slots:
- void slotNewWin(const QString & url = 0);
+ void slotNewWin(const TQString & url = 0);
void slotNew();
void slotOpen();
void slotClose();
@@ -118,17 +118,17 @@ protected slots:
void slotUpdateStatusColors(uint, uint*);
void slotUpdateStatusPos(int, int);
void slotUpdateStatusSize(int, int);
- void slotUpdateStatusMessage(const QString &);
- void slotUpdateStatusName(const QString &);
+ void slotUpdateStatusMessage(const TQString &);
+ void slotUpdateStatusName(const TQString &);
void slotUpdateStatusModified(bool);
void slotUpdateStatusScaling(int);
void slotUpdatePaste(bool);
void slotUpdateCopy(bool);
- void slotOpenBlank(const QSize);
- void addRecent(const QString &);
+ void slotOpenBlank(const TQSize);
+ void addRecent(const TQString &);
- virtual void dragEnterEvent(QDragEnterEvent* event);
- virtual void dropEvent(QDropEvent *e);
+ virtual void dragEnterEvent(TQDragEnterEvent* event);
+ virtual void dropEvent(TQDropEvent *e);
protected:
void init();
@@ -138,7 +138,7 @@ protected:
void updateAccels();
virtual bool queryClose();
- virtual QWidget *createContainer( QWidget*, int, const QDomElement&, int& );
+ virtual TQWidget *createContainer( TQWidget*, int, const TQDomElement&, int& );
KCommandHistory* history;
PaletteToolBar *m_paletteToolBar;
@@ -146,8 +146,8 @@ protected:
KIconEditGrid *grid;
KGridView *gridview;
KIconEditIcon *icon;
- QImage img;
- QString m_name;
+ TQImage img;
+ TQString m_name;
KAction *m_actCopy, *m_actPaste, *m_actCut, *m_actPasteNew;
KAction *m_actZoomIn, *m_actZoomOut;
diff --git a/kiconedit/kiconeditslots.cpp b/kiconedit/kiconeditslots.cpp
index 0d57d28e..ffcca476 100644
--- a/kiconedit/kiconeditslots.cpp
+++ b/kiconedit/kiconeditslots.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qpaintdevicemetrics.h>
-#include <qpainter.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpainter.h>
#include <kkeydialog.h>
#include <klocale.h>
@@ -41,12 +41,12 @@ void KIconEdit::updateProperties()
{
KIconEditProperties *props = KIconEditProperties::self();
gridview->setShowRulers(props->showRulers());
- if(props->bgMode() == QWidget::FixedPixmap)
+ if(props->bgMode() == TQWidget::FixedPixmap)
{
- QPixmap pix(props->bgPixmap());
+ TQPixmap pix(props->bgPixmap());
if(pix.isNull())
{
- QPixmap pmlogo((const char**)logo);
+ TQPixmap pmlogo((const char**)logo);
pix = pmlogo;
}
gridview->viewPortWidget()->viewport()->setBackgroundPixmap(pix);
@@ -66,7 +66,7 @@ void KIconEdit::updateProperties()
grid->update();
}
-void KIconEdit::slotNewWin(const QString & url)
+void KIconEdit::slotNewWin(const TQString & url)
{
//kdDebug(4640) << "KIconEdit::openNewWin() - " << url << endl;
@@ -81,7 +81,7 @@ void KIconEdit::slotNew()
if (grid->isModified())
{
int r = KMessageBox::warningYesNoCancel(this,
- i18n("The current file has been modified.\nDo you want to save it?"), QString::null, KStdGuiItem::save(), KStdGuiItem::discard());
+ i18n("The current file has been modified.\nDo you want to save it?"), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard());
switch(r)
{
@@ -112,14 +112,14 @@ void KIconEdit::slotNew()
if(r == KNewIcon::Blank)
{
grid->editClear();
- const QSize s = newicon.templateSize();
+ const TQSize s = newicon.templateSize();
//kdDebug(4640) << "Size: " << s.width() << " x " << s.height() << endl;
grid->setSize(s);
grid->setModified(false);
}
else if(r == KNewIcon::Template)
{
- QString str = newicon.templatePath();
+ TQString str = newicon.templatePath();
icon->open(&grid->image(), KURL( str ));
}
icon->setUrl("");
@@ -136,7 +136,7 @@ void KIconEdit::slotOpen()
if( grid->isModified() )
{
int r = KMessageBox::warningYesNoCancel(this,
- i18n("The current file has been modified.\nDo you want to save it?"),QString::null, KStdGuiItem::save(), KStdGuiItem::discard());
+ i18n("The current file has been modified.\nDo you want to save it?"),TQString::null, KStdGuiItem::save(), KStdGuiItem::discard());
switch( r )
{
@@ -200,11 +200,11 @@ void KIconEdit::slotPrint()
int margin = 10, yPos = 0;
printer.setCreator("KDE Icon Editor");
- QPainter p;
+ TQPainter p;
p.begin( &printer );
- QFontMetrics fm = p.fontMetrics();
+ TQFontMetrics fm = p.fontMetrics();
// need width/height
- QPaintDeviceMetrics metrics( &printer );
+ TQPaintDeviceMetrics metrics( &printer );
p.drawText( margin, margin + yPos, metrics.width(), fm.lineSpacing(),
ExpandTabs | DontClip, icon->url() );
@@ -280,7 +280,7 @@ void KIconEdit::slotOpenRecent(const KURL& iconFile)
if( grid->isModified() )
{
int r = KMessageBox::warningYesNoCancel(this,
- i18n("The current file has been modified.\nDo you want to save it?"),QString::null, KStdGuiItem::save(), KStdGuiItem::discard());
+ i18n("The current file has been modified.\nDo you want to save it?"),TQString::null, KStdGuiItem::save(), KStdGuiItem::discard());
switch( r )
{
@@ -422,20 +422,20 @@ void KIconEdit::slotUpdateZoom( int s )
void KIconEdit::slotUpdateStatusPos(int x, int y)
{
- QString str = i18n("Status Position", "%1, %2").arg(x).arg(y);
+ TQString str = i18n("Status Position", "%1, %2").arg(x).arg(y);
statusbar->changeItem( str, 0);
}
void KIconEdit::slotUpdateStatusSize(int x, int y)
{
- QString str = i18n("Status Size", "%1 x %2").arg(x).arg(y);
+ TQString str = i18n("Status Size", "%1 x %2").arg(x).arg(y);
statusbar->changeItem( str, 1);
}
void KIconEdit::slotUpdateStatusScaling(int s)
{
KIconEditProperties::self()->setGridScale( s );
- QString str;
+ TQString str;
str.sprintf("1:%d", s);
statusbar->changeItem( str, 2);
@@ -443,28 +443,28 @@ void KIconEdit::slotUpdateStatusScaling(int s)
void KIconEdit::slotUpdateStatusColors(uint)
{
- QString str = i18n("Colors: %1").arg(grid->numColors());
+ TQString str = i18n("Colors: %1").arg(grid->numColors());
statusbar->changeItem( str, 3);
}
void KIconEdit::slotUpdateStatusColors(uint n, uint *)
{
- QString str = i18n("Colors: %1").arg(n);
+ TQString str = i18n("Colors: %1").arg(n);
statusbar->changeItem( str, 3);
}
-void KIconEdit::slotUpdateStatusMessage(const QString & msg)
+void KIconEdit::slotUpdateStatusMessage(const TQString & msg)
{
statusbar->changeItem( msg, 4);
}
-void KIconEdit::slotUpdateStatusName(const QString & name)
+void KIconEdit::slotUpdateStatusName(const TQString & name)
{
m_name = name;
- QString text = m_name;
+ TQString text = m_name;
if(grid->isModified())
{
@@ -494,13 +494,13 @@ void KIconEdit::slotUpdateCopy(bool state)
}
-void KIconEdit::slotOpenBlank(const QSize s)
+void KIconEdit::slotOpenBlank(const TQSize s)
{
grid->loadBlank( s.width(), s.height());
}
-void KIconEdit::dragEnterEvent(QDragEnterEvent* e)
+void KIconEdit::dragEnterEvent(TQDragEnterEvent* e)
{
e->accept(KURLDrag::canDecode(e));
}
@@ -510,7 +510,7 @@ void KIconEdit::dragEnterEvent(QDragEnterEvent* e)
accept drop of a file - opens file in current window
old code to drop image, as image, should be removed
*/
-void KIconEdit::dropEvent( QDropEvent *e )
+void KIconEdit::dropEvent( TQDropEvent *e )
{
//kdDebug(4640) << "Got QDropEvent!" << endl;
diff --git a/kiconedit/kicongrid.cpp b/kiconedit/kicongrid.cpp
index abfb848e..2c9faeb7 100644
--- a/kiconedit/kicongrid.cpp
+++ b/kiconedit/kicongrid.cpp
@@ -23,12 +23,12 @@
#include <stdlib.h>
-#include <qpainter.h>
-#include <qwhatsthis.h>
-#include <qscrollview.h>
-#include <qbitmap.h>
-#include <qclipboard.h>
-#include <qdatetime.h>
+#include <tqpainter.h>
+#include <tqwhatsthis.h>
+#include <tqscrollview.h>
+#include <tqbitmap.h>
+#include <tqclipboard.h>
+#include <tqdatetime.h>
#include <kiconloader.h>
#include <kruler.h>
@@ -67,8 +67,8 @@ void RepaintCommand::execute()
grid->update( area);
}
-KGridView::KGridView(QImage *image, KCommandHistory* history, QWidget *parent, const char *name)
-: QFrame(parent, name)
+KGridView::KGridView(TQImage *image, KCommandHistory* history, TQWidget *parent, const char *name)
+: TQFrame(parent, name)
{
_corner = 0L;
_hruler = _vruler = 0L;
@@ -78,7 +78,7 @@ KGridView::KGridView(QImage *image, KCommandHistory* history, QWidget *parent, c
KIconEditProperties *props = KIconEditProperties::self();
- viewport = new QScrollView(this);
+ viewport = new TQScrollView(this);
Q_CHECK_PTR(viewport);
_grid = new KIconEditGrid(image, history, viewport->viewport());
@@ -87,18 +87,18 @@ KGridView::KGridView(QImage *image, KCommandHistory* history, QWidget *parent, c
_grid->setGrid(props->showGrid());
_grid->setCellSize(props->gridScale());
- QString str = i18n( "Icon draw grid\n\nThe icon grid is the area where"
+ TQString str = i18n( "Icon draw grid\n\nThe icon grid is the area where"
" you draw the icons.\nYou can zoom in and out using the magnifying"
" glasses on the toolbar.\n(Tip: Hold the magnify button down for a"
" few seconds to zoom to a predefined scale)" );
- QWhatsThis::add( _grid, str );
+ TQWhatsThis::add( _grid, str );
if(props->bgMode() == FixedPixmap)
{
- QPixmap pix(props->bgPixmap());
+ TQPixmap pix(props->bgPixmap());
if(pix.isNull())
{
- QPixmap pmlogo((const char **)logo);
+ TQPixmap pmlogo((const char **)logo);
pix = pmlogo;
}
viewport->viewport()->setBackgroundPixmap(pix);
@@ -109,8 +109,8 @@ KGridView::KGridView(QImage *image, KCommandHistory* history, QWidget *parent, c
viewport->viewport()->setBackgroundColor(props->bgColor());
}
- _corner = new QFrame(this);
- _corner->setFrameStyle(QFrame::WinPanel | QFrame::Raised);
+ _corner = new TQFrame(this);
+ _corner->setFrameStyle(TQFrame::WinPanel | TQFrame::Raised);
_hruler = new KRuler(Qt::Horizontal, this);
_hruler->setEndLabel(i18n("width"));
@@ -124,18 +124,18 @@ KGridView::KGridView(QImage *image, KCommandHistory* history, QWidget *parent, c
str = i18n( "Rulers\n\nThis is a visual representation of the current"
" cursor position" );
- QWhatsThis::add( _hruler, str );
- QWhatsThis::add( _vruler, str );
-
- connect(_grid, SIGNAL(scalingchanged(int)), SLOT(scalingChange(int)));
- connect(_grid, SIGNAL(sizechanged(int, int)), SLOT(sizeChange(int, int)));
- connect(_grid, SIGNAL(needPainting()), SLOT(paintGrid()));
- connect( _grid, SIGNAL(xposchanged(int)), _hruler, SLOT(slotNewValue(int)) );
- connect( _grid, SIGNAL(yposchanged(int)), _vruler, SLOT(slotNewValue(int)) );
- connect(viewport, SIGNAL(contentsMoving(int, int)), SLOT(moving(int, int)));
+ TQWhatsThis::add( _hruler, str );
+ TQWhatsThis::add( _vruler, str );
+
+ connect(_grid, TQT_SIGNAL(scalingchanged(int)), TQT_SLOT(scalingChange(int)));
+ connect(_grid, TQT_SIGNAL(sizechanged(int, int)), TQT_SLOT(sizeChange(int, int)));
+ connect(_grid, TQT_SIGNAL(needPainting()), TQT_SLOT(paintGrid()));
+ connect( _grid, TQT_SIGNAL(xposchanged(int)), _hruler, TQT_SLOT(slotNewValue(int)) );
+ connect( _grid, TQT_SIGNAL(yposchanged(int)), _vruler, TQT_SLOT(slotNewValue(int)) );
+ connect(viewport, TQT_SIGNAL(contentsMoving(int, int)), TQT_SLOT(moving(int, int)));
setSizes();
- QResizeEvent e(size(), size());
+ TQResizeEvent e(size(), size());
resizeEvent(&e);
}
@@ -210,7 +210,7 @@ void KGridView::setShowRulers(bool mode)
{
KIconEditProperties::self()->setShowRulers( mode );
setSizes();
- QResizeEvent e(size(), size());
+ TQResizeEvent e(size(), size());
resizeEvent(&e);
}
@@ -226,7 +226,7 @@ void KGridView::checkClipboard()
_grid->checkClipboard();
}
-const QRect KGridView::viewRect()
+const TQRect KGridView::viewRect()
{
int x, y, cx, cy;
if(viewport->horizontalScrollBar()->isVisible())
@@ -251,26 +251,26 @@ const QRect KGridView::viewRect()
cy = viewport->contentsHeight();
}
- return QRect(x, y, cx, cy);
+ return TQRect(x, y, cx, cy);
}
void KGridView::paintDropSite()
{
- QPainter p;
+ TQPainter p;
p.begin( _grid );
p.setRasterOp (NotROP);
p.drawRect(viewRect());
p.end();
}
-void KGridView::paintEvent(QPaintEvent *)
+void KGridView::paintEvent(TQPaintEvent *)
{
if(acceptdrop)
paintDropSite();
}
-void KGridView::resizeEvent(QResizeEvent*)
+void KGridView::resizeEvent(TQResizeEvent*)
{
kdDebug(4640) << "KGridView::resizeEvent" << endl;
@@ -290,7 +290,7 @@ void KGridView::resizeEvent(QResizeEvent*)
}
-KIconEditGrid::KIconEditGrid(QImage *image, KCommandHistory* h, QWidget *parent, const char *name)
+KIconEditGrid::KIconEditGrid(TQImage *image, KCommandHistory* h, TQWidget *parent, const char *name)
: KColorGrid(parent, name, 1)
{
img = image;
@@ -319,8 +319,8 @@ KIconEditGrid::KIconEditGrid(QImage *image, KCommandHistory* h, QWidget *parent,
setNumCols(32);
fill(TRANSPARENT);
- connect( kapp->clipboard(), SIGNAL(dataChanged()), SLOT(checkClipboard()));
- connect( h, SIGNAL(commandExecuted()), this, SLOT(updatePreviewPixmap() ));
+ connect( kapp->clipboard(), TQT_SIGNAL(dataChanged()), TQT_SLOT(checkClipboard()));
+ connect( h, TQT_SIGNAL(commandExecuted()), this, TQT_SLOT(updatePreviewPixmap() ));
createCursors();
KIconEditProperties *props = KIconEditProperties::self();
@@ -337,14 +337,14 @@ KIconEditGrid::~KIconEditGrid()
kdDebug(4640) << "KIconEditGrid - destructor: done" << endl;
}
-void KIconEditGrid::paintEvent(QPaintEvent *e)
+void KIconEditGrid::paintEvent(TQPaintEvent *e)
{
- const QRect cellsRect(0, 0, numCols() * cellSize(), numRows() * cellSize());
- const QRect paintCellsRect = cellsRect.intersect(e->rect());
+ const TQRect cellsRect(0, 0, numCols() * cellSize(), numRows() * cellSize());
+ const TQRect paintCellsRect = cellsRect.intersect(e->rect());
if(!paintCellsRect.isEmpty())
{
- //QTime time;
+ //TQTime time;
//time.start();
@@ -601,18 +601,18 @@ void KIconEditGrid::paintEvent(QPaintEvent *e)
delete [] color2ScanLine;
}
- QImage image((uchar *)(imageBuffer), paintCellsRect.width(), paintCellsRect.height(), 32, 0, 0,
+ TQImage image((uchar *)(imageBuffer), paintCellsRect.width(), paintCellsRect.height(), 32, 0, 0,
#if X_BYTE_ORDER == X_LITTLE_ENDIAN
- QImage::LittleEndian);
+ TQImage::LittleEndian);
#else
- QImage::BigEndian);
+ TQImage::BigEndian);
#endif
Q_ASSERT(!image.isNull());
- QPixmap _pixmap;
+ TQPixmap _pixmap;
_pixmap.convertFromImage(image);
- QPainter p;
+ TQPainter p;
p.begin(&_pixmap);
paintForeground(&p, e);
p.end();
@@ -625,15 +625,15 @@ void KIconEditGrid::paintEvent(QPaintEvent *e)
}
}
-void KIconEditGrid::paintForeground(QPainter* p, QPaintEvent* e)
+void KIconEditGrid::paintForeground(TQPainter* p, TQPaintEvent* e)
{
- QWMatrix matrix;
+ TQWMatrix matrix;
matrix.translate(-e->rect().x(), -e->rect().y());
p->setWorldMatrix( matrix );
- QRect cellsRect(0, 0, numCols() * cellSize(), numRows() * cellSize());
- QRect paintCellsRect = cellsRect.intersect(e->rect());
+ TQRect cellsRect(0, 0, numCols() * cellSize(), numRows() * cellSize());
+ TQRect paintCellsRect = cellsRect.intersect(e->rect());
if(!paintCellsRect.isEmpty())
{
@@ -643,8 +643,8 @@ void KIconEditGrid::paintForeground(QPainter* p, QPaintEvent* e)
int firstRow = paintCellsRect.top() / cellSize();
int lastRow = paintCellsRect.bottom() / cellSize();
- p->setPen(QColor(0, 0, 0));
- p->setBrush(QColor(0, 0, 0));
+ p->setPen(TQColor(0, 0, 0));
+ p->setBrush(TQColor(0, 0, 0));
for(int column = firstColumn; column <= lastColumn; column++)
{
@@ -691,7 +691,7 @@ void KIconEditGrid::paintForeground(QPainter* p, QPaintEvent* e)
if(hasGrid()&& !(cellSize()==1))
{
- p->setPen(QColor(0, 0, 0));
+ p->setPen(TQColor(0, 0, 0));
int x = e->rect().x() - ((e->rect().x() % cellSize()) + cellSize());
if(x < 0) x = 0;
int y = e->rect().y() - ((e->rect().y() % cellSize()) + cellSize());
@@ -708,7 +708,7 @@ void KIconEditGrid::paintForeground(QPainter* p, QPaintEvent* e)
}
}
-void KIconEditGrid::mousePressEvent( QMouseEvent *e )
+void KIconEditGrid::mousePressEvent( TQMouseEvent *e )
{
if(!e || (e->button() != LeftButton))
return;
@@ -732,7 +732,7 @@ void KIconEditGrid::mousePressEvent( QMouseEvent *e )
if(isselecting)
{
- QPointArray a(pntarray.copy());
+ TQPointArray a(pntarray.copy());
pntarray.resize(0);
drawPointArray(a, Mark);
emit selecteddata(false);
@@ -749,7 +749,7 @@ void KIconEditGrid::mousePressEvent( QMouseEvent *e )
}
}
-void KIconEditGrid::mouseMoveEvent( QMouseEvent *e )
+void KIconEditGrid::mouseMoveEvent( TQMouseEvent *e )
{
if(!e) return;
@@ -766,7 +766,7 @@ void KIconEditGrid::mouseMoveEvent( QMouseEvent *e )
emit yposchanged((row*scaling())+scaling()/2);
}
- QPoint tmpp(col, row);
+ TQPoint tmpp(col, row);
if(tmpp == end) return;
// need to use intersection of rectangles to allow pasting
@@ -825,8 +825,8 @@ void KIconEditGrid::mouseMoveEvent( QMouseEvent *e )
setModified( true );
int prevSel = selected;
selected = cell;
- QRect area = QRect( col*cellsize,row*cellsize, cellsize, cellsize ).unite(
- QRect ( (prevSel%numCols())*cellsize,(prevSel/numCols())*cellsize, cellsize, cellsize ) );
+ TQRect area = TQRect( col*cellsize,row*cellsize, cellsize, cellsize ).unite(
+ TQRect ( (prevSel%numCols())*cellsize,(prevSel/numCols())*cellsize, cellsize, cellsize ) );
m_command->addCommand( new RepaintCommand( area, this ) );
DrawCommand* dc = new DrawCommand( col, row, colorAt(cell), img, this );
@@ -872,7 +872,7 @@ void KIconEditGrid::mouseMoveEvent( QMouseEvent *e )
}
case Spray:
{
- drawSpray(QPoint(col, row));
+ drawSpray(TQPoint(col, row));
setModified(true);
break;
}
@@ -881,10 +881,10 @@ void KIconEditGrid::mouseMoveEvent( QMouseEvent *e )
}
p = *img;
- emit changed(QPixmap(p));
+ emit changed(TQPixmap(p));
}
-void KIconEditGrid::mouseReleaseEvent( QMouseEvent *e )
+void KIconEditGrid::mouseReleaseEvent( TQMouseEvent *e )
{
if(!e || (e->button() != LeftButton))
return;
@@ -950,14 +950,14 @@ void KIconEditGrid::mouseReleaseEvent( QMouseEvent *e )
}
case Spray:
{
- drawSpray(QPoint(col, row));
+ drawSpray(TQPoint(col, row));
break;
}
case FloodFill:
{
- QApplication::setOverrideCursor(waitCursor);
+ TQApplication::setOverrideCursor(waitCursor);
drawFlood(col, row, colorAt(cell));
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
updateColors();
emit needPainting();
p = *img;
@@ -983,11 +983,11 @@ void KIconEditGrid::mouseReleaseEvent( QMouseEvent *e )
break;
}
- emit changed(QPixmap(p));
+ emit changed(TQPixmap(p));
//emit colorschanged(numColors(), data());
}
-//void KIconEditGrid::setColorSelection( const QColor &color )
+//void KIconEditGrid::setColorSelection( const TQColor &color )
void KIconEditGrid::setColorSelection( uint c )
{
currentcolor = c;
@@ -1009,7 +1009,7 @@ void KIconEditGrid::loadBlank( int w, int h )
-void KIconEditGrid::load( QImage *image)
+void KIconEditGrid::load( TQImage *image)
{
kdDebug(4640) << "KIconEditGrid::load" << endl;
@@ -1017,7 +1017,7 @@ void KIconEditGrid::load( QImage *image)
if(image == 0L)
{
- QString msg = i18n("There was an error loading a blank image.\n");
+ TQString msg = i18n("There was an error loading a blank image.\n");
KMessageBox::error(this, msg);
return;
}
@@ -1048,7 +1048,7 @@ void KIconEditGrid::load( QImage *image)
history->clear();
}
-const QPixmap &KIconEditGrid::pixmap()
+const TQPixmap &KIconEditGrid::pixmap()
{
if(!img->isNull())
p = *img;
@@ -1056,7 +1056,7 @@ const QPixmap &KIconEditGrid::pixmap()
return(p);
}
-void KIconEditGrid::getImage(QImage *image)
+void KIconEditGrid::getImage(TQImage *image)
{
kdDebug(4640) << "KIconEditGrid::getImage" << endl;
*image = *img;
@@ -1064,12 +1064,12 @@ void KIconEditGrid::getImage(QImage *image)
bool KIconEditGrid::zoomTo(int scale)
{
- QApplication::setOverrideCursor(waitCursor);
+ TQApplication::setOverrideCursor(waitCursor);
setUpdatesEnabled(false);
setCellSize( scale );
setUpdatesEnabled(true);
emit needPainting();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
emit scalingchanged(cellSize());
if(scale == 1)
@@ -1080,12 +1080,12 @@ bool KIconEditGrid::zoomTo(int scale)
bool KIconEditGrid::zoom(Direction d)
{
int f = (d == DirIn) ? (cellSize()+1) : (cellSize()-1);
- QApplication::setOverrideCursor(waitCursor);
+ TQApplication::setOverrideCursor(waitCursor);
setUpdatesEnabled(false);
setCellSize( f );
setUpdatesEnabled(true);
//emit needPainting();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
emit scalingchanged(cellSize());
if(d == DirOut && cellSize() <= 1)
@@ -1096,7 +1096,7 @@ bool KIconEditGrid::zoom(Direction d)
void KIconEditGrid::checkClipboard()
{
bool ok = false;
- QImage tmp = clipboardImage(ok);
+ TQImage tmp = clipboardImage(ok);
if(ok)
emit clipboarddata(true);
else
@@ -1105,19 +1105,19 @@ void KIconEditGrid::checkClipboard()
}
}
-QImage KIconEditGrid::clipboardImage(bool &ok)
+TQImage KIconEditGrid::clipboardImage(bool &ok)
{
//###### Remove me later.
//Workaround Qt bug -- check whether format provided first.
- //Code below is from QDragObject, to match the mimetype list....
+ //Code below is from TQDragObject, to match the mimetype list....
- QStrList fileFormats = QImageIO::inputFormats();
+ TQStrList fileFormats = TQImageIO::inputFormats();
fileFormats.first();
bool oneIsSupported = false;
while ( fileFormats.current() )
{
- QCString format = fileFormats.current();
- QCString type = "image/" + format.lower();
+ TQCString format = fileFormats.current();
+ TQCString type = "image/" + format.lower();
if (kapp->clipboard()->data()->provides(type ) )
{
oneIsSupported = true;
@@ -1127,10 +1127,10 @@ QImage KIconEditGrid::clipboardImage(bool &ok)
if (!oneIsSupported)
{
ok = false;
- return QImage();
+ return TQImage();
}
- QImage image = kapp->clipboard()->image();
+ TQImage image = kapp->clipboard()->image();
ok = !image.isNull();
if ( ok )
{
@@ -1163,13 +1163,13 @@ void KIconEditGrid::editClear()
emit newmessage(i18n("Cleared"));
}
-QImage KIconEditGrid::getSelection(bool cut)
+TQImage KIconEditGrid::getSelection(bool cut)
{
- const QRect rect = pntarray.boundingRect();
+ const TQRect rect = pntarray.boundingRect();
int nx = 0, ny = 0, nw = 0, nh = 0;
rect.rect(&nx, &ny, &nw, &nh);
- QImage tmp(nw, nh, 32);
+ TQImage tmp(nw, nh, 32);
tmp.setAlphaBuffer(true);
clearImage(&tmp);
@@ -1179,7 +1179,7 @@ QImage KIconEditGrid::getSelection(bool cut)
{
int x = pntarray[i].x();
int y = pntarray[i].y();
- if(img->valid(x, y) && rect.contains(QPoint(x, y)))
+ if(img->valid(x, y) && rect.contains(TQPoint(x, y)))
{
*((uint*)tmp.scanLine(y-ny) + (x-nx)) = *((uint*)img->scanLine(y) + x);
if(cut)
@@ -1190,7 +1190,7 @@ QImage KIconEditGrid::getSelection(bool cut)
}
}
- QPointArray a(pntarray.copy());
+ TQPointArray a(pntarray.copy());
pntarray.resize(0);
drawPointArray(a, Mark);
emit selecteddata(false);
@@ -1221,7 +1221,7 @@ void KIconEditGrid::editCopy(bool cut)
void KIconEditGrid::editPaste(bool paste)
{
bool ok = false;
- QImage tmp = clipboardImage(ok);
+ TQImage tmp = clipboardImage(ok);
KIconEditProperties *props = KIconEditProperties::self();
@@ -1232,7 +1232,7 @@ void KIconEditGrid::editPaste(bool paste)
{
if(KMessageBox::warningYesNo(this,
i18n("The clipboard image is larger than the current"
- " image!\nPaste as new image?"),QString::null,i18n("Paste"), i18n("Do Not Paste")) == 0)
+ " image!\nPaste as new image?"),TQString::null,i18n("Paste"), i18n("Do Not Paste")) == 0)
{
editPasteAsNew();
}
@@ -1248,7 +1248,7 @@ void KIconEditGrid::editPaste(bool paste)
else
{
//kdDebug(4640) << "KIconEditGrid: Pasting at: " << insrect.x() << " x " << insrect.y() << endl;
- QApplication::setOverrideCursor(waitCursor);
+ TQApplication::setOverrideCursor(waitCursor);
for(int y = insrect.y(), ny = 0; y < numRows() && ny < insrect.height(); y++, ny++)
{
@@ -1344,11 +1344,11 @@ void KIconEditGrid::editPaste(bool paste)
update(insrect.x()*cellSize(), insrect.y()*cellSize(),
insrect.width()*cellSize(), insrect.height()*cellSize());
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
setModified(true);
p = *img;
- emit changed(QPixmap(p));
+ emit changed(TQPixmap(p));
emit sizechanged(numCols(), numRows());
emit colorschanged(numColors(), data());
emit newmessage(i18n("Done pasting"));
@@ -1356,7 +1356,7 @@ void KIconEditGrid::editPaste(bool paste)
}
else
{
- QString msg = i18n("Invalid pixmap data in clipboard!\n");
+ TQString msg = i18n("Invalid pixmap data in clipboard!\n");
KMessageBox::sorry(this, msg);
}
}
@@ -1365,7 +1365,7 @@ void KIconEditGrid::editPaste(bool paste)
void KIconEditGrid::editPasteAsNew()
{
bool ok = false;
- QImage tmp = clipboardImage(ok);
+ TQImage tmp = clipboardImage(ok);
if(ok)
{
@@ -1382,7 +1382,7 @@ void KIconEditGrid::editPasteAsNew()
//repaint(viewRect(), false);
p = *img;
- emit changed(QPixmap(p));
+ emit changed(TQPixmap(p));
emit sizechanged(numCols(), numRows());
emit colorschanged(numColors(), data());
emit newmessage(i18n("Done pasting"));
@@ -1391,7 +1391,7 @@ void KIconEditGrid::editPasteAsNew()
}
else
{
- QString msg = i18n("Invalid pixmap data in clipboard!\n");
+ TQString msg = i18n("Invalid pixmap data in clipboard!\n");
KMessageBox::error(this, msg);
}
}
@@ -1400,10 +1400,10 @@ void KIconEditGrid::editPasteAsNew()
void KIconEditGrid::editResize()
{
kdDebug(4640) << "KIconGrid::editResize" << endl;
- KResizeDialog *rs = new KResizeDialog(this, 0, QSize(numCols(), numRows()));
+ KResizeDialog *rs = new KResizeDialog(this, 0, TQSize(numCols(), numRows()));
if(rs->exec())
{
- const QSize s = rs->getSize();
+ const TQSize s = rs->getSize();
*img = img->smoothScale(s.width(), s.height());
load(img);
@@ -1413,7 +1413,7 @@ void KIconEditGrid::editResize()
}
-void KIconEditGrid::setSize(const QSize s)
+void KIconEditGrid::setSize(const TQSize s)
{
kdDebug(4640) << "::setSize: " << s.width() << " x " << s.height() << endl;
@@ -1426,10 +1426,10 @@ void KIconEditGrid::setSize(const QSize s)
void KIconEditGrid::createCursors()
{
- QBitmap mask(22, 22);
- QPixmap pix;
+ TQBitmap mask(22, 22);
+ TQPixmap pix;
- cursor_normal = QCursor(arrowCursor);
+ cursor_normal = TQCursor(arrowCursor);
pix = BarIcon("colorpicker-cursor");
if(pix.isNull())
@@ -1441,7 +1441,7 @@ void KIconEditGrid::createCursors()
{
mask = pix.createHeuristicMask();
pix.setMask(mask);
- cursor_colorpicker = QCursor(pix, 1, 21);
+ cursor_colorpicker = TQCursor(pix, 1, 21);
}
pix = BarIcon("paintbrush-cursor");
@@ -1454,7 +1454,7 @@ void KIconEditGrid::createCursors()
{
mask = pix.createHeuristicMask();
pix.setMask(mask);
- cursor_paint = QCursor(pix, 0, 19);
+ cursor_paint = TQCursor(pix, 0, 19);
}
pix = BarIcon("fill-cursor");
@@ -1467,7 +1467,7 @@ void KIconEditGrid::createCursors()
{
mask = pix.createHeuristicMask();
pix.setMask(mask);
- cursor_flood = QCursor(pix, 3, 20);
+ cursor_flood = TQCursor(pix, 3, 20);
}
pix = BarIcon("aim-cursor");
@@ -1480,7 +1480,7 @@ void KIconEditGrid::createCursors()
{
mask = pix.createHeuristicMask();
pix.setMask(mask);
- cursor_aim = QCursor(pix, 10, 10);
+ cursor_aim = TQCursor(pix, 10, 10);
}
pix = BarIcon("airbrush-cursor");
@@ -1493,7 +1493,7 @@ void KIconEditGrid::createCursors()
{
mask = pix.createHeuristicMask(true);
pix.setMask(mask);
- cursor_spray = QCursor(pix, 0, 20);
+ cursor_spray = TQCursor(pix, 0, 20);
}
pix = BarIcon("eraser-cursor");
@@ -1506,7 +1506,7 @@ void KIconEditGrid::createCursors()
{
mask = pix.createHeuristicMask(true);
pix.setMask(mask);
- cursor_erase = QCursor(pix, 1, 16);
+ cursor_erase = TQCursor(pix, 1, 16);
}
}
@@ -1580,7 +1580,7 @@ void KIconEditGrid::drawFlood(int x, int y, uint oldcolor)
}
-void KIconEditGrid::drawSpray(QPoint point)
+void KIconEditGrid::drawSpray(TQPoint point)
{
int x = (point.x()-5);
int y = (point.y()-5);
@@ -1600,11 +1600,11 @@ void KIconEditGrid::drawSpray(QPoint point)
}
-//This routine is from Qt sources -- it's the branch of QPointArray::makeEllipse( int x, int y, int w, int h ) that's not normally compiled
+//This routine is from Qt sources -- it's the branch of TQPointArray::makeEllipse( int x, int y, int w, int h ) that's not normally compiled
//It seems like KIconEdit relied on the Qt1 semantics for makeEllipse, which broke
//the tool with reasonably recent Qt versions.
//Thankfully, Qt includes the old code #ifdef'd, which is hence included here
-static void QPA_makeEllipse(QPointArray& ar, int x, int y, int w, int h )
+static void QPA_makeEllipse(TQPointArray& ar, int x, int y, int w, int h )
{ // midpoint, 1/4 ellipse
if ( w <= 0 || h <= 0 ) {
if ( w == 0 || h == 0 ) {
@@ -1687,7 +1687,7 @@ void KIconEditGrid::drawEllipse(bool drawit)
return;
}
- QPointArray a(pntarray.copy());
+ TQPointArray a(pntarray.copy());
int x = start.x(), y = start.y(), cx, cy;
if(x > end.x())
@@ -1754,7 +1754,7 @@ void KIconEditGrid::drawRect(bool drawit)
return;
}
- QPointArray a(pntarray.copy());
+ TQPointArray a(pntarray.copy());
int x = start.x(), y = start.y(), cx, cy;
if(x > end.x())
@@ -1816,7 +1816,7 @@ void KIconEditGrid::drawLine(bool drawit, bool drawStraight)
return;
}
- QPointArray a(pntarray.copy());
+ TQPointArray a(pntarray.copy());
pntarray.resize(0);
// remove previous marking
@@ -1886,9 +1886,9 @@ void KIconEditGrid::drawLine(bool drawit, bool drawStraight)
}
-void KIconEditGrid::drawPointArray(QPointArray a, DrawAction action)
+void KIconEditGrid::drawPointArray(TQPointArray a, DrawAction action)
{
- QRect area( a.boundingRect().x()*cellSize()-1, a.boundingRect().y()*cellSize()-1,
+ TQRect area( a.boundingRect().x()*cellSize()-1, a.boundingRect().y()*cellSize()-1,
a.boundingRect().width()*cellSize()+1, a.boundingRect().height()*cellSize()+1 );
KMacroCommand* macro = 0;
@@ -1955,11 +1955,11 @@ void KIconEditGrid::drawPointArray(QPointArray a, DrawAction action)
void KIconEditGrid::updatePreviewPixmap()
{
p = *img;
- emit changed(QPixmap(p));
+ emit changed(TQPixmap(p));
}
-bool KIconEditGrid::isMarked(QPoint point)
+bool KIconEditGrid::isMarked(TQPoint point)
{
return isMarked(point.x(), point.y());
}
@@ -1983,7 +1983,7 @@ bool KIconEditGrid::isMarked(int x, int y)
// Fast diffuse dither to 3x3x3 color cube
// Based on Qt's image conversion functions
-static bool kdither_32_to_8( const QImage *src, QImage *dst )
+static bool kdither_32_to_8( const TQImage *src, TQImage *dst )
{
register QRgb *p;
uchar *b;
@@ -2063,7 +2063,7 @@ static bool kdither_32_to_8( const QImage *src, QImage *dst )
{
p = (QRgb *)src->scanLine(y);
b = dst->scanLine(y);
- int endian = (QImage::systemByteOrder() == QImage::BigEndian);
+ int endian = (TQImage::systemByteOrder() == TQImage::BigEndian);
int x;
uchar* q = src->scanLine(y);
uchar* q2 = src->scanLine(y+1 < src->height() ? y + 1 : 0);
@@ -2159,7 +2159,7 @@ static bool kdither_32_to_8( const QImage *src, QImage *dst )
// this doesn't work the way it should but the way KPixmap does.
void KIconEditGrid::mapToKDEPalette()
{
- QImage dest;
+ TQImage dest;
kdither_32_to_8(img, &dest);
*img = dest.convertDepth(32);
@@ -2187,7 +2187,7 @@ void KIconEditGrid::mapToKDEPalette()
#endif
*/
- QApplication::setOverrideCursor(waitCursor);
+ TQApplication::setOverrideCursor(waitCursor);
for(int y = 0; y < numRows(); y++)
{
uint *l = (uint*)img->scanLine(y);
@@ -2203,7 +2203,7 @@ void KIconEditGrid::mapToKDEPalette()
load(img);
setModified(true);
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
@@ -2227,7 +2227,7 @@ void KIconEditGrid::grayScale()
}
-void KIconEditGrid::clearImage(QImage *image)
+void KIconEditGrid::clearImage(TQImage *image)
{
if(image->depth() != 32)
{
@@ -2235,7 +2235,7 @@ void KIconEditGrid::clearImage(QImage *image)
}
else
{
- // QImage::fill() does not set the alpha channel so do it
+ // TQImage::fill() does not set the alpha channel so do it
// manually.
for(int y = 0; y < image->height(); y++)
{
diff --git a/kiconedit/kicongrid.h b/kiconedit/kicongrid.h
index 24730735..da61f3a1 100644
--- a/kiconedit/kicongrid.h
+++ b/kiconedit/kicongrid.h
@@ -21,11 +21,11 @@
#ifndef __KICONEDITGRID_H__
#define __KICONEDITGRID_H__
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qcursor.h>
-#include <qpointarray.h>
-#include <qframe.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqcursor.h>
+#include <tqpointarray.h>
+#include <tqframe.h>
#include <kcommand.h>
#include <klocale.h>
@@ -34,7 +34,7 @@
class KCommandHistory;
class KRuler;
class KIconEditGrid;
-class QScrollView;
+class TQScrollView;
enum Direction {
DirIn = 0, DirOut = 1,
@@ -44,7 +44,7 @@ enum Direction {
class DrawCommand : public KCommand {
public:
- DrawCommand( int xx, int yy, uint newcol, QImage* img, KIconEditGrid* g ) {
+ DrawCommand( int xx, int yy, uint newcol, TQImage* img, KIconEditGrid* g ) {
x = xx;
y = yy;
newcolor = newcol;
@@ -54,7 +54,7 @@ class DrawCommand : public KCommand {
void execute();
void unexecute();
- QString name() const {
+ TQString name() const {
return i18n("Drawed Something");
}
@@ -63,13 +63,13 @@ class DrawCommand : public KCommand {
int y;
uint newcolor;
uint oldcolor;
- QImage* image;
+ TQImage* image;
KIconEditGrid* grid;
};
class RepaintCommand : public KCommand {
public:
- RepaintCommand( QRect a, KIconEditGrid* g ) {
+ RepaintCommand( TQRect a, KIconEditGrid* g ) {
area = a;
grid = g;
}
@@ -79,28 +79,28 @@ class RepaintCommand : public KCommand {
execute();
}
- QString name() const {
+ TQString name() const {
return "repainted";
}
protected:
KIconEditGrid* grid;
- QRect area;
+ TQRect area;
};
class KGridView : public QFrame
{
Q_OBJECT
public:
- KGridView( QImage *image, KCommandHistory* history, QWidget * parent = 0, const char *name = 0);
+ KGridView( TQImage *image, KCommandHistory* history, TQWidget * parent = 0, const char *name = 0);
KRuler *hruler() { return _hruler;}
KRuler *vruler() { return _vruler;}
- QFrame *corner() { return _corner;}
+ TQFrame *corner() { return _corner;}
KIconEditGrid *grid() { return _grid; }
void setShowRulers(bool mode);
void setAcceptDrop(bool a);
- const QRect viewRect();
- QScrollView *viewPortWidget() { return viewport;}
+ const TQRect viewRect();
+ TQScrollView *viewPortWidget() { return viewport;}
public slots:
void sizeChange(int, int);
@@ -110,15 +110,15 @@ public slots:
void checkClipboard();
protected:
- virtual void paintEvent(QPaintEvent*);
- virtual void resizeEvent(QResizeEvent*);
+ virtual void paintEvent(TQPaintEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
void paintDropSite();
void setSizes();
- QFrame *_corner;
+ TQFrame *_corner;
KIconEditGrid *_grid;
KRuler *_hruler, *_vruler;
- QScrollView *viewport;
+ TQScrollView *viewport;
bool acceptdrop;
};
@@ -132,7 +132,7 @@ class KIconEditGrid : public KColorGrid
{
Q_OBJECT
public:
- KIconEditGrid( QImage *image, KCommandHistory* h, QWidget * parent = 0, const char *name = 0);
+ KIconEditGrid( TQImage *image, KCommandHistory* h, TQWidget * parent = 0, const char *name = 0);
virtual ~KIconEditGrid();
enum DrawTool { Line, Freehand, FloodFill, Spray, Rect, FilledRect, Circle,
@@ -142,14 +142,14 @@ public:
void setGrid(bool g) { KColorGrid::setGrid(g); emit needPainting(); }
bool isModified() { return modified; };
void setModified(bool m);
- const QPixmap &pixmap();
- const QImage &image() { return *img; }
- QImage clipboardImage(bool &ok);
- QImage getSelection(bool);
+ const TQPixmap &pixmap();
+ const TQImage &image() { return *img; }
+ TQImage clipboardImage(bool &ok);
+ TQImage getSelection(bool);
int rows() { return numRows(); };
int cols() { return numCols(); };
uint getColors( uint *_colors) { return colors(_colors); }
- bool isMarked(QPoint p);
+ bool isMarked(TQPoint p);
bool isMarked(int x, int y);
int scaling() { return cellSize(); }
void loadBlank( int w = 0, int h = 0);
@@ -170,29 +170,29 @@ public:
};
TransparencyDisplayType transparencyDisplayType() const { return m_transparencyDisplayType; }
- QColor checkerboardColor1() const { return m_checkerboardColor1; }
- QColor checkerboardColor2() const { return m_checkerboardColor2; }
+ TQColor checkerboardColor1() const { return m_checkerboardColor1; }
+ TQColor checkerboardColor2() const { return m_checkerboardColor2; }
CheckerboardSize checkerboardSize() const { return m_checkerboardSize; }
- QColor transparencySolidColor() const { return m_transparencySolidColor; }
+ TQColor transparencySolidColor() const { return m_transparencySolidColor; }
void setTransparencyDisplayType(TransparencyDisplayType t) { m_transparencyDisplayType = t; }
- void setCheckerboardColor1(const QColor& c) { m_checkerboardColor1 = c; }
- void setCheckerboardColor2(const QColor& c) { m_checkerboardColor2 = c; }
+ void setCheckerboardColor1(const TQColor& c) { m_checkerboardColor1 = c; }
+ void setCheckerboardColor2(const TQColor& c) { m_checkerboardColor2 = c; }
void setCheckerboardSize(CheckerboardSize size) { m_checkerboardSize = size; }
- void setTransparencySolidColor(const QColor& c) { m_transparencySolidColor = c; }
+ void setTransparencySolidColor(const TQColor& c) { m_transparencySolidColor = c; }
public slots:
- void load( QImage *);
+ void load( TQImage *);
void editCopy(bool cut = false);
void editPaste(bool paste = false);
void editPasteAsNew();
void editSelectAll();
void editClear();
- void getImage(QImage *image);
+ void getImage(TQImage *image);
//#if QT_VERSION <= 140
void editResize();
//#endif
- void setSize(const QSize s);
+ void setSize(const TQSize s);
void grayScale();
void mapToKDEPalette();
void setTool(DrawTool tool);
@@ -203,12 +203,12 @@ public slots:
signals:
void scalingchanged(int);
- void changed( const QPixmap & );
+ void changed( const TQPixmap & );
void sizechanged( int, int );
void poschanged( int, int );
void xposchanged( int );
void yposchanged( int );
- void newmessage(const QString &);
+ void newmessage(const TQString &);
void clipboarddata(bool);
void selecteddata(bool);
void needPainting();
@@ -220,39 +220,39 @@ protected slots:
void updatePreviewPixmap();
protected:
- virtual void paintEvent(QPaintEvent*);
- virtual void paintCell( QPainter*, int, int ) {}
- virtual void paintForeground(QPainter* p, QPaintEvent* e);
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent*);
- virtual void mouseMoveEvent(QMouseEvent*);
+ virtual void paintEvent(TQPaintEvent*);
+ virtual void paintCell( TQPainter*, int, int ) {}
+ virtual void paintForeground(TQPainter* p, TQPaintEvent* e);
+ virtual void mousePressEvent(TQMouseEvent*);
+ virtual void mouseReleaseEvent(TQMouseEvent*);
+ virtual void mouseMoveEvent(TQMouseEvent*);
void createCursors();
- void drawPointArray(QPointArray, DrawAction);
+ void drawPointArray(TQPointArray, DrawAction);
void drawEllipse(bool);
void drawLine(bool drawIt, bool drawStraight);
void drawRect(bool);
- void drawSpray(QPoint);
+ void drawSpray(TQPoint);
void drawFlood(int x, int y, uint oldcolor);
- static void clearImage(QImage *image);
+ static void clearImage(TQImage *image);
uint currentcolor;
- QPoint start, end;
- QRect insrect;
- QSize cbsize;
- QImage *img;
- QPixmap p;
+ TQPoint start, end;
+ TQRect insrect;
+ TQSize cbsize;
+ TQImage *img;
+ TQPixmap p;
int selected, tool; //, numrows, numcols;
bool modified, btndown, ispasting, isselecting;
- QPointArray pntarray;
+ TQPointArray pntarray;
KColorArray iconcolors;
KCommandHistory* history;
KMacroCommand* m_command;
- QCursor cursor_normal, cursor_aim, cursor_flood, cursor_spray, cursor_erase, cursor_paint, cursor_colorpicker;
+ TQCursor cursor_normal, cursor_aim, cursor_flood, cursor_spray, cursor_erase, cursor_paint, cursor_colorpicker;
TransparencyDisplayType m_transparencyDisplayType;
- QColor m_checkerboardColor1;
- QColor m_checkerboardColor2;
+ TQColor m_checkerboardColor1;
+ TQColor m_checkerboardColor2;
CheckerboardSize m_checkerboardSize;
- QColor m_transparencySolidColor;
+ TQColor m_transparencySolidColor;
};
diff --git a/kiconedit/knew.cpp b/kiconedit/knew.cpp
index 214952b0..77f7ee99 100644
--- a/kiconedit/knew.cpp
+++ b/kiconedit/knew.cpp
@@ -18,11 +18,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
#include <kconfig.h>
#include <klocale.h>
@@ -74,8 +74,8 @@ void KIconTemplateContainer::save()
KConfig *k = kapp->config();
k->setGroup("Templates");
- QStringList names;
- for (QValueListIterator<KIconTemplate> iter = begin(); iter != end(); iter++)
+ TQStringList names;
+ for (TQValueListIterator<KIconTemplate> iter = begin(); iter != end(); iter++)
{
names.append((*iter).title);
}
@@ -88,9 +88,9 @@ void KIconTemplateContainer::save()
}
}
-KIconTemplateContainer::KIconTemplateContainer() : QValueList<KIconTemplate>()
+KIconTemplateContainer::KIconTemplateContainer() : TQValueList<KIconTemplate>()
{
- QStrList names;
+ TQStrList names;
KConfig *k = kapp->config();
k->setGroup("Templates");
k->readListEntry("Names", names);
@@ -115,7 +115,7 @@ KIconTemplateContainer::~KIconTemplateContainer()
}
KIconListBoxItem::KIconListBoxItem( KIconTemplate t )
- : QListBoxItem(), icontemplate(t)
+ : TQListBoxItem(), icontemplate(t)
{
//kdDebug(4640) << "KIconListBoxItem - " << t->path.data() << ", " << t->title.data() << endl;
@@ -131,10 +131,10 @@ void KIconListBoxItem::reloadIcon()
-void KIconListBoxItem::paint( QPainter *p )
+void KIconListBoxItem::paint( TQPainter *p )
{
p->drawPixmap( 3, 0, pm );
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
int yPos; // vertical text position
if ( pm.height() < fm.height() )
yPos = fm.ascent() + fm.leading()/2;
@@ -143,33 +143,33 @@ void KIconListBoxItem::paint( QPainter *p )
p->drawText( pm.width() + 5, yPos, text() );
}
-int KIconListBoxItem::height(const QListBox *lb ) const
+int KIconListBoxItem::height(const TQListBox *lb ) const
{
return QMAX( pm.height(), lb->fontMetrics().lineSpacing() + 1 );
}
-int KIconListBoxItem::width(const QListBox *lb ) const
+int KIconListBoxItem::width(const TQListBox *lb ) const
{
return pm.width() + lb->fontMetrics().width( text() ) + 6;
}
-NewSelect::NewSelect(QWidget *parent) : QWidget( parent )
+NewSelect::NewSelect(TQWidget *parent) : TQWidget( parent )
{
wiz = (KWizard*) parent;
- grp = new QButtonGroup( this );
- connect( grp, SIGNAL( clicked( int ) ), SLOT( buttonClicked( int ) ) );
+ grp = new TQButtonGroup( this );
+ connect( grp, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( buttonClicked( int ) ) );
grp->setExclusive( true );
- QVBoxLayout* ml = new QVBoxLayout( this );
+ TQVBoxLayout* ml = new TQVBoxLayout( this );
ml->addWidget( grp, 1 );
//ml->addWidget(grp, 10, AlignLeft);
- QVBoxLayout* l = new QVBoxLayout( grp, 10 );
+ TQVBoxLayout* l = new TQVBoxLayout( grp, 10 );
- rbscratch = new QRadioButton( i18n( "Create from scratch" ), grp );
+ rbscratch = new TQRadioButton( i18n( "Create from scratch" ), grp );
l->addWidget( rbscratch, 1 );
//l->addWidget(rbscratch, 5, AlignLeft);
- rbtempl = new QRadioButton( i18n( "Create from template" ), grp );
+ rbtempl = new TQRadioButton( i18n( "Create from template" ), grp );
l->addWidget( rbtempl, 1 );
//l->addWidget(rbtempl, 5, AlignLeft);
@@ -189,21 +189,21 @@ void NewSelect::buttonClicked(int id)
emit iconopenstyle(id);
}
-NewFromTemplate::NewFromTemplate( QWidget* parent )
- : QWidget( parent )
+NewFromTemplate::NewFromTemplate( TQWidget* parent )
+ : TQWidget( parent )
{
wiz = (KWizard*) parent;
- QVBoxLayout* ml = new QVBoxLayout(this);
+ TQVBoxLayout* ml = new TQVBoxLayout(this);
- grp = new QGroupBox( i18n( "Templates" ), this );
+ grp = new TQGroupBox( i18n( "Templates" ), this );
ml->addWidget( grp, 1 );
//ml->addWidget(grp, 10, AlignLeft);
- QHBoxLayout* l = new QHBoxLayout( grp, 15 );
+ TQHBoxLayout* l = new TQHBoxLayout( grp, 15 );
templates = new KIconListBox( grp );
- connect( templates, SIGNAL( highlighted( int ) ), SLOT( checkSelection( int ) ) );
+ connect( templates, TQT_SIGNAL( highlighted( int ) ), TQT_SLOT( checkSelection( int ) ) );
l->addWidget( templates );
for( int i = 0; i < (int) KIconTemplateContainer::self()->count(); i++ )
@@ -223,7 +223,7 @@ void NewFromTemplate::checkSelection( int )
wiz->finishButton()->setEnabled( false );
}
-KNewIcon::KNewIcon( QWidget* parent )
+KNewIcon::KNewIcon( TQWidget* parent )
: KWizard( parent, 0, true )
{
//kdDebug(4640) << "KNewIcon" << endl;
@@ -237,14 +237,14 @@ KNewIcon::KNewIcon( QWidget* parent )
nextButton()->setEnabled( false );
select = new NewSelect( this );
- connect( select, SIGNAL( iconopenstyle( int ) ), SLOT( iconOpenStyle( int ) ) );
+ connect( select, TQT_SIGNAL( iconopenstyle( int ) ), TQT_SLOT( iconOpenStyle( int ) ) );
- scratch = new KResizeWidget( this, 0, QSize( 32, 32 ) );
+ scratch = new KResizeWidget( this, 0, TQSize( 32, 32 ) );
// this doesn't accept default valid size, besides spin buttons won't allow
// an invalid size to be set by the user - forces user to change valid default
// size to create the new icon object -
- connect( scratch, SIGNAL( validSize( bool ) ), SLOT( checkPage( bool ) ) );
- connect(this, SIGNAL(selected(const QString &)), this, SLOT(checkPage(const QString &)));
+ connect( scratch, TQT_SIGNAL( validSize( bool ) ), TQT_SLOT( checkPage( bool ) ) );
+ connect(this, TQT_SIGNAL(selected(const TQString &)), this, TQT_SLOT(checkPage(const TQString &)));
templ = new NewFromTemplate(this);
templ->hide();
@@ -311,7 +311,7 @@ void KNewIcon::checkPage( bool b)
templ->checkSelection(0);
}
-void KNewIcon::checkPage(const QString &)
+void KNewIcon::checkPage(const TQString &)
{
if(currentPage() == select || openstyle == Blank)
finishButton()->setEnabled(true);
diff --git a/kiconedit/knew.h b/kiconedit/knew.h
index 8801faf7..a2d5dc7e 100644
--- a/kiconedit/knew.h
+++ b/kiconedit/knew.h
@@ -21,10 +21,10 @@
#ifndef __KNEWICON_H__
#define __KNEWICON_H__
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qlistbox.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqlistbox.h>
#include <kwizard.h>
@@ -32,46 +32,46 @@
class KIconListBox;
class KIconTemplateContainer;
-class QButtonGroup;
-class QRadioButton;
-class QGroupBox;
+class TQButtonGroup;
+class TQRadioButton;
+class TQGroupBox;
struct KIconTemplate
{
- QString path;
- QString title;
+ TQString path;
+ TQString title;
};
-class KIconListBoxItem : public QListBoxItem
+class KIconListBoxItem : public TQListBoxItem
{
public:
KIconListBoxItem( KIconTemplate );
- const QString path() { return icontemplate.path; }
+ const TQString path() { return icontemplate.path; }
KIconTemplate& iconTemplate() { return icontemplate; }
void reloadIcon();
protected:
- virtual void paint( QPainter * );
- virtual int height( const QListBox * ) const;
- virtual int width( const QListBox * ) const;
+ virtual void paint( TQPainter * );
+ virtual int height( const TQListBox * ) const;
+ virtual int width( const TQListBox * ) const;
private:
- QPixmap pm;
+ TQPixmap pm;
KIconTemplate icontemplate;
};
-class KIconListBox : public QListBox
+class KIconListBox : public TQListBox
{
Q_OBJECT
public:
- KIconListBox( QWidget *parent ) : QListBox(parent) {} ;
- const QString path(int idx) { return ((KIconListBoxItem*)item(idx))->path(); }
+ KIconListBox( TQWidget *parent ) : TQListBox(parent) {} ;
+ const TQString path(int idx) { return ((KIconListBoxItem*)item(idx))->path(); }
KIconTemplate& iconTemplate(int idx) { return ((KIconListBoxItem*)item(idx))->iconTemplate(); }
};
-class KIconTemplateContainer : public QValueList<KIconTemplate>
+class KIconTemplateContainer : public TQValueList<KIconTemplate>
{
public:
static KIconTemplateContainer* self()
@@ -97,7 +97,7 @@ class NewSelect : public QWidget
{
Q_OBJECT
public:
- NewSelect(QWidget *parent);
+ NewSelect(TQWidget *parent);
~NewSelect();
signals:
@@ -108,18 +108,18 @@ protected slots:
protected:
KWizard *wiz;
- QButtonGroup *grp;
- QRadioButton *rbscratch, *rbtempl;
+ TQButtonGroup *grp;
+ TQRadioButton *rbscratch, *rbtempl;
};
class NewFromTemplate : public QWidget
{
Q_OBJECT
public:
- NewFromTemplate(QWidget *parent);
+ NewFromTemplate(TQWidget *parent);
~NewFromTemplate();
- const QString path() { return QString(templates->path(templates->currentItem())); }
+ const TQString path() { return TQString(templates->path(templates->currentItem())); }
public slots:
void checkSelection(int);
@@ -127,37 +127,37 @@ public slots:
protected:
KIconListBox *templates;
KWizard *wiz;
- QGroupBox *grp;
+ TQGroupBox *grp;
};
class KNewIcon : public KWizard
{
Q_OBJECT
public:
- KNewIcon(QWidget *parent);
+ KNewIcon(TQWidget *parent);
~KNewIcon();
enum { Blank = 0, Template = 1};
int openStyle() { return openstyle; }
- const QString templatePath() { return QString(templ->path()); }
- const QSize templateSize() { return scratch->getSize(); }
+ const TQString templatePath() { return TQString(templ->path()); }
+ const TQSize templateSize() { return scratch->getSize(); }
protected slots:
void okClicked();
void cancelClicked();
void iconOpenStyle(int);
void checkPage(bool);
- void checkPage(const QString &);
+ void checkPage(const TQString &);
signals:
- void newicon(const QSize);
- void newicon(const QString);
+ void newicon(const TQSize);
+ void newicon(const TQString);
protected:
NewSelect *select;
KResizeWidget *scratch;
NewFromTemplate *templ;
- QWidget *act;
+ TQWidget *act;
int openstyle;
};
diff --git a/kiconedit/kresize.cpp b/kiconedit/kresize.cpp
index 82a86ee3..b2af86b6 100644
--- a/kiconedit/kresize.cpp
+++ b/kiconedit/kresize.cpp
@@ -19,31 +19,31 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
#include <klocale.h>
#include <knuminput.h>
#include "kresize.h"
-KResizeWidget::KResizeWidget( QWidget* parent, const char* name,
- const QSize& size ) : QWidget( parent, name )
+KResizeWidget::KResizeWidget( TQWidget* parent, const char* name,
+ const TQSize& size ) : TQWidget( parent, name )
{
- QHBoxLayout* genLayout = new QHBoxLayout( this );
+ TQHBoxLayout* genLayout = new TQHBoxLayout( this );
- QGroupBox* group = new QGroupBox( i18n( "Size" ), this );
+ TQGroupBox* group = new TQGroupBox( i18n( "Size" ), this );
group->setColumnLayout( 0, Qt::Horizontal );
genLayout->addWidget( group );
- QHBoxLayout* layout = new QHBoxLayout( group->layout(), 6 );
+ TQHBoxLayout* layout = new TQHBoxLayout( group->layout(), 6 );
m_width = new KIntSpinBox( 1, 200, 1, 1, 10, group );
m_width->setValue( size.width() );
layout->addWidget( m_width, 1 );
- QLabel* label = new QLabel( "X", group );
+ TQLabel* label = new TQLabel( "X", group );
layout->addWidget( label );
m_height = new KIntSpinBox( 1, 200, 1, 1, 10, group);
@@ -57,13 +57,13 @@ KResizeWidget::~KResizeWidget()
{
}
-const QSize KResizeWidget::getSize()
+const TQSize KResizeWidget::getSize()
{
- return QSize( m_width->value(), m_height->value() );
+ return TQSize( m_width->value(), m_height->value() );
}
-KResizeDialog::KResizeDialog( QWidget* parent, const char* name,
- const QSize size )
+KResizeDialog::KResizeDialog( TQWidget* parent, const char* name,
+ const TQSize size )
: KDialogBase( parent, name, true, i18n( "Select Size" ), Ok|Cancel )
{
m_resize = new KResizeWidget( this, "resize widget", size );
@@ -75,7 +75,7 @@ KResizeDialog::~KResizeDialog()
{
}
-const QSize KResizeDialog::getSize()
+const TQSize KResizeDialog::getSize()
{
return m_resize->getSize();
}
diff --git a/kiconedit/kresize.h b/kiconedit/kresize.h
index 691a4bd9..d3256232 100644
--- a/kiconedit/kresize.h
+++ b/kiconedit/kresize.h
@@ -32,10 +32,10 @@ class KResizeWidget : public QWidget
public:
- KResizeWidget( QWidget* parent, const char* name, const QSize& );
+ KResizeWidget( TQWidget* parent, const char* name, const TQSize& );
~KResizeWidget();
- const QSize getSize();
+ const TQSize getSize();
private:
@@ -49,10 +49,10 @@ class KResizeDialog : public KDialogBase
public:
- KResizeDialog( QWidget* parent, const char* name, const QSize s );
+ KResizeDialog( TQWidget* parent, const char* name, const TQSize s );
~KResizeDialog();
- const QSize getSize();
+ const TQSize getSize();
private:
diff --git a/kiconedit/palettetoolbar.cpp b/kiconedit/palettetoolbar.cpp
index 207442e1..07fa30b1 100644
--- a/kiconedit/palettetoolbar.cpp
+++ b/kiconedit/palettetoolbar.cpp
@@ -19,10 +19,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
-#include <qpainter.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqpainter.h>
#include <klocale.h>
#include <kdebug.h>
@@ -30,56 +30,56 @@
#include "kiconcolors.h"
#include "palettetoolbar.h"
-PaletteToolBar::PaletteToolBar( QWidget *parent, const char *name )
+PaletteToolBar::PaletteToolBar( TQWidget *parent, const char *name )
: KToolBar( parent, name )
{
- QWidget *base = new QWidget( this );
+ TQWidget *base = new TQWidget( this );
- QBoxLayout::Direction d = orientation() == Qt::Horizontal?
- QBoxLayout::LeftToRight : QBoxLayout::TopToBottom;
- m_layout = new QBoxLayout( base, d, 2, 6 );
+ TQBoxLayout::Direction d = orientation() == Qt::Horizontal?
+ TQBoxLayout::LeftToRight : TQBoxLayout::TopToBottom;
+ m_layout = new TQBoxLayout( base, d, 2, 6 );
- m_lblPreview = new QLabel( base );
- m_lblPreview->setFrameStyle( QFrame::Panel|QFrame::Sunken );
+ m_lblPreview = new TQLabel( base );
+ m_lblPreview->setFrameStyle( TQFrame::Panel|TQFrame::Sunken );
m_lblPreview->setFixedHeight( 64 );
m_lblPreview->setAlignment( Qt::AlignHCenter|Qt::AlignVCenter );
- QWhatsThis::add(m_lblPreview, i18n( "Preview\n\nThis is a 1:1 preview"
+ TQWhatsThis::add(m_lblPreview, i18n( "Preview\n\nThis is a 1:1 preview"
" of the current icon" ) );
m_layout->addWidget( m_lblPreview );
- m_currentColorView = new QLabel( base );
- m_currentColorView->setFrameStyle( QFrame::Panel|QFrame::Sunken );
+ m_currentColorView = new TQLabel( base );
+ m_currentColorView->setFrameStyle( TQFrame::Panel|TQFrame::Sunken );
m_currentColorView->setFixedHeight( 24 );
m_currentColorView->setAlignment( Qt::AlignHCenter|Qt::AlignVCenter );
- QWhatsThis::add(m_currentColorView, i18n( "Current color\n\nThis is the currently selected color" ) );
+ TQWhatsThis::add(m_currentColorView, i18n( "Current color\n\nThis is the currently selected color" ) );
m_layout->addWidget( m_currentColorView );
- QVBoxLayout *vlayout = new QVBoxLayout( m_layout, 0 );
- QLabel *l = new QLabel( i18n( "System colors:" ), base );
+ TQVBoxLayout *vlayout = new TQVBoxLayout( m_layout, 0 );
+ TQLabel *l = new TQLabel( i18n( "System colors:" ), base );
vlayout->addWidget( l );
m_sysColors = new KSysColors( base );
- QWhatsThis::add(m_sysColors, i18n( "System colors\n\nHere you can select"
+ TQWhatsThis::add(m_sysColors, i18n( "System colors\n\nHere you can select"
" colors from the KDE icon palette" ) );
vlayout->addWidget( m_sysColors );
- connect( m_sysColors, SIGNAL( newColor(uint) ),
- SIGNAL( newColor(uint) ) );
+ connect( m_sysColors, TQT_SIGNAL( newColor(uint) ),
+ TQT_SIGNAL( newColor(uint) ) );
- vlayout = new QVBoxLayout( m_layout, 0 );
- l = new QLabel( i18n( "Custom colors:" ), base );
+ vlayout = new TQVBoxLayout( m_layout, 0 );
+ l = new TQLabel( i18n( "Custom colors:" ), base );
vlayout->addWidget( l );
m_customColors = new KCustomColors( base );
- QWhatsThis::add(m_customColors, i18n( "Custom colors\n\nHere you can"
+ TQWhatsThis::add(m_customColors, i18n( "Custom colors\n\nHere you can"
" build a palette of custom colors.\nDouble-click on a box to edit"
" the color" ) );
vlayout->addWidget( m_customColors );
- connect( m_customColors, SIGNAL( newColor(uint) ),
- SIGNAL( newColor(uint) ) );
- connect( this, SIGNAL( newColor(uint)),
- this, SLOT(currentColorChanged(uint)));
+ connect( m_customColors, TQT_SIGNAL( newColor(uint) ),
+ TQT_SIGNAL( newColor(uint) ) );
+ connect( this, TQT_SIGNAL( newColor(uint)),
+ this, TQT_SLOT(currentColorChanged(uint)));
currentColorChanged(OPAQUE_MASK|0);
setEnableContextMenu( false );
@@ -91,14 +91,14 @@ void PaletteToolBar::setOrientation( Orientation o )
if( barPos() == Floating )
o = o == Qt::Vertical ? Qt::Horizontal : Qt::Vertical;
- QBoxLayout::Direction d = o == Qt::Horizontal? QBoxLayout::LeftToRight
- : QBoxLayout::TopToBottom;
+ TQBoxLayout::Direction d = o == Qt::Horizontal? TQBoxLayout::LeftToRight
+ : TQBoxLayout::TopToBottom;
m_layout->setDirection( d );
- QDockWindow::setOrientation( o );
+ TQDockWindow::setOrientation( o );
}
-void PaletteToolBar::previewChanged( const QPixmap &p )
+void PaletteToolBar::previewChanged( const TQPixmap &p )
{
m_lblPreview->setPixmap( p );
}
@@ -116,12 +116,12 @@ void PaletteToolBar::addColor( uint color )
m_customColors->addColor( color );
}
-void PaletteToolBar::setPreviewBackground( QPixmap pixmap )
+void PaletteToolBar::setPreviewBackground( TQPixmap pixmap )
{
m_lblPreview->setBackgroundPixmap(pixmap);
}
-void PaletteToolBar::setPreviewBackground( const QColor& colour )
+void PaletteToolBar::setPreviewBackground( const TQColor& colour )
{
m_lblPreview->setBackgroundColor(colour);
}
@@ -139,8 +139,8 @@ void PaletteToolBar::currentColorChanged(uint color)
const uint lightColour = qRgb(255, 255, 255);
const uint darkColour = qRgb(127, 127, 127);
- QPixmap pm(2 * squareWidth, 2 * squareWidth);
- QPainter p(&pm);
+ TQPixmap pm(2 * squareWidth, 2 * squareWidth);
+ TQPainter p(&pm);
double alpha = qAlpha(color) / 255.0;
diff --git a/kiconedit/palettetoolbar.h b/kiconedit/palettetoolbar.h
index 83cb3960..1fede533 100644
--- a/kiconedit/palettetoolbar.h
+++ b/kiconedit/palettetoolbar.h
@@ -24,8 +24,8 @@
#include <ktoolbar.h>
-class QBoxLayout;
-class QLabel;
+class TQBoxLayout;
+class TQLabel;
class KSysColors;
class KCustomColors;
@@ -34,24 +34,24 @@ class PaletteToolBar : public KToolBar
Q_OBJECT
public:
- PaletteToolBar( QWidget *parent, const char *name = 0L );
+ PaletteToolBar( TQWidget *parent, const char *name = 0L );
signals:
void newColor( uint c );
public slots:
virtual void setOrientation( Orientation o );
- void previewChanged( const QPixmap &p );
+ void previewChanged( const TQPixmap &p );
void addColors( uint n, uint *c );
void addColor( uint color );
- void setPreviewBackground( QPixmap pixmap );
- void setPreviewBackground( const QColor& colour );
+ void setPreviewBackground( TQPixmap pixmap );
+ void setPreviewBackground( const TQColor& colour );
void currentColorChanged(uint color);
private:
- QBoxLayout *m_layout;
- QLabel *m_lblPreview;
- QLabel *m_currentColorView;
+ TQBoxLayout *m_layout;
+ TQLabel *m_lblPreview;
+ TQLabel *m_currentColorView;
KSysColors *m_sysColors;
KCustomColors *m_customColors;
};
diff --git a/kiconedit/properties.cpp b/kiconedit/properties.cpp
index 0f2c1f44..f2ff221a 100644
--- a/kiconedit/properties.cpp
+++ b/kiconedit/properties.cpp
@@ -33,13 +33,13 @@ KIconEditProperties* KIconEditProperties::self()
return m_self;
}
-KIconEditProperties::KIconEditProperties() : QObject()
+KIconEditProperties::KIconEditProperties() : TQObject()
{
KConfig *config = kapp->config();
config->setGroup( "Appearance" );
- m_bgMode = (QWidget::BackgroundMode)config->readNumEntry( "BackgroundMode", QWidget::FixedPixmap);
+ m_bgMode = (TQWidget::BackgroundMode)config->readNumEntry( "BackgroundMode", TQWidget::FixedPixmap);
m_bgColor = config->readColorEntry( "BackgroundColor", &gray);
m_bgPixmap = config->readPathEntry("BackgroundPixmap");
@@ -58,13 +58,13 @@ KIconEditProperties::KIconEditProperties() : QObject()
m_transparencyDisplayType = KIconEditGrid::TRD_SOLIDCOLOR;
}
- QColor checkColor1(255, 255, 255);
- QColor checkColor2(127, 127, 127);
+ TQColor checkColor1(255, 255, 255);
+ TQColor checkColor2(127, 127, 127);
m_checkerboardColor1 = config->readColorEntry( "CheckerboardColor1", &checkColor1);
m_checkerboardColor2 = config->readColorEntry( "CheckerboardColor2", &checkColor2);
- QString checkerboardSize = config->readEntry( "CheckerboardSize", "Medium" );
+ TQString checkerboardSize = config->readEntry( "CheckerboardSize", "Medium" );
if(checkerboardSize == "Small")
{
@@ -80,7 +80,7 @@ KIconEditProperties::KIconEditProperties() : QObject()
m_checkerboardSize = KIconEditGrid::CHK_LARGE;
}
- QColor solidColor(255, 255, 255);
+ TQColor solidColor(255, 255, 255);
m_transparencySolidColor = config->readColorEntry( "TransparencySolidColor", &solidColor);
}
@@ -106,7 +106,7 @@ void KIconEditProperties::save()
config->writeEntry("GridScaling", m_gridScale );
config->writeEntry("ShowRulers", m_showRulers );
- QString transparencyDisplayType;
+ TQString transparencyDisplayType;
switch(m_transparencyDisplayType)
{
@@ -123,7 +123,7 @@ void KIconEditProperties::save()
config->writeEntry( "CheckerboardColor1", m_checkerboardColor1 );
config->writeEntry( "CheckerboardColor2", m_checkerboardColor2 );
- QString checkerboardSize;
+ TQString checkerboardSize;
switch(m_checkerboardSize)
{
diff --git a/kiconedit/properties.h b/kiconedit/properties.h
index e94f6d2c..7e97b9b4 100644
--- a/kiconedit/properties.h
+++ b/kiconedit/properties.h
@@ -22,7 +22,7 @@
#ifndef __PROPS_H__
#define __PROPS_H__
-#include <qwidget.h>
+#include <tqwidget.h>
#include "kicongrid.h"
@@ -32,49 +32,49 @@ public:
static KIconEditProperties* self();
~KIconEditProperties();
- QString bgPixmap() { return m_bgPixmap; }
- QColor bgColor() { return m_bgColor; }
- QWidget::BackgroundMode bgMode() { return m_bgMode; }
+ TQString bgPixmap() { return m_bgPixmap; }
+ TQColor bgColor() { return m_bgColor; }
+ TQWidget::BackgroundMode bgMode() { return m_bgMode; }
bool showGrid() { return m_showGrid; }
bool pasteTransparent() { return m_pasteTransparent; }
bool showRulers() { return m_showRulers; }
int gridScale() { return m_gridScale; }
KIconEditGrid::TransparencyDisplayType transparencyDisplayType() const { return m_transparencyDisplayType; }
- QColor checkerboardColor1() const { return m_checkerboardColor1; }
- QColor checkerboardColor2() const { return m_checkerboardColor2; }
+ TQColor checkerboardColor1() const { return m_checkerboardColor1; }
+ TQColor checkerboardColor2() const { return m_checkerboardColor2; }
KIconEditGrid::CheckerboardSize checkerboardSize() const { return m_checkerboardSize; }
- QColor transparencySolidColor() const { return m_transparencySolidColor; }
+ TQColor transparencySolidColor() const { return m_transparencySolidColor; }
- void setBgPixmap( const QString &p ) { m_bgPixmap = p; }
- void setBgColor( const QColor &c ) { m_bgColor = c; }
- void setBgMode( QWidget::BackgroundMode m ) { m_bgMode = m; }
+ void setBgPixmap( const TQString &p ) { m_bgPixmap = p; }
+ void setBgColor( const TQColor &c ) { m_bgColor = c; }
+ void setBgMode( TQWidget::BackgroundMode m ) { m_bgMode = m; }
void setShowGrid( bool b ) { m_showGrid = b; }
void setPasteTransparent( bool b ) { m_pasteTransparent = b; }
void setShowRulers( bool b ) { m_showRulers = b; }
void setGridScale( int s ) { m_gridScale = s; }
void setTransparencyDisplayType(KIconEditGrid::TransparencyDisplayType t) { m_transparencyDisplayType = t; }
- void setCheckerboardColor1(const QColor& c) { m_checkerboardColor1 = c; }
- void setCheckerboardColor2(const QColor& c) { m_checkerboardColor2 = c; }
+ void setCheckerboardColor1(const TQColor& c) { m_checkerboardColor1 = c; }
+ void setCheckerboardColor2(const TQColor& c) { m_checkerboardColor2 = c; }
void setCheckerboardSize(KIconEditGrid::CheckerboardSize size) { m_checkerboardSize = size; }
- void setTransparencySolidColor(const QColor& c) { m_transparencySolidColor = c; }
+ void setTransparencySolidColor(const TQColor& c) { m_transparencySolidColor = c; }
void save();
protected:
KIconEditProperties();
- QString m_bgPixmap;
- QColor m_bgColor;
- QWidget::BackgroundMode m_bgMode;
+ TQString m_bgPixmap;
+ TQColor m_bgColor;
+ TQWidget::BackgroundMode m_bgMode;
bool m_showGrid;
bool m_pasteTransparent;
bool m_showRulers;
int m_gridScale;
KIconEditGrid::TransparencyDisplayType m_transparencyDisplayType;
- QColor m_checkerboardColor1;
- QColor m_checkerboardColor2;
+ TQColor m_checkerboardColor1;
+ TQColor m_checkerboardColor2;
KIconEditGrid::CheckerboardSize m_checkerboardSize;
- QColor m_transparencySolidColor;
+ TQColor m_transparencySolidColor;
static KIconEditProperties* m_self;
};
diff --git a/kiconedit/utils.cpp b/kiconedit/utils.cpp
index 1af52803..e5748ffe 100644
--- a/kiconedit/utils.cpp
+++ b/kiconedit/utils.cpp
@@ -47,17 +47,17 @@ void setupImageHandlers()
formats->append(new imageFormat("ICO", "Windows Icon File", "ico"));
/*
#ifdef HAVE_LIBJPEG
- QImageIO::defineIOHandler("JFIF","^\377\330\377\340", 0, read_jpeg_jfif, NULL);
+ TQImageIO::defineIOHandler("JFIF","^\377\330\377\340", 0, read_jpeg_jfif, NULL);
#endif
*/
}
// Simple copy operation on local files (isn't there something like this in the libs?)
-bool copyFile(const QString &src, const QString &dest)
+bool copyFile(const TQString &src, const TQString &dest)
{
- QFile f_src(src);
- QFile f_dest(dest);
- QFileInfo fi(f_src);
+ TQFile f_src(src);
+ TQFile f_dest(dest);
+ TQFileInfo fi(f_src);
uint src_size = fi.size();
kdDebug(4640) << "Size: " << src_size << endl;
@@ -96,11 +96,11 @@ bool copyFile(const QString &src, const QString &dest)
return false;
}
-bool removeFile(const QString &file)
+bool removeFile(const TQString &file)
{
- if(file.length() > 0 && QFile::exists(file))
+ if(file.length() > 0 && TQFile::exists(file))
{
- QDir d;
+ TQDir d;
kdDebug(4640) << "Removing " << file << endl;
if(!d.remove(file))
{
@@ -112,7 +112,7 @@ bool removeFile(const QString &file)
return false;
}
-bool moveFile(const QString &src, const QString &dest)
+bool moveFile(const TQString &src, const TQString &dest)
{
if(copyFile(src, dest))
return removeFile(src);
diff --git a/kiconedit/utils.h b/kiconedit/utils.h
index c1e1a4c0..5c3f19c0 100644
--- a/kiconedit/utils.h
+++ b/kiconedit/utils.h
@@ -22,15 +22,15 @@
#ifndef __UTILS_H__
#define __UTILS_H__
-#include <qimage.h>
+#include <tqimage.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
-#include <qdir.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
#include <kapplication.h>
#define OPAQUE_MASK 0xff000000
@@ -57,14 +57,14 @@ struct imageFormat
const char *extension;
};
-typedef QPtrList<struct imageFormat> imageFormats;
+typedef TQPtrList<struct imageFormat> imageFormats;
extern imageFormats *formats;
void setupImageHandlers();
-bool copyFile(const QString &src, const QString &dest);
-bool removeFile(const QString &file);
-bool moveFile(const QString &src, const QString &dest);
+bool copyFile(const TQString &src, const TQString &dest);
+bool removeFile(const TQString &file);
+bool moveFile(const TQString &src, const TQString &dest);
uint kdeColor(uint c);
#endif //__UTILS_H__