diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:01:34 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:01:34 -0600 |
commit | 8504a35d5c044ae41dc372758e2feb0a00dc42ee (patch) | |
tree | 00e9197a992a766b5371cb85aa08b6478ca906a4 /src/knutprintupsvar.cpp | |
parent | d9f83a1ca70afa18deb5eae9eb2938de2242c324 (diff) | |
download | knutclient-8504a35d5c044ae41dc372758e2feb0a00dc42ee.tar.gz knutclient-8504a35d5c044ae41dc372758e2feb0a00dc42ee.zip |
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'src/knutprintupsvar.cpp')
-rw-r--r-- | src/knutprintupsvar.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
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; } |