summaryrefslogtreecommitdiffstats
path: root/tdeprint/management/kmmainview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdeprint/management/kmmainview.cpp')
-rw-r--r--tdeprint/management/kmmainview.cpp80
1 files changed, 40 insertions, 40 deletions
diff --git a/tdeprint/management/kmmainview.cpp b/tdeprint/management/kmmainview.cpp
index ce3f356d8..ee2802a57 100644
--- a/tdeprint/management/kmmainview.cpp
+++ b/tdeprint/management/kmmainview.cpp
@@ -52,10 +52,10 @@
#include <tdepopupmenu.h>
#include <klibloader.h>
#include <kdialogbase.h>
-#include <ksimpleconfig.h>
-#include <kstandarddirs.h>
+#include <tdesimpleconfig.h>
+#include <tdestandarddirs.h>
#include <tdeapplication.h>
-#include <kprocess.h>
+#include <tdeprocess.h>
#undef m_manager
#define m_manager KMFactory::self()->manager()
@@ -111,12 +111,12 @@ KMMainView::KMMainView(TQWidget *parent, const char *name, TDEActionCollection *
m_layout->addWidget(m_plugin, 0);
// connections
- connect(KMTimer::self(),TQT_SIGNAL(timeout()),TQT_SLOT(slotTimer()));
- connect(m_printerview,TQT_SIGNAL(printerSelected(const TQString&)),TQT_SLOT(slotPrinterSelected(const TQString&)));
- connect(m_printerview,TQT_SIGNAL(rightButtonClicked(const TQString&,const TQPoint&)),TQT_SLOT(slotRightButtonClicked(const TQString&,const TQPoint&)));
- connect(m_pop,TQT_SIGNAL(aboutToShow()),KMTimer::self(),TQT_SLOT(hold()));
- connect(m_pop,TQT_SIGNAL(aboutToHide()),KMTimer::self(),TQT_SLOT(release()));
- connect( m_manager, TQT_SIGNAL( updatePossible( bool ) ), TQT_SLOT( slotUpdatePossible( bool ) ) );
+ connect(KMTimer::self(),TQ_SIGNAL(timeout()),TQ_SLOT(slotTimer()));
+ connect(m_printerview,TQ_SIGNAL(printerSelected(const TQString&)),TQ_SLOT(slotPrinterSelected(const TQString&)));
+ connect(m_printerview,TQ_SIGNAL(rightButtonClicked(const TQString&,const TQPoint&)),TQ_SLOT(slotRightButtonClicked(const TQString&,const TQPoint&)));
+ connect(m_pop,TQ_SIGNAL(aboutToShow()),KMTimer::self(),TQ_SLOT(hold()));
+ connect(m_pop,TQ_SIGNAL(aboutToHide()),KMTimer::self(),TQ_SLOT(release()));
+ connect( m_manager, TQ_SIGNAL( updatePossible( bool ) ), TQ_SLOT( slotUpdatePossible( bool ) ) );
// actions
if (coll)
@@ -148,7 +148,7 @@ void KMMainView::restoreSettings()
TDEConfig *conf = KMFactory::self()->printConfig();
conf->setGroup("General");
setViewType((KMPrinterView::ViewType)conf->readNumEntry("ViewType",KMPrinterView::Icons));
- setOrientation(conf->readNumEntry("Orientation", Qt::Vertical));
+ setOrientation(conf->readNumEntry("Orientation", TQt::Vertical));
bool view = conf->readBoolEntry("ViewToolBar",false);
slotToggleToolBar(view);
((TDEToggleAction*)m_actions->action("view_toolbar"))->setChecked(view);
@@ -179,61 +179,61 @@ void KMMainView::initActions()
iconlst << "view_icon" << "view_detailed" << "view_tree";
vact->setItems(TQStringList::split(',',i18n("&Icons,&List,&Tree"),false), iconlst);
vact->setCurrentItem(0);
- connect(vact,TQT_SIGNAL(activated(int)),TQT_SLOT(slotChangeView(int)));
+ connect(vact,TQ_SIGNAL(activated(int)),TQ_SLOT(slotChangeView(int)));
TDEActionMenu *stateAct = new TDEActionMenu(i18n("Start/Stop Printer"), "tdeprint_printstate", m_actions, "printer_state_change");
stateAct->setDelayed(false);
- stateAct->insert(new TDEAction(i18n("&Start Printer"),"tdeprint_enableprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_start"));
- stateAct->insert(new TDEAction(i18n("Sto&p Printer"),"tdeprint_stopprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_stop"));
+ stateAct->insert(new TDEAction(i18n("&Start Printer"),"tdeprint_enableprinter",0,this,TQ_SLOT(slotChangePrinterState()),m_actions,"printer_start"));
+ stateAct->insert(new TDEAction(i18n("Sto&p Printer"),"tdeprint_stopprinter",0,this,TQ_SLOT(slotChangePrinterState()),m_actions,"printer_stop"));
stateAct = new TDEActionMenu(i18n("Enable/Disable Job Spooling"), "tdeprint_queuestate", m_actions, "printer_spool_change");
stateAct->setDelayed(false);
- stateAct->insert(new TDEAction(i18n("&Enable Job Spooling"),"tdeprint_enableprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_enable"));
- stateAct->insert(new TDEAction(i18n("&Disable Job Spooling"),"tdeprint_stopprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_disable"));
-
- new TDEAction(i18n("&Remove"),"edittrash",0,TQT_TQOBJECT(this),TQT_SLOT(slotRemove()),m_actions,"printer_remove");
- new TDEAction(i18n("&Configure..."),"configure",0,TQT_TQOBJECT(this),TQT_SLOT(slotConfigure()),m_actions,"printer_configure");
- new TDEAction(i18n("Add &Printer/Class..."),"tdeprint_addprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotAdd()),m_actions,"printer_add");
- new TDEAction(i18n("Add &Special (pseudo) Printer..."),"tdeprint_addpseudo",0,TQT_TQOBJECT(this),TQT_SLOT(slotAddSpecial()),m_actions,"printer_add_special");
- new TDEAction(i18n("Set as &Local Default"),"tdeprint_defaulthard",0,TQT_TQOBJECT(this),TQT_SLOT(slotHardDefault()),m_actions,"printer_hard_default");
- new TDEAction(i18n("Set as &User Default"),"tdeprint_defaultsoft",0,TQT_TQOBJECT(this),TQT_SLOT(slotSoftDefault()),m_actions,"printer_soft_default");
- new TDEAction(i18n("&Test Printer..."),"tdeprint_testprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotTest()),m_actions,"printer_test");
- new TDEAction(i18n("Configure &Manager..."),"tdeprint_configmgr",0,TQT_TQOBJECT(this),TQT_SLOT(slotManagerConfigure()),m_actions,"manager_configure");
- new TDEAction(i18n("Initialize Manager/&View"),"reload",0,TQT_TQOBJECT(this),TQT_SLOT(slotInit()),m_actions,"view_refresh");
+ stateAct->insert(new TDEAction(i18n("&Enable Job Spooling"),"tdeprint_enableprinter",0,this,TQ_SLOT(slotChangePrinterState()),m_actions,"printer_enable"));
+ stateAct->insert(new TDEAction(i18n("&Disable Job Spooling"),"tdeprint_stopprinter",0,this,TQ_SLOT(slotChangePrinterState()),m_actions,"printer_disable"));
+
+ new TDEAction(i18n("&Remove"),"edittrash",0,this,TQ_SLOT(slotRemove()),m_actions,"printer_remove");
+ new TDEAction(i18n("&Configure..."),"configure",0,this,TQ_SLOT(slotConfigure()),m_actions,"printer_configure");
+ new TDEAction(i18n("Add &Printer/Class..."),"tdeprint_addprinter",0,this,TQ_SLOT(slotAdd()),m_actions,"printer_add");
+ new TDEAction(i18n("Add &Special (pseudo) Printer..."),"tdeprint_addpseudo",0,this,TQ_SLOT(slotAddSpecial()),m_actions,"printer_add_special");
+ new TDEAction(i18n("Set as &Local Default"),"tdeprint_defaulthard",0,this,TQ_SLOT(slotHardDefault()),m_actions,"printer_hard_default");
+ new TDEAction(i18n("Set as &User Default"),"tdeprint_defaultsoft",0,this,TQ_SLOT(slotSoftDefault()),m_actions,"printer_soft_default");
+ new TDEAction(i18n("&Test Printer..."),"tdeprint_testprinter",0,this,TQ_SLOT(slotTest()),m_actions,"printer_test");
+ new TDEAction(i18n("Configure &Manager..."),"tdeprint_configmgr",0,this,TQ_SLOT(slotManagerConfigure()),m_actions,"manager_configure");
+ new TDEAction(i18n("Initialize Manager/&View"),"reload",0,this,TQ_SLOT(slotInit()),m_actions,"view_refresh");
TDEIconSelectAction *dact = new TDEIconSelectAction(i18n("&Orientation"),0,m_actions,"orientation_change");
iconlst.clear();
iconlst << "view_top_bottom" << "view_left_right";
dact->setItems(TQStringList::split(',',i18n("&Vertical,&Horizontal"),false), iconlst);
dact->setCurrentItem(0);
- connect(dact,TQT_SIGNAL(activated(int)),TQT_SLOT(slotChangeDirection(int)));
+ connect(dact,TQ_SIGNAL(activated(int)),TQ_SLOT(slotChangeDirection(int)));
- new TDEAction(i18n("R&estart Server"),"tdeprint_restartsrv",0,TQT_TQOBJECT(this),TQT_SLOT(slotServerRestart()),m_actions,"server_restart");
- new TDEAction(i18n("Configure &Server..."),"tdeprint_configsrv",0,TQT_TQOBJECT(this),TQT_SLOT(slotServerConfigure()),m_actions,"server_configure");
- new TDEAction(i18n("Configure Server Access..."),"tdeprint_configsrv",0,TQT_TQOBJECT(this),TQT_SLOT(slotServerConfigureAccess()),m_actions,"server_access_configure");
+ new TDEAction(i18n("R&estart Server"),"tdeprint_restartsrv",0,this,TQ_SLOT(slotServerRestart()),m_actions,"server_restart");
+ new TDEAction(i18n("Configure &Server..."),"tdeprint_configsrv",0,this,TQ_SLOT(slotServerConfigure()),m_actions,"server_configure");
+ new TDEAction(i18n("Configure Server Access..."),"tdeprint_configsrv",0,this,TQ_SLOT(slotServerConfigureAccess()),m_actions,"server_access_configure");
TDEToggleAction *tact = new TDEToggleAction(i18n("Show &Toolbar"),0,m_actions,"view_toolbar");
tact->setCheckedState(i18n("Hide &Toolbar"));
- connect(tact,TQT_SIGNAL(toggled(bool)),TQT_SLOT(slotToggleToolBar(bool)));
+ connect(tact,TQ_SIGNAL(toggled(bool)),TQ_SLOT(slotToggleToolBar(bool)));
tact = new TDEToggleAction( i18n( "Show Me&nu Toolbar" ), 0, m_actions, "view_menubar" );
tact->setCheckedState(i18n("Hide Me&nu Toolbar"));
- connect( tact, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotToggleMenuBar( bool ) ) );
+ connect( tact, TQ_SIGNAL( toggled( bool ) ), TQ_SLOT( slotToggleMenuBar( bool ) ) );
tact = new TDEToggleAction(i18n("Show Pr&inter Details"),"tdeprint_printer_infos", 0,m_actions,"view_printerinfos");
tact->setCheckedState(KGuiItem(i18n("Hide Pr&inter Details"),"tdeprint_printer_infos"));
tact->setChecked(true);
- connect(tact,TQT_SIGNAL(toggled(bool)),TQT_SLOT(slotShowPrinterInfos(bool)));
+ connect(tact,TQ_SIGNAL(toggled(bool)),TQ_SLOT(slotShowPrinterInfos(bool)));
tact = new TDEToggleAction(i18n("Toggle Printer &Filtering"), "filter", 0, m_actions, "view_pfilter");
tact->setChecked(KMManager::self()->isFilterEnabled());
- connect(tact, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotToggleFilter(bool)));
+ connect(tact, TQ_SIGNAL(toggled(bool)), TQ_SLOT(slotToggleFilter(bool)));
TDEActionMenu *mact = new TDEActionMenu(i18n("Pri&nter Tools"), "applications-utilities", m_actions, "printer_tool");
mact->setDelayed(false);
- connect(mact->popupMenu(), TQT_SIGNAL(activated(int)), TQT_SLOT(slotToolSelected(int)));
+ connect(mact->popupMenu(), TQ_SIGNAL(activated(int)), TQ_SLOT(slotToolSelected(int)));
TQStringList files = TDEGlobal::dirs()->findAllResources("data", "tdeprint/tools/*.desktop");
for (TQStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
{
- KSimpleConfig conf(*it);
+ TDESimpleConfig conf(*it);
conf.setGroup("Desktop Entry");
mact->popupMenu()->insertItem(conf.readEntry("Name", "Unnamed"), mact->popupMenu()->count());
m_toollist << conf.readEntry("X-TDE-Library");
@@ -493,7 +493,7 @@ void KMMainView::slotRightButtonClicked(const TQString& prname, const TQPoint& p
void KMMainView::slotChangePrinterState()
{
- TQString opname = TQT_TQOBJECT_CONST(sender())->name();
+ TQString opname = sender()->name();
if (m_current && opname.startsWith("printer_"))
{
opname = opname.mid(8);
@@ -608,13 +608,13 @@ void KMMainView::slotSoftDefault()
void KMMainView::setOrientation(int o)
{
- int ID = (o == Qt::Horizontal ? 1 : 0);
+ int ID = (o == TQt::Horizontal ? 1 : 0);
((TDESelectAction*)m_actions->action("orientation_change"))->setCurrentItem(ID);
slotChangeDirection(ID);
}
int KMMainView::orientation() const
-{ return (m_boxlayout->direction() == TQBoxLayout::LeftToRight ? Qt::Horizontal : Qt::Vertical); }
+{ return (m_boxlayout->direction() == TQBoxLayout::LeftToRight ? TQt::Horizontal : TQt::Vertical); }
void KMMainView::slotChangeDirection(int d)
{
@@ -776,7 +776,7 @@ void KMMainView::reload()
loadPluginActions();
// redo the connection as the old manager object has been removed
- connect( m_manager, TQT_SIGNAL( updatePossible( bool ) ), TQT_SLOT( slotUpdatePossible( bool ) ) );
+ connect( m_manager, TQ_SIGNAL( updatePossible( bool ) ), TQ_SLOT( slotUpdatePossible( bool ) ) );
// We must delay the refresh such that all objects has been
// correctly reloaded (otherwise, crash in KMJobViewer).
@@ -831,7 +831,7 @@ void KMMainView::slotToolSelected(int ID)
{
TQStringList args;
args << m_current->device() << m_current->printerName();
- KDialogBase *dlg = static_cast<KDialogBase*>(TQT_TQWIDGET(factory->create(TQT_TQOBJECT(this), "Tool", 0, args)));
+ KDialogBase *dlg = static_cast<KDialogBase*>(factory->create(this, "Tool", 0, args));
if (dlg)
dlg->exec();
delete dlg;