summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 15:01:34 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 15:01:34 -0600
commit8504a35d5c044ae41dc372758e2feb0a00dc42ee (patch)
tree00e9197a992a766b5371cb85aa08b6478ca906a4 /src
parentd9f83a1ca70afa18deb5eae9eb2938de2242c324 (diff)
downloadknutclient-8504a35d5c044ae41dc372758e2feb0a00dc42ee.tar.gz
knutclient-8504a35d5c044ae41dc372758e2feb0a00dc42ee.zip
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'src')
-rwxr-xr-xsrc/knutdock.cpp4
-rwxr-xr-xsrc/knutdock.h4
-rw-r--r--src/knutmainwindow.cpp16
-rw-r--r--src/knutmainwindow.h8
-rw-r--r--src/knutnewupsdlg.cpp6
-rw-r--r--src/knutnewupsdlg.h2
-rw-r--r--src/knutprefdlg.cpp4
-rw-r--r--src/knutprefdlg.h4
-rw-r--r--src/knutprintupsvar.cpp28
-rwxr-xr-xsrc/knutprintupsvar.h14
10 files changed, 45 insertions, 45 deletions
diff --git a/src/knutdock.cpp b/src/knutdock.cpp
index 0443312..a8be4c9 100755
--- a/src/knutdock.cpp
+++ b/src/knutdock.cpp
@@ -634,8 +634,8 @@ void KNutDock::createUpsMenu(void) {
void KNutDock::createMainMenu(void) {
- m_menu = new KPopupMenu;
- m_upsServerMenu = new KPopupMenu;
+ m_menu = new TDEPopupMenu;
+ m_upsServerMenu = new TDEPopupMenu;
createUpsMenu();
m_menu->insertTitle (kapp->miniIcon(),"knutclient");
diff --git a/src/knutdock.h b/src/knutdock.h
index 6060279..d4016d5 100755
--- a/src/knutdock.h
+++ b/src/knutdock.h
@@ -499,8 +499,8 @@ class KNutDock : public KSystemTray {
TQColor backgroundColor;
- KPopupMenu* m_menu;
- KPopupMenu* m_upsServerMenu;
+ TDEPopupMenu* m_menu;
+ TDEPopupMenu* m_upsServerMenu;
TQPixmap *m_statusLayer;
TQPixmap *m_runtimeLayer;
diff --git a/src/knutmainwindow.cpp b/src/knutmainwindow.cpp
index bcdee4f..c7f8854 100644
--- a/src/knutmainwindow.cpp
+++ b/src/knutmainwindow.cpp
@@ -60,7 +60,7 @@ const char *descrOfConnection = I18N_NOOP("test of conection from 5");
-KNutMainWindow::KNutMainWindow(TQStringList *tListKNutEvent, KNutVarData::upsInfoDef* tActiveUpsInfo, KNutVarData::SettingDataDef* tSettingData, KNutUpsData* tUpsRecords, KNutVarData* tAnalogRecords, TQWidget* parent, const char *name) : KMainWindow(parent, name),
+KNutMainWindow::KNutMainWindow(TQStringList *tListKNutEvent, KNutVarData::upsInfoDef* tActiveUpsInfo, KNutVarData::SettingDataDef* tSettingData, KNutUpsData* tUpsRecords, KNutVarData* tAnalogRecords, TQWidget* parent, const char *name) : TDEMainWindow(parent, name),
m_listKNutEvent(tListKNutEvent), m_activeUpsInfo(tActiveUpsInfo),m_settingData (tSettingData),
m_upsRecords(tUpsRecords), m_analogRecords (tAnalogRecords) {
@@ -732,7 +732,7 @@ void KNutMainWindow::initToolBar ( void ) {
// bude se pouze vybirat-------------------^^^
KComboBox *combo = toolBar("mainToolBar")->getCombo(1);
combo->clear();
- toolBar("mainToolBar")->setBarPos (KToolBar::Top);
+ toolBar("mainToolBar")->setBarPos (TDEToolBar::Top);
//sets toolbarr no movable / nastavime toolBar nepresouvatelny
setToolBarsMovable(false);
}
@@ -740,14 +740,14 @@ void KNutMainWindow::initToolBar ( void ) {
void KNutMainWindow::initAction ( void ) {
- // KAction and KStdAction must be to make before command createGUI, function initToolBar is runed after create GUI
+ // TDEAction and KStdAction must be to make before command createGUI, function initToolBar is runed after create GUI
m_quit = KStdAction::quit (TQT_TQOBJECT(this), TQT_SLOT (slotCloseKnutClient()), actionCollection());
m_quit->setStatusText(i18n("Quits the application"));
m_preferencesUps = KStdAction::preferences (TQT_TQOBJECT(this), TQT_SLOT (slotPreferencesUps()), actionCollection(),"options_configure");
- new KAction(i18n("&Showing UPS variables and commands"),0,TQT_TQOBJECT(this), TQT_SLOT(slotPrintUPSVars()),actionCollection(),"printupsvars");
- new KAction(i18n("&Running instant commands"),0,TQT_TQOBJECT(this), TQT_SLOT(slotInstComms()),actionCollection(),"instcomms");
- new KAction(i18n("Setting R&W variables"),0,TQT_TQOBJECT(this), TQT_SLOT(slotRWVars()),actionCollection(),"rwvars");
+ new TDEAction(i18n("&Showing UPS variables and commands"),0,TQT_TQOBJECT(this), TQT_SLOT(slotPrintUPSVars()),actionCollection(),"printupsvars");
+ new TDEAction(i18n("&Running instant commands"),0,TQT_TQOBJECT(this), TQT_SLOT(slotInstComms()),actionCollection(),"instcomms");
+ new TDEAction(i18n("Setting R&W variables"),0,TQT_TQOBJECT(this), TQT_SLOT(slotRWVars()),actionCollection(),"rwvars");
///////////////////
// KStdAction::showToolbar (TQT_TQOBJECT(this), TQT_SLOT (slotShowToolBar()), actionCollection());
@@ -775,10 +775,10 @@ void KNutMainWindow::initAction ( void ) {
KStdAction::showStatusbar (TQT_TQOBJECT(this), TQT_SLOT (slotShowStatusBar()), actionCollection());
- m_descriptionAction = new KToggleAction(i18n("&Using descriptions"),0,TQT_TQOBJECT(this), TQT_SLOT(slotDescription()),actionCollection(),"use_description");
+ m_descriptionAction = new TDEToggleAction(i18n("&Using descriptions"),0,TQT_TQOBJECT(this), TQT_SLOT(slotDescription()),actionCollection(),"use_description");
KStdAction::keyBindings( TQT_TQOBJECT(this), TQT_SLOT(slotConfigureKeys()),actionCollection());
- new KAction (i18n("Reconnect"),"reload",Key_F5,TQT_TQOBJECT(this), TQT_SLOT(slotRefreshConnection()),actionCollection(),"reconnect");
+ new TDEAction (i18n("Reconnect"),"reload",Key_F5,TQT_TQOBJECT(this), TQT_SLOT(slotRefreshConnection()),actionCollection(),"reconnect");
}
void KNutMainWindow::initVars ( void ) {
diff --git a/src/knutmainwindow.h b/src/knutmainwindow.h
index 2842c4e..723a727 100644
--- a/src/knutmainwindow.h
+++ b/src/knutmainwindow.h
@@ -59,7 +59,7 @@ class KProgress;
* @short Hlavni okno
* @version 0.2.3
*/
-class KNutMainWindow : public KMainWindow {
+class KNutMainWindow : public TDEMainWindow {
Q_OBJECT
public:
@@ -315,9 +315,9 @@ class KNutMainWindow : public KMainWindow {
KNutVarData* m_analogRecords;
- KAction *m_quit;
- KAction *m_preferencesUps;
- KToggleAction *m_descriptionAction;
+ TDEAction *m_quit;
+ TDEAction *m_preferencesUps;
+ TDEToggleAction *m_descriptionAction;
TQLabel* m_area; // main arrea, on its will server main panel and analog panels
diff --git a/src/knutnewupsdlg.cpp b/src/knutnewupsdlg.cpp
index c83e877..1f9688c 100644
--- a/src/knutnewupsdlg.cpp
+++ b/src/knutnewupsdlg.cpp
@@ -118,12 +118,12 @@ KNutNewUpsDlg::KNutNewUpsDlg (KNutUpsData* const upsData, KNutVarData* const ana
mainLayout->addWidget(GroupBox2);
- m_upsValueSelector = new KActionSelector(GroupBox2);
+ m_upsValueSelector = new TDEActionSelector(GroupBox2);
m_upsValueSelector->setAvailableLabel(i18n("Availabled UPS values"));
m_upsValueSelector->setSelectedLabel(i18n("Selected UPS values"));
- m_upsValueSelector->setAvailableInsertionPolicy(KActionSelector::Sorted);
- m_upsValueSelector->setSelectedInsertionPolicy(KActionSelector::AtBottom);
+ m_upsValueSelector->setAvailableInsertionPolicy(TDEActionSelector::Sorted);
+ m_upsValueSelector->setSelectedInsertionPolicy(TDEActionSelector::AtBottom);
m_upsValueSelector->availableListBox()->setSelectionMode(TQListBox::Multi);
m_upsValueSelector->selectedListBox()->setSelectionMode(TQListBox::Multi);
diff --git a/src/knutnewupsdlg.h b/src/knutnewupsdlg.h
index 3ebf3e7..16a7c19 100644
--- a/src/knutnewupsdlg.h
+++ b/src/knutnewupsdlg.h
@@ -154,7 +154,7 @@ private:
TQCheckBox* m_savePassword;
- KActionSelector* m_upsValueSelector;
+ TDEActionSelector* m_upsValueSelector;
};
diff --git a/src/knutprefdlg.cpp b/src/knutprefdlg.cpp
index 1d7ee48..cbd3842 100644
--- a/src/knutprefdlg.cpp
+++ b/src/knutprefdlg.cpp
@@ -629,7 +629,7 @@ void KNutPrefDlg::initUps () {
TQHBoxLayout *upsTopLayout = new TQHBoxLayout( page, 0, spacingHint (),"upsTopLayout" );
// makes box for names of UPS's / Vytvorime box pro jmena UPS-ek
- m_listBox2 = new KListBox( page, "ListBox2" );
+ m_listBox2 = new TDEListBox( page, "ListBox2" );
m_listBox2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, m_listBox2->sizePolicy().hasHeightForWidth() ) );
m_listBox2->setFrameShape( TQListBox::StyledPanel );
m_listBox2->setFrameShadow( TQListBox::Sunken );
@@ -866,7 +866,7 @@ void KNutPrefDlg::initFonts () {
- m_fontWidget = new KFontChooser(page,"Font",false);
+ m_fontWidget = new TDEFontChooser(page,"Font",false);
setFontLayout->addWidget (m_fontWidget ,0);
setTopLayout->addStretch( 20 );
diff --git a/src/knutprefdlg.h b/src/knutprefdlg.h
index a93e834..a813f4c 100644
--- a/src/knutprefdlg.h
+++ b/src/knutprefdlg.h
@@ -270,7 +270,7 @@ void slotUseCustomBIconColor(bool enable);
KNutVarData::SettingDataDef* m_settingData;
KNutNewUpsDlg* newUpsDlg;
- KListBox* m_listBox2; // uses in part UPS, contain name of UPS
+ TDEListBox* m_listBox2; // uses in part UPS, contain name of UPS
bool m_checked; //it's settted when, definition(parameters) of UPS were chaged // nastaveno kdyz doslo k zmene v definici UPS
bool m_checkedActiveUps; //it's setted when, parameters of active UPS were changed // nastaveno pokud doslo ke zmene na aktivni UPS
@@ -342,7 +342,7 @@ void slotUseCustomBIconColor(bool enable);
TQButtonGroup *m_frequencyGroup;
TQCheckBox* m_customFont; // User's font
- KFontChooser *m_fontWidget;
+ TDEFontChooser *m_fontWidget;
TQFont m_aPanelFont; // Analog panel font
TQFont m_mPanelFont; // Main panel font
diff --git a/src/knutprintupsvar.cpp b/src/knutprintupsvar.cpp
index dc776fd..633fae2 100644
--- a/src/knutprintupsvar.cpp
+++ b/src/knutprintupsvar.cpp
@@ -69,7 +69,7 @@ KNutPrintUpsVar::KNutPrintUpsVar(KNutNet* const upsNet, const bool useDescriptio
page = plainPage();
TQHBoxLayout* upsVarsMainLayout = new TQHBoxLayout(page);
- table = new KListView(page);
+ table = new TDEListView(page);
table->setRootIsDecorated(true);
table->setAllColumnsShowFocus( TRUE );
@@ -84,10 +84,10 @@ KNutPrintUpsVar::KNutPrintUpsVar(KNutNet* const upsNet, const bool useDescriptio
upsVarsMainLayout->addWidget(table);
- KListViewItem* myListItem;
+ TDEListViewItem* myListItem;
if (countIComms) {
- ICommList = new KListViewItem( table, i18n("Instant Commands"));
+ ICommList = new TDEListViewItem( table, i18n("Instant Commands"));
ICommList->setOpen(true);
for (int i=0; i<countIComms; i++) {
@@ -100,7 +100,7 @@ KNutPrintUpsVar::KNutPrintUpsVar(KNutNet* const upsNet, const bool useDescriptio
}
if (countRWVars) {
- RWVarsList = new KListViewItem( table, i18n("Read/Write Variables"));
+ RWVarsList = new TDEListViewItem( table, i18n("Read/Write Variables"));
RWVarsList->setOpen(true);
for (int i=0; i<countVars; i++) {
myUpsNet->readVars(i+1,upsVar);
@@ -118,7 +118,7 @@ KNutPrintUpsVar::KNutPrintUpsVar(KNutNet* const upsNet, const bool useDescriptio
}
- ROVarsList = new KListViewItem( table, i18n("Read Only Variables"));
+ ROVarsList = new TDEListViewItem( table, i18n("Read Only Variables"));
ROVarsList->setOpen(true);
for (int i=0; i<countVars; i++) {
@@ -163,9 +163,9 @@ void KNutPrintUpsVar::slotReloadVars (void) {
}
}
- KListViewItem* KNutPrintUpsVar::addListItem (KListViewItem* table, TQString varName, TQString value) {
- KListViewItem* myListItem;
- KListViewItem* helpListItem;
+ TDEListViewItem* KNutPrintUpsVar::addListItem (TDEListViewItem* table, TQString varName, TQString value) {
+ TDEListViewItem* myListItem;
+ TDEListViewItem* helpListItem;
TQString left;
int n;
@@ -176,14 +176,14 @@ void KNutPrintUpsVar::slotReloadVars (void) {
left = varName.left(n);
varName = varName.mid(n+1);
if (!(helpListItem = existListItem( myListItem,left))) {
- myListItem = new KListViewItem( myListItem, left);
+ myListItem = new TDEListViewItem( myListItem, left);
myListItem->setOpen(true);
}
else myListItem = helpListItem;
if (!myListItem->pixmap(0)) myListItem->setPixmap(0,dirPixmap);
}
else { // end part
- helpListItem = new KListViewItem( myListItem, varName, value);
+ helpListItem = new TDEListViewItem( myListItem, varName, value);
helpListItem->setOpen(true);
return helpListItem;
}
@@ -192,13 +192,13 @@ void KNutPrintUpsVar::slotReloadVars (void) {
}
- KListViewItem* KNutPrintUpsVar::existListItem (KListViewItem* listItem, TQString name) {
- KListViewItem* myItem;
+ TDEListViewItem* KNutPrintUpsVar::existListItem (TDEListViewItem* listItem, TQString name) {
+ TDEListViewItem* myItem;
- if (!(myItem = (KListViewItem *)listItem->firstChild())) return 0l;
+ if (!(myItem = (TDEListViewItem *)listItem->firstChild())) return 0l;
while (myItem) {
if (myItem->text(0) == name) return myItem;
- myItem = (KListViewItem *)myItem->nextSibling();
+ myItem = (TDEListViewItem *)myItem->nextSibling();
}
return 0l;
}
diff --git a/src/knutprintupsvar.h b/src/knutprintupsvar.h
index a7aa2cb..5792f6f 100755
--- a/src/knutprintupsvar.h
+++ b/src/knutprintupsvar.h
@@ -103,15 +103,15 @@ protected:
struct dataVar {
TQString myName;
- KListViewItem* myValue;
+ TDEListViewItem* myValue;
};
TQValueVector<dataVar> dataList;
- KListViewItem* ROVarsList;
- KListViewItem* RWVarsList;
- KListViewItem* ICommList;
+ TDEListViewItem* ROVarsList;
+ TDEListViewItem* RWVarsList;
+ TDEListViewItem* ICommList;
TQFrame *page;
- KListView* table;
+ TDEListView* table;
TQPixmap dirPixmap;
@@ -133,7 +133,7 @@ protected:
*
* @since 0.2.1
**/
- KListViewItem* addListItem (KListViewItem* table, TQString varName, TQString value);
+ TDEListViewItem* addListItem (TDEListViewItem* table, TQString varName, TQString value);
/**
* @internal
@@ -144,7 +144,7 @@ protected:
*
* @since 0.2
**/
- KListViewItem* existListItem (KListViewItem* listItem, TQString name);
+ TDEListViewItem* existListItem (TDEListViewItem* listItem, TQString name);
protected slots: