summaryrefslogtreecommitdiffstats
path: root/kugar/kudesigner/kudesigner_view.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kugar/kudesigner/kudesigner_view.cpp')
-rw-r--r--kugar/kudesigner/kudesigner_view.cpp164
1 files changed, 82 insertions, 82 deletions
diff --git a/kugar/kudesigner/kudesigner_view.cpp b/kugar/kudesigner/kudesigner_view.cpp
index 713b8521..4533813d 100644
--- a/kugar/kudesigner/kudesigner_view.cpp
+++ b/kugar/kudesigner/kudesigner_view.cpp
@@ -22,18 +22,18 @@
#include <map>
-#include <qpainter.h>
-#include <qiconset.h>
-#include <qinputdialog.h>
-#include <qevent.h>
-#include <qmainwindow.h>
-#include <qaction.h>
-#include <qlayout.h>
-#include <qdockwindow.h>
-#include <qmenubar.h>
-#include <qmessagebox.h>
-#include <qspinbox.h>
-#include <qlabel.h>
+#include <tqpainter.h>
+#include <tqiconset.h>
+#include <tqinputdialog.h>
+#include <tqevent.h>
+#include <tqmainwindow.h>
+#include <tqaction.h>
+#include <tqlayout.h>
+#include <tqdockwindow.h>
+#include <tqmenubar.h>
+#include <tqmessagebox.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
#include <kaction.h>
#include <kstdaction.h>
@@ -68,8 +68,8 @@
using namespace Kudesigner;
-KudesignerView::KudesignerView( KudesignerDoc* part, QWidget* parent, const char* name )
- : KoView( part, parent, name ), m_propertyEditor( 0 ), m_doc( part )
+KudesignerView::KudesignerView( KudesignerDoc* part, TQWidget* tqparent, const char* name )
+ : KoView( part, tqparent, name ), m_propertyEditor( 0 ), m_doc( part )
{
setInstance( KudesignerFactory::global() );
if ( !part->isReadWrite() ) // readonly case, e.g. when embedded into konqueror
@@ -77,7 +77,7 @@ KudesignerView::KudesignerView( KudesignerDoc* part, QWidget* parent, const char
else
setXMLFile( "kudesignerui.rc" );
- QVBoxLayout *l = new QVBoxLayout( this, 0, 0 );
+ TQVBoxLayout *l = new TQVBoxLayout( this, 0, 0 );
m_view = new Kudesigner::View( part->canvas(), this );
if ( part->plugin() )
{
@@ -88,13 +88,13 @@ KudesignerView::KudesignerView( KudesignerDoc* part, QWidget* parent, const char
l->addWidget( m_view );
m_view->viewport() ->setFocusProxy( m_view );
- m_view->viewport() ->setFocusPolicy( WheelFocus );
+ m_view->viewport() ->setFocusPolicy( TQ_WheelFocus );
m_view->setFocus();
m_view->itemToInsert = 0;
- QDockWindow *dw1 = new QDockWindow( QDockWindow::OutsideDock, shell() );
- QDockWindow *dw2 = new QDockWindow( QDockWindow::OutsideDock, shell() );
+ TQDockWindow *dw1 = new TQDockWindow( TQDockWindow::OutsideDock, shell() );
+ TQDockWindow *dw2 = new TQDockWindow( TQDockWindow::OutsideDock, shell() );
m_structure = new Kudesigner::StructureWidget( dw1 );
m_propertyEditor = new Editor( dw2 );
dw1->boxLayout() ->addWidget( m_structure, 1 );
@@ -106,8 +106,8 @@ KudesignerView::KudesignerView( KudesignerDoc* part, QWidget* parent, const char
if ( m_doc->plugin() )
{
- // connect( m_propertyEditor, SIGNAL(createPluggedInEditor(QWidget*&, Editor *, Property*, Box *)),
- // m_doc->plugin(), SLOT(createPluggedInEditor(QWidget*&, Editor *, Property*, Box *)));
+ // connect( m_propertyEditor, TQT_SIGNAL(createPluggedInEditor(TQWidget*&, Editor *, Property*, Box *)),
+ // m_doc->plugin(), TQT_SLOT(createPluggedInEditor(TQWidget*&, Editor *, Property*, Box *)));
kdDebug() << "*************Property and plugin have been connected" << endl;
}
@@ -117,33 +117,33 @@ KudesignerView::KudesignerView( KudesignerDoc* part, QWidget* parent, const char
m_structure->setDocument( m_doc->canvas() );
- connect( m_doc, SIGNAL( canvasChanged( Kudesigner::Canvas * ) ),
- m_structure, SLOT( setDocument( Kudesigner::Canvas * ) ) );
- connect( m_doc->canvas(), SIGNAL( structureModified() ),
- m_structure, SLOT( refresh() ) );
+ connect( m_doc, TQT_SIGNAL( canvasChanged( Kudesigner::Canvas * ) ),
+ m_structure, TQT_SLOT( setDocument( Kudesigner::Canvas * ) ) );
+ connect( m_doc->canvas(), TQT_SIGNAL( structureModified() ),
+ m_structure, TQT_SLOT( refresh() ) );
- connect( m_view, SIGNAL( selectionMade( Buffer* ) ),
- this, SLOT( populateProperties( Buffer* ) ) );
+ connect( m_view, TQT_SIGNAL( selectionMade( Buffer* ) ),
+ this, TQT_SLOT( populateProperties( Buffer* ) ) );
- connect( m_view, SIGNAL( selectionClear() ),
- m_propertyEditor, SLOT( clear() ) );
+ connect( m_view, TQT_SIGNAL( selectionClear() ),
+ m_propertyEditor, TQT_SLOT( clear() ) );
- connect( m_view, SIGNAL( changed() ),
- m_doc, SLOT( setModified() ) );
+ connect( m_view, TQT_SIGNAL( changed() ),
+ m_doc, TQT_SLOT( setModified() ) );
- connect( m_view, SIGNAL( selectionMade( Buffer* ) ),
- m_structure, SLOT( selectionMade() ) );
- connect( m_view, SIGNAL( selectionClear() ),
- m_structure, SLOT( selectionClear() ) );
+ connect( m_view, TQT_SIGNAL( selectionMade( Buffer* ) ),
+ m_structure, TQT_SLOT( selectionMade() ) );
+ connect( m_view, TQT_SIGNAL( selectionClear() ),
+ m_structure, TQT_SLOT( selectionClear() ) );
- connect( m_view, SIGNAL( selectedActionProcessed() ), this, SLOT( unselectItemAction() ) );
- connect( m_view, SIGNAL( modificationPerformed() ), part, SLOT( setModified() ) );
- connect( m_view, SIGNAL( itemPlaced( int, int, int, int ) ), this, SLOT( placeItem( int, int, int, int ) ) );
+ connect( m_view, TQT_SIGNAL( selectedActionProcessed() ), this, TQT_SLOT( unselectItemAction() ) );
+ connect( m_view, TQT_SIGNAL( modificationPerformed() ), part, TQT_SLOT( setModified() ) );
+ connect( m_view, TQT_SIGNAL( itemPlaced( int, int, int, int ) ), this, TQT_SLOT( placeItem( int, int, int, int ) ) );
- gridLabel = new QLabel( i18n( "Grid size:" ), shell() );
- gridBox = new QSpinBox( 1, 100, 1, shell() );
+ gridLabel = new TQLabel( i18n( "Grid size:" ), shell() );
+ gridBox = new TQSpinBox( 1, 100, 1, shell() );
gridBox->setValue( 10 );
- connect( gridBox, SIGNAL( valueChanged( int ) ), m_view, SLOT( setGridSize( int ) ) );
+ connect( gridBox, TQT_SIGNAL( valueChanged( int ) ), m_view, TQT_SLOT( setGridSize( int ) ) );
initActions();
@@ -158,9 +158,9 @@ KudesignerView::~KudesignerView()
delete gridBox;
}
-void KudesignerView::paintEvent( QPaintEvent* ev )
+void KudesignerView::paintEvent( TQPaintEvent* ev )
{
- QPainter painter;
+ TQPainter painter;
painter.begin( this );
// ### TODO: Scaling
@@ -171,63 +171,63 @@ void KudesignerView::paintEvent( QPaintEvent* ev )
painter.end();
}
-void KudesignerView::resizeEvent( QResizeEvent* /*_ev*/ )
+void KudesignerView::resizeEvent( TQResizeEvent* /*_ev*/ )
{
m_view->setGeometry( 0, 0, width(), height() );
}
void KudesignerView::initActions()
{
- cutAction = KStdAction::cut( this, SLOT( cut() ), actionCollection() );
- copyAction = KStdAction::copy( this, SLOT( copy() ), actionCollection() );
- pasteAction = KStdAction::paste( this, SLOT( paste() ), actionCollection() );
- selectAllAction = KStdAction::selectAll( this, SLOT( selectAll() ), actionCollection() );
- deleteAction = new KAction( i18n( "Delete" ), "editdelete", 0, this,
- SLOT( deleteItems() ), actionCollection(), "edit_delete" );
+ cutAction = KStdAction::cut( TQT_TQOBJECT(this), TQT_SLOT( cut() ), actionCollection() );
+ copyAction = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT( copy() ), actionCollection() );
+ pasteAction = KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT( paste() ), actionCollection() );
+ selectAllAction = KStdAction::selectAll( TQT_TQOBJECT(this), TQT_SLOT( selectAll() ), actionCollection() );
+ deleteAction = new KAction( i18n( "Delete" ), "editdelete", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( deleteItems() ), actionCollection(), "edit_delete" );
cutAction->setEnabled( false );
copyAction->setEnabled( false );
pasteAction->setEnabled( false );
// deleteAction->setEnabled(false);
- sectionsReportHeader = new KAction( i18n( "Report Header" ), "irh", 0, this,
- SLOT( slotAddReportHeader() ), actionCollection(), "rheader" );
- sectionsReportFooter = new KAction( i18n( "Report Footer" ), "irf", 0, this,
- SLOT( slotAddReportFooter() ), actionCollection(), "rfooter" );
- sectionsPageHeader = new KAction( i18n( "Page Header" ), "iph", 0, this,
- SLOT( slotAddPageHeader() ), actionCollection(), "pheader" );
- sectionsPageFooter = new KAction( i18n( "Page Footer" ), "ipf", 0, this,
- SLOT( slotAddPageFooter() ), actionCollection(), "pfooter" );
- sectionsDetailHeader = new KAction( i18n( "Detail Header" ), "idh", 0, this,
- SLOT( slotAddDetailHeader() ), actionCollection(), "dheader" );
- sectionsDetail = new KAction( i18n( "Detail" ), "id", 0, this,
- SLOT( slotAddDetail() ), actionCollection(), "detail" );
- sectionsDetailFooter = new KAction( i18n( "Detail Footer" ), "idf", 0, this,
- SLOT( slotAddDetailFooter() ), actionCollection(), "dfooter" );
-
- itemsNothing = new KRadioAction( i18n( "Clear Selection" ), "frame_edit", 0, this,
- SLOT( slotAddItemNothing() ), actionCollection(), "nothing" );
+ sectionsReportHeader = new KAction( i18n( "Report Header" ), "irh", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddReportHeader() ), actionCollection(), "rheader" );
+ sectionsReportFooter = new KAction( i18n( "Report Footer" ), "irf", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddReportFooter() ), actionCollection(), "rfooter" );
+ sectionsPageHeader = new KAction( i18n( "Page Header" ), "iph", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddPageHeader() ), actionCollection(), "pheader" );
+ sectionsPageFooter = new KAction( i18n( "Page Footer" ), "ipf", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddPageFooter() ), actionCollection(), "pfooter" );
+ sectionsDetailHeader = new KAction( i18n( "Detail Header" ), "idh", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddDetailHeader() ), actionCollection(), "dheader" );
+ sectionsDetail = new KAction( i18n( "Detail" ), "id", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddDetail() ), actionCollection(), "detail" );
+ sectionsDetailFooter = new KAction( i18n( "Detail Footer" ), "idf", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddDetailFooter() ), actionCollection(), "dfooter" );
+
+ itemsNothing = new KRadioAction( i18n( "Clear Selection" ), "frame_edit", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddItemNothing() ), actionCollection(), "nothing" );
itemsNothing->setExclusiveGroup( "itemsToolBar" );
itemsNothing->setChecked( true );
- itemsLabel = new KRadioAction( i18n( "Label" ), "frame_text", 0, this,
- SLOT( slotAddItemLabel() ), actionCollection(), "label" );
+ itemsLabel = new KRadioAction( i18n( "Label" ), "frame_text", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddItemLabel() ), actionCollection(), "label" );
itemsLabel->setExclusiveGroup( "itemsToolBar" );
- itemsField = new KRadioAction( i18n( "Field" ), "frame_field", 0, this,
- SLOT( slotAddItemField() ), actionCollection(), "field" );
+ itemsField = new KRadioAction( i18n( "Field" ), "frame_field", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddItemField() ), actionCollection(), "field" );
itemsField->setExclusiveGroup( "itemsToolBar" );
- itemsSpecial = new KRadioAction( i18n( "Special Field" ), "frame_query", 0, this,
- SLOT( slotAddItemSpecial() ), actionCollection(), "special" );
+ itemsSpecial = new KRadioAction( i18n( "Special Field" ), "frame_query", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddItemSpecial() ), actionCollection(), "special" );
itemsSpecial->setExclusiveGroup( "itemsToolBar" );
- itemsCalculated = new KRadioAction( i18n( "Calculated Field" ), "frame_formula", 0, this,
- SLOT( slotAddItemCalculated() ), actionCollection(), "calcfield" );
+ itemsCalculated = new KRadioAction( i18n( "Calculated Field" ), "frame_formula", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddItemCalculated() ), actionCollection(), "calcfield" );
itemsCalculated->setExclusiveGroup( "itemsToolBar" );
- itemsLine = new KRadioAction( i18n( "Line" ), "frame_chart", 0, this,
- SLOT( slotAddItemLine() ), actionCollection(), "line" );
+ itemsLine = new KRadioAction( i18n( "Line" ), "frame_chart", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddItemLine() ), actionCollection(), "line" );
itemsLine->setExclusiveGroup( "itemsToolBar" );
- gridActionLabel = new KWidgetAction( gridLabel, i18n( "Grid Label" ), 0, this,
+ gridActionLabel = new KWidgetAction( gridLabel, i18n( "Grid Label" ), 0, TQT_TQOBJECT(this),
0, actionCollection(), "gridlabel" );
- gridAction = new KWidgetAction( gridBox, i18n( "Grid Size" ), 0, this,
+ gridAction = new KWidgetAction( gridBox, i18n( "Grid Size" ), 0, TQT_TQOBJECT(this),
0, actionCollection(), "gridaction" );
}
@@ -246,7 +246,7 @@ void KudesignerView::guiActivateEvent( KParts::GUIActivateEvent *ev )
void KudesignerView::populateProperties( Buffer *buf )
{
- connect( buf, SIGNAL( propertyChanged() ), m_doc->canvas(), SLOT( changed() ) );
+ connect( buf, TQT_SIGNAL( propertyChanged() ), m_doc->canvas(), TQT_SLOT( changed() ) );
m_propertyEditor->changeSet( buf );
}
@@ -309,7 +309,7 @@ void KudesignerView::slotAddPageFooter()
void KudesignerView::slotAddDetailHeader()
{
bool Ok = false;
- unsigned int level = QInputDialog::getInteger( tr( "Add Detail Header" ), tr( "Enter detail level:" ),
+ unsigned int level = TQInputDialog::getInteger( tr( "Add Detail Header" ), tr( "Enter detail level:" ),
0, 0, 100, 1, &Ok, this );
if ( !Ok )
return ;
@@ -322,7 +322,7 @@ void KudesignerView::slotAddDetailHeader()
void KudesignerView::slotAddDetail()
{
bool Ok = false;
- unsigned int level = QInputDialog::getInteger( tr( "Add Detail" ), tr( "Enter detail level:" ),
+ unsigned int level = TQInputDialog::getInteger( tr( "Add Detail" ), tr( "Enter detail level:" ),
0, 0, 100, 1, &Ok, this );
if ( !Ok )
return ;
@@ -336,7 +336,7 @@ void KudesignerView::slotAddDetail()
void KudesignerView::slotAddDetailFooter()
{
bool Ok = false;
- unsigned int level = QInputDialog::getInteger( tr( "Add Detail Footer" ), tr( "Enter detail level:" ),
+ unsigned int level = TQInputDialog::getInteger( tr( "Add Detail Footer" ), tr( "Enter detail level:" ),
0, 0, 100, 1, &Ok, this );
if ( !Ok )
return ;