diff options
Diffstat (limited to 'konqueror/sidebar/sidebar_widget.cpp')
-rw-r--r-- | konqueror/sidebar/sidebar_widget.cpp | 142 |
1 files changed, 71 insertions, 71 deletions
diff --git a/konqueror/sidebar/sidebar_widget.cpp b/konqueror/sidebar/sidebar_widget.cpp index 8fe85f512..94734851c 100644 --- a/konqueror/sidebar/sidebar_widget.cpp +++ b/konqueror/sidebar/sidebar_widget.cpp @@ -25,11 +25,11 @@ #include <tqwhatsthis.h> #include <tqlayout.h> #include <tqstringlist.h> -#include <tqucomextra_p.h> +#include <private/tqucomextra_p.h> #include <tdelocale.h> -#include <ksimpleconfig.h> -#include <kstandarddirs.h> +#include <tdesimpleconfig.h> +#include <tdestandarddirs.h> #include <kdebug.h> #include <kiconloader.h> #include <kicondialog.h> @@ -39,11 +39,11 @@ #include <tdefileitem.h> #include <tdeio/netaccess.h> #include <tdepopupmenu.h> -#include <kprocess.h> +#include <tdeprocess.h> #include <kurlrequesterdlg.h> #include <kinputdialog.h> #include <tdefiledialog.h> -#include <kdesktopfile.h> +#include <tdedesktopfile.h> #include <tdeapplication.h> #include "konqsidebar.h" @@ -60,8 +60,8 @@ addBackEnd::addBackEnd(TQWidget *parent, class TQPopupMenu *addmenu, m_universal=universal; m_currentProfile = currentProfile; menu = addmenu; - connect(menu,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(aboutToShowAddMenu())); - connect(menu,TQT_SIGNAL(activated(int)),this,TQT_SLOT(activatedAddMenu(int))); + connect(menu,TQ_SIGNAL(aboutToShow()),this,TQ_SLOT(aboutToShowAddMenu())); + connect(menu,TQ_SIGNAL(activated(int)),this,TQ_SLOT(activatedAddMenu(int))); } void addBackEnd::aboutToShowAddMenu() @@ -88,9 +88,9 @@ void addBackEnd::aboutToShowAddMenu() for (TQStringList::Iterator it = list.begin(); it != list.end(); ++it, i++ ) { - KDesktopFile *confFile; + TDEDesktopFile *confFile; - confFile = new KDesktopFile(*it, true); + confFile = new TDEDesktopFile(*it, true); if (! confFile->tryExec()) { delete confFile; i--; @@ -211,7 +211,7 @@ void addBackEnd::activatedAddMenu(int id) if (!myFile.isEmpty()) { kdDebug() <<"trying to save to file: "<<myFile << endl; - KSimpleConfig scf(myFile,false); + TDESimpleConfig scf(myFile,false); scf.setGroup("Desktop Entry"); for (TQMap<TQString,TQString>::ConstIterator it = map.begin(); it != map.end(); ++it) { kdDebug() <<"writing:"<<it.key()<<" / "<<it.data()<<endl; @@ -268,7 +268,7 @@ Sidebar_Widget::Sidebar_Widget(TQWidget *parent, KParts::ReadOnlyPart *par, cons if (splitterWidget) { splitterWidget->setResizeMode(parent, TQSplitter::FollowSizeHint); splitterWidget->setOpaqueResize( false ); - connect(splitterWidget,TQT_SIGNAL(setRubberbandCalled()),TQT_SLOT(userMovedSplitter())); + connect(splitterWidget,TQ_SIGNAL(setRubberbandCalled()),TQ_SLOT(userMovedSplitter())); } m_area = new KDockArea(this); @@ -292,22 +292,22 @@ Sidebar_Widget::Sidebar_Widget(TQWidget *parent, KParts::ReadOnlyPart *par, cons if (!m_universalMode) { m_menu->insertItem(SmallIconSet("remove"), i18n("Close Navigation Panel"), - par, TQT_SLOT(deleteLater())); + par, TQ_SLOT(deleteLater())); } - connect(m_menu, TQT_SIGNAL(aboutToShow()), - this, TQT_SLOT(aboutToShowConfigMenu())); - connect(m_menu, TQT_SIGNAL(activated(int)), - this, TQT_SLOT(activatedMenu(int))); + connect(m_menu, TQ_SIGNAL(aboutToShow()), + this, TQ_SLOT(aboutToShowConfigMenu())); + connect(m_menu, TQ_SIGNAL(activated(int)), + this, TQ_SLOT(activatedMenu(int))); m_buttonPopup = 0; addBackEnd *ab = new addBackEnd(this, addMenu, universalMode, currentProfile, "Sidebar_Widget-addBackEnd"); - connect(ab, TQT_SIGNAL(updateNeeded()), - this, TQT_SLOT(updateButtons())); - connect(ab, TQT_SIGNAL(initialCopyNeeded()), - this, TQT_SLOT(finishRollBack())); + connect(ab, TQ_SIGNAL(updateNeeded()), + this, TQ_SLOT(updateButtons())); + connect(ab, TQ_SIGNAL(initialCopyNeeded()), + this, TQ_SLOT(finishRollBack())); initialCopy(); @@ -327,13 +327,13 @@ Sidebar_Widget::Sidebar_Widget(TQWidget *parent, KParts::ReadOnlyPart *par, cons m_menu->setItemVisible(2, !m_immutableShowTabsLeft); m_menu->setItemVisible(3, !m_immutableShowExtraButtons); - connect(&m_configTimer, TQT_SIGNAL(timeout()), - this, TQT_SLOT(saveConfig())); + connect(&m_configTimer, TQ_SIGNAL(timeout()), + this, TQ_SLOT(saveConfig())); m_somethingVisible = !m_openViews.isEmpty(); doLayout(); - TQTimer::singleShot(0,this,TQT_SLOT(createButtons())); - connect(m_area, TQT_SIGNAL(dockWidgetHasUndocked(KDockWidget*)), - this, TQT_SLOT(dockWidgetHasUndocked(KDockWidget*))); + TQTimer::singleShot(0,this,TQ_SLOT(createButtons())); + connect(m_area, TQ_SIGNAL(dockWidgetHasUndocked(KDockWidget*)), + this, TQ_SLOT(dockWidgetHasUndocked(KDockWidget*))); } void Sidebar_Widget::addWebSideBar(const KURL& url, const TQString& /*name*/) { @@ -349,7 +349,7 @@ void Sidebar_Widget::addWebSideBar(const KURL& url, const TQString& /*name*/) { // Go through list to see which ones exist. Check them for the URL TQStringList files = TQDir(list).entryList("websidebarplugin*.desktop"); for (TQStringList::Iterator it = files.begin(); it != files.end(); ++it){ - KSimpleConfig scf(list + *it, false); + TDESimpleConfig scf(list + *it, false); scf.setGroup("Desktop Entry"); if (scf.readPathEntry("URL", TQString::null) == url.url()) { // We already have this one! @@ -363,7 +363,7 @@ void Sidebar_Widget::addWebSideBar(const KURL& url, const TQString& /*name*/) { TQString myFile = findFileName(&tmpl,m_universalMode,m_currentProfile); if (!myFile.isEmpty()) { - KSimpleConfig scf(myFile, false); + TDESimpleConfig scf(myFile, false); scf.setGroup("Desktop Entry"); scf.writeEntry("Type", "Link"); scf.writePathEntry("URL", url.url()); @@ -373,7 +373,7 @@ void Sidebar_Widget::addWebSideBar(const KURL& url, const TQString& /*name*/) { scf.writeEntry("X-TDE-KonqSidebarModule", "konqsidebar_web"); scf.sync(); - TQTimer::singleShot(0,this,TQT_SLOT(updateButtons())); + TQTimer::singleShot(0,this,TQ_SLOT(updateButtons())); } } @@ -382,7 +382,7 @@ void Sidebar_Widget::finishRollBack() { m_path = TDEGlobal::dirs()->saveLocation("data",m_relPath,true); initialCopy(); - TQTimer::singleShot(0,this,TQT_SLOT(updateButtons())); + TQTimer::singleShot(0,this,TQ_SLOT(updateButtons())); } @@ -438,7 +438,7 @@ void Sidebar_Widget::initialCopy() return; //oups; int nVersion=-1; - KSimpleConfig lcfg(m_path+".version"); + TDESimpleConfig lcfg(m_path+".version"); int lVersion=lcfg.readNumEntry("Version",0); @@ -451,7 +451,7 @@ void Sidebar_Widget::initialCopy() if ( !dirtree_dir.isEmpty() && dirtree_dir != m_path ) { - KSimpleConfig gcfg(dirtree_dir+".version"); + TDESimpleConfig gcfg(dirtree_dir+".version"); int gversion = gcfg.readNumEntry("Version", 1); nVersion=(nVersion>gversion)?nVersion:gversion; if (lVersion >= gversion) @@ -504,11 +504,11 @@ void Sidebar_Widget::buttonPopupActivate(int id) kdDebug()<<"New Icon Name:"<<iconname<<endl; if (!iconname.isEmpty()) { - KSimpleConfig ksc(m_path+m_currentButton->file); + TDESimpleConfig ksc(m_path+m_currentButton->file); ksc.setGroup("Desktop Entry"); ksc.writeEntry("Icon",iconname); ksc.sync(); - TQTimer::singleShot(0,this,TQT_SLOT(updateButtons())); + TQTimer::singleShot(0,this,TQ_SLOT(updateButtons())); } break; } @@ -518,7 +518,7 @@ void Sidebar_Widget::buttonPopupActivate(int id) dlg->fileDialog()->setMode( KFile::Directory ); if (dlg->exec()) { - KSimpleConfig ksc(m_path+m_currentButton->file); + TDESimpleConfig ksc(m_path+m_currentButton->file); ksc.setGroup("Desktop Entry"); if ( !dlg->selectedURL().isValid()) { @@ -531,7 +531,7 @@ void Sidebar_Widget::buttonPopupActivate(int id) //ksc.writeEntry("Name",newurl); ksc.writePathEntry("URL",newurl); ksc.sync(); - TQTimer::singleShot(0,this,TQT_SLOT(updateButtons())); + TQTimer::singleShot(0,this,TQ_SLOT(updateButtons())); } } delete dlg; @@ -545,7 +545,7 @@ void Sidebar_Widget::buttonPopupActivate(int id) TQFile f(m_path+m_currentButton->file); if (!f.remove()) tqDebug("Error, file not deleted"); - TQTimer::singleShot(0,this,TQT_SLOT(updateButtons())); + TQTimer::singleShot(0,this,TQ_SLOT(updateButtons())); } break; } @@ -560,13 +560,13 @@ void Sidebar_Widget::buttonPopupActivate(int id) if(ok) { // Write the name in the .desktop file of this side button. - KSimpleConfig ksc(m_path+m_currentButton->file); + TDESimpleConfig ksc(m_path+m_currentButton->file); ksc.setGroup("Desktop Entry"); ksc.writeEntry("Name", name, true, false, true /*localized*/ ); ksc.sync(); // Update the buttons with a TQTimer (why?) - TQTimer::singleShot(0,this,TQT_SLOT(updateButtons())); + TQTimer::singleShot(0,this,TQ_SLOT(updateButtons())); } break; } @@ -815,11 +815,11 @@ bool Sidebar_Widget::addButton(const TQString &desktoppath,int pos) int lastbtn = m_buttons.count(); m_buttons.resize(m_buttons.size()+1); - KSimpleConfig *confFile; + TDESimpleConfig *confFile; kdDebug() << "addButton:" << (m_path+desktoppath) << endl; - confFile = new KSimpleConfig(m_path+desktoppath,true); + confFile = new TDESimpleConfig(m_path+desktoppath,true); confFile->setGroup("Desktop Entry"); TQString icon = confFile->readEntry("Icon"); @@ -838,7 +838,7 @@ bool Sidebar_Widget::addButton(const TQString &desktoppath,int pos) /*int id=*/m_buttons.insert(lastbtn, bi); KMultiTabBarTab *tab = m_buttonBar->tab(lastbtn); tab->installEventFilter(this); - connect(tab,TQT_SIGNAL(clicked(int)),this,TQT_SLOT(showHidePage(int))); + connect(tab,TQ_SIGNAL(clicked(int)),this,TQ_SLOT(showHidePage(int))); // Set Whats This help // This uses the comments in the .desktop files @@ -852,7 +852,7 @@ bool Sidebar_Widget::addButton(const TQString &desktoppath,int pos) bool Sidebar_Widget::eventFilter(TQObject *obj, TQEvent *ev) { - if ( kapp->authorize( "action/konqsidebarmenu" ) ) { + if ( tdeApp->authorize( "action/konqsidebarmenu" ) ) { if (ev->type()==TQEvent::MouseButtonPress && ((TQMouseEvent *)ev)->button()==TQt::RightButton) { KMultiTabBarTab *bt=dynamic_cast<KMultiTabBarTab*>(obj); @@ -882,8 +882,8 @@ bool Sidebar_Widget::eventFilter(TQObject *obj, TQEvent *ev) m_buttonPopup->insertItem(SmallIconSet("edit-delete"), i18n("Remove"),3); m_buttonPopup->insertSeparator(); m_buttonPopup->insertItem(SmallIconSet("configure"), i18n("Configure Navigation Panel"), m_menu, 4); - connect(m_buttonPopup, TQT_SIGNAL(activated(int)), - this, TQT_SLOT(buttonPopupActivate(int))); + connect(m_buttonPopup, TQ_SIGNAL(activated(int)), + this, TQ_SLOT(buttonPopupActivate(int))); } m_buttonPopup->setItemEnabled(2,!m_currentButton->URL.isEmpty()); m_buttonPopup->changeTitle(50,SmallIcon(m_currentButton->iconName), @@ -901,7 +901,7 @@ bool Sidebar_Widget::eventFilter(TQObject *obj, TQEvent *ev) void Sidebar_Widget::mousePressEvent(TQMouseEvent *ev) { - if ( kapp->authorize( "action/konqsidebarmenu" ) ) { + if ( tdeApp->authorize( "action/konqsidebarmenu" ) ) { if (ev->type()==TQEvent::MouseButtonPress && ((TQMouseEvent *)ev)->button()==TQt::RightButton) { m_menu->exec(TQCursor::pos()); } @@ -943,8 +943,8 @@ KParts::BrowserExtension *Sidebar_Widget::getExtension() bool Sidebar_Widget::createView( ButtonInfo *data) { bool ret = true; - KSimpleConfig *confFile; - confFile = new KSimpleConfig(data->file,true); + TDESimpleConfig *confFile; + confFile = new TDESimpleConfig(data->file,true); confFile->setGroup("Desktop Entry"); data->dock = m_area->createDockWidget(confFile->readEntry("Name",i18n("Unknown")),0); @@ -961,11 +961,11 @@ bool Sidebar_Widget::createView( ButtonInfo *data) KDockWidget::DockBottom/*|KDockWidget::DockDesktop*/); data->dock->setDockSite(KDockWidget::DockTop|KDockWidget::DockBottom); connectModule(data->module); - connect(this, TQT_SIGNAL(fileSelection(const KFileItemList&)), - data->module, TQT_SLOT(openPreview(const KFileItemList&))); + connect(this, TQ_SIGNAL(fileSelection(const KFileItemList&)), + data->module, TQ_SLOT(openPreview(const KFileItemList&))); - connect(this, TQT_SIGNAL(fileMouseOver(const KFileItem&)), - data->module, TQT_SLOT(openPreviewOnMouseOver(const KFileItem&))); + connect(this, TQ_SIGNAL(fileMouseOver(const KFileItem&)), + data->module, TQ_SLOT(openPreviewOnMouseOver(const KFileItem&))); } delete confFile; @@ -998,14 +998,14 @@ void Sidebar_Widget::showHidePage(int page) m_buttonBar->setTab(page,true); connect(info->module, - TQT_SIGNAL(setIcon(const TQString&)), + TQ_SIGNAL(setIcon(const TQString&)), m_buttonBar->tab(page), - TQT_SLOT(setIcon(const TQString&))); + TQ_SLOT(setIcon(const TQString&))); connect(info->module, - TQT_SIGNAL(setCaption(const TQString&)), + TQ_SIGNAL(setCaption(const TQString&)), m_buttonBar->tab(page), - TQT_SLOT(setText(const TQString&))); + TQ_SLOT(setText(const TQString&))); if (m_singleWidgetMode) { @@ -1217,51 +1217,51 @@ void Sidebar_Widget::popupMenu( KXMLGUIClient *client, void Sidebar_Widget::connectModule(TQObject *mod) { if (mod->metaObject()->findSignal("started(TDEIO::Job*)") != -1) { - connect(mod,TQT_SIGNAL(started(TDEIO::Job *)),this, TQT_SIGNAL(started(TDEIO::Job*))); + connect(mod,TQ_SIGNAL(started(TDEIO::Job *)),this, TQ_SIGNAL(started(TDEIO::Job*))); } if (mod->metaObject()->findSignal("completed()") != -1) { - connect(mod,TQT_SIGNAL(completed()),this,TQT_SIGNAL(completed())); + connect(mod,TQ_SIGNAL(completed()),this,TQ_SIGNAL(completed())); } if (mod->metaObject()->findSignal("popupMenu(const TQPoint&,const KURL&,const TQString&,mode_t)") != -1) { - connect(mod,TQT_SIGNAL(popupMenu( const TQPoint &, const KURL &, - const TQString &, mode_t)),this,TQT_SLOT(popupMenu( const + connect(mod,TQ_SIGNAL(popupMenu( const TQPoint &, const KURL &, + const TQString &, mode_t)),this,TQ_SLOT(popupMenu( const TQPoint &, const KURL&, const TQString &, mode_t))); } if (mod->metaObject()->findSignal("popupMenu(KXMLGUIClient*,const TQPoint &,const KURL&,const TQString&,mode_t)") != -1) { - connect(mod,TQT_SIGNAL(popupMenu( KXMLGUIClient *, const TQPoint &, + connect(mod,TQ_SIGNAL(popupMenu( KXMLGUIClient *, const TQPoint &, const KURL &,const TQString &, mode_t)),this, - TQT_SLOT(popupMenu( KXMLGUIClient *, const TQPoint &, + TQ_SLOT(popupMenu( KXMLGUIClient *, const TQPoint &, const KURL &,const TQString &, mode_t))); } if (mod->metaObject()->findSignal("popupMenu(const TQPoint&,const KFileItemList&)") != -1) { - connect(mod,TQT_SIGNAL(popupMenu( const TQPoint &, const KFileItemList & )), - this,TQT_SLOT(popupMenu( const TQPoint &, const KFileItemList & ))); + connect(mod,TQ_SIGNAL(popupMenu( const TQPoint &, const KFileItemList & )), + this,TQ_SLOT(popupMenu( const TQPoint &, const KFileItemList & ))); } if (mod->metaObject()->findSignal("openURLRequest(const KURL&,const KParts::URLArgs&)") != -1) { - connect(mod,TQT_SIGNAL(openURLRequest( const KURL &, const KParts::URLArgs &)), - this,TQT_SLOT(openURLRequest( const KURL &, const KParts::URLArgs &))); + connect(mod,TQ_SIGNAL(openURLRequest( const KURL &, const KParts::URLArgs &)), + this,TQ_SLOT(openURLRequest( const KURL &, const KParts::URLArgs &))); } if (mod->metaObject()->findSignal("submitFormRequest(const char*,const TQString&,const TQByteArray&,const TQString&,const TQString&,const TQString&)") != -1) { connect(mod, - TQT_SIGNAL(submitFormRequest(const char*,const TQString&,const TQByteArray&,const TQString&,const TQString&,const TQString&)), + TQ_SIGNAL(submitFormRequest(const char*,const TQString&,const TQByteArray&,const TQString&,const TQString&,const TQString&)), this, - TQT_SLOT(submitFormRequest(const char*,const TQString&,const TQByteArray&,const TQString&,const TQString&,const TQString&))); + TQ_SLOT(submitFormRequest(const char*,const TQString&,const TQByteArray&,const TQString&,const TQString&,const TQString&))); } if (mod->metaObject()->findSignal("enableAction(const char*,bool)") != -1) { - connect(mod,TQT_SIGNAL(enableAction( const char *, bool)), - this,TQT_SLOT(enableAction(const char *, bool))); + connect(mod,TQ_SIGNAL(enableAction( const char *, bool)), + this,TQ_SLOT(enableAction(const char *, bool))); } if (mod->metaObject()->findSignal("createNewWindow(const KURL&,const KParts::URLArgs&)") != -1) { - connect(mod,TQT_SIGNAL(createNewWindow( const KURL &, const KParts::URLArgs &)), - this,TQT_SLOT(createNewWindow( const KURL &, const KParts::URLArgs &))); + connect(mod,TQ_SIGNAL(createNewWindow( const KURL &, const KParts::URLArgs &)), + this,TQ_SLOT(createNewWindow( const KURL &, const KParts::URLArgs &))); } } |