summaryrefslogtreecommitdiffstats
path: root/krecipes/src/pref.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'krecipes/src/pref.cpp')
-rw-r--r--krecipes/src/pref.cpp330
1 files changed, 165 insertions, 165 deletions
diff --git a/krecipes/src/pref.cpp b/krecipes/src/pref.cpp
index 329e0e9..218868c 100644
--- a/krecipes/src/pref.cpp
+++ b/krecipes/src/pref.cpp
@@ -18,17 +18,17 @@
#include "config.h"
#endif
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qhbox.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qframe.h>
-#include <qcombobox.h>
+#include <ntqlayout.h>
+#include <ntqlabel.h>
+#include <ntqhbox.h>
+#include <ntqbuttongroup.h>
+#include <ntqcheckbox.h>
+#include <ntqradiobutton.h>
+#include <ntqpushbutton.h>
+#include <ntqtooltip.h>
+#include <ntqwhatsthis.h>
+#include <ntqframe.h>
+#include <ntqcombobox.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -41,41 +41,41 @@
#include <kurlrequester.h>
#include <kdebug.h>
-KrecipesPreferences::KrecipesPreferences( QWidget *parent )
+KrecipesPreferences::KrecipesPreferences( TQWidget *parent )
: KDialogBase( IconList, i18n( "Krecipes Preferences" ),
Help | Ok | Cancel, Ok, parent )
{
// this is the base class for your preferences dialog. it is now
// a TreeList dialog.. but there are a number of other
// possibilities (including Tab, Swallow, and just Plain)
- QFrame * frame;
+ TQFrame * frame;
KConfig *config = KGlobal::config();
config->setGroup( "DBType" );
KIconLoader il;
frame = addPage( i18n( "Server Settings" ),
- QString( i18n( "Database Server Options (%1)" ) ).arg( config->readEntry( "Type" ) ),
+ TQString( i18n( "Database Server Options (%1)" ) ).arg( config->readEntry( "Type" ) ),
il.loadIcon( "network_local", KIcon::NoGroup, 32 ) );
- QHBoxLayout* layout = new QHBoxLayout( frame );
+ TQHBoxLayout* layout = new TQHBoxLayout( frame );
m_pageServer = new ServerPrefs( frame );
layout->addWidget( m_pageServer );
m_helpMap.insert(0,"configure-server-settings");
frame = addPage( i18n( "Formatting" ), i18n( "Customize Formatting" ), il.loadIcon( "math_frac", KIcon::NoGroup, 32 ) );
- QHBoxLayout* formatting_layout = new QHBoxLayout( frame );
+ TQHBoxLayout* formatting_layout = new TQHBoxLayout( frame );
m_pageNumbers = new NumbersPrefs( frame );
formatting_layout->addWidget( m_pageNumbers );
m_helpMap.insert(1,"custom-formatting");
frame = addPage( i18n( "Import/Export" ), i18n( "Recipe Import and Export Options" ), il.loadIcon( "down", KIcon::NoGroup, 32 ) );
- QHBoxLayout* import_layout = new QHBoxLayout( frame );
+ TQHBoxLayout* import_layout = new TQHBoxLayout( frame );
m_pageImport = new ImportPrefs( frame );
import_layout->addWidget( m_pageImport );
m_helpMap.insert(2,"import-export-preference");
frame = addPage( i18n( "Performance" ), i18n( "Performance Options" ), il.loadIcon( "launch", KIcon::NoGroup, 32 ) );
- QHBoxLayout* performance_layout = new QHBoxLayout( frame );
+ TQHBoxLayout* performance_layout = new TQHBoxLayout( frame );
m_pagePerformance = new PerformancePrefs( frame );
performance_layout->addWidget( m_pagePerformance );
m_helpMap.insert(3,"configure-performance");
@@ -91,105 +91,105 @@ void KrecipesPreferences::slotHelp()
}
-MySQLServerPrefs::MySQLServerPrefs( QWidget *parent ) : QWidget( parent )
+MySQLServerPrefs::MySQLServerPrefs( TQWidget *parent ) : TQWidget( parent )
{
- QGridLayout * layout = new QGridLayout( this, 1, 1, 0, 0 );
+ TQGridLayout * layout = new TQGridLayout( this, 1, 1, 0, 0 );
layout->setSpacing( KDialog::spacingHint() );
layout->setMargin( 0 );
- QSpacerItem* spacerTop = new QSpacerItem( 10, 10, QSizePolicy::Minimum, QSizePolicy::Fixed );
+ TQSpacerItem* spacerTop = new TQSpacerItem( 10, 10, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
layout->addItem( spacerTop, 0, 1 );
- QSpacerItem* spacerLeft = new QSpacerItem( 10, 10, QSizePolicy::Fixed, QSizePolicy::Minimum );
+ TQSpacerItem* spacerLeft = new TQSpacerItem( 10, 10, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
layout->addItem( spacerLeft, 1, 0 );
- QLabel* serverText = new QLabel( i18n( "Server:" ), this );
- serverText->setFixedSize( QSize( 100, 20 ) );
- serverText->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ TQLabel* serverText = new TQLabel( i18n( "Server:" ), this );
+ serverText->setFixedSize( TQSize( 100, 20 ) );
+ serverText->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
layout->addWidget( serverText, 1, 1 );
serverEdit = new KLineEdit( this );
- serverEdit->setFixedSize( QSize( 120, 20 ) );
- serverEdit->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ serverEdit->setFixedSize( TQSize( 120, 20 ) );
+ serverEdit->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
layout->addWidget( serverEdit, 1, 2 );
- QSpacerItem* spacerRow1 = new QSpacerItem( 10, 10, QSizePolicy::Minimum, QSizePolicy::Fixed );
+ TQSpacerItem* spacerRow1 = new TQSpacerItem( 10, 10, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
layout->addItem( spacerRow1, 2, 1 );
- QLabel* usernameText = new QLabel( i18n( "Username:" ), this );
- usernameText->setFixedSize( QSize( 100, 20 ) );
- usernameText->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ TQLabel* usernameText = new TQLabel( i18n( "Username:" ), this );
+ usernameText->setFixedSize( TQSize( 100, 20 ) );
+ usernameText->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
layout->addWidget( usernameText, 3, 1 );
usernameEdit = new KLineEdit( this );
- usernameEdit->setFixedSize( QSize( 120, 20 ) );
- usernameEdit->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ usernameEdit->setFixedSize( TQSize( 120, 20 ) );
+ usernameEdit->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
layout->addWidget( usernameEdit, 3, 2 );
- QSpacerItem* spacerRow2 = new QSpacerItem( 10, 10, QSizePolicy::Minimum, QSizePolicy::Fixed );
+ TQSpacerItem* spacerRow2 = new TQSpacerItem( 10, 10, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
layout->addItem( spacerRow2, 4, 1 );
- QLabel* passwordText = new QLabel( i18n( "Password:" ), this );
- passwordText->setFixedSize( QSize( 100, 20 ) );
- passwordText->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ TQLabel* passwordText = new TQLabel( i18n( "Password:" ), this );
+ passwordText->setFixedSize( TQSize( 100, 20 ) );
+ passwordText->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
layout->addWidget( passwordText, 5, 1 );
passwordEdit = new KLineEdit( this );
- passwordEdit->setFixedSize( QSize( 120, 20 ) );
- passwordEdit->setEchoMode( QLineEdit::Password );
- passwordEdit->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ passwordEdit->setFixedSize( TQSize( 120, 20 ) );
+ passwordEdit->setEchoMode( TQLineEdit::Password );
+ passwordEdit->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
layout->addWidget( passwordEdit, 5, 2 );
- QSpacerItem* spacerRow3 = new QSpacerItem( 10, 10, QSizePolicy::Minimum, QSizePolicy::Fixed );
+ TQSpacerItem* spacerRow3 = new TQSpacerItem( 10, 10, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
layout->addItem( spacerRow3, 6, 1 );
- QLabel* portText = new QLabel( i18n( "Port:" ), this );
- portText->setFixedSize( QSize( 100, 20 ) );
- portText->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ TQLabel* portText = new TQLabel( i18n( "Port:" ), this );
+ portText->setFixedSize( TQSize( 100, 20 ) );
+ portText->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
layout->addWidget( portText, 7, 1 );
portEdit = new KIntNumInput( this );
portEdit->setMinValue(0);
portEdit->setSpecialValueText( i18n("Default") );
- portEdit->setFixedSize( QSize( 120, 20 ) );
- portEdit->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ portEdit->setFixedSize( TQSize( 120, 20 ) );
+ portEdit->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
layout->addWidget( portEdit, 7, 2 );
- QSpacerItem* spacerRow4 = new QSpacerItem( 10, 10, QSizePolicy::Minimum, QSizePolicy::Fixed );
+ TQSpacerItem* spacerRow4 = new TQSpacerItem( 10, 10, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
layout->addItem( spacerRow4, 8, 1 );
- QLabel* dbNameText = new QLabel( i18n( "Database name:" ), this );
- dbNameText->setFixedSize( QSize( 100, 20 ) );
- dbNameText->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ TQLabel* dbNameText = new TQLabel( i18n( "Database name:" ), this );
+ dbNameText->setFixedSize( TQSize( 100, 20 ) );
+ dbNameText->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
layout->addWidget( dbNameText, 9, 1 );
dbNameEdit = new KLineEdit( this );
- dbNameEdit->setFixedSize( QSize( 120, 20 ) );
- dbNameEdit->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ dbNameEdit->setFixedSize( TQSize( 120, 20 ) );
+ dbNameEdit->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
layout->addWidget( dbNameEdit, 9, 2 );
- QSpacerItem* spacerRow5 = new QSpacerItem( 10, 10, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding );
+ TQSpacerItem* spacerRow5 = new TQSpacerItem( 10, 10, TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding );
layout->addItem( spacerRow5, 10, 1 );
// Backup options
- QGroupBox *backupGBox = new QGroupBox( this, "backupGBox" );
+ TQGroupBox *backupGBox = new TQGroupBox( this, "backupGBox" );
backupGBox->setTitle( i18n( "Backup" ) );
backupGBox->setColumns( 2 );
layout->addMultiCellWidget( backupGBox, 10, 10, 1, 4 );
- QLabel *dumpPathLabel = new QLabel( backupGBox );
- dumpPathLabel->setText( QString(i18n( "Path to '%1':" )).arg("mysqldump") );
+ TQLabel *dumpPathLabel = new TQLabel( backupGBox );
+ dumpPathLabel->setText( TQString(i18n( "Path to '%1':" )).arg("mysqldump") );
dumpPathRequester = new KURLRequester( backupGBox );
dumpPathRequester->setFilter( "mysqldump" );
- QLabel *mysqlPathLabel = new QLabel( backupGBox );
- mysqlPathLabel->setText( QString(i18n( "Path to '%1':" )).arg("mysql") );
+ TQLabel *mysqlPathLabel = new TQLabel( backupGBox );
+ mysqlPathLabel->setText( TQString(i18n( "Path to '%1':" )).arg("mysql") );
mysqlPathRequester = new KURLRequester( backupGBox );
mysqlPathRequester->setFilter( "mysql" );
- QSpacerItem* spacerRow6 = new QSpacerItem( 10, 10, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding );
+ TQSpacerItem* spacerRow6 = new TQSpacerItem( 10, 10, TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding );
layout->addItem( spacerRow6, 11, 1 );
- QSpacerItem* spacerRight = new QSpacerItem( 10, 10, QSizePolicy::MinimumExpanding, QSizePolicy::Fixed );
+ TQSpacerItem* spacerRight = new TQSpacerItem( 10, 10, TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed );
layout->addItem( spacerRight, 1, 4 );
// Load & Save Current Settings
@@ -218,105 +218,105 @@ void MySQLServerPrefs::saveOptions( void )
}
-PostgreSQLServerPrefs::PostgreSQLServerPrefs( QWidget *parent ) : QWidget( parent )
+PostgreSQLServerPrefs::PostgreSQLServerPrefs( TQWidget *parent ) : TQWidget( parent )
{
- QGridLayout * layout = new QGridLayout( this, 1, 1, 0, 0 );
+ TQGridLayout * layout = new TQGridLayout( this, 1, 1, 0, 0 );
layout->setSpacing( KDialog::spacingHint() );
layout->setMargin( 0 );
- QSpacerItem* spacerTop = new QSpacerItem( 10, 10, QSizePolicy::Minimum, QSizePolicy::Fixed );
+ TQSpacerItem* spacerTop = new TQSpacerItem( 10, 10, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
layout->addItem( spacerTop, 0, 1 );
- QSpacerItem* spacerLeft = new QSpacerItem( 10, 10, QSizePolicy::Fixed, QSizePolicy::Minimum );
+ TQSpacerItem* spacerLeft = new TQSpacerItem( 10, 10, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
layout->addItem( spacerLeft, 1, 0 );
- QLabel* serverText = new QLabel( i18n( "Server:" ), this );
- serverText->setFixedSize( QSize( 100, 20 ) );
- serverText->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ TQLabel* serverText = new TQLabel( i18n( "Server:" ), this );
+ serverText->setFixedSize( TQSize( 100, 20 ) );
+ serverText->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
layout->addWidget( serverText, 1, 1 );
serverEdit = new KLineEdit( this );
- serverEdit->setFixedSize( QSize( 120, 20 ) );
- serverEdit->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ serverEdit->setFixedSize( TQSize( 120, 20 ) );
+ serverEdit->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
layout->addWidget( serverEdit, 1, 2 );
- QSpacerItem* spacerRow1 = new QSpacerItem( 10, 10, QSizePolicy::Minimum, QSizePolicy::Fixed );
+ TQSpacerItem* spacerRow1 = new TQSpacerItem( 10, 10, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
layout->addItem( spacerRow1, 2, 1 );
- QLabel* usernameText = new QLabel( i18n( "Username:" ), this );
- usernameText->setFixedSize( QSize( 100, 20 ) );
- usernameText->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ TQLabel* usernameText = new TQLabel( i18n( "Username:" ), this );
+ usernameText->setFixedSize( TQSize( 100, 20 ) );
+ usernameText->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
layout->addWidget( usernameText, 3, 1 );
usernameEdit = new KLineEdit( this );
- usernameEdit->setFixedSize( QSize( 120, 20 ) );
- usernameEdit->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ usernameEdit->setFixedSize( TQSize( 120, 20 ) );
+ usernameEdit->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
layout->addWidget( usernameEdit, 3, 2 );
- QSpacerItem* spacerRow2 = new QSpacerItem( 10, 10, QSizePolicy::Minimum, QSizePolicy::Fixed );
+ TQSpacerItem* spacerRow2 = new TQSpacerItem( 10, 10, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
layout->addItem( spacerRow2, 4, 1 );
- QLabel* passwordText = new QLabel( i18n( "Password:" ), this );
- passwordText->setFixedSize( QSize( 100, 20 ) );
- passwordText->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ TQLabel* passwordText = new TQLabel( i18n( "Password:" ), this );
+ passwordText->setFixedSize( TQSize( 100, 20 ) );
+ passwordText->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
layout->addWidget( passwordText, 5, 1 );
passwordEdit = new KLineEdit( this );
- passwordEdit->setFixedSize( QSize( 120, 20 ) );
- passwordEdit->setEchoMode( QLineEdit::Password );
- passwordEdit->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ passwordEdit->setFixedSize( TQSize( 120, 20 ) );
+ passwordEdit->setEchoMode( TQLineEdit::Password );
+ passwordEdit->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
layout->addWidget( passwordEdit, 5, 2 );
- QSpacerItem* spacerRow3 = new QSpacerItem( 10, 10, QSizePolicy::Minimum, QSizePolicy::Fixed );
+ TQSpacerItem* spacerRow3 = new TQSpacerItem( 10, 10, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
layout->addItem( spacerRow3, 6, 1 );
- QLabel* portText = new QLabel( i18n( "Port:" ), this );
- portText->setFixedSize( QSize( 100, 20 ) );
- portText->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ TQLabel* portText = new TQLabel( i18n( "Port:" ), this );
+ portText->setFixedSize( TQSize( 100, 20 ) );
+ portText->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
layout->addWidget( portText, 7, 1 );
portEdit = new KIntNumInput( this );
portEdit->setMinValue(0);
portEdit->setSpecialValueText( i18n("Default") );
- portEdit->setFixedSize( QSize( 120, 20 ) );
- portEdit->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ portEdit->setFixedSize( TQSize( 120, 20 ) );
+ portEdit->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
layout->addWidget( portEdit, 7, 2 );
- QSpacerItem* spacerRow4 = new QSpacerItem( 10, 10, QSizePolicy::Minimum, QSizePolicy::Fixed );
+ TQSpacerItem* spacerRow4 = new TQSpacerItem( 10, 10, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
layout->addItem( spacerRow4, 8, 1 );
- QLabel* dbNameText = new QLabel( i18n( "Database name:" ), this );
- dbNameText->setFixedSize( QSize( 100, 20 ) );
- dbNameText->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ TQLabel* dbNameText = new TQLabel( i18n( "Database name:" ), this );
+ dbNameText->setFixedSize( TQSize( 100, 20 ) );
+ dbNameText->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
layout->addWidget( dbNameText, 9, 1 );
dbNameEdit = new KLineEdit( this );
- dbNameEdit->setFixedSize( QSize( 120, 20 ) );
- dbNameEdit->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ dbNameEdit->setFixedSize( TQSize( 120, 20 ) );
+ dbNameEdit->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
layout->addWidget( dbNameEdit, 9, 2 );
- QSpacerItem* spacerRow5 = new QSpacerItem( 10, 10, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding );
+ TQSpacerItem* spacerRow5 = new TQSpacerItem( 10, 10, TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding );
layout->addItem( spacerRow5, 10, 1 );
// Backup options
- QGroupBox *backupGBox = new QGroupBox( this, "backupGBox" );
+ TQGroupBox *backupGBox = new TQGroupBox( this, "backupGBox" );
backupGBox->setTitle( i18n( "Backup" ) );
backupGBox->setColumns( 2 );
layout->addMultiCellWidget( backupGBox, 10, 10, 1, 4 );
- QLabel *dumpPathLabel = new QLabel( backupGBox );
- dumpPathLabel->setText( QString(i18n( "Path to '%1':" )).arg("pg_dump") );
+ TQLabel *dumpPathLabel = new TQLabel( backupGBox );
+ dumpPathLabel->setText( TQString(i18n( "Path to '%1':" )).arg("pg_dump") );
dumpPathRequester = new KURLRequester( backupGBox );
dumpPathRequester->setFilter( "pg_dump" );
- QLabel *psqlPathLabel = new QLabel( backupGBox );
- psqlPathLabel->setText( QString(i18n( "Path to '%1':" )).arg("psql") );
+ TQLabel *psqlPathLabel = new TQLabel( backupGBox );
+ psqlPathLabel->setText( TQString(i18n( "Path to '%1':" )).arg("psql") );
psqlPathRequester = new KURLRequester( backupGBox );
psqlPathRequester->setFilter( "psql" );
- QSpacerItem* spacerRow6 = new QSpacerItem( 10, 10, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding );
+ TQSpacerItem* spacerRow6 = new TQSpacerItem( 10, 10, TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding );
layout->addItem( spacerRow6, 11, 1 );
- QSpacerItem* spacerRight = new QSpacerItem( 10, 10, QSizePolicy::MinimumExpanding, QSizePolicy::Fixed );
+ TQSpacerItem* spacerRight = new TQSpacerItem( 10, 10, TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed );
layout->addItem( spacerRight, 1, 4 );
// Load & Save Current Settings
@@ -346,22 +346,22 @@ void PostgreSQLServerPrefs::saveOptions( void )
-SQLiteServerPrefs::SQLiteServerPrefs( QWidget *parent ) : QWidget( parent )
+SQLiteServerPrefs::SQLiteServerPrefs( TQWidget *parent ) : TQWidget( parent )
{
- QVBoxLayout * Form1Layout = new QVBoxLayout( this );
+ TQVBoxLayout * Form1Layout = new TQVBoxLayout( this );
- QHBox *hbox = new QHBox( this );
- ( void ) new QLabel( i18n( "Database file:" ), hbox );
+ TQHBox *hbox = new TQHBox( this );
+ ( void ) new TQLabel( i18n( "Database file:" ), hbox );
fileRequester = new KURLRequester( hbox );
hbox->setStretchFactor( fileRequester, 2 );
Form1Layout->addWidget( hbox );
- QSpacerItem* spacerRow5 = new QSpacerItem( 10, 10, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding );
+ TQSpacerItem* spacerRow5 = new TQSpacerItem( 10, 10, TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding );
Form1Layout->addItem( spacerRow5 );
- QString sqliteBinary;
+ TQString sqliteBinary;
#if HAVE_SQLITE3
sqliteBinary = "sqlite3";
#elif HAVE_SQLITE
@@ -369,13 +369,13 @@ SQLiteServerPrefs::SQLiteServerPrefs( QWidget *parent ) : QWidget( parent )
#endif
// Backup options
- QGroupBox *backupGBox = new QGroupBox( this, "backupGBox" );
+ TQGroupBox *backupGBox = new TQGroupBox( this, "backupGBox" );
backupGBox->setTitle( i18n( "Backup" ) );
backupGBox->setColumns( 2 );
Form1Layout->addWidget( backupGBox );
- QLabel *dumpPathLabel = new QLabel( backupGBox );
- dumpPathLabel->setText( QString(i18n( "Path to '%1':" )).arg(sqliteBinary) );
+ TQLabel *dumpPathLabel = new TQLabel( backupGBox );
+ dumpPathLabel->setText( TQString(i18n( "Path to '%1':" )).arg(sqliteBinary) );
dumpPathRequester = new KURLRequester( backupGBox );
dumpPathRequester->setFilter( sqliteBinary );
@@ -396,14 +396,14 @@ void SQLiteServerPrefs::saveOptions( void )
// Server Setttings Dialog
-ServerPrefs::ServerPrefs( QWidget *parent )
- : QWidget( parent )
+ServerPrefs::ServerPrefs( TQWidget *parent )
+ : TQWidget( parent )
{
- QVBoxLayout * Form1Layout = new QVBoxLayout( this, 11, 6 );
+ TQVBoxLayout * Form1Layout = new TQVBoxLayout( this, 11, 6 );
KConfig *config = kapp->config();
config->setGroup( "DBType" );
- QString DBtype = config->readEntry( "Type" );
+ TQString DBtype = config->readEntry( "Type" );
if ( DBtype == "MySQL" )
serverWidget = new MySQLServerPrefs( this );
else if ( DBtype == "PostgreSQL" )
@@ -411,16 +411,16 @@ ServerPrefs::ServerPrefs( QWidget *parent )
else
serverWidget = new SQLiteServerPrefs( this );
- serverWidget->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Minimum );
+ serverWidget->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum );
Form1Layout->addWidget( serverWidget );
- Form1Layout->addItem( new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding ) );
+ Form1Layout->addItem( new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
- wizard_button = new QCheckBox( i18n( "Re-run wizard on next startup" ), this );
- wizard_button->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Minimum );
+ wizard_button = new TQCheckBox( i18n( "Re-run wizard on next startup" ), this );
+ wizard_button->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum );
Form1Layout->addWidget( wizard_button );
- QLabel *note = new QLabel( i18n( "Note: Krecipes must be restarted for most server preferences to take effect." ), this );
+ TQLabel *note = new TQLabel( i18n( "Note: Krecipes must be restarted for most server preferences to take effect." ), this );
Form1Layout->addWidget( note );
adjustSize();
@@ -440,7 +440,7 @@ void ServerPrefs::saveOptions( void )
{
KConfig * config = kapp->config();
config->setGroup( "DBType" );
- QString DBtype = config->readEntry( "Type" );
+ TQString DBtype = config->readEntry( "Type" );
if ( DBtype == "MySQL" )
( ( MySQLServerPrefs* ) serverWidget ) ->saveOptions();
else if ( DBtype == "PostgreSQL" )
@@ -455,23 +455,23 @@ void ServerPrefs::saveOptions( void )
}
//=============Numbers Preferences Dialog================//
-NumbersPrefs::NumbersPrefs( QWidget *parent )
- : QWidget( parent )
+NumbersPrefs::NumbersPrefs( TQWidget *parent )
+ : TQWidget( parent )
{
- Form1Layout = new QVBoxLayout( this, 11, 6 );
+ Form1Layout = new TQVBoxLayout( this, 11, 6 );
- numberButtonGroup = new QButtonGroup( this );
- numberButtonGroup->setColumnLayout( 0, Qt::Vertical );
+ numberButtonGroup = new TQButtonGroup( this );
+ numberButtonGroup->setColumnLayout( 0, TQt::Vertical );
numberButtonGroup->layout() ->setSpacing( 6 );
numberButtonGroup->layout() ->setMargin( 11 );
- numberButtonGroup->resize( QSize() );
- numberButtonGroupLayout = new QVBoxLayout( numberButtonGroup->layout() );
- numberButtonGroupLayout->setAlignment( Qt::AlignTop );
+ numberButtonGroup->resize( TQSize() );
+ numberButtonGroupLayout = new TQVBoxLayout( numberButtonGroup->layout() );
+ numberButtonGroupLayout->setAlignment( TQt::AlignTop );
- fractionRadioButton = new QRadioButton( numberButtonGroup );
+ fractionRadioButton = new TQRadioButton( numberButtonGroup );
numberButtonGroupLayout->addWidget( fractionRadioButton );
- decimalRadioButton = new QRadioButton( numberButtonGroup );
+ decimalRadioButton = new TQRadioButton( numberButtonGroup );
numberButtonGroupLayout->addWidget( decimalRadioButton );
Form1Layout->addWidget( numberButtonGroup );
@@ -479,12 +479,12 @@ NumbersPrefs::NumbersPrefs( QWidget *parent )
numberButtonGroup->insert( fractionRadioButton, 1 );
//ingredient display format
- QGroupBox *ingredientGrpBox = new QGroupBox( 2, Qt::Vertical, i18n( "Ingredients" ), this );
+ TQGroupBox *ingredientGrpBox = new TQGroupBox( 2, TQt::Vertical, i18n( "Ingredients" ), this );
- QHBox *ingredientBox = new QHBox( ingredientGrpBox );
- ( void ) new QLabel( i18n( "Ingredient Format:" ), ingredientBox );
+ TQHBox *ingredientBox = new TQHBox( ingredientGrpBox );
+ ( void ) new TQLabel( i18n( "Ingredient Format:" ), ingredientBox );
ingredientEdit = new KLineEdit( ingredientBox );
- ( void ) new QLabel( i18n( "%n: Name<br>"
+ ( void ) new TQLabel( i18n( "%n: Name<br>"
"%p: Preparation method<br>"
"%a: Amount<br>"
"%u: Unit"
@@ -493,13 +493,13 @@ NumbersPrefs::NumbersPrefs( QWidget *parent )
Form1Layout->addWidget( ingredientGrpBox );
//unit display format
- QGroupBox *abbrevGrpBox = new QGroupBox( 1, Qt::Vertical, i18n( "Units" ), this );
- QHBox *abbrevBox = new QHBox( abbrevGrpBox );
- abbrevButton = new QCheckBox( i18n( "Use abbreviations" ), abbrevBox );
+ TQGroupBox *abbrevGrpBox = new TQGroupBox( 1, TQt::Vertical, i18n( "Units" ), this );
+ TQHBox *abbrevBox = new TQHBox( abbrevGrpBox );
+ abbrevButton = new TQCheckBox( i18n( "Use abbreviations" ), abbrevBox );
Form1Layout->addWidget( abbrevGrpBox );
- Form1Layout->addItem( new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding ) );
+ Form1Layout->addItem( new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
adjustSize();
@@ -538,8 +538,8 @@ void NumbersPrefs::languageChange()
}
//=============Import/Export Preferences Dialog================//
-ImportPrefs::ImportPrefs( QWidget *parent )
- : QWidget( parent )
+ImportPrefs::ImportPrefs( TQWidget *parent )
+ : TQWidget( parent )
{
// Load Current Settings
KConfig * config = kapp->config();
@@ -548,27 +548,27 @@ ImportPrefs::ImportPrefs( QWidget *parent )
bool overwrite = config->readBoolEntry( "OverwriteExisting", false );
bool direct = config->readBoolEntry( "DirectImport", false );
- Form1Layout = new QVBoxLayout( this, 11, 6 );
+ Form1Layout = new TQVBoxLayout( this, 11, 6 );
- QGroupBox *importGroup = new QGroupBox(2,Qt::Vertical,i18n("Import"), this);
+ TQGroupBox *importGroup = new TQGroupBox(2,TQt::Vertical,i18n("Import"), this);
- overwriteCheckbox = new QCheckBox( i18n( "Overwrite recipes with same title" ), importGroup );
+ overwriteCheckbox = new TQCheckBox( i18n( "Overwrite recipes with same title" ), importGroup );
overwriteCheckbox->setChecked( overwrite );
- overwriteCheckbox->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Minimum );
+ overwriteCheckbox->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum );
- directImportCheckbox = new QCheckBox( i18n( "Ask which recipes to import" ), importGroup );
+ directImportCheckbox = new TQCheckBox( i18n( "Ask which recipes to import" ), importGroup );
directImportCheckbox->setChecked( !direct );
- directImportCheckbox->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Minimum );
+ directImportCheckbox->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum );
Form1Layout->addWidget(importGroup);
- QGroupBox *exportGroup = new QGroupBox(1,Qt::Vertical,i18n("Export"), this);
+ TQGroupBox *exportGroup = new TQGroupBox(1,TQt::Vertical,i18n("Export"), this);
- QHBox *clipboardHBox = new QHBox(exportGroup);
+ TQHBox *clipboardHBox = new TQHBox(exportGroup);
clipboardHBox->setSpacing(6);
- QLabel *clipboardLabel = new QLabel(i18n("'Copy to Clipboard' format:"),clipboardHBox);
- clipBoardFormatComboBox = new QComboBox( clipboardHBox );
- clipBoardFormatComboBox->insertItem(QString("%3 (*.txt)").arg(i18n("Plain Text")));
+ TQLabel *clipboardLabel = new TQLabel(i18n("'Copy to Clipboard' format:"),clipboardHBox);
+ clipBoardFormatComboBox = new TQComboBox( clipboardHBox );
+ clipBoardFormatComboBox->insertItem(TQString("%3 (*.txt)").arg(i18n("Plain Text")));
clipBoardFormatComboBox->insertItem("Krecipes (*.kreml)");
clipBoardFormatComboBox->insertItem("Meal-Master (*.mmf)");
clipBoardFormatComboBox->insertItem("Rezkonv (*.rk)");
@@ -577,7 +577,7 @@ ImportPrefs::ImportPrefs( QWidget *parent )
clipboardHBox->setStretchFactor(clipBoardFormatComboBox,1);
config->setGroup( "Export" );
- QString clipboardFormat = config->readEntry("ClipboardFormat");
+ TQString clipboardFormat = config->readEntry("ClipboardFormat");
if ( clipboardFormat == "*.kreml" )
clipBoardFormatComboBox->setCurrentItem(1);
else if ( clipboardFormat == "*.mmf" )
@@ -589,9 +589,9 @@ ImportPrefs::ImportPrefs( QWidget *parent )
Form1Layout->addWidget(exportGroup);
- Form1Layout->addItem( new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding ) );
+ Form1Layout->addItem( new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
- QWhatsThis::add( directImportCheckbox,
+ TQWhatsThis::add( directImportCheckbox,
i18n("When this is enabled, the importer will show every recipe in the file(s) and allow you to select which recipes you want imported.\n \
\
Disable this to always import every recipe, which allows for faster and less memory-intensive imports.")
@@ -609,14 +609,14 @@ void ImportPrefs::saveOptions()
config->writeEntry( "DirectImport", !directImportCheckbox->isChecked() );
config->setGroup( "Export" );
- QString ext = clipBoardFormatComboBox->currentText().mid(clipBoardFormatComboBox->currentText().find("(")+1,clipBoardFormatComboBox->currentText().length()-clipBoardFormatComboBox->currentText().find("(")-2);
+ TQString ext = clipBoardFormatComboBox->currentText().mid(clipBoardFormatComboBox->currentText().find("(")+1,clipBoardFormatComboBox->currentText().length()-clipBoardFormatComboBox->currentText().find("(")-2);
config->writeEntry( "ClipboardFormat", ext );
}
//=============Performance Options Dialog================//
-PerformancePrefs::PerformancePrefs( QWidget *parent )
- : QWidget( parent )
+PerformancePrefs::PerformancePrefs( TQWidget *parent )
+ : TQWidget( parent )
{
// Load Current Settings
KConfig * config = kapp->config();
@@ -625,15 +625,15 @@ PerformancePrefs::PerformancePrefs( QWidget *parent )
int cat_limit = config->readNumEntry( "CategoryLimit", -1 );
int limit = config->readNumEntry( "Limit", -1 );
- Form1Layout = new QVBoxLayout( this, 11, 6 );
+ Form1Layout = new TQVBoxLayout( this, 11, 6 );
- searchAsYouTypeBox = new QCheckBox( i18n( "Search as you type" ), this );
+ searchAsYouTypeBox = new TQCheckBox( i18n( "Search as you type" ), this );
searchAsYouTypeBox->setChecked( config->readBoolEntry( "SearchAsYouType", true ) );
- QLabel *explainationLabel = new QLabel( i18n("In most instances these options do not need to be changed. However, limiting the amount of items displayed at once will <b>allow Krecipes to better perform when the database is loaded with many thousands of recipes</b>."), this );
- explainationLabel->setTextFormat( Qt::RichText );
+ TQLabel *explainationLabel = new TQLabel( i18n("In most instances these options do not need to be changed. However, limiting the amount of items displayed at once will <b>allow Krecipes to better perform when the database is loaded with many thousands of recipes</b>."), this );
+ explainationLabel->setTextFormat( TQt::RichText );
- QHBox *catLimitHBox = new QHBox( this );
+ TQHBox *catLimitHBox = new TQHBox( this );
catLimitInput = new KIntNumInput(catLimitHBox);
catLimitInput->setLabel( i18n( "Number of categories to display at once:" ) );
catLimitInput->setRange(0,5000,20,true);
@@ -642,7 +642,7 @@ PerformancePrefs::PerformancePrefs( QWidget *parent )
if ( cat_limit > 0 )
catLimitInput->setValue( cat_limit );
- QHBox *limitHBox = new QHBox( this );
+ TQHBox *limitHBox = new TQHBox( this );
limitInput = new KIntNumInput(limitHBox);
limitInput->setLabel( i18n( "Number of elements to display at once:" ) );
limitInput->setRange(0,100000,1000,true);
@@ -656,7 +656,7 @@ PerformancePrefs::PerformancePrefs( QWidget *parent )
Form1Layout->addWidget( catLimitHBox );
Form1Layout->addWidget( limitHBox );
- Form1Layout->addItem( new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding ) );
+ Form1Layout->addItem( new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
adjustSize();
}