svn path=/trunk/playground/utils/dolphin/; revision=606991
40 files changed:
#include "dolphin.h"
#include "urlnavigator.h"
#include "dolphin.h"
#include "urlnavigator.h"
-BookmarkSelector::BookmarkSelector(URLNavigator* parent) :
- URLButton(parent),
+BookmarkSelector::BookmarkSelector(UrlNavigator* parent) :
+ UrlButton(parent),
m_selectedIndex(0)
{
setFocusPolicy(Qt::NoFocus);
m_selectedIndex(0)
{
setFocusPolicy(Qt::NoFocus);
int maxLength = 0;
m_selectedIndex = -1;
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()) {
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()));
if (length > maxLength) {
m_selectedIndex = i;
setPixmap(SmallIcon(bookmark.icon()));
}
if (m_selectedIndex < 0) {
}
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"));
}
// a generic folder icon as pixmap for indication:
setPixmap(SmallIcon("folder"));
}
//Added by qt3to4:
#include <Q3PopupMenu>
//Added by qt3to4:
#include <Q3PopupMenu>
class Q3PopupMenu;
class KUrl;
class Q3PopupMenu;
class KUrl;
* The icon from the current selected bookmark is shown
* inside the bookmark selector.
*
* The icon from the current selected bookmark is shown
* inside the bookmark selector.
*
* @author Peter Penz <peter.penz@gmx.at>
*/
* @author Peter Penz <peter.penz@gmx.at>
*/
-class BookmarkSelector : public URLButton
+class BookmarkSelector : public UrlButton
* @param parent Parent widget where the bookmark selector
* is embedded into.
*/
* @param parent Parent widget where the bookmark selector
* is embedded into.
*/
- BookmarkSelector(URLNavigator* parent);
+ BookmarkSelector(UrlNavigator* parent);
virtual ~BookmarkSelector();
/**
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);
*/
void updateSelection(const KUrl& url);
- * 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);
* selector.
*/
virtual void drawButton(QPainter* painter);
Q3ListViewItem* item = new Q3ListViewItem(m_listView);
item->setPixmap(PixmapIdx, SmallIcon(bookmark.icon()));
item->setText(NameIdx, bookmark.text());
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());
// add hidden column to be able to retrieve the icon name again
item->setText(IconIdx, bookmark.icon());
while (item != 0) {
root.addBookmark(manager,
item->text(NameIdx),
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();
}
item->text(IconIdx)); // hidden column
item = item->itemBelow();
}
Q3ListViewItem* item = new Q3ListViewItem(m_listView);
item->setPixmap(PixmapIdx, SmallIcon(bookmark.icon()));
item->setText(NameIdx, bookmark.text());
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);
item->setText(IconIdx, bookmark.icon());
m_listView->insertItem(item);
KBookmark bookmark = EditBookmarkDialog::getBookmark(i18n("Edit Bookmark"),
item->text(NameIdx),
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->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());
}
}
item->setText(IconIdx, bookmark.icon());
}
}
pixmap = *(item->pixmap(0));
}
QString name(item->text(NameIdx));
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));
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);
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);
selectedItem->setText(IconIdx, icon);
m_listView->setSelected(item, true);
enum ColumnIndex {
PixmapIdx = 0,
NameIdx = 1,
enum ColumnIndex {
PixmapIdx = 0,
NameIdx = 1,
const int index = m_bookmarksList->index(item);
KBookmark bookmark = DolphinSettings::instance().bookmark(index);
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,
}
void BookmarksSidebarPage::slotContextMenuRequested(Q3ListBoxItem* item,
int maxLength = 0;
int selectedIndex = -1;
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()) {
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;
if (length > maxLength) {
selectedIndex = i;
maxLength = length;
m_bookmarksList->setSelected(currentIndex, false);
}
else {
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);
}
m_bookmarksList->setSelected(selectedIndex, true);
}
m_bookmarksList->blockSignals(block);
}
-void BookmarksSidebarPage::slotURLChanged(const KUrl& url)
+void BookmarksSidebarPage::slotUrlChanged(const KUrl& url)
{
adjustSelection(url);
}
{
adjustSelection(url);
}
{
DolphinView* view = Dolphin::mainWin().activeView();
adjustSelection(view->url());
{
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) :
}
BookmarksListBox::BookmarksListBox(QWidget* parent) :
*
* It is possible to add, remove and edit bookmarks
* by a context menu. The selection of the bookmark
*
* 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
* the active view.
*/
class BookmarksSidebarPage : public SidebarPage
/**
* Checks whether the left mouse button has been clicked above a bookmark.
/**
* 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);
*/
void slotMouseButtonClicked(int button, Q3ListBoxItem* item);
void slotContextMenuRequested(Q3ListBoxItem* item, const QPoint& pos);
/**
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);
- * 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
*/
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();
*/
void connectToActiveView();
emit activeViewChanged();
}
emit activeViewChanged();
}
-void Dolphin::dropURLs(const KUrl::List& urls,
+void Dolphin::dropUrls(const KUrl::List& urls,
const KUrl& destination)
{
int selectedIndex = -1;
const KUrl& destination)
{
int selectedIndex = -1;
case 0: {
// 'Move Here' has been selected
updateViewProperties(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);
break;
}
case 1: {
// 'Copy Here' has been selected
updateViewProperties(urls);
- copyURLs(urls, destination);
+ copyUrls(urls, destination);
-void Dolphin::slotURLChanged(const KUrl& url)
+void Dolphin::slotUrlChanged(const KUrl& url)
{
updateEditActions();
updateGoActions();
setCaption(url.fileName());
}
{
updateEditActions();
updateGoActions();
setCaption(url.fileName());
}
-void Dolphin::slotURLChangeRequest(const KUrl& url)
+void Dolphin::slotUrlChangeRequest(const KUrl& url)
- m_activeView->setURL(url);
+ m_activeView->setUrl(url);
}
void Dolphin::slotViewModeChanged()
}
void Dolphin::slotViewModeChanged()
updateEditActions();
assert(m_view[PrimaryIdx] != 0);
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) {
if (m_view[SecondaryIdx] != 0) {
- selectedURLsCount += m_view[SecondaryIdx]->selectedURLs().count();
+ selectedUrlsCount += m_view[SecondaryIdx]->selectedUrls().count();
}
KAction* compareFilesAction = actionCollection()->action("compare_files");
}
KAction* compareFilesAction = actionCollection()->action("compare_files");
- compareFilesAction->setEnabled(selectedURLsCount == 2);
+ compareFilesAction->setEnabled(selectedUrlsCount == 2);
m_activeView->updateStatusBar();
m_activeView->updateStatusBar();
void Dolphin::saveProperties(KConfig* config)
{
config->setGroup("Primary view");
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");
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");
}
}
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();
}
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();
}
else if (m_view[SecondaryIdx] != 0) {
toggleSplitView();
clearStatusBar();
DolphinStatusBar* statusBar = m_activeView->statusBar();
clearStatusBar();
DolphinStatusBar* statusBar = m_activeView->statusBar();
- const KUrl baseURL(m_activeView->url());
+ const KUrl baseUrl(m_activeView->url());
QString name(i18n("New Folder"));
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"));
}
else {
name = KIO::encodeFileName(name);
}
else {
name = KIO::encodeFileName(name);
url.addPath(name);
}
ok = KIO::NetAccess::mkdir(url, this);
url.addPath(name);
}
ok = KIO::NetAccess::mkdir(url, this);
}
// Get the source path of the template which should be copied.
}
// 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));
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
QString name(i18n(entry.name.ascii()));
// Most entry names end with "..." (e. g. "HTML File..."), which is ok for
// 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").
// 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();
- name = KIO::RenameDlg::suggestName(viewURL, name);
+ name = KIO::RenameDlg::suggestName(viewUrl, name);
}
// let the user change the suggested file name
}
// let the user change the suggested file name
// before copying the template to the destination path check whether a file
// with the given name already exists
// 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
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;
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);
}
UndoManager::instance().addCommand(command);
}
void Dolphin::moveToTrash()
{
clearStatusBar();
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();
}
void Dolphin::deleteItems()
{
clearStatusBar();
- KUrl::List list = m_activeView->selectedURLs();
+ KUrl::List list = m_activeView->selectedUrls();
const uint itemCount = list.count();
assert(itemCount >= 1);
const uint itemCount = list.count();
assert(itemCount >= 1);
void Dolphin::cut()
{
m_clipboardContainsCutData = true;
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);*/
}
widget());
QApplication::clipboard()->setData(data);*/
}
{
m_clipboardContainsCutData = false;
/* KDE4-TODO:
{
m_clipboardContainsCutData = false;
/* KDE4-TODO:
- Q3DragObject* data = new KUrlDrag(m_activeView->selectedURLs(),
+ Q3DragObject* data = new KUrlDrag(m_activeView->selectedUrls(),
widget());
QApplication::clipboard()->setData(data);*/
}
widget());
QApplication::clipboard()->setData(data);*/
}
- 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
// 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,
const KFileItem fileItem(S_IFDIR,
KFileItem::Unknown,
true);
if (fileItem.isDir()) {
// only one item is selected which is a directory, hence paste
// into this directory
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) {
if (m_clipboardContainsCutData) {
- moveURLs(sourceURLs, destURL);
+ moveUrls(sourceUrls, destUrl);
m_clipboardContainsCutData = false;
clipboard->clear();
}
else {
m_clipboardContainsCutData = false;
clipboard->clear();
}
else {
- copyURLs(sourceURLs, destURL);
+ copyUrls(sourceUrls, destUrl);
//}
if (pasteAction->isEnabled()) {
//}
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
const uint count = urls.count();
if (count > 1) {
// pasting should not be allowed when more than one file
bool editOrBrowse = action->isChecked();
// action->setChecked(action->setChecked);
bool editOrBrowse = action->isChecked();
// action->setChecked(action->setChecked);
- m_activeView->setURLEditable(editOrBrowse);
+ m_activeView->setUrlEditable(editOrBrowse);
}
void Dolphin::editLocation()
{
KToggleAction* action = static_cast<KToggleAction*>(actionCollection()->action("editable_location"));
action->setChecked(true);
}
void Dolphin::editLocation()
{
KToggleAction* action = static_cast<KToggleAction*>(actionCollection()->action("editable_location"));
action->setChecked(true);
- m_activeView->setURLEditable(true);
+ m_activeView->setUrlEditable(true);
}
void Dolphin::adjustViewProperties()
}
void Dolphin::adjustViewProperties()
- KUrl::List urls = m_view[PrimaryIdx]->selectedURLs();
+ KUrl::List urls = m_view[PrimaryIdx]->selectedUrls();
switch (urls.count()) {
case 0: {
assert(m_view[SecondaryIdx] != 0);
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];
assert(urls.count() == 2);
urlA = urls[0];
urlB = urls[1];
case 1: {
urlA = urls[0];
assert(m_view[SecondaryIdx] != 0);
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;
assert(urls.count() == 1);
urlB = urls[0];
break;
DolphinCommand command = (*it).command;
if (command.type() == DolphinCommand::Trash) {
// To be able to perform an undo for the 'Move to Trash' operation
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<QString, QString> metaData = job->metaData();
// 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<QString, QString> 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) {
while (sourceIt != sourceEnd) {
- QMap<QString, QString>::ConstIterator metaIt = metaData.find("trashURL-" + (*sourceIt).path());
+ QMap<QString, QString>::ConstIterator metaIt = metaData.find("trashUrl-" + (*sourceIt).path());
if (metaIt != metaData.end()) {
if (metaIt != metaData.end()) {
- newSourceURLs.append(KUrl(metaIt.data()));
+ newSourceUrls.append(KUrl(metaIt.data()));
- command.setSource(newSourceURLs);
+ command.setSource(newSourceUrls);
}
UndoManager::instance().addCommand(command);
}
UndoManager::instance().addCommand(command);
assert(manager != 0);
KBookmarkGroup root = manager->root();
if (root.first().isNull()) {
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");
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");
setupActions();
setupGUI(Keys|Save|Create|ToolBar);
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,
m_view[PrimaryIdx] = new DolphinView(m_splitter,
props.viewMode(),
props.isShowHiddenFilesEnabled());
props.viewMode(),
props.isShowHiddenFilesEnabled());
const QString name(config.readEntry("Name"));
QString key(name);
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;
if (!path.endsWith("emptydir")) {
if (path.endsWith("TextFile.txt")) {
key = "1" + key;
else if (!KDesktopFile::isDesktopFile(path)) {
key = "2" + key;
}
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")){
key = "3" + key;
}
else if (path.endsWith("Program.desktop")){
void Dolphin::updateHistory()
{
int index = 0;
void Dolphin::updateHistory()
{
int index = 0;
- const Q3ValueList<URLNavigator::HistoryElem> list = m_activeView->urlHistory(index);
+ const Q3ValueList<UrlNavigator::HistoryElem> list = m_activeView->urlHistory(index);
KAction* backAction = actionCollection()->action("go_back");
if (backAction != 0) {
KAction* backAction = actionCollection()->action("go_back");
if (backAction != 0) {
void Dolphin::updateGoActions()
{
KAction* goUpAction = actionCollection()->action(KStdAction::stdName(KStdAction::Up));
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)
}
void Dolphin::updateViewProperties(const KUrl::List& urls)
}
// Updating the view properties might take up to several seconds
}
// 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..."),
// 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..."),
-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);
}
{
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);
{
KIO::Job* job = KIO::move(source, dest);
addPendingUndoJob(job, DolphinCommand::Move, source, dest);
m_sidebar->show();
connect(m_sidebar, SIGNAL(urlChanged(const KUrl&)),
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);
m_splitter->setCollapsible(m_sidebar, false);
m_splitter->setResizeMode(m_sidebar, QSplitter::KeepSize);
m_splitter->moveToFirst(m_sidebar);
class Q3IconViewItem;
class QSplitter;
class KAction;
class Q3IconViewItem;
class QSplitter;
class KAction;
DolphinView* activeView() const { return m_activeView; }
/**
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.
* 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
- * @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.
*/
* copied or linked to.
*/
- void dropURLs(const KUrl::List& urls,
+ void dropUrls(const KUrl::List& urls,
const KUrl& destination);
/**
const KUrl& destination);
/**
/**
* Updates the caption of the main window and the state
/**
* 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);
- void slotURLChangeRequest(const KUrl& url);
+ void slotUrlChangeRequest(const KUrl& url);
/** Updates the state of all 'View' menu actions. */
void slotViewModeChanged();
/** Updates the state of all 'View' menu actions. */
void slotViewModeChanged();
*/
void adjustViewProperties();
*/
void adjustViewProperties();
- /** Goes back on step of the URL history. */
+ /** Goes back on step of the Url history. */
- /** Goes forward one step of the URL history. */
+ /** Goes forward one step of the Url history. */
- /** Goes up one hierarchy of the current URL. */
+ /** Goes up one hierarchy of the current Url. */
- /** Goes to the home URL. */
+ /** Goes to the home Url. */
void goHome();
/** Opens a terminal for the current shown directory. */
void goHome();
/** Opens a terminal for the current shown directory. */
void updateViewActions();
void updateGoActions();
void updateViewProperties(const KUrl::List& urls);
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,
void addPendingUndoJob(KIO::Job* job,
DolphinCommand::Type commandType,
const KUrl::List& source,
KMenu* popup = new KMenu(m_dolphinView);
Dolphin& dolphin = Dolphin::mainWin();
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 };
// insert 'Cut', 'Copy' and 'Paste'
const KStdAction::StdAction actionNames[] = { KStdAction::Cut, KStdAction::Copy, KStdAction::Paste };
KAction* renameAction = dolphin.actionCollection()->action("rename");
renameAction->plug(popup);
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");
const KUrl& url = dolphin.activeView()->url();
if (url.isLocalFile()) {
KAction* moveToTrashAction = dolphin.actionCollection()->action("move_to_trash");
QAction *activatedAction = popup->exec(m_pos);
if (bookmarkAction!=0 && activatedAction == bookmarkAction) {
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"),
KBookmark bookmark = EditBookmarkDialog::getBookmark(i18n("Add folder as bookmark"),
- selectedURL.fileName(),
- selectedURL,
+ selectedUrl.fileName(),
+ selectedUrl,
"bookmark");
if (!bookmark.isNull()) {
KBookmarkManager* manager = DolphinSettings::instance().bookmarkManager();
"bookmark");
if (!bookmark.isNull()) {
KBookmarkManager* manager = DolphinSettings::instance().bookmarkManager();
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&)),
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()),
QClipboard* clipboard = QApplication::clipboard();
connect(clipboard, SIGNAL(dataChanged()),
- const Q3ValueList<URLNavigator::HistoryElem> history = m_dolphinView->urlHistory(index);
+ const Q3ValueList<UrlNavigator::HistoryElem> history = m_dolphinView->urlHistory(index);
if (!history.isEmpty()) {
KFileView* fileView = static_cast<KFileView*>(this);
fileView->setCurrentItem(history[index].currentFileName());
if (!history.isEmpty()) {
KFileView* fileView = static_cast<KFileView*>(this);
fileView->setCurrentItem(history[index].currentFileName());
void DolphinDetailsView::contentsDropEvent(QDropEvent* event)
{
// KFileDetailView::contentsDropEvent does not care whether the mouse
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()));
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()));
connect(this, SIGNAL(itemRenamed(Q3IconViewItem*, const QString&)),
this, SLOT(slotItemRenamed(Q3IconViewItem*, const QString&)));
connect(this, SIGNAL(dropped(QDropEvent*, const KUrl::List&, const KUrl&)),
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()),
QClipboard* clipboard = QApplication::clipboard();
connect(clipboard, SIGNAL(dataChanged()),
- const Q3ValueList<URLNavigator::HistoryElem> history = m_dolphinView->urlHistory(index);
+ const Q3ValueList<UrlNavigator::HistoryElem> history = m_dolphinView->urlHistory(index);
if (!history.isEmpty()) {
KFileView* fileView = static_cast<KFileView*>(this);
fileView->setCurrentItem(history[index].currentFileName());
if (!history.isEmpty()) {
KFileView* fileView = static_cast<KFileView*>(this);
fileView->setCurrentItem(history[index].currentFileName());
}
/* This should be ported to QMimeData
}
/* This should be ported to QMimeData
- Q3DragObject* dragObj = new KURLDrag(urls, widget());
+ Q3DragObject* dragObj = new KUrlDrag(urls, widget());
dragObj->setPixmap(pixmap);
return dragObj;
*/
dragObj->setPixmap(pixmap);
return dragObj;
*/
* @brief Manages and stores all settings from Dolphin.
*
* The following properties are stored:
* @brief Manages and stores all settings from Dolphin.
*
* The following properties are stored:
- * - URL navigator state (editable or not)
+ * - Url navigator state (editable or not)
* - split view
* - bookmarks
* - properties for icons and details view
* - split view
* - bookmarks
* - properties for icons and details view
m_messageLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed);
m_spaceInfo = new StatusBarSpaceInfo(this);
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();
m_progressText = new QLabel(this);
m_progressText->hide();
setMinimumHeight(size.height());
m_messageLabel->setMinimumTextHeight(size.height());
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&)));
-void DolphinStatusBar::slotURLChanged(const KUrl& url)
+void DolphinStatusBar::slotUrlChanged(const KUrl& url)
- m_spaceInfo->setURL(url);
+ m_spaceInfo->setUrl(url);
}
#include "dolphinstatusbar.moc"
}
#include "dolphinstatusbar.moc"
void slotProgressTimer();
/**
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.
*/
* statusbar belongs too, has been changed.
*/
- void slotURLChanged(const KUrl& url);
+ void slotUrlChanged(const KUrl& url);
private:
StatusBarMessageLabel* m_messageLabel;
private:
StatusBarMessageLabel* m_messageLabel;
connect(this, SIGNAL(signalSortOrderChanged(Qt::SortOrder)),
&dolphin, SLOT(slotSortOrderChanged(Qt::SortOrder)));
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&)),
connect(m_urlNavigator, SIGNAL(urlChanged(const KUrl&)),
- this, SLOT(slotURLChanged(const KUrl&)));
+ this, SLOT(slotUrlChanged(const KUrl&)));
connect(m_urlNavigator, SIGNAL(urlChanged(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()));
connect(m_urlNavigator, SIGNAL(historyChanged()),
&dolphin, SLOT(slotHistoryChanged()));
-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
}
const KUrl& DolphinView::url() const
void DolphinView::renameSelectedItems()
{
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.
if (urls.count() > 1) {
// More than one item has been selected for renaming. Open
// a rename dialog and rename all items afterwards.
emit signalRequestItemInfo(url);
}
emit signalRequestItemInfo(url);
}
-bool DolphinView::isURLEditable() const
+bool DolphinView::isUrlEditable() const
- return m_urlNavigator->isURLEditable();
+ return m_urlNavigator->isUrlEditable();
}
void DolphinView::zoomIn()
}
void DolphinView::zoomIn()
m_urlNavigator->goHome();
}
m_urlNavigator->goHome();
}
-void DolphinView::setURLEditable(bool editable)
+void DolphinView::setUrlEditable(bool editable)
- m_urlNavigator->editURL(editable);
+ m_urlNavigator->editUrl(editable);
-const Q3ValueList<URLNavigator::HistoryElem> DolphinView::urlHistory(int& index) const
+const Q3ValueList<UrlNavigator::HistoryElem> DolphinView::urlHistory(int& index) const
{
return m_urlNavigator->history(index);
}
{
return m_urlNavigator->history(index);
}
return fileView()->selectedItems();
}
return fileView()->selectedItems();
}
-KUrl::List DolphinView::selectedURLs() const
+KUrl::List DolphinView::selectedUrls() const
startDirLister(m_urlNavigator->url(), true);
}
startDirLister(m_urlNavigator->url(), true);
}
-void DolphinView::slotURLListDropped(QDropEvent* /* event */,
+void DolphinView::slotUrlListDropped(QDropEvent* /* event */,
const KUrl::List& urls,
const KUrl& url)
{
const KUrl::List& urls,
const KUrl& url)
{
destination = m_urlNavigator->url();
}
else {
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()) {
// which represents a file, would be replaced by a copy- or move-operation).
KFileItem fileItem(KFileItem::Unknown, KFileItem::Unknown, destination);
if (!fileItem.isDir()) {
- Dolphin::mainWin().dropURLs(urls, destination);
+ Dolphin::mainWin().dropUrls(urls, destination);
}
void DolphinView::mouseReleaseEvent(QMouseEvent* event)
}
void DolphinView::mouseReleaseEvent(QMouseEvent* event)
Dolphin::mainWin().setActiveView(this);
}
Dolphin::mainWin().setActiveView(this);
}
-void DolphinView::slotURLChanged(const KUrl& url)
+void DolphinView::slotUrlChanged(const KUrl& url)
{
const ViewProperties props(url);
setMode(props.viewMode());
{
const ViewProperties props(url);
setMode(props.viewMode());
// changed so that it can update it's actions.
Dolphin::mainWin().slotSelectionChanged();
// changed so that it can update it's actions.
Dolphin::mainWin().slotSelectionChanged();
- emit signalURLChanged(url);
+ emit signalUrlChanged(url);
}
void DolphinView::triggerIconsViewItem(Q3IconViewItem* item)
}
void DolphinView::triggerIconsViewItem(Q3IconViewItem* item)
((keyboardState & Qt::ControlModifier) > 0);*/
const bool isSelectionActive = false;
if ((item != 0) && !isSelectionActive) {
((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.
// as iconview items will get deleted.
- QTimer::singleShot(0, this, SLOT(updateURL()));
+ QTimer::singleShot(0, this, SLOT(updateUrl()));
Dolphin::mainWin().setActiveView(this);
}
}
Dolphin::mainWin().setActiveView(this);
}
}
}
if (m_detailsView->isOnFilename(item, pos)) {
}
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.
// as listview items will get deleted.
- QTimer::singleShot(0, this, SLOT(updateURL()));
+ QTimer::singleShot(0, this, SLOT(updateUrl()));
Dolphin::mainWin().setActiveView(this);
}
else {
Dolphin::mainWin().setActiveView(this);
}
else {
triggerDetailsViewItem(item, pos, 0);
}
triggerDetailsViewItem(item, pos, 0);
}
-void DolphinView::updateURL()
+void DolphinView::updateUrl()
{
KFileView* fileView = (m_iconsView != 0) ? static_cast<KFileView*>(m_iconsView) :
static_cast<KFileView*>(m_detailsView);
{
KFileView* fileView = (m_iconsView != 0) ? static_cast<KFileView*>(m_iconsView) :
static_cast<KFileView*>(m_detailsView);
}
if (fileItem->isDir()) {
}
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()) {
// 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());
- setURL(KUrl(localPath));
+ setUrl(KUrl(localPath));
class QPainter;
class KUrl;
class QLineEdit;
class QPainter;
class KUrl;
class QLineEdit;
class QTimer;
class Q3IconViewItem;
class Q3ListViewItem;
class QTimer;
class Q3IconViewItem;
class Q3ListViewItem;
*
* @see DolphinIconsView
* @see DolphinDetailsView
*
* @see DolphinIconsView
* @see DolphinDetailsView
* @see DolphinStatusBar
*
* @author Peter Penz <peter.penz@gmx.at>
* @see DolphinStatusBar
*
* @author Peter Penz <peter.penz@gmx.at>
virtual ~DolphinView();
/**
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
- 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();
const KUrl& url() const;
void requestActivation();
void invertSelection();
/**
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();
/**
* 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();
/**
* 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();
/**
* 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.
- * 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.
*/
* 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.
*/
* history element.
* @param index Output parameter which indicates the current
* index of the location.
*/
- const Q3ValueList<URLNavigator::HistoryElem> urlHistory(int& index) const;
+ const Q3ValueList<UrlNavigator::HistoryElem> urlHistory(int& index) const;
/**
* Returns true, if at least one item is selected.
/**
* Returns true, if at least one item is selected.
/**
* Returns the selected items. 0 is returned, if no item
* is selected.
/**
* Returns the selected items. 0 is returned, if no item
* is selected.
- * @see DolphinView::selectedURLs()
+ * @see DolphinView::selectedUrls()
*/
const KFileItemList* selectedItems() const;
/**
*/
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()
*/
* 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
/**
* Returns the current item, where the cursor is. 0 is returned, if there is no
void openContextMenu(KFileItem* fileInfo, const QPoint& pos);
/**
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.
*/
* If the new file name already exists, a dialog is opened which
* asks the user to enter a new name.
*/
int contentsY() const;
/**
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();
/** Increases the size of the current set view mode. */
void zoomIn();
*/
void updateStatusBar();
*/
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
/**
* 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.
*/
* which provides a way for widgets to get an indication to update
* the item information.
*/
public slots:
void reload();
public slots:
void reload();
- void slotURLListDropped(QDropEvent* event,
+ void slotUrlListDropped(QDropEvent* event,
const KUrl::List& urls,
const KUrl& url);
const KUrl::List& urls,
const KUrl& url);
void slotShowFilterBar(bool show);
signals:
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,
/**
* Is emitted if the view mode (IconsView, DetailsView,
/**
* Is emitted if information of an item is requested to be shown e. g. in the sidebar.
/**
* 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);
*/
void signalRequestItemInfo(const KUrl& url);
/**
* Is emitted whenever the selection has been changed. The current selection can
* be retrieved by Dolphin::mainWin().activeView()->selectedItems() or by
/**
* 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();
*/
void signalSelectionChanged();
virtual void mouseReleaseEvent(QMouseEvent* event);
private slots:
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 triggerIconsViewItem(Q3IconViewItem *item);
void triggerDetailsViewItem(Q3ListViewItem* item,
const QPoint& pos,
int column);
void triggerDetailsViewItem(Q3ListViewItem* item);
void slotPercent(int percent);
void slotClear();
void slotPercent(int percent);
void slotClear();
Mode m_mode;
Q3VBoxLayout* m_topLayout;
Mode m_mode;
Q3VBoxLayout* m_topLayout;
- URLNavigator* m_urlNavigator;
+ UrlNavigator* m_urlNavigator;
DolphinIconsView* m_iconsView;
DolphinDetailsView* m_detailsView;
DolphinIconsView* m_iconsView;
DolphinDetailsView* m_detailsView;
- * @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
*
* The default usage is like this:
* \code
virtual ~EditBookmarkDialog();
/**
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()).
*/
* @return A valid bookmark, if the user has pressed OK. Otherwise
* a null bookmark is returned (see Bookmark::isNull()).
*/
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE kcfg SYSTEM "http://www.kde.org/standards/kcfg/1.0/kcfg.dtd">
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE kcfg SYSTEM "http://www.kde.org/standards/kcfg/1.0/kcfg.dtd">
<kcfgfile name="dolphinrc"/>
<group name="General">
<entry name="DefaultViewMode" type="Int">
<label>Default view mode</label>
<default>0</default>
</entry>
<kcfgfile name="dolphinrc"/>
<group name="General">
<entry name="DefaultViewMode" type="Int">
<label>Default view mode</label>
<default>0</default>
</entry>
- <entry name="EditableURL" type="Bool">
+ <entry name="EditableUrl" type="Bool">
<label>Should the URL be editable for the user</label>
<default>false</default>
</entry>
<label>Should the URL be editable for the user</label>
<default>false</default>
</entry>
<label>Is the application started the first time</label>
<default>true</default>
</entry>
<label>Is the application started the first time</label>
<default>true</default>
</entry>
- <entry name="HomeURL" type="String">
+ <entry name="HomeUrl" type="String">
<label>Home URL</label>
<default>~</default>
</entry>
<label>Home URL</label>
<default>~</default>
</entry>
GeneralSettingsPage::GeneralSettingsPage(QWidget* parent) :
SettingsPageBase(parent),
GeneralSettingsPage::GeneralSettingsPage(QWidget* parent) :
SettingsPageBase(parent),
m_startSplit(0),
m_startEditable(0)
{
m_startSplit(0),
m_startEditable(0)
{
vBox->setMargin(margin);
vBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Ignored);
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);
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);
Q3HBox* buttonBox = new Q3HBox(homeGroup);
buttonBox->setSizePolicy(sizePolicy);
// create 'Start with editable navigation bar' checkbox
m_startEditable = new QCheckBox(i18n("Start with editable navigation bar"), vBox);
// 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
// Add a dummy widget with no restriction regarding
// a vertical resizing. This assures that the dialog layout
{
GeneralSettings* settings = DolphinSettings::instance().generalSettings();
{
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()) {
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;
}
DolphinView::Mode viewMode = DolphinView::IconsView;
settings->setDefaultViewMode(viewMode);
settings->setSplitView(m_startSplit->isChecked());
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));
- m_homeURL->setText(url.prettyUrl());
+ m_homeUrl->setText(url.prettyUrl());
}
}
void GeneralSettingsPage::useCurrentLocation()
{
const DolphinView* view = Dolphin::mainWin().activeView();
}
}
void GeneralSettingsPage::useCurrentLocation()
{
const DolphinView* view = Dolphin::mainWin().activeView();
- m_homeURL->setText(view->url().prettyUrl());
+ m_homeUrl->setText(view->url().prettyUrl());
}
void GeneralSettingsPage::useDefaulLocation()
{
}
void GeneralSettingsPage::useDefaulLocation()
{
- m_homeURL->setText("file://" + QDir::homePath());
+ m_homeUrl->setText("file://" + QDir::homePath());
}
#include "generalsettingspage.moc"
}
#include "generalsettingspage.moc"
/**
* @brief Page for the 'General' settings of the Dolphin settings dialog.
*
/**
* @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 <peter.penz@gmx.at>
* and the split view mode.
*
* @author Peter Penz <peter.penz@gmx.at>
virtual void applySettings();
private slots:
virtual void applySettings();
private slots:
void useCurrentLocation();
void useDefaulLocation();
private:
void useCurrentLocation();
void useDefaulLocation();
private:
QRadioButton* m_iconsView;
QRadioButton* m_detailsView;
QRadioButton* m_previewsView;
QRadioButton* m_iconsView;
QRadioButton* m_detailsView;
QRadioButton* m_previewsView;
cancelRequest();
if (!url.isEmpty() && !m_multipleSelection) {
cancelRequest();
if (!url.isEmpty() && !m_multipleSelection) {
else if (!applyBookmark()) {
// try to get a preview pixmap from the item...
KUrl::List list;
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());
m_pendingPreview = true;
m_preview->setPixmap(QPixmap());
this, SLOT(slotPreviewFailed(const KFileItem*)));
QString text("<b>");
this, SLOT(slotPreviewFailed(const KFileItem*)));
QString text("<b>");
- text.append(m_shownURL.fileName());
+ text.append(m_shownUrl.fileName());
text.append("</b>");
m_name->setText(text);
}
text.append("</b>");
m_name->setText(text);
}
void InfoSidebarPage::slotTimeout()
{
void InfoSidebarPage::slotTimeout()
{
- m_shownURL = m_urlCandidate;
+ m_shownUrl = m_urlCandidate;
{
DolphinView* view = Dolphin::mainWin().activeView();
if (view->hasSelection()) {
{
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]);
- KDEDesktopMimeType::executeService(m_shownURL, m_actionsVector[index]);
+ KDEDesktopMimeType::executeService(m_shownUrl, m_actionsVector[index]);
DolphinView* view = Dolphin::mainWin().activeView();
connect(view, SIGNAL(signalRequestItemInfo(const KUrl&)),
this, SLOT(requestDelayedItemInfo(const KUrl&)));
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&)));
this, SLOT(requestItemInfo(const KUrl&)));
- m_shownURL = view->url();
+ m_shownUrl = view->url();
KBookmarkGroup root = DolphinSettings::instance().bookmarkManager()->root();
KBookmark bookmark = root.first();
while (!bookmark.isNull()) {
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("<b>");
text.append(bookmark.text());
text.append("</b>");
QString text("<b>");
text.append(bookmark.text());
text.append("</b>");
beginInfoLines();
DolphinView* view = Dolphin::mainWin().activeView();
if (!view->hasSelection()) {
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()) {
fileItem.refresh();
if (fileItem.isDir()) {
// The algorithm for searching the available actions works on a list
// of KFileItems. If no selection is given, a temporary KFileItem
// 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()) {
KFileItemList localList;
const KFileItemList* itemList = Dolphin::mainWin().activeView()->selectedItems();
if ((itemList == 0) || itemList->isEmpty()) {
// 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
// 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);
const int blendSteps = 16;
QColor blendColor(backgroundColor);
- * 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()
* provides default actions.
*
* @see InfoSidebarPage::showItemInfo()
void requestDelayedItemInfo(const KUrl& url);
/**
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()
* provides default actions.
*
* @see InfoSidebarPage::showItemInfo()
void requestItemInfo(const KUrl& url);
/**
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();
* InfoSidebarPage::requestItemInfo() and provides default actions.
*/
void showItemInfo();
/**
* Starts the service of m_actionsVector with the index \index on
/**
* 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);
*/
void startService(int index);
void connectToActiveView();
/**
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.
* 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 m_multipleSelection;
bool m_pendingPreview;
QTimer* m_timer;
bool m_multipleSelection;
bool m_pendingPreview;
QTimer* m_timer;
KUrl m_urlCandidate;
PixmapViewer* m_preview;
KUrl m_urlCandidate;
PixmapViewer* m_preview;
};
// TODO #1: move to SidebarPage?
};
// 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
{
// -> provide helper class or common base class
class ServiceButton : public QPushButton
{
delete m_pixmapCopy;
m_pixmapCopy = 0;
delete m_pixmapCopy;
m_pixmapCopy = 0;
}
void ItemEffectsManager::zoomIn()
}
void ItemEffectsManager::zoomIn()
void ItemEffectsManager::activateItem(void* context)
{
KFileItem* fileInfo = contextFileInfo(context);
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;
}
// the item is already highlighted
return;
}
// remember the pixmap and item to be able to
// restore it to the old state later
*m_pixmapCopy = *itemPixmap;
// 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;
// apply an icon effect to the item below the mouse pointer
KIconEffect iconEffect;
void ItemEffectsManager::resetActivatedItem()
{
void ItemEffectsManager::resetActivatedItem()
{
- if (m_highlightedURL.isEmpty()) {
+ if (m_highlightedUrl.isEmpty()) {
return;
}
for (void* context = firstContext(); context != 0; context = nextContext(context)) {
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,
// the highlighted item has been found and is restored to the default state
KIconEffect iconEffect;
QPixmap pixmap = iconEffect.apply(*m_pixmapCopy,
DolphinStatusBar* statusBar = Dolphin::mainWin().activeView()->statusBar();
statusBar->clear();
DolphinStatusBar* statusBar = Dolphin::mainWin().activeView()->statusBar();
statusBar->clear();
// restore all disabled items with their original pixmap
for (void* context = firstContext(); context != 0; context = nextContext(context)) {
const KFileItem* fileInfo = contextFileInfo(context);
// 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<DisabledItem> it = m_disabledItems.begin();
while (it != m_disabledItems.end()) {
Q3ValueListIterator<DisabledItem> it = m_disabledItems.begin();
while (it != m_disabledItems.end()) {
- if (fileURL == (*it).url) {
+ if (fileUrl == (*it).url) {
setContextPixmap(context, (*it).pixmap);
}
++it;
setContextPixmap(context, (*it).pixmap);
}
++it;
// items to the disabled state.
for (void* context = firstContext(); context != 0; context = nextContext(context)) {
const KFileItem* fileInfo = contextFileInfo(context);
// 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) {
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;
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);
disabledItem.pixmap = *itemPixmap;
m_disabledItems.append(disabledItem);
};
QPixmap* m_pixmapCopy;
};
QPixmap* m_pixmapCopy;
// contains all items which have been disabled by a 'cut' operation
Q3ValueList<DisabledItem> m_disabledItems;
// contains all items which have been disabled by a 'cut' operation
Q3ValueList<DisabledItem> m_disabledItems;
static KCmdLineOptions options[] =
{
static KCmdLineOptions options[] =
{
- { "+[URL]", I18N_NOOP( "Document to open" ), 0 },
+ { "+[Url]", I18N_NOOP( "Document to open" ), 0 },
} else {
KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
if (args->count() > 0) {
} 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));
for (int i = 1; i < args->count(); ++i) {
KRun::run("dolphin", args->url(i));
const static int customProtocolIndex = 0;
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);
m_protocols(KProtocolInfo::protocols())
{
qSort(m_protocols);
#include "urlbutton.h"
#include "urlnavigatorbutton.h"
#include "urlbutton.h"
#include "urlnavigatorbutton.h"
/**
* A combobox listing available protocols
*/
/**
* A combobox listing available protocols
*/
-class ProtocolCombo : public URLNavigatorButton
+class ProtocolCombo : public UrlNavigatorButton
- ProtocolCombo(const QString& protocol, URLNavigator* parent = 0);
+ ProtocolCombo(const QString& protocol, UrlNavigator* parent = 0);
QString currentProtocol() const;
QString currentProtocol() const;
m_pagesSelector->insertItem(i18n("Information"));
m_pagesSelector->insertItem(i18n("Bookmarks"));
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
- // 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);
// constructor (-> provide a shared height setting?)
QFontMetrics fontMetrics(font());
m_pagesSelector->setMinimumHeight(fontMetrics.height() + 8);
signals:
/**
* The user selected an item on sidebar widget and item has
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);
*/
void urlChanged(const KUrl& url);
-void StatusBarSpaceInfo::setURL(const KUrl& url)
+void StatusBarSpaceInfo::setUrl(const KUrl& url)
{
m_url = url;
refresh();
{
m_url = url;
refresh();
StatusBarSpaceInfo(QWidget* parent);
virtual ~StatusBarSpaceInfo();
StatusBarSpaceInfo(QWidget* parent);
virtual ~StatusBarSpaceInfo();
- void setURL(const KUrl& url);
+ void setUrl(const KUrl& url);
const KUrl& url() const { return m_url; }
protected:
const KUrl& url() const { return m_url; }
protected:
const QString& mountPoint);
void slotDone();
const QString& mountPoint);
void slotDone();
- /** Refreshs the space information for the current set URL. */
+ /** Refreshs the space information for the current set Url. */
emit redoTextChanged(i18n("Redo"));
}
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()) {
KIO::Job* job = 0;
switch (command.type()) {
case DolphinCommand::Copy: {
KUrl::List list;
while (it != end) {
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);
++it;
}
job = KIO::del(list, false, false);
case DolphinCommand::Move: {
KUrl::List list;
case DolphinCommand::Move: {
KUrl::List list;
- const KUrl newDestURL((*it).directory());
+ const KUrl newDestUrl((*it).directory());
- const KUrl newSourceURL(destURL + (*it).fileName());
- list.append(newSourceURL);
+ const KUrl newSourceUrl(destUrl + (*it).fileName());
+ list.append(newSourceUrl);
- job = KIO::move(list, newDestURL, false);
+ job = KIO::move(list, newDestUrl, false);
break;
}
case DolphinCommand::Rename: {
break;
}
case DolphinCommand::Rename: {
- assert(sourceURLs.count() == 1);
+ assert(sourceUrls.count() == 1);
KIO::NetAccess::move(command.destination(), (*it));
break;
}
KIO::NetAccess::move(command.destination(), (*it));
break;
}
// TODO: use KIO::special for accessing the trash protocol. See
// also Dolphin::slotJobResult() for further details.
const QString originalFileName((*it).fileName().section('-', 1));
// 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();
++it;
m_progressIndicator->execOperation();
Dolphin& dolphin = Dolphin::mainWin();
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: {
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: {
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: {
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: {
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));
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;
KIO::NetAccess::synchronousRun(moveToTrashJob, &dolphin);
++it;
case DolphinCommand::CreateFile: {
m_progressIndicator->execOperation();
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;
KIO::CopyJob* copyJob = KIO::copyAs(*it, command.destination(), false);
copyJob->setDefaultPermissions(true);
job = copyJob;
/**
* @short Represents a file manager command which can be undone and redone.
*
/**
* @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.
*
* Due to the fixed set of commands a file manager offers this class is
* a very simplified version of the classic command pattern.
-URLButton::URLButton(URLNavigator* parent)
+UrlButton::UrlButton(UrlNavigator* parent)
: QPushButton(parent),
m_displayHint(0),
m_urlNavigator(parent)
: QPushButton(parent),
m_displayHint(0),
m_urlNavigator(parent)
-URLNavigator* URLButton::urlNavigator() const
+UrlNavigator* UrlButton::urlNavigator() const
{
return m_urlNavigator;
}
{
return m_urlNavigator;
}
-void URLButton::setDisplayHintEnabled(DisplayHint hint,
+void UrlButton::setDisplayHintEnabled(DisplayHint hint,
bool enable)
{
if (enable) {
bool enable)
{
if (enable) {
-bool URLButton::isDisplayHintEnabled(DisplayHint hint) const
+bool UrlButton::isDisplayHintEnabled(DisplayHint hint) const
{
return (m_displayHint & hint) > 0;
}
{
return (m_displayHint & hint) > 0;
}
-void URLButton::enterEvent(QEvent* event)
+void UrlButton::enterEvent(QEvent* event)
{
QPushButton::enterEvent(event);
setDisplayHintEnabled(EnteredHint, true);
update();
}
{
QPushButton::enterEvent(event);
setDisplayHintEnabled(EnteredHint, true);
update();
}
-void URLButton::leaveEvent(QEvent* event)
+void UrlButton::leaveEvent(QEvent* event)
{
QPushButton::leaveEvent(event);
setDisplayHintEnabled(EnteredHint, false);
update();
}
{
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;
const QColor& c2) const
{
const int red = (c1.red() + c2.red()) / 2;
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#ifndef URLBUTTON_H
-#define URLBUTTON_H
+#ifndef UrlBUTTON_H
+#define UrlBUTTON_H
#include <qpushbutton.h>
//Added by qt3to4:
#include <QEvent>
class KUrl;
#include <qpushbutton.h>
//Added by qt3to4:
#include <QEvent>
class KUrl;
- * @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
*/
* is set as soon as the button has been clicked.
*
* @author Peter Penz
*/
-class URLButton : public QPushButton
+class UrlButton : public QPushButton
- URLButton(URLNavigator* parent);
- virtual ~URLButton();
+ UrlButton(UrlNavigator* parent);
+ virtual ~UrlButton();
- URLNavigator* urlNavigator() const;
+ UrlNavigator* urlNavigator() const;
protected:
enum DisplayHint {
protected:
enum DisplayHint {
private:
int m_displayHint;
private:
int m_displayHint;
- URLNavigator* m_urlNavigator;
+ UrlNavigator* m_urlNavigator;
#include "protocolcombo.h"
#include "urlnavigatorbutton.h"
#include "protocolcombo.h"
#include "urlnavigatorbutton.h"
-URLNavigator::HistoryElem::HistoryElem()
+UrlNavigator::HistoryElem::HistoryElem()
: m_url(),
m_currentFileName(),
m_contentsX(0),
: m_url(),
m_currentFileName(),
m_contentsX(0),
-URLNavigator::HistoryElem::HistoryElem(const KUrl& url)
+UrlNavigator::HistoryElem::HistoryElem(const KUrl& url)
: m_url(url),
m_currentFileName(),
m_contentsX(0),
: m_url(url),
m_currentFileName(),
m_contentsX(0),
-URLNavigator::HistoryElem::~HistoryElem()
+UrlNavigator::HistoryElem::~HistoryElem()
-URLNavigator::URLNavigator(const KUrl& url,
+UrlNavigator::UrlNavigator(const KUrl& url,
DolphinView* dolphinView) :
Q3HBox(dolphinView),
m_historyIndex(0),
DolphinView* dolphinView) :
Q3HBox(dolphinView),
m_historyIndex(0),
m_toggleButton->setMinimumHeight(minimumHeight());
connect(m_toggleButton, SIGNAL(clicked()),
this, SLOT(slotClicked()));
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();
}
m_toggleButton->toggle();
}
connect(m_pathBox, SIGNAL(returnPressed(const QString&)),
this, SLOT(slotReturnPressed(const QString&)));
connect(m_pathBox, SIGNAL(urlActivated(const KUrl&)),
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)));
connect(dolphinView, SIGNAL(contentsMoved(int, int)),
this, SLOT(slotContentsMoved(int, int)));
-URLNavigator::~URLNavigator()
+UrlNavigator::~UrlNavigator()
-void URLNavigator::setURL(const KUrl& url)
+void UrlNavigator::setUrl(const KUrl& url)
{
QString urlStr(url.pathOrUrl());
{
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());
}
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) {
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.
// 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;
}
}
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
// don't insert duplicate history elements
-// kDebug() << "currURL == transformedURL" << endl;
+// kDebug() << "currUrl == transformedUrl" << endl;
return;
}
updateHistoryElem();
return;
}
updateHistoryElem();
- const Q3ValueListIterator<URLNavigator::HistoryElem> it = m_history.at(m_historyIndex);
- m_history.insert(it, HistoryElem(transformedURL));
+ const Q3ValueListIterator<UrlNavigator::HistoryElem> it = m_history.at(m_historyIndex);
+ m_history.insert(it, HistoryElem(transformedUrl));
- emit urlChanged(transformedURL);
+ emit urlChanged(transformedUrl);
emit historyChanged();
// Prevent an endless growing of the history: remembering
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;
if (m_historyIndex > 100) {
m_history.erase(m_history.begin());
--m_historyIndex;
/* kDebug() << "history starting ====================" << endl;
int i = 0;
/* kDebug() << "history starting ====================" << endl;
int i = 0;
- for (QValueListIterator<URLNavigator::HistoryElem> it = m_history.begin();
+ for (QValueListIterator<UrlNavigator::HistoryElem> it = m_history.begin();
it != m_history.end();
++it, ++i)
{
it != m_history.end();
++it, ++i)
{
kDebug() << "history done ========================" << endl;*/
}
kDebug() << "history done ========================" << endl;*/
}
-const KUrl& URLNavigator::url() const
+const KUrl& UrlNavigator::url() const
{
assert(!m_history.empty());
return m_history[m_historyIndex].url();
}
{
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());
{
assert(index >= 0);
QString path(url().pathOrUrl());
-const Q3ValueList<URLNavigator::HistoryElem>& URLNavigator::history(int& index) const
+const Q3ValueList<UrlNavigator::HistoryElem>& UrlNavigator::history(int& index) const
{
index = m_historyIndex;
return m_history;
}
{
index = m_historyIndex;
return m_history;
}
-void URLNavigator::goBack()
+void UrlNavigator::goBack()
-void URLNavigator::goForward()
+void UrlNavigator::goForward()
{
if (m_historyIndex > 0) {
--m_historyIndex;
{
if (m_historyIndex > 0) {
--m_historyIndex;
-void URLNavigator::goUp()
+void UrlNavigator::goUp()
-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();
}
}
m_toggleButton->toggle();
slotClicked();
}
}
-bool URLNavigator::isURLEditable() const
+bool UrlNavigator::isUrlEditable() const
{
return m_toggleButton->isChecked();
}
{
return m_toggleButton->isChecked();
}
-void URLNavigator::editURL(bool editOrBrowse)
+void UrlNavigator::editUrl(bool editOrBrowse)
- setURLEditable(editOrBrowse);
+ setUrlEditable(editOrBrowse);
-DolphinView* URLNavigator::dolphinView() const
+DolphinView* UrlNavigator::dolphinView() const
{
return m_dolphinView;
}
{
return m_dolphinView;
}
-void URLNavigator::keyReleaseEvent(QKeyEvent* event)
+void UrlNavigator::keyReleaseEvent(QKeyEvent* event)
{
Q3HBox::keyReleaseEvent(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
{
// Parts of the following code have been taken
// from the class KateFileSelector located in
// Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
// Copyright (C) 2001 Anders Lund <anders.lund@lund.tdcadsl.dk>
// Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
// Copyright (C) 2001 Anders Lund <anders.lund@lund.tdcadsl.dk>
- 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();
}
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);
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());
}
// synchronize the result in the path box.
m_pathBox->setUrl(url());
}
-void URLNavigator::slotURLActivated(const KUrl& url)
+void UrlNavigator::slotUrlActivated(const KUrl& url)
-void URLNavigator::slotRemoteHostActivated()
+void UrlNavigator::slotRemoteHostActivated()
-void URLNavigator::slotProtocolChanged(const QString& protocol)
+void UrlNavigator::slotProtocolChanged(const QString& protocol)
{
KUrl url;
url.setProtocol(protocol);
{
KUrl url;
url.setProtocol(protocol);
m_navButtons.clear();
if (KProtocolInfo::protocolClass(protocol) == ":local") {
m_navButtons.clear();
if (KProtocolInfo::protocolClass(protocol) == ":local") {
-void URLNavigator::slotRequestActivation()
+void UrlNavigator::slotRequestActivation()
{
m_dolphinView->requestActivation();
}
{
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->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;
{
// kDebug() << "received redirection to " << newUrl << endl;
kDebug() << "received redirection from " << oldUrl << " to " << newUrl << endl;
m_urls.append(newUrl);*/
}
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);
}
{
m_history[m_historyIndex].setContentsX(x);
m_history[m_historyIndex].setContentsY(y);
}
-void URLNavigator::slotClicked()
+void UrlNavigator::slotClicked()
m_pathBox->setFocus();
updateContent();
}
else {
m_pathBox->setFocus();
updateContent();
}
else {
- setURL(m_pathBox->currentText());
+ setUrl(m_pathBox->currentText());
m_dolphinView->setFocus();
}
}
m_dolphinView->setFocus();
}
}
-void URLNavigator::updateHistoryElem()
+void UrlNavigator::updateHistoryElem()
{
assert(m_historyIndex >= 0);
const KFileItem* item = m_dolphinView->currentFileItem();
{
assert(m_historyIndex >= 0);
const KFileItem* item = m_dolphinView->currentFileItem();
m_history[m_historyIndex].setContentsY(m_dolphinView->contentsY());
}
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<QWidget*>::const_iterator it = m_navButtons.constBegin();
while (it != m_navButtons.constEnd()) {
(*it)->close();
Q3ValueList<QWidget*>::const_iterator it = m_navButtons.constBegin();
while (it != m_navButtons.constEnd()) {
(*it)->close();
QString bookmarkPath;
if (bookmark.isNull()) {
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
// 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
}
const uint len = bookmarkPath.length();
}
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('/')) {
int slashCount = 0;
for (uint i = 0; i < len; ++i) {
if (bookmarkPath.at(i) == QChar('/')) {
- // create URL navigator buttons
+ // create Url navigator buttons
int idx = slashCount;
bool hasNext = true;
do {
int idx = slashCount;
bool hasNext = true;
do {
const bool isFirstButton = (idx == slashCount);
hasNext = isFirstButton || !dir_name.isEmpty();
if (hasNext) {
const bool isFirstButton = (idx == slashCount);
hasNext = isFirstButton || !dir_name.isEmpty();
if (hasNext) {
- URLNavigatorButton* button = new URLNavigatorButton(idx, this);
+ UrlNavigatorButton* button = new UrlNavigatorButton(idx, this);
- // 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()) {
// bookmark instead of the directory name
QString text = bookmark.text();
if (text.isEmpty()) {
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#ifndef URLNAVIGATOR_H
-#define URLNAVIGATOR_H
+#ifndef UrlNAVIGATOR_H
+#define UrlNAVIGATOR_H
#include <q3hbox.h>
//Added by qt3to4:
#include <q3hbox.h>
//Added by qt3to4:
- * @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.
* 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 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
* back and forward within this history.
*
* @author Peter Penz
typedef Q3ValueList<KUrl> UrlStack;
typedef Q3ValueList<KUrl> UrlStack;
-class URLNavigator : public Q3HBox
+class UrlNavigator : public Q3HBox
- * @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.
*/
* (the 'current file' is the file where the cursor is located) and
* the x- and y-position of the content.
*/
- 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
- void setURL(const KUrl& url);
+ void setUrl(const KUrl& url);
- /** Returns the current active URL. */
+ /** Returns the current active Url. */
- /** 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;
/**
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.
* history element.
* @param index Output parameter which indicates the current
* index of the location.
const Q3ValueList<HistoryElem>& history(int& index) const;
/**
const Q3ValueList<HistoryElem>& 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();
/**
* 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();
/**
* 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();
/**
* 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.
- * @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.
*/
* for fast navigation.
*/
- bool isURLEditable() const;
+ bool isUrlEditable() const;
/**
* Switches to the edit mode and assures that the keyboard focus
* is assigned.
*/
/**
* 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;
DolphinView* dolphinView() const;
private slots:
void slotReturnPressed(const QString& text);
private slots:
void slotReturnPressed(const QString& text);
- void slotURLActivated(const KUrl& url);
+ void slotUrlActivated(const KUrl& url);
void slotRemoteHostActivated();
void slotProtocolChanged(const QString& protocol);
void slotRemoteHostActivated();
void slotProtocolChanged(const QString& protocol);
/**
* Switches the navigation bar between the editable and noneditable
/**
* 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();
* of the navigation bar button.
*/
void slotClicked();
- * 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
* 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
/**
* Updates the history element with the current file item
#include "dolphinview.h"
#include "dolphin.h"
#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);
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()));
}
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)
QString path(urlNavigator()->url().pathOrUrl());
setText(path.section('/', index, 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());
// this is the case, the button is marked as 'active'.
++index;
QFont adjustedFont(font());
-int URLNavigatorButton::index() const
+int UrlNavigatorButton::index() const
-void URLNavigatorButton::drawButton(QPainter* painter)
+void UrlNavigatorButton::drawButton(QPainter* painter)
{
const int buttonWidth = width();
const int buttonHeight = height();
{
const int buttonWidth = width();
const int buttonHeight = height();
-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
// if the text is clipped due to a small window width, the text should
// be shown as tooltip
-void URLNavigatorButton::leaveEvent(QEvent* event)
+void UrlNavigatorButton::leaveEvent(QEvent* event)
- URLButton::leaveEvent(event);
+ UrlButton::leaveEvent(event);
QToolTip::remove(this);
}
QToolTip::remove(this);
}
-void URLNavigatorButton::dropEvent(QDropEvent* event)
+void UrlNavigatorButton::dropEvent(QDropEvent* event)
{
if (m_index < 0) {
return;
{
if (m_index < 0) {
return;
QString path(urlNavigator()->url().prettyUrl());
path = path.section('/', 0, m_index);
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();
}*/
}
setDisplayHintEnabled(DraggedHint, false);
update();
}*/
}
-void URLNavigatorButton::dragEnterEvent(QDragEnterEvent* event)
+void UrlNavigatorButton::dragEnterEvent(QDragEnterEvent* event)
{
/* KDE4-TODO:
event->accept(KUrlDrag::canDecode(event));
{
/* KDE4-TODO:
event->accept(KUrlDrag::canDecode(event));
-void URLNavigatorButton::dragLeaveEvent(QDragLeaveEvent* event)
+void UrlNavigatorButton::dragLeaveEvent(QDragLeaveEvent* event)
- URLButton::dragLeaveEvent(event);
+ UrlButton::dragLeaveEvent(event);
setDisplayHintEnabled(DraggedHint, false);
update();
}
setDisplayHintEnabled(DraggedHint, false);
update();
}
-void URLNavigatorButton::updateNavigatorURL()
+void UrlNavigatorButton::updateNavigatorUrl()
{
if (m_index < 0) {
return;
}
{
if (m_index < 0) {
return;
}
- URLNavigator* navigator = urlNavigator();
+ UrlNavigator* navigator = urlNavigator();
- 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;
{
if (m_popupDelay->isActive() || m_listJob || m_index < 0) {
return;
m_popupDelay->start(300, true);
}
m_popupDelay->start(300, true);
}
-void URLNavigatorButton::stopPopupDelay()
+void UrlNavigatorButton::stopPopupDelay()
{
m_popupDelay->stop();
if (m_listJob) {
{
m_popupDelay->stop();
if (m_listJob) {
-void URLNavigatorButton::startListJob()
+void UrlNavigatorButton::startListJob()
{
if (m_listJob) {
return;
{
if (m_listJob) {
return;
connect(m_listJob, SIGNAL(result(KIO::Job*)), this, SLOT(listJobFinished(KIO::Job*)));
}
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;
{
if (job != m_listJob) {
return;
-void URLNavigatorButton::listJobFinished(KIO::Job* job)
+void UrlNavigatorButton::listJobFinished(KIO::Job* job)
{
if (job != m_listJob) {
return;
{
if (job != m_listJob) {
return;
if (result != -1) {
KUrl url = urlNavigator()->url(m_index);
url.addPath(m_subdirs[result]);
if (result != -1) {
KUrl url = urlNavigator()->url(m_index);
url.addPath(m_subdirs[result]);
- urlNavigator()->setURL(url);
+ urlNavigator()->setUrl(url);
setDisplayHintEnabled(PopupActiveHint, false);
}
setDisplayHintEnabled(PopupActiveHint, false);
}
-int URLNavigatorButton::arrowWidth() const
+int UrlNavigatorButton::arrowWidth() const
{
int width = (height() / 2) - 7;
if (width < 4) {
{
int width = (height() / 2) - 7;
if (width < 4) {
-bool URLNavigatorButton::isTextClipped() const
+bool UrlNavigatorButton::isTextClipped() const
{
int availableWidth = width();
if (!isDisplayHintEnabled(ActivatedHint)) {
{
int availableWidth = width();
if (!isDisplayHintEnabled(ActivatedHint)) {
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
* 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 <qstringlist.h>
//Added by qt3to4:
#include <qstringlist.h>
//Added by qt3to4:
#include <urlbutton.h>
class KUrl;
#include <urlbutton.h>
class KUrl;
class QPainter;
namespace KIO
class QPainter;
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
* 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
-class URLNavigatorButton : public URLButton
+class UrlNavigatorButton : public UrlButton
- URLNavigatorButton(int index, URLNavigator* parent = 0);
- virtual ~URLNavigatorButton();
+ UrlNavigatorButton(int index, UrlNavigator* parent = 0);
+ virtual ~UrlNavigatorButton();
void setIndex(int index);
int index() const;
void setIndex(int index);
int index() const;
virtual void dragLeaveEvent(QDragLeaveEvent* event);
private slots:
virtual void dragLeaveEvent(QDragLeaveEvent* event);
private slots:
- void updateNavigatorURL();
+ void updateNavigatorUrl();
void startPopupDelay();
void stopPopupDelay();
void startListJob();
void startPopupDelay();
void stopPopupDelay();
void startListJob();
*
* The view properties are automatically stored inside
* the directory as hidden file called '.dolphinview'. To read out the view properties
*
* 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();
* \code
* ViewProperties props(KUrl("/home/peter/Documents"));
* const DolphinView::Mode mode = props.viewMode();