summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/listvieweditorimpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/designer/listvieweditorimpl.cpp')
-rw-r--r--kdevdesigner/designer/listvieweditorimpl.cpp164
1 files changed, 82 insertions, 82 deletions
diff --git a/kdevdesigner/designer/listvieweditorimpl.cpp b/kdevdesigner/designer/listvieweditorimpl.cpp
index c5ec7498..69a99dfe 100644
--- a/kdevdesigner/designer/listvieweditorimpl.cpp
+++ b/kdevdesigner/designer/listvieweditorimpl.cpp
@@ -47,13 +47,13 @@
#include <tdelocale.h>
ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw )
- : ListViewEditorBase( parent, 0, TRUE ), listview( lv ), formwindow( fw )
+ : ListViewEditorBase( parent, 0, true ), listview( lv ), formwindow( fw )
{
- connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
- itemText->setEnabled( FALSE );
- itemChoosePixmap->setEnabled( FALSE );
- itemDeletePixmap->setEnabled( FALSE );
- itemColumn->setEnabled( FALSE );
+ connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
+ itemText->setEnabled( false );
+ itemChoosePixmap->setEnabled( false );
+ itemDeletePixmap->setEnabled( false );
+ itemColumn->setEnabled( false );
setupColumns();
PopulateListViewCommand::transferItems( listview, itemsPreview );
@@ -65,61 +65,61 @@ ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw
if ( itemsPreview->firstChild() ) {
itemsPreview->setCurrentItem( itemsPreview->firstChild() );
- itemsPreview->setSelected( itemsPreview->firstChild(), TRUE );
+ itemsPreview->setSelected( itemsPreview->firstChild(), true );
}
// Clamp on drag and drop to TQListView
ListViewDnd *itemsDnd = new ListViewDnd( itemsPreview );
itemsDnd->setDragMode( ListViewDnd::Internal | ListViewDnd::Move );
- TQObject::connect( itemsDnd, TQT_SIGNAL( dropped( TQListViewItem * ) ),
- itemsDnd, TQT_SLOT( confirmDrop( TQListViewItem * ) ) );
+ TQObject::connect( itemsDnd, TQ_SIGNAL( dropped( TQListViewItem * ) ),
+ itemsDnd, TQ_SLOT( confirmDrop( TQListViewItem * ) ) );
// Enable rename for all TQListViewItems
TQListViewItemIterator it = ((TQListView *)itemsPreview)->firstChild();
for ( ; *it; it++ )
- (*it)->setRenameEnabled( 0, TRUE );
+ (*it)->setRenameEnabled( 0, true );
// Connect listview signal to signal-relay
TQObject::connect( itemsPreview,
- TQT_SIGNAL( itemRenamed( TQListViewItem*, int, const TQString & ) ),
+ TQ_SIGNAL( itemRenamed( TQListViewItem*, int, const TQString & ) ),
this,
- TQT_SLOT( emitItemRenamed(TQListViewItem*, int, const TQString&) ) );
+ TQ_SLOT( emitItemRenamed(TQListViewItem*, int, const TQString&) ) );
// Connect signal-relay to TQLineEdit "itemText"
- TQObjectList *l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "itemText" );
+ TQObjectList *l = parent->queryList( "TQLineEdit", "itemText" );
TQObject *obj;
TQObjectListIt itemsLineEditIt( *l );
while ( (obj = itemsLineEditIt.current()) != 0 ) {
++itemsLineEditIt;
TQObject::connect( this,
- TQT_SIGNAL( itemRenamed( const TQString & ) ),
+ TQ_SIGNAL( itemRenamed( const TQString & ) ),
obj,
- TQT_SLOT( setText( const TQString & ) ) );
+ TQ_SLOT( setText( const TQString & ) ) );
}
delete l;
// Clamp on drag and drop to TQListBox
ListBoxDnd *columnsDnd = new ListBoxDnd( colPreview );
columnsDnd->setDragMode( ListBoxDnd::Internal | ListBoxDnd::Move );
- TQObject::connect( columnsDnd, TQT_SIGNAL( dropped( TQListBoxItem * ) ),
- columnsDnd, TQT_SLOT( confirmDrop( TQListBoxItem * ) ) );
+ TQObject::connect( columnsDnd, TQ_SIGNAL( dropped( TQListBoxItem * ) ),
+ columnsDnd, TQ_SLOT( confirmDrop( TQListBoxItem * ) ) );
// Clamp on rename to TQListBox
ListBoxRename *columnsRename = new ListBoxRename( colPreview );
TQObject::connect( columnsRename,
- TQT_SIGNAL( itemTextChanged( const TQString & ) ),
+ TQ_SIGNAL( itemTextChanged( const TQString & ) ),
this,
- TQT_SLOT( columnTextChanged( const TQString & ) ) );
+ TQ_SLOT( columnTextChanged( const TQString & ) ) );
// Find TQLineEdit "colText" and connect
- l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "colText" );
+ l = parent->queryList( "TQLineEdit", "colText" );
TQObjectListIt columnsLineEditIt( *l );
while ( (obj = columnsLineEditIt.current()) != 0 ) {
++columnsLineEditIt;
TQObject::connect( columnsRename,
- TQT_SIGNAL( itemTextChanged( const TQString & ) ),
+ TQ_SIGNAL( itemTextChanged( const TQString & ) ),
obj,
- TQT_SLOT( setText( const TQString & ) ) );
+ TQ_SLOT( setText( const TQString & ) ) );
}
delete l;
}
@@ -161,7 +161,7 @@ void ListViewEditor::columnDownClicked()
colPreview->insertItem( i, below );
colPreview->setCurrentItem( i );
- colPreview->setSelected( i, TRUE );
+ colPreview->setSelected( i, true );
}
void ListViewEditor::columnPixmapChosen()
@@ -180,15 +180,15 @@ void ListViewEditor::columnPixmapChosen()
return;
c->pixmap = pix;
- colPreview->blockSignals( TRUE );
+ colPreview->blockSignals( true );
if ( !c->pixmap.isNull() )
colPreview->changeItem( c->pixmap, c->text, colPreview->index( c->item ) );
else
colPreview->changeItem( c->text, colPreview->index( c->item ) );
c->item = colPreview->item( colPreview->currentItem() );
colPixmap->setPixmap( c->pixmap );
- colPreview->blockSignals( FALSE );
- colDeletePixmap->setEnabled( TRUE );
+ colPreview->blockSignals( false );
+ colDeletePixmap->setEnabled( true );
}
void ListViewEditor::columnPixmapDeleted()
@@ -198,15 +198,15 @@ void ListViewEditor::columnPixmapDeleted()
return;
c->pixmap = TQPixmap();
- colPreview->blockSignals( TRUE );
+ colPreview->blockSignals( true );
if ( !c->pixmap.isNull() )
colPreview->changeItem( c->pixmap, c->text, colPreview->index( c->item ) );
else
colPreview->changeItem( c->text, colPreview->index( c->item ) );
c->item = colPreview->item( colPreview->currentItem() );
colPixmap->setText( "" );
- colPreview->blockSignals( FALSE );
- colDeletePixmap->setEnabled( FALSE );
+ colPreview->blockSignals( false );
+ colDeletePixmap->setEnabled( false );
}
void ListViewEditor::columnResizable( bool b )
@@ -224,13 +224,13 @@ void ListViewEditor::columnTextChanged( const TQString &txt )
return;
c->text = txt;
- colPreview->blockSignals( TRUE );
+ colPreview->blockSignals( true );
if ( !c->pixmap.isNull() )
colPreview->changeItem( c->pixmap, c->text, colPreview->index( c->item ) );
else
colPreview->changeItem( c->text, colPreview->index( c->item ) );
c->item = colPreview->item( colPreview->currentItem() );
- colPreview->blockSignals( FALSE );
+ colPreview->blockSignals( false );
}
void ListViewEditor::columnUpClicked()
@@ -246,33 +246,33 @@ void ListViewEditor::columnUpClicked()
colPreview->insertItem( above, i );
colPreview->setCurrentItem( i );
- colPreview->setSelected( i, TRUE );
+ colPreview->setSelected( i, true );
}
void ListViewEditor::currentColumnChanged( TQListBoxItem *i )
{
Column *c = findColumn( i );
if ( !i || !c ) {
- colText->setEnabled( FALSE );
- colPixmap->setEnabled( FALSE );
- colDeletePixmap->setEnabled( FALSE );
- colText->blockSignals( TRUE );
+ colText->setEnabled( false );
+ colPixmap->setEnabled( false );
+ colDeletePixmap->setEnabled( false );
+ colText->blockSignals( true );
colText->setText( "" );
- colText->blockSignals( FALSE );
- colClickable->setEnabled( FALSE );
- colResizable->setEnabled( FALSE );
+ colText->blockSignals( false );
+ colClickable->setEnabled( false );
+ colResizable->setEnabled( false );
return;
}
- colText->setEnabled( TRUE );
- colPixmap->setEnabled( TRUE );
+ colText->setEnabled( true );
+ colPixmap->setEnabled( true );
colDeletePixmap->setEnabled( i->pixmap() && !i->pixmap()->isNull() );
- colClickable->setEnabled( TRUE );
- colResizable->setEnabled( TRUE );
+ colClickable->setEnabled( true );
+ colResizable->setEnabled( true );
- colText->blockSignals( TRUE );
+ colText->blockSignals( true );
colText->setText( c->text );
- colText->blockSignals( FALSE );
+ colText->blockSignals( false );
if ( !c->pixmap.isNull() )
colPixmap->setPixmap( c->pixmap );
else
@@ -286,15 +286,15 @@ void ListViewEditor::newColumnClicked()
Column col;
col.text = i18n( "New Column" );
col.pixmap = TQPixmap();
- col.clickable = TRUE;
- col.resizable = TRUE;
+ col.clickable = true;
+ col.resizable = true;
if ( !col.pixmap.isNull() )
col.item = new TQListBoxPixmap( colPreview, col.pixmap, col.text );
else
col.item = new TQListBoxText( colPreview, col.text );
columns.append( col );
colPreview->setCurrentItem( col.item );
- colPreview->setSelected( col.item, TRUE );
+ colPreview->setSelected( col.item, true );
}
void ListViewEditor::deleteColumnClicked()
@@ -312,40 +312,40 @@ void ListViewEditor::deleteColumnClicked()
}
if ( colPreview->currentItem() != -1 )
- colPreview->setSelected( colPreview->currentItem(), TRUE );
+ colPreview->setSelected( colPreview->currentItem(), true );
}
void ListViewEditor::currentItemChanged( TQListViewItem *i )
{
if ( !i ) {
- itemText->setEnabled( FALSE );
- itemChoosePixmap->setEnabled( FALSE );
- itemDeletePixmap->setEnabled( FALSE );
- itemColumn->setEnabled( FALSE );
+ itemText->setEnabled( false );
+ itemChoosePixmap->setEnabled( false );
+ itemDeletePixmap->setEnabled( false );
+ itemColumn->setEnabled( false );
return;
}
- itemText->setEnabled( TRUE );
- itemChoosePixmap->setEnabled( TRUE );
+ itemText->setEnabled( true );
+ itemChoosePixmap->setEnabled( true );
itemDeletePixmap->setEnabled( i->pixmap( itemColumn->value() ) &&
!i->pixmap( itemColumn->value() )->isNull() );
- itemColumn->setEnabled( TRUE );
+ itemColumn->setEnabled( true );
displayItem( i, itemColumn->value() );
}
void ListViewEditor::displayItem( TQListViewItem *i, int col )
{
- itemText->blockSignals( TRUE );
+ itemText->blockSignals( true );
itemText->setText( i->text( col ) );
- itemText->blockSignals( FALSE );
+ itemText->blockSignals( false );
- itemPixmap->blockSignals( TRUE );
+ itemPixmap->blockSignals( true );
if ( i->pixmap( col ) )
itemPixmap->setPixmap( *i->pixmap( col ) );
else
itemPixmap->setText( "" );
- itemPixmap->blockSignals( FALSE );
+ itemPixmap->blockSignals( false );
}
void ListViewEditor::itemColChanged( int col )
@@ -367,7 +367,7 @@ void ListViewEditor::itemDeleteClicked()
delete i;
if ( itemsPreview->firstChild() ) {
itemsPreview->setCurrentItem( itemsPreview->firstChild() );
- itemsPreview->setSelected( itemsPreview->firstChild(), TRUE );
+ itemsPreview->setSelected( itemsPreview->firstChild(), true );
}
}
@@ -397,9 +397,9 @@ void ListViewEditor::itemNewClicked()
{
TQListViewItem *item = new TQListViewItem( itemsPreview );
item->setText( 0, i18n( "Item" ) );
- item->setRenameEnabled( 0, TRUE );
+ item->setRenameEnabled( 0, true );
itemsPreview->setCurrentItem( item );
- itemsPreview->setSelected( item, TRUE );
+ itemsPreview->setSelected( item, true );
itemText->setFocus();
itemText->selectAll();
}
@@ -410,14 +410,14 @@ void ListViewEditor::itemNewSubClicked()
TQListViewItem *item = 0;
if ( parent ) {
item = new TQListViewItem( parent );
- parent->setOpen( TRUE );
+ parent->setOpen( true );
} else {
item = new TQListViewItem( itemsPreview );
}
item->setText( 0, i18n( "Subitem" ) );
- item->setRenameEnabled( 0, TRUE );
+ item->setRenameEnabled( 0, true );
itemsPreview->setCurrentItem( item );
- itemsPreview->setSelected( item, TRUE );
+ itemsPreview->setSelected( item, true );
}
void ListViewEditor::itemPixmapChoosen()
@@ -437,7 +437,7 @@ void ListViewEditor::itemPixmapChoosen()
i->setPixmap( itemColumn->value(), TQPixmap( pix ) );
itemPixmap->setPixmap( pix );
- itemDeletePixmap->setEnabled( TRUE );
+ itemDeletePixmap->setEnabled( true );
}
void ListViewEditor::itemPixmapDeleted()
@@ -448,7 +448,7 @@ void ListViewEditor::itemPixmapDeleted()
i->setPixmap( itemColumn->value(), TQPixmap() );
itemPixmap->setText( "" );
- itemDeletePixmap->setEnabled( FALSE );
+ itemDeletePixmap->setEnabled( false );
}
void ListViewEditor::itemTextChanged( const TQString &txt )
@@ -518,7 +518,7 @@ void ListViewEditor::itemRightClicked()
}
itemsPreview->setCurrentItem( other );
- itemsPreview->setSelected( other, TRUE );
+ itemsPreview->setSelected( other, true );
}
void ListViewEditor::itemLeftClicked()
@@ -558,7 +558,7 @@ void ListViewEditor::itemLeftClicked()
}
itemsPreview->setCurrentItem( other );
- itemsPreview->setSelected( other, TRUE );
+ itemsPreview->setSelected( other, true );
}
void ListViewEditor::setupColumns()
@@ -579,10 +579,10 @@ void ListViewEditor::setupColumns()
columns.append( col );
}
- colText->setEnabled( FALSE );
- colPixmap->setEnabled( FALSE );
- colClickable->setEnabled( FALSE );
- colResizable->setEnabled( FALSE );
+ colText->setEnabled( false );
+ colPixmap->setEnabled( false );
+ colClickable->setEnabled( false );
+ colResizable->setEnabled( false );
if ( colPreview->firstItem() )
colPreview->setCurrentItem( colPreview->firstItem() );
@@ -631,15 +631,15 @@ void ListViewEditor::initTabPage( const TQString &page )
if ( page == i18n( "&Items" ) ) {
setupItems();
if ( numColumns == 0 ) {
- itemNew->setEnabled( FALSE );
- itemNewSub->setEnabled( FALSE );
- itemText->setEnabled( FALSE );
- itemChoosePixmap->setEnabled( FALSE );
- itemDeletePixmap->setEnabled( FALSE );
- itemColumn->setEnabled( FALSE );
+ itemNew->setEnabled( false );
+ itemNewSub->setEnabled( false );
+ itemText->setEnabled( false );
+ itemChoosePixmap->setEnabled( false );
+ itemDeletePixmap->setEnabled( false );
+ itemColumn->setEnabled( false );
} else {
- itemNew->setEnabled( TRUE );
- itemNewSub->setEnabled( TRUE );
+ itemNew->setEnabled( true );
+ itemNewSub->setEnabled( true );
}
}
}