summaryrefslogtreecommitdiffstats
path: root/karbon/dockers/vdocumentdocker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'karbon/dockers/vdocumentdocker.cc')
-rw-r--r--karbon/dockers/vdocumentdocker.cc444
1 files changed, 222 insertions, 222 deletions
diff --git a/karbon/dockers/vdocumentdocker.cc b/karbon/dockers/vdocumentdocker.cc
index ccbbf711..b63ae9ae 100644
--- a/karbon/dockers/vdocumentdocker.cc
+++ b/karbon/dockers/vdocumentdocker.cc
@@ -17,17 +17,17 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qhbuttongroup.h>
-#include <qinputdialog.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qlistview.h>
-#include <qptrvector.h>
-#include <qtoolbutton.h>
-#include <qpainter.h>
-#include <qtabwidget.h>
-#include <qlabel.h>
-#include <qcursor.h>
+#include <tqhbuttongroup.h>
+#include <tqinputdialog.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqlistview.h>
+#include <tqptrvector.h>
+#include <tqtoolbutton.h>
+#include <tqpainter.h>
+#include <tqtabwidget.h>
+#include <tqlabel.h>
+#include <tqcursor.h>
#include <klocale.h>
#include <kglobal.h>
@@ -61,12 +61,12 @@ static long g_lastKey = 0;
* Document tab *
*************************************************************************/
-VDocumentPreview::VDocumentPreview( KarbonView* view, QWidget* parent )
- : QWidget( parent, "DocumentPreview" ), m_document( &view->part()->document() ), m_view( view )
+VDocumentPreview::VDocumentPreview( KarbonView* view, TQWidget* tqparent )
+ : TQWidget( tqparent, "DocumentPreview" ), m_document( &view->part()->document() ), m_view( view )
{
update();
installEventFilter( this );
- setBackgroundMode( Qt::NoBackground );
+ setBackgroundMode( TQt::NoBackground );
setMouseTracking( true );
m_dragging = false;
m_docpixmap = 0L;
@@ -85,7 +85,7 @@ VDocumentPreview::reset()
}
bool
-VDocumentPreview::eventFilter( QObject* object, QEvent* event )
+VDocumentPreview::eventFilter( TQObject* object, TQEvent* event )
{
double scaleFactor;
double xoffset = 0.;
@@ -102,17 +102,17 @@ VDocumentPreview::eventFilter( QObject* object, QEvent* event )
}
KoRect rect = m_view->canvasWidget()->boundingBox();
- QMouseEvent* mouseEvent = static_cast<QMouseEvent*>( event );
- if( event->type() == QEvent::MouseButtonPress )
+ TQMouseEvent* mouseEvent = TQT_TQMOUSEEVENT( event );
+ if( event->type() == TQEvent::MouseButtonPress )
{
m_firstPoint.setX( mouseEvent->pos().x() );
m_firstPoint.setY( mouseEvent->pos().y() );
m_lastPoint = m_firstPoint;
KoPoint p3( m_firstPoint.x() / scaleFactor - xoffset,
( height() - m_firstPoint.y() ) / scaleFactor - yoffset );
- m_dragging = rect.contains( p3 );
+ m_dragging = rect.tqcontains( p3 );
}
- else if( event->type() == QEvent::MouseButtonRelease )
+ else if( event->type() == TQEvent::MouseButtonRelease )
{
if( m_dragging )
{
@@ -127,7 +127,7 @@ VDocumentPreview::eventFilter( QObject* object, QEvent* event )
update();
}
}
- else if( event->type() == QEvent::MouseMove )
+ else if( event->type() == TQEvent::MouseMove )
{
if( m_dragging )
{
@@ -144,18 +144,18 @@ VDocumentPreview::eventFilter( QObject* object, QEvent* event )
{
KoPoint p3( mouseEvent->pos().x() / scaleFactor - xoffset,
( height() - mouseEvent->pos().y() ) / scaleFactor - yoffset );
- setCursor( rect.contains( p3 ) ? QCursor::SizeAllCursor : QCursor( Qt::arrowCursor ) );
+ setCursor( rect.tqcontains( p3 ) ? TQCursor::SizeAllCursor : TQCursor( TQt::arrowCursor ) );
}
}
- return QWidget::eventFilter( object, event );
+ return TQWidget::eventFilter( object, event );
}
void
-VDocumentPreview::paintEvent( QPaintEvent* )
+VDocumentPreview::paintEvent( TQPaintEvent* )
{
// TODO : use NotROP, otherwise too slow
- QPixmap pixmap( width(), height() );
+ TQPixmap pixmap( width(), height() );
double xoffset = 0.;
double yoffset = 0.;
double scaleFactor;
@@ -174,17 +174,17 @@ VDocumentPreview::paintEvent( QPaintEvent* )
if( !m_docpixmap || m_docpixmap->width() != width() || m_docpixmap->height() != height() )
{
delete m_docpixmap;
- m_docpixmap = new QPixmap( width(), height() );
- VKoPainter p( m_docpixmap, width(), height() );
- p.clear( QColor( 195, 194, 193 ) );
- p.setWorldMatrix( QWMatrix( 1, 0, 0, -1, xoffset * scaleFactor, height() - yoffset * scaleFactor ) );
+ m_docpixmap = new TQPixmap( width(), height() );
+ VKoPainter p( TQT_TQPAINTDEVICE(m_docpixmap), width(), height() );
+ p.clear( TQColor( 195, 194, 193 ) );
+ p.setWorldMatrix( TQWMatrix( 1, 0, 0, -1, xoffset * scaleFactor, height() - yoffset * scaleFactor ) );
p.setZoomFactor( scaleFactor );
KoRect rect( -xoffset, -yoffset, m_document->width() + xoffset, m_document->height() + yoffset );
// draw doc outline
- VColor c( Qt::black );
+ VColor c( TQt::black );
VStroke stroke( c, 0L, 1.0 / scaleFactor );
p.setPen( stroke );
- p.setBrush( Qt::white );
+ p.setBrush( TQt::white );
p.drawRect( KoRect( 2, 2, m_document->width() - 2, m_document->height() - 2 ) );
m_document->draw( &p, &rect );
p.end();
@@ -193,9 +193,9 @@ VDocumentPreview::paintEvent( QPaintEvent* )
// draw viewport rect
{
- QPainter p( &pixmap );
- p.setWorldMatrix( QWMatrix( scaleFactor, 0, 0, -scaleFactor, xoffset * scaleFactor, height() - yoffset * scaleFactor ) );
- p.setPen( Qt::red );
+ TQPainter p( &pixmap );
+ p.setWorldMatrix( TQWMatrix( scaleFactor, 0, 0, -scaleFactor, xoffset * scaleFactor, height() - yoffset * scaleFactor ) );
+ p.setPen( TQt::red );
double dx = ( m_lastPoint.x() - m_firstPoint.x() ) * m_view->zoom();
double dy = ( m_lastPoint.y() - m_firstPoint.y() ) * m_view->zoom();
KoPoint p1( dx / scaleFactor, dy / scaleFactor );
@@ -205,13 +205,13 @@ VDocumentPreview::paintEvent( QPaintEvent* )
p.drawRect( int( p1.x() ), int( p1.y() ), int( p2.x() - p1.x() ), int( p2.y() - p1.y() ) );
}
- QPainter pw( &pixmap );
- pw.setPen( colorGroup().light() );
+ TQPainter pw( &pixmap );
+ pw.setPen( tqcolorGroup().light() );
pw.drawLine( 1, 1, 1, height() - 2 );
pw.drawLine( 1, 1, width() - 2, 1 );
pw.drawLine( width() - 1, height() - 1, 0, height() - 1 );
pw.drawLine( width() - 1, height() - 1, width() - 1, 0 );
- pw.setPen( colorGroup().dark() );
+ pw.setPen( tqcolorGroup().dark() );
pw.drawLine( 0, 0, width() - 1, 0 );
pw.drawLine( 0, 0, 0, height() - 1 );
pw.drawLine( width() - 2, height() - 2, width() - 2, 1 );
@@ -220,42 +220,42 @@ VDocumentPreview::paintEvent( QPaintEvent* )
bitBlt( this, 0, 0, &pixmap, 0, 0, width(), height() );
} // VDocumentPreview::paintEvent
-VDocumentTab::VDocumentTab( KarbonView* view, QWidget* parent )
- : QWidget( parent, "DocumentTab" ), m_view( view )
-{
- QFrame* frame;
- QGridLayout* layout = new QGridLayout( this );
- layout->setMargin( 3 );
- layout->setSpacing( 2 );
- layout->addMultiCellWidget( m_documentPreview = new VDocumentPreview( m_view, this ), 0, 7, 2, 2 );
- layout->addWidget( new QLabel( i18n( "document width", "Width:" ), this ), 0, 0 );
- layout->addWidget( new QLabel( i18n( "Height:" ), this ), 1, 0 );
- layout->addMultiCellWidget( frame = new QFrame( this ), 2, 2, 0, 1 );
- frame->setFrameShape( QFrame::HLine );
- layout->addWidget( new QLabel( i18n( "Layers:" ), this ), 3, 0 );
- layout->addWidget( new QLabel( i18n( "Format:" ), this ), 4, 0 );
- layout->addMultiCellWidget( frame = new QFrame( this ), 5, 5, 0, 1 );
- frame->setFrameShape( QFrame::HLine );
- //layout->addMultiCellWidget( new QLabel( i18n( "Zoom factor:" ), this ), 6, 6, 0, 1 );
- layout->addWidget( m_width = new QLabel( this ), 0, 1 );
- layout->addWidget( m_height = new QLabel( this ), 1, 1 );
- layout->addWidget( m_layers = new QLabel( this ), 3, 1 );
- layout->addWidget( m_format = new QLabel( this ), 4, 1 );
- layout->setRowStretch( 7, 1 );
- layout->setColStretch( 0, 0 );
- layout->setColStretch( 1, 0 );
- layout->setColStretch( 2, 2 );
- //layout->addWidget(
-
- m_width->setAlignment( AlignRight );
- m_height->setAlignment( AlignRight );
- m_layers->setAlignment( AlignRight );
- m_format->setAlignment( AlignRight );
-
- connect( view->part()->commandHistory(), SIGNAL( commandAdded( VCommand* ) ), this, SLOT( slotCommandAdded( VCommand* ) ) );
- connect( view->part()->commandHistory(), SIGNAL( commandExecuted() ), this, SLOT( slotCommandExecuted() ) );
- connect( view, SIGNAL( pageLayoutChanged() ), this, SLOT( slotCommandExecuted() ) );
- connect( view->canvasWidget(), SIGNAL( viewportChanged() ), this, SLOT( slotViewportChanged() ) );
+VDocumentTab::VDocumentTab( KarbonView* view, TQWidget* tqparent )
+ : TQWidget( tqparent, "DocumentTab" ), m_view( view )
+{
+ TQFrame* frame;
+ TQGridLayout* tqlayout = new TQGridLayout( this );
+ tqlayout->setMargin( 3 );
+ tqlayout->setSpacing( 2 );
+ tqlayout->addMultiCellWidget( m_documentPreview = new VDocumentPreview( m_view, this ), 0, 7, 2, 2 );
+ tqlayout->addWidget( new TQLabel( i18n( "document width", "Width:" ), this ), 0, 0 );
+ tqlayout->addWidget( new TQLabel( i18n( "Height:" ), this ), 1, 0 );
+ tqlayout->addMultiCellWidget( frame = new TQFrame( this ), 2, 2, 0, 1 );
+ frame->setFrameShape( TQFrame::HLine );
+ tqlayout->addWidget( new TQLabel( i18n( "Layers:" ), this ), 3, 0 );
+ tqlayout->addWidget( new TQLabel( i18n( "Format:" ), this ), 4, 0 );
+ tqlayout->addMultiCellWidget( frame = new TQFrame( this ), 5, 5, 0, 1 );
+ frame->setFrameShape( TQFrame::HLine );
+ //tqlayout->addMultiCellWidget( new TQLabel( i18n( "Zoom factor:" ), this ), 6, 6, 0, 1 );
+ tqlayout->addWidget( m_width = new TQLabel( this ), 0, 1 );
+ tqlayout->addWidget( m_height = new TQLabel( this ), 1, 1 );
+ tqlayout->addWidget( m_layers = new TQLabel( this ), 3, 1 );
+ tqlayout->addWidget( m_format = new TQLabel( this ), 4, 1 );
+ tqlayout->setRowStretch( 7, 1 );
+ tqlayout->setColStretch( 0, 0 );
+ tqlayout->setColStretch( 1, 0 );
+ tqlayout->setColStretch( 2, 2 );
+ //tqlayout->addWidget(
+
+ m_width->tqsetAlignment( AlignRight );
+ m_height->tqsetAlignment( AlignRight );
+ m_layers->tqsetAlignment( AlignRight );
+ m_format->tqsetAlignment( AlignRight );
+
+ connect( view->part()->commandHistory(), TQT_SIGNAL( commandAdded( VCommand* ) ), this, TQT_SLOT( slotCommandAdded( VCommand* ) ) );
+ connect( view->part()->commandHistory(), TQT_SIGNAL( commandExecuted() ), this, TQT_SLOT( slotCommandExecuted() ) );
+ connect( view, TQT_SIGNAL( pageLayoutChanged() ), this, TQT_SLOT( slotCommandExecuted() ) );
+ connect( view->canvasWidget(), TQT_SIGNAL( viewportChanged() ), this, TQT_SLOT( slotViewportChanged() ) );
updateDocumentInfo();
} // VDocumentTab::VDocumentTab
@@ -269,7 +269,7 @@ VDocumentTab::updateDocumentInfo()
{
m_width->setText( KoUnit::toUserStringValue( m_view->part()->document().width(), m_view->part()->unit() ) + m_view->part()->unitName() );
m_height->setText( KoUnit::toUserStringValue( m_view->part()->document().height(), m_view->part()->unit() ) + m_view->part()->unitName() );
- m_layers->setText( QString::number( m_view->part()->document().layers().count() ) );
+ m_layers->setText( TQString::number( m_view->part()->document().layers().count() ) );
} // VDocumentTab::updateDocumentInfo
void
@@ -303,8 +303,8 @@ VDocumentTab::slotCommandExecuted()
* Layers tab *
*************************************************************************/
-VObjectListViewItem::VObjectListViewItem( QListViewItem* parent, VObject* object, VDocument *doc, uint key, QPtrDict<VObjectListViewItem> *map )
- : QListViewItem( parent, 0L ), m_object( object ), m_document( doc ), m_key( key ), m_map( map )
+VObjectListViewItem::VObjectListViewItem( TQListViewItem* tqparent, VObject* object, VDocument *doc, uint key, TQPtrDict<VObjectListViewItem> *map )
+ : TQListViewItem( tqparent, 0L ), m_object( object ), m_document( doc ), m_key( key ), m_map( map )
{
update();
// add itself to object list item map
@@ -317,10 +317,10 @@ VObjectListViewItem::~VObjectListViewItem()
m_map->take( m_object );
}
-QString
+TQString
VObjectListViewItem::key( int, bool ) const
{
- return QString( "%1" ).arg( m_key );
+ return TQString( "%1" ).tqarg( m_key );
}
void
@@ -329,14 +329,14 @@ VObjectListViewItem::update()
// text description
VSelectionDescription selectionDesc;
selectionDesc.visit( *m_object );
- setText( 0, QString( "%1" ).arg( selectionDesc.shortDescription() ) );
+ setText( 0, TQString( "%1" ).tqarg( selectionDesc.shortDescription() ) );
// draw thumb preview (16x16)
- QPixmap preview;
+ TQPixmap preview;
preview.resize( 16, 16 );
- VKoPainter p( &preview, 16, 16, false );
+ VKoPainter p( TQT_TQPAINTDEVICE(&preview), 16, 16, false );
// Y mirroring
- QWMatrix mat;
+ TQWMatrix mat;
mat.scale( 1, -1 );
KoRect bbox = m_object->boundingBox();
mat.translate( 0, -16 );
@@ -348,30 +348,30 @@ VObjectListViewItem::update()
p.setZoomFactor( factor );
m_object->draw( &p );
p.setZoomFactor( 1 );
- p.setWorldMatrix( QWMatrix() );
- p.setPen( Qt::black );
- p.setBrush( Qt::NoBrush );
+ p.setWorldMatrix( TQWMatrix() );
+ p.setPen( TQt::black );
+ p.setBrush( TQt::NoBrush );
p.drawRect( KoRect( 0, 0, 16, 16 ) );
p.end();
// set thumb preview, lock and visible pixmaps
setPixmap( 0, preview );
- QString s = ( m_object->state() == VObject::normal_locked || m_object->state() == VObject::hidden_locked ) ? "locked" : "unlocked";
+ TQString s = ( m_object->state() == VObject::normal_locked || m_object->state() == VObject::hidden_locked ) ? "locked" : "unlocked";
setPixmap( 1, *KarbonFactory::rServer()->cachePixmap( s, KIcon::Small ) );
s = ( m_object->state() == VObject::hidden || m_object->state() == VObject::hidden_locked ) ? "14_layer_novisible" : "14_layer_visible";
setPixmap( 2, *KarbonFactory::rServer()->cachePixmap( s, KIcon::Small ) );
}
int
-VObjectListViewItem::compare( QListViewItem *i, int /*col*/, bool /*ascending*/ ) const
+VObjectListViewItem::compare( TQListViewItem *i, int /*col*/, bool /*ascending*/ ) const
{
VObjectListViewItem *objectItem = dynamic_cast<VObjectListViewItem*>(i);
if( ! objectItem ) return 0;
return m_key < objectItem->m_key ? -1 : 1;
}
-VLayerListViewItem::VLayerListViewItem( QListView* parent, VLayer* layer, VDocument *doc, QPtrDict<VLayerListViewItem> *map )
- : QCheckListItem( parent, 0L, CheckBox ), m_layer( layer ), m_document( doc), m_map( map )
+VLayerListViewItem::VLayerListViewItem( TQListView* tqparent, VLayer* layer, VDocument *doc, TQPtrDict<VLayerListViewItem> *map )
+ : TQCheckListItem( tqparent, 0L, CheckBox ), m_layer( layer ), m_document( doc), m_map( map )
{
update();
// add itself to layer list item map
@@ -388,11 +388,11 @@ void
VLayerListViewItem::update()
{
// draw thumb preview (16x16)
- QPixmap preview;
+ TQPixmap preview;
preview.resize( 16, 16 );
- VKoPainter p( &preview, 16, 16, false );
+ VKoPainter p( TQT_TQPAINTDEVICE(&preview), 16, 16, false );
// Y mirroring
- QWMatrix mat;
+ TQWMatrix mat;
mat.scale( 1, -1 );
mat.translate( 0, -16 );
p.setWorldMatrix( mat );
@@ -401,9 +401,9 @@ VLayerListViewItem::update()
p.setZoomFactor( 16. / 800. );
m_layer->draw( &p );
p.setZoomFactor( 1 );
- p.setWorldMatrix( QWMatrix() );
- p.setPen( Qt::black );
- p.setBrush( Qt::NoBrush );
+ p.setWorldMatrix( TQWMatrix() );
+ p.setPen( TQt::black );
+ p.setBrush( TQt::NoBrush );
p.drawRect( KoRect( 0, 0, 16, 16 ) );
p.end();
@@ -413,7 +413,7 @@ VLayerListViewItem::update()
// set thumb preview, lock and visible pixmaps
setPixmap( 0, preview );
- QString s = ( m_layer->state() == VObject::normal_locked || m_layer->state() == VObject::hidden_locked ) ? "locked" : "unlocked";
+ TQString s = ( m_layer->state() == VObject::normal_locked || m_layer->state() == VObject::hidden_locked ) ? "locked" : "unlocked";
setPixmap( 1, *KarbonFactory::rServer()->cachePixmap( s, KIcon::Small ) );
s = ( m_layer->state() == VObject::normal || m_layer->state() == VObject::normal_locked ) ? "14_layer_visible" : "14_layer_novisible";
setPixmap( 2, *KarbonFactory::rServer()->cachePixmap( s, KIcon::Small ) );
@@ -435,69 +435,69 @@ VLayerListViewItem::pos()
return 1 + item->pos();
} // VLayerListViewItem::pos
-QString
+TQString
VLayerListViewItem::key( int, bool ) const
{
- return QString( "%1" ).arg( m_key );
+ return TQString( "%1" ).tqarg( m_key );
}
int
-VLayerListViewItem::compare( QListViewItem *i, int /*col*/, bool /*ascending*/ ) const
+VLayerListViewItem::compare( TQListViewItem *i, int /*col*/, bool /*ascending*/ ) const
{
VLayerListViewItem *layerItem = dynamic_cast<VLayerListViewItem*>(i);
if( ! layerItem ) return 0;
return m_key < layerItem->m_key ? -1 : 1;
}
-VLayersTab::VLayersTab( KarbonView* view, QWidget* parent )
- : QWidget( parent, "LayersTab" ), m_view( view ), m_document( &view->part()->document() )
+VLayersTab::VLayersTab( KarbonView* view, TQWidget* tqparent )
+ : TQWidget( tqparent, "LayersTab" ), m_view( view ), m_document( &view->part()->document() )
{
- QToolButton* button;
- QVBoxLayout* layout = new QVBoxLayout( this, 1 );
- layout->addWidget( m_layersListView = new QListView( this ), 1 );
- m_buttonGroup = new QHButtonGroup( this );
+ TQToolButton* button;
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this, 1 );
+ tqlayout->addWidget( m_layersListView = new TQListView( this ), 1 );
+ m_buttonGroup = new TQHButtonGroup( this );
m_buttonGroup->setInsideMargin( 3 );
- button = new QToolButton( m_buttonGroup );
+ button = new TQToolButton( m_buttonGroup );
button->setIconSet( SmallIcon( "14_layer_newlayer" ) );
button->setTextLabel( i18n( "New" ) );
m_buttonGroup->insert( button );
- button = new QToolButton( m_buttonGroup );
+ button = new TQToolButton( m_buttonGroup );
button->setIconSet( SmallIcon( "14_layer_raiselayer" ) );
button->setTextLabel( i18n( "Raise" ) );
m_buttonGroup->insert( button );
- button = new QToolButton( m_buttonGroup );
+ button = new TQToolButton( m_buttonGroup );
button->setIconSet( SmallIcon( "14_layer_lowerlayer" ) );
button->setTextLabel( i18n( "Lower" ) );
m_buttonGroup->insert( button );
- button = new QToolButton( m_buttonGroup );
+ button = new TQToolButton( m_buttonGroup );
button->setIconSet( SmallIcon( "14_layer_deletelayer" ) );
button->setTextLabel( i18n( "Delete" ) );
m_buttonGroup->insert( button );
- layout->addWidget( m_buttonGroup, 0);
- layout->setSpacing( 0 );
- layout->setMargin( 3 );
+ tqlayout->addWidget( m_buttonGroup, 0);
+ tqlayout->setSpacing( 0 );
+ tqlayout->setMargin( 3 );
m_layersListView->setAllColumnsShowFocus( true );
m_layersListView->addColumn( i18n( "Item" ), 120 );
m_layersListView->addColumn( i18n( "L" ), 20 );
m_layersListView->addColumn( i18n( "V" ), 20 );
- m_layersListView->setColumnWidthMode( 0, QListView::Maximum );
- m_layersListView->setColumnAlignment( 1, Qt::AlignCenter );
- m_layersListView->setColumnAlignment( 2, Qt::AlignCenter );
- m_layersListView->setResizeMode( QListView::NoColumn );
+ m_layersListView->setColumnWidthMode( 0, TQListView::Maximum );
+ m_layersListView->setColumnAlignment( 1, TQt::AlignCenter );
+ m_layersListView->setColumnAlignment( 2, TQt::AlignCenter );
+ m_layersListView->setResizeMode( TQListView::NoColumn );
m_layersListView->setSorting( 0, false );
m_layersListView->setRootIsDecorated( true );
- m_layersListView->setSelectionMode( QListView::Extended );
+ m_layersListView->setSelectionMode( TQListView::Extended );
- connect( m_layersListView, SIGNAL( clicked( QListViewItem*, const QPoint&, int ) ), this, SLOT( itemClicked( QListViewItem*, const QPoint&, int ) ) );
- connect( m_layersListView, SIGNAL( rightButtonClicked( QListViewItem*, const QPoint&, int ) ), this, SLOT( renameItem( QListViewItem*, const QPoint&, int ) ) );
- connect( m_layersListView, SIGNAL( selectionChanged() ), this, SLOT( selectionChangedFromList() ) );
- connect( m_view, SIGNAL( selectionChange() ), this, SLOT( selectionChangedFromTool() ) );
- connect( m_buttonGroup, SIGNAL( clicked( int ) ), this, SLOT( slotButtonClicked( int ) ) );
- connect( view->part()->commandHistory(), SIGNAL( commandExecuted( VCommand*) ), this, SLOT( slotCommandExecuted( VCommand* ) ) );
+ connect( m_layersListView, TQT_SIGNAL( clicked( TQListViewItem*, const TQPoint&, int ) ), this, TQT_SLOT( itemClicked( TQListViewItem*, const TQPoint&, int ) ) );
+ connect( m_layersListView, TQT_SIGNAL( rightButtonClicked( TQListViewItem*, const TQPoint&, int ) ), this, TQT_SLOT( renameItem( TQListViewItem*, const TQPoint&, int ) ) );
+ connect( m_layersListView, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( selectionChangedFromList() ) );
+ connect( m_view, TQT_SIGNAL( selectionChange() ), this, TQT_SLOT( selectionChangedFromTool() ) );
+ connect( m_buttonGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotButtonClicked( int ) ) );
+ connect( view->part()->commandHistory(), TQT_SIGNAL( commandExecuted( VCommand*) ), this, TQT_SLOT( slotCommandExecuted( VCommand* ) ) );
- layout->activate();
+ tqlayout->activate();
updateLayers();
} // VLayersTab::VLayersTab
@@ -524,14 +524,14 @@ VLayersTab::slotButtonClicked( int ID )
void
VLayersTab::resetSelection()
{
- QListViewItemIterator it( m_layersListView );
+ TQListViewItemIterator it( m_layersListView );
// iterates over all list items and deselects them manually
// to avoid the list views selectionChanged signal
for(; it.current(); ++it )
{
it.current()->setSelected( false );
- it.current()->repaint();
+ it.current()->tqrepaint();
}
}
@@ -540,7 +540,7 @@ VLayersTab::selectActiveLayer()
{
if( ! m_layers[ m_document->activeLayer() ] )
{
- QPtrVector<VLayer> vector;
+ TQPtrVector<VLayer> vector;
m_document->layers().toVector( &vector );
// find another layer to set active
for( int i = vector.count() - 1; i >= 0; i-- )
@@ -552,18 +552,18 @@ VLayersTab::selectActiveLayer()
}
// deselect all other layers
- QPtrDictIterator<VLayerListViewItem> it( m_layers );
+ TQPtrDictIterator<VLayerListViewItem> it( m_layers );
for(; it.current(); ++it )
{
it.current()->setSelected( false );
- it.current()->repaint();
+ it.current()->tqrepaint();
}
VLayerListViewItem *layerItem = m_layers[ m_document->activeLayer() ];
if( layerItem )
{
layerItem->setSelected( true );
- layerItem->repaint();
+ layerItem->tqrepaint();
kdDebug(38000) << "selecting active layer: " << layerItem->text() << endl;
}
}
@@ -584,12 +584,12 @@ VLayersTab::selectionChangedFromTool()
VObjectListViewItem *item = m_objects[ obj ];
if( ! item )
{
- VLayerListViewItem *layerItem = m_layers[ obj->parent() ];
+ VLayerListViewItem *layerItem = m_layers[ obj->tqparent() ];
if( layerItem )
updateObjects( layerItem->layer(), layerItem );
else
{
- VObjectListViewItem *objectItem = m_objects[ obj->parent() ];
+ VObjectListViewItem *objectItem = m_objects[ obj->tqparent() ];
if( objectItem )
updateObjects( objectItem->object(), objectItem );
else
@@ -606,9 +606,9 @@ VLayersTab::selectionChangedFromTool()
}
void
-VLayersTab::updateChildItems( QListViewItem *item )
+VLayersTab::updateChildItems( TQListViewItem *item )
{
- QListViewItemIterator it( item );
+ TQListViewItemIterator it( item );
// iterator points to item, so make the next item current first
for( ++it; it.current(); ++it )
@@ -620,7 +620,7 @@ VLayersTab::updateChildItems( QListViewItem *item )
updateChildItems( objectItem );
objectItem->update();
- objectItem->repaint();
+ objectItem->tqrepaint();
}
}
@@ -659,7 +659,7 @@ VLayersTab::toggleState( VObject *obj, int col )
}
void
-VLayersTab::itemClicked( QListViewItem* item, const QPoint &, int col )
+VLayersTab::itemClicked( TQListViewItem* item, const TQPoint &, int col )
{
if( item )
{
@@ -676,11 +676,11 @@ VLayersTab::itemClicked( QListViewItem* item, const QPoint &, int col )
toggleState( layerItem->layer(), col );
layerItem->update();
- layerItem->repaint();
+ layerItem->tqrepaint();
updateChildItems( layerItem );
- m_view->part()->repaintAllViews();
+ m_view->part()->tqrepaintAllViews();
}
}
else
@@ -703,12 +703,12 @@ VLayersTab::itemClicked( QListViewItem* item, const QPoint &, int col )
objectItem->setSelected( false );
objectItem->update();
- objectItem->repaint();
+ objectItem->tqrepaint();
if( dynamic_cast<VGroup*>( objectItem->object() ) )
updateChildItems( objectItem );
- m_view->part()->repaintAllViews();
+ m_view->part()->tqrepaintAllViews();
}
}
}
@@ -719,7 +719,7 @@ VLayersTab::selectionChangedFromList()
{
m_document->selection()->clear();
- QListViewItemIterator it( m_layersListView );
+ TQListViewItemIterator it( m_layersListView );
// iterate over all list items and add their corresponding object
// to the documents selection if the list item is selected and not hidden or locked or both
@@ -740,16 +740,16 @@ VLayersTab::selectionChangedFromList()
&& (state != VObject::hidden_locked) )
{
m_document->selection()->append( objectItem->object() );
- objectItem->repaint();
+ objectItem->tqrepaint();
}
}
m_view->selectionChanged();
- m_view->part()->repaintAllViews();
+ m_view->part()->tqrepaintAllViews();
}
void
-VLayersTab::renameItem( QListViewItem* item, const QPoint&, int col )
+VLayersTab::renameItem( TQListViewItem* item, const TQPoint&, int col )
{
if ( ( item ) && col == 0 )
{
@@ -759,7 +759,7 @@ VLayersTab::renameItem( QListViewItem* item, const QPoint&, int col )
{
VObjectListViewItem *objectItem = dynamic_cast< VObjectListViewItem *>( item );
VObject *obj = objectItem->object();
- QString name = KInputDialog::getText( i18n( "Current Object" ), i18n( "Change the name of the object:" ),
+ TQString name = KInputDialog::getText( i18n( "Current Object" ), i18n( "Change the name of the object:" ),
obj->name(), &ok, this );
if( ok )
{
@@ -769,7 +769,7 @@ VLayersTab::renameItem( QListViewItem* item, const QPoint&, int col )
}
else
{
- QString name = KInputDialog::getText( i18n( "Rename Layer" ), i18n( "Change the name of the current layer:" ),
+ TQString name = KInputDialog::getText( i18n( "Rename Layer" ), i18n( "Change the name of the current layer:" ),
layerItem->layer()->name(), &ok, this );
if( ok )
{
@@ -784,7 +784,7 @@ void
VLayersTab::addLayer()
{
bool ok = true;
- QString name = KInputDialog::getText( i18n( "New Layer" ), i18n( "Enter the name of the new layer:" ),
+ TQString name = KInputDialog::getText( i18n( "New Layer" ), i18n( "Enter the name of the new layer:" ),
i18n( "New layer" ), &ok, this );
if( ok )
{
@@ -801,8 +801,8 @@ void
VLayersTab::raiseItem()
{
VCommand *cmd = 0L;
- //QListViewItem *newselection = 0L;
- QListViewItemIterator it( m_layersListView );
+ //TQListViewItem *newselection = 0L;
+ TQListViewItemIterator it( m_layersListView );
if( m_document->selection()->objects().count() )
{
@@ -836,7 +836,7 @@ void
VLayersTab::lowerItem()
{
VCommand *cmd = 0L;
- QListViewItemIterator it( m_layersListView );
+ TQListViewItemIterator it( m_layersListView );
if( m_document->selection()->objects().count() )
{
@@ -869,9 +869,9 @@ void
VLayersTab::deleteItem()
{
VCommand *cmd = 0L;
- QListViewItemIterator it( m_layersListView );
+ TQListViewItemIterator it( m_layersListView );
- QPtrList<QListViewItem> deleteItems;
+ TQPtrList<TQListViewItem> deleteItems;
deleteItems.setAutoDelete( false );
// collect all selected items because they get deselected
@@ -926,7 +926,7 @@ VLayersTab::deleteItem()
if( cmd )
{
updatePreviews();
- m_view->part()->repaintAllViews();
+ m_view->part()->tqrepaintAllViews();
}
} // VLayersTab::deleteItem
@@ -942,7 +942,7 @@ VLayersTab::updateLayers()
{
removeDeletedObjectsFromList();
- QPtrVector<VLayer> vector;
+ TQPtrVector<VLayer> vector;
m_document->layers().toVector( &vector );
VLayerListViewItem* item = 0L;
for( int i = vector.count() - 1; i >= 0; i-- )
@@ -968,7 +968,7 @@ VLayersTab::updateLayers()
} // VLayersTab::updateLayers
void
-VLayersTab::updateObjects( VObject *object, QListViewItem *item )
+VLayersTab::updateObjects( VObject *object, TQListViewItem *item )
{
VObjectListIterator itr = dynamic_cast<VGroup *>( object )->objects();
@@ -982,10 +982,10 @@ VLayersTab::updateObjects( VObject *object, QListViewItem *item )
objectItem = new VObjectListViewItem( item, itr.current(), m_document, objcount, &m_objects );
objectItem->update();
}
- else if( objectItem->parent() != item )
+ else if( objectItem->tqparent() != item )
{
- // object found, but has false parent -> reparent
- objectItem->parent()->takeItem( objectItem );
+ // object found, but has false tqparent -> reparent
+ objectItem->tqparent()->takeItem( objectItem );
item->insertItem( objectItem );
}
@@ -1001,20 +1001,20 @@ VLayersTab::updateObjects( VObject *object, QListViewItem *item )
void
VLayersTab::removeDeletedObjectsFromList()
{
- QPtrDictIterator<VObjectListViewItem> it( m_objects );
+ TQPtrDictIterator<VObjectListViewItem> it( m_objects );
// iterate over all object items and delete the following items:
// - items representing deleted objects
- // - items with objects objects that changed parents
+ // - items with objects objects that changed tqparents
// BEWARE: when deleting an item, the iterator is automatically incremented
for(; it.current(); )
{
- VLayerListViewItem *layerItem = dynamic_cast<VLayerListViewItem*>( it.current()->parent() );
+ VLayerListViewItem *layerItem = dynamic_cast<VLayerListViewItem*>( it.current()->tqparent() );
if( layerItem )
{
VGroup *group = dynamic_cast<VGroup*>( layerItem->layer() );
- // check if object of item is still child of object of parent item
- if( group && ! group->objects().contains( it.current()->object() ) )
+ // check if object of item is still child of object of tqparent item
+ if( group && ! group->objects().tqcontains( it.current()->object() ) )
{
layerItem->takeItem( it.current() );
delete it.current();
@@ -1023,12 +1023,12 @@ VLayersTab::removeDeletedObjectsFromList()
}
else
{
- VObjectListViewItem *objectItem = dynamic_cast<VObjectListViewItem*>( it.current()->parent() );
+ VObjectListViewItem *objectItem = dynamic_cast<VObjectListViewItem*>( it.current()->tqparent() );
if( objectItem )
{
VGroup *group = dynamic_cast<VGroup*>( objectItem->object() );
- // check if object of item is still child of object of parent item
- if( group && ! group->objects().contains( it.current()->object() ) )
+ // check if object of item is still child of object of tqparent item
+ if( group && ! group->objects().tqcontains( it.current()->object() ) )
{
objectItem->takeItem( it.current() );
delete it.current();
@@ -1051,7 +1051,7 @@ VLayersTab::removeDeletedObjectsFromList()
++it;
}
- QPtrDictIterator<VLayerListViewItem> itr( m_layers );
+ TQPtrDictIterator<VLayerListViewItem> itr( m_layers );
// iterate over all layer items and delete the following items:
// - items representing deleted layers
@@ -1085,12 +1085,12 @@ VLayersTab::slotCommandExecuted( VCommand* command )
* History tab *
*************************************************************************/
-VHistoryGroupItem::VHistoryGroupItem( VHistoryItem* item, QListView* parent, QListViewItem* after )
- : QListViewItem( parent, after )
+VHistoryGroupItem::VHistoryGroupItem( VHistoryItem* item, TQListView* tqparent, TQListViewItem* after )
+ : TQListViewItem( tqparent, after )
{
setPixmap( 0, *item->pixmap( 0 ) );
setText( 0, item->text( 0 ) );
- parent->takeItem( item );
+ tqparent->takeItem( item );
insertItem( item );
m_key = item->key( 0, true );
} // VHistoryItem::VHistoryItem
@@ -1100,7 +1100,7 @@ VHistoryGroupItem::~VHistoryGroupItem()
} // VHistoryGroupItem::~VHistoryGroupItem
void
-VHistoryGroupItem::paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int align )
+VHistoryGroupItem::paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int align )
{
int e = 0;
int n = 0;
@@ -1117,12 +1117,12 @@ VHistoryGroupItem::paintCell( QPainter* p, const QColorGroup& cg, int column, in
{
p->fillRect( 0, 0, width, height(), cg.base() );
if ( n > 0 )
- p->fillRect( 0, 0, width, height(), QBrush( cg.base().dark( 140 ), QBrush::BDiagPattern ) );
+ p->fillRect( 0, 0, width, height(), TQBrush( cg.base().dark( 140 ), TQBrush::BDiagPattern ) );
}
else
p->fillRect( 0, 0, width, height(), cg.base().dark( 140 ) );
- const QPixmap* pixmap = this->pixmap( column );
+ const TQPixmap* pixmap = this->pixmap( column );
int xstart;
if ( pixmap )
{
@@ -1134,25 +1134,25 @@ VHistoryGroupItem::paintCell( QPainter* p, const QColorGroup& cg, int column, in
else
xstart = 4;
p->setPen( cg.text() );
- p->drawText( xstart, 0, width - xstart, height(), align | Qt::AlignVCenter, text( column ) );
+ p->drawText( xstart, 0, width - xstart, height(), align | TQt::AlignVCenter, text( column ) );
} // VHistoryGroupItem::paintCell
void
-VHistoryGroupItem::paintFocus( QPainter*, const QColorGroup&, const QRect& )
+VHistoryGroupItem::paintFocus( TQPainter*, const TQColorGroup&, const TQRect& )
{
// Do not paint any focus rectangle
// It makes the list and the selected item look messy
} // VHistoryGroupItem::paintFocus
-VHistoryItem::VHistoryItem( VCommand* command, QListView* parent, QListViewItem* after )
- : QListViewItem( parent, after ), m_command( command )
+VHistoryItem::VHistoryItem( VCommand* command, TQListView* tqparent, TQListViewItem* after )
+ : TQListViewItem( tqparent, after ), m_command( command )
{
init();
} // VHistoryItem::VHistoryItem
-VHistoryItem::VHistoryItem( VCommand* command, VHistoryGroupItem* parent, QListViewItem* after )
- : QListViewItem( parent, after ), m_command( command )
+VHistoryItem::VHistoryItem( VCommand* command, VHistoryGroupItem* tqparent, TQListViewItem* after )
+ : TQListViewItem( tqparent, after ), m_command( command )
{
init();
} // VHistoryItem::VHistoryItem
@@ -1164,7 +1164,7 @@ VHistoryItem::init()
char buffer[70];
sprintf( buffer, "%064ld", ++g_lastKey );
m_key = buffer;
- setPixmap( 0, QPixmap( KGlobal::iconLoader()->iconPath( m_command->icon(), KIcon::Small ) ) );
+ setPixmap( 0, TQPixmap( KGlobal::iconLoader()->iconPath( m_command->icon(), KIcon::Small ) ) );
setText( 0, m_command->name() );
} // VHistoryITem::init
@@ -1173,11 +1173,11 @@ VHistoryItem::~VHistoryItem()
} // VHistoryItem::~VHistoryItem
void
-VHistoryItem::paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int align )
+VHistoryItem::paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int align )
{
- p->fillRect( 0, 0, width, height(), ( m_command->success() ? cg.base() : cg.base().dark( 140 ) ) );
+ p->fillRect( 0, 0, width, height(), ( m_command->success() ? cg.base() : TQColor(cg.base().dark( 140 )) ) );
- const QPixmap* pixmap = this->pixmap( column );
+ const TQPixmap* pixmap = this->pixmap( column );
int xstart;
if ( pixmap )
{
@@ -1189,35 +1189,35 @@ VHistoryItem::paintCell( QPainter* p, const QColorGroup& cg, int column, int wid
else
xstart = 4;
p->setPen( cg.text() );
- p->drawText( xstart, 0, width - xstart, height(), align | Qt::AlignVCenter, text( column ) );
+ p->drawText( xstart, 0, width - xstart, height(), align | TQt::AlignVCenter, text( column ) );
} // VHistoryItem::paintCell
void
-VHistoryItem::paintFocus( QPainter*, const QColorGroup&, const QRect& )
+VHistoryItem::paintFocus( TQPainter*, const TQColorGroup&, const TQRect& )
{
// Do not paint any focus rectangle
// It makes the list and the selected item look messy
} // VHistoryItem::paintFocus
-VHistoryTab::VHistoryTab( KarbonPart* part, QWidget* parent )
- : QWidget( parent ), m_part( part )
+VHistoryTab::VHistoryTab( KarbonPart* part, TQWidget* tqparent )
+ : TQWidget( tqparent ), m_part( part )
{
- QVBoxLayout* layout = new QVBoxLayout( this );
- layout->setMargin( 3 );
- layout->setSpacing( 2 );
- layout->add( m_history = new QListView( this ) );
- m_history->setVScrollBarMode( QListView::AlwaysOn );
- m_history->setSelectionMode( QListView::NoSelection );
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this );
+ tqlayout->setMargin( 3 );
+ tqlayout->setSpacing( 2 );
+ tqlayout->add( m_history = new TQListView( this ) );
+ m_history->setVScrollBarMode( TQListView::AlwaysOn );
+ m_history->setSelectionMode( TQListView::NoSelection );
m_history->addColumn( i18n( "Commands" ) );
- m_history->setResizeMode( QListView::AllColumns );
+ m_history->setResizeMode( TQListView::AllColumns );
m_history->setRootIsDecorated( true );
- layout->add( m_groupCommands = new QCheckBox( i18n( "Group commands" ), this ) );
+ tqlayout->add( m_groupCommands = new TQCheckBox( i18n( "Group commands" ), this ) );
m_history->setSorting( 0, true );
VHistoryGroupItem* group = 0;
VHistoryItem* last = 0;
- QPtrVector<VCommand> cmds;
+ TQPtrVector<VCommand> cmds;
part->commandHistory()->commands()->toVector( &cmds );
int c = cmds.count();
for ( int i = 0; i < c; i++ )
@@ -1225,7 +1225,7 @@ VHistoryTab::VHistoryTab( KarbonPart* part, QWidget* parent )
if ( ( i > 0 ) && ( cmds[ i ]->name() == cmds[ i - 1 ]->name() ) )
if ( group )
{
- QListViewItem* prev = group->firstChild();
+ TQListViewItem* prev = group->firstChild();
while ( prev && prev->nextSibling() )
prev = prev->nextSibling();
new VHistoryItem( cmds[ i ], group, prev );
@@ -1243,17 +1243,17 @@ VHistoryTab::VHistoryTab( KarbonPart* part, QWidget* parent )
}
m_history->sort();
- connect( m_history, SIGNAL( mouseButtonClicked( int, QListViewItem*, const QPoint&, int ) ), this, SLOT( commandClicked( int, QListViewItem*, const QPoint&, int ) ) );
- connect( m_groupCommands, SIGNAL( stateChanged( int ) ), this, SLOT( groupingChanged( int ) ) );
- connect( part->commandHistory(), SIGNAL( historyCleared() ), this, SLOT( historyCleared() ) );
- connect( part->commandHistory(), SIGNAL( commandAdded( VCommand* ) ), this, SLOT( slotCommandAdded( VCommand* ) ) );
- connect( part->commandHistory(), SIGNAL( commandExecuted( VCommand* ) ), this, SLOT( commandExecuted( VCommand* ) ) );
- connect( part->commandHistory(), SIGNAL( firstCommandRemoved() ), this, SLOT( removeFirstCommand() ) );
- connect( part->commandHistory(), SIGNAL( lastCommandRemoved() ), this, SLOT( removeLastCommand() ) );
- connect( this, SIGNAL( undoCommand( VCommand* ) ), part->commandHistory(), SLOT( undo( VCommand* ) ) );
- connect( this, SIGNAL( redoCommand( VCommand* ) ), part->commandHistory(), SLOT( redo( VCommand* ) ) );
- connect( this, SIGNAL( undoCommandsTo( VCommand* ) ), part->commandHistory(), SLOT( undoAllTo( VCommand* ) ) );
- connect( this, SIGNAL( redoCommandsTo( VCommand* ) ), part->commandHistory(), SLOT( redoAllTo( VCommand* ) ) );
+ connect( m_history, TQT_SIGNAL( mouseButtonClicked( int, TQListViewItem*, const TQPoint&, int ) ), this, TQT_SLOT( commandClicked( int, TQListViewItem*, const TQPoint&, int ) ) );
+ connect( m_groupCommands, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( groupingChanged( int ) ) );
+ connect( part->commandHistory(), TQT_SIGNAL( historyCleared() ), this, TQT_SLOT( historyCleared() ) );
+ connect( part->commandHistory(), TQT_SIGNAL( commandAdded( VCommand* ) ), this, TQT_SLOT( slotCommandAdded( VCommand* ) ) );
+ connect( part->commandHistory(), TQT_SIGNAL( commandExecuted( VCommand* ) ), this, TQT_SLOT( commandExecuted( VCommand* ) ) );
+ connect( part->commandHistory(), TQT_SIGNAL( firstCommandRemoved() ), this, TQT_SLOT( removeFirstCommand() ) );
+ connect( part->commandHistory(), TQT_SIGNAL( lastCommandRemoved() ), this, TQT_SLOT( removeLastCommand() ) );
+ connect( this, TQT_SIGNAL( undoCommand( VCommand* ) ), part->commandHistory(), TQT_SLOT( undo( VCommand* ) ) );
+ connect( this, TQT_SIGNAL( redoCommand( VCommand* ) ), part->commandHistory(), TQT_SLOT( redo( VCommand* ) ) );
+ connect( this, TQT_SIGNAL( undoCommandsTo( VCommand* ) ), part->commandHistory(), TQT_SLOT( undoAllTo( VCommand* ) ) );
+ connect( this, TQT_SIGNAL( redoCommandsTo( VCommand* ) ), part->commandHistory(), TQT_SLOT( redoAllTo( VCommand* ) ) );
} // VHistoryTab::VHistoryTab
VHistoryTab::~VHistoryTab()
@@ -1275,13 +1275,13 @@ VHistoryTab::historyCleared()
void
VHistoryTab::commandExecuted( VCommand* command )
{
- QListViewItem* item = m_history->firstChild();
+ TQListViewItem* item = m_history->firstChild();
bool found = false;
while ( !found && item )
{
if ( item->rtti() == 1001 )
{
- QListViewItem* child = item->firstChild();
+ TQListViewItem* child = item->firstChild();
while ( !found && child )
{
found = ( ( (VHistoryItem*)child )->command() == command );
@@ -1297,9 +1297,9 @@ VHistoryTab::commandExecuted( VCommand* command )
}
if ( found )
{
- m_history->repaintItem( item );
- if ( item->parent() )
- m_history->repaintItem( item->parent() );
+ m_history->tqrepaintItem( item );
+ if ( item->tqparent() )
+ m_history->tqrepaintItem( item->tqparent() );
m_history->ensureItemVisible( item );
}
} // VHistoryTab::commandExecuted
@@ -1310,7 +1310,7 @@ VHistoryTab::slotCommandAdded( VCommand* command )
if ( !command )
return;
- QListViewItem* last = m_history->firstChild();
+ TQListViewItem* last = m_history->firstChild();
while ( last && last->nextSibling() )
last = last->nextSibling();
@@ -1320,7 +1320,7 @@ VHistoryTab::slotCommandAdded( VCommand* command )
{
if( last->rtti() == 1002 )
{
- QListViewItem* prevSibling;
+ TQListViewItem* prevSibling;
if( m_history->childCount() > 1 )
{
prevSibling = m_history->firstChild();
@@ -1331,7 +1331,7 @@ VHistoryTab::slotCommandAdded( VCommand* command )
prevSibling = m_history->firstChild();
last = new VHistoryGroupItem( (VHistoryItem*)last, m_history, prevSibling );
}
- QListViewItem* prev = last->firstChild();
+ TQListViewItem* prev = last->firstChild();
while ( prev && prev->nextSibling() )
prev = prev->nextSibling();
m_history->setCurrentItem( new VHistoryItem( command, (VHistoryGroupItem*)last, prev ) );
@@ -1370,7 +1370,7 @@ VHistoryTab::removeLastCommand()
{
if ( m_history->childCount() > 0 )
{
- QListViewItem* last = m_history->firstChild();
+ TQListViewItem* last = m_history->firstChild();
while ( last && last->nextSibling() )
last = last->nextSibling();
if ( last->rtti() == 1002 )
@@ -1392,7 +1392,7 @@ VHistoryTab::removeLastCommand()
} // VHistoryTab::removeLastCommand
void
-VHistoryTab::commandClicked( int button, QListViewItem* item, const QPoint&, int )
+VHistoryTab::commandClicked( int button, TQListViewItem* item, const TQPoint&, int )
{
if ( !item || item->rtti() == 1001 )
return;
@@ -1415,9 +1415,9 @@ VHistoryTab::groupingChanged( int )
{
if ( m_groupCommands->isChecked() && m_history->childCount() > 1 )
{
- QListViewItem* s2last = 0;
- QListViewItem* last = m_history->firstChild();
- QListViewItem* item = last->nextSibling();
+ TQListViewItem* s2last = 0;
+ TQListViewItem* last = m_history->firstChild();
+ TQListViewItem* item = last->nextSibling();
while ( item )
if ( last->text( 0 ) == item->text( 0 ) )
{
@@ -1436,11 +1436,11 @@ VHistoryTab::groupingChanged( int )
}
else
{
- QListViewItem* item = m_history->firstChild();
+ TQListViewItem* item = m_history->firstChild();
while ( item )
if ( item->rtti() == 1001 )
{
- QListViewItem* child;
+ TQListViewItem* child;
while ( ( child = item->firstChild() ) )
{
item->takeItem( child );