Use tdeApp

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
master
Michele Calgaro 1 month ago
parent c494697a52
commit 8e5cb7960d
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -208,7 +208,7 @@ void BarCodeDialog::copy()
DocumentItemDrag* drag = new DocumentItemDrag(); DocumentItemDrag* drag = new DocumentItemDrag();
drag->setDocumentItem( &list ); drag->setDocumentItem( &list );
kapp->clipboard()->setData( drag, TQClipboard::Clipboard ); tdeApp->clipboard()->setData( drag, TQClipboard::Clipboard );
} }
#include "barcodedialog.moc" #include "barcodedialog.moc"

@ -510,7 +510,7 @@ TQProgressDialog* BatchPrinter::createProgressDialog( const TQString & caption )
bool BatchPrinter::checkProgressDialog( TQProgressDialog* progress ) bool BatchPrinter::checkProgressDialog( TQProgressDialog* progress )
{ {
kapp->processEvents( 0 ); tdeApp->processEvents( 0 );
progress->setProgress( progress->progress() + 1 ); progress->setProgress( progress->progress() + 1 );
if( progress->wasCancelled() ) { if( progress->wasCancelled() ) {
delete progress; delete progress;

@ -903,7 +903,7 @@ void BatchWizard::loadData( const TQString & data )
} }
// new config entry!!! // new config entry!!!
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("FileFormat"); config->setGroup("FileFormat");
int pos[3] = { config->readNumEntry("Data0", 0 ), int pos[3] = { config->readNumEntry("Data0", 0 ),
config->readNumEntry("Data1", 1 ), config->readNumEntry("Data1", 1 ),

@ -174,7 +174,7 @@ void ConfigDialog::setupTab3()
TQSpacerItem* spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); TQSpacerItem* spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
grid->addItem( spacer, 5, 0 ); grid->addItem( spacer, 5, 0 );
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("FileFormat"); config->setGroup("FileFormat");
combo1->setCurrentItem( config->readNumEntry("Data0", 0 ) ); combo1->setCurrentItem( config->readNumEntry("Data0", 0 ) );
combo2->setCurrentItem( config->readNumEntry("Data1", 1 ) ); combo2->setCurrentItem( config->readNumEntry("Data1", 1 ) );
@ -301,7 +301,7 @@ void ConfigDialog::setupTab5()
void ConfigDialog::accept() void ConfigDialog::accept()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("FileFormat"); config->setGroup("FileFormat");
config->writeEntry("Data0", combo1->currentItem() ); config->writeEntry("Data0", combo1->currentItem() );
config->writeEntry("Data1", combo2->currentItem() ); config->writeEntry("Data1", combo2->currentItem() );

@ -163,7 +163,7 @@ void DatabaseBrowser::cut()
{ {
TQString text = table->value( table->currentRow(), table->currentColumn() ).toString(); TQString text = table->value( table->currentRow(), table->currentColumn() ).toString();
if( !text.isEmpty() ) { if( !text.isEmpty() ) {
kapp->clipboard()->setText( text ); tdeApp->clipboard()->setText( text );
TQSqlRecord* buffer = table->sqlCursor()->primeUpdate(); TQSqlRecord* buffer = table->sqlCursor()->primeUpdate();
if( buffer ) { if( buffer ) {
@ -179,12 +179,12 @@ void DatabaseBrowser::copy()
{ {
TQString text = table->value( table->currentRow(), table->currentColumn() ).toString(); TQString text = table->value( table->currentRow(), table->currentColumn() ).toString();
if( !text.isEmpty() ) if( !text.isEmpty() )
kapp->clipboard()->setText( text ); tdeApp->clipboard()->setText( text );
} }
void DatabaseBrowser::paste() void DatabaseBrowser::paste()
{ {
TQString text = kapp->clipboard()->text(); TQString text = tdeApp->clipboard()->text();
if( !text.isEmpty() ) { if( !text.isEmpty() ) {
TQSqlRecord* buffer = table->sqlCursor()->primeUpdate(); TQSqlRecord* buffer = table->sqlCursor()->primeUpdate();
if( buffer ) { if( buffer ) {

@ -298,7 +298,7 @@ bool Definition::openFile()
TQString f = locateLocal( "data", "kbarcode/labeldefinitions.sql" ); TQString f = locateLocal( "data", "kbarcode/labeldefinitions.sql" );
if( !TQFile::exists( f ) ) { if( !TQFile::exists( f ) ) {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup( "Definitions" ); config->setGroup( "Definitions" );
// copy file to new location // copy file to new location
@ -552,7 +552,7 @@ bool Definition::showFileError()
TQString f = KFileDialog::getOpenFileName( TQString(), TQString(), 0 ); TQString f = KFileDialog::getOpenFileName( TQString(), TQString(), 0 );
if( !f.isEmpty() && TQFile::exists( f ) ) { if( !f.isEmpty() && TQFile::exists( f ) ) {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup( "Definitions" ); config->setGroup( "Definitions" );
config->writeEntry( "defpath", f ); config->writeEntry( "defpath", f );
config->sync(); config->sync();

@ -50,7 +50,7 @@ DSMainWindow::DSMainWindow(TQWidget *parent, const char *name, WFlags f)
loadConfig(); loadConfig();
setAutoSaveSettings( TQString("Window") + name, true ); setAutoSaveSettings( TQString("Window") + name, true );
connect( kapp, TQ_SIGNAL( aboutToQuit() ), this, TQ_SLOT( saveConfig() ) ); connect( tdeApp, TQ_SIGNAL( aboutToQuit() ), this, TQ_SLOT( saveConfig() ) );
if( first && startwizard ) { if( first && startwizard ) {
wizard(); wizard();
@ -65,7 +65,7 @@ DSMainWindow::~DSMainWindow()
void DSMainWindow::setupActions() void DSMainWindow::setupActions()
{ {
TDEAction* quitAct = KStdAction::quit(kapp, TQ_SLOT(quit()), actionCollection()); TDEAction* quitAct = KStdAction::quit(tdeApp, TQ_SLOT(quit()), actionCollection());
TDEAction* closeAct = KStdAction::close( this, TQ_SLOT( close() ), actionCollection(), "close" ); TDEAction* closeAct = KStdAction::close( this, TQ_SLOT( close() ), actionCollection(), "close" );
TDEAction* configureAct = KStdAction::preferences( KBarcodeSettings::getInstance(), TQ_SLOT(configure()), actionCollection() ); TDEAction* configureAct = KStdAction::preferences( KBarcodeSettings::getInstance(), TQ_SLOT(configure()), actionCollection() );
TDEAction* wizardAct = new TDEAction( i18n("&Start Configuration Wizard..."), BarIcon("wizard"), 0, this, TDEAction* wizardAct = new TDEAction( i18n("&Start Configuration Wizard..."), BarIcon("wizard"), 0, this,
@ -124,7 +124,7 @@ void DSMainWindow::setupActions()
void DSMainWindow::loadConfig() void DSMainWindow::loadConfig()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("Wizard"); config->setGroup("Wizard");
first = config->readBoolEntry("firststart2", true ); first = config->readBoolEntry("firststart2", true );
@ -143,7 +143,7 @@ void DSMainWindow::loadConfig()
void DSMainWindow::saveConfig() void DSMainWindow::saveConfig()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("Wizard"); config->setGroup("Wizard");
config->writeEntry("firststart2", false ); config->writeEntry("firststart2", false );
@ -195,7 +195,7 @@ void DSMainWindow::startInfo()
{ {
TQString info = locate("appdata", "barcodes.html"); TQString info = locate("appdata", "barcodes.html");
if( !info.isEmpty() ) if( !info.isEmpty() )
kapp->invokeBrowser( info ); tdeApp->invokeBrowser( info );
} }
bool DSMainWindow::newTables() bool DSMainWindow::newTables()

@ -56,7 +56,7 @@ KBarcodeSettings::~KBarcodeSettings()
void KBarcodeSettings::saveConfig() void KBarcodeSettings::saveConfig()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("LabelEditor"); config->setGroup("LabelEditor");
config->writeEntry("grid", gridsize ); config->writeEntry("grid", gridsize );
@ -67,7 +67,7 @@ void KBarcodeSettings::saveConfig()
void KBarcodeSettings::loadConfig() void KBarcodeSettings::loadConfig()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
TQColor tmpc( TQt::lightGray ); TQColor tmpc( TQt::lightGray );
config->setGroup("LabelEditor"); config->setGroup("LabelEditor");

@ -163,7 +163,7 @@ LabelEditor::LabelEditor( TQWidget *parent, TQString _filename, const char *name
connect( cv, TQ_SIGNAL( showContextMenu(TQPoint) ), this, TQ_SLOT( showContextMenu(TQPoint) ) ); connect( cv, TQ_SIGNAL( showContextMenu(TQPoint) ), this, TQ_SLOT( showContextMenu(TQPoint) ) );
connect( cv, TQ_SIGNAL( movedSomething() ), this, TQ_SLOT( setEdited() ) ); connect( cv, TQ_SIGNAL( movedSomething() ), this, TQ_SLOT( setEdited() ) );
connect( KBarcodeSettings::getInstance(), TQ_SIGNAL( updateGrid( int ) ), cv, TQ_SLOT( updateGUI() ) ); connect( KBarcodeSettings::getInstance(), TQ_SIGNAL( updateGrid( int ) ), cv, TQ_SLOT( updateGUI() ) );
connect( kapp, TQ_SIGNAL( aboutToQuit() ), this, TQ_SLOT( saveConfig() ) ); connect( tdeApp, TQ_SIGNAL( aboutToQuit() ), this, TQ_SLOT( saveConfig() ) );
connect( history, TQ_SIGNAL( commandExecuted() ), cv, TQ_SLOT( updateGUI() ) ); connect( history, TQ_SIGNAL( commandExecuted() ), cv, TQ_SLOT( updateGUI() ) );
connect( history, TQ_SIGNAL( commandExecuted() ), this, TQ_SLOT( setEdited() ) ); connect( history, TQ_SIGNAL( commandExecuted() ), this, TQ_SLOT( setEdited() ) );
@ -181,7 +181,7 @@ LabelEditor::~LabelEditor()
void LabelEditor::loadConfig() void LabelEditor::loadConfig()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
recentAct->loadEntries( config, "RecentFiles" ); recentAct->loadEntries( config, "RecentFiles" );
gridAct->setChecked( config->readBoolEntry("gridenabled", false ) ); gridAct->setChecked( config->readBoolEntry("gridenabled", false ) );
@ -190,7 +190,7 @@ void LabelEditor::loadConfig()
void LabelEditor::saveConfig() void LabelEditor::saveConfig()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
recentAct->saveEntries( config, "RecentFiles" ); recentAct->saveEntries( config, "RecentFiles" );
@ -204,7 +204,7 @@ void LabelEditor::saveConfig()
void LabelEditor::createCommandHistory() void LabelEditor::createCommandHistory()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
if( undoAct && redoAct ) if( undoAct && redoAct )
{ {
@ -439,7 +439,7 @@ void LabelEditor::setupActions()
{ {
TDEAction* newAct = KStdAction::openNew( this, TQ_SLOT(startEditor()), actionCollection() ); TDEAction* newAct = KStdAction::openNew( this, TQ_SLOT(startEditor()), actionCollection() );
TDEAction* loadAct = KStdAction::open( this, TQ_SLOT(startLoadEditor()), actionCollection() ); TDEAction* loadAct = KStdAction::open( this, TQ_SLOT(startLoadEditor()), actionCollection() );
TDEAction* quitAct = KStdAction::quit(kapp, TQ_SLOT(quit()), actionCollection()); TDEAction* quitAct = KStdAction::quit(tdeApp, TQ_SLOT(quit()), actionCollection());
TDEAction* closeAct = KStdAction::close( this, TQ_SLOT( close() ), actionCollection(), "close" ); TDEAction* closeAct = KStdAction::close( this, TQ_SLOT( close() ), actionCollection(), "close" );
closeLabelAct = new TDEAction( i18n("Close &Label" ), 0, 0, this, TQ_SLOT( closeLabel() ), actionCollection() ); closeLabelAct = new TDEAction( i18n("Close &Label" ), 0, 0, this, TQ_SLOT( closeLabel() ), actionCollection() );
@ -975,7 +975,7 @@ void LabelEditor::copy()
DocumentItemDrag* drag = new DocumentItemDrag(); DocumentItemDrag* drag = new DocumentItemDrag();
drag->setDocumentItem( &items ); drag->setDocumentItem( &items );
kapp->clipboard()->setData( drag, TQClipboard::Clipboard ); tdeApp->clipboard()->setData( drag, TQClipboard::Clipboard );
} }
void LabelEditor::paste() void LabelEditor::paste()

@ -139,7 +139,7 @@ PreviewDialog::PreviewDialog( TQIODevice* device, Definition* d, TQString filena
connect( customerName, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( customerNameChanged(int) ) ); connect( customerName, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( customerNameChanged(int) ) );
connect( customerId, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( customerIdChanged(int) ) ); connect( customerId, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( customerIdChanged(int) ) );
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup( "PreviewDialog" ); config->setGroup( "PreviewDialog" );
resize( config->readNumEntry( "width", width() ), config->readNumEntry( "height", height() ) ); resize( config->readNumEntry( "width", width() ), config->readNumEntry( "height", height() ) );
@ -149,7 +149,7 @@ PreviewDialog::PreviewDialog( TQIODevice* device, Definition* d, TQString filena
PreviewDialog::~PreviewDialog() PreviewDialog::~PreviewDialog()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup( "PreviewDialog" ); config->setGroup( "PreviewDialog" );
config->writeEntry( "width", width() ); config->writeEntry( "width", width() );
config->writeEntry( "height", height() ); config->writeEntry( "height", height() );

@ -76,7 +76,7 @@ PrinterSettings::PrinterSettings()
lpdata = new labelprinterdata; lpdata = new labelprinterdata;
loadConfig(); loadConfig();
connect( kapp, TQ_SIGNAL( aboutToQuit() ), this, TQ_SLOT( saveConfig() ) ); connect( tdeApp, TQ_SIGNAL( aboutToQuit() ), this, TQ_SLOT( saveConfig() ) );
} }
PrinterSettings::~PrinterSettings() PrinterSettings::~PrinterSettings()
@ -93,7 +93,7 @@ PrinterSettings* PrinterSettings::getInstance()
void PrinterSettings::loadConfig() void PrinterSettings::loadConfig()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("Printer"); config->setGroup("Printer");
lpdata->articleEvent1 = (enum linebreak)config->readNumEntry("articleEvent1", NO_BREAK ); lpdata->articleEvent1 = (enum linebreak)config->readNumEntry("articleEvent1", NO_BREAK );
@ -128,7 +128,7 @@ void PrinterSettings::loadConfig()
void PrinterSettings::saveConfig() void PrinterSettings::saveConfig()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("Printer"); config->setGroup("Printer");
config->writeEntry("articleEvent1", lpdata->articleEvent1 ); config->writeEntry("articleEvent1", lpdata->articleEvent1 );

@ -89,7 +89,7 @@ SqlTables::SqlTables( TQObject* parent )
connected = false; connected = false;
loadConfig(); loadConfig();
connect( kapp, TQ_SIGNAL( aboutToQuit() ), this, TQ_SLOT( saveConfig() ) ); connect( tdeApp, TQ_SIGNAL( aboutToQuit() ), this, TQ_SLOT( saveConfig() ) );
} }
SqlTables::~SqlTables() SqlTables::~SqlTables()
@ -289,7 +289,7 @@ void SqlTables::importLabelDef()
TQString f = locateLocal( "data", "kbarcode/labeldefinitions.sql" ); TQString f = locateLocal( "data", "kbarcode/labeldefinitions.sql" );
if( !TQFile::exists( f ) ) { if( !TQFile::exists( f ) ) {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup( "Definitions" ); config->setGroup( "Definitions" );
f = config->readEntry( "defpath", locate( "data", "kbarcode/labeldefinitions.sql" ) ); f = config->readEntry( "defpath", locate( "data", "kbarcode/labeldefinitions.sql" ) );
} }
@ -348,7 +348,7 @@ void SqlTables::exec( TQSqlQuery* query, const TQString & text )
void SqlTables::loadConfig() void SqlTables::loadConfig()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("SQL"); config->setGroup("SQL");
sqldata.username = config->readEntry("username", "root"); sqldata.username = config->readEntry("username", "root");
@ -361,7 +361,7 @@ void SqlTables::loadConfig()
void SqlTables::saveConfig() void SqlTables::saveConfig()
{ {
TDEConfig* config = kapp->config(); TDEConfig* config = tdeApp->config();
config->setGroup("SQL"); config->setGroup("SQL");
config->writeEntry("username", sqldata.username ); config->writeEntry("username", sqldata.username );

Loading…
Cancel
Save