diff options
author | Slávek Banko <[email protected]> | 2016-03-25 20:03:28 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2016-03-25 20:03:28 +0100 |
commit | 2ee99ab520931c5efe91123c85ba10064a45e95d (patch) | |
tree | a367666e410de28d0f258aed77b11e17cafb28e4 /sessionapplet/usermanager.cpp | |
parent | cfa36e1a95e82492c17225ff376911abb3688f62 (diff) | |
download | tde-style-baghira-2ee99ab520931c5efe91123c85ba10064a45e95d.tar.gz tde-style-baghira-2ee99ab520931c5efe91123c85ba10064a45e95d.zip |
Initial TQt conversion
Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'sessionapplet/usermanager.cpp')
-rw-r--r-- | sessionapplet/usermanager.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/sessionapplet/usermanager.cpp b/sessionapplet/usermanager.cpp index faf491f..107d9b8 100644 --- a/sessionapplet/usermanager.cpp +++ b/sessionapplet/usermanager.cpp @@ -20,9 +20,9 @@ #include <stdlib.h> #include <kmenubar.h> -// #include <qlabel.h> -#include <qlayout.h> -#include <qpopupmenu.h> +// #include <tqlabel.h> +#include <tqlayout.h> +#include <tqpopupmenu.h> #include <dcopclient.h> #include <kglobal.h> #include <kiconloader.h> @@ -40,7 +40,7 @@ #define _ICONSET_(i) KGlobal::iconLoader()->loadIconSet(i, KIcon::Small, 0, false) -UserManager::UserManager(const QString& configFile, Type type, int actions, QWidget *parent, const char *name) +UserManager::UserManager(const TQString& configFile, Type type, int actions, TQWidget *parent, const char *name) : KPanelApplet(configFile, type, actions, parent, name) { @@ -53,24 +53,24 @@ UserManager::UserManager(const QString& configFile, Type type, int actions, QWid menu = new KMenuBar(this); menu->setTopLevelMenu(false); - menu->setFrameShape ( QFrame::NoFrame ); + menu->setFrameShape ( TQFrame::NoFrame ); menu->setMargin ( 0 ); menu->setLineWidth ( 0 ); // sessions - sessionPopup = new QPopupMenu(this); + sessionPopup = new TQPopupMenu(this); menu->insertItem ( getenv("USER"), sessionPopup, 0); connect( sessionPopup, SIGNAL(aboutToShow()), SLOT(slotPopulateSessions()) ); connect( sessionPopup, SIGNAL(activated(int)), SLOT(slotSessionActivated(int)) ); // languages - langPopup = new QPopupMenu(this); + langPopup = new TQPopupMenu(this); KConfigBase *config = KGlobal::config(); config->setGroup("Locale"); langList = config->readListEntry ("Language", ':'); -// QString flag( locate( "locale", QString::fromLatin1( "l10n/%1/flag.png" ).arg(langList[0]) ) ); -// langLabel = new QLabel(this); +// TQString flag( locate( "locale", TQString::fromLatin1( "l10n/%1/flag.png" ).arg(langList[0]) ) ); +// langLabel = new TQLabel(this); // langLabel->setPixmap(_ICONSET_(flag).pixmap()); menu->insertItem ( '[' + langList[0].section('_',0,0) + ']', langPopup, 1 ); @@ -83,7 +83,7 @@ UserManager::UserManager(const QString& configFile, Type type, int actions, QWid setFixedWidth(menu->width()+5); mainView = menu; - menu->move(menu->mapToParent(QPoint(0,0)).x(),0); + menu->move(menu->mapToParent(TQPoint(0,0)).x(),0); menu->show(); } @@ -108,7 +108,7 @@ void UserManager::about() void UserManager::lock() { - QCString appname( "kdesktop" ); + TQCString appname( "kdesktop" ); // if ( kicker_screen_number ) // appname.sprintf("kdesktop-screen-%d", kicker_screen_number); kapp->dcopClient()->send(appname, "KScreensaverIface", "lock()", ""); @@ -127,18 +127,18 @@ void UserManager::slotPopulateLanguages() config->setGroup("Locale"); langList = config->readListEntry ("Language", ':'); int i = 0; - for ( QStringList::ConstIterator it = langList.begin(); + for ( TQStringList::ConstIterator it = langList.begin(); it != langList.end(); ++it ) { - KConfig entry(locate( "locale", QString::fromLatin1( "%1/entry.desktop" ).arg(*it) )); + KConfig entry(locate( "locale", TQString::fromLatin1( "%1/entry.desktop" ).arg(*it) )); entry.setGroup("KCM Locale"); - QString name = entry.readEntry("Name", i18n("without name")); + TQString name = entry.readEntry("Name", i18n("without name")); - QString flag( locate( "locale", QString::fromLatin1( "%1/flag.png" ).arg(*it) ) ); + TQString flag( locate( "locale", TQString::fromLatin1( "%1/flag.png" ).arg(*it) ) ); langPopup->insertItem( _ICONSET_(flag), name, i ); i++; } -// langPopup->popup(langLabel->mapToGlobal(QPoint(0,height()))); +// langPopup->popup(langLabel->mapToGlobal(TQPoint(0,height()))); } void UserManager::slotLanguageActivated( int i ) @@ -149,7 +149,7 @@ void UserManager::slotLanguageActivated( int i ) // langLabel->setPixmap(*langPopup->pixmap(i)); KConfig *config = new KConfig("kdeglobals"); config->setGroup("Locale"); - QString tmp = langList[i]; + TQString tmp = langList[i]; langList.remove(langList.at(i)); langList.prepend(tmp); config->writeEntry ("Language", langList, ':'); @@ -265,7 +265,7 @@ void UserManager::doNewSession( bool lock_ ) void UserManager::saveSession() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send( "ksmserver", "default", "saveCurrentSession()", data ); } @@ -273,7 +273,7 @@ void UserManager::saveSession() extern "C" { - KPanelApplet* init( QWidget *parent, const QString& configFile) + KPanelApplet* init( TQWidget *parent, const TQString& configFile) { KGlobal::locale()->insertCatalogue("usermanager"); return new UserManager(configFile, KPanelApplet::Normal, KPanelApplet::About, parent, "usermanager"); |