diff options
Diffstat (limited to 'kimagemapeditor/kimedialogs.cpp')
-rw-r--r-- | kimagemapeditor/kimedialogs.cpp | 340 |
1 files changed, 170 insertions, 170 deletions
diff --git a/kimagemapeditor/kimedialogs.cpp b/kimagemapeditor/kimedialogs.cpp index 27f104cb..0196b0e5 100644 --- a/kimagemapeditor/kimedialogs.cpp +++ b/kimagemapeditor/kimedialogs.cpp @@ -16,22 +16,22 @@ ***************************************************************************/ // QT -//#include <qstring.h> -#include <qcheckbox.h> -#include <qmultilineedit.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qhbox.h> -#include <qvbox.h> -#include <qlineedit.h> -#include <qlistbox.h> -#include <qtable.h> -#include <qgroupbox.h> -#include <qspinbox.h> -#include <qtabwidget.h> -#include <qpointarray.h> -#include <qimage.h> -//#include <qwidget.h> +//#include <tqstring.h> +#include <tqcheckbox.h> +#include <tqmultilineedit.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqhbox.h> +#include <tqvbox.h> +#include <tqlineedit.h> +#include <tqlistbox.h> +#include <tqtable.h> +#include <tqgroupbox.h> +#include <tqspinbox.h> +#include <tqtabwidget.h> +#include <tqpointarray.h> +#include <tqimage.h> +//#include <tqwidget.h> // KDE #include <kiconloader.h> #include <kfiledialog.h> @@ -47,8 +47,8 @@ // LOCAL #include "kimedialogs.h" -CoordsEdit::CoordsEdit(QWidget *parent, Area* a) - : QWidget(parent) +CoordsEdit::CoordsEdit(TQWidget *parent, Area* a) + : TQWidget(parent) { area=a; } @@ -66,52 +66,52 @@ CoordsEdit::~CoordsEdit() { } -RectCoordsEdit::RectCoordsEdit(QWidget *parent, Area* a) +RectCoordsEdit::RectCoordsEdit(TQWidget *parent, Area* a) : CoordsEdit(parent,a) { - QGridLayout *layout= new QGridLayout(this,5,2,5,5); + TQGridLayout *layout= new TQGridLayout(this,5,2,5,5); - topXSpin = new QSpinBox(this); + topXSpin = new TQSpinBox(this); topXSpin->setMaxValue(INT_MAX); topXSpin->setMinValue(0); topXSpin->setValue(a->rect().left()); layout->addWidget(topXSpin,0,1); - connect( topXSpin, SIGNAL(valueChanged(const QString &)), this, SLOT(slotTriggerUpdate())); + connect( topXSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); - QLabel *lbl= new QLabel(i18n("Top &X:"),this); + TQLabel *lbl= new TQLabel(i18n("Top &X:"),this); lbl->setBuddy(topXSpin); layout->addWidget(lbl,0,0); - topYSpin = new QSpinBox(this); + topYSpin = new TQSpinBox(this); topYSpin->setMaxValue(INT_MAX); topYSpin->setMinValue(0); topYSpin->setValue(a->rect().top()); layout->addWidget(topYSpin,1,1); - connect( topYSpin, SIGNAL(valueChanged(const QString &)), this, SLOT(slotTriggerUpdate())); + connect( topYSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); - lbl= new QLabel(i18n("Top &Y:"),this); + lbl= new TQLabel(i18n("Top &Y:"),this); lbl->setBuddy(topYSpin); layout->addWidget(lbl,1,0); - widthSpin = new QSpinBox(this); + widthSpin = new TQSpinBox(this); widthSpin->setMaxValue(INT_MAX); widthSpin->setMinValue(0); widthSpin->setValue(a->rect().width()); layout->addWidget(widthSpin,2,1); - connect( widthSpin, SIGNAL(valueChanged(const QString &)), this, SLOT(slotTriggerUpdate())); + connect( widthSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); - lbl= new QLabel(i18n("&Width:"),this); + lbl= new TQLabel(i18n("&Width:"),this); lbl->setBuddy(widthSpin); layout->addWidget(lbl,2,0); - heightSpin = new QSpinBox(this); + heightSpin = new TQSpinBox(this); heightSpin->setMaxValue(INT_MAX); heightSpin->setMinValue(0); heightSpin->setValue(a->rect().height()); layout->addWidget(heightSpin,3,1); - connect( heightSpin, SIGNAL(valueChanged(const QString &)), this, SLOT(slotTriggerUpdate())); + connect( heightSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); - lbl= new QLabel(i18n("Hei&ght:"),this); + lbl= new TQLabel(i18n("Hei&ght:"),this); lbl->setBuddy(heightSpin); layout->addWidget(lbl,3,0); @@ -119,7 +119,7 @@ RectCoordsEdit::RectCoordsEdit(QWidget *parent, Area* a) } void RectCoordsEdit::applyChanges() { - QRect r; + TQRect r; r.setLeft(topXSpin->text().toInt()); r.setTop(topYSpin->text().toInt()); r.setWidth(widthSpin->text().toInt()); @@ -127,43 +127,43 @@ void RectCoordsEdit::applyChanges() { area->setRect(r); } -CircleCoordsEdit::CircleCoordsEdit(QWidget *parent, Area* a) +CircleCoordsEdit::CircleCoordsEdit(TQWidget *parent, Area* a) : CoordsEdit(parent,a) { - QGridLayout *layout= new QGridLayout(this,4,2,5,5); + TQGridLayout *layout= new TQGridLayout(this,4,2,5,5); - centerXSpin = new QSpinBox(this); + centerXSpin = new TQSpinBox(this); centerXSpin->setMaxValue(INT_MAX); centerXSpin->setMinValue(0); centerXSpin->setValue(a->rect().center().x()); layout->addWidget(centerXSpin,0,1); - connect( centerXSpin, SIGNAL(valueChanged(const QString &)), this, SLOT(slotTriggerUpdate())); + connect( centerXSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); - QLabel *lbl= new QLabel(i18n("Center &X:"),this); + TQLabel *lbl= new TQLabel(i18n("Center &X:"),this); lbl->setBuddy(centerXSpin); layout->addWidget(lbl,0,0); - centerYSpin = new QSpinBox(this); + centerYSpin = new TQSpinBox(this); centerYSpin->setMaxValue(INT_MAX); centerYSpin->setMinValue(0); centerYSpin->setValue(a->rect().center().y()); layout->addWidget(centerYSpin,1,1); - connect( centerYSpin, SIGNAL(valueChanged(const QString &)), this, SLOT(slotTriggerUpdate())); + connect( centerYSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); - lbl= new QLabel(i18n("Center &Y:"),this); + lbl= new TQLabel(i18n("Center &Y:"),this); lbl->setBuddy(centerYSpin); layout->addWidget(lbl,1,0); - radiusSpin = new QSpinBox(this); + radiusSpin = new TQSpinBox(this); radiusSpin->setMaxValue(INT_MAX); radiusSpin->setMinValue(0); radiusSpin->setValue(a->rect().width()/2); layout->addWidget(radiusSpin,2,1); - connect( radiusSpin, SIGNAL(valueChanged(const QString &)), this, SLOT(slotTriggerUpdate())); + connect( radiusSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); - lbl= new QLabel(i18n("&Radius:"),this); + lbl= new TQLabel(i18n("&Radius:"),this); lbl->setBuddy(radiusSpin); layout->addWidget(lbl,2,0); @@ -172,34 +172,34 @@ CircleCoordsEdit::CircleCoordsEdit(QWidget *parent, Area* a) } void CircleCoordsEdit::applyChanges() { - QRect r; + TQRect r; r.setWidth(radiusSpin->text().toInt()*2); r.setHeight(radiusSpin->text().toInt()*2); - r.moveCenter(QPoint(centerXSpin->text().toInt(), + r.moveCenter(TQPoint(centerXSpin->text().toInt(), centerYSpin->text().toInt())); area->setRect(r); } -PolyCoordsEdit::PolyCoordsEdit(QWidget *parent, Area* a) +PolyCoordsEdit::PolyCoordsEdit(TQWidget *parent, Area* a) : CoordsEdit(parent,a) { if (!a) return; - QVBoxLayout *layout= new QVBoxLayout(this); + TQVBoxLayout *layout= new TQVBoxLayout(this); int numPoints=a->coords()->count(); - coordsTable= new QTable(numPoints,2,this); + coordsTable= new TQTable(numPoints,2,this); coordsTable->horizontalHeader()->setLabel(0,"X"); coordsTable->horizontalHeader()->setLabel(1,"Y"); coordsTable->verticalHeader()->hide(); coordsTable->setLeftMargin(0); - coordsTable->setSelectionMode( QTable::Single ); + coordsTable->setSelectionMode( TQTable::Single ); for (int i=0;i<numPoints;i++) { - coordsTable->setText(i,0, QString::number(area->coords()->point(i).x()) ); - coordsTable->setText(i,1, QString::number(area->coords()->point(i).y()) ); + coordsTable->setText(i,0, TQString::number(area->coords()->point(i).x()) ); + coordsTable->setText(i,1, TQString::number(area->coords()->point(i).y()) ); } - connect( coordsTable, SIGNAL(currentChanged(int,int)), this, SLOT(slotHighlightPoint(int))); + connect( coordsTable, TQT_SIGNAL(currentChanged(int,int)), this, TQT_SLOT(slotHighlightPoint(int))); // coordsTable->setMinimumHeight(50); // coordsTable->setMaximumHeight(400); @@ -207,11 +207,11 @@ PolyCoordsEdit::PolyCoordsEdit(QWidget *parent, Area* a) coordsTable->resize(coordsTable->width(),100); layout->addWidget(coordsTable); layout->setStretchFactor(coordsTable,-1); - QHBox *hbox= new QHBox(this); - QPushButton *addBtn=new QPushButton(i18n("Add"),hbox); - connect( addBtn, SIGNAL(pressed()), this, SLOT(slotAddPoint())); - QPushButton *removeBtn=new QPushButton(i18n("Remove"),hbox); - connect( removeBtn, SIGNAL(pressed()), this, SLOT(slotRemovePoint())); + TQHBox *hbox= new TQHBox(this); + TQPushButton *addBtn=new TQPushButton(i18n("Add"),hbox); + connect( addBtn, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotAddPoint())); + TQPushButton *removeBtn=new TQPushButton(i18n("Remove"),hbox); + connect( removeBtn, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotRemovePoint())); layout->addWidget(hbox); slotHighlightPoint(1); @@ -231,7 +231,7 @@ void PolyCoordsEdit::slotHighlightPoint(int row) { void PolyCoordsEdit::slotAddPoint() { int newPos= coordsTable->currentRow(); - QPoint currentPoint=area->coords()->point(newPos); + TQPoint currentPoint=area->coords()->point(newPos); area->insertCoord(newPos,currentPoint); int count=area->coords()->size(); @@ -239,8 +239,8 @@ void PolyCoordsEdit::slotAddPoint() { coordsTable->setNumRows(count); for (int i=0;i<count;i++) { - coordsTable->setText(i,0, QString::number(area->coords()->point(i).x()) ); - coordsTable->setText(i,1, QString::number(area->coords()->point(i).y()) ); + coordsTable->setText(i,0, TQString::number(area->coords()->point(i).x()) ); + coordsTable->setText(i,1, TQString::number(area->coords()->point(i).y()) ); } emit update(); @@ -256,8 +256,8 @@ void PolyCoordsEdit::slotRemovePoint() { coordsTable->setNumRows(count); for (int i=0;i<count;i++) { - coordsTable->setText(i,0, QString::number(area->coords()->point(i).x()) ); - coordsTable->setText(i,1, QString::number(area->coords()->point(i).y()) ); + coordsTable->setText(i,0, TQString::number(area->coords()->point(i).x()) ); + coordsTable->setText(i,1, TQString::number(area->coords()->point(i).y()) ); } emit update(); @@ -267,37 +267,37 @@ void PolyCoordsEdit::applyChanges() { int count=coordsTable->numRows(); for (int i=0;i<count;i++) { - QPoint newPoint( coordsTable->text(i,0).toInt(), + TQPoint newPoint( coordsTable->text(i,0).toInt(), coordsTable->text(i,1).toInt()); area->moveCoord(i,newPoint); } } -SelectionCoordsEdit::SelectionCoordsEdit(QWidget *parent, Area* a) +SelectionCoordsEdit::SelectionCoordsEdit(TQWidget *parent, Area* a) : CoordsEdit(parent,a) { - QGridLayout *layout= new QGridLayout(this,2,2); + TQGridLayout *layout= new TQGridLayout(this,2,2); - topXSpin = new QSpinBox(this); + topXSpin = new TQSpinBox(this); topXSpin->setMaxValue(INT_MAX); topXSpin->setMinValue(0); topXSpin->setValue(a->rect().left()); layout->addWidget(topXSpin,0,1); - connect( topXSpin, SIGNAL(valueChanged(const QString &)), this, SLOT(slotTriggerUpdate())); + connect( topXSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); - QLabel *lbl= new QLabel(i18n("Top &X"),this); + TQLabel *lbl= new TQLabel(i18n("Top &X"),this); lbl->setBuddy(topXSpin); layout->addWidget(lbl,0,0); - topYSpin = new QSpinBox(this); + topYSpin = new TQSpinBox(this); topYSpin->setMaxValue(INT_MAX); topYSpin->setMinValue(0); topYSpin->setValue(a->rect().top()); layout->addWidget(topYSpin,1,1); - connect( topYSpin, SIGNAL(valueChanged(const QString &)), this, SLOT(slotTriggerUpdate())); + connect( topYSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); - lbl= new QLabel(i18n("Top &Y"),this); + lbl= new TQLabel(i18n("Top &Y"),this); lbl->setBuddy(topYSpin); layout->addWidget(lbl,1,0); } @@ -308,32 +308,32 @@ void SelectionCoordsEdit::applyChanges() { -QLineEdit* AreaDialog::createLineEdit(QWidget* parent, QGridLayout *layout, int y, const QString & value, const QString & name) +TQLineEdit* AreaDialog::createLineEdit(TQWidget* parent, TQGridLayout *layout, int y, const TQString & value, const TQString & name) { - QLineEdit* edit=new QLineEdit(value,parent); + TQLineEdit* edit=new TQLineEdit(value,parent); layout->addWidget(edit,y,2); - QLabel* lbl=new QLabel(name,parent); + TQLabel* lbl=new TQLabel(name,parent); lbl->setBuddy(edit); layout->addWidget(lbl,y,1); return edit; } -QWidget* AreaDialog::createGeneralPage() +TQWidget* AreaDialog::createGeneralPage() { - QFrame* page = new QFrame(this); - QGridLayout* layout = new QGridLayout(page,5,2,5,5); + TQFrame* page = new TQFrame(this); + TQGridLayout* layout = new TQGridLayout(page,5,2,5,5); - QHBox *hbox= new QHBox(page); - hrefEdit = new QLineEdit(area->attribute("href"),hbox); - QPushButton *btn = new QPushButton("",hbox); + TQHBox *hbox= new TQHBox(page); + hrefEdit = new TQLineEdit(area->attribute("href"),hbox); + TQPushButton *btn = new TQPushButton("",hbox); btn->setPixmap(SmallIcon("fileopen")); - connect( btn, SIGNAL(pressed()), this, SLOT(slotChooseHref())); + connect( btn, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotChooseHref())); hbox->setMinimumHeight(hbox->height()); layout->addWidget(hbox,0,2); - QLabel *lbl=new QLabel(i18n( "&HREF:" ),page); + TQLabel *lbl=new TQLabel(i18n( "&HREF:" ),page); lbl->setBuddy(hrefEdit); layout->addWidget(lbl,0,1); @@ -343,7 +343,7 @@ QWidget* AreaDialog::createGeneralPage() if (area->type()==Area::Default) { - defaultAreaChk = new QCheckBox(i18n("Enable default map"),page); + defaultAreaChk = new TQCheckBox(i18n("Enable default map"),page); if (area->finished()) defaultAreaChk->setChecked(true); layout->addWidget(defaultAreaChk,3,2); @@ -355,23 +355,23 @@ QWidget* AreaDialog::createGeneralPage() return page; } -QWidget* AreaDialog::createCoordsPage() +TQWidget* AreaDialog::createCoordsPage() { - QFrame* page = new QFrame(this); - QVBoxLayout *layout = new QVBoxLayout(page); + TQFrame* page = new TQFrame(this); + TQVBoxLayout *layout = new TQVBoxLayout(page); layout->setMargin(5); coordsEdit = createCoordsEdit(page,area); layout->addWidget(coordsEdit); - connect( coordsEdit, SIGNAL(update()), this, SLOT(slotUpdateArea())); + connect( coordsEdit, TQT_SIGNAL(update()), this, TQT_SLOT(slotUpdateArea())); return page; } -QWidget* AreaDialog::createJavascriptPage() +TQWidget* AreaDialog::createJavascriptPage() { - QFrame* page = new QFrame(this); - QGridLayout* layout = new QGridLayout(page,8,2,5,5); + TQFrame* page = new TQFrame(this); + TQGridLayout* layout = new TQGridLayout(page,8,2,5,5); onClickEdit = createLineEdit(page,layout,0,area->attribute("onClick"),i18n("OnClick:")); onDblClickEdit = createLineEdit(page,layout,1,area->attribute("onDblClick"),i18n("OnDblClick:")); @@ -387,17 +387,17 @@ QWidget* AreaDialog::createJavascriptPage() return page; } -QWidget* AreaDialog::createButtonBar() +TQWidget* AreaDialog::createButtonBar() { - QHBox *box = new QHBox(this); - QWidget *spacer = new QWidget(box); - QPushButton *okBtn = new KPushButton(KStdGuiItem::ok(),box); - QPushButton *applyBtn = new KPushButton(KStdGuiItem::apply(),box); - QPushButton *cancelBtn = new KPushButton(KStdGuiItem::cancel(),box); + TQHBox *box = new TQHBox(this); + TQWidget *spacer = new TQWidget(box); + TQPushButton *okBtn = new KPushButton(KStdGuiItem::ok(),box); + TQPushButton *applyBtn = new KPushButton(KStdGuiItem::apply(),box); + TQPushButton *cancelBtn = new KPushButton(KStdGuiItem::cancel(),box); - connect(okBtn, SIGNAL(clicked()), this, SLOT(slotOk())); - connect(applyBtn, SIGNAL(clicked()), this, SLOT(slotApply())); - connect(cancelBtn, SIGNAL(clicked()), this, SLOT(slotCancel())); + connect(okBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOk())); + connect(applyBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotApply())); + connect(cancelBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCancel())); box->setSpacing(5); box->setStretchFactor(spacer,10); @@ -423,7 +423,7 @@ AreaDialog::AreaDialog(KImageMapEditor* parent,Area * a) setCaption(i18n("Area Tag Editor")); area=a; - QString shape="Default"; + TQString shape="Default"; areaCopy= a->clone(); oldArea= new Area(); oldArea->setRect( a->rect() ); @@ -439,20 +439,20 @@ AreaDialog::AreaDialog(KImageMapEditor* parent,Area * a) // To get a margin around everything - QVBoxLayout *layout = new QVBoxLayout(this); + TQVBoxLayout *layout = new TQVBoxLayout(this); layout->setMargin(5); - QLabel *lbl = new QLabel("<b>"+shape+"</b>",this); + TQLabel *lbl = new TQLabel("<b>"+shape+"</b>",this); lbl->setTextFormat(Qt::RichText); layout->addWidget(lbl); - QFrame *line = new QFrame(this); - line->setFrameStyle(QFrame::HLine | QFrame::Sunken); + TQFrame *line = new TQFrame(this); + line->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); line->setFixedHeight(10); layout->addWidget(line); - QTabWidget *tab = new QTabWidget(this); + TQTabWidget *tab = new TQTabWidget(this); layout->addWidget(tab); @@ -467,8 +467,8 @@ AreaDialog::AreaDialog(KImageMapEditor* parent,Area * a) tab->addTab(createJavascriptPage(),i18n("&JavaScript")); - line = new QFrame(this); - line->setFrameStyle(QFrame::HLine | QFrame::Sunken); + line = new TQFrame(this); + line->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); line->setFixedHeight(10); layout->addWidget(line); @@ -485,7 +485,7 @@ AreaDialog::~AreaDialog() { delete oldArea; } -CoordsEdit* AreaDialog::createCoordsEdit(QWidget *parent, Area *a) { +CoordsEdit* AreaDialog::createCoordsEdit(TQWidget *parent, Area *a) { if (!a) return 0; switch (a->type()) { case Area::Rectangle : @@ -506,7 +506,7 @@ CoordsEdit* AreaDialog::createCoordsEdit(QWidget *parent, Area *a) { } void AreaDialog::slotChooseHref() { - KURL url=KFileDialog::getOpenURL(QString::null, "*|" + i18n( "All Files" ), this, i18n("Choose File")); + KURL url=KFileDialog::getOpenURL(TQString::null, "*|" + i18n( "All Files" ), this, i18n("Choose File")); if (!url.isEmpty()) { hrefEdit->setText(url.url()); } @@ -570,59 +570,59 @@ void AreaDialog::slotUpdateArea() { oldArea->setRect(area->rect()); } -ImageMapChooseDialog::ImageMapChooseDialog(QWidget* parent,QPtrList<MapTag> *_maps,QPtrList<ImageTag> *_images,const KURL & _baseUrl) +ImageMapChooseDialog::ImageMapChooseDialog(TQWidget* parent,TQPtrList<MapTag> *_maps,TQPtrList<ImageTag> *_images,const KURL & _baseUrl) : KDialogBase(parent,"",true,i18n( "Choose Map & Image to Edit" ),Ok,Ok,true) { baseUrl=_baseUrl; maps=_maps; images=_images; currentMap=0L; - QWidget *page=new QWidget(this); + TQWidget *page=new TQWidget(this); setMainWidget(page); setCaption(baseUrl.fileName()); - QVBoxLayout *layout = new QVBoxLayout(page,5,5); + TQVBoxLayout *layout = new TQVBoxLayout(page,5,5); - QLabel *lbl= new QLabel(i18n("Select an image and/or a map that you want to edit"),page); - lbl->setFont(QFont("Sans Serif",12, QFont::Bold)); + TQLabel *lbl= new TQLabel(i18n("Select an image and/or a map that you want to edit"),page); + lbl->setFont(TQFont("Sans Serif",12, TQFont::Bold)); layout->addWidget(lbl); - QFrame *line= new QFrame(page); - line->setFrameStyle(QFrame::HLine | QFrame::Sunken); + TQFrame *line= new TQFrame(page); + line->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); line->setFixedHeight(10); layout->addWidget(line,0); - QGridLayout *gridLayout= new QGridLayout(layout,2,3,5); + TQGridLayout *gridLayout= new TQGridLayout(layout,2,3,5); gridLayout->setRowStretch(0,0); gridLayout->setRowStretch(1,100); - lbl=new QLabel(i18n("&Maps"),page); - mapListBox= new QListBox(page); + lbl=new TQLabel(i18n("&Maps"),page); + mapListBox= new TQListBox(page); lbl->setBuddy(mapListBox); gridLayout->addWidget(lbl,0,0); gridLayout->addWidget(mapListBox,1,0); - line= new QFrame(page); - line->setFrameStyle(QFrame::VLine | QFrame::Sunken); + line= new TQFrame(page); + line->setFrameStyle(TQFrame::VLine | TQFrame::Sunken); line->setFixedWidth(10); -// line->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding)); +// line->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding)); gridLayout->addWidget(line,1,1); - lbl=new QLabel(i18n("Image Preview"),page); + lbl=new TQLabel(i18n("Image Preview"),page); gridLayout->addWidget(lbl,0,2); - imagePreview= new QLabel(page); + imagePreview= new TQLabel(page); imagePreview->setFixedSize(310,210); - imagePreview->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding)); - imagePreview->setFrameStyle(QLabel::Panel | QLabel::Sunken); + imagePreview->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding)); + imagePreview->setFrameStyle(TQLabel::Panel | TQLabel::Sunken); imagePreview->setIndent(5); - imagePreview->setBackgroundColor(QColor("white")); + imagePreview->setBackgroundColor(TQColor("white")); // imagePreview->setLineWidth(2); // imagePreview->setScaledContents(true); -// lbl= new QLabel(i18n("&Maps"),page); +// lbl= new TQLabel(i18n("&Maps"),page); // lbl->setBuddy(mapListBox); gridLayout->addWidget(imagePreview,1,2); // layout->addLayout(gridLayout,1); - line= new QFrame(page); - line->setFrameStyle(QFrame::HLine | QFrame::Sunken); + line= new TQFrame(page); + line->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); line->setFixedHeight(10); layout->addWidget(line,0); @@ -635,7 +635,7 @@ ImageMapChooseDialog::ImageMapChooseDialog(QWidget* parent,QPtrList<MapTag> *_ma for (MapTag *tag = maps->first(); tag!=0L; tag=maps->next()) { mapListBox->insertItem(tag->name); } - connect (mapListBox, SIGNAL(highlighted(int)), this, SLOT(slotMapChanged(int))); + connect (mapListBox, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(slotMapChanged(int))); } initImageListTable(page); @@ -648,25 +648,25 @@ ImageMapChooseDialog::ImageMapChooseDialog(QWidget* parent,QPtrList<MapTag> *_ma resize(510,460); } -void ImageMapChooseDialog::initImageListTable(QWidget* parent) { +void ImageMapChooseDialog::initImageListTable(TQWidget* parent) { if (images->isEmpty()) { - imageListTable= new QTable(1,1,parent); + imageListTable= new TQTable(1,1,parent); imageListTable->setText(0,0,i18n("No images found")); imageListTable->setEnabled(false); imageListTable->horizontalHeader()->hide(); imageListTable->setTopMargin(0); imageListTable->setColumnStretchable(0,true); } else { - imageListTable= new QTable(images->count(),2,parent); + imageListTable= new TQTable(images->count(),2,parent); imageListTable->setColumnStretchable(0,true); } imageListTable->verticalHeader()->hide(); imageListTable->setLeftMargin(0); - QLabel *lbl= new QLabel(i18n("&Images"),parent); + TQLabel *lbl= new TQLabel(i18n("&Images"),parent); lbl->setBuddy(imageListTable); parent->layout()->add(lbl); @@ -678,15 +678,15 @@ void ImageMapChooseDialog::initImageListTable(QWidget* parent) { imageListTable->horizontalHeader()->setLabel(0,i18n("Path")); imageListTable->horizontalHeader()->setLabel(1,"usemap"); - imageListTable->setSelectionMode(QTable::SingleRow); - imageListTable->setFocusStyle(QTable::FollowStyle); + imageListTable->setSelectionMode(TQTable::SingleRow); + imageListTable->setFocusStyle(TQTable::FollowStyle); imageListTable->clearSelection(true); int row=0; for (ImageTag *tag = images->first(); tag!=0L; tag=images->next()) { - QString src=""; - QString usemap=""; + TQString src=""; + TQString usemap=""; if (tag->find("src")) src=*tag->find("src"); if (tag->find("usemap")) @@ -696,7 +696,7 @@ void ImageMapChooseDialog::initImageListTable(QWidget* parent) { imageListTable->setText(row,1,usemap); row++; } - connect (imageListTable, SIGNAL(selectionChanged()), this, SLOT(slotImageChanged())); + connect (imageListTable, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotImageChanged())); imageListTable->selectRow(0); slotImageChanged(); @@ -710,12 +710,12 @@ ImageMapChooseDialog::~ImageMapChooseDialog() { void ImageMapChooseDialog::slotImageChanged() { int i=imageListTable->currentRow(); - QImage pix; + TQImage pix; if (images->at(i)->find("src")) { - QString str=*images->at(i)->find("src"); + TQString str=*images->at(i)->find("src"); // relative url pixUrl=KURL(baseUrl,str); - pix=QImage(pixUrl.path()); + pix=TQImage(pixUrl.path()); double zoom1=1; double zoom2=1; if (pix.width()>300) @@ -727,14 +727,14 @@ void ImageMapChooseDialog::slotImageChanged() zoom1= zoom1 < zoom2 ? zoom1 : zoom2; pix=pix.smoothScale((int)(pix.width()*zoom1),int(pix.height()*zoom1)); } - QPixmap pix2; + TQPixmap pix2; pix2.convertFromImage(pix); imagePreview->setPixmap(pix2); // imagePreview->repaint(); } -void ImageMapChooseDialog::selectImageWithUsemap(const QString & usemap) { +void ImageMapChooseDialog::selectImageWithUsemap(const TQString & usemap) { for (int i=0; i<imageListTable->numRows(); i++) { if (imageListTable->text(i,1)==usemap) { imageListTable->selectRow(i); @@ -749,18 +749,18 @@ void ImageMapChooseDialog::slotMapChanged(int i) { selectImageWithUsemap(currentMap->name); } -PreferencesDialog::PreferencesDialog(QWidget *parent, KConfig* conf) +PreferencesDialog::PreferencesDialog(TQWidget *parent, KConfig* conf) : KDialogBase(parent,"",true,i18n("Preferences"),Ok|Apply|Cancel,Ok,true) { config = conf; - QVBox *page=new QVBox(this); + TQVBox *page=new TQVBox(this); page->setSpacing(6); setMainWidget(page); - QHBox *hbox= new QHBox(page); + TQHBox *hbox= new TQHBox(page); - QLabel *lbl = new QLabel(i18n("&Maximum image preview height:")+" ",hbox); - rowHeightSpinBox = new QSpinBox(hbox); + TQLabel *lbl = new TQLabel(i18n("&Maximum image preview height:")+" ",hbox); + rowHeightSpinBox = new TQSpinBox(hbox); lbl->setBuddy(rowHeightSpinBox); config->setGroup("Appearance"); @@ -771,9 +771,9 @@ PreferencesDialog::PreferencesDialog(QWidget *parent, KConfig* conf) config->setGroup("General"); - hbox= new QHBox(page); - lbl = new QLabel(i18n("&Undo limit:")+" ",hbox); - undoSpinBox = new QSpinBox(hbox); + hbox= new TQHBox(page); + lbl = new TQLabel(i18n("&Undo limit:")+" ",hbox); + undoSpinBox = new TQSpinBox(hbox); undoSpinBox->setFixedWidth(60); lbl->setBuddy(undoSpinBox); @@ -781,31 +781,31 @@ PreferencesDialog::PreferencesDialog(QWidget *parent, KConfig* conf) undoSpinBox->setMinValue(1); undoSpinBox->setValue(config->readNumEntry("undo-level",20)); - hbox= new QHBox(page); - lbl = new QLabel(i18n("&Redo limit:")+" ",hbox); + hbox= new TQHBox(page); + lbl = new TQLabel(i18n("&Redo limit:")+" ",hbox); - redoSpinBox = new QSpinBox(hbox); + redoSpinBox = new TQSpinBox(hbox); redoSpinBox->setFixedWidth(60); redoSpinBox->setMaxValue(100); redoSpinBox->setMinValue(1); redoSpinBox->setValue(config->readNumEntry("redo-level",20)); lbl->setBuddy(redoSpinBox); - startWithCheck = new QCheckBox(i18n("&Start with last used document"),page); + startWithCheck = new TQCheckBox(i18n("&Start with last used document"),page); startWithCheck->setChecked(config->readBoolEntry("start-with-last-used-document",true)); /* - hbox= new QHBox(page); - (void)new QLabel(i18n("Highlight Areas")+" ",hbox); + hbox= new TQHBox(page); + (void)new TQLabel(i18n("Highlight Areas")+" ",hbox); - colorizeAreaChk = new QCheckBox(hbox); + colorizeAreaChk = new TQCheckBox(hbox); colorizeAreaChk->setFixedWidth(60); colorizeAreaChk->setChecked(kapp->config()->readBoolEntry("highlightareas",true)); - hbox= new QHBox(page); - (void)new QLabel(i18n("Show alternative text")+" ",hbox); + hbox= new TQHBox(page); + (void)new TQLabel(i18n("Show alternative text")+" ",hbox); - showAltChk = new QCheckBox(hbox); + showAltChk = new TQCheckBox(hbox); showAltChk->setFixedWidth(60); showAltChk->setChecked(kapp->config()->readBoolEntry("showalt",true)); */ @@ -836,7 +836,7 @@ void PreferencesDialog::slotApply( void ) { emit applyClicked(); } -HTMLPreviewDialog::HTMLPreviewDialog(QWidget* parent, KURL url, const QString & htmlCode) +HTMLPreviewDialog::HTMLPreviewDialog(TQWidget* parent, KURL url, const TQString & htmlCode) : KDialogBase(parent, "", true, i18n("Preview"), KDialogBase::Ok) { tempFile = new KTempFile(url.directory(false), ".html"); @@ -845,17 +845,17 @@ HTMLPreviewDialog::HTMLPreviewDialog(QWidget* parent, KURL url, const QString & kdDebug() << "HTMLPreviewDialog: TempFile : " << tempFile->name() << endl; tempFile->close(); - QVBox *page = makeVBoxMainWidget(); + TQVBox *page = makeVBoxMainWidget(); htmlPart = new KHTMLPart(page,"htmlpart"); // htmlView = new KHTMLView(htmlPart, page); -// htmlView->setVScrollBarMode(QScrollView::Auto); -// htmlView->setHScrollBarMode(QScrollView::Auto); +// htmlView->setVScrollBarMode(TQScrollView::Auto); +// htmlView->setHScrollBarMode(TQScrollView::Auto); // dialog->resize(dialog->calculateSize(edit->maxLineWidth(),edit->numLines()*)); // dialog->adjustSize(); - QLabel* lbl = new QLabel(page,"urllabel"); + TQLabel* lbl = new TQLabel(page,"urllabel"); - connect( htmlPart, SIGNAL( onURL(const QString&)), lbl, SLOT( setText(const QString&))); + connect( htmlPart, TQT_SIGNAL( onURL(const TQString&)), lbl, TQT_SLOT( setText(const TQString&))); } HTMLPreviewDialog::~HTMLPreviewDialog() { |