diff options
Diffstat (limited to 'kivio/kiviopart/kivio_view.cpp')
-rw-r--r-- | kivio/kiviopart/kivio_view.cpp | 502 |
1 files changed, 252 insertions, 250 deletions
diff --git a/kivio/kiviopart/kivio_view.cpp b/kivio/kiviopart/kivio_view.cpp index 82aad1f6..7d050b86 100644 --- a/kivio/kiviopart/kivio_view.cpp +++ b/kivio/kiviopart/kivio_view.cpp @@ -24,25 +24,25 @@ #include <time.h> #include <assert.h> -#include <qlayout.h> -#include <qwidgetstack.h> -#include <qsplitter.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qprintdialog.h> -#include <qptrcollection.h> -#include <qkeycode.h> -#include <qcheckbox.h> -#include <qmime.h> -#include <qtoolbutton.h> -#include <qtimer.h> -#include <qbutton.h> -#include <qclipboard.h> -#include <qprogressbar.h> - -#include <qstringlist.h> -#include <qstrlist.h> -#include <qimage.h> +#include <tqlayout.h> +#include <tqwidgetstack.h> +#include <tqsplitter.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqprintdialog.h> +#include <tqptrcollection.h> +#include <tqkeycode.h> +#include <tqcheckbox.h> +#include <tqmime.h> +#include <tqtoolbutton.h> +#include <tqtimer.h> +#include <tqbutton.h> +#include <tqclipboard.h> +#include <tqprogressbar.h> + +#include <tqstringlist.h> +#include <tqstrlist.h> +#include <tqimage.h> #include <kfiledialog.h> #include <kdialogbase.h> @@ -114,7 +114,7 @@ #include "KIvioViewIface.h" #include "kivio_command.h" #include "kiviostencilsetaction.h" -#include <qiconview.h> +#include <tqiconview.h> #include "kivioarrowheadaction.h" #include "kiviotextformatdlg.h" #include "kiviostencilformatdlg.h" @@ -135,7 +135,7 @@ using namespace Kivio; -KivioView::KivioView( QWidget *_parent, const char *_name, KivioDoc* doc ) +KivioView::KivioView( TQWidget *_parent, const char *_name, KivioDoc* doc ) : KoView( doc, _parent, _name ) { m_bShowGuides = true; @@ -153,18 +153,18 @@ KivioView::KivioView( QWidget *_parent, const char *_name, KivioDoc* doc ) if(KStatusBar* sb = statusBar()) { // No statusbar in e.g. konqueror m_pageCountSLbl = new KStatusBarLabel(i18n("%1 current page, %2 total number of pages", - "Page %1/%2").arg(0).arg(0), PAGECOUNT_TEXT, sb); + "Page %1/%2").tqarg(0).tqarg(0), PAGECOUNT_TEXT, sb); addStatusBarItem(m_pageCountSLbl, 0, false); m_infoSLbl = new KStatusBarLabel("", INFO_TEXT, sb); addStatusBarItem(m_infoSLbl, 10, false); // Add coords to the statusbar - QString unit = KoUnit::unitName(m_pDoc->unit()); + TQString unit = KoUnit::unitName(m_pDoc->unit()); KoPoint xy(0, 0); - QString text = i18n("%1 x coord, %2 y coord, %3 and %4 the unit", - "X: %1 %3 Y: %2 %4").arg(KGlobal::_locale->formatNumber(xy.x(), 2)) - .arg(KGlobal::_locale->formatNumber(xy.y(), 2)).arg(unit).arg(unit); + TQString text = i18n("%1 x coord, %2 y coord, %3 and %4 the unit", + "X: %1 %3 Y: %2 %4").tqarg(KGlobal::_locale->formatNumber(xy.x(), 2)) + .tqarg(KGlobal::_locale->formatNumber(xy.y(), 2)).tqarg(unit).tqarg(unit); m_coordSLbl = new KStatusBarLabel(text, MOUSEPOS_TEXT, sb); addStatusBarItem(m_coordSLbl, 0, true); } @@ -172,50 +172,50 @@ KivioView::KivioView( QWidget *_parent, const char *_name, KivioDoc* doc ) // Handle progress information from the doc m_statusBarProgress = 0; - connect(m_pDoc, SIGNAL(initProgress()), this, SLOT(initStatusBarProgress())); - connect(m_pDoc, SIGNAL(progress(int)), this, SLOT(setStatusBarProgress(int))); - connect(m_pDoc, SIGNAL(endProgress()), this, SLOT(removeStatusBarProgress())); + connect(m_pDoc, TQT_SIGNAL(initProgress()), TQT_TQOBJECT(this), TQT_SLOT(initStatusBarProgress())); + connect(m_pDoc, TQT_SIGNAL(progress(int)), TQT_TQOBJECT(this), TQT_SLOT(setStatusBarProgress(int))); + connect(m_pDoc, TQT_SIGNAL(endProgress()), TQT_TQOBJECT(this), TQT_SLOT(removeStatusBarProgress())); bool isModified = doc->isModified(); m_pStencilBarDockManager = new StencilBarDockManager(this); - // QGridLayout for the entire view - QGridLayout *viewGrid = new QGridLayout(this); + // TQGridLayout for the entire view + TQGridLayout *viewGrid = new TQGridLayout(this); // A widget to hold the entire right side (old view) - QWidget *pRightSide = new QWidget(this); + TQWidget *pRightSide = new TQWidget(this); viewGrid->addWidget(pRightSide, 0, 0); // Split tabbar and Horz. Scroll Bar - QSplitter* tabSplit = new QSplitter(pRightSide); + TQSplitter* tabSplit = new TQSplitter(pRightSide); // Tab Bar m_pTabBar = new KoTabBar(tabSplit); connect( m_pTabBar, - SIGNAL(tabChanged(const QString&)), - SLOT( changePage(const QString&))); - connect( m_pTabBar, SIGNAL( doubleClicked() ), SLOT( renamePage() ) ); - connect( m_pTabBar, SIGNAL( contextMenu( const QPoint& ) ), - SLOT( popupTabBarMenu( const QPoint& ) ) ); - connect(m_pTabBar, SIGNAL(tabMoved(unsigned, unsigned)), this, SLOT(moveTab(unsigned, unsigned))); - m_pTabBar->setReverseLayout( QApplication::reverseLayout() ); + TQT_SIGNAL(tabChanged(const TQString&)), + TQT_SLOT( changePage(const TQString&))); + connect( m_pTabBar, TQT_SIGNAL( doubleClicked() ), TQT_SLOT( renamePage() ) ); + connect( m_pTabBar, TQT_SIGNAL( contextMenu( const TQPoint& ) ), + TQT_SLOT( popupTabBarMenu( const TQPoint& ) ) ); + connect(m_pTabBar, TQT_SIGNAL(tabMoved(unsigned, unsigned)), TQT_TQOBJECT(this), TQT_SLOT(moveTab(unsigned, unsigned))); + m_pTabBar->setReverseLayout( TQApplication::reverseLayout() ); // Scroll Bar - m_vertScrollBar = new QScrollBar(QScrollBar::Vertical,pRightSide); - m_horzScrollBar = new QScrollBar(QScrollBar::Horizontal,tabSplit); + m_vertScrollBar = new TQScrollBar(Qt::Vertical,pRightSide); + m_horzScrollBar = new TQScrollBar(Qt::Horizontal,tabSplit); - QValueList<int> sizes; + TQValueList<int> sizes; sizes << tabSplit->width() / 2 << tabSplit->width() / 2; tabSplit->setSizes(sizes); - QHBoxLayout* tabLayout = new QHBoxLayout(); + TQHBoxLayout* tabLayout = new TQHBoxLayout(); tabLayout->addWidget(tabSplit); // The widget on which we display the page - QWidgetStack* canvasBase = new QWidgetStack(pRightSide); + TQWidgetStack* canvasBase = new TQWidgetStack(pRightSide); m_pCanvas = new KivioCanvas(canvasBase,this,doc,m_vertScrollBar,m_horzScrollBar); canvasBase->addWidget(m_pCanvas,0); canvasBase->raiseWidget(m_pCanvas); - m_pCanvas->setFocusPolicy(QWidget::StrongFocus); + m_pCanvas->setFocusPolicy(TQ_StrongFocus); // Rulers vRuler = new KoRuler(pRightSide, m_pCanvas, Qt::Vertical, Kivio::Config::defaultPageLayout(), @@ -226,39 +226,39 @@ KivioView::KivioView( QWidget *_parent, const char *_name, KivioDoc* doc ) KoRuler::F_HELPLINES, m_pDoc->unit()); hRuler->showMousePos(true); hRuler->setZoom(zoomHandler()->zoomedResolutionX()); - connect(m_vertScrollBar, SIGNAL(valueChanged(int)), SLOT(setRulerVOffset(int))); - connect(m_horzScrollBar, SIGNAL(valueChanged(int)), SLOT(setRulerHOffset(int))); - connect(vRuler, SIGNAL(unitChanged(KoUnit::Unit)), SLOT(rulerChangedUnit(KoUnit::Unit))); - connect(hRuler, SIGNAL(unitChanged(KoUnit::Unit)), SLOT(rulerChangedUnit(KoUnit::Unit))); - connect(vRuler, SIGNAL(doubleClicked()), SLOT(paperLayoutDlg())); - connect(hRuler, SIGNAL(doubleClicked()), SLOT(paperLayoutDlg())); - connect(m_pDoc, SIGNAL(unitChanged(KoUnit::Unit)), SLOT(setRulerUnit(KoUnit::Unit))); - connect(m_pCanvas, SIGNAL(visibleAreaChanged()), SLOT(updateRulers())); - - connect(vRuler, SIGNAL(addGuide(const QPoint&, bool, int)), - &(m_pCanvas->guideLines()), SLOT(addGuide(const QPoint&, bool, int))); - connect(vRuler, SIGNAL(moveGuide(const QPoint&, bool, int)), - &(m_pCanvas->guideLines()), SLOT(moveGuide(const QPoint&, bool, int))); - connect(hRuler, SIGNAL(addGuide(const QPoint&, bool, int)), - &(m_pCanvas->guideLines()), SLOT(addGuide(const QPoint&, bool, int))); - connect(hRuler, SIGNAL(moveGuide(const QPoint&, bool, int)), - &(m_pCanvas->guideLines()), SLOT(moveGuide(const QPoint&, bool, int))); - connect(&(m_pCanvas->guideLines()), SIGNAL(guideLinesChanged(KoView*)), m_pDoc, SLOT(updateGuideLines(KoView*))); - - QGridLayout* layout = new QGridLayout(pRightSide); - layout->addWidget(hRuler, 0, 1); - layout->addWidget(vRuler, 1, 0); - layout->addWidget(canvasBase, 1, 1); - layout->addMultiCellLayout(tabLayout, 2, 2, 0, 1); - layout->addMultiCellWidget(m_vertScrollBar, 0, 1, 2, 2); - layout->setRowStretch(1, 10); - layout->setColStretch(1, 10); - - QWidget::setFocusPolicy( QWidget::StrongFocus ); + connect(m_vertScrollBar, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(setRulerVOffset(int))); + connect(m_horzScrollBar, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(setRulerHOffset(int))); + connect(vRuler, TQT_SIGNAL(unitChanged(KoUnit::Unit)), TQT_SLOT(rulerChangedUnit(KoUnit::Unit))); + connect(hRuler, TQT_SIGNAL(unitChanged(KoUnit::Unit)), TQT_SLOT(rulerChangedUnit(KoUnit::Unit))); + connect(vRuler, TQT_SIGNAL(doubleClicked()), TQT_SLOT(paperLayoutDlg())); + connect(hRuler, TQT_SIGNAL(doubleClicked()), TQT_SLOT(paperLayoutDlg())); + connect(m_pDoc, TQT_SIGNAL(unitChanged(KoUnit::Unit)), TQT_SLOT(setRulerUnit(KoUnit::Unit))); + connect(m_pCanvas, TQT_SIGNAL(visibleAreaChanged()), TQT_SLOT(updateRulers())); + + connect(vRuler, TQT_SIGNAL(addGuide(const TQPoint&, bool, int)), + &(m_pCanvas->guideLines()), TQT_SLOT(addGuide(const TQPoint&, bool, int))); + connect(vRuler, TQT_SIGNAL(moveGuide(const TQPoint&, bool, int)), + &(m_pCanvas->guideLines()), TQT_SLOT(moveGuide(const TQPoint&, bool, int))); + connect(hRuler, TQT_SIGNAL(addGuide(const TQPoint&, bool, int)), + &(m_pCanvas->guideLines()), TQT_SLOT(addGuide(const TQPoint&, bool, int))); + connect(hRuler, TQT_SIGNAL(moveGuide(const TQPoint&, bool, int)), + &(m_pCanvas->guideLines()), TQT_SLOT(moveGuide(const TQPoint&, bool, int))); + connect(&(m_pCanvas->guideLines()), TQT_SIGNAL(guideLinesChanged(KoView*)), m_pDoc, TQT_SLOT(updateGuideLines(KoView*))); + + TQGridLayout* tqlayout = new TQGridLayout(pRightSide); + tqlayout->addWidget(hRuler, 0, 1); + tqlayout->addWidget(vRuler, 1, 0); + tqlayout->addWidget(canvasBase, 1, 1); + tqlayout->addMultiCellLayout(tabLayout, 2, 2, 0, 1); + tqlayout->addMultiCellWidget(m_vertScrollBar, 0, 1, 2, 2); + tqlayout->setRowStretch(1, 10); + tqlayout->setColStretch(1, 10); + + TQWidget::setFocusPolicy( TQ_StrongFocus ); setFocusProxy( m_pCanvas ); - connect( this, SIGNAL( invalidated() ), m_pCanvas, SLOT( update() ) ); - connect( this, SIGNAL( regionInvalidated( const QRegion&, bool ) ), m_pCanvas, SLOT( repaint( const QRegion&, bool ) ) ); + connect( TQT_TQOBJECT(this), TQT_SIGNAL( tqinvalidated() ), m_pCanvas, TQT_SLOT( update() ) ); + connect( TQT_TQOBJECT(this), TQT_SIGNAL( regionInvalidated( const TQRegion&, bool ) ), m_pCanvas, TQT_SLOT( tqrepaint( const TQRegion&, bool ) ) ); setInstance(KivioFactory::global()); if ( !m_pDoc->isReadWrite() ) @@ -274,7 +274,7 @@ KivioView::KivioView( QWidget *_parent, const char *_name, KivioDoc* doc ) createGeometryDock(); createProtectionDock(); paletteManager()->showWidget("birdseyepanel"); - paletteManager()->showWidget("stencilgeometrypanel"); + paletteManager()->showWidget("stenciltqgeometrypanel"); setupActions(); @@ -286,15 +286,15 @@ KivioView::KivioView( QWidget *_parent, const char *_name, KivioDoc* doc ) setActivePage(m_pDoc->map()->firstPage()); - connect( m_pDoc, SIGNAL( sig_selectionChanged() ), SLOT( updateToolBars() ) ); - connect( m_pDoc, SIGNAL( sig_addPage(KivioPage*) ), SLOT( addPage(KivioPage*) ) ); - connect( m_pDoc, SIGNAL( sig_addSpawnerSet(KivioStencilSpawnerSet*) ), SLOT(addSpawnerToStackBar(KivioStencilSpawnerSet*)) ); - connect( m_pDoc, SIGNAL( sig_updateView(KivioPage*) ), SLOT(slotUpdateView(KivioPage*)) ); - connect( m_pDoc, SIGNAL( sig_pageNameChanged(KivioPage*,const QString&)), SLOT(slotPageRenamed(KivioPage*,const QString&)) ); + connect( m_pDoc, TQT_SIGNAL( sig_selectionChanged() ), TQT_SLOT( updateToolBars() ) ); + connect( m_pDoc, TQT_SIGNAL( sig_addPage(KivioPage*) ), TQT_SLOT( addPage(KivioPage*) ) ); + connect( m_pDoc, TQT_SIGNAL( sig_addSpawnerSet(KivioStencilSpawnerSet*) ), TQT_SLOT(addSpawnerToStackBar(KivioStencilSpawnerSet*)) ); + connect( m_pDoc, TQT_SIGNAL( sig_updateView(KivioPage*) ), TQT_SLOT(slotUpdateView(KivioPage*)) ); + connect( m_pDoc, TQT_SIGNAL( sig_pageNameChanged(KivioPage*,const TQString&)), TQT_SLOT(slotPageRenamed(KivioPage*,const TQString&)) ); - connect( m_pDoc, SIGNAL( sig_updateGrid()),SLOT(slotUpdateGrid())); + connect( m_pDoc, TQT_SIGNAL( sig_updateGrid()),TQT_SLOT(slotUpdateGrid())); - connect(m_pDoc, SIGNAL(loadingFinished()), this, SLOT(loadingFinished())); + connect(m_pDoc, TQT_SIGNAL(loadingFinished()), TQT_TQOBJECT(this), TQT_SLOT(loadingFinished())); initActions(); @@ -339,13 +339,13 @@ void KivioView::createGeometryDock() m_pStencilGeometryPanel = new KivioStencilGeometryPanel(this); m_pStencilGeometryPanel->setCaption(i18n("Geometry")); m_pStencilGeometryPanel->setUnit(m_pDoc->unit()); - paletteManager()->addWidget(m_pStencilGeometryPanel, "stencilgeometrypanel", "geometrydocker"); + paletteManager()->addWidget(m_pStencilGeometryPanel, "stenciltqgeometrypanel", "tqgeometrydocker"); - connect( m_pStencilGeometryPanel, SIGNAL(positionChanged(double, double)), this, SLOT(slotChangeStencilPosition(double, double)) ); - connect( m_pStencilGeometryPanel, SIGNAL(sizeChanged(double, double)), this, SLOT(slotChangeStencilSize(double, double)) ); -// connect(m_pStencilGeometryPanel, SIGNAL(rotationChanged(int)), SLOT(slotChangeStencilRotation(int))); + connect( m_pStencilGeometryPanel, TQT_SIGNAL(positionChanged(double, double)), TQT_TQOBJECT(this), TQT_SLOT(slotChangeStencilPosition(double, double)) ); + connect( m_pStencilGeometryPanel, TQT_SIGNAL(sizeChanged(double, double)), TQT_TQOBJECT(this), TQT_SLOT(slotChangeStencilSize(double, double)) ); +// connect(m_pStencilGeometryPanel, TQT_SIGNAL(rotationChanged(int)), TQT_SLOT(slotChangeStencilRotation(int))); - connect( m_pDoc, SIGNAL(unitChanged(KoUnit::Unit)), m_pStencilGeometryPanel, SLOT(setUnit(KoUnit::Unit)) ); + connect( m_pDoc, TQT_SIGNAL(unitChanged(KoUnit::Unit)), m_pStencilGeometryPanel, TQT_SLOT(setUnit(KoUnit::Unit)) ); } void KivioView::createBirdEyeDock() @@ -366,7 +366,7 @@ void KivioView::createProtectionDock() { m_pProtectionPanel = new KivioProtectionPanel(this,this); m_pProtectionPanel->setCaption(i18n("Protection")); - paletteManager()->addWidget(m_pProtectionPanel, "protectionpanel", "geometrydocker"); + paletteManager()->addWidget(m_pProtectionPanel, "protectionpanel", "tqgeometrydocker"); } void KivioView::createObjectListPalette() @@ -380,149 +380,149 @@ void KivioView::setupActions() { KivioStencilSetAction* addStSet = new KivioStencilSetAction( i18n("Add Stencil Set"), "open_stencilset", actionCollection(), "addStencilSet" ); - connect(addStSet,SIGNAL(activated(const QString&)),SLOT(addStencilSet(const QString&))); - connect(this, SIGNAL(updateStencilSetList()), addStSet, SLOT(updateMenu())); - connect(addStSet, SIGNAL(showDialog()), this, SLOT(showAddStencilSetDialog())); + connect(addStSet,TQT_SIGNAL(activated(const TQString&)),TQT_SLOT(addStencilSet(const TQString&))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(updateStencilSetList()), addStSet, TQT_SLOT(updateMenu())); + connect(addStSet, TQT_SIGNAL(showDialog()), TQT_TQOBJECT(this), TQT_SLOT(showAddStencilSetDialog())); - m_alignAndDistribute = new KAction( i18n("Align && Distribute..."), CTRL+ALT+Key_A, this, - SLOT(alignStencilsDlg()), actionCollection(), "alignStencils" ); + m_alignAndDistribute = new KAction( i18n("Align && Distribute..."), CTRL+ALT+Key_A, TQT_TQOBJECT(this), + TQT_SLOT(alignStencilsDlg()), actionCollection(), "alignStencils" ); - m_editCut = KStdAction::cut( this, SLOT(cutStencil()), actionCollection(), "cutStencil" ); - m_editCopy = KStdAction::copy( this, SLOT(copyStencil()), actionCollection(), "copyStencil" ); - m_editPaste = KStdAction::paste( this, SLOT(pasteStencil()), actionCollection(), "pasteStencil" ); - connect(QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(clipboardDataChanged())); + m_editCut = KStdAction::cut( TQT_TQOBJECT(this), TQT_SLOT(cutStencil()), actionCollection(), "cutStencil" ); + m_editCopy = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT(copyStencil()), actionCollection(), "copyStencil" ); + m_editPaste = KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT(pasteStencil()), actionCollection(), "pasteStencil" ); + connect(TQApplication::tqclipboard(), TQT_SIGNAL(dataChanged()), TQT_TQOBJECT(this), TQT_SLOT(clipboardDataChanged())); - m_selectAll = KStdAction::selectAll(this, SLOT(selectAllStencils()), actionCollection(), "selectAllStencils"); - m_selectNone = KStdAction::deselect(this, SLOT(unselectAllStencils()), actionCollection(), "unselectAllStencils"); + m_selectAll = KStdAction::selectAll(TQT_TQOBJECT(this), TQT_SLOT(selectAllStencils()), actionCollection(), "selectAllStencils"); + m_selectNone = KStdAction::deselect(TQT_TQOBJECT(this), TQT_SLOT(unselectAllStencils()), actionCollection(), "unselectAllStencils"); - m_groupAction = new KAction( i18n("Group Selection"), "group", CTRL+Key_G, this, SLOT(groupStencils()), actionCollection(), "groupStencils" ); + m_groupAction = new KAction( i18n("Group Selection"), "group", CTRL+Key_G, TQT_TQOBJECT(this), TQT_SLOT(groupStencils()), actionCollection(), "groupStencils" ); m_groupAction->setWhatsThis(i18n("Group selected objects into a single stencil")); - m_ungroupAction = new KAction( i18n("Ungroup"), "ungroup", CTRL+SHIFT+Key_G, this, SLOT(ungroupStencils()), actionCollection(), "ungroupStencils" ); + m_ungroupAction = new KAction( i18n("Ungroup"), "ungroup", CTRL+SHIFT+Key_G, TQT_TQOBJECT(this), TQT_SLOT(ungroupStencils()), actionCollection(), "ungroupStencils" ); m_ungroupAction->setWhatsThis(i18n("Break up a selected group stencil")); - m_stencilToFront = new KAction( i18n("Bring to Front"), "bring_forward", 0, this, SLOT(bringStencilToFront()), actionCollection(), "bringStencilToFront" ); - m_stencilToBack = new KAction( i18n("Send to Back"), "send_backward", 0, this, SLOT(sendStencilToBack()), actionCollection(), "sendStencilToBack" ); + m_stencilToFront = new KAction( i18n("Bring to Front"), "bring_forward", 0, TQT_TQOBJECT(this), TQT_SLOT(bringStencilToFront()), actionCollection(), "bringStencilToFront" ); + m_stencilToBack = new KAction( i18n("Send to Back"), "send_backward", 0, TQT_TQOBJECT(this), TQT_SLOT(sendStencilToBack()), actionCollection(), "sendStencilToBack" ); - m_menuTextFormatAction = new KAction(i18n("&Text..."), 0, 0, this, SLOT(textFormat()), + m_menuTextFormatAction = new KAction(i18n("&Text..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(textFormat()), actionCollection(), "textFormat"); - m_menuStencilConnectorsAction = new KAction(i18n("&Stencils && Connectors..."), 0, 0, this, SLOT(stencilFormat()), + m_menuStencilConnectorsAction = new KAction(i18n("&Stencils && Connectors..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(stencilFormat()), actionCollection(), "stencilFormat"); - m_arrowHeadsMenuAction = new KAction(i18n("&Arrowheads..."), 0, 0, this, SLOT(arrowHeadFormat()), + m_arrowHeadsMenuAction = new KAction(i18n("&Arrowheads..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(arrowHeadFormat()), actionCollection(), "arrowHeadFormat"); m_arrowHeadsMenuAction->setWhatsThis(i18n("Arrowheads allow you to add an arrow to the beginning and/or end of a line.")); /* Create the fg color button */ m_setFGColor = new TKSelectColorAction( i18n("Line Color"), TKSelectColorAction::LineColor, actionCollection(), "setFGColor" ); m_setFGColor->setWhatsThis(i18n("The line color allows you to choose a color for the lines of the stencils.")); - connect(m_setFGColor,SIGNAL(activated()),SLOT(setFGColor())); + connect(m_setFGColor,TQT_SIGNAL(activated()),TQT_SLOT(setFGColor())); m_setBGColor = new TKSelectColorAction( i18n("Fill Color"), TKSelectColorAction::FillColor, actionCollection(), "setBGColor" ); m_setBGColor->setWhatsThis(i18n("You can choose a color for the background of a stencil by using this button.")); - connect(m_setBGColor,SIGNAL(activated()),SLOT(setBGColor())); + connect(m_setBGColor,TQT_SIGNAL(activated()),TQT_SLOT(setBGColor())); // Text bar m_setFontFamily = new KFontAction( i18n( "Font Family" ), 0, actionCollection(), "setFontFamily" ); - connect( m_setFontFamily, SIGNAL(activated(const QString&)), SLOT(setFontFamily(const QString&)) ); + connect( m_setFontFamily, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(setFontFamily(const TQString&)) ); m_setFontSize = new KFontSizeAction( i18n( "Font Size" ), 0, actionCollection(), "setFontSize" ); - connect( m_setFontSize, SIGNAL( fontSizeChanged( int ) ), - this, SLOT( setFontSize(int ) ) ); + connect( m_setFontSize, TQT_SIGNAL( fontSizeChanged( int ) ), + TQT_TQOBJECT(this), TQT_SLOT( setFontSize(int ) ) ); m_setTextColor = new TKSelectColorAction( i18n("Text Color"), TKSelectColorAction::TextColor, actionCollection(), "setTextColor" ); - connect( m_setTextColor, SIGNAL(activated()), SLOT(setTextColor()) ); + connect( m_setTextColor, TQT_SIGNAL(activated()), TQT_SLOT(setTextColor()) ); m_setBold = new KToggleAction( i18n("Toggle Bold Text"), "text_bold", 0, actionCollection(), "setFontBold" ); - connect( m_setBold, SIGNAL(toggled(bool)), SLOT(toggleFontBold(bool)) ); + connect( m_setBold, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggleFontBold(bool)) ); m_setItalics = new KToggleAction( i18n("Toggle Italics Text"), "text_italic", 0, actionCollection(), "setFontItalics" ); - connect( m_setItalics, SIGNAL(toggled(bool)), SLOT(toggleFontItalics(bool)) ); + connect( m_setItalics, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggleFontItalics(bool)) ); m_setUnderline = new KToggleAction( i18n("Toggle Underline Text"), "text_under", 0, actionCollection(), "setFontUnderline" ); - connect( m_setUnderline, SIGNAL(toggled(bool)), SLOT(toggleFontUnderline(bool))); + connect( m_setUnderline, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggleFontUnderline(bool))); m_textAlignLeft = new KToggleAction( i18n( "Align &Left" ), "text_left", CTRL + Key_L, - this, SLOT( textAlignLeft() ), + TQT_TQOBJECT(this), TQT_SLOT( textAlignLeft() ), actionCollection(), "textAlignLeft" ); m_textAlignLeft->setExclusiveGroup( "align" ); m_textAlignCenter = new KToggleAction( i18n( "Align &Center" ), "text_center", CTRL + ALT + Key_C, - this, SLOT( textAlignCenter() ), + TQT_TQOBJECT(this), TQT_SLOT( textAlignCenter() ), actionCollection(), "textAlignCenter" ); m_textAlignCenter->setExclusiveGroup( "align" ); m_textAlignCenter->setChecked( TRUE ); m_textAlignRight = new KToggleAction( i18n( "Align &Right" ), "text_right", CTRL + ALT + Key_R, - this, SLOT( textAlignRight() ), + TQT_TQOBJECT(this), TQT_SLOT( textAlignRight() ), actionCollection(), "textAlignRight" ); m_textAlignRight->setExclusiveGroup( "align" ); m_textVAlignSuper = new KToggleAction( i18n( "Superscript" ), "super", 0, - this, SLOT( textSuperScript() ), + TQT_TQOBJECT(this), TQT_SLOT( textSuperScript() ), actionCollection(), "textVAlignSuper" ); m_textVAlignSuper->setExclusiveGroup( "valign" ); m_textVAlignSub = new KToggleAction( i18n( "Subscript" ), "sub", 0, - this, SLOT( textSubScript() ), + TQT_TQOBJECT(this), TQT_SLOT( textSubScript() ), actionCollection(), "textVAlignSub" ); m_textVAlignSub->setExclusiveGroup( "valign" ); - m_lineWidthAction = new KoLineWidthAction(i18n("Line Width"), "linewidth", this, SLOT(setLineWidth(double)), + m_lineWidthAction = new KoLineWidthAction(i18n("Line Width"), "linewidth", TQT_TQOBJECT(this), TQT_SLOT(setLineWidth(double)), actionCollection(), "setLineWidth"); m_lineWidthAction->setUnit(m_pDoc->unit()); - connect(m_pDoc, SIGNAL(unitChanged(KoUnit::Unit)), m_lineWidthAction, SLOT(setUnit(KoUnit::Unit))); + connect(m_pDoc, TQT_SIGNAL(unitChanged(KoUnit::Unit)), m_lineWidthAction, TQT_SLOT(setUnit(KoUnit::Unit))); - m_lineStyleAction = new KoLineStyleAction(i18n("Line Style"), "linestyle", this, SLOT(setLineStyle(int)), + m_lineStyleAction = new KoLineStyleAction(i18n("Line Style"), "linestyle", TQT_TQOBJECT(this), TQT_SLOT(setLineStyle(int)), actionCollection(), "setLineStyle"); - m_paperLayout = new KAction( i18n("Page Layout..."), 0, this, SLOT(paperLayoutDlg()), actionCollection(), "paperLayout" ); - m_insertPage = new KAction( i18n("Insert Page"),"item_add", 0, this, SLOT(insertPage()), actionCollection(), "insertPage" ); - m_removePage = new KAction( i18n("Remove Page"), "item_remove",0,this, SLOT(removePage()), actionCollection(), "removePage" ); + m_paperLayout = new KAction( i18n("Page Layout..."), 0, TQT_TQOBJECT(this), TQT_SLOT(paperLayoutDlg()), actionCollection(), "paperLayout" ); + m_insertPage = new KAction( i18n("Insert Page"),"item_add", 0, TQT_TQOBJECT(this), TQT_SLOT(insertPage()), actionCollection(), "insertPage" ); + m_removePage = new KAction( i18n("Remove Page"), "item_remove",0,TQT_TQOBJECT(this), TQT_SLOT(removePage()), actionCollection(), "removePage" ); - m_renamePage = new KAction( i18n("Rename Page..."), "item_rename",0,this, SLOT(renamePage()), actionCollection(), "renamePage" ); + m_renamePage = new KAction( i18n("Rename Page..."), "item_rename",0,TQT_TQOBJECT(this), TQT_SLOT(renamePage()), actionCollection(), "renamePage" ); - m_showPage = new KAction( i18n("Show Page..."),0 ,this,SLOT(showPage()), actionCollection(), "showPage" ); - m_hidePage = new KAction( i18n("Hide Page"),0 ,this,SLOT(hidePage()), actionCollection(), "hidePage" ); + m_showPage = new KAction( i18n("Show Page..."),0 ,TQT_TQOBJECT(this),TQT_SLOT(showPage()), actionCollection(), "showPage" ); + m_hidePage = new KAction( i18n("Hide Page"),0 ,TQT_TQOBJECT(this),TQT_SLOT(hidePage()), actionCollection(), "hidePage" ); showPageMargins = new KToggleAction( i18n("Show Page Margins"), "view_margins", 0, actionCollection(), "showPageMargins" ); - connect( showPageMargins, SIGNAL(toggled(bool)), SLOT(togglePageMargins(bool))); + connect( showPageMargins, TQT_SIGNAL(toggled(bool)), TQT_SLOT(togglePageMargins(bool))); #if KDE_IS_VERSION(3,2,90) showPageMargins->setCheckedState(i18n("Hide Page Margins")); #endif showRulers = new KToggleAction( i18n("Show Rulers"), "view_ruler", 0, actionCollection(), "showRulers" ); - connect( showRulers, SIGNAL(toggled(bool)), SLOT(toggleShowRulers(bool))); + connect( showRulers, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggleShowRulers(bool))); #if KDE_IS_VERSION(3,2,90) showRulers->setCheckedState(i18n("Hide Rulers")); #endif // Grid actions showGrid = new KToggleAction( i18n("Show Grid"), "view_grid", 0, actionCollection(), "showGrid" ); - connect( showGrid, SIGNAL(toggled(bool)), SLOT(toggleShowGrid(bool))); + connect( showGrid, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggleShowGrid(bool))); #if KDE_IS_VERSION(3,2,90) showGrid->setCheckedState(i18n("Hide Grid")); #endif KToggleAction* snapGrid = new KToggleAction( i18n("Snap Grid"), "view_grid", 0, actionCollection(), "snapGrid" ); - connect( snapGrid, SIGNAL(toggled(bool)), SLOT(toggleSnapGrid(bool))); + connect( snapGrid, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggleSnapGrid(bool))); // Guides actions showGuides = new KToggleAction( i18n("Guide Lines"), 0, actionCollection(), "showGuides" ); - connect( showGuides, SIGNAL(toggled(bool)), SLOT(toggleShowGuides(bool))); - KAction* addGuide = new KAction(i18n("Add Guide Line..."), 0, this, SLOT(addGuideLine()), + connect( showGuides, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggleShowGuides(bool))); + KAction* addGuide = new KAction(i18n("Add Guide Line..."), 0, TQT_TQOBJECT(this), TQT_SLOT(addGuideLine()), actionCollection(), "addGuideLine"); - connect(showGuides, SIGNAL(toggled(bool)), addGuide, SLOT(setEnabled(bool))); + connect(showGuides, TQT_SIGNAL(toggled(bool)), addGuide, TQT_SLOT(setEnabled(bool))); //-- m_setArrowHeads = new KivioArrowHeadAction(i18n("Arrowheads"), "arrowheads", actionCollection(), "arrowHeads"); m_setArrowHeads->setWhatsThis(i18n("Arrowheads allow you to add an arrow to the beginning and/or end of a line.")); - connect( m_setArrowHeads, SIGNAL(endChanged(int)), SLOT(slotSetEndArrow(int))); - connect( m_setArrowHeads, SIGNAL(startChanged(int)), SLOT(slotSetStartArrow(int))); + connect( m_setArrowHeads, TQT_SIGNAL(endChanged(int)), TQT_SLOT(slotSetEndArrow(int))); + connect( m_setArrowHeads, TQT_SIGNAL(startChanged(int)), TQT_SLOT(slotSetStartArrow(int))); - KStdAction::preferences(this, SLOT(optionsDialog()), actionCollection(), "options"); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(optionsDialog()), actionCollection(), "options"); - (void) new KAction(i18n("Install Stencil Set..."), 0, this, - SLOT(installStencilSet()), actionCollection(), "installStencilSet"); + (void) new KAction(i18n("Install Stencil Set..."), 0, TQT_TQOBJECT(this), + TQT_SLOT(installStencilSet()), actionCollection(), "installStencilSet"); m_editDelete = new KAction(i18n("Delete"), "editdelete", Key_Delete, - this, SLOT(deleteObject()), actionCollection(), "deleteObject"); + TQT_TQOBJECT(this), TQT_SLOT(deleteObject()), actionCollection(), "deleteObject"); } void KivioView::initActions() @@ -538,9 +538,9 @@ void KivioView::initActions() m_setItalics->setChecked( false ); m_setUnderline->setChecked( false ); m_lineWidthAction->setCurrentWidth(1.0); - m_lineStyleAction->setCurrentSelection(Qt::SolidLine); - showAlign(Qt::AlignHCenter); - showVAlign(Qt::AlignVCenter); + m_lineStyleAction->setCurrentSelection(TQt::SolidLine); + showAlign(TQt::AlignHCenter); + showVAlign(TQt::AlignVCenter); m_pStencilGeometryPanel->setSize(0.0,0.0); m_pStencilGeometryPanel->setPosition(0.0,0.0); @@ -552,18 +552,18 @@ void KivioView::initActions() m_menuTextFormatAction->setEnabled( false ); m_menuStencilConnectorsAction->setEnabled( false ); - m_setFGColor->setCurrentColor(QColor(0, 0, 0)); - m_setBGColor->setCurrentColor(QColor(255, 255, 255)); - m_setTextColor->setCurrentColor(QColor(0, 0, 0)); + m_setFGColor->setCurrentColor(TQColor(0, 0, 0)); + m_setBGColor->setCurrentColor(TQColor(255, 255, 255)); + m_setTextColor->setCurrentColor(TQColor(0, 0, 0)); viewZoom(zoomHandler()->zoom()); } void KivioView::updateReadWrite( bool readwrite ) { - QValueList<KAction*> actions = actionCollection()->actions(); - QValueList<KAction*>::ConstIterator aIt = actions.begin(); - QValueList<KAction*>::ConstIterator aEnd = actions.end(); + TQValueList<KAction*> actions = actionCollection()->actions(); + TQValueList<KAction*>::ConstIterator aIt = actions.begin(); + TQValueList<KAction*>::ConstIterator aEnd = actions.end(); for (; aIt != aEnd; ++aIt ) (*aIt)->setEnabled( readwrite ); if ( !readwrite ) @@ -586,10 +586,10 @@ void KivioView::addPage( KivioPage* page ) { insertPage( page ); - QObject::connect( page, SIGNAL( sig_PageHidden( KivioPage* ) ), - this, SLOT( slotPageHidden( KivioPage* ) ) ); - QObject::connect( page, SIGNAL( sig_PageShown( KivioPage* ) ), - this, SLOT( slotPageShown( KivioPage* ) ) ); + TQObject::connect( page, TQT_SIGNAL( sig_PageHidden( KivioPage* ) ), + TQT_TQOBJECT(this), TQT_SLOT( slotPageHidden( KivioPage* ) ) ); + TQObject::connect( page, TQT_SIGNAL( sig_PageShown( KivioPage* ) ), + TQT_TQOBJECT(this), TQT_SLOT( slotPageShown( KivioPage* ) ) ); updatePageStatusLabel(); } @@ -605,9 +605,9 @@ void KivioView::insertPage( KivioPage* page ) void KivioView::removePage( KivioPage *_t ) { - QString m_pageName=_t->pageName(); + TQString m_pageName=_t->pageName(); m_pTabBar->removeTab( _t->pageName() ); - QString n = m_pDoc->map()->visiblePages().first(); + TQString n = m_pDoc->map()->visiblePages().first(); setActivePage( m_pDoc->map()->findPage( n ) ); updatePageStatusLabel(); @@ -616,8 +616,8 @@ void KivioView::removePage( KivioPage *_t ) void KivioView::renamePage() { bool ok; - QString activeName = m_pActivePage->pageName(); - QString newName = KInputDialog::getText( i18n("Rename Page"), + TQString activeName = m_pActivePage->pageName(); + TQString newName = KInputDialog::getText( i18n("Rename Page"), i18n("Enter page name:"), activeName, &ok, this ); // Have a different name ? @@ -654,8 +654,8 @@ void KivioView::setActivePage( KivioPage* page ) return; if(m_pActivePage) { - disconnect(m_pActivePage, SIGNAL(sig_pageLayoutChanged(const KoPageLayout&)), this, - SLOT(setRulerPageLayout(const KoPageLayout&))); + disconnect(m_pActivePage, TQT_SIGNAL(sig_pageLayoutChanged(const KoPageLayout&)), this, + TQT_SLOT(setRulerPageLayout(const KoPageLayout&))); } m_pActivePage = page; @@ -667,8 +667,8 @@ void KivioView::setActivePage( KivioPage* page ) m_pDoc->updateView(m_pActivePage); setRulerPageLayout(m_pActivePage->paperLayout()); - connect(m_pActivePage, SIGNAL(sig_pageLayoutChanged(const KoPageLayout&)), - SLOT(setRulerPageLayout(const KoPageLayout&))); + connect(m_pActivePage, TQT_SIGNAL(sig_pageLayoutChanged(const KoPageLayout&)), + TQT_SLOT(setRulerPageLayout(const KoPageLayout&))); m_pCanvas->guideLines().setGuideLines(m_pActivePage->horizontalGuideLines(), m_pActivePage->verticalGuideLines()); @@ -683,12 +683,12 @@ void KivioView::setActiveSpawnerSet( KivioStencilSpawnerSet *set ) m_pActiveSpawnerSet = set; } -void KivioView::slotPageRenamed( KivioPage* page, const QString& old_name ) +void KivioView::slotPageRenamed( KivioPage* page, const TQString& old_name ) { m_pTabBar->renameTab( old_name, page->pageName() ); } -void KivioView::changePage( const QString& name ) +void KivioView::changePage( const TQString& name ) { if ( m_pActivePage->pageName() == name ) return; @@ -723,7 +723,7 @@ void KivioView::hidePage() } m_pActivePage->setHidden(true); - QString activeName = m_pActivePage->pageName(); + TQString activeName = m_pActivePage->pageName(); m_pTabBar->removeTab( activeName ); @@ -800,11 +800,11 @@ void KivioView::paperLayoutDlg() void KivioView::removePage() { if ( doc()->map()->count() <= 1 || doc()->map()->visiblePages().count()<=1 ) { - QApplication::beep(); + TQApplication::beep(); KMessageBox::sorry( this, i18n("You cannot delete the only page of the document."), i18n("Remove Page") ); return; } - QApplication::beep(); + TQApplication::beep(); int ret = KMessageBox::warningContinueCancel(this,i18n("You are going to remove the active page.\nDo you want to continue?"),i18n("Remove Page"),KGuiItem(i18n("&Delete"),"editdelete")); if ( ret == KMessageBox::Continue ) { @@ -830,7 +830,7 @@ void KivioView::slotUpdateView( KivioPage* page ) m_objectListPalette->updateObjectList(); } -QWidget *KivioView::canvas() const +TQWidget *KivioView::canvas() const { return canvasWidget(); } @@ -933,7 +933,7 @@ void KivioView::toggleSnapGrid(bool b) m_pDoc->setModified( true ); } -void KivioView::addStencilSet( const QString& name ) +void KivioView::addStencilSet( const TQString& name ) { m_pDoc->addSpawnerSet(name); } @@ -950,10 +950,10 @@ void KivioView::addSpawnerToStackBar( KivioStencilSpawnerSet *pSpawner ) } KivioIconView *pView = new KivioIconView(m_pDoc->isReadWrite()); - QObject::connect(pView, SIGNAL(createNewStencil(KivioStencilSpawner*)), this, - SLOT(addStencilFromSpawner(KivioStencilSpawner*))); - connect(pView, SIGNAL(stencilSelected(KivioStencilSpawner*)), - m_addStencilTool, SLOT(activateNewStencil(KivioStencilSpawner* ))); + TQObject::connect(pView, TQT_SIGNAL(createNewStencil(KivioStencilSpawner*)), this, + TQT_SLOT(addStencilFromSpawner(KivioStencilSpawner*))); + connect(pView, TQT_SIGNAL(stencilSelected(KivioStencilSpawner*)), + m_addStencilTool, TQT_SLOT(activateNewStencil(KivioStencilSpawner* ))); pView->setStencilSpawnerSet(pSpawner); m_pStencilBarDockManager->insertStencilSet(pView, pSpawner->name()); @@ -968,7 +968,7 @@ void KivioView::setFGColor() bool createMacro = false; while( pStencil ) { - QColor col( m_setFGColor->color()); + TQColor col( m_setFGColor->color()); if ( col != pStencil->fgColor() ) { @@ -1000,7 +1000,7 @@ void KivioView::setBGColor() while( pStencil ) { - QColor col( m_setBGColor->color()); + TQColor col( m_setBGColor->color()); if ( col != pStencil->bgColor() ) { @@ -1033,7 +1033,7 @@ void KivioView::setTextColor() bool createMacro = false; while( pStencil ) { - QColor col(m_setTextColor->color()); + TQColor col(m_setTextColor->color()); if ( col != pStencil->textColor() ) { @@ -1134,21 +1134,21 @@ void KivioView::ungroupStencils() void KivioView::selectAllStencils() { m_pActivePage->selectAllStencils(); - m_pCanvas->repaint(); + m_pCanvas->tqrepaint(); } void KivioView::unselectAllStencils() { m_pActivePage->unselectAllStencils(); - m_pCanvas->repaint(); + m_pCanvas->tqrepaint(); } -QColor KivioView::fgColor() const +TQColor KivioView::fgColor() const { return m_setFGColor->color(); } -QColor KivioView::bgColor() const +TQColor KivioView::bgColor() const { return m_setBGColor->color(); } @@ -1164,14 +1164,14 @@ int KivioView::lineStyle() const } -void KivioView::setFontFamily( const QString &str ) +void KivioView::setFontFamily( const TQString &str ) { canvasWidget()->setFocus(); KivioStencil *pStencil = m_pActivePage->selectedStencils()->first(); if (!pStencil) return; - QFont f; + TQFont f; KMacroCommand * macro = 0L; while( pStencil ) { @@ -1202,7 +1202,7 @@ void KivioView::setFontSize(int size ) if (!pStencil) return; - QFont f; + TQFont f; KMacroCommand * macro = 0L; while( pStencil ) { @@ -1232,7 +1232,7 @@ void KivioView::toggleFontBold(bool b) if (!pStencil) return; - QFont f; + TQFont f; KMacroCommand * macro = 0L; while( pStencil ) { @@ -1261,7 +1261,7 @@ void KivioView::toggleFontItalics(bool b) if (!pStencil) return; - QFont f; + TQFont f; KMacroCommand * macro = new KMacroCommand( i18n("Change Stencil Font")); while( pStencil ) { @@ -1291,7 +1291,7 @@ void KivioView::toggleFontUnderline( bool b) if (!pStencil) return; KMacroCommand * macro = 0L; - QFont f; + TQFont f; while( pStencil ) { f = pStencil->textFont(); @@ -1331,9 +1331,9 @@ void KivioView::updateToolBars() m_setItalics->setChecked( false ); m_setUnderline->setChecked( false ); m_lineWidthAction->setCurrentWidth(1.0); - m_lineStyleAction->setCurrentSelection(Qt::SolidLine); - showAlign(Qt::AlignHCenter); - showVAlign(Qt::AlignVCenter); + m_lineStyleAction->setCurrentSelection(TQt::SolidLine); + showAlign(TQt::AlignHCenter); + showVAlign(TQt::AlignVCenter); m_pStencilGeometryPanel->setSize(0.0,0.0); m_pStencilGeometryPanel->setPosition(0.0,0.0); @@ -1347,7 +1347,7 @@ void KivioView::updateToolBars() } else { - QFont f = pStencil->textFont(); + TQFont f = pStencil->textFont(); m_setFontFamily->setFont( f.family() ); m_setFontSize->setFontSize( f.pointSize() ); @@ -1568,13 +1568,13 @@ void KivioView::setHParaAlign( int i ) KivioStencil *pStencil = m_pActivePage->selectedStencils()->first(); if (!pStencil) return; - KMacroCommand *macro = new KMacroCommand( i18n("Change Stencil Horizontal Alignment")); + KMacroCommand *macro = new KMacroCommand( i18n("Change StencilQt::Horizontal Alignment")); bool createMacro = false; while( pStencil ) { if ( pStencil->hTextAlign() != i) { - KivioChangeStencilHAlignmentCommand * cmd = new KivioChangeStencilHAlignmentCommand( i18n("Change Stencil Horizontal Alignment"), m_pActivePage, pStencil, pStencil->hTextAlign(), i); + KivioChangeStencilHAlignmentCommand * cmd = new KivioChangeStencilHAlignmentCommand( i18n("Change StencilQt::Horizontal Alignment"), m_pActivePage, pStencil, pStencil->hTextAlign(), i); pStencil->setHTextAlign(i); macro->addCommand( cmd ); @@ -1596,13 +1596,13 @@ void KivioView::setVParaAlign( int i ) KivioStencil *pStencil = m_pActivePage->selectedStencils()->first(); if (!pStencil) return; - KMacroCommand *macro = new KMacroCommand( i18n("Change Stencil Vertical Alignment")); + KMacroCommand *macro = new KMacroCommand( i18n("Change StencilQt::Vertical Alignment")); bool createMacro = false; while( pStencil ) { if ( pStencil->vTextAlign() != i ) { - KivioChangeStencilVAlignmentCommand * cmd = new KivioChangeStencilVAlignmentCommand( i18n("Change Stencil Vertical Alignment"), m_pActivePage, pStencil, pStencil->vTextAlign(), i); + KivioChangeStencilVAlignmentCommand * cmd = new KivioChangeStencilVAlignmentCommand( i18n("Change StencilQt::Vertical Alignment"), m_pActivePage, pStencil, pStencil->vTextAlign(), i); pStencil->setVTextAlign( i ); macro->addCommand( cmd ); createMacro = true; @@ -1707,13 +1707,13 @@ void KivioView::addStencilFromSpawner( KivioStencilSpawner *pSpawner, double x, // Use default properties if we held ctrl down #if KDE_IS_VERSION(3, 4, 0) - if(kapp->keyboardMouseState() & Qt::ControlButton) { + if(kapp->keyboardMouseState() & TQt::ControlButton) { #else if(KApplication::keyboardModifiers() & KApplication::ControlModifier) { #endif pStencil->setFGColor(m_setFGColor->color()); pStencil->setBGColor(m_setBGColor->color()); - QFont f = m_setFontFamily->font(); + TQFont f = m_setFontFamily->font(); f.setPointSize(m_setFontSize->fontSize()); f.setBold(m_setBold->isChecked()); f.setItalic(m_setItalics->isChecked()); @@ -1733,7 +1733,7 @@ void KivioView::addStencilFromSpawner( KivioStencilSpawner *pSpawner, double x, m_pActivePage->addStencil( pStencil ); m_pActivePage->selectStencil( pStencil ); - // Mark the page as modified and repaint + // Mark the page as modified and tqrepaint m_pDoc->updateView(m_pActivePage); pluginManager()->activateDefaultTool(); m_pCanvas->updateAutoGuideLines(); @@ -1743,12 +1743,12 @@ void KivioView::alignStencilsDlg() { KivioAlignDialog* dlg = new KivioAlignDialog(this, "AlignDialog"); - if( dlg->exec() == QDialog::Accepted ) + if( dlg->exec() == TQDialog::Accepted ) { m_pActivePage->alignStencils(dlg->align()); m_pActivePage->distributeStencils(dlg->distribute()); - m_pCanvas->repaint(); + m_pCanvas->tqrepaint(); } delete dlg; @@ -1783,11 +1783,11 @@ void KivioView::setupPrinter(KPrinter &p) } } -void KivioView::popupTabBarMenu( const QPoint & _point ) +void KivioView::popupTabBarMenu( const TQPoint & _point ) { if(!koDocument()->isReadWrite() || !factory()) return; - static_cast<QPopupMenu*>(factory()->container("menupage_popup",this))->popup(_point); + static_cast<TQPopupMenu*>(factory()->container("menupage_popup",this))->popup(_point); } void KivioView::updateMenuPage() @@ -1838,12 +1838,12 @@ void KivioView::setMousePos( int mx, int my ) hRuler->setMousePos(mx, my); if((mx >= 0) && (my >= 0)) { - QString unit = KoUnit::unitName(m_pDoc->unit()); - KoPoint xy = m_pCanvas->mapFromScreen(QPoint(mx, my)); + TQString unit = KoUnit::unitName(m_pDoc->unit()); + KoPoint xy = m_pCanvas->mapFromScreen(TQPoint(mx, my)); xy.setX(KoUnit::toUserValue(xy.x(), m_pDoc->unit())); xy.setY(KoUnit::toUserValue(xy.y(), m_pDoc->unit())); - QString text = i18n("X: %1 %3 Y: %2 %4").arg(KGlobal::_locale->formatNumber(xy.x(), 2)) - .arg(KGlobal::_locale->formatNumber(xy.y(), 2)).arg(unit).arg(unit); + TQString text = i18n("X: %1 %3 Y: %2 %4").tqarg(KGlobal::_locale->formatNumber(xy.x(), 2)) + .tqarg(KGlobal::_locale->formatNumber(xy.y(), 2)).tqarg(unit).tqarg(unit); m_coordSLbl->setText(text); } } @@ -1889,9 +1889,9 @@ void KivioView::setRulerPageLayout(const KoPageLayout& l) m_pStencilGeometryPanel->setPageLayout(l); } -void KivioView::viewZoom(const QString& s) +void KivioView::viewZoom(const TQString& s) { - QString z(s); + TQString z(s); z.remove('%'); z.simplifyWhiteSpace(); bool ok = false; @@ -1911,7 +1911,7 @@ void KivioView::viewZoom(const QString& s) void KivioView::textAlignLeft() { if ( m_textAlignLeft->isChecked() ) { - setHParaAlign( Qt::AlignLeft ); + setHParaAlign( TQt::AlignLeft ); } else { m_textAlignLeft->setChecked( true ); } @@ -1920,7 +1920,7 @@ void KivioView::textAlignLeft() void KivioView::textAlignCenter() { if ( m_textAlignCenter->isChecked() ) { - setHParaAlign( Qt::AlignHCenter ); + setHParaAlign( TQt::AlignHCenter ); } else { m_textAlignCenter->setChecked( true ); } @@ -1929,7 +1929,7 @@ void KivioView::textAlignCenter() void KivioView::textAlignRight() { if ( m_textAlignRight->isChecked() ) { - setHParaAlign( Qt::AlignRight ); + setHParaAlign( TQt::AlignRight ); } else { m_textAlignRight->setChecked( true ); } @@ -1938,10 +1938,10 @@ void KivioView::textAlignRight() void KivioView::textSuperScript() { if ( m_textVAlignSuper->isChecked() ) { - setVParaAlign( Qt::AlignTop ); + setVParaAlign( TQt::AlignTop ); } else { if ( !m_textVAlignSub->isChecked() ) { - setVParaAlign( Qt::AlignVCenter ); + setVParaAlign( TQt::AlignVCenter ); } } } @@ -1949,10 +1949,10 @@ void KivioView::textSuperScript() void KivioView::textSubScript() { if ( m_textVAlignSub->isChecked() ) { - setVParaAlign( Qt::AlignBottom ); + setVParaAlign( TQt::AlignBottom ); } else { if ( !m_textVAlignSuper->isChecked() ) { - setVParaAlign( Qt::AlignVCenter ); + setVParaAlign( TQt::AlignVCenter ); } } } @@ -1960,16 +1960,18 @@ void KivioView::textSubScript() void KivioView::showAlign( int align ) { switch ( align ) { - case Qt::AlignAuto: // In left-to-right mode it's align left. TODO: alignright if text->isRightToLeft() +#ifndef USE_QT4 + case TQt::AlignAuto: // In left-to-right mode it's align left. TODO: alignright if text->isRightToLeft() kdWarning(43000) << k_funcinfo << "shouldn't be called with AlignAuto" << endl; // fallthrough - case Qt::AlignLeft: +#endif // USE_QT4 + case TQt::AlignLeft: m_textAlignLeft->setChecked( true ); break; - case Qt::AlignHCenter: + case TQt::AlignHCenter: m_textAlignCenter->setChecked( true ); break; - case Qt::AlignRight: + case TQt::AlignRight: m_textAlignRight->setChecked( true ); break; } @@ -1978,14 +1980,14 @@ void KivioView::showAlign( int align ) void KivioView::showVAlign( int align ) { switch(align) { - case Qt::AlignTop: + case TQt::AlignTop: m_textVAlignSuper->setChecked(true); break; - case Qt::AlignVCenter: + case TQt::AlignVCenter: m_textVAlignSuper->setChecked(false); m_textVAlignSub->setChecked(false); break; - case Qt::AlignBottom: + case TQt::AlignBottom: m_textVAlignSub->setChecked(true); break; } @@ -2003,13 +2005,13 @@ void KivioView::textFormat() dlg.setVAlign(stencil->vTextAlign()); } else { dlg.setFont(doc()->defaultFont()); - dlg.setTextColor(QColor(0, 0, 0)); - dlg.setHAlign(Qt::AlignHCenter); - dlg.setVAlign(Qt::AlignVCenter); + dlg.setTextColor(TQColor(0, 0, 0)); + dlg.setHAlign(TQt::AlignHCenter); + dlg.setVAlign(TQt::AlignVCenter); } if(dlg.exec()) { - QPtrListIterator<KivioStencil> it(*activePage()->selectedStencils()); + TQPtrListIterator<KivioStencil> it(*activePage()->selectedStencils()); while((stencil = it.current()) != 0) { ++it; @@ -2035,7 +2037,7 @@ void KivioView::stencilFormat() dlg.setFillPattern(stencil->fillPattern()); } else { dlg.setLineWidth(1.0, m_pDoc->unit()); - dlg.setLineColor(QColor(0, 0, 0)); + dlg.setLineColor(TQColor(0, 0, 0)); } dlg.setLineWidth(ls.width(), m_pDoc->unit()); @@ -2044,7 +2046,7 @@ void KivioView::stencilFormat() dlg.setLineEndStyle(ls.capStyle()); if(dlg.exec()) { - QPtrListIterator<KivioStencil> it(*activePage()->selectedStencils()); + TQPtrListIterator<KivioStencil> it(*activePage()->selectedStencils()); while((stencil = it.current()) != 0) { ++it; @@ -2085,7 +2087,7 @@ void KivioView::arrowHeadFormat() } if(dlg.exec()) { - QPtrListIterator<KivioStencil> it(*activePage()->selectedStencils()); + TQPtrListIterator<KivioStencil> it(*activePage()->selectedStencils()); while((stencil = it.current()) != 0) { ++it; @@ -2111,7 +2113,7 @@ Kivio::PluginManager* KivioView::pluginManager() void KivioView::clipboardDataChanged() { - QMimeSource* data = QApplication::clipboard()->data(); + TQMimeSource* data = TQApplication::tqclipboard()->data(); KivioDragObject decoder(this); bool paste = decoder.canDecode(data); m_editPaste->setEnabled(paste); @@ -2135,7 +2137,7 @@ void KivioView::partActivateEvent(KParts::PartActivateEvent* event) void KivioView::initStatusBarProgress() { if(!m_statusBarProgress) { - m_statusBarProgress = new QProgressBar(100, this); + m_statusBarProgress = new TQProgressBar(100, this); addStatusBarItem(m_statusBarProgress); } @@ -2168,32 +2170,32 @@ void KivioView::installStencilSet() int KivioView::hTextAlign() { if(m_textAlignRight->isChecked()) { - return Qt::AlignRight; + return TQt::AlignRight; } else if(m_textAlignLeft->isChecked()) { - return Qt::AlignLeft; + return TQt::AlignLeft; } - return Qt::AlignHCenter; + return TQt::AlignHCenter; } int KivioView::vTextAlign() { if(m_textVAlignSub->isChecked() && !m_textVAlignSuper->isChecked()) { - return Qt::AlignBottom; + return TQt::AlignBottom; } else if(!m_textVAlignSub->isChecked() && m_textVAlignSuper->isChecked()) { - return Qt::AlignTop; + return TQt::AlignTop; } - return Qt::AlignVCenter; + return TQt::AlignVCenter; } void KivioView::updatePageStatusLabel() { - QString text = i18n("Page %1/%2").arg(m_pDoc->map()->pageList().find(activePage()) + 1).arg(m_pDoc->map()->count()); + TQString text = i18n("Page %1/%2").tqarg(m_pDoc->map()->pageList().tqfind(activePage()) + 1).tqarg(m_pDoc->map()->count()); m_pageCountSLbl->setText(text); } -void KivioView::setStatusBarInfo(const QString& text) +void KivioView::setStatusBarInfo(const TQString& text) { m_infoSLbl->setText(text); } @@ -2201,8 +2203,8 @@ void KivioView::setStatusBarInfo(const QString& text) void KivioView::loadingFinished() { m_pTabBar->clear(); - QPtrList<KivioPage> pages = m_pDoc->map()->pageList(); - QPtrListIterator<KivioPage> it(pages); + TQPtrList<KivioPage> pages = m_pDoc->map()->pageList(); + TQPtrListIterator<KivioPage> it(pages); KivioPage* page; while((page = it.current()) != 0) { @@ -2227,9 +2229,9 @@ void KivioView::loadingFinished() void KivioView::moveTab(unsigned tab, unsigned target) { - QStringList tabs = m_pTabBar->tabs(); - QString tabTitle = tabs[tab]; - QString targetTitle = tabs[target]; + TQStringList tabs = m_pTabBar->tabs(); + TQString tabTitle = tabs[tab]; + TQString targetTitle = tabs[target]; if(target >= static_cast<unsigned>(m_pDoc->map()->count())) { targetTitle = m_pDoc->map()->lastPage()->pageName(); @@ -2252,7 +2254,7 @@ void KivioView::addGuideLine() KoPoint pos(0.0, 0.0); KoGuideLineDia dlg(this, pos, pageRect, m_pDoc->unit(), "addGuideDialog"); - if(dlg.exec() == QDialog::Accepted) { + if(dlg.exec() == TQDialog::Accepted) { activePage()->addGuideLine(dlg.orientation(), dlg.pos()); m_pDoc->updateGuideLines(activePage()); } @@ -2262,8 +2264,8 @@ void KivioView::showAddStencilSetDialog() { if(!m_addStencilSetDialog) { m_addStencilSetDialog = new Kivio::AddStencilSetDialog(this, "AddStencilSetDialog"); - connect(m_addStencilSetDialog, SIGNAL(addStencilSet(const QString&)), this, SLOT(addStencilSet(const QString&))); - connect(this, SIGNAL(updateStencilSetList()), m_addStencilSetDialog, SLOT(updateList())); + connect(m_addStencilSetDialog, TQT_SIGNAL(addStencilSet(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(addStencilSet(const TQString&))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(updateStencilSetList()), m_addStencilSetDialog, TQT_SLOT(updateList())); } m_addStencilSetDialog->show(); |