diff --git a/src/bookmarkselector.cpp b/src/bookmarkselector.cpp index 49267f8738..8cd2917dc1 100644 --- a/src/bookmarkselector.cpp +++ b/src/bookmarkselector.cpp @@ -34,8 +34,8 @@ #include "dolphin.h" #include "urlnavigator.h" -BookmarkSelector::BookmarkSelector(URLNavigator* parent) : - URLButton(parent), +BookmarkSelector::BookmarkSelector(UrlNavigator* parent) : + UrlButton(parent), m_selectedIndex(0) { setFocusPolicy(Qt::NoFocus); @@ -76,14 +76,14 @@ void BookmarkSelector::updateSelection(const KUrl& url) int maxLength = 0; m_selectedIndex = -1; - // Search the bookmark which is equal to the URL or at least is a parent URL. - // If there are more than one possible parent URL candidates, choose the bookmark - // which covers the bigger range of the URL. + // Search the bookmark which is equal to the Url or at least is a parent Url. + // If there are more than one possible parent Url candidates, choose the bookmark + // which covers the bigger range of the Url. int i = 0; while (!bookmark.isNull()) { - const KUrl bookmarkURL = bookmark.url(); - if (bookmarkURL.isParentOf(url)) { - const int length = bookmarkURL.prettyUrl().length(); + const KUrl bookmarkUrl = bookmark.url(); + if (bookmarkUrl.isParentOf(url)) { + const int length = bookmarkUrl.prettyUrl().length(); if (length > maxLength) { m_selectedIndex = i; setPixmap(SmallIcon(bookmark.icon())); @@ -95,7 +95,7 @@ void BookmarkSelector::updateSelection(const KUrl& url) } if (m_selectedIndex < 0) { - // No bookmark has been found which matches to the given URL. Show + // No bookmark has been found which matches to the given Url. Show // a generic folder icon as pixmap for indication: setPixmap(SmallIcon("folder")); } diff --git a/src/bookmarkselector.h b/src/bookmarkselector.h index 209cf73103..3a967b5dc4 100644 --- a/src/bookmarkselector.h +++ b/src/bookmarkselector.h @@ -26,7 +26,7 @@ //Added by qt3to4: #include -class URLNavigator; +class UrlNavigator; class Q3PopupMenu; class KUrl; @@ -36,10 +36,10 @@ class KUrl; * The icon from the current selected bookmark is shown * inside the bookmark selector. * - * @see URLNavigator + * @see UrlNavigator * @author Peter Penz */ -class BookmarkSelector : public URLButton +class BookmarkSelector : public UrlButton { Q_OBJECT @@ -48,16 +48,16 @@ public: * @param parent Parent widget where the bookmark selector * is embedded into. */ - BookmarkSelector(URLNavigator* parent); + BookmarkSelector(UrlNavigator* parent); virtual ~BookmarkSelector(); /** - * Updates the selection dependent from the given URL \a url. The - * URL must not match exactly to one of the available bookmarks: - * The bookmark which is equal to the URL or at least is a parent URL - * is selected. If there are more than one possible parent URL candidates, - * the bookmark which covers the bigger range of the URL is selected. + * Updates the selection dependent from the given Url \a url. The + * Url must not match exactly to one of the available bookmarks: + * The bookmark which is equal to the Url or at least is a parent Url + * is selected. If there are more than one possible parent Url candidates, + * the bookmark which covers the bigger range of the Url is selected. */ void updateSelection(const KUrl& url); @@ -79,7 +79,7 @@ signals: protected: /** - * Draws the icon of the selected URL as content of the URL + * Draws the icon of the selected Url as content of the Url * selector. */ virtual void drawButton(QPainter* painter); diff --git a/src/bookmarkssettingspage.cpp b/src/bookmarkssettingspage.cpp index cab189a48f..8ee77a52cf 100644 --- a/src/bookmarkssettingspage.cpp +++ b/src/bookmarkssettingspage.cpp @@ -117,7 +117,7 @@ BookmarksSettingsPage::BookmarksSettingsPage(QWidget*parent) : Q3ListViewItem* item = new Q3ListViewItem(m_listView); item->setPixmap(PixmapIdx, SmallIcon(bookmark.icon())); item->setText(NameIdx, bookmark.text()); - item->setText(URLIdx, bookmark.url().prettyUrl()); + item->setText(UrlIdx, bookmark.url().prettyUrl()); // add hidden column to be able to retrieve the icon name again item->setText(IconIdx, bookmark.icon()); @@ -156,7 +156,7 @@ void BookmarksSettingsPage::applySettings() while (item != 0) { root.addBookmark(manager, item->text(NameIdx), - KUrl(item->text(URLIdx)), + KUrl(item->text(UrlIdx)), item->text(IconIdx)); // hidden column item = item->itemBelow(); } @@ -206,7 +206,7 @@ void BookmarksSettingsPage::slotAddButtonClicked() Q3ListViewItem* item = new Q3ListViewItem(m_listView); item->setPixmap(PixmapIdx, SmallIcon(bookmark.icon())); item->setText(NameIdx, bookmark.text()); - item->setText(URLIdx, bookmark.url().prettyUrl()); + item->setText(UrlIdx, bookmark.url().prettyUrl()); item->setText(IconIdx, bookmark.icon()); m_listView->insertItem(item); @@ -227,12 +227,12 @@ void BookmarksSettingsPage::slotEditButtonClicked() KBookmark bookmark = EditBookmarkDialog::getBookmark(i18n("Edit Bookmark"), item->text(NameIdx), - KUrl(item->text(URLIdx)), + KUrl(item->text(UrlIdx)), item->text(IconIdx)); if (!bookmark.isNull()) { item->setPixmap(PixmapIdx, SmallIcon(bookmark.icon())); item->setText(NameIdx, bookmark.text()); - item->setText(URLIdx, bookmark.url().prettyUrl()); + item->setText(UrlIdx, bookmark.url().prettyUrl()); item->setText(IconIdx, bookmark.icon()); } } @@ -297,19 +297,19 @@ void BookmarksSettingsPage::moveBookmark(int direction) pixmap = *(item->pixmap(0)); } QString name(item->text(NameIdx)); - QString url(item->text(URLIdx)); + QString url(item->text(UrlIdx)); QString icon(item->text(IconIdx)); if (selectedItem->pixmap(0) != 0) { item->setPixmap(PixmapIdx, *(selectedItem->pixmap(0))); } item->setText(NameIdx, selectedItem->text(NameIdx)); - item->setText(URLIdx, selectedItem->text(URLIdx)); + item->setText(UrlIdx, selectedItem->text(UrlIdx)); item->setText(IconIdx, selectedItem->text(IconIdx)); selectedItem->setPixmap(PixmapIdx, pixmap); selectedItem->setText(NameIdx, name); - selectedItem->setText(URLIdx, url); + selectedItem->setText(UrlIdx, url); selectedItem->setText(IconIdx, icon); m_listView->setSelected(item, true); diff --git a/src/bookmarkssettingspage.h b/src/bookmarkssettingspage.h index f9da7ad5e4..1a2f0097c0 100644 --- a/src/bookmarkssettingspage.h +++ b/src/bookmarkssettingspage.h @@ -66,7 +66,7 @@ private: enum ColumnIndex { PixmapIdx = 0, NameIdx = 1, - URLIdx = 2, + UrlIdx = 2, IconIdx = 3 }; diff --git a/src/bookmarkssidebarpage.cpp b/src/bookmarkssidebarpage.cpp index 59ff607f86..b3861aa2f4 100644 --- a/src/bookmarkssidebarpage.cpp +++ b/src/bookmarkssidebarpage.cpp @@ -98,7 +98,7 @@ void BookmarksSidebarPage::slotMouseButtonClicked(int button, Q3ListBoxItem* ite const int index = m_bookmarksList->index(item); KBookmark bookmark = DolphinSettings::instance().bookmark(index); - Dolphin::mainWin().activeView()->setURL(bookmark.url()); + Dolphin::mainWin().activeView()->setUrl(bookmark.url()); } void BookmarksSidebarPage::slotContextMenuRequested(Q3ListBoxItem* item, @@ -203,14 +203,14 @@ void BookmarksSidebarPage::adjustSelection(const KUrl& url) int maxLength = 0; int selectedIndex = -1; - // Search the bookmark which is equal to the URL or at least is a parent URL. - // If there are more than one possible parent URL candidates, choose the bookmark - // which covers the bigger range of the URL. + // Search the bookmark which is equal to the Url or at least is a parent Url. + // If there are more than one possible parent Url candidates, choose the bookmark + // which covers the bigger range of the Url. int i = 0; while (!bookmark.isNull()) { - const KUrl bookmarkURL = bookmark.url(); - if (bookmarkURL.isParentOf(url)) { - const int length = bookmarkURL.prettyUrl().length(); + const KUrl bookmarkUrl = bookmark.url(); + if (bookmarkUrl.isParentOf(url)) { + const int length = bookmarkUrl.prettyUrl().length(); if (length > maxLength) { selectedIndex = i; maxLength = length; @@ -228,13 +228,13 @@ void BookmarksSidebarPage::adjustSelection(const KUrl& url) m_bookmarksList->setSelected(currentIndex, false); } else { - // select the bookmark which is part of the current URL + // select the bookmark which is part of the current Url m_bookmarksList->setSelected(selectedIndex, true); } m_bookmarksList->blockSignals(block); } -void BookmarksSidebarPage::slotURLChanged(const KUrl& url) +void BookmarksSidebarPage::slotUrlChanged(const KUrl& url) { adjustSelection(url); } @@ -243,8 +243,8 @@ void BookmarksSidebarPage::connectToActiveView() { DolphinView* view = Dolphin::mainWin().activeView(); adjustSelection(view->url()); - connect(view, SIGNAL(signalURLChanged(const KUrl&)), - this, SLOT(slotURLChanged(const KUrl&))); + connect(view, SIGNAL(signalUrlChanged(const KUrl&)), + this, SLOT(slotUrlChanged(const KUrl&))); } BookmarksListBox::BookmarksListBox(QWidget* parent) : diff --git a/src/bookmarkssidebarpage.h b/src/bookmarkssidebarpage.h index eb49e3e7d7..37a5009873 100644 --- a/src/bookmarkssidebarpage.h +++ b/src/bookmarkssidebarpage.h @@ -33,7 +33,7 @@ class BookmarksListBox; * * It is possible to add, remove and edit bookmarks * by a context menu. The selection of the bookmark - * is automatically adjusted to the URL given by + * is automatically adjusted to the Url given by * the active view. */ class BookmarksSidebarPage : public SidebarPage @@ -54,7 +54,7 @@ private slots: /** * Checks whether the left mouse button has been clicked above a bookmark. - * If this is the case, the URL for the currently active view is adjusted. + * If this is the case, the Url for the currently active view is adjusted. */ void slotMouseButtonClicked(int button, Q3ListBoxItem* item); @@ -62,24 +62,24 @@ private slots: void slotContextMenuRequested(Q3ListBoxItem* item, const QPoint& pos); /** - * Is invoked whenever the URL of the active view has been changed. Adjusts - * the selection of the listbox to the bookmark which is part of the current URL. + * Is invoked whenever the Url of the active view has been changed. Adjusts + * the selection of the listbox to the bookmark which is part of the current Url. */ - void slotURLChanged(const KUrl& url); + void slotUrlChanged(const KUrl& url); private: /** - * Updates the selection dependent from the given URL \a url. The - * URL must not match exactly to one of the available bookmarks: - * The bookmark which is equal to the URL or at least is a parent URL - * is selected. If there are more than one possible parent URL candidates, - * the bookmark which covers the bigger range of the URL is selected. + * Updates the selection dependent from the given Url \a url. The + * Url must not match exactly to one of the available bookmarks: + * The bookmark which is equal to the Url or at least is a parent Url + * is selected. If there are more than one possible parent Url candidates, + * the bookmark which covers the bigger range of the Url is selected. */ void adjustSelection(const KUrl& url); /** * Connects to signals from the currently active Dolphin view to get - * informed about URL and bookmark changes. + * informed about Url and bookmark changes. */ void connectToActiveView(); diff --git a/src/dolphin.cpp b/src/dolphin.cpp index 5cf9464403..2e7efec6fb 100644 --- a/src/dolphin.cpp +++ b/src/dolphin.cpp @@ -105,7 +105,7 @@ void Dolphin::setActiveView(DolphinView* view) emit activeViewChanged(); } -void Dolphin::dropURLs(const KUrl::List& urls, +void Dolphin::dropUrls(const KUrl::List& urls, const KUrl& destination) { int selectedIndex = -1; @@ -153,14 +153,14 @@ void Dolphin::dropURLs(const KUrl::List& urls, case 0: { // 'Move Here' has been selected updateViewProperties(urls); - moveURLs(urls, destination); + moveUrls(urls, destination); break; } case 1: { // 'Copy Here' has been selected updateViewProperties(urls); - copyURLs(urls, destination); + copyUrls(urls, destination); break; } @@ -215,17 +215,17 @@ void Dolphin::slotHistoryChanged() updateHistory(); } -void Dolphin::slotURLChanged(const KUrl& url) +void Dolphin::slotUrlChanged(const KUrl& url) { updateEditActions(); updateGoActions(); setCaption(url.fileName()); } -void Dolphin::slotURLChangeRequest(const KUrl& url) +void Dolphin::slotUrlChangeRequest(const KUrl& url) { clearStatusBar(); - m_activeView->setURL(url); + m_activeView->setUrl(url); } void Dolphin::slotViewModeChanged() @@ -282,13 +282,13 @@ void Dolphin::slotSelectionChanged() updateEditActions(); assert(m_view[PrimaryIdx] != 0); - int selectedURLsCount = m_view[PrimaryIdx]->selectedURLs().count(); + int selectedUrlsCount = m_view[PrimaryIdx]->selectedUrls().count(); if (m_view[SecondaryIdx] != 0) { - selectedURLsCount += m_view[SecondaryIdx]->selectedURLs().count(); + selectedUrlsCount += m_view[SecondaryIdx]->selectedUrls().count(); } KAction* compareFilesAction = actionCollection()->action("compare_files"); - compareFilesAction->setEnabled(selectedURLsCount == 2); + compareFilesAction->setEnabled(selectedUrlsCount == 2); m_activeView->updateStatusBar(); @@ -321,27 +321,27 @@ void Dolphin::closeEvent(QCloseEvent* event) void Dolphin::saveProperties(KConfig* config) { config->setGroup("Primary view"); - config->writeEntry("URL", m_view[PrimaryIdx]->url().url()); - config->writeEntry("Editable URL", m_view[PrimaryIdx]->isURLEditable()); + config->writeEntry("Url", m_view[PrimaryIdx]->url().url()); + config->writeEntry("Editable Url", m_view[PrimaryIdx]->isUrlEditable()); if (m_view[SecondaryIdx] != 0) { config->setGroup("Secondary view"); - config->writeEntry("URL", m_view[SecondaryIdx]->url().url()); - config->writeEntry("Editable URL", m_view[SecondaryIdx]->isURLEditable()); + config->writeEntry("Url", m_view[SecondaryIdx]->url().url()); + config->writeEntry("Editable Url", m_view[SecondaryIdx]->isUrlEditable()); } } void Dolphin::readProperties(KConfig* config) { config->setGroup("Primary view"); - m_view[PrimaryIdx]->setURL(config->readEntry("URL")); - m_view[PrimaryIdx]->setURLEditable(config->readBoolEntry("Editable URL")); + m_view[PrimaryIdx]->setUrl(config->readEntry("Url")); + m_view[PrimaryIdx]->setUrlEditable(config->readBoolEntry("Editable Url")); if (config->hasGroup("Secondary view")) { config->setGroup("Secondary view"); if (m_view[SecondaryIdx] == 0) { toggleSplitView(); } - m_view[SecondaryIdx]->setURL(config->readEntry("URL")); - m_view[SecondaryIdx]->setURLEditable(config->readBoolEntry("Editable URL")); + m_view[SecondaryIdx]->setUrl(config->readEntry("Url")); + m_view[SecondaryIdx]->setUrlEditable(config->readBoolEntry("Editable Url")); } else if (m_view[SecondaryIdx] != 0) { toggleSplitView(); @@ -359,14 +359,14 @@ void Dolphin::createFolder() clearStatusBar(); DolphinStatusBar* statusBar = m_activeView->statusBar(); - const KUrl baseURL(m_activeView->url()); + const KUrl baseUrl(m_activeView->url()); QString name(i18n("New Folder")); - baseURL.path(KUrl::AddTrailingSlash); + baseUrl.path(KUrl::AddTrailingSlash); - if (baseURL.isLocalFile() && QFileInfo(baseURL.path(KUrl::AddTrailingSlash) + name).exists()) { - name = KIO::RenameDlg::suggestName(baseURL, i18n("New Folder")); + if (baseUrl.isLocalFile() && QFileInfo(baseUrl.path(KUrl::AddTrailingSlash) + name).exists()) { + name = KIO::RenameDlg::suggestName(baseUrl, i18n("New Folder")); } bool ok = false; @@ -389,7 +389,7 @@ void Dolphin::createFolder() } else { name = KIO::encodeFileName(name); - url = baseURL; + url = baseUrl; url.addPath(name); } ok = KIO::NetAccess::mkdir(url, this); @@ -452,10 +452,10 @@ void Dolphin::createFile() } // Get the source path of the template which should be copied. - // The source path is part of the URL entry of the desktop file. + // The source path is part of the Url entry of the desktop file. const int pos = entry.templatePath.findRev('/'); QString sourcePath(entry.templatePath.left(pos + 1)); - sourcePath += KDesktopFile(entry.templatePath, true).readPathEntry("URL"); + sourcePath += KDesktopFile(entry.templatePath, true).readPathEntry("Url"); QString name(i18n(entry.name.ascii())); // Most entry names end with "..." (e. g. "HTML File..."), which is ok for @@ -467,11 +467,11 @@ void Dolphin::createFile() // Check whether a file with the current name already exists. If yes suggest automatically // a unique file name (e. g. "HTML File" will be replaced by "HTML File_1"). - const KUrl viewURL(m_activeView->url()); - const bool fileExists = viewURL.isLocalFile() && - QFileInfo(viewURL.path(KUrl::AddTrailingSlash) + KIO::encodeFileName(name)).exists(); + const KUrl viewUrl(m_activeView->url()); + const bool fileExists = viewUrl.isLocalFile() && + QFileInfo(viewUrl.path(KUrl::AddTrailingSlash) + KIO::encodeFileName(name)).exists(); if (fileExists) { - name = KIO::RenameDlg::suggestName(viewURL, name); + name = KIO::RenameDlg::suggestName(viewUrl, name); } // let the user change the suggested file name @@ -488,25 +488,25 @@ void Dolphin::createFile() // before copying the template to the destination path check whether a file // with the given name already exists - const QString destPath(viewURL.pathOrUrl() + "/" + KIO::encodeFileName(name)); - const KUrl destURL(destPath); - if (KIO::NetAccess::exists(destURL, false, this)) { + const QString destPath(viewUrl.pathOrUrl() + "/" + KIO::encodeFileName(name)); + const KUrl destUrl(destPath); + if (KIO::NetAccess::exists(destUrl, false, this)) { statusBar->setMessage(i18n("A file named %1 already exists.").arg(name), DolphinStatusBar::Error); return; } // copy the template to the destination path - const KUrl sourceURL(sourcePath); - KIO::CopyJob* job = KIO::copyAs(sourceURL, destURL); + const KUrl sourceUrl(sourcePath); + KIO::CopyJob* job = KIO::copyAs(sourceUrl, destUrl); job->setDefaultPermissions(true); if (KIO::NetAccess::synchronousRun(job, this)) { statusBar->setMessage(i18n("Created file %1.").arg(name), DolphinStatusBar::OperationCompleted); KUrl::List list; - list.append(sourceURL); - DolphinCommand command(DolphinCommand::CreateFile, list, destURL); + list.append(sourceUrl); + DolphinCommand command(DolphinCommand::CreateFile, list, destUrl); UndoManager::instance().addCommand(command); } @@ -525,16 +525,16 @@ void Dolphin::rename() void Dolphin::moveToTrash() { clearStatusBar(); - KUrl::List selectedURLs = m_activeView->selectedURLs(); - KIO::Job* job = KIO::trash(selectedURLs); - addPendingUndoJob(job, DolphinCommand::Trash, selectedURLs, m_activeView->url()); + KUrl::List selectedUrls = m_activeView->selectedUrls(); + KIO::Job* job = KIO::trash(selectedUrls); + addPendingUndoJob(job, DolphinCommand::Trash, selectedUrls, m_activeView->url()); } void Dolphin::deleteItems() { clearStatusBar(); - KUrl::List list = m_activeView->selectedURLs(); + KUrl::List list = m_activeView->selectedUrls(); const uint itemCount = list.count(); assert(itemCount >= 1); @@ -642,7 +642,7 @@ void Dolphin::slotRedoTextChanged(const QString& text) void Dolphin::cut() { m_clipboardContainsCutData = true; - /* KDE4-TODO: Q3DragObject* data = new KURLDrag(m_activeView->selectedURLs(), + /* KDE4-TODO: Q3DragObject* data = new KUrlDrag(m_activeView->selectedUrls(), widget()); QApplication::clipboard()->setData(data);*/ } @@ -651,7 +651,7 @@ void Dolphin::copy() { m_clipboardContainsCutData = false; /* KDE4-TODO: - Q3DragObject* data = new KUrlDrag(m_activeView->selectedURLs(), + Q3DragObject* data = new KUrlDrag(m_activeView->selectedUrls(), widget()); QApplication::clipboard()->setData(data);*/ } @@ -667,35 +667,35 @@ void Dolphin::paste() clearStatusBar(); - KUrl::List sourceURLs; - KUrlDrag::decode(data, sourceURLs); + KUrl::List sourceUrls; + KUrlDrag::decode(data, sourceUrls); - // per default the pasting is done into the current URL of the view - KUrl destURL(m_activeView->url()); + // per default the pasting is done into the current Url of the view + KUrl destUrl(m_activeView->url()); // check whether the pasting should be done into a selected directory - KUrl::List selectedURLs = m_activeView->selectedURLs(); - if (selectedURLs.count() == 1) { + KUrl::List selectedUrls = m_activeView->selectedUrls(); + if (selectedUrls.count() == 1) { const KFileItem fileItem(S_IFDIR, KFileItem::Unknown, - selectedURLs.first(), + selectedUrls.first(), true); if (fileItem.isDir()) { // only one item is selected which is a directory, hence paste // into this directory - destURL = selectedURLs.first(); + destUrl = selectedUrls.first(); } } - updateViewProperties(sourceURLs); + updateViewProperties(sourceUrls); if (m_clipboardContainsCutData) { - moveURLs(sourceURLs, destURL); + moveUrls(sourceUrls, destUrl); m_clipboardContainsCutData = false; clipboard->clear(); } else { - copyURLs(sourceURLs, destURL); + copyUrls(sourceUrls, destUrl); }*/ } @@ -729,7 +729,7 @@ void Dolphin::updatePasteAction() //} if (pasteAction->isEnabled()) { - KUrl::List urls = m_activeView->selectedURLs(); + KUrl::List urls = m_activeView->selectedUrls(); const uint count = urls.count(); if (count > 1) { // pasting should not be allowed when more than one file @@ -877,14 +877,14 @@ void Dolphin::toggleEditLocation() bool editOrBrowse = action->isChecked(); // action->setChecked(action->setChecked); - m_activeView->setURLEditable(editOrBrowse); + m_activeView->setUrlEditable(editOrBrowse); } void Dolphin::editLocation() { KToggleAction* action = static_cast(actionCollection()->action("editable_location")); action->setChecked(true); - m_activeView->setURLEditable(true); + m_activeView->setUrlEditable(true); } void Dolphin::adjustViewProperties() @@ -944,12 +944,12 @@ void Dolphin::compareFiles() KUrl urlA; KUrl urlB; - KUrl::List urls = m_view[PrimaryIdx]->selectedURLs(); + KUrl::List urls = m_view[PrimaryIdx]->selectedUrls(); switch (urls.count()) { case 0: { assert(m_view[SecondaryIdx] != 0); - urls = m_view[SecondaryIdx]->selectedURLs(); + urls = m_view[SecondaryIdx]->selectedUrls(); assert(urls.count() == 2); urlA = urls[0]; urlB = urls[1]; @@ -959,7 +959,7 @@ void Dolphin::compareFiles() case 1: { urlA = urls[0]; assert(m_view[SecondaryIdx] != 0); - urls = m_view[SecondaryIdx]->selectedURLs(); + urls = m_view[SecondaryIdx]->selectedUrls(); assert(urls.count() == 1); urlB = urls[0]; break; @@ -1019,24 +1019,24 @@ void Dolphin::addUndoOperation(KIO::Job* job) DolphinCommand command = (*it).command; if (command.type() == DolphinCommand::Trash) { // To be able to perform an undo for the 'Move to Trash' operation - // all source URLs must be updated with the trash URL. E. g. when moving + // all source Urls must be updated with the trash Url. E. g. when moving // a file "test.txt" and a second file "test.txt" to the trash, // then the filenames in the trash are "0-test.txt" and "1-test.txt". QMap metaData = job->metaData(); - KUrl::List newSourceURLs; + KUrl::List newSourceUrls; - KUrl::List sourceURLs = command.source(); - KUrl::List::Iterator sourceIt = sourceURLs.begin(); - const KUrl::List::Iterator sourceEnd = sourceURLs.end(); + KUrl::List sourceUrls = command.source(); + KUrl::List::Iterator sourceIt = sourceUrls.begin(); + const KUrl::List::Iterator sourceEnd = sourceUrls.end(); while (sourceIt != sourceEnd) { - QMap::ConstIterator metaIt = metaData.find("trashURL-" + (*sourceIt).path()); + QMap::ConstIterator metaIt = metaData.find("trashUrl-" + (*sourceIt).path()); if (metaIt != metaData.end()) { - newSourceURLs.append(KUrl(metaIt.data())); + newSourceUrls.append(KUrl(metaIt.data())); } ++sourceIt; } - command.setSource(newSourceURLs); + command.setSource(newSourceUrls); } UndoManager::instance().addCommand(command); @@ -1128,7 +1128,7 @@ void Dolphin::init() assert(manager != 0); KBookmarkGroup root = manager->root(); if (root.first().isNull()) { - root.addBookmark(manager, i18n("Home"), settings.generalSettings()->homeURL(), "folder_home"); + root.addBookmark(manager, i18n("Home"), settings.generalSettings()->homeUrl(), "folder_home"); root.addBookmark(manager, i18n("Storage Media"), KUrl("media:/"), "blockdevice"); root.addBookmark(manager, i18n("Network"), KUrl("remote:/"), "network_local"); root.addBookmark(manager, i18n("Root"), KUrl("/"), "folder_red"); @@ -1138,11 +1138,11 @@ void Dolphin::init() setupActions(); setupGUI(Keys|Save|Create|ToolBar); - const KUrl& homeURL = root.first().url(); - setCaption(homeURL.fileName()); - ViewProperties props(homeURL); + const KUrl& homeUrl = root.first().url(); + setCaption(homeUrl.fileName()); + ViewProperties props(homeUrl); m_view[PrimaryIdx] = new DolphinView(m_splitter, - homeURL, + homeUrl, props.viewMode(), props.isShowHiddenFilesEnabled()); @@ -1377,7 +1377,7 @@ void Dolphin::setupCreateNewMenuActions() const QString name(config.readEntry("Name")); QString key(name); - const QString path(config.readPathEntry("URL")); + const QString path(config.readPathEntry("Url")); if (!path.endsWith("emptydir")) { if (path.endsWith("TextFile.txt")) { key = "1" + key; @@ -1385,7 +1385,7 @@ void Dolphin::setupCreateNewMenuActions() else if (!KDesktopFile::isDesktopFile(path)) { key = "2" + key; } - else if (path.endsWith("URL.desktop")){ + else if (path.endsWith("Url.desktop")){ key = "3" + key; } else if (path.endsWith("Program.desktop")){ @@ -1463,7 +1463,7 @@ void Dolphin::setupCreateNewMenuActions() void Dolphin::updateHistory() { int index = 0; - const Q3ValueList list = m_activeView->urlHistory(index); + const Q3ValueList list = m_activeView->urlHistory(index); KAction* backAction = actionCollection()->action("go_back"); if (backAction != 0) { @@ -1563,8 +1563,8 @@ void Dolphin::updateViewActions() void Dolphin::updateGoActions() { KAction* goUpAction = actionCollection()->action(KStdAction::stdName(KStdAction::Up)); - const KUrl& currentURL = m_activeView->url(); - goUpAction->setEnabled(currentURL.upUrl() != currentURL); + const KUrl& currentUrl = m_activeView->url(); + goUpAction->setEnabled(currentUrl.upUrl() != currentUrl); } void Dolphin::updateViewProperties(const KUrl::List& urls) @@ -1574,7 +1574,7 @@ void Dolphin::updateViewProperties(const KUrl::List& urls) } // Updating the view properties might take up to several seconds - // when dragging several thousand URLs. Writing a KIO slave for this + // when dragging several thousand Urls. Writing a KIO slave for this // use case is not worth the effort, but at least the main widget // must be disabled and a progress should be shown. ProgressIndicator progressIndicator(i18n("Updating view properties..."), @@ -1590,13 +1590,13 @@ void Dolphin::updateViewProperties(const KUrl::List& urls) } } -void Dolphin::copyURLs(const KUrl::List& source, const KUrl& dest) +void Dolphin::copyUrls(const KUrl::List& source, const KUrl& dest) { KIO::Job* job = KIO::copy(source, dest); addPendingUndoJob(job, DolphinCommand::Copy, source, dest); } -void Dolphin::moveURLs(const KUrl::List& source, const KUrl& dest) +void Dolphin::moveUrls(const KUrl::List& source, const KUrl& dest) { KIO::Job* job = KIO::move(source, dest); addPendingUndoJob(job, DolphinCommand::Move, source, dest); @@ -1632,7 +1632,7 @@ void Dolphin::openSidebar() m_sidebar->show(); connect(m_sidebar, SIGNAL(urlChanged(const KUrl&)), - this, SLOT(slotURLChangeRequest(const KUrl&))); + this, SLOT(slotUrlChangeRequest(const KUrl&))); m_splitter->setCollapsible(m_sidebar, false); m_splitter->setResizeMode(m_sidebar, QSplitter::KeepSize); m_splitter->moveToFirst(m_sidebar); diff --git a/src/dolphin.h b/src/dolphin.h index 4ad709643a..594a680b3b 100644 --- a/src/dolphin.h +++ b/src/dolphin.h @@ -46,7 +46,7 @@ class Q3HBox; class Q3IconViewItem; class QSplitter; class KAction; -class URLNavigator; +class UrlNavigator; class Sidebar; /** @@ -84,17 +84,17 @@ public: DolphinView* activeView() const { return m_activeView; } /** - * Handles the dropping of URLs to the given + * Handles the dropping of Urls to the given * destination. A context menu with the options * 'Move Here', 'Copy Here', 'Link Here' and * 'Cancel' is offered to the user. - * @param urls List of URLs which have been + * @param urls List of Urls which have been * dropped. - * @param destination Destination URL, where the - * list or URLs should be moved, + * @param destination Destination Url, where the + * list or Urls should be moved, * copied or linked to. */ - void dropURLs(const KUrl::List& urls, + void dropUrls(const KUrl::List& urls, const KUrl& destination); /** @@ -140,14 +140,14 @@ public slots: /** * Updates the caption of the main window and the state - * of all menu actions which depend from a changed URL. + * of all menu actions which depend from a changed Url. */ - void slotURLChanged(const KUrl& url); + void slotUrlChanged(const KUrl& url); /** - * Go to the given URL. + * Go to the given Url. */ - void slotURLChangeRequest(const KUrl& url); + void slotUrlChangeRequest(const KUrl& url); /** Updates the state of all 'View' menu actions. */ void slotViewModeChanged(); @@ -337,16 +337,16 @@ private slots: */ void adjustViewProperties(); - /** Goes back on step of the URL history. */ + /** Goes back on step of the Url history. */ void goBack(); - /** Goes forward one step of the URL history. */ + /** Goes forward one step of the Url history. */ void goForward(); - /** Goes up one hierarchy of the current URL. */ + /** Goes up one hierarchy of the current Url. */ void goUp(); - /** Goes to the home URL. */ + /** Goes to the home Url. */ void goHome(); /** Opens a terminal for the current shown directory. */ @@ -389,8 +389,8 @@ private: void updateViewActions(); void updateGoActions(); void updateViewProperties(const KUrl::List& urls); - void copyURLs(const KUrl::List& source, const KUrl& dest); - void moveURLs(const KUrl::List& source, const KUrl& dest); + void copyUrls(const KUrl::List& source, const KUrl& dest); + void moveUrls(const KUrl::List& source, const KUrl& dest); void addPendingUndoJob(KIO::Job* job, DolphinCommand::Type commandType, const KUrl::List& source, diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index 962e6b4428..d53aa3f175 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -177,7 +177,7 @@ void DolphinContextMenu::openItemContextMenu() KMenu* popup = new KMenu(m_dolphinView); Dolphin& dolphin = Dolphin::mainWin(); - const KUrl::List urls = m_dolphinView->selectedURLs(); + const KUrl::List urls = m_dolphinView->selectedUrls(); // insert 'Cut', 'Copy' and 'Paste' const KStdAction::StdAction actionNames[] = { KStdAction::Cut, KStdAction::Copy, KStdAction::Paste }; @@ -194,7 +194,7 @@ void DolphinContextMenu::openItemContextMenu() KAction* renameAction = dolphin.actionCollection()->action("rename"); renameAction->plug(popup); - // insert 'Move to Trash' for local URLs, otherwise insert 'Delete' + // insert 'Move to Trash' for local Urls, otherwise insert 'Delete' const KUrl& url = dolphin.activeView()->url(); if (url.isLocalFile()) { KAction* moveToTrashAction = dolphin.actionCollection()->action("move_to_trash"); @@ -231,10 +231,10 @@ void DolphinContextMenu::openItemContextMenu() QAction *activatedAction = popup->exec(m_pos); if (bookmarkAction!=0 && activatedAction == bookmarkAction) { - const KUrl selectedURL(m_fileInfo->url()); + const KUrl selectedUrl(m_fileInfo->url()); KBookmark bookmark = EditBookmarkDialog::getBookmark(i18n("Add folder as bookmark"), - selectedURL.fileName(), - selectedURL, + selectedUrl.fileName(), + selectedUrl, "bookmark"); if (!bookmark.isNull()) { KBookmarkManager* manager = DolphinSettings::instance().bookmarkManager(); diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp index 255804ca34..9e1e0ab270 100644 --- a/src/dolphindetailsview.cpp +++ b/src/dolphindetailsview.cpp @@ -86,7 +86,7 @@ DolphinDetailsView::DolphinDetailsView(DolphinView* parent) : connect(this, SIGNAL(itemRenamed(Q3ListViewItem*, const QString&, int)), this, SLOT(slotItemRenamed(Q3ListViewItem*, const QString&, int))); connect(this, SIGNAL(dropped(QDropEvent*, const KUrl::List&, const KUrl&)), - parent, SLOT(slotURLListDropped(QDropEvent*, const KUrl::List&, const KUrl&))); + parent, SLOT(slotUrlListDropped(QDropEvent*, const KUrl::List&, const KUrl&))); QClipboard* clipboard = QApplication::clipboard(); connect(clipboard, SIGNAL(dataChanged()), @@ -127,7 +127,7 @@ void DolphinDetailsView::endItemUpdates() } int index = 0; - const Q3ValueList history = m_dolphinView->urlHistory(index); + const Q3ValueList history = m_dolphinView->urlHistory(index); if (!history.isEmpty()) { KFileView* fileView = static_cast(this); fileView->setCurrentItem(history[index].currentFileName()); @@ -345,9 +345,9 @@ bool DolphinDetailsView::acceptDrag(QDropEvent* event) const void DolphinDetailsView::contentsDropEvent(QDropEvent* event) { // KFileDetailView::contentsDropEvent does not care whether the mouse - // cursor is above a filename or not, the destination URL is always - // the URL of the item. This is fixed here in a way that the destination - // URL is only the URL of the item if the cursor is above the filename. + // cursor is above a filename or not, the destination Url is always + // the Url of the item. This is fixed here in a way that the destination + // Url is only the Url of the item if the cursor is above the filename. const QPoint pos(QCursor::pos()); const QPoint viewportPos(viewport()->mapToGlobal(QPoint(0, 0))); Q3ListViewItem* item = itemAt(QPoint(pos.x() - viewportPos.x(), pos.y() - viewportPos.y())); diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp index e722948b2b..30dd7bb4d5 100644 --- a/src/dolphiniconsview.cpp +++ b/src/dolphiniconsview.cpp @@ -69,7 +69,7 @@ DolphinIconsView::DolphinIconsView(DolphinView* parent, LayoutMode layoutMode) : connect(this, SIGNAL(itemRenamed(Q3IconViewItem*, const QString&)), this, SLOT(slotItemRenamed(Q3IconViewItem*, const QString&))); connect(this, SIGNAL(dropped(QDropEvent*, const KUrl::List&, const KUrl&)), - parent, SLOT(slotURLListDropped(QDropEvent*, const KUrl::List&, const KUrl&))); + parent, SLOT(slotUrlListDropped(QDropEvent*, const KUrl::List&, const KUrl&))); QClipboard* clipboard = QApplication::clipboard(); connect(clipboard, SIGNAL(dataChanged()), @@ -126,7 +126,7 @@ void DolphinIconsView::endItemUpdates() } int index = 0; - const Q3ValueList history = m_dolphinView->urlHistory(index); + const Q3ValueList history = m_dolphinView->urlHistory(index); if (!history.isEmpty()) { KFileView* fileView = static_cast(this); fileView->setCurrentItem(history[index].currentFileName()); @@ -332,7 +332,7 @@ Q3DragObject* DolphinIconsView::dragObject() } /* This should be ported to QMimeData - Q3DragObject* dragObj = new KURLDrag(urls, widget()); + Q3DragObject* dragObj = new KUrlDrag(urls, widget()); dragObj->setPixmap(pixmap); return dragObj; */ diff --git a/src/dolphinsettings.h b/src/dolphinsettings.h index a9dcb8b62f..981e7d51e6 100644 --- a/src/dolphinsettings.h +++ b/src/dolphinsettings.h @@ -33,9 +33,9 @@ class SidebarSettings; * @brief Manages and stores all settings from Dolphin. * * The following properties are stored: - * - home URL + * - home Url * - default view mode - * - URL navigator state (editable or not) + * - Url navigator state (editable or not) * - split view * - bookmarks * - properties for icons and details view diff --git a/src/dolphinstatusbar.cpp b/src/dolphinstatusbar.cpp index 44b6e2345e..a5fb66d64d 100644 --- a/src/dolphinstatusbar.cpp +++ b/src/dolphinstatusbar.cpp @@ -39,7 +39,7 @@ DolphinStatusBar::DolphinStatusBar(DolphinView* parent) : m_messageLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed); m_spaceInfo = new StatusBarSpaceInfo(this); - m_spaceInfo->setURL(parent->url()); + m_spaceInfo->setUrl(parent->url()); m_progressText = new QLabel(this); m_progressText->hide(); @@ -56,8 +56,8 @@ DolphinStatusBar::DolphinStatusBar(DolphinView* parent) : setMinimumHeight(size.height()); m_messageLabel->setMinimumTextHeight(size.height()); - connect(parent, SIGNAL(signalURLChanged(const KUrl&)), - this, SLOT(slotURLChanged(const KUrl&))); + connect(parent, SIGNAL(signalUrlChanged(const KUrl&)), + this, SLOT(slotUrlChanged(const KUrl&))); } @@ -158,9 +158,9 @@ void DolphinStatusBar::slotProgressTimer() } } -void DolphinStatusBar::slotURLChanged(const KUrl& url) +void DolphinStatusBar::slotUrlChanged(const KUrl& url) { - m_spaceInfo->setURL(url); + m_spaceInfo->setUrl(url); } #include "dolphinstatusbar.moc" diff --git a/src/dolphinstatusbar.h b/src/dolphinstatusbar.h index 903e1cdff5..ad7c0d85fd 100644 --- a/src/dolphinstatusbar.h +++ b/src/dolphinstatusbar.h @@ -117,10 +117,10 @@ private slots: void slotProgressTimer(); /** - * Is invoked, when the URL of the DolphinView, where the + * Is invoked, when the Url of the DolphinView, where the * statusbar belongs too, has been changed. */ - void slotURLChanged(const KUrl& url); + void slotUrlChanged(const KUrl& url); private: StatusBarMessageLabel* m_messageLabel; diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index bacfebf405..cab413b954 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -76,11 +76,11 @@ DolphinView::DolphinView(QWidget *parent, connect(this, SIGNAL(signalSortOrderChanged(Qt::SortOrder)), &dolphin, SLOT(slotSortOrderChanged(Qt::SortOrder))); - m_urlNavigator = new URLNavigator(url, this); + m_urlNavigator = new UrlNavigator(url, this); connect(m_urlNavigator, SIGNAL(urlChanged(const KUrl&)), - this, SLOT(slotURLChanged(const KUrl&))); + this, SLOT(slotUrlChanged(const KUrl&))); connect(m_urlNavigator, SIGNAL(urlChanged(const KUrl&)), - &dolphin, SLOT(slotURLChanged(const KUrl&))); + &dolphin, SLOT(slotUrlChanged(const KUrl&))); connect(m_urlNavigator, SIGNAL(historyChanged()), &dolphin, SLOT(slotHistoryChanged())); @@ -129,9 +129,9 @@ DolphinView::~DolphinView() m_dirLister = 0; } -void DolphinView::setURL(const KUrl& url) +void DolphinView::setUrl(const KUrl& url) { - m_urlNavigator->setURL(url); + m_urlNavigator->setUrl(url); } const KUrl& DolphinView::url() const @@ -212,7 +212,7 @@ void DolphinView::setViewProperties(const ViewProperties& props) void DolphinView::renameSelectedItems() { - const KUrl::List urls = selectedURLs(); + const KUrl::List urls = selectedUrls(); if (urls.count() > 1) { // More than one item has been selected for renaming. Open // a rename dialog and rename all items afterwards. @@ -376,9 +376,9 @@ void DolphinView::requestItemInfo(const KUrl& url) emit signalRequestItemInfo(url); } -bool DolphinView::isURLEditable() const +bool DolphinView::isUrlEditable() const { - return m_urlNavigator->isURLEditable(); + return m_urlNavigator->isUrlEditable(); } void DolphinView::zoomIn() @@ -480,12 +480,12 @@ void DolphinView::goHome() m_urlNavigator->goHome(); } -void DolphinView::setURLEditable(bool editable) +void DolphinView::setUrlEditable(bool editable) { - m_urlNavigator->editURL(editable); + m_urlNavigator->editUrl(editable); } -const Q3ValueList DolphinView::urlHistory(int& index) const +const Q3ValueList DolphinView::urlHistory(int& index) const { return m_urlNavigator->history(index); } @@ -501,7 +501,7 @@ const KFileItemList* DolphinView::selectedItems() const return fileView()->selectedItems(); } -KUrl::List DolphinView::selectedURLs() const +KUrl::List DolphinView::selectedUrls() const { KUrl::List urls; @@ -596,7 +596,7 @@ void DolphinView::reload() startDirLister(m_urlNavigator->url(), true); } -void DolphinView::slotURLListDropped(QDropEvent* /* event */, +void DolphinView::slotUrlListDropped(QDropEvent* /* event */, const KUrl::List& urls, const KUrl& url) { @@ -605,8 +605,8 @@ void DolphinView::slotURLListDropped(QDropEvent* /* event */, destination = m_urlNavigator->url(); } else { - // Check whether the destination URL is a directory. If this is not the - // case, use the navigator URL as destination (otherwise the destination, + // Check whether the destination Url is a directory. If this is not the + // case, use the navigator Url as destination (otherwise the destination, // which represents a file, would be replaced by a copy- or move-operation). KFileItem fileItem(KFileItem::Unknown, KFileItem::Unknown, destination); if (!fileItem.isDir()) { @@ -614,7 +614,7 @@ void DolphinView::slotURLListDropped(QDropEvent* /* event */, } } - Dolphin::mainWin().dropURLs(urls, destination); + Dolphin::mainWin().dropUrls(urls, destination); } void DolphinView::mouseReleaseEvent(QMouseEvent* event) @@ -623,7 +623,7 @@ void DolphinView::mouseReleaseEvent(QMouseEvent* event) Dolphin::mainWin().setActiveView(this); } -void DolphinView::slotURLChanged(const KUrl& url) +void DolphinView::slotUrlChanged(const KUrl& url) { const ViewProperties props(url); setMode(props.viewMode()); @@ -643,7 +643,7 @@ void DolphinView::slotURLChanged(const KUrl& url) // changed so that it can update it's actions. Dolphin::mainWin().slotSelectionChanged(); - emit signalURLChanged(url); + emit signalUrlChanged(url); } void DolphinView::triggerIconsViewItem(Q3IconViewItem* item) @@ -654,9 +654,9 @@ void DolphinView::triggerIconsViewItem(Q3IconViewItem* item) ((keyboardState & Qt::ControlModifier) > 0);*/ const bool isSelectionActive = false; if ((item != 0) && !isSelectionActive) { - // Updating the URL must be done outside the scope of this slot, + // Updating the Url must be done outside the scope of this slot, // as iconview items will get deleted. - QTimer::singleShot(0, this, SLOT(updateURL())); + QTimer::singleShot(0, this, SLOT(updateUrl())); Dolphin::mainWin().setActiveView(this); } } @@ -670,9 +670,9 @@ void DolphinView::triggerDetailsViewItem(Q3ListViewItem* item, } if (m_detailsView->isOnFilename(item, pos)) { - // Updating the URL must be done outside the scope of this slot, + // Updating the Url must be done outside the scope of this slot, // as listview items will get deleted. - QTimer::singleShot(0, this, SLOT(updateURL())); + QTimer::singleShot(0, this, SLOT(updateUrl())); Dolphin::mainWin().setActiveView(this); } else { @@ -686,7 +686,7 @@ void DolphinView::triggerDetailsViewItem(Q3ListViewItem* item) triggerDetailsViewItem(item, pos, 0); } -void DolphinView::updateURL() +void DolphinView::updateUrl() { KFileView* fileView = (m_iconsView != 0) ? static_cast(m_iconsView) : static_cast(m_detailsView); @@ -697,17 +697,17 @@ void DolphinView::updateURL() } if (fileItem->isDir()) { - // Prefer the local path over the URL. This assures that the - // volume space information is correct. Assuming that the URL is media:/sda1, - // and the local path is /windows/C: For the URL the space info is related + // Prefer the local path over the Url. This assures that the + // volume space information is correct. Assuming that the Url is media:/sda1, + // and the local path is /windows/C: For the Url the space info is related // to the root partition (and hence wrong) and for the local path the space // info is related to the windows partition (-> correct). const QString localPath(fileItem->localPath()); if (localPath.isEmpty()) { - setURL(fileItem->url()); + setUrl(fileItem->url()); } else { - setURL(KUrl(localPath)); + setUrl(KUrl(localPath)); } } else { diff --git a/src/dolphinview.h b/src/dolphinview.h index fbde8245c0..b71af3a624 100644 --- a/src/dolphinview.h +++ b/src/dolphinview.h @@ -37,7 +37,7 @@ class QPainter; class KUrl; class QLineEdit; -class URLNavigator; +class UrlNavigator; class QTimer; class Q3IconViewItem; class Q3ListViewItem; @@ -62,7 +62,7 @@ class FilterBar; * * @see DolphinIconsView * @see DolphinDetailsView - * @see URLNavigator + * @see UrlNavigator * @see DolphinStatusBar * * @author Peter Penz @@ -117,13 +117,13 @@ public: virtual ~DolphinView(); /** - * Sets the current active URL. - * The signals URLNavigator::urlChanged and URLNavigator::historyChanged + * Sets the current active Url. + * The signals UrlNavigator::urlChanged and UrlNavigator::historyChanged * are submitted. */ - void setURL(const KUrl& url); + void setUrl(const KUrl& url); - /** Returns the current active URL. */ + /** Returns the current active Url. */ const KUrl& url() const; void requestActivation(); @@ -156,46 +156,46 @@ public: void invertSelection(); /** - * Goes back one step in the URL history. The signals - * URLNavigator::urlChanged and URLNavigator::historyChanged + * Goes back one step in the Url history. The signals + * UrlNavigator::urlChanged and UrlNavigator::historyChanged * are submitted. */ void goBack(); /** - * Goes forward one step in the URL history. The signals - * URLNavigator::urlChanged and URLNavigator::historyChanged + * Goes forward one step in the Url history. The signals + * UrlNavigator::urlChanged and UrlNavigator::historyChanged * are submitted. */ void goForward(); /** - * Goes up one step of the URL path. The signals - * URLNavigator::urlChanged and URLNavigator::historyChanged + * Goes up one step of the Url path. The signals + * UrlNavigator::urlChanged and UrlNavigator::historyChanged * are submitted. */ void goUp(); /** - * Goes to the home URL. The signals URLNavigator::urlChanged - * and URLNavigator::historyChanged are submitted. + * Goes to the home Url. The signals UrlNavigator::urlChanged + * and UrlNavigator::historyChanged are submitted. */ void goHome(); /** - * Sets the URL of the navigation bar to an editable state + * Sets the Url of the navigation bar to an editable state * if \a editable is true. If \a editable is false, each part of * the location is presented by a button for a fast navigation. */ - void setURLEditable(bool editable); + void setUrlEditable(bool editable); /** - * Returns the complete URL history. The index 0 indicates the oldest + * Returns the complete Url history. The index 0 indicates the oldest * history element. * @param index Output parameter which indicates the current * index of the location. */ - const Q3ValueList urlHistory(int& index) const; + const Q3ValueList urlHistory(int& index) const; /** * Returns true, if at least one item is selected. @@ -205,16 +205,16 @@ public: /** * Returns the selected items. 0 is returned, if no item * is selected. - * @see DolphinView::selectedURLs() + * @see DolphinView::selectedUrls() */ const KFileItemList* selectedItems() const; /** - * Returns a list of URLs for all selected items. An empty list + * Returns a list of Urls for all selected items. An empty list * is returned, if no item is selected. * @see DolphinView::selectedItems() */ - KUrl::List selectedURLs() const; + KUrl::List selectedUrls() const; /** * Returns the current item, where the cursor is. 0 is returned, if there is no @@ -232,7 +232,7 @@ public: void openContextMenu(KFileItem* fileInfo, const QPoint& pos); /** - * Renames the filename of the source URL by the new file name. + * Renames the filename of the source Url by the new file name. * If the new file name already exists, a dialog is opened which * asks the user to enter a new name. */ @@ -256,10 +256,10 @@ public: int contentsY() const; /** - * Returns true, if the URL shown by the navigation bar is editable. - * @see URLNavigator + * Returns true, if the Url shown by the navigation bar is editable. + * @see UrlNavigator */ - bool isURLEditable() const; + bool isUrlEditable() const; /** Increases the size of the current set view mode. */ void zoomIn(); @@ -301,12 +301,12 @@ public: */ void updateStatusBar(); - /** Returns the URLNavigator of the view for read access. */ - const URLNavigator* urlNavigator() const { return m_urlNavigator; } + /** Returns the UrlNavigator of the view for read access. */ + const UrlNavigator* urlNavigator() const { return m_urlNavigator; } /** * Triggers to request user information for the item given - * by the URL \a url. The signal signalRequestItemInfo is emitted, + * by the Url \a url. The signal signalRequestItemInfo is emitted, * which provides a way for widgets to get an indication to update * the item information. */ @@ -322,7 +322,7 @@ public: public slots: void reload(); - void slotURLListDropped(QDropEvent* event, + void slotUrlListDropped(QDropEvent* event, const KUrl::List& urls, const KUrl& url); @@ -332,8 +332,8 @@ public slots: void slotShowFilterBar(bool show); signals: - /** Is emitted if URL of the view has been changed to \a url. */ - void signalURLChanged(const KUrl& url); + /** Is emitted if Url of the view has been changed to \a url. */ + void signalUrlChanged(const KUrl& url); /** * Is emitted if the view mode (IconsView, DetailsView, @@ -352,7 +352,7 @@ signals: /** * Is emitted if information of an item is requested to be shown e. g. in the sidebar. - * It the URL is empty, no item information request is pending. + * It the Url is empty, no item information request is pending. */ void signalRequestItemInfo(const KUrl& url); @@ -362,7 +362,7 @@ signals: /** * Is emitted whenever the selection has been changed. The current selection can * be retrieved by Dolphin::mainWin().activeView()->selectedItems() or by - * Dolphin::mainWin().activeView()->selectedURLs(). + * Dolphin::mainWin().activeView()->selectedUrls(). */ void signalSelectionChanged(); @@ -376,13 +376,13 @@ protected: virtual void mouseReleaseEvent(QMouseEvent* event); private slots: - void slotURLChanged(const KUrl& kurl); + void slotUrlChanged(const KUrl& kurl); void triggerIconsViewItem(Q3IconViewItem *item); void triggerDetailsViewItem(Q3ListViewItem* item, const QPoint& pos, int column); void triggerDetailsViewItem(Q3ListViewItem* item); - void updateURL(); + void updateUrl(); void slotPercent(int percent); void slotClear(); @@ -440,7 +440,7 @@ private: Mode m_mode; Q3VBoxLayout* m_topLayout; - URLNavigator* m_urlNavigator; + UrlNavigator* m_urlNavigator; DolphinIconsView* m_iconsView; DolphinDetailsView* m_detailsView; diff --git a/src/editbookmarkdialog.h b/src/editbookmarkdialog.h index f1235b7575..b25f1ad62b 100644 --- a/src/editbookmarkdialog.h +++ b/src/editbookmarkdialog.h @@ -28,7 +28,7 @@ class QLineEdit; class QPushButton; /** - * @brief Allows to edit the icon, URL and name of a bookmark. + * @brief Allows to edit the icon, Url and name of a bookmark. * * The default usage is like this: * \code @@ -49,8 +49,8 @@ public: virtual ~EditBookmarkDialog(); /** - * Opens a dialog where the current icon, URL and name of - * an URL are editable. The title of the dialog is set to \a title. + * Opens a dialog where the current icon, Url and name of + * an Url are editable. The title of the dialog is set to \a title. * @return A valid bookmark, if the user has pressed OK. Otherwise * a null bookmark is returned (see Bookmark::isNull()). */ diff --git a/src/generalsettings.kcfg b/src/generalsettings.kcfg index 5b6470db7c..d53892d35c 100644 --- a/src/generalsettings.kcfg +++ b/src/generalsettings.kcfg @@ -1,13 +1,13 @@ - + 0 - + false @@ -15,7 +15,7 @@ true - + ~ diff --git a/src/generalsettingspage.cpp b/src/generalsettingspage.cpp index 7be6c3b496..14ef83bc36 100644 --- a/src/generalsettingspage.cpp +++ b/src/generalsettingspage.cpp @@ -43,7 +43,7 @@ GeneralSettingsPage::GeneralSettingsPage(QWidget* parent) : SettingsPageBase(parent), - m_homeURL(0), + m_homeUrl(0), m_startSplit(0), m_startEditable(0) { @@ -61,21 +61,21 @@ GeneralSettingsPage::GeneralSettingsPage(QWidget* parent) : vBox->setMargin(margin); vBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Ignored); - // create 'Home URL' editor - Q3GroupBox* homeGroup = new Q3GroupBox(1, Qt::Horizontal, i18n("Home URL"), vBox); + // create 'Home Url' editor + Q3GroupBox* homeGroup = new Q3GroupBox(1, Qt::Horizontal, i18n("Home Url"), vBox); homeGroup->setSizePolicy(sizePolicy); homeGroup->setMargin(margin); - Q3HBox* homeURLBox = new Q3HBox(homeGroup); - homeURLBox->setSizePolicy(sizePolicy); - homeURLBox->setSpacing(spacing); + Q3HBox* homeUrlBox = new Q3HBox(homeGroup); + homeUrlBox->setSizePolicy(sizePolicy); + homeUrlBox->setSpacing(spacing); - new QLabel(i18n("Location:"), homeURLBox); - m_homeURL = new QLineEdit(settings->homeURL(), homeURLBox); + new QLabel(i18n("Location:"), homeUrlBox); + m_homeUrl = new QLineEdit(settings->homeUrl(), homeUrlBox); - QPushButton* selectHomeURLButton = new QPushButton(SmallIcon("folder"), QString::null, homeURLBox); - connect(selectHomeURLButton, SIGNAL(clicked()), - this, SLOT(selectHomeURL())); + QPushButton* selectHomeUrlButton = new QPushButton(SmallIcon("folder"), QString::null, homeUrlBox); + connect(selectHomeUrlButton, SIGNAL(clicked()), + this, SLOT(selectHomeUrl())); Q3HBox* buttonBox = new Q3HBox(homeGroup); buttonBox->setSizePolicy(sizePolicy); @@ -108,7 +108,7 @@ GeneralSettingsPage::GeneralSettingsPage(QWidget* parent) : // create 'Start with editable navigation bar' checkbox m_startEditable = new QCheckBox(i18n("Start with editable navigation bar"), vBox); - m_startEditable->setChecked(settings->editableURL()); + m_startEditable->setChecked(settings->editableUrl()); // Add a dummy widget with no restriction regarding // a vertical resizing. This assures that the dialog layout @@ -127,10 +127,10 @@ void GeneralSettingsPage::applySettings() { GeneralSettings* settings = DolphinSettings::instance().generalSettings(); - const KUrl url(m_homeURL->text()); + const KUrl url(m_homeUrl->text()); KFileItem fileItem(S_IFDIR, KFileItem::Unknown, url); if (url.isValid() && fileItem.isDir()) { - settings->setHomeURL(url.prettyUrl()); + settings->setHomeUrl(url.prettyUrl()); } DolphinView::Mode viewMode = DolphinView::IconsView; @@ -143,27 +143,27 @@ void GeneralSettingsPage::applySettings() settings->setDefaultViewMode(viewMode); settings->setSplitView(m_startSplit->isChecked()); - settings->setEditableURL(m_startEditable->isChecked()); + settings->setEditableUrl(m_startEditable->isChecked()); } -void GeneralSettingsPage::selectHomeURL() +void GeneralSettingsPage::selectHomeUrl() { - const QString homeURL(m_homeURL->text()); - KUrl url(KFileDialog::getExistingUrl(homeURL)); + const QString homeUrl(m_homeUrl->text()); + KUrl url(KFileDialog::getExistingUrl(homeUrl)); if (!url.isEmpty()) { - m_homeURL->setText(url.prettyUrl()); + m_homeUrl->setText(url.prettyUrl()); } } void GeneralSettingsPage::useCurrentLocation() { const DolphinView* view = Dolphin::mainWin().activeView(); - m_homeURL->setText(view->url().prettyUrl()); + m_homeUrl->setText(view->url().prettyUrl()); } void GeneralSettingsPage::useDefaulLocation() { - m_homeURL->setText("file://" + QDir::homePath()); + m_homeUrl->setText("file://" + QDir::homePath()); } #include "generalsettingspage.moc" diff --git a/src/generalsettingspage.h b/src/generalsettingspage.h index eb889a8728..246b150edc 100644 --- a/src/generalsettingspage.h +++ b/src/generalsettingspage.h @@ -28,7 +28,7 @@ class QCheckBox; /** * @brief Page for the 'General' settings of the Dolphin settings dialog. * - * The general settings allow to set the home URL, the default view mode + * The general settings allow to set the home Url, the default view mode * and the split view mode. * * @author Peter Penz @@ -46,12 +46,12 @@ public: virtual void applySettings(); private slots: - void selectHomeURL(); + void selectHomeUrl(); void useCurrentLocation(); void useDefaulLocation(); private: - QLineEdit* m_homeURL; + QLineEdit* m_homeUrl; QRadioButton* m_iconsView; QRadioButton* m_detailsView; QRadioButton* m_previewsView; diff --git a/src/infosidebarpage.cpp b/src/infosidebarpage.cpp index 23ccbb741e..cf68e1ce75 100644 --- a/src/infosidebarpage.cpp +++ b/src/infosidebarpage.cpp @@ -140,7 +140,7 @@ void InfoSidebarPage::requestItemInfo(const KUrl& url) cancelRequest(); if (!url.isEmpty() && !m_multipleSelection) { - m_shownURL = url; + m_shownUrl = url; showItemInfo(); } } @@ -169,7 +169,7 @@ void InfoSidebarPage::showItemInfo() else if (!applyBookmark()) { // try to get a preview pixmap from the item... KUrl::List list; - list.append(m_shownURL); + list.append(m_shownUrl); m_pendingPreview = true; m_preview->setPixmap(QPixmap()); @@ -183,7 +183,7 @@ void InfoSidebarPage::showItemInfo() this, SLOT(slotPreviewFailed(const KFileItem*))); QString text(""); - text.append(m_shownURL.fileName()); + text.append(m_shownUrl.fileName()); text.append(""); m_name->setText(text); } @@ -194,7 +194,7 @@ void InfoSidebarPage::showItemInfo() void InfoSidebarPage::slotTimeout() { - m_shownURL = m_urlCandidate; + m_shownUrl = m_urlCandidate; showItemInfo(); } @@ -219,11 +219,11 @@ void InfoSidebarPage::startService(int index) { DolphinView* view = Dolphin::mainWin().activeView(); if (view->hasSelection()) { - KUrl::List selectedURLs = view->selectedURLs(); - KDEDesktopMimeType::executeService(selectedURLs, m_actionsVector[index]); + KUrl::List selectedUrls = view->selectedUrls(); + KDEDesktopMimeType::executeService(selectedUrls, m_actionsVector[index]); } else { - KDEDesktopMimeType::executeService(m_shownURL, m_actionsVector[index]); + KDEDesktopMimeType::executeService(m_shownUrl, m_actionsVector[index]); } } @@ -234,10 +234,10 @@ void InfoSidebarPage::connectToActiveView() DolphinView* view = Dolphin::mainWin().activeView(); connect(view, SIGNAL(signalRequestItemInfo(const KUrl&)), this, SLOT(requestDelayedItemInfo(const KUrl&))); - connect(view, SIGNAL(signalURLChanged(const KUrl&)), + connect(view, SIGNAL(signalUrlChanged(const KUrl&)), this, SLOT(requestItemInfo(const KUrl&))); - m_shownURL = view->url(); + m_shownUrl = view->url(); showItemInfo(); } @@ -246,7 +246,7 @@ bool InfoSidebarPage::applyBookmark() KBookmarkGroup root = DolphinSettings::instance().bookmarkManager()->root(); KBookmark bookmark = root.first(); while (!bookmark.isNull()) { - if (m_shownURL.equals(bookmark.url(), KUrl::CompareWithoutTrailingSlash)) { + if (m_shownUrl.equals(bookmark.url(), KUrl::CompareWithoutTrailingSlash)) { QString text(""); text.append(bookmark.text()); text.append(""); @@ -280,7 +280,7 @@ void InfoSidebarPage::createMetaInfo() beginInfoLines(); DolphinView* view = Dolphin::mainWin().activeView(); if (!view->hasSelection()) { - KFileItem fileItem(S_IFDIR, KFileItem::Unknown, m_shownURL); + KFileItem fileItem(S_IFDIR, KFileItem::Unknown, m_shownUrl); fileItem.refresh(); if (fileItem.isDir()) { @@ -426,8 +426,8 @@ void InfoSidebarPage::insertActions() // The algorithm for searching the available actions works on a list // of KFileItems. If no selection is given, a temporary KFileItem - // by the given URL 'url' is created and added to the list. - KFileItem fileItem(S_IFDIR, KFileItem::Unknown, m_shownURL); + // by the given Url 'url' is created and added to the list. + KFileItem fileItem(S_IFDIR, KFileItem::Unknown, m_shownUrl); KFileItemList localList; const KFileItemList* itemList = Dolphin::mainWin().activeView()->selectedItems(); if ((itemList == 0) || itemList->isEmpty()) { @@ -592,7 +592,7 @@ void ServiceButton::drawButton(QPainter* painter) // Blend the right area of the text with the background, as the // text is clipped. // TODO #1: use alpha blending in Qt4 instead of drawing the text that often - // TODO #2: same code as in URLNavigatorButton::drawButton() -> provide helper class? + // TODO #2: same code as in UrlNavigatorButton::drawButton() -> provide helper class? const int blendSteps = 16; QColor blendColor(backgroundColor); diff --git a/src/infosidebarpage.h b/src/infosidebarpage.h index 17afbe7364..e553573881 100644 --- a/src/infosidebarpage.h +++ b/src/infosidebarpage.h @@ -67,7 +67,7 @@ protected: private slots: /** - * Does a delayed request of information for the item of the given URL and + * Does a delayed request of information for the item of the given Url and * provides default actions. * * @see InfoSidebarPage::showItemInfo() @@ -75,7 +75,7 @@ private slots: void requestDelayedItemInfo(const KUrl& url); /** - * Does a request of information for the item of the given URL and + * Does a request of information for the item of the given Url and * provides default actions. * * @see InfoSidebarPage::showItemInfo() @@ -83,7 +83,7 @@ private slots: void requestItemInfo(const KUrl& url); /** - * Shows the information for the item of the URL which has been provided by + * Shows the information for the item of the Url which has been provided by * InfoSidebarPage::requestItemInfo() and provides default actions. */ void showItemInfo(); @@ -108,7 +108,7 @@ private slots: /** * Starts the service of m_actionsVector with the index \index on - * the shown URL (or the selected items if available). + * the shown Url (or the selected items if available). */ void startService(int index); @@ -120,9 +120,9 @@ private: void connectToActiveView(); /** - * Checks whether the current URL is repesented by a bookmark. If yes, + * Checks whether the current Url is repesented by a bookmark. If yes, * then the bookmark icon and name are shown instead of a preview. - * @return True, if the URL represents exactly a bookmark. + * @return True, if the Url represents exactly a bookmark. */ bool applyBookmark(); @@ -151,7 +151,7 @@ private: bool m_multipleSelection; bool m_pendingPreview; QTimer* m_timer; - KUrl m_shownURL; + KUrl m_shownUrl; KUrl m_urlCandidate; PixmapViewer* m_preview; @@ -167,7 +167,7 @@ private: }; // TODO #1: move to SidebarPage? -// TODO #2: quite same button from the optical point of view as URLNavigatorButton +// TODO #2: quite same button from the optical point of view as UrlNavigatorButton // -> provide helper class or common base class class ServiceButton : public QPushButton { diff --git a/src/itemeffectsmanager.cpp b/src/itemeffectsmanager.cpp index 8a1c948f75..bfc4d33bb4 100644 --- a/src/itemeffectsmanager.cpp +++ b/src/itemeffectsmanager.cpp @@ -41,7 +41,7 @@ ItemEffectsManager::~ItemEffectsManager() delete m_pixmapCopy; m_pixmapCopy = 0; - m_highlightedURL = 0; + m_highlightedUrl = 0; } void ItemEffectsManager::zoomIn() @@ -57,8 +57,8 @@ void ItemEffectsManager::zoomOut() void ItemEffectsManager::activateItem(void* context) { KFileItem* fileInfo = contextFileInfo(context); - const KUrl itemURL(fileInfo->url()); - if (m_highlightedURL == itemURL) { + const KUrl itemUrl(fileInfo->url()); + if (m_highlightedUrl == itemUrl) { // the item is already highlighted return; } @@ -70,7 +70,7 @@ void ItemEffectsManager::activateItem(void* context) // remember the pixmap and item to be able to // restore it to the old state later *m_pixmapCopy = *itemPixmap; - m_highlightedURL = itemURL; + m_highlightedUrl = itemUrl; // apply an icon effect to the item below the mouse pointer KIconEffect iconEffect; @@ -88,13 +88,13 @@ void ItemEffectsManager::activateItem(void* context) void ItemEffectsManager::resetActivatedItem() { - if (m_highlightedURL.isEmpty()) { + if (m_highlightedUrl.isEmpty()) { return; } for (void* context = firstContext(); context != 0; context = nextContext(context)) { - KUrl itemURL(contextFileInfo(context)->url()); - if (itemURL == m_highlightedURL) { + KUrl itemUrl(contextFileInfo(context)->url()); + if (itemUrl == m_highlightedUrl) { // the highlighted item has been found and is restored to the default state KIconEffect iconEffect; QPixmap pixmap = iconEffect.apply(*m_pixmapCopy, @@ -114,7 +114,7 @@ void ItemEffectsManager::resetActivatedItem() } } - m_highlightedURL = 0; + m_highlightedUrl = 0; DolphinStatusBar* statusBar = Dolphin::mainWin().activeView()->statusBar(); statusBar->clear(); @@ -126,10 +126,10 @@ void ItemEffectsManager::updateDisabledItems() // restore all disabled items with their original pixmap for (void* context = firstContext(); context != 0; context = nextContext(context)) { const KFileItem* fileInfo = contextFileInfo(context); - const KUrl& fileURL = fileInfo->url(); + const KUrl& fileUrl = fileInfo->url(); Q3ValueListIterator it = m_disabledItems.begin(); while (it != m_disabledItems.end()) { - if (fileURL == (*it).url) { + if (fileUrl == (*it).url) { setContextPixmap(context, (*it).pixmap); } ++it; @@ -153,14 +153,14 @@ void ItemEffectsManager::updateDisabledItems() // items to the disabled state. for (void* context = firstContext(); context != 0; context = nextContext(context)) { const KFileItem* fileInfo = contextFileInfo(context); - const KUrl& fileURL = fileInfo->url(); + const KUrl& fileUrl = fileInfo->url(); for(KUrl::List::ConstIterator it = urls.begin(); it != urls.end(); ++it) { - if (fileURL == (*it)) { + if (fileUrl == (*it)) { const QPixmap* itemPixmap = contextPixmap(context); if (itemPixmap != 0) { // remember old pixmap DisabledItem disabledItem; - disabledItem.url = fileURL; + disabledItem.url = fileUrl; disabledItem.pixmap = *itemPixmap; m_disabledItems.append(disabledItem); diff --git a/src/itemeffectsmanager.h b/src/itemeffectsmanager.h index 7f5f3814fc..b442adce02 100644 --- a/src/itemeffectsmanager.h +++ b/src/itemeffectsmanager.h @@ -108,7 +108,7 @@ private: }; QPixmap* m_pixmapCopy; - KUrl m_highlightedURL; + KUrl m_highlightedUrl; // contains all items which have been disabled by a 'cut' operation Q3ValueList m_disabledItems; diff --git a/src/main.cpp b/src/main.cpp index 8b52ba1660..eacff0cba5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -27,7 +27,7 @@ static KCmdLineOptions options[] = { - { "+[URL]", I18N_NOOP( "Document to open" ), 0 }, + { "+[Url]", I18N_NOOP( "Document to open" ), 0 }, KCmdLineLastOption }; @@ -68,7 +68,7 @@ int main(int argc, char **argv) } else { KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); if (args->count() > 0) { - mainWin.activeView()->setURL(args->url(0)); + mainWin.activeView()->setUrl(args->url(0)); for (int i = 1; i < args->count(); ++i) { KRun::run("dolphin", args->url(i)); diff --git a/src/protocolcombo.cpp b/src/protocolcombo.cpp index f5f398ebcb..b40a73b5b8 100644 --- a/src/protocolcombo.cpp +++ b/src/protocolcombo.cpp @@ -27,8 +27,8 @@ const static int customProtocolIndex = 0; -ProtocolCombo::ProtocolCombo(const QString& protocol, URLNavigator* parent) - : URLNavigatorButton(-1, parent), +ProtocolCombo::ProtocolCombo(const QString& protocol, UrlNavigator* parent) + : UrlNavigatorButton(-1, parent), m_protocols(KProtocolInfo::protocols()) { qSort(m_protocols); diff --git a/src/protocolcombo.h b/src/protocolcombo.h index b043cc4045..5ddc113b9d 100644 --- a/src/protocolcombo.h +++ b/src/protocolcombo.h @@ -23,17 +23,17 @@ #include "urlbutton.h" #include "urlnavigatorbutton.h" -class URLNavigator; +class UrlNavigator; /** * A combobox listing available protocols */ -class ProtocolCombo : public URLNavigatorButton +class ProtocolCombo : public UrlNavigatorButton { Q_OBJECT public: - ProtocolCombo(const QString& protocol, URLNavigator* parent = 0); + ProtocolCombo(const QString& protocol, UrlNavigator* parent = 0); QString currentProtocol() const; diff --git a/src/sidebar.cpp b/src/sidebar.cpp index 4392d0a59b..278aafeb6b 100644 --- a/src/sidebar.cpp +++ b/src/sidebar.cpp @@ -46,9 +46,9 @@ Sidebar::Sidebar(QWidget* parent) : m_pagesSelector->insertItem(i18n("Information")); m_pagesSelector->insertItem(i18n("Bookmarks")); - // Assure that the combo box has the same height as the URL navigator for + // Assure that the combo box has the same height as the Url navigator for // a clean layout. - // TODO: the following 2 lines have been copied from the URLNavigator + // TODO: the following 2 lines have been copied from the UrlNavigator // constructor (-> provide a shared height setting?) QFontMetrics fontMetrics(font()); m_pagesSelector->setMinimumHeight(fontMetrics.height() + 8); diff --git a/src/sidebar.h b/src/sidebar.h index 29502836ca..fe5bf8f685 100644 --- a/src/sidebar.h +++ b/src/sidebar.h @@ -48,7 +48,7 @@ public: signals: /** * The user selected an item on sidebar widget and item has - * URL property, so inform the parent togo to this URL; + * Url property, so inform the parent togo to this Url; */ void urlChanged(const KUrl& url); diff --git a/src/statusbarspaceinfo.cpp b/src/statusbarspaceinfo.cpp index fbb64c9a35..3c6073ca5c 100644 --- a/src/statusbarspaceinfo.cpp +++ b/src/statusbarspaceinfo.cpp @@ -48,7 +48,7 @@ StatusBarSpaceInfo::~StatusBarSpaceInfo() { } -void StatusBarSpaceInfo::setURL(const KUrl& url) +void StatusBarSpaceInfo::setUrl(const KUrl& url) { m_url = url; refresh(); diff --git a/src/statusbarspaceinfo.h b/src/statusbarspaceinfo.h index 195c1971b6..8325716510 100644 --- a/src/statusbarspaceinfo.h +++ b/src/statusbarspaceinfo.h @@ -41,7 +41,7 @@ public: StatusBarSpaceInfo(QWidget* parent); virtual ~StatusBarSpaceInfo(); - void setURL(const KUrl& url); + void setUrl(const KUrl& url); const KUrl& url() const { return m_url; } protected: @@ -60,7 +60,7 @@ private slots: const QString& mountPoint); void slotDone(); - /** Refreshs the space information for the current set URL. */ + /** Refreshs the space information for the current set Url. */ void refresh(); private: diff --git a/src/undomanager.cpp b/src/undomanager.cpp index 958816b9d3..62a7ff0b99 100644 --- a/src/undomanager.cpp +++ b/src/undomanager.cpp @@ -144,10 +144,10 @@ void UndoManager::undo() emit redoTextChanged(i18n("Redo")); } - KUrl::List sourceURLs = command.source(); - KUrl::List::Iterator it = sourceURLs.begin(); - const KUrl::List::Iterator end = sourceURLs.end(); - const QString destURL(command.destination().prettyUrl(KUrl::AddTrailingSlash)); + KUrl::List sourceUrls = command.source(); + KUrl::List::Iterator it = sourceUrls.begin(); + const KUrl::List::Iterator end = sourceUrls.end(); + const QString destUrl(command.destination().prettyUrl(KUrl::AddTrailingSlash)); KIO::Job* job = 0; switch (command.type()) { @@ -155,8 +155,8 @@ void UndoManager::undo() case DolphinCommand::Copy: { KUrl::List list; while (it != end) { - const KUrl deleteURL(destURL + (*it).fileName()); - list.append(deleteURL); + const KUrl deleteUrl(destUrl + (*it).fileName()); + list.append(deleteUrl); ++it; } job = KIO::del(list, false, false); @@ -165,18 +165,18 @@ void UndoManager::undo() case DolphinCommand::Move: { KUrl::List list; - const KUrl newDestURL((*it).directory()); + const KUrl newDestUrl((*it).directory()); while (it != end) { - const KUrl newSourceURL(destURL + (*it).fileName()); - list.append(newSourceURL); + const KUrl newSourceUrl(destUrl + (*it).fileName()); + list.append(newSourceUrl); ++it; } - job = KIO::move(list, newDestURL, false); + job = KIO::move(list, newDestUrl, false); break; } case DolphinCommand::Rename: { - assert(sourceURLs.count() == 1); + assert(sourceUrls.count() == 1); KIO::NetAccess::move(command.destination(), (*it)); break; } @@ -186,8 +186,8 @@ void UndoManager::undo() // TODO: use KIO::special for accessing the trash protocol. See // also Dolphin::slotJobResult() for further details. const QString originalFileName((*it).fileName().section('-', 1)); - KUrl newDestURL(destURL + originalFileName); - KIO::NetAccess::move(*it, newDestURL); + KUrl newDestUrl(destUrl + originalFileName); + KIO::NetAccess::move(*it, newDestUrl); ++it; m_progressIndicator->execOperation(); @@ -252,36 +252,36 @@ void UndoManager::redo() Dolphin& dolphin = Dolphin::mainWin(); - KUrl::List sourceURLs = command.source(); - KUrl::List::Iterator it = sourceURLs.begin(); - const KUrl::List::Iterator end = sourceURLs.end(); + KUrl::List sourceUrls = command.source(); + KUrl::List::Iterator it = sourceUrls.begin(); + const KUrl::List::Iterator end = sourceUrls.end(); KIO::Job* job = 0; switch (command.type()) { case DolphinCommand::Link: { - job = KIO::link(sourceURLs, command.destination(), false); + job = KIO::link(sourceUrls, command.destination(), false); break; } case DolphinCommand::Copy: { - job = KIO::copy(sourceURLs, command.destination(), false); + job = KIO::copy(sourceUrls, command.destination(), false); break; } case DolphinCommand::Rename: case DolphinCommand::Move: { - job = KIO::move(sourceURLs, command.destination(), false); + job = KIO::move(sourceUrls, command.destination(), false); break; } case DolphinCommand::Trash: { - const QString destURL(command.destination().prettyUrl()); + const QString destUrl(command.destination().prettyUrl()); while (it != end) { // TODO: use KIO::special for accessing the trash protocol. See // also Dolphin::slotJobResult() for further details. const QString originalFileName((*it).fileName().section('-', 1)); - KUrl originalSourceURL(destURL + "/" + originalFileName); - KIO::Job* moveToTrashJob = KIO::trash(originalSourceURL); + KUrl originalSourceUrl(destUrl + "/" + originalFileName); + KIO::Job* moveToTrashJob = KIO::trash(originalSourceUrl); KIO::NetAccess::synchronousRun(moveToTrashJob, &dolphin); ++it; @@ -297,8 +297,8 @@ void UndoManager::redo() case DolphinCommand::CreateFile: { m_progressIndicator->execOperation(); - KUrl::List::Iterator it = sourceURLs.begin(); - assert(sourceURLs.count() == 1); + KUrl::List::Iterator it = sourceUrls.begin(); + assert(sourceUrls.count() == 1); KIO::CopyJob* copyJob = KIO::copyAs(*it, command.destination(), false); copyJob->setDefaultPermissions(true); job = copyJob; diff --git a/src/undomanager.h b/src/undomanager.h index 30a4aba390..f5ce782f95 100644 --- a/src/undomanager.h +++ b/src/undomanager.h @@ -31,8 +31,8 @@ class ProgressIndicator; /** * @short Represents a file manager command which can be undone and redone. * - * A command is specified by a type, a list of source URLs and a - * destination URL. + * A command is specified by a type, a list of source Urls and a + * destination Url. * * Due to the fixed set of commands a file manager offers this class is * a very simplified version of the classic command pattern. diff --git a/src/urlbutton.cpp b/src/urlbutton.cpp index 1f77f0ecae..a4415707a3 100644 --- a/src/urlbutton.cpp +++ b/src/urlbutton.cpp @@ -32,7 +32,7 @@ #include "dolphin.h" -URLButton::URLButton(URLNavigator* parent) +UrlButton::UrlButton(UrlNavigator* parent) : QPushButton(parent), m_displayHint(0), m_urlNavigator(parent) @@ -46,16 +46,16 @@ URLButton::URLButton(URLNavigator* parent) this, SLOT(update())); } -URLButton::~URLButton() +UrlButton::~UrlButton() { } -URLNavigator* URLButton::urlNavigator() const +UrlNavigator* UrlButton::urlNavigator() const { return m_urlNavigator; } -void URLButton::setDisplayHintEnabled(DisplayHint hint, +void UrlButton::setDisplayHintEnabled(DisplayHint hint, bool enable) { if (enable) { @@ -67,26 +67,26 @@ void URLButton::setDisplayHintEnabled(DisplayHint hint, update(); } -bool URLButton::isDisplayHintEnabled(DisplayHint hint) const +bool UrlButton::isDisplayHintEnabled(DisplayHint hint) const { return (m_displayHint & hint) > 0; } -void URLButton::enterEvent(QEvent* event) +void UrlButton::enterEvent(QEvent* event) { QPushButton::enterEvent(event); setDisplayHintEnabled(EnteredHint, true); update(); } -void URLButton::leaveEvent(QEvent* event) +void UrlButton::leaveEvent(QEvent* event) { QPushButton::leaveEvent(event); setDisplayHintEnabled(EnteredHint, false); update(); } -QColor URLButton::mixColors(const QColor& c1, +QColor UrlButton::mixColors(const QColor& c1, const QColor& c2) const { const int red = (c1.red() + c2.red()) / 2; diff --git a/src/urlbutton.h b/src/urlbutton.h index 2b2f051f34..41d81c24b5 100644 --- a/src/urlbutton.h +++ b/src/urlbutton.h @@ -18,34 +18,34 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#ifndef URLBUTTON_H -#define URLBUTTON_H +#ifndef UrlBUTTON_H +#define UrlBUTTON_H #include //Added by qt3to4: #include class KUrl; -class URLNavigator; +class UrlNavigator; class QPainter; /** - * @brief Base class for buttons of the URL navigator. + * @brief Base class for buttons of the Url navigator. * - * Each button of the URL navigator contains an URL, which + * Each button of the Url navigator contains an Url, which * is set as soon as the button has been clicked. * * @author Peter Penz */ -class URLButton : public QPushButton +class UrlButton : public QPushButton { Q_OBJECT public: - URLButton(URLNavigator* parent); - virtual ~URLButton(); + UrlButton(UrlNavigator* parent); + virtual ~UrlButton(); - URLNavigator* urlNavigator() const; + UrlNavigator* urlNavigator() const; protected: enum DisplayHint { @@ -65,7 +65,7 @@ protected: private: int m_displayHint; - URLNavigator* m_urlNavigator; + UrlNavigator* m_urlNavigator; }; #endif diff --git a/src/urlnavigator.cpp b/src/urlnavigator.cpp index 522198ff0e..0b6beebf7a 100644 --- a/src/urlnavigator.cpp +++ b/src/urlnavigator.cpp @@ -58,7 +58,7 @@ #include "protocolcombo.h" #include "urlnavigatorbutton.h" -URLNavigator::HistoryElem::HistoryElem() +UrlNavigator::HistoryElem::HistoryElem() : m_url(), m_currentFileName(), m_contentsX(0), @@ -66,7 +66,7 @@ URLNavigator::HistoryElem::HistoryElem() { } -URLNavigator::HistoryElem::HistoryElem(const KUrl& url) +UrlNavigator::HistoryElem::HistoryElem(const KUrl& url) : m_url(url), m_currentFileName(), m_contentsX(0), @@ -74,11 +74,11 @@ URLNavigator::HistoryElem::HistoryElem(const KUrl& url) { } -URLNavigator::HistoryElem::~HistoryElem() +UrlNavigator::HistoryElem::~HistoryElem() { } -URLNavigator::URLNavigator(const KUrl& url, +UrlNavigator::UrlNavigator(const KUrl& url, DolphinView* dolphinView) : Q3HBox(dolphinView), m_historyIndex(0), @@ -99,7 +99,7 @@ URLNavigator::URLNavigator(const KUrl& url, m_toggleButton->setMinimumHeight(minimumHeight()); connect(m_toggleButton, SIGNAL(clicked()), this, SLOT(slotClicked())); - if (DolphinSettings::instance().generalSettings()->editableURL()) { + if (DolphinSettings::instance().generalSettings()->editableUrl()) { m_toggleButton->toggle(); } @@ -116,7 +116,7 @@ URLNavigator::URLNavigator(const KUrl& url, connect(m_pathBox, SIGNAL(returnPressed(const QString&)), this, SLOT(slotReturnPressed(const QString&))); connect(m_pathBox, SIGNAL(urlActivated(const KUrl&)), - this, SLOT(slotURLActivated(const KUrl&))); + this, SLOT(slotUrlActivated(const KUrl&))); connect(dolphinView, SIGNAL(contentsMoved(int, int)), this, SLOT(slotContentsMoved(int, int))); @@ -127,53 +127,53 @@ URLNavigator::URLNavigator(const KUrl& url, updateContent(); } -URLNavigator::~URLNavigator() +UrlNavigator::~UrlNavigator() { } -void URLNavigator::setURL(const KUrl& url) +void UrlNavigator::setUrl(const KUrl& url) { QString urlStr(url.pathOrUrl()); - //kDebug() << "setURL(" << url << ")" << endl; + //kDebug() << "setUrl(" << url << ")" << endl; if (urlStr.at(0) == '~') { // replace '~' by the home directory urlStr.remove(0, 1); urlStr.insert(0, QDir::home().path()); } - const KUrl transformedURL(urlStr); + const KUrl transformedUrl(urlStr); if (m_historyIndex > 0) { - // Check whether the previous element of the history has the same URL. + // Check whether the previous element of the history has the same Url. // If yes, just go forward instead of inserting a duplicate history // element. - const KUrl& nextURL = m_history[m_historyIndex - 1].url(); - if (transformedURL == nextURL) { + const KUrl& nextUrl = m_history[m_historyIndex - 1].url(); + if (transformedUrl == nextUrl) { goForward(); // kDebug() << "goin' forward in history" << endl; return; } } - const KUrl& currURL = m_history[m_historyIndex].url(); - if (currURL == transformedURL) { + const KUrl& currUrl = m_history[m_historyIndex].url(); + if (currUrl == transformedUrl) { // don't insert duplicate history elements -// kDebug() << "currURL == transformedURL" << endl; +// kDebug() << "currUrl == transformedUrl" << endl; return; } updateHistoryElem(); - const Q3ValueListIterator it = m_history.at(m_historyIndex); - m_history.insert(it, HistoryElem(transformedURL)); + const Q3ValueListIterator it = m_history.at(m_historyIndex); + m_history.insert(it, HistoryElem(transformedUrl)); updateContent(); - emit urlChanged(transformedURL); + emit urlChanged(transformedUrl); emit historyChanged(); // Prevent an endless growing of the history: remembering - // the last 100 URLs should be enough... + // the last 100 Urls should be enough... if (m_historyIndex > 100) { m_history.erase(m_history.begin()); --m_historyIndex; @@ -181,7 +181,7 @@ void URLNavigator::setURL(const KUrl& url) /* kDebug() << "history starting ====================" << endl; int i = 0; - for (QValueListIterator it = m_history.begin(); + for (QValueListIterator it = m_history.begin(); it != m_history.end(); ++it, ++i) { @@ -190,13 +190,13 @@ void URLNavigator::setURL(const KUrl& url) kDebug() << "history done ========================" << endl;*/ } -const KUrl& URLNavigator::url() const +const KUrl& UrlNavigator::url() const { assert(!m_history.empty()); return m_history[m_historyIndex].url(); } -KUrl URLNavigator::url(int index) const +KUrl UrlNavigator::url(int index) const { assert(index >= 0); QString path(url().pathOrUrl()); @@ -210,13 +210,13 @@ KUrl URLNavigator::url(int index) const return path; } -const Q3ValueList& URLNavigator::history(int& index) const +const Q3ValueList& UrlNavigator::history(int& index) const { index = m_historyIndex; return m_history; } -void URLNavigator::goBack() +void UrlNavigator::goBack() { updateHistoryElem(); @@ -229,7 +229,7 @@ void URLNavigator::goBack() } } -void URLNavigator::goForward() +void UrlNavigator::goForward() { if (m_historyIndex > 0) { --m_historyIndex; @@ -239,32 +239,32 @@ void URLNavigator::goForward() } } -void URLNavigator::goUp() +void UrlNavigator::goUp() { - setURL(url().upUrl()); + setUrl(url().upUrl()); } -void URLNavigator::goHome() +void UrlNavigator::goHome() { - setURL(DolphinSettings::instance().generalSettings()->homeURL()); + setUrl(DolphinSettings::instance().generalSettings()->homeUrl()); } -void URLNavigator::setURLEditable(bool editable) +void UrlNavigator::setUrlEditable(bool editable) { - if (isURLEditable() != editable) { + if (isUrlEditable() != editable) { m_toggleButton->toggle(); slotClicked(); } } -bool URLNavigator::isURLEditable() const +bool UrlNavigator::isUrlEditable() const { return m_toggleButton->isChecked(); } -void URLNavigator::editURL(bool editOrBrowse) +void UrlNavigator::editUrl(bool editOrBrowse) { - setURLEditable(editOrBrowse); + setUrlEditable(editOrBrowse); if (editOrBrowse) { @@ -272,20 +272,20 @@ void URLNavigator::editURL(bool editOrBrowse) } } -DolphinView* URLNavigator::dolphinView() const +DolphinView* UrlNavigator::dolphinView() const { return m_dolphinView; } -void URLNavigator::keyReleaseEvent(QKeyEvent* event) +void UrlNavigator::keyReleaseEvent(QKeyEvent* event) { Q3HBox::keyReleaseEvent(event); - if (isURLEditable() && (event->key() == Qt::Key_Escape)) { - setURLEditable(false); + if (isUrlEditable() && (event->key() == Qt::Key_Escape)) { + setUrlEditable(false); } } -void URLNavigator::slotReturnPressed(const QString& text) +void UrlNavigator::slotReturnPressed(const QString& text) { // Parts of the following code have been taken // from the class KateFileSelector located in @@ -294,28 +294,28 @@ void URLNavigator::slotReturnPressed(const QString& text) // Copyright (C) 2001 Joseph Wenninger // Copyright (C) 2001 Anders Lund - KUrl typedURL(text); - if (typedURL.hasPass()) { - typedURL.setPass(QString::null); + KUrl typedUrl(text); + if (typedUrl.hasPass()) { + typedUrl.setPass(QString::null); } QStringList urls = m_pathBox->urls(); - urls.remove(typedURL.url()); - urls.prepend(typedURL.url()); + urls.remove(typedUrl.url()); + urls.prepend(typedUrl.url()); m_pathBox->setUrls(urls, KUrlComboBox::RemoveBottom); - setURL(typedURL); - // The URL might have been adjusted by URLNavigator::setURL(), hence + setUrl(typedUrl); + // The Url might have been adjusted by UrlNavigator::setUrl(), hence // synchronize the result in the path box. m_pathBox->setUrl(url()); } -void URLNavigator::slotURLActivated(const KUrl& url) +void UrlNavigator::slotUrlActivated(const KUrl& url) { - setURL(url); + setUrl(url); } -void URLNavigator::slotRemoteHostActivated() +void UrlNavigator::slotRemoteHostActivated() { KUrl u = url(); @@ -358,11 +358,11 @@ void URLNavigator::slotRemoteHostActivated() } } - setURL(u); + setUrl(u); } } -void URLNavigator::slotProtocolChanged(const QString& protocol) +void UrlNavigator::slotProtocolChanged(const QString& protocol) { KUrl url; url.setProtocol(protocol); @@ -377,7 +377,7 @@ void URLNavigator::slotProtocolChanged(const QString& protocol) m_navButtons.clear(); if (KProtocolInfo::protocolClass(protocol) == ":local") { - setURL(url); + setUrl(url); } else { if (!m_host) { @@ -398,21 +398,21 @@ void URLNavigator::slotProtocolChanged(const QString& protocol) } } -void URLNavigator::slotRequestActivation() +void UrlNavigator::slotRequestActivation() { m_dolphinView->requestActivation(); } -void URLNavigator::slotBookmarkActivated(int index) +void UrlNavigator::slotBookmarkActivated(int index) { m_dolphinView->statusBar()->clear(); m_dolphinView->requestActivation(); KBookmark bookmark = DolphinSettings::instance().bookmark(index); - m_dolphinView->setURL(bookmark.url()); + m_dolphinView->setUrl(bookmark.url()); } -void URLNavigator::slotRedirection(const KUrl& oldUrl, const KUrl& newUrl) +void UrlNavigator::slotRedirection(const KUrl& oldUrl, const KUrl& newUrl) { // kDebug() << "received redirection to " << newUrl << endl; kDebug() << "received redirection from " << oldUrl << " to " << newUrl << endl; @@ -425,25 +425,25 @@ kDebug() << "received redirection from " << oldUrl << " to " << newUrl << endl; m_urls.append(newUrl);*/ } -void URLNavigator::slotContentsMoved(int x, int y) +void UrlNavigator::slotContentsMoved(int x, int y) { m_history[m_historyIndex].setContentsX(x); m_history[m_historyIndex].setContentsY(y); } -void URLNavigator::slotClicked() +void UrlNavigator::slotClicked() { - if (isURLEditable()) { + if (isUrlEditable()) { m_pathBox->setFocus(); updateContent(); } else { - setURL(m_pathBox->currentText()); + setUrl(m_pathBox->currentText()); m_dolphinView->setFocus(); } } -void URLNavigator::updateHistoryElem() +void UrlNavigator::updateHistoryElem() { assert(m_historyIndex >= 0); const KFileItem* item = m_dolphinView->currentFileItem(); @@ -454,9 +454,9 @@ void URLNavigator::updateHistoryElem() m_history[m_historyIndex].setContentsY(m_dolphinView->contentsY()); } -void URLNavigator::updateContent() +void UrlNavigator::updateContent() { - // delete all existing URL navigator buttons + // delete all existing Url navigator buttons Q3ValueList::const_iterator it = m_navButtons.constBegin(); while (it != m_navButtons.constEnd()) { (*it)->close(); @@ -496,7 +496,7 @@ void URLNavigator::updateContent() QString bookmarkPath; if (bookmark.isNull()) { - // No bookmark is a part of the current URL. + // No bookmark is a part of the current Url. // The following code tries to guess the bookmark // path. E. g. "fish://root@192.168.0.2/var/lib" writes // "fish://root@192.168.0.2" to 'bookmarkPath', which leads to the @@ -510,8 +510,8 @@ void URLNavigator::updateContent() } const uint len = bookmarkPath.length(); - // calculate the start point for the URL navigator buttons by counting - // the slashs inside the bookmark URL + // calculate the start point for the Url navigator buttons by counting + // the slashs inside the bookmark Url int slashCount = 0; for (uint i = 0; i < len; ++i) { if (bookmarkPath.at(i) == QChar('/')) { @@ -573,7 +573,7 @@ void URLNavigator::updateContent() } } - // create URL navigator buttons + // create Url navigator buttons int idx = slashCount; bool hasNext = true; do { @@ -581,9 +581,9 @@ void URLNavigator::updateContent() const bool isFirstButton = (idx == slashCount); hasNext = isFirstButton || !dir_name.isEmpty(); if (hasNext) { - URLNavigatorButton* button = new URLNavigatorButton(idx, this); + UrlNavigatorButton* button = new UrlNavigatorButton(idx, this); if (isFirstButton) { - // the first URL navigator button should get the name of the + // the first Url navigator button should get the name of the // bookmark instead of the directory name QString text = bookmark.text(); if (text.isEmpty()) { diff --git a/src/urlnavigator.h b/src/urlnavigator.h index 35ae5454a2..c23ead297d 100644 --- a/src/urlnavigator.h +++ b/src/urlnavigator.h @@ -18,8 +18,8 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#ifndef URLNAVIGATOR_H -#define URLNAVIGATOR_H +#ifndef UrlNAVIGATOR_H +#define UrlNAVIGATOR_H #include //Added by qt3to4: @@ -45,20 +45,20 @@ class DolphinView; class ProtocolCombo; /** - * @brief Navigation bar which contains the current shown URL. + * @brief Navigation bar which contains the current shown Url. * - * The URL navigator offers two modes: - * - Editable: Represents the 'classic' mode, where the current URL + * The Url navigator offers two modes: + * - Editable: Represents the 'classic' mode, where the current Url * is editable inside a line editor. - * - Non editable: The URL is represented by a number of buttons, where - * clicking on a button results in activating the URL + * - Non editable: The Url is represented by a number of buttons, where + * clicking on a button results in activating the Url * the button represents. This mode also supports drag * and drop of items. * * The mode can be changed by a toggle button located on the left side of * the navigator. * - * The URL navigator also remembers the URL history and allows to go + * The Url navigator also remembers the Url history and allows to go * back and forward within this history. * * @author Peter Penz @@ -66,15 +66,15 @@ class ProtocolCombo; typedef Q3ValueList UrlStack; -class URLNavigator : public Q3HBox +class UrlNavigator : public Q3HBox { Q_OBJECT public: /** - * @brief Represents the history element of an URL. + * @brief Represents the history element of an Url. * - * A history element contains the URL, the name of the current file + * A history element contains the Url, the name of the current file * (the 'current file' is the file where the cursor is located) and * the x- and y-position of the content. */ @@ -102,24 +102,24 @@ public: int m_contentsY; }; - URLNavigator(const KUrl& url, DolphinView* dolphinView);; - virtual ~URLNavigator(); + UrlNavigator(const KUrl& url, DolphinView* dolphinView);; + virtual ~UrlNavigator(); /** - * Sets the current active URL. - * The signals URLNavigator::urlChanged and URLNavigator::historyChanged + * Sets the current active Url. + * The signals UrlNavigator::urlChanged and UrlNavigator::historyChanged * are submitted. */ - void setURL(const KUrl& url); + void setUrl(const KUrl& url); - /** Returns the current active URL. */ + /** Returns the current active Url. */ const KUrl& url() const; - /** Returns the portion of the current active URL up to the button at index. */ + /** Returns the portion of the current active Url up to the button at index. */ KUrl url(int index) const; /** - * Returns the complete URL history. The index 0 indicates the oldest + * Returns the complete Url history. The index 0 indicates the oldest * history element. * @param index Output parameter which indicates the current * index of the location. @@ -127,44 +127,44 @@ public: const Q3ValueList& history(int& index) const; /** - * Goes back one step in the URL history. The signals - * URLNavigator::urlChanged and URLNavigator::historyChanged + * Goes back one step in the Url history. The signals + * UrlNavigator::urlChanged and UrlNavigator::historyChanged * are submitted. */ void goBack(); /** - * Goes forward one step in the URL history. The signals - * URLNavigator::urlChanged and URLNavigator::historyChanged + * Goes forward one step in the Url history. The signals + * UrlNavigator::urlChanged and UrlNavigator::historyChanged * are submitted. */ void goForward(); /** - * Goes up one step of the URL path. The signals - * URLNavigator::urlChanged and URLNavigator::historyChanged + * Goes up one step of the Url path. The signals + * UrlNavigator::urlChanged and UrlNavigator::historyChanged * are submitted. */ void goUp(); /** - * Goes to the home URL. The signals URLNavigator::urlChanged - * and URLNavigator::historyChanged are submitted. + * Goes to the home Url. The signals UrlNavigator::urlChanged + * and UrlNavigator::historyChanged are submitted. */ void goHome(); /** - * @return True, if the URL is editable by the user within a line editor. - * If false is returned, each part of the URL is presented by a button + * @return True, if the Url is editable by the user within a line editor. + * If false is returned, each part of the Url is presented by a button * for fast navigation. */ - bool isURLEditable() const; + bool isUrlEditable() const; /** * Switches to the edit mode and assures that the keyboard focus * is assigned. */ - void editURL(bool editOrBrowse); //TODO: switch to an enum + void editUrl(bool editOrBrowse); //TODO: switch to an enum DolphinView* dolphinView() const; @@ -179,7 +179,7 @@ protected: private slots: void slotReturnPressed(const QString& text); - void slotURLActivated(const KUrl& url); + void slotUrlActivated(const KUrl& url); void slotRemoteHostActivated(); void slotProtocolChanged(const QString& protocol); @@ -197,7 +197,7 @@ private slots: /** * Switches the navigation bar between the editable and noneditable - * state (see setURLEditable()) and is connected to the clicked signal + * state (see setUrlEditable()) and is connected to the clicked signal * of the navigation bar button. */ void slotClicked(); @@ -216,11 +216,11 @@ private: //UrlStack m_urls; /** - * Allows to edit the URL of the navigation bar if \a editable + * Allows to edit the Url of the navigation bar if \a editable * is true. If \a editable is false, each part of - * the URL is presented by a button for a fast navigation. + * the Url is presented by a button for a fast navigation. */ - void setURLEditable(bool editable); + void setUrlEditable(bool editable); /** * Updates the history element with the current file item diff --git a/src/urlnavigatorbutton.cpp b/src/urlnavigatorbutton.cpp index eecea2c77d..811a11b892 100644 --- a/src/urlnavigatorbutton.cpp +++ b/src/urlnavigatorbutton.cpp @@ -42,26 +42,26 @@ #include "dolphinview.h" #include "dolphin.h" -URLNavigatorButton::URLNavigatorButton(int index, URLNavigator* parent) : - URLButton(parent), +UrlNavigatorButton::UrlNavigatorButton(int index, UrlNavigator* parent) : + UrlButton(parent), m_index(-1), m_listJob(0) { setAcceptDrops(true); setMinimumWidth(arrowWidth()); setIndex(index); - connect(this, SIGNAL(clicked()), this, SLOT(updateNavigatorURL())); + connect(this, SIGNAL(clicked()), this, SLOT(updateNavigatorUrl())); m_popupDelay = new QTimer(this); connect(m_popupDelay, SIGNAL(timeout()), this, SLOT(startListJob())); connect(this, SIGNAL(pressed()), this, SLOT(startPopupDelay())); } -URLNavigatorButton::~URLNavigatorButton() +UrlNavigatorButton::~UrlNavigatorButton() { } -void URLNavigatorButton::setIndex(int index) +void UrlNavigatorButton::setIndex(int index) { m_index = index; @@ -72,7 +72,7 @@ void URLNavigatorButton::setIndex(int index) QString path(urlNavigator()->url().pathOrUrl()); setText(path.section('/', index, index)); - // Check whether the button indicates the full path of the URL. If + // Check whether the button indicates the full path of the Url. If // this is the case, the button is marked as 'active'. ++index; QFont adjustedFont(font()); @@ -89,12 +89,12 @@ void URLNavigatorButton::setIndex(int index) update(); } -int URLNavigatorButton::index() const +int UrlNavigatorButton::index() const { return m_index; } -void URLNavigatorButton::drawButton(QPainter* painter) +void UrlNavigatorButton::drawButton(QPainter* painter) { const int buttonWidth = width(); const int buttonHeight = height(); @@ -183,9 +183,9 @@ void URLNavigatorButton::drawButton(QPainter* painter) } } -void URLNavigatorButton::enterEvent(QEvent* event) +void UrlNavigatorButton::enterEvent(QEvent* event) { - URLButton::enterEvent(event); + UrlButton::enterEvent(event); // if the text is clipped due to a small window width, the text should // be shown as tooltip @@ -194,13 +194,13 @@ void URLNavigatorButton::enterEvent(QEvent* event) } } -void URLNavigatorButton::leaveEvent(QEvent* event) +void UrlNavigatorButton::leaveEvent(QEvent* event) { - URLButton::leaveEvent(event); + UrlButton::leaveEvent(event); QToolTip::remove(this); } -void URLNavigatorButton::dropEvent(QDropEvent* event) +void UrlNavigatorButton::dropEvent(QDropEvent* event) { if (m_index < 0) { return; @@ -214,14 +214,14 @@ void URLNavigatorButton::dropEvent(QDropEvent* event) QString path(urlNavigator()->url().prettyUrl()); path = path.section('/', 0, m_index); - Dolphin::mainWin().dropURLs(urls, KUrl(path)); + Dolphin::mainWin().dropUrls(urls, KUrl(path)); setDisplayHintEnabled(DraggedHint, false); update(); }*/ } -void URLNavigatorButton::dragEnterEvent(QDragEnterEvent* event) +void UrlNavigatorButton::dragEnterEvent(QDragEnterEvent* event) { /* KDE4-TODO: event->accept(KUrlDrag::canDecode(event)); @@ -230,27 +230,27 @@ void URLNavigatorButton::dragEnterEvent(QDragEnterEvent* event) update(); } -void URLNavigatorButton::dragLeaveEvent(QDragLeaveEvent* event) +void UrlNavigatorButton::dragLeaveEvent(QDragLeaveEvent* event) { - URLButton::dragLeaveEvent(event); + UrlButton::dragLeaveEvent(event); setDisplayHintEnabled(DraggedHint, false); update(); } -void URLNavigatorButton::updateNavigatorURL() +void UrlNavigatorButton::updateNavigatorUrl() { if (m_index < 0) { return; } - URLNavigator* navigator = urlNavigator(); + UrlNavigator* navigator = urlNavigator(); assert(navigator != 0); - navigator->setURL(navigator->url(m_index)); + navigator->setUrl(navigator->url(m_index)); } -void URLNavigatorButton::startPopupDelay() +void UrlNavigatorButton::startPopupDelay() { if (m_popupDelay->isActive() || m_listJob || m_index < 0) { return; @@ -259,7 +259,7 @@ void URLNavigatorButton::startPopupDelay() m_popupDelay->start(300, true); } -void URLNavigatorButton::stopPopupDelay() +void UrlNavigatorButton::stopPopupDelay() { m_popupDelay->stop(); if (m_listJob) { @@ -268,7 +268,7 @@ void URLNavigatorButton::stopPopupDelay() } } -void URLNavigatorButton::startListJob() +void UrlNavigatorButton::startListJob() { if (m_listJob) { return; @@ -283,7 +283,7 @@ void URLNavigatorButton::startListJob() connect(m_listJob, SIGNAL(result(KIO::Job*)), this, SLOT(listJobFinished(KIO::Job*))); } -void URLNavigatorButton::entriesList(KIO::Job* job, const KIO::UDSEntryList& entries) +void UrlNavigatorButton::entriesList(KIO::Job* job, const KIO::UDSEntryList& entries) { if (job != m_listJob) { return; @@ -328,7 +328,7 @@ void URLNavigatorButton::entriesList(KIO::Job* job, const KIO::UDSEntryList& ent m_subdirs.sort(); } -void URLNavigatorButton::listJobFinished(KIO::Job* job) +void UrlNavigatorButton::listJobFinished(KIO::Job* job) { if (job != m_listJob) { return; @@ -357,7 +357,7 @@ void URLNavigatorButton::listJobFinished(KIO::Job* job) if (result != -1) { KUrl url = urlNavigator()->url(m_index); url.addPath(m_subdirs[result]); - urlNavigator()->setURL(url); + urlNavigator()->setUrl(url); } m_listJob = 0; @@ -366,7 +366,7 @@ void URLNavigatorButton::listJobFinished(KIO::Job* job) setDisplayHintEnabled(PopupActiveHint, false); } -int URLNavigatorButton::arrowWidth() const +int UrlNavigatorButton::arrowWidth() const { int width = (height() / 2) - 7; if (width < 4) { @@ -375,7 +375,7 @@ int URLNavigatorButton::arrowWidth() const return width; } -bool URLNavigatorButton::isTextClipped() const +bool UrlNavigatorButton::isTextClipped() const { int availableWidth = width(); if (!isDisplayHintEnabled(ActivatedHint)) { diff --git a/src/urlnavigatorbutton.h b/src/urlnavigatorbutton.h index f7d2c547b4..44671fe2dd 100644 --- a/src/urlnavigatorbutton.h +++ b/src/urlnavigatorbutton.h @@ -17,8 +17,8 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#ifndef URLNAVIGATORBUTTON_H -#define URLNAVIGATORBUTTON_H +#ifndef UrlNAVIGATORBUTTON_H +#define UrlNAVIGATORBUTTON_H #include //Added by qt3to4: @@ -32,7 +32,7 @@ #include class KUrl; -class URLNavigator; +class UrlNavigator; class QPainter; namespace KIO @@ -41,20 +41,20 @@ namespace KIO } /** - * @brief Button of the URL navigator which contains one part of an URL. + * @brief Button of the Url navigator which contains one part of an Url. * - * It is possible to drop a various number of items to an URL button. In this case + * It is possible to drop a various number of items to an Url button. In this case * a context menu is opened where the user must select whether he wants - * to copy, move or link the dropped items to the URL part indicated by + * to copy, move or link the dropped items to the Url part indicated by * the button. */ -class URLNavigatorButton : public URLButton +class UrlNavigatorButton : public UrlButton { Q_OBJECT public: - URLNavigatorButton(int index, URLNavigator* parent = 0); - virtual ~URLNavigatorButton(); + UrlNavigatorButton(int index, UrlNavigator* parent = 0); + virtual ~UrlNavigatorButton(); void setIndex(int index); int index() const; @@ -67,7 +67,7 @@ protected: virtual void dragLeaveEvent(QDragLeaveEvent* event); private slots: - void updateNavigatorURL(); + void updateNavigatorUrl(); void startPopupDelay(); void stopPopupDelay(); void startListJob(); diff --git a/src/viewproperties.h b/src/viewproperties.h index 1524707f84..98d5a94b28 100644 --- a/src/viewproperties.h +++ b/src/viewproperties.h @@ -34,7 +34,7 @@ class QFile; * * The view properties are automatically stored inside * the directory as hidden file called '.dolphinview'. To read out the view properties - * just construct an instance by passing the URL of the directory: + * just construct an instance by passing the Url of the directory: * \code * ViewProperties props(KUrl("/home/peter/Documents")); * const DolphinView::Mode mode = props.viewMode();