summaryrefslogtreecommitdiffstats
path: root/krecipes/src/widgets/headerlistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'krecipes/src/widgets/headerlistview.cpp')
-rw-r--r--krecipes/src/widgets/headerlistview.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/krecipes/src/widgets/headerlistview.cpp b/krecipes/src/widgets/headerlistview.cpp
index 3c9a379..daa72db 100644
--- a/krecipes/src/widgets/headerlistview.cpp
+++ b/krecipes/src/widgets/headerlistview.cpp
@@ -23,10 +23,10 @@
#include "dialogs/createelementdialog.h"
#include "dialogs/dependanciesdialog.h"
-HeaderListView::HeaderListView( QWidget *parent, RecipeDB *db ) : DBListViewBase( parent,db,db->unitCount() )
+HeaderListView::HeaderListView( TQWidget *parent, RecipeDB *db ) : DBListViewBase( parent,db,db->unitCount() )
{
setAllColumnsShowFocus( true );
- setDefaultRenameAction( QListView::Reject );
+ setDefaultRenameAction( TQListView::Reject );
}
void HeaderListView::init()
@@ -55,7 +55,7 @@ void HeaderListView::checkCreateHeader( const Element &el )
}
-StdHeaderListView::StdHeaderListView( QWidget *parent, RecipeDB *db, bool editable ) : HeaderListView( parent, db )
+StdHeaderListView::StdHeaderListView( TQWidget *parent, RecipeDB *db, bool editable ) : HeaderListView( parent, db )
{
addColumn( i18n( "Header" ) );
@@ -78,13 +78,13 @@ StdHeaderListView::StdHeaderListView( QWidget *parent, RecipeDB *db, bool editab
delete il;
- connect( this, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ), SLOT( showPopup( KListView *, QListViewItem *, const QPoint & ) ) );
- connect( this, SIGNAL( doubleClicked( QListViewItem*, const QPoint &, int ) ), this, SLOT( modHeader( QListViewItem*, const QPoint &, int ) ) );
- connect( this, SIGNAL( itemRenamed( QListViewItem*, const QString &, int ) ), this, SLOT( saveHeader( QListViewItem*, const QString &, int ) ) );
+ connect( this, SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ), SLOT( showPopup( KListView *, TQListViewItem *, const TQPoint & ) ) );
+ connect( this, SIGNAL( doubleClicked( TQListViewItem*, const TQPoint &, int ) ), this, SLOT( modHeader( TQListViewItem*, const TQPoint &, int ) ) );
+ connect( this, SIGNAL( itemRenamed( TQListViewItem*, const TQString &, int ) ), this, SLOT( saveHeader( TQListViewItem*, const TQString &, int ) ) );
}
}
-void StdHeaderListView::showPopup( KListView * /*l*/, QListViewItem *i, const QPoint &p )
+void StdHeaderListView::showPopup( KListView * /*l*/, TQListViewItem *i, const TQPoint &p )
{
if ( i )
kpop->exec( p );
@@ -94,8 +94,8 @@ void StdHeaderListView::createNew()
{
CreateElementDialog * headerDialog = new CreateElementDialog( this, i18n("Header") );
- if ( headerDialog->exec() == QDialog::Accepted ) {
- QString result = headerDialog->newElementName();
+ if ( headerDialog->exec() == TQDialog::Accepted ) {
+ TQString result = headerDialog->newElementName();
//check bounds first
if ( checkBounds( result ) )
@@ -107,7 +107,7 @@ void StdHeaderListView::createNew()
void StdHeaderListView::remove()
{
// Find selected header item
- QListViewItem * it = selectedItem();
+ TQListViewItem * it = selectedItem();
if ( it ) {
int headerID = it->text( 1 ).toInt();
@@ -124,7 +124,7 @@ void StdHeaderListView::remove()
DependanciesDialog warnDialog( this, info );
warnDialog.setCustomWarning( i18n("You are about to permanantly delete recipes from your database.") );
- if ( warnDialog.exec() == QDialog::Accepted )
+ if ( warnDialog.exec() == TQDialog::Accepted )
database->removeIngredientGroup( headerID );
}
}
@@ -132,7 +132,7 @@ void StdHeaderListView::remove()
void StdHeaderListView::rename()
{
- QListViewItem * item = currentItem();
+ TQListViewItem * item = currentItem();
if ( item )
HeaderListView::rename( item, 0 );
@@ -140,22 +140,22 @@ void StdHeaderListView::rename()
void StdHeaderListView::createHeader( const Element &header )
{
- createElement(new QListViewItem( this, header.name, QString::number( header.id ) ));
+ createElement(new TQListViewItem( this, header.name, TQString::number( header.id ) ));
}
void StdHeaderListView::removeHeader( int id )
{
- QListViewItem * item = findItem( QString::number( id ), 1 );
+ TQListViewItem * item = findItem( TQString::number( id ), 1 );
removeElement(item);
}
-void StdHeaderListView::modHeader( QListViewItem* i, const QPoint & /*p*/, int c )
+void StdHeaderListView::modHeader( TQListViewItem* i, const TQPoint & /*p*/, int c )
{
if ( i )
HeaderListView::rename( i, c );
}
-void StdHeaderListView::saveHeader( QListViewItem* i, const QString &text, int /*c*/ )
+void StdHeaderListView::saveHeader( TQListViewItem* i, const TQString &text, int /*c*/ )
{
if ( !checkBounds( text ) ) {
reload(ForceReload); //reset the changed text
@@ -181,10 +181,10 @@ void StdHeaderListView::saveHeader( QListViewItem* i, const QString &text, int /
}
}
-bool StdHeaderListView::checkBounds( const QString &header )
+bool StdHeaderListView::checkBounds( const TQString &header )
{
if ( header.length() > uint(database->maxIngGroupNameLength()) ) {
- KMessageBox::error( this, QString( i18n( "Header cannot be longer than %1 characters." ) ).arg( database->maxIngGroupNameLength() ) );
+ KMessageBox::error( this, TQString( i18n( "Header cannot be longer than %1 characters." ) ).arg( database->maxIngGroupNameLength() ) );
return false;
}
else if ( header.stripWhiteSpace().isEmpty() )