diff options
Diffstat (limited to 'kimagemapeditor/kimedialogs.cpp')
-rw-r--r-- | kimagemapeditor/kimedialogs.cpp | 156 |
1 files changed, 78 insertions, 78 deletions
diff --git a/kimagemapeditor/kimedialogs.cpp b/kimagemapeditor/kimedialogs.cpp index c2e50c7c..f825d6dc 100644 --- a/kimagemapeditor/kimedialogs.cpp +++ b/kimagemapeditor/kimedialogs.cpp @@ -19,7 +19,7 @@ //#include <tqstring.h> #include <tqcheckbox.h> #include <tqmultilineedit.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqhbox.h> #include <tqvbox.h> @@ -69,53 +69,53 @@ CoordsEdit::~CoordsEdit() RectCoordsEdit::RectCoordsEdit(TQWidget *parent, Area* a) : CoordsEdit(parent,a) { - TQGridLayout *tqlayout= new TQGridLayout(this,5,2,5,5); + TQGridLayout *layout= new TQGridLayout(this,5,2,5,5); topXSpin = new TQSpinBox(this); topXSpin->setMaxValue(INT_MAX); topXSpin->setMinValue(0); topXSpin->setValue(a->rect().left()); - tqlayout->addWidget(topXSpin,0,1); + layout->addWidget(topXSpin,0,1); connect( topXSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); TQLabel *lbl= new TQLabel(i18n("Top &X:"),this); lbl->setBuddy(topXSpin); - tqlayout->addWidget(lbl,0,0); + layout->addWidget(lbl,0,0); topYSpin = new TQSpinBox(this); topYSpin->setMaxValue(INT_MAX); topYSpin->setMinValue(0); topYSpin->setValue(a->rect().top()); - tqlayout->addWidget(topYSpin,1,1); + layout->addWidget(topYSpin,1,1); connect( topYSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); lbl= new TQLabel(i18n("Top &Y:"),this); lbl->setBuddy(topYSpin); - tqlayout->addWidget(lbl,1,0); + layout->addWidget(lbl,1,0); widthSpin = new TQSpinBox(this); widthSpin->setMaxValue(INT_MAX); widthSpin->setMinValue(0); widthSpin->setValue(a->rect().width()); - tqlayout->addWidget(widthSpin,2,1); + layout->addWidget(widthSpin,2,1); connect( widthSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); lbl= new TQLabel(i18n("&Width:"),this); lbl->setBuddy(widthSpin); - tqlayout->addWidget(lbl,2,0); + layout->addWidget(lbl,2,0); heightSpin = new TQSpinBox(this); heightSpin->setMaxValue(INT_MAX); heightSpin->setMinValue(0); heightSpin->setValue(a->rect().height()); - tqlayout->addWidget(heightSpin,3,1); + layout->addWidget(heightSpin,3,1); connect( heightSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); lbl= new TQLabel(i18n("Hei&ght:"),this); lbl->setBuddy(heightSpin); - tqlayout->addWidget(lbl,3,0); + layout->addWidget(lbl,3,0); - tqlayout->setRowStretch(4,10); + layout->setRowStretch(4,10); } void RectCoordsEdit::applyChanges() { @@ -130,44 +130,44 @@ void RectCoordsEdit::applyChanges() { CircleCoordsEdit::CircleCoordsEdit(TQWidget *parent, Area* a) : CoordsEdit(parent,a) { - TQGridLayout *tqlayout= new TQGridLayout(this,4,2,5,5); + TQGridLayout *layout= new TQGridLayout(this,4,2,5,5); centerXSpin = new TQSpinBox(this); centerXSpin->setMaxValue(INT_MAX); centerXSpin->setMinValue(0); centerXSpin->setValue(a->rect().center().x()); - tqlayout->addWidget(centerXSpin,0,1); + layout->addWidget(centerXSpin,0,1); connect( centerXSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); TQLabel *lbl= new TQLabel(i18n("Center &X:"),this); lbl->setBuddy(centerXSpin); - tqlayout->addWidget(lbl,0,0); + layout->addWidget(lbl,0,0); centerYSpin = new TQSpinBox(this); centerYSpin->setMaxValue(INT_MAX); centerYSpin->setMinValue(0); centerYSpin->setValue(a->rect().center().y()); - tqlayout->addWidget(centerYSpin,1,1); + layout->addWidget(centerYSpin,1,1); connect( centerYSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); lbl= new TQLabel(i18n("Center &Y:"),this); lbl->setBuddy(centerYSpin); - tqlayout->addWidget(lbl,1,0); + layout->addWidget(lbl,1,0); radiusSpin = new TQSpinBox(this); radiusSpin->setMaxValue(INT_MAX); radiusSpin->setMinValue(0); radiusSpin->setValue(a->rect().width()/2); - tqlayout->addWidget(radiusSpin,2,1); + layout->addWidget(radiusSpin,2,1); connect( radiusSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); lbl= new TQLabel(i18n("&Radius:"),this); lbl->setBuddy(radiusSpin); - tqlayout->addWidget(lbl,2,0); + layout->addWidget(lbl,2,0); - tqlayout->setRowStretch(3,10); + layout->setRowStretch(3,10); } @@ -184,7 +184,7 @@ PolyCoordsEdit::PolyCoordsEdit(TQWidget *parent, Area* a) : CoordsEdit(parent,a) { if (!a) return; - TQVBoxLayout *tqlayout= new TQVBoxLayout(this); + TQVBoxLayout *layout= new TQVBoxLayout(this); int numPoints=a->coords()->count(); coordsTable= new TQTable(numPoints,2,this); coordsTable->horizontalHeader()->setLabel(0,"X"); @@ -205,15 +205,15 @@ PolyCoordsEdit::PolyCoordsEdit(TQWidget *parent, Area* a) // coordsTable->setMaximumHeight(400); // coordsTable->resizeContents(100,100); coordsTable->resize(coordsTable->width(),100); - tqlayout->addWidget(coordsTable); - tqlayout->setStretchFactor(coordsTable,-1); + layout->addWidget(coordsTable); + layout->setStretchFactor(coordsTable,-1); 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())); - tqlayout->addWidget(hbox); + layout->addWidget(hbox); slotHighlightPoint(1); } @@ -277,29 +277,29 @@ void PolyCoordsEdit::applyChanges() { SelectionCoordsEdit::SelectionCoordsEdit(TQWidget *parent, Area* a) : CoordsEdit(parent,a) { - TQGridLayout *tqlayout= new TQGridLayout(this,2,2); + TQGridLayout *layout= new TQGridLayout(this,2,2); topXSpin = new TQSpinBox(this); topXSpin->setMaxValue(INT_MAX); topXSpin->setMinValue(0); topXSpin->setValue(a->rect().left()); - tqlayout->addWidget(topXSpin,0,1); + layout->addWidget(topXSpin,0,1); connect( topXSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); TQLabel *lbl= new TQLabel(i18n("Top &X"),this); lbl->setBuddy(topXSpin); - tqlayout->addWidget(lbl,0,0); + layout->addWidget(lbl,0,0); topYSpin = new TQSpinBox(this); topYSpin->setMaxValue(INT_MAX); topYSpin->setMinValue(0); topYSpin->setValue(a->rect().top()); - tqlayout->addWidget(topYSpin,1,1); + layout->addWidget(topYSpin,1,1); connect( topYSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); lbl= new TQLabel(i18n("Top &Y"),this); lbl->setBuddy(topYSpin); - tqlayout->addWidget(lbl,1,0); + layout->addWidget(lbl,1,0); } void SelectionCoordsEdit::applyChanges() { @@ -308,13 +308,13 @@ void SelectionCoordsEdit::applyChanges() { -TQLineEdit* AreaDialog::createLineEdit(TQWidget* parent, TQGridLayout *tqlayout, int y, const TQString & value, const TQString & name) +TQLineEdit* AreaDialog::createLineEdit(TQWidget* parent, TQGridLayout *layout, int y, const TQString & value, const TQString & name) { TQLineEdit* edit=new TQLineEdit(value,parent); - tqlayout->addWidget(edit,y,2); + layout->addWidget(edit,y,2); TQLabel* lbl=new TQLabel(name,parent); lbl->setBuddy(edit); - tqlayout->addWidget(lbl,y,1); + layout->addWidget(lbl,y,1); return edit; } @@ -322,7 +322,7 @@ TQLineEdit* AreaDialog::createLineEdit(TQWidget* parent, TQGridLayout *tqlayout, TQWidget* AreaDialog::createGeneralPage() { TQFrame* page = new TQFrame(this); - TQGridLayout* tqlayout = new TQGridLayout(page,5,2,5,5); + TQGridLayout* layout = new TQGridLayout(page,5,2,5,5); TQHBox *hbox= new TQHBox(page); @@ -332,25 +332,25 @@ TQWidget* AreaDialog::createGeneralPage() connect( btn, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotChooseHref())); hbox->setMinimumHeight(hbox->height()); - tqlayout->addWidget(hbox,0,2); + layout->addWidget(hbox,0,2); TQLabel *lbl=new TQLabel(i18n( "&HREF:" ),page); lbl->setBuddy(hrefEdit); - tqlayout->addWidget(lbl,0,1); + layout->addWidget(lbl,0,1); - altEdit = createLineEdit(page,tqlayout,1,area->attribute("alt"),i18n("Alt. &Text:")); - targetEdit = createLineEdit(page,tqlayout,2,area->attribute("target"),i18n("Tar&get:")); - titleEdit = createLineEdit(page,tqlayout,3,area->attribute("title"),i18n("Tit&le:")); + altEdit = createLineEdit(page,layout,1,area->attribute("alt"),i18n("Alt. &Text:")); + targetEdit = createLineEdit(page,layout,2,area->attribute("target"),i18n("Tar&get:")); + titleEdit = createLineEdit(page,layout,3,area->attribute("title"),i18n("Tit&le:")); if (area->type()==Area::Default) { defaultAreaChk = new TQCheckBox(i18n("Enable default map"),page); if (area->finished()) defaultAreaChk->setChecked(true); - tqlayout->addWidget(defaultAreaChk,3,2); + layout->addWidget(defaultAreaChk,3,2); } - tqlayout->setRowStretch(4,10); + layout->setRowStretch(4,10); return page; } @@ -358,11 +358,11 @@ TQWidget* AreaDialog::createGeneralPage() TQWidget* AreaDialog::createCoordsPage() { TQFrame* page = new TQFrame(this); - TQVBoxLayout *tqlayout = new TQVBoxLayout(page); - tqlayout->setMargin(5); + TQVBoxLayout *layout = new TQVBoxLayout(page); + layout->setMargin(5); coordsEdit = createCoordsEdit(page,area); - tqlayout->addWidget(coordsEdit); + layout->addWidget(coordsEdit); connect( coordsEdit, TQT_SIGNAL(update()), this, TQT_SLOT(slotUpdateArea())); return page; @@ -371,17 +371,17 @@ TQWidget* AreaDialog::createCoordsPage() TQWidget* AreaDialog::createJavascriptPage() { TQFrame* page = new TQFrame(this); - TQGridLayout* tqlayout = new TQGridLayout(page,8,2,5,5); + TQGridLayout* layout = new TQGridLayout(page,8,2,5,5); - onClickEdit = createLineEdit(page,tqlayout,0,area->attribute("onClick"),i18n("OnClick:")); - onDblClickEdit = createLineEdit(page,tqlayout,1,area->attribute("onDblClick"),i18n("OnDblClick:")); - onMouseDownEdit = createLineEdit(page,tqlayout,2,area->attribute("onMouseDown"),i18n("OnMouseDown:")); - onMouseUpEdit = createLineEdit(page,tqlayout,3,area->attribute("onMouseUp"),i18n("OnMouseUp:")); - onMouseOverEdit = createLineEdit(page,tqlayout,4,area->attribute("onMouseOver"),i18n("OnMouseOver:")); - onMouseMoveEdit = createLineEdit(page,tqlayout,5,area->attribute("onMouseMove"),i18n("OnMouseMove:")); - onMouseOutEdit = createLineEdit(page,tqlayout,6,area->attribute("onMouseOut"),i18n("OnMouseOut:")); + onClickEdit = createLineEdit(page,layout,0,area->attribute("onClick"),i18n("OnClick:")); + onDblClickEdit = createLineEdit(page,layout,1,area->attribute("onDblClick"),i18n("OnDblClick:")); + onMouseDownEdit = createLineEdit(page,layout,2,area->attribute("onMouseDown"),i18n("OnMouseDown:")); + onMouseUpEdit = createLineEdit(page,layout,3,area->attribute("onMouseUp"),i18n("OnMouseUp:")); + onMouseOverEdit = createLineEdit(page,layout,4,area->attribute("onMouseOver"),i18n("OnMouseOver:")); + onMouseMoveEdit = createLineEdit(page,layout,5,area->attribute("onMouseMove"),i18n("OnMouseMove:")); + onMouseOutEdit = createLineEdit(page,layout,6,area->attribute("onMouseOut"),i18n("OnMouseOut:")); - tqlayout->setRowStretch(7,10); + layout->setRowStretch(7,10); return page; @@ -423,44 +423,44 @@ AreaDialog::AreaDialog(KImageMapEditor* parent,Area * a) setCaption(i18n("Area Tag Editor")); area=a; - TQString tqshape="Default"; + TQString shape="Default"; areaCopy= a->clone(); oldArea= new Area(); oldArea->setRect( a->rect() ); switch (a->type()) { - case Area::Rectangle : tqshape=i18n("Rectangle");break; - case Area::Circle : tqshape=i18n("Circle");break; - case Area::Polygon : tqshape=i18n("Polygon");break; - case Area::Selection : tqshape=i18n("Selection");break; + case Area::Rectangle : shape=i18n("Rectangle");break; + case Area::Circle : shape=i18n("Circle");break; + case Area::Polygon : shape=i18n("Polygon");break; + case Area::Selection : shape=i18n("Selection");break; default : break; } // To get a margin around everything - TQVBoxLayout *tqlayout = new TQVBoxLayout(this); + TQVBoxLayout *layout = new TQVBoxLayout(this); - tqlayout->setMargin(5); + layout->setMargin(5); - TQLabel *lbl = new TQLabel("<b>"+tqshape+"</b>",this); + TQLabel *lbl = new TQLabel("<b>"+shape+"</b>",this); lbl->setTextFormat(TQt::RichText); - tqlayout->addWidget(lbl); + layout->addWidget(lbl); TQFrame *line = new TQFrame(this); line->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); line->setFixedHeight(10); - tqlayout->addWidget(line); + layout->addWidget(line); TQTabWidget *tab = new TQTabWidget(this); - tqlayout->addWidget(tab); + layout->addWidget(tab); tab->addTab(createGeneralPage(),i18n("&General")); if (a->type()==Area::Default) { - tqshape=i18n("Default"); + shape=i18n("Default"); } else tab->addTab(createCoordsPage(),i18n("Coor&dinates")); @@ -470,9 +470,9 @@ AreaDialog::AreaDialog(KImageMapEditor* parent,Area * a) line = new TQFrame(this); line->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); line->setFixedHeight(10); - tqlayout->addWidget(line); + layout->addWidget(line); - tqlayout->addWidget(createButtonBar()); + layout->addWidget(createButtonBar()); setMinimumHeight(360); setMinimumWidth(327); @@ -580,17 +580,17 @@ ImageMapChooseDialog::ImageMapChooseDialog(TQWidget* parent,TQPtrList<MapTag> *_ TQWidget *page=new TQWidget(this); setMainWidget(page); setCaption(baseUrl.fileName()); - TQVBoxLayout *tqlayout = new TQVBoxLayout(page,5,5); + TQVBoxLayout *layout = new TQVBoxLayout(page,5,5); 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)); - tqlayout->addWidget(lbl); + layout->addWidget(lbl); TQFrame *line= new TQFrame(page); line->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); line->setFixedHeight(10); - tqlayout->addWidget(line,0); + layout->addWidget(line,0); - TQGridLayout *gridLayout= new TQGridLayout(tqlayout,2,3,5); + TQGridLayout *gridLayout= new TQGridLayout(layout,2,3,5); gridLayout->setRowStretch(0,0); gridLayout->setRowStretch(1,100); lbl=new TQLabel(i18n("&Maps"),page); @@ -602,7 +602,7 @@ ImageMapChooseDialog::ImageMapChooseDialog(TQWidget* parent,TQPtrList<MapTag> *_ line= new TQFrame(page); line->setFrameStyle(TQFrame::VLine | TQFrame::Sunken); line->setFixedWidth(10); -// line->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding)); +// line->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding)); gridLayout->addWidget(line,1,1); lbl=new TQLabel(i18n("Image Preview"),page); @@ -610,7 +610,7 @@ ImageMapChooseDialog::ImageMapChooseDialog(TQWidget* parent,TQPtrList<MapTag> *_ imagePreview= new TQLabel(page); imagePreview->setFixedSize(310,210); - imagePreview->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding)); + imagePreview->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding)); imagePreview->setFrameStyle(TQLabel::Panel | TQLabel::Sunken); imagePreview->setIndent(5); imagePreview->setBackgroundColor(TQColor("white")); @@ -619,12 +619,12 @@ ImageMapChooseDialog::ImageMapChooseDialog(TQWidget* parent,TQPtrList<MapTag> *_ // lbl= new TQLabel(i18n("&Maps"),page); // lbl->setBuddy(mapListBox); gridLayout->addWidget(imagePreview,1,2); -// tqlayout->addLayout(gridLayout,1); +// layout->addLayout(gridLayout,1); line= new TQFrame(page); line->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); line->setFixedHeight(10); - tqlayout->addWidget(line,0); + layout->addWidget(line,0); if (maps->isEmpty()) { @@ -669,8 +669,8 @@ void ImageMapChooseDialog::initImageListTable(TQWidget* parent) { TQLabel *lbl= new TQLabel(i18n("&Images"),parent); lbl->setBuddy(imageListTable); - parent->tqlayout()->add(lbl); - parent->tqlayout()->add(imageListTable); + parent->layout()->add(lbl); + parent->layout()->add(imageListTable); if (images->isEmpty()) return; @@ -731,7 +731,7 @@ void ImageMapChooseDialog::slotImageChanged() pix2.convertFromImage(pix); imagePreview->setPixmap(pix2); -// imagePreview->tqrepaint(); +// imagePreview->repaint(); } void ImageMapChooseDialog::selectImageWithUsemap(const TQString & usemap) { @@ -866,8 +866,8 @@ HTMLPreviewDialog::~HTMLPreviewDialog() { void HTMLPreviewDialog::show() { KDialogBase::show(); htmlPart->openURL(KURL( tempFile->name() )); -// htmlView->tqlayout(); -// htmlView->tqrepaint(); +// htmlView->layout(); +// htmlView->repaint(); resize(800,600); } |