diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2016-03-25 20:06:45 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2016-03-25 20:06:45 +0100 |
commit | 88b7febc2393324ee14940c1c41a8ddc342c35f6 (patch) | |
tree | b9a917fd3a40988e6e0134490f5357e5335c1c70 /sidebar | |
parent | 2ee99ab520931c5efe91123c85ba10064a45e95d (diff) | |
download | tde-style-baghira-88b7febc2393324ee14940c1c41a8ddc342c35f6.tar.gz tde-style-baghira-88b7febc2393324ee14940c1c41a8ddc342c35f6.zip |
Initial TDE conversion
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'sidebar')
-rw-r--r-- | sidebar/Makefile.am | 2 | ||||
-rw-r--r-- | sidebar/baghirasidebar.cpp | 8 | ||||
-rw-r--r-- | sidebar/baghirasidebar.desktop | 2 | ||||
-rw-r--r-- | sidebar/baghirasidebar.h | 6 | ||||
-rw-r--r-- | sidebar/baghirasidebar_add.desktop | 2 | ||||
-rw-r--r-- | sidebar/configure.in.in | 2 | ||||
-rw-r--r-- | sidebar/dndlistbox.cpp | 50 | ||||
-rw-r--r-- | sidebar/dndlistbox.h | 12 | ||||
-rw-r--r-- | sidebar/linkconfig.ui | 2 | ||||
-rw-r--r-- | sidebar/linkview.cpp | 8 | ||||
-rw-r--r-- | sidebar/listboxlink.cpp | 2 | ||||
-rw-r--r-- | sidebar/listboxlink.h | 2 |
12 files changed, 49 insertions, 49 deletions
diff --git a/sidebar/Makefile.am b/sidebar/Makefile.am index aef9a69..d0e6040 100644 --- a/sidebar/Makefile.am +++ b/sidebar/Makefile.am @@ -7,7 +7,7 @@ noinst_HEADERS = baghiralinkdrag.h baghirasidebar.h linkview.h listboxlink.h dnd konqsidebar_baghirasidebar_la_SOURCES = baghiralinkdrag.cpp baghirasidebar.cpp linkview.cpp listboxlink.cpp dndlistbox.cpp linkconfig.ui baghirasidebariface.skel konqsidebar_baghirasidebar_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -lkonqsidebarplugin -konqsidebar_baghirasidebar_la_LIBADD = $(LIB_QT) -lDCOP $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KPARTS) $(LIB_KFILE) +konqsidebar_baghirasidebar_la_LIBADD = $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEPARTS) $(LIB_KFILE) baghirasidebar_entry_DATA = baghirasidebar.desktop baghirasidebar_entrydir = $(kde_datadir)/konqsidebartng/entries diff --git a/sidebar/baghirasidebar.cpp b/sidebar/baghirasidebar.cpp index e24ebdf..e5f6f69 100644 --- a/sidebar/baghirasidebar.cpp +++ b/sidebar/baghirasidebar.cpp @@ -9,7 +9,7 @@ #include "baghirasidebar.h" #include "baghirasidebar.moc" -baghiraSidebar::baghiraSidebar(KInstance *inst,TQObject *parent,TQWidget *widgetParent, TQString &desktopName, const char* name): +baghiraSidebar::baghiraSidebar(TDEInstance *inst,TQObject *parent,TQWidget *widgetParent, TQString &desktopName, const char* name): KonqSidebarPlugin(inst,parent,widgetParent,desktopName,name) { scrollView = new LinkView(widgetParent); @@ -36,7 +36,7 @@ void baghiraSidebar::handleURL(const KURL &url) scrollView->Hardware()->setSelected(item, FALSE); return; } - item = scrollView->Locations()->KListBox::currentItem(); + item = scrollView->Locations()->TDEListBox::currentItem(); if (scrollView->Locations()->isSelected(item) && KURL(((ListBoxLink*)(scrollView->Locations()->item(item)))->URL()).url() != url.url() ) { @@ -53,7 +53,7 @@ extern "C" { map->insert("Icon", "bab_brushed"); map->insert("Name", "Baghira Sidebar"); map->insert("Open", "true"); - map->insert("X-KDE-KonqSidebarModule","konqsidebar_baghirasidebar"); + map->insert("X-TDE-KonqSidebarModule","konqsidebar_baghirasidebar"); fn->setLatin1("baghirasidebar%1.desktop"); return true; } @@ -61,7 +61,7 @@ extern "C" { extern "C" { - void* create_konqsidebar_baghirasidebar(KInstance *instance,TQObject *par,TQWidget *widp,TQString &desktopname,const char *name) + void* create_konqsidebar_baghirasidebar(TDEInstance *instance,TQObject *par,TQWidget *widp,TQString &desktopname,const char *name) { return new baghiraSidebar(instance,par,widp,desktopname,name); } diff --git a/sidebar/baghirasidebar.desktop b/sidebar/baghirasidebar.desktop index ba6b560..fb413a9 100644 --- a/sidebar/baghirasidebar.desktop +++ b/sidebar/baghirasidebar.desktop @@ -8,5 +8,5 @@ Name=baghirasidebar Name[xx]=xxbaghirasidebarxx Open=false -X-KDE-KonqSidebarModule=konqsidebar_baghirasidebar +X-TDE-KonqSidebarModule=konqsidebar_baghirasidebar diff --git a/sidebar/baghirasidebar.h b/sidebar/baghirasidebar.h index d0b9929..7591cf7 100644 --- a/sidebar/baghirasidebar.h +++ b/sidebar/baghirasidebar.h @@ -7,10 +7,10 @@ #endif #include <konqsidebarplugin.h> -#include <kconfig.h> +#include <tdeconfig.h> class LinkView; -class KListBox; +class TDEListBox; class TQListBoxItem; class baghiraSidebar : public KonqSidebarPlugin @@ -27,7 +27,7 @@ public: * @param desktopName The filename of the configuration file. * @param name A TQt object name for your plugin. **/ - baghiraSidebar(KInstance *inst,TQObject *parent, TQWidget *widgetParent, TQString &desktopName, const char* name=0); + baghiraSidebar(TDEInstance *inst,TQObject *parent, TQWidget *widgetParent, TQString &desktopName, const char* name=0); /** destructor */ ~baghiraSidebar(); diff --git a/sidebar/baghirasidebar_add.desktop b/sidebar/baghirasidebar_add.desktop index 634b658..e7083ca 100644 --- a/sidebar/baghirasidebar_add.desktop +++ b/sidebar/baghirasidebar_add.desktop @@ -7,4 +7,4 @@ Name[de]=Baghira Sideabr hinzufügen Open=false Type=Link URL= -X-KDE-KonqSidebarAddModule=konqsidebar_baghirasidebar +X-TDE-KonqSidebarAddModule=konqsidebar_baghirasidebar diff --git a/sidebar/configure.in.in b/sidebar/configure.in.in index 72f8843..29a7674 100644 --- a/sidebar/configure.in.in +++ b/sidebar/configure.in.in @@ -1,2 +1,2 @@ -AM_CONDITIONAL( HAVE_3_4, test $(kde-config --version | grep "KDE:" | cut -d" " -f2 | cut -d"." -f2) -gt 3 ) +AM_CONDITIONAL( HAVE_3_4, test $(tde-config --version | grep "KDE:" | cut -d" " -f2 | cut -d"." -f2) -gt 3 ) diff --git a/sidebar/dndlistbox.cpp b/sidebar/dndlistbox.cpp index 4f8928d..aac7484 100644 --- a/sidebar/dndlistbox.cpp +++ b/sidebar/dndlistbox.cpp @@ -4,17 +4,17 @@ #include <kurl.h> #include <tqstrlist.h> #include <tqtimer.h> -#include <kapplication.h> -#include <klocale.h> -#include <kfileitem.h> -#include <kpopupmenu.h> +#include <tdeapplication.h> +#include <tdelocale.h> +#include <tdefileitem.h> +#include <tdepopupmenu.h> #include <kicondialog.h> #include <kiconloader.h> #include <klineedit.h> #include <kprocess.h> #include <kurlrequester.h> #include <kstandarddirs.h> -#include <kwin.h> +#include <twin.h> #include <tqclipboard.h> #include "listboxlink.h" #include "linkconfig.h" @@ -37,12 +37,12 @@ #define MEDIA_PROPS 12 #define MEDIALIST_PROPS 13 -ResizingLinkBox::ResizingLinkBox( TQWidget * parent, const char * name, WFlags f ) : KListBox( parent, name, f) +ResizingLinkBox::ResizingLinkBox( TQWidget * parent, const char * name, WFlags f ) : TDEListBox( parent, name, f) { - KConfig config(TQDir::homeDirPath() + "/.qt/baghirarc"); + TDEConfig config(TQDir::homeDirPath() + "/.qt/baghirarc"); config.setGroup("Sidebar"); size_ = config.readNumEntry (TQString(name) + "_IconSize", 48); - popupMenu = new KPopupMenu; + popupMenu = new TDEPopupMenu; popupMenu->insertTitle (i18n("Icon Size"),122,122); popupMenu->insertItem("16x16", this, SLOT(setIconSize(int)),0,16,123); popupMenu->insertItem("22x22", this, SLOT(setIconSize(int)),0,22,124); @@ -54,14 +54,14 @@ ResizingLinkBox::ResizingLinkBox( TQWidget * parent, const char * name, WFlags f void ResizingLinkBox::insertItem( const TQListBoxItem *lbi, int index ) { - KListBox::insertItem( lbi, index ); + TDEListBox::insertItem( lbi, index ); if (height() <= numRows()*itemHeight()) emit itemNumberChanged(TRUE); } void ResizingLinkBox::insertItem( const TQListBoxItem *lbi, const TQListBoxItem *after ) { - KListBox::insertItem( lbi, after ); + TDEListBox::insertItem( lbi, after ); if (height() <= numRows()*itemHeight()) emit itemNumberChanged(TRUE); } @@ -75,7 +75,7 @@ void ResizingLinkBox::insertItem( const TQString & icon, const TQString & title, void ResizingLinkBox::removeItem( int index ) { blockSignals ( true ); - KListBox::removeItem(index); + TDEListBox::removeItem(index); blockSignals ( false ); emit itemNumberChanged(FALSE); } @@ -83,7 +83,7 @@ void ResizingLinkBox::removeItem( int index ) void ResizingLinkBox::setIconSize(int size) { size_ = size; - KConfig *config = new KConfig(TQDir::homeDirPath() + "/.qt/baghirarc"); + TDEConfig *config = new TDEConfig(TQDir::homeDirPath() + "/.qt/baghirarc"); config->setGroup("Sidebar"); config->writeEntry (TQString(name()) + "_IconSize", size); config->sync(); @@ -102,14 +102,14 @@ void ResizingLinkBox::setIconSize(int size) { insertItem( new ListBoxLink(runner->icon(), size, runner->text(), runner->URL()), i ); } - KListBox::removeItem(i+1); + TDEListBox::removeItem(i+1); } blockSignals ( false ); } void ResizingLinkBox::mousePressEvent ( TQMouseEvent *mpe ) { - KListBox::mousePressEvent( mpe ); + TDEListBox::mousePressEvent( mpe ); } void ResizingLinkBox::mouseReleaseEvent ( TQMouseEvent *mpe ) @@ -118,27 +118,27 @@ void ResizingLinkBox::mouseReleaseEvent ( TQMouseEvent *mpe ) { ListBoxLink *link = (ListBoxLink*)itemAt(mpe->pos()); if (isSelected(link)) emit clicked(link); - KListBox::mousePressEvent( mpe ); + TDEListBox::mousePressEvent( mpe ); return; } - KListBox::mouseReleaseEvent( mpe ); + TDEListBox::mouseReleaseEvent( mpe ); } void ResizingLinkBox::contentsWheelEvent ( TQWheelEvent * we ) { if (we->state() == TQt::ControlButton) - KListBox::contentsWheelEvent ( we ); + TDEListBox::contentsWheelEvent ( we ); else emit scrolled(0, -we->delta()); } MediaListBox::MediaListBox( TQWidget * parent, const char * name, WFlags f ) : ResizingLinkBox(parent, name, f), DCOPObject("BaghiraSidebarIface") { - KConfig config(TQDir::homeDirPath() + "/.qt/baghirarc"); + TDEConfig config(TQDir::homeDirPath() + "/.qt/baghirarc"); config.setGroup("Sidebar"); hiddenDevices = config.readListEntry("HiddenDevices"); currentFloppy = 0L; - devicePopup = new KPopupMenu(this); + devicePopup = new TDEPopupMenu(this); devicePopup->setCheckable ( true ); popupMenu->insertItem(i18n("Device List"), devicePopup, 1, 0); popupMenu->insertSeparator( 0 ); @@ -151,7 +151,7 @@ MediaListBox::MediaListBox( TQWidget * parent, const char * name, WFlags f ) : R insertItem(new ListBoxDevice("network", size_, i18n("Network"), "lan:/localhost", "", "", TRUE, FALSE, FALSE)); #endif insertItem(new ListBoxDevice("hdd_mount", size_, i18n("Startvolume"), TQDir::rootDirPath(), "", "", TRUE, FALSE, FALSE)); - client = KApplication::dcopClient(); + client = TDEApplication::dcopClient(); client->connectDCOPSignal("kded", "mediamanager", "mediumAdded(TQString)", "BaghiraSidebarIface", "mediumAdded(TQString)", FALSE); client->connectDCOPSignal("kded", "mediamanager", "mediumRemoved(TQString)", "BaghiraSidebarIface", "mediumRemoved(const TQString)", FALSE); client->connectDCOPSignal("kded", "mediamanager", "mediumChanged(TQString)", "BaghiraSidebarIface", "mediumChanged(TQString)", FALSE); @@ -206,7 +206,7 @@ MediaListBox::~MediaListBox() ListBoxDevice *runner; for ( runner = deviceList.first(); runner; runner = deviceList.next() ) hiddenDevices.append(runner->name()); - KConfig config(TQDir::homeDirPath() + "/.qt/baghirarc"); + TDEConfig config(TQDir::homeDirPath() + "/.qt/baghirarc"); config.setGroup("Sidebar"); config.writeEntry("HiddenDevices", hiddenDevices); } @@ -221,9 +221,9 @@ void MediaListBox::kfloppy() { if (currentFloppy) { - KProcess proc; + TDEProcess proc; proc << "kfloppy" << currentFloppy->mountPoint(); - proc.start(KProcess::DontCare); + proc.start(TDEProcess::DontCare); proc.detach(); currentFloppy = 0L; } @@ -433,11 +433,11 @@ void MediaListBox::mousePressEvent ( TQMouseEvent *mpe ) int dy = itemRect(device).y(); if ((device->removable() || device->ejectable()) && device->mounted() && mpe->y() > dy+11 && mpe->y() < dy+33) { - KProcess proc; + TDEProcess proc; device->ejectable()? proc << "kdeeject" /*<< "-q"*/ << device->mountPoint(): proc << "umount" << device->mountPoint(); // umount? - proc.start(KProcess::DontCare); + proc.start(TDEProcess::DontCare); proc.detach(); return; } diff --git a/sidebar/dndlistbox.h b/sidebar/dndlistbox.h index 25e6e85..1bd25e2 100644 --- a/sidebar/dndlistbox.h +++ b/sidebar/dndlistbox.h @@ -6,7 +6,7 @@ #include <config.h> #endif -#include <klistbox.h> +#include <tdelistbox.h> #include <tqptrlist.h> #include <tqstringlist.h> #include "baghirasidebariface.h" @@ -18,13 +18,13 @@ class TQDragLeaveEvent; class TQDropEvent; class TQKeyEvent; class TQPoint; -class KPopupMenu; +class TDEPopupMenu; class LinkConfig; class ListBoxLink; class ListBoxDevice; class TQResizeEvent; -class ResizingLinkBox : public KListBox +class ResizingLinkBox : public TDEListBox { Q_OBJECT @@ -51,7 +51,7 @@ protected: void mousePressEvent ( TQMouseEvent * ); void mouseReleaseEvent ( TQMouseEvent * ); void contentsWheelEvent ( TQWheelEvent * ); - KPopupMenu *popupMenu; + TDEPopupMenu *popupMenu; uint size_; private slots: void setIconSize(int); @@ -76,7 +76,7 @@ protected: void mousePressEvent ( TQMouseEvent * ); void resizeEvent ( TQResizeEvent * ); private: - KPopupMenu *devicePopup; + TDEPopupMenu *devicePopup; DCOPClient *client; ListBoxDevice *currentFloppy; typedef TQPtrList<ListBoxDevice> DeviceList; @@ -108,7 +108,7 @@ protected: void dropEvent ( TQDropEvent * ); void startDrag(); private: - ListBoxLink *currentItem; //TODO: unshadow int KListBox::currentItem() + ListBoxLink *currentItem; //TODO: unshadow int TDEListBox::currentItem() LinkConfig *dialog; bool dragging_; void pasteURL(int mode, TQListBoxItem *after = 0); diff --git a/sidebar/linkconfig.ui b/sidebar/linkconfig.ui index db753bc..f387f47 100644 --- a/sidebar/linkconfig.ui +++ b/sidebar/linkconfig.ui @@ -124,7 +124,7 @@ </widget> </hbox> </widget> - <widget class="KIconButton" row="0" column="1"> + <widget class="TDEIconButton" row="0" column="1"> <property name="name"> <cstring>icon</cstring> </property> diff --git a/sidebar/linkview.cpp b/sidebar/linkview.cpp index fa9223b..23b6cbe 100644 --- a/sidebar/linkview.cpp +++ b/sidebar/linkview.cpp @@ -2,9 +2,9 @@ #include <stdlib.h> #include <tqcursor.h> #include <tqsplitter.h> -#include <klocale.h> +#include <tdelocale.h> #include <tqdir.h> -#include <kconfig.h> +#include <tdeconfig.h> #include <tqtimer.h> #include "dndlistbox.h" #include "listboxlink.h" @@ -144,7 +144,7 @@ void LinkView::loadLinks() { if (!locations) return; - KConfig config(TQDir::homeDirPath() + "/.qt/baghirarc"); + TDEConfig config(TQDir::homeDirPath() + "/.qt/baghirarc"); config.setGroup("Sidebar"); splitter->setSizes(config.readIntListEntry ("Sizes")); loadedLinks = (uint)config.readNumEntry("NumLinks", 0); @@ -174,7 +174,7 @@ void LinkView::saveLinks() { if (!locations) return; - KConfig *config = new KConfig(TQDir::homeDirPath() + "/.qt/baghirarc"); + TDEConfig *config = new TDEConfig(TQDir::homeDirPath() + "/.qt/baghirarc"); config->setGroup("Sidebar"); config->writeEntry("Sizes", splitter->sizes()); config->writeEntry("NumLinks", (int)locations->count()); diff --git a/sidebar/listboxlink.cpp b/sidebar/listboxlink.cpp index 484fa12..87c1f82 100644 --- a/sidebar/listboxlink.cpp +++ b/sidebar/listboxlink.cpp @@ -9,7 +9,7 @@ static TQBitmap eject = TQBitmap( eject_width, eject_height, eject_bits, true ); static TQBitmap locked = TQBitmap( lock_width, lock_height, lock_bits, true ); -ListBoxLink::ListBoxLink( const TQString & icon, uint size, const TQString & title, const TQString & url): TQListBoxPixmap(KGlobal::iconLoader()->loadIcon(icon, KIcon::Desktop, size), title),url_(url),icon_(icon) +ListBoxLink::ListBoxLink( const TQString & icon, uint size, const TQString & title, const TQString & url): TQListBoxPixmap(TDEGlobal::iconLoader()->loadIcon(icon, TDEIcon::Desktop, size), title),url_(url),icon_(icon) { } diff --git a/sidebar/listboxlink.h b/sidebar/listboxlink.h index f5664e0..25b587a 100644 --- a/sidebar/listboxlink.h +++ b/sidebar/listboxlink.h @@ -8,7 +8,7 @@ #include <tqlistbox.h> -class KListBox; +class TDEListBox; class TQPainter; class TQPixmap; class TQStringList; |