summaryrefslogtreecommitdiffstats
path: root/libk3b/tools/k3blistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libk3b/tools/k3blistview.cpp')
-rw-r--r--libk3b/tools/k3blistview.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/libk3b/tools/k3blistview.cpp b/libk3b/tools/k3blistview.cpp
index 552c218..8d22df8 100644
--- a/libk3b/tools/k3blistview.cpp
+++ b/libk3b/tools/k3blistview.cpp
@@ -520,7 +520,7 @@ void K3bCheckListViewItem::paintK3bCell( TQPainter* p, const TQColorGroup& cg, i
else
flags |= TQStyle::Style_Off;
- listView()->style().tqdrawPrimitive( TQStyle::PE_CheckMark, p, r, cg, flags );
+ listView()->style().drawPrimitive( TQStyle::PE_CheckMark, p, r, cg, flags );
}
}
}
@@ -552,8 +552,8 @@ K3bListView::K3bListView( TQWidget* parent, const char* name )
{
d = new Private;
- connect( header(), TQT_SIGNAL( sizeChange( int, int, int ) ),
- this, TQT_SLOT( updateEditorSize() ) );
+ connect( header(), TQ_SIGNAL( sizeChange( int, int, int ) ),
+ this, TQ_SLOT( updateEditorSize() ) );
m_editorButton = 0;
m_editorComboBox = 0;
@@ -709,8 +709,8 @@ void K3bListView::prepareButton( K3bListViewItem*, int )
{
if( !m_editorButton ) {
m_editorButton = new TQPushButton( viewport() );
- connect( m_editorButton, TQT_SIGNAL(clicked()),
- this, TQT_SLOT(slotEditorButtonClicked()) );
+ connect( m_editorButton, TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(slotEditorButtonClicked()) );
}
// TODO: do some useful things
@@ -724,8 +724,8 @@ TQWidget* K3bListView::prepareEditor( K3bListViewItem* item, int col )
case K3bListViewItem::COMBO:
if( !m_editorComboBox ) {
m_editorComboBox = new TQComboBox( viewport() );
- connect( m_editorComboBox, TQT_SIGNAL(activated(const TQString&)),
- this, TQT_SLOT(slotEditorComboBoxActivated(const TQString&)) );
+ connect( m_editorComboBox, TQ_SIGNAL(activated(const TQString&)),
+ this, TQ_SLOT(slotEditorComboBoxActivated(const TQString&)) );
m_editorComboBox->installEventFilter( this );
}
m_editorComboBox->clear();
@@ -769,9 +769,9 @@ TQWidget* K3bListView::prepareEditor( K3bListViewItem* item, int col )
case K3bListViewItem::SPIN:
if( !m_editorSpinBox ) {
m_editorSpinBox = new TQSpinBox( viewport() );
- d->spinBoxLineEdit = static_cast<TQLineEdit*>(TQT_TQWIDGET( m_editorSpinBox->child( 0, TQLINEEDIT_OBJECT_NAME_STRING ) ));
- connect( m_editorSpinBox, TQT_SIGNAL(valueChanged(int)),
- this, TQT_SLOT(slotEditorSpinBoxValueChanged(int)) );
+ d->spinBoxLineEdit = static_cast<TQLineEdit*>( m_editorSpinBox->child( 0, "TQLineEdit" ) );
+ connect( m_editorSpinBox, TQ_SIGNAL(valueChanged(int)),
+ this, TQ_SLOT(slotEditorSpinBoxValueChanged(int)) );
// m_editorSpinBox->installEventFilter( this );
d->spinBoxLineEdit->installEventFilter( this );
}
@@ -782,9 +782,9 @@ TQWidget* K3bListView::prepareEditor( K3bListViewItem* item, int col )
case K3bListViewItem::MSF:
if( !m_editorMsfEdit ) {
m_editorMsfEdit = new K3bMsfEdit( viewport() );
- d->msfEditLineEdit = static_cast<TQLineEdit*>(TQT_TQWIDGET( m_editorMsfEdit->child( 0, TQLINEEDIT_OBJECT_NAME_STRING ) ));
- connect( m_editorMsfEdit, TQT_SIGNAL(valueChanged(int)),
- this, TQT_SLOT(slotEditorMsfEditValueChanged(int)) );
+ d->msfEditLineEdit = static_cast<TQLineEdit*>( m_editorMsfEdit->child( 0, "TQLineEdit" ) );
+ connect( m_editorMsfEdit, TQ_SIGNAL(valueChanged(int)),
+ this, TQ_SLOT(slotEditorMsfEditValueChanged(int)) );
// m_editorMsfEdit->installEventFilter( this );
d->msfEditLineEdit->installEventFilter( this );
}
@@ -1015,11 +1015,11 @@ void K3bListView::slotEditorButtonClicked( K3bListViewItem* item, int col )
bool K3bListView::eventFilter( TQObject* o, TQEvent* e )
{
if( e->type() == TQEvent::KeyPress ) {
- TQKeyEvent* ke = TQT_TQKEYEVENT(e);
+ TQKeyEvent* ke = static_cast<TQKeyEvent*>(e);
if( ke->key() == Key_Tab ) {
- if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_editorLineEdit) ||
- TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(d->msfEditLineEdit) ||
- TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(d->spinBoxLineEdit) ) {
+ if( o == m_editorLineEdit ||
+ o == d->msfEditLineEdit ||
+ o == d->spinBoxLineEdit ) {
K3bListViewItem* lastEditItem = m_currentEditItem;
doRename();
@@ -1059,9 +1059,9 @@ bool K3bListView::eventFilter( TQObject* o, TQEvent* e )
}
if( ke->key() == Key_Return ||
ke->key() == Key_Enter ) {
- if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_editorLineEdit) ||
- TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(d->msfEditLineEdit) ||
- TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(d->spinBoxLineEdit) ) {
+ if( o == m_editorLineEdit ||
+ o == d->msfEditLineEdit ||
+ o == d->spinBoxLineEdit ) {
K3bListViewItem* lastEditItem = m_currentEditItem;
doRename();
@@ -1079,9 +1079,9 @@ bool K3bListView::eventFilter( TQObject* o, TQEvent* e )
}
}
else if( ke->key() == Key_Escape ) {
- if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_editorLineEdit) ||
- TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(d->msfEditLineEdit) ||
- TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(d->spinBoxLineEdit) ) {
+ if( o == m_editorLineEdit ||
+ o == d->msfEditLineEdit ||
+ o == d->spinBoxLineEdit ) {
hideEditor();
// keep the focus here
@@ -1092,12 +1092,12 @@ bool K3bListView::eventFilter( TQObject* o, TQEvent* e )
}
}
- else if( e->type() == TQEvent::MouseButtonPress && TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(viewport()) ) {
+ else if( e->type() == TQEvent::MouseButtonPress && o == viewport() ) {
// first let's grab the focus
viewport()->setFocus();
- TQMouseEvent* me = TQT_TQMOUSEEVENT( e );
+ TQMouseEvent* me = static_cast<TQMouseEvent*>( e );
TQListViewItem* item = itemAt( me->pos() );
int col = header()->sectionAt( me->pos().x() );
if( K3bCheckListViewItem* ci = dynamic_cast<K3bCheckListViewItem*>( item ) ) {
@@ -1108,7 +1108,7 @@ bool K3bListView::eventFilter( TQObject* o, TQEvent* e )
}
}
- if( me->button() == Qt::LeftButton ) {
+ if( me->button() == TQt::LeftButton ) {
if( item != m_currentEditItem || m_currentEditColumn != col ) {
doRename();
if( K3bListViewItem* k3bItem = dynamic_cast<K3bListViewItem*>(item) ) {
@@ -1138,12 +1138,12 @@ bool K3bListView::eventFilter( TQObject* o, TQEvent* e )
}
else if( e->type() == TQEvent::FocusOut ) {
- if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_editorLineEdit) ||
- TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(d->msfEditLineEdit) ||
- TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(d->spinBoxLineEdit) ||
- TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_editorComboBox) ) {
+ if( o == m_editorLineEdit ||
+ o == d->msfEditLineEdit ||
+ o == d->spinBoxLineEdit ||
+ o == m_editorComboBox ) {
// make sure we did not lose the focus to one of the edit widgets' children
- if( !tqApp->focusWidget() || TQT_BASE_OBJECT(tqApp->focusWidget()->parentWidget()) != TQT_BASE_OBJECT(o) ) {
+ if( !tqApp->focusWidget() || tqApp->focusWidget()->parentWidget() != o ) {
doRename();
hideEditor();
}
@@ -1174,7 +1174,7 @@ void K3bListView::viewportResizeEvent( TQResizeEvent* e )
if( bgPix.width() < m_backgroundPixmap.width() ||
bgPix.height() < m_backgroundPixmap.height() ) {
- TQPixmap newBgPix( m_backgroundPixmap.convertToImage().scale( bgPix.size(), TQ_ScaleMin ) );
+ TQPixmap newBgPix( m_backgroundPixmap.convertToImage().scale( bgPix.size(), TQImage::ScaleMin ) );
if( m_backgroundPixmapPosition == TOP_LEFT )
bitBlt( &bgPix, 0, 0,
&newBgPix, 0, 0,