summaryrefslogtreecommitdiffstats
path: root/krecipes/src/widgets/prepmethodlistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'krecipes/src/widgets/prepmethodlistview.cpp')
-rw-r--r--krecipes/src/widgets/prepmethodlistview.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/krecipes/src/widgets/prepmethodlistview.cpp b/krecipes/src/widgets/prepmethodlistview.cpp
index a4b148e..e267e30 100644
--- a/krecipes/src/widgets/prepmethodlistview.cpp
+++ b/krecipes/src/widgets/prepmethodlistview.cpp
@@ -21,10 +21,10 @@
#include "dialogs/createelementdialog.h"
#include "dialogs/dependanciesdialog.h"
-PrepMethodListView::PrepMethodListView( QWidget *parent, RecipeDB *db ) : DBListViewBase( parent,db,db->prepMethodCount())
+PrepMethodListView::PrepMethodListView( TQWidget *parent, RecipeDB *db ) : DBListViewBase( parent,db,db->prepMethodCount())
{
setAllColumnsShowFocus( true );
- setDefaultRenameAction( QListView::Reject );
+ setDefaultRenameAction( TQListView::Reject );
}
void PrepMethodListView::init()
@@ -52,7 +52,7 @@ void PrepMethodListView::checkCreatePrepMethod( const Element &el )
}
-StdPrepMethodListView::StdPrepMethodListView( QWidget *parent, RecipeDB *db, bool editable ) : PrepMethodListView( parent, db )
+StdPrepMethodListView::StdPrepMethodListView( TQWidget *parent, RecipeDB *db, bool editable ) : PrepMethodListView( parent, db )
{
addColumn( i18n( "Preparation Method" ) );
@@ -75,13 +75,13 @@ StdPrepMethodListView::StdPrepMethodListView( QWidget *parent, RecipeDB *db, boo
delete il;
- connect( this, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ), SLOT( showPopup( KListView *, QListViewItem *, const QPoint & ) ) );
- connect( this, SIGNAL( doubleClicked( QListViewItem* ) ), this, SLOT( modPrepMethod( QListViewItem* ) ) );
- connect( this, SIGNAL( itemRenamed( QListViewItem* ) ), this, SLOT( savePrepMethod( QListViewItem* ) ) );
+ connect( this, SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ), SLOT( showPopup( KListView *, TQListViewItem *, const TQPoint & ) ) );
+ connect( this, SIGNAL( doubleClicked( TQListViewItem* ) ), this, SLOT( modPrepMethod( TQListViewItem* ) ) );
+ connect( this, SIGNAL( itemRenamed( TQListViewItem* ) ), this, SLOT( savePrepMethod( TQListViewItem* ) ) );
}
}
-void StdPrepMethodListView::showPopup( KListView * /*l*/, QListViewItem *i, const QPoint &p )
+void StdPrepMethodListView::showPopup( KListView * /*l*/, TQListViewItem *i, const TQPoint &p )
{
if ( i )
kpop->exec( p );
@@ -91,8 +91,8 @@ void StdPrepMethodListView::createNew()
{
CreateElementDialog * elementDialog = new CreateElementDialog( this, i18n( "New Preparation Method" ) );
- if ( elementDialog->exec() == QDialog::Accepted ) {
- QString result = elementDialog->newElementName();
+ if ( elementDialog->exec() == TQDialog::Accepted ) {
+ TQString result = elementDialog->newElementName();
//check bounds first
if ( checkBounds( result ) )
@@ -103,7 +103,7 @@ void StdPrepMethodListView::createNew()
void StdPrepMethodListView::remove
()
{
- QListViewItem * item = currentItem();
+ TQListViewItem * item = currentItem();
if ( item ) {
ElementList dependingRecipes;
@@ -118,7 +118,7 @@ void StdPrepMethodListView::remove
info.name = i18n("Recipes");
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->removePrepMethod( prepMethodID );
}
}
@@ -126,7 +126,7 @@ void StdPrepMethodListView::remove
void StdPrepMethodListView::rename()
{
- QListViewItem * item = currentItem();
+ TQListViewItem * item = currentItem();
if ( item )
PrepMethodListView::rename( item, 0 );
@@ -134,22 +134,22 @@ void StdPrepMethodListView::rename()
void StdPrepMethodListView::createPrepMethod( const Element &ing )
{
- createElement(new QListViewItem( this, ing.name, QString::number( ing.id ) ));
+ createElement(new TQListViewItem( this, ing.name, TQString::number( ing.id ) ));
}
void StdPrepMethodListView::removePrepMethod( int id )
{
- QListViewItem * item = findItem( QString::number( id ), 1 );
+ TQListViewItem * item = findItem( TQString::number( id ), 1 );
removeElement(item);
}
-void StdPrepMethodListView::modPrepMethod( QListViewItem* i )
+void StdPrepMethodListView::modPrepMethod( TQListViewItem* i )
{
if ( i )
PrepMethodListView::rename( i, 0 );
}
-void StdPrepMethodListView::savePrepMethod( QListViewItem* i )
+void StdPrepMethodListView::savePrepMethod( TQListViewItem* i )
{
if ( !checkBounds( i->text( 0 ) ) ) {
reload(ForceReload); //reset the changed text
@@ -176,10 +176,10 @@ void StdPrepMethodListView::savePrepMethod( QListViewItem* i )
}
}
-bool StdPrepMethodListView::checkBounds( const QString &name )
+bool StdPrepMethodListView::checkBounds( const TQString &name )
{
if ( name.length() > uint(database->maxPrepMethodNameLength()) ) {
- KMessageBox::error( this, QString( i18n( "Preparation method cannot be longer than %1 characters." ) ).arg( database->maxPrepMethodNameLength() ) );
+ KMessageBox::error( this, TQString( i18n( "Preparation method cannot be longer than %1 characters." ) ).arg( database->maxPrepMethodNameLength() ) );
return false;
}