diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:10:05 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:10:05 -0600 |
commit | 74a2067d286867e313f736d6733407586b71195e (patch) | |
tree | 182ea565d6909db1541424e4ffb3168b4b139c21 /noatun-plugins/oblique | |
parent | 081670a12774435ae60cf8eba9226b91d27852b3 (diff) | |
download | tdeaddons-74a2067d286867e313f736d6733407586b71195e.tar.gz tdeaddons-74a2067d286867e313f736d6733407586b71195e.zip |
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'noatun-plugins/oblique')
-rw-r--r-- | noatun-plugins/oblique/cmodule.cpp | 28 | ||||
-rw-r--r-- | noatun-plugins/oblique/cmodule.h | 6 | ||||
-rw-r--r-- | noatun-plugins/oblique/menu.cpp | 12 | ||||
-rw-r--r-- | noatun-plugins/oblique/menu.h | 6 | ||||
-rw-r--r-- | noatun-plugins/oblique/tree.cpp | 26 | ||||
-rw-r--r-- | noatun-plugins/oblique/tree.h | 14 | ||||
-rw-r--r-- | noatun-plugins/oblique/view.cpp | 20 | ||||
-rw-r--r-- | noatun-plugins/oblique/view.h | 6 |
8 files changed, 59 insertions, 59 deletions
diff --git a/noatun-plugins/oblique/cmodule.cpp b/noatun-plugins/oblique/cmodule.cpp index bde3302..83cc1bb 100644 --- a/noatun-plugins/oblique/cmodule.cpp +++ b/noatun-plugins/oblique/cmodule.cpp @@ -72,7 +72,7 @@ SchemaConfig::SchemaConfig(TQWidget *parent, Oblique *oblique) TQHBox *middle = new TQHBox(this); middle->setSpacing(7); - mSchemaTree = new KListView(middle); + mSchemaTree = new TDEListView(middle); connect( mSchemaTree, TQT_SIGNAL(currentChanged(TQListViewItem*)), TQT_SLOT(setCurrent(TQListViewItem*)) @@ -171,19 +171,19 @@ SchemaConfig::SchemaConfig(TQWidget *parent, Oblique *oblique) } -class QueryGroupItem : public KListViewItem +class QueryGroupItem : public TDEListViewItem { QueryGroup *mItem; public: QueryGroupItem(QueryGroupItem *parent, QueryGroup *group, QueryGroupItem *after=0) - : KListViewItem(parent, after) + : TDEListViewItem(parent, after) { init(group); } - QueryGroupItem(KListView *parent, QueryGroup *group, QueryGroupItem *after=0) - : KListViewItem(parent, after) + QueryGroupItem(TDEListView *parent, QueryGroup *group, QueryGroupItem *after=0) + : TDEListViewItem(parent, after) { init(group); } @@ -199,10 +199,10 @@ public: } QueryGroupItem *parent() - { return static_cast<QueryGroupItem*>(KListViewItem::parent()); } + { return static_cast<QueryGroupItem*>(TDEListViewItem::parent()); } - KListView *listView() - { return static_cast<KListView*>(KListViewItem::listView()); } + TDEListView *listView() + { return static_cast<TDEListView*>(TDEListViewItem::listView()); } private: void init(QueryGroup *group) @@ -510,7 +510,7 @@ SliceConfig::SliceConfig(TQWidget *parent, Oblique *oblique) TQHBox *middle = new TQHBox(this); middle->setSpacing(7); - mSliceList = new KListView(middle); + mSliceList = new TDEListView(middle); TQWhatsThis::add(mSliceList, i18n("The list of slices. A Slice is part of the full collection. This allows you to categorize your playlist. You can add an item to the list by right clicking on it and selecting the Slice you want it in.")); mSliceList->addColumn(""); mSliceList->header()->hide(); @@ -535,20 +535,20 @@ SliceConfig::SliceConfig(TQWidget *parent, Oblique *oblique) } -class SliceListItem : public KListViewItem +class SliceListItem : public TDEListViewItem { Slice *mSlice; public: - SliceListItem(KListView *parent, Slice *slice) - : KListViewItem(parent, slice->name()), mSlice(slice) + SliceListItem(TDEListView *parent, Slice *slice) + : TDEListViewItem(parent, slice->name()), mSlice(slice) { } /** * new item **/ - SliceListItem(KListView *parent) - : KListViewItem(parent, i18n("New Slice")), mSlice(0) + SliceListItem(TDEListView *parent) + : TDEListViewItem(parent, i18n("New Slice")), mSlice(0) { } diff --git a/noatun-plugins/oblique/cmodule.h b/noatun-plugins/oblique/cmodule.h index 6455758..f0ee0d4 100644 --- a/noatun-plugins/oblique/cmodule.h +++ b/noatun-plugins/oblique/cmodule.h @@ -7,7 +7,7 @@ #include <noatun/pref.h> #include "query.h" -class KListView; +class TDEListView; class KLineEdit; class TQDialog; class Oblique; @@ -22,7 +22,7 @@ Q_OBJECT Oblique *mOblique; - KListView *mSchemaTree; + TDEListView *mSchemaTree; KLineEdit *mPropertyEdit, *mValueEdit, *mPresentationEdit; TQComboBox *mSchemaList; @@ -87,7 +87,7 @@ class SliceConfig : public TQWidget Q_OBJECT Oblique *mOblique; - KListView *mSliceList; + TDEListView *mSliceList; TQPushButton *mAdd, *mRemove; TQValueList<SliceListItem*> mAddedItems; TQValueList<Slice*> mRemovedItems; diff --git a/noatun-plugins/oblique/menu.cpp b/noatun-plugins/oblique/menu.cpp index efc736d..b04945d 100644 --- a/noatun-plugins/oblique/menu.cpp +++ b/noatun-plugins/oblique/menu.cpp @@ -8,7 +8,7 @@ #include "tree.h" FileMenu::FileMenu(TQWidget *parent, Oblique *oblique, File file) - : KPopupMenu(parent) + : TDEPopupMenu(parent) { if (file) mFiles.append(file); @@ -40,7 +40,7 @@ static void addTo(TQValueList<File> &files, TreeItem *item) } FileMenu::FileMenu(TQWidget *parent, Oblique *oblique, TreeItem *items) - : KPopupMenu(parent) + : TDEPopupMenu(parent) { addTo(mFiles, items); @@ -93,7 +93,7 @@ SliceListAction::SliceListAction( const TQString &text, Oblique *oblique, TQObject *reciever, const char *slot, const TQValueList<File> &files, TQObject *parent, const char *name - ) : KActionMenu(text, parent, name) + ) : TDEActionMenu(text, parent, name) { mFiles = files; mOblique = oblique; @@ -107,7 +107,7 @@ SliceListAction::SliceListAction( void SliceListAction::slicesModified() { mIndexToSlices.clear(); - KPopupMenu *menu = popupMenu(); + TDEPopupMenu *menu = popupMenu(); menu->clear(); TQPtrList<Slice> slices = mOblique->base()->slices(); @@ -154,7 +154,7 @@ SchemaListAction::SchemaListAction( const TQString &text, TQObject *reciever, const char *slot, TQObject *parent, const char *name - ) : KActionMenu(text, parent, name) + ) : TDEActionMenu(text, parent, name) { mTree = 0; if (reciever) @@ -167,7 +167,7 @@ void SchemaListAction::prepare() { assert(mTree); mIndexToSchemas.clear(); - KPopupMenu *menu = popupMenu(); + TDEPopupMenu *menu = popupMenu(); menu->clear(); if (!mTree) return; diff --git a/noatun-plugins/oblique/menu.h b/noatun-plugins/oblique/menu.h index 0b4e509..32d7d8d 100644 --- a/noatun-plugins/oblique/menu.h +++ b/noatun-plugins/oblique/menu.h @@ -14,7 +14,7 @@ /** * a context menu for a item in the list **/ -class FileMenu : public KPopupMenu +class FileMenu : public TDEPopupMenu { Q_OBJECT @@ -33,7 +33,7 @@ private slots: void toggleInSlice(Slice *slice); }; -class SliceListAction : public KActionMenu +class SliceListAction : public TDEActionMenu { Q_OBJECT @@ -57,7 +57,7 @@ private slots: }; -class SchemaListAction : public KActionMenu +class SchemaListAction : public TDEActionMenu { Q_OBJECT diff --git a/noatun-plugins/oblique/tree.cpp b/noatun-plugins/oblique/tree.cpp index 04c9cdd..4c83cc8 100644 --- a/noatun-plugins/oblique/tree.cpp +++ b/noatun-plugins/oblique/tree.cpp @@ -150,7 +150,7 @@ inline static void sortify(T *item) TreeItem::TreeItem(Tree *parent, QueryGroup *group, const File &file, const TQString &p) - : KListViewItem(parent, p), mGroup(group), mUserOpened(false), mHidden(false) + : TDEListViewItem(parent, p), mGroup(group), mUserOpened(false), mHidden(false) { if (group->option(QueryGroup::Playable)) { @@ -162,7 +162,7 @@ TreeItem::TreeItem(Tree *parent, QueryGroup *group, const File &file, const TQSt } TreeItem::TreeItem(TreeItem *parent, QueryGroup *group, const File &file, const TQString &p) - : KListViewItem(parent, p), mGroup(group), mUserOpened(false), mHidden(false) + : TDEListViewItem(parent, p), mGroup(group), mUserOpened(false), mHidden(false) { if (group->option(QueryGroup::Playable)) { @@ -250,7 +250,7 @@ int TreeItem::compare(TQListViewItem *i, int col, bool) const Tree *TreeItem::tree() { - return static_cast<Tree*>(KListViewItem::listView()); + return static_cast<Tree*>(TDEListViewItem::listView()); } TQString TreeItem::presentation() const @@ -309,7 +309,7 @@ void TreeItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int w text.setRgb(r/2,g/2,b/2); newcg.setColor(TQColorGroup::Text, text); } - KListViewItem::paintCell(p, newcg, column, width, align); + TDEListViewItem::paintCell(p, newcg, column, width, align); font.setUnderline(false); p->setFont(font); @@ -322,7 +322,7 @@ void TreeItem::setOpen(bool o) mUserOpened = o; tree()->removeAutoExpanded(this); } - KListViewItem::setOpen(o); + TDEListViewItem::setOpen(o); } void TreeItem::autoExpand() @@ -432,7 +432,7 @@ TreeItem *TreeItem::next() Tree::Tree(Oblique *oblique, TQWidget *parent) - : KListView(parent), mOblique(oblique), mAutoExpanding(0) + : TDEListView(parent), mOblique(oblique), mAutoExpanding(0) { mCurrent = 0; lastMenu =0; @@ -458,8 +458,8 @@ Tree::Tree(Oblique *oblique, TQWidget *parent) ); connect( - this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), - TQT_SLOT(contextMenu(KListView*, TQListViewItem*, const TQPoint&)) + this, TQT_SIGNAL(contextMenu(TDEListView*, TQListViewItem*, const TQPoint&)), + TQT_SLOT(contextMenu(TDEListView*, TQListViewItem*, const TQPoint&)) ); connect( this, TQT_SIGNAL(executed(TQListViewItem*)), @@ -500,7 +500,7 @@ void Tree::clear() napp->player()->stop(); setCurrent(0); } - KListView::clear(); + TDEListView::clear(); } void Tree::movableDropEvent (TQListViewItem* parent, TQListViewItem* afterme) @@ -512,7 +512,7 @@ void Tree::movableDropEvent (TQListViewItem* parent, TQListViewItem* afterme) return; } - KListView::movableDropEvent(parent, afterme); + TDEListView::movableDropEvent(parent, afterme); } @@ -533,7 +533,7 @@ void Tree::dropped(TQPtrList<TQListViewItem> &items, TQPtrList<TQListViewItem> & TreeItem *Tree::firstChild() - { return static_cast<TreeItem*>(KListView::firstChild()); } + { return static_cast<TreeItem*>(TDEListView::firstChild()); } TreeItem *Tree::find(File item) { @@ -682,7 +682,7 @@ bool Tree::setSchema(const TQString &name) TQDragObject *Tree::dragObject() { if (currentItem() && static_cast<TreeItem*>(currentItem())->file()) - return KListView::dragObject(); + return TDEListView::dragObject(); return 0; } @@ -701,7 +701,7 @@ void Tree::setLimit(const TQString &text) } -void Tree::contextMenu(KListView*, TQListViewItem* i, const TQPoint& p) +void Tree::contextMenu(TDEListView*, TQListViewItem* i, const TQPoint& p) { if (!i) return; delete lastMenu; diff --git a/noatun-plugins/oblique/tree.h b/noatun-plugins/oblique/tree.h index 4e8317c..c55e606 100644 --- a/noatun-plugins/oblique/tree.h +++ b/noatun-plugins/oblique/tree.h @@ -14,7 +14,7 @@ class Oblique; class Tree; -class TreeItem : public KListViewItem +class TreeItem : public TDEListViewItem { QueryGroup *mGroup; File mFile; @@ -31,11 +31,11 @@ public: const QueryGroup *group() const { return mGroup; } void setGroup(QueryGroup *group) { mGroup = group; } - TreeItem *parent() { return static_cast<TreeItem*>(KListViewItem::parent()); } + TreeItem *parent() { return static_cast<TreeItem*>(TDEListViewItem::parent()); } Tree *tree(); - TreeItem *itemBelow() { return static_cast<TreeItem*>(KListViewItem::itemBelow()); } - TreeItem *firstChild() { return static_cast<TreeItem*>(KListViewItem::firstChild()); } - TreeItem *nextSibling() { return static_cast<TreeItem*>(KListViewItem::nextSibling()); } + TreeItem *itemBelow() { return static_cast<TreeItem*>(TDEListViewItem::itemBelow()); } + TreeItem *firstChild() { return static_cast<TreeItem*>(TDEListViewItem::firstChild()); } + TreeItem *nextSibling() { return static_cast<TreeItem*>(TDEListViewItem::nextSibling()); } // for gdb, which sucks. TQString presentation() const; @@ -83,7 +83,7 @@ private: class FileMenu; class Loader; -class Tree : public KListView +class Tree : public TDEListView { Q_OBJECT @@ -151,7 +151,7 @@ public slots: void setLimit(const TQString &text); private slots: - void contextMenu(KListView* l, TQListViewItem* i, const TQPoint& p); + void contextMenu(TDEListView* l, TQListViewItem* i, const TQPoint& p); void play(TQListViewItem *item); void destroyLoader(); diff --git a/noatun-plugins/oblique/view.cpp b/noatun-plugins/oblique/view.cpp index 5714c99..30da384 100644 --- a/noatun-plugins/oblique/view.cpp +++ b/noatun-plugins/oblique/view.cpp @@ -30,7 +30,7 @@ public: View::View(Oblique *oblique) - : KMainWindow(0, 0) + : TDEMainWindow(0, 0) { mOblique = oblique; mTree = 0; @@ -41,13 +41,13 @@ View::View(Oblique *oblique) setCentralWidget(mTabs); - KAction *ac; - ac = new KAction(i18n("Add &Files..."), "queue", 0, TQT_TQOBJECT(this), TQT_SLOT(addFiles()), actionCollection(), "add_files"); + TDEAction *ac; + ac = new TDEAction(i18n("Add &Files..."), "queue", 0, TQT_TQOBJECT(this), TQT_SLOT(addFiles()), actionCollection(), "add_files"); ac->setWhatsThis(i18n("Add a reference to a media file on disk to this collection.")); - ac = new KAction(i18n("Add Fol&ders..."), "folder", 0, TQT_TQOBJECT(this), TQT_SLOT(addDirectory()), actionCollection(), "add_dir"); + ac = new TDEAction(i18n("Add Fol&ders..."), "folder", 0, TQT_TQOBJECT(this), TQT_SLOT(addDirectory()), actionCollection(), "add_dir"); -// ac = new KAction(i18n("&Reload"), "reload", 0, oblique, TQT_SLOT(reload()), actionCollection(), "reload"); +// ac = new TDEAction(i18n("&Reload"), "reload", 0, oblique, TQT_SLOT(reload()), actionCollection(), "reload"); // ac->setWhatsThis(i18n("Reread the collection and meta-information from its files.")); ac = new SliceListAction( @@ -61,12 +61,12 @@ View::View(Oblique *oblique) ); mSchemaListAction->setWhatsThis(i18n("Select a schema to use to collate the tree.")); - ac = new KAction( + ac = new TDEAction( i18n("&New Tab"), "tab_new", "CTRL+SHIFT+N;CTRL+T", TQT_TQOBJECT(this), TQT_SLOT(addTab()), actionCollection(), "newtab" ); - mRemoveTabAction = new KAction( + mRemoveTabAction = new TDEAction( i18n("&Close Current Tab"), "tab_remove", CTRL+Key_W, TQT_TQOBJECT(this), TQT_SLOT(removeTab()), actionCollection(), "removecurrenttab" ); @@ -79,7 +79,7 @@ View::View(Oblique *oblique) TQt::AlignVCenter | TQt::ShowPrefix ); l->adjustSize(); - new KWidgetAction(l, i18n("&Jump:"), KShortcut(ALT + Key_J), 0, 0, actionCollection(), "jump_label"); + new KWidgetAction(l, i18n("&Jump:"), TDEShortcut(ALT + Key_J), 0, 0, actionCollection(), "jump_label"); LineEditAction *jumpAction = new LineEditAction(i18n("Jump Bar"), 0, 0, actionCollection(), "jump_text"); jumpAction->setWhatsThis(i18n("Only display items which contain this string")); @@ -241,8 +241,8 @@ void View::use(Slice *s) -LineEditAction::LineEditAction(const TQString &text, const TQObject *reciever, const char *slot, KActionCollection *parent, const char *name) - : KWidgetAction(new KLineEdit(0), text, KShortcut(0), reciever, slot, parent, name) +LineEditAction::LineEditAction(const TQString &text, const TQObject *reciever, const char *slot, TDEActionCollection *parent, const char *name) + : KWidgetAction(new KLineEdit(0), text, TDEShortcut(0), reciever, slot, parent, name) { setAutoSized(true); } diff --git a/noatun-plugins/oblique/view.h b/noatun-plugins/oblique/view.h index 86ecece..397fc62 100644 --- a/noatun-plugins/oblique/view.h +++ b/noatun-plugins/oblique/view.h @@ -13,7 +13,7 @@ class SchemaListAction; class TabWidget; -class View : public KMainWindow +class View : public TDEMainWindow { Q_OBJECT @@ -21,7 +21,7 @@ Q_OBJECT Tree *mTree; TQValueList<Tree*> mTrees; TabWidget *mTabs; - KAction *mRemoveTabAction; + TDEAction *mRemoveTabAction; SchemaListAction *mSchemaListAction; public: @@ -62,7 +62,7 @@ class LineEditAction : public KWidgetAction Q_OBJECT public: - LineEditAction(const TQString &text, const TQObject *reciever, const char *slot, KActionCollection *parent, const char *name); + LineEditAction(const TQString &text, const TQObject *reciever, const char *slot, TDEActionCollection *parent, const char *name); KLineEdit *widget() { return static_cast<KLineEdit*>(KWidgetAction::widget()); } KLineEdit *lineEdit() { return widget(); } |