summaryrefslogtreecommitdiffstats
path: root/src/dolphinview.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-27 00:40:29 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-27 00:40:29 +0000
commit7a741e43ff09e70396a918956219b8316c48e522 (patch)
tree3d0f60eccd59786cea7236db2d5c4c1f25874515 /src/dolphinview.cpp
parenta48487ef0c329434b58b6f920111bb0999f1109e (diff)
downloaddolphin-7a741e43ff09e70396a918956219b8316c48e522.tar.gz
dolphin-7a741e43ff09e70396a918956219b8316c48e522.zip
TQt4 port Dolphin
This enables compilation under Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/dolphin@1229359 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/dolphinview.cpp')
-rw-r--r--src/dolphinview.cpp242
1 files changed, 121 insertions, 121 deletions
diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp
index 7bf57f0..5416062 100644
--- a/src/dolphinview.cpp
+++ b/src/dolphinview.cpp
@@ -20,7 +20,7 @@
#include "dolphinview.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kurl.h>
#include <klocale.h>
#include <kio/netaccess.h>
@@ -41,11 +41,11 @@
#include "filterbar.h"
-DolphinView::DolphinView(QWidget *parent,
+DolphinView::DolphinView(TQWidget *tqparent,
const KURL& url,
Mode mode,
bool showHiddenFiles) :
- QWidget(parent),
+ TQWidget(tqparent),
m_refreshing(false),
m_showProgress(false),
m_mode(mode),
@@ -57,27 +57,27 @@ DolphinView::DolphinView(QWidget *parent,
m_fileCount(0),
m_filterBar(0)
{
- setFocusPolicy(QWidget::StrongFocus);
- m_topLayout = new QVBoxLayout(this);
+ setFocusPolicy(TQ_StrongFocus);
+ m_topLayout = new TQVBoxLayout(this);
Dolphin& dolphin = Dolphin::mainWin();
- connect(this, SIGNAL(signalModeChanged()),
- &dolphin, SLOT(slotViewModeChanged()));
- connect(this, SIGNAL(signalShowHiddenFilesChanged()),
- &dolphin, SLOT(slotShowHiddenFilesChanged()));
- connect(this, SIGNAL(signalSortingChanged(DolphinView::Sorting)),
- &dolphin, SLOT(slotSortingChanged(DolphinView::Sorting)));
- connect(this, SIGNAL(signalSortOrderChanged(Qt::SortOrder)),
- &dolphin, SLOT(slotSortOrderChanged(Qt::SortOrder)));
+ connect(this, TQT_SIGNAL(signalModeChanged()),
+ &dolphin, TQT_SLOT(slotViewModeChanged()));
+ connect(this, TQT_SIGNAL(signalShowHiddenFilesChanged()),
+ &dolphin, TQT_SLOT(slotShowHiddenFilesChanged()));
+ connect(this, TQT_SIGNAL(signalSortingChanged(DolphinView::Sorting)),
+ &dolphin, TQT_SLOT(slotSortingChanged(DolphinView::Sorting)));
+ connect(this, TQT_SIGNAL(signalSortOrderChanged(TQt::SortOrder)),
+ &dolphin, TQT_SLOT(slotSortOrderChanged(TQt::SortOrder)));
m_urlNavigator = new URLNavigator(url, this);
- connect(m_urlNavigator, SIGNAL(urlChanged(const KURL&)),
- this, SLOT(slotURLChanged(const KURL&)));
- connect(m_urlNavigator, SIGNAL(urlChanged(const KURL&)),
- &dolphin, SLOT(slotURLChanged(const KURL&)));
- connect(m_urlNavigator, SIGNAL(historyChanged()),
- &dolphin, SLOT(slotHistoryChanged()));
+ connect(m_urlNavigator, TQT_SIGNAL(urlChanged(const KURL&)),
+ this, TQT_SLOT(slotURLChanged(const KURL&)));
+ connect(m_urlNavigator, TQT_SIGNAL(urlChanged(const KURL&)),
+ &dolphin, TQT_SLOT(slotURLChanged(const KURL&)));
+ connect(m_urlNavigator, TQT_SIGNAL(historyChanged()),
+ &dolphin, TQT_SLOT(slotHistoryChanged()));
m_statusBar = new DolphinStatusBar(this);
@@ -85,22 +85,22 @@ DolphinView::DolphinView(QWidget *parent,
m_dirLister->setAutoUpdate(true);
m_dirLister->setMainWindow(this);
m_dirLister->setShowingDotFiles(showHiddenFiles);
- connect(m_dirLister, SIGNAL(clear()),
- this, SLOT(slotClear()));
- connect(m_dirLister, SIGNAL(percent(int)),
- this, SLOT(slotPercent(int)));
- connect(m_dirLister, SIGNAL(deleteItem(KFileItem*)),
- this, SLOT(slotDeleteItem(KFileItem*)));
- connect(m_dirLister, SIGNAL(completed()),
- this, SLOT(slotCompleted()));
- connect(m_dirLister, SIGNAL(infoMessage(const QString&)),
- this, SLOT(slotInfoMessage(const QString&)));
- connect(m_dirLister, SIGNAL(errorMessage(const QString&)),
- this, SLOT(slotErrorMessage(const QString&)));
- connect(m_dirLister, SIGNAL(refreshItems (const KFileItemList&)),
- this, SLOT(slotRefreshItems(const KFileItemList&)));
- connect(m_dirLister, SIGNAL(newItems(const KFileItemList&)),
- this, SLOT(slotAddItems(const KFileItemList&)));
+ connect(m_dirLister, TQT_SIGNAL(clear()),
+ this, TQT_SLOT(slotClear()));
+ connect(m_dirLister, TQT_SIGNAL(percent(int)),
+ this, TQT_SLOT(slotPercent(int)));
+ connect(m_dirLister, TQT_SIGNAL(deleteItem(KFileItem*)),
+ this, TQT_SLOT(slotDeleteItem(KFileItem*)));
+ connect(m_dirLister, TQT_SIGNAL(completed()),
+ this, TQT_SLOT(slotCompleted()));
+ connect(m_dirLister, TQT_SIGNAL(infoMessage(const TQString&)),
+ this, TQT_SLOT(slotInfoMessage(const TQString&)));
+ connect(m_dirLister, TQT_SIGNAL(errorMessage(const TQString&)),
+ this, TQT_SLOT(slotErrorMessage(const TQString&)));
+ connect(m_dirLister, TQT_SIGNAL(refreshItems (const KFileItemList&)),
+ this, TQT_SLOT(slotRefreshItems(const KFileItemList&)));
+ connect(m_dirLister, TQT_SIGNAL(newItems(const KFileItemList&)),
+ this, TQT_SLOT(slotAddItems(const KFileItemList&)));
m_iconSize = KIcon::SizeMedium;
@@ -110,8 +110,8 @@ DolphinView::DolphinView(QWidget *parent,
m_filterBar = new FilterBar(this);
m_filterBar->hide();
m_topLayout->addWidget(m_filterBar);
- connect(m_filterBar, SIGNAL(signalFilterChanged(const QString&)),
- this, SLOT(slotChangeNameFilter(const QString&)));
+ connect(m_filterBar, TQT_SIGNAL(signalFilterChanged(const TQString&)),
+ this, TQT_SLOT(slotChangeNameFilter(const TQString&)));
m_topLayout->addWidget(m_statusBar);
}
@@ -148,8 +148,8 @@ void DolphinView::setMode(Mode mode)
return; // the wished mode is already set
}
- QWidget* view = (m_iconsView != 0) ? static_cast<QWidget*>(m_iconsView) :
- static_cast<QWidget*>(m_detailsView);
+ TQWidget* view = (m_iconsView != 0) ? static_cast<TQWidget*>(m_iconsView) :
+ static_cast<TQWidget*>(m_detailsView);
if (view != 0) {
m_topLayout->remove(view);
view->close();
@@ -210,12 +210,12 @@ void DolphinView::renameSelectedItems()
// More than one item has been selected for renaming. Open
// a rename dialog and rename all items afterwards.
RenameDialog dialog(urls);
- if (dialog.exec() == QDialog::Rejected) {
+ if (dialog.exec() == TQDialog::Rejected) {
return;
}
DolphinView* view = Dolphin::mainWin().activeView();
- const QString& newName = dialog.newName();
+ const TQString& newName = dialog.newName();
if (newName.isEmpty()) {
view->statusBar()->setMessage(i18n("The new item name is invalid."),
DolphinStatusBar::Error);
@@ -224,7 +224,7 @@ void DolphinView::renameSelectedItems()
UndoManager& undoMan = UndoManager::instance();
undoMan.beginMacro();
- assert(newName.contains('#'));
+ assert(newName.tqcontains('#'));
const int urlsCount = urls.count();
ProgressIndicator* progressIndicator =
@@ -233,12 +233,12 @@ void DolphinView::renameSelectedItems()
urlsCount);
// iterate through all selected items and rename them...
- const int replaceIndex = newName.find('#');
+ const int replaceIndex = newName.tqfind('#');
assert(replaceIndex >= 0);
for (int i = 0; i < urlsCount; ++i) {
const KURL& source = urls[i];
- QString name(newName);
- name.replace(replaceIndex, 1, renameIndexPresentation(i + 1, urlsCount));
+ TQString name(newName);
+ name.tqreplace(replaceIndex, 1, renameIndexPresentation(i + 1, urlsCount));
if (source.fileName() != name) {
KURL dest(source.upURL());
@@ -248,7 +248,7 @@ void DolphinView::renameSelectedItems()
if (destExists) {
delete progressIndicator;
progressIndicator = 0;
- view->statusBar()->setMessage(i18n("Renaming failed (item '%1' already exists).").arg(name),
+ view->statusBar()->setMessage(i18n("Renaming failed (item '%1' already exists).").tqarg(name),
DolphinStatusBar::Error);
break;
}
@@ -273,7 +273,7 @@ void DolphinView::renameSelectedItems()
// renaming mechanism from the views.
assert(urls.count() == 1);
if (m_mode == DetailsView) {
- QListViewItem* item = m_detailsView->firstChild();
+ TQListViewItem* item = m_detailsView->firstChild();
while (item != 0) {
if (item->isSelected()) {
m_detailsView->rename(item, DolphinDetailsView::NameColumn);
@@ -327,10 +327,10 @@ void DolphinView::refreshSettings()
}
if (m_detailsView != 0) {
- // TODO: There is no usable interface in QListView/KFileDetailView
+ // TODO: There is no usable interface in TQListView/KFileDetailView
// to hide/show columns. The easiest approach is to delete
// the current instance and recreate a new one, which automatically
- // refreshs the settings. If a proper interface is available in Qt4
+ // refreshs the settings. If a proper interface is available in TQt4
// m_detailsView->refreshSettings() would be enough.
m_topLayout->remove(m_detailsView);
m_detailsView->close();
@@ -350,13 +350,13 @@ void DolphinView::updateStatusBar()
// - shows already the item count information or
// - shows only a not very important information
// - if any progress is given don't show the item count info at all
- const QString msg(m_statusBar->message());
+ const TQString msg(m_statusBar->message());
const bool updateStatusBarMsg = (msg.isEmpty() ||
(msg == m_statusBar->defaultText()) ||
(m_statusBar->type() == DolphinStatusBar::Information)) &&
(m_statusBar->progress() == 100);
- const QString text(hasSelection() ? selectionStatusBarText() : defaultStatusBarText());
+ const TQString text(hasSelection() ? selectionStatusBarText() : defaultStatusBarText());
m_statusBar->setDefaultText(text);
if (updateStatusBarMsg) {
@@ -398,19 +398,19 @@ void DolphinView::setSorting(Sorting sorting)
{
if (sorting != this->sorting()) {
KFileView* view = fileView();
- int spec = view->sorting() & ~QDir::Name & ~QDir::Size & ~QDir::Time & ~QDir::Unsorted;
+ int spec = view->sorting() & ~TQDir::Name & ~TQDir::Size & ~TQDir::Time & ~TQDir::Unsorted;
switch (sorting) {
- case SortByName: spec = spec | QDir::Name; break;
- case SortBySize: spec = spec | QDir::Size; break;
- case SortByDate: spec = spec | QDir::Time; break;
+ case SortByName: spec = spec | TQDir::Name; break;
+ case SortBySize: spec = spec | TQDir::Size; break;
+ case SortByDate: spec = spec | TQDir::Time; break;
default: break;
}
ViewProperties props(url());
props.setSorting(sorting);
- view->setSorting(static_cast<QDir::SortSpec>(spec));
+ view->setSorting(static_cast<TQDir::SortSpec>(spec));
emit signalSortingChanged(sorting);
}
@@ -418,39 +418,39 @@ void DolphinView::setSorting(Sorting sorting)
DolphinView::Sorting DolphinView::sorting() const
{
- const QDir::SortSpec spec = fileView()->sorting();
+ const TQDir::SortSpec spec = fileView()->sorting();
- if (spec & QDir::Time) {
+ if (spec & TQDir::Time) {
return SortByDate;
}
- if (spec & QDir::Size) {
+ if (spec & TQDir::Size) {
return SortBySize;
}
return SortByName;
}
-void DolphinView::setSortOrder(Qt::SortOrder order)
+void DolphinView::setSortOrder(TQt::SortOrder order)
{
if (sortOrder() != order) {
KFileView* view = fileView();
int sorting = view->sorting();
- sorting = (order == Qt::Ascending) ? (sorting & ~QDir::Reversed) :
- (sorting | QDir::Reversed);
+ sorting = (order == TQt::Ascending) ? (sorting & ~TQDir::Reversed) :
+ (sorting | TQDir::Reversed);
ViewProperties props(url());
props.setSortOrder(order);
- view->setSorting(static_cast<QDir::SortSpec>(sorting));
+ view->setSorting(static_cast<TQDir::SortSpec>(sorting));
emit signalSortOrderChanged(order);
}
}
-Qt::SortOrder DolphinView::sortOrder() const
+TQt::SortOrder DolphinView::sortOrder() const
{
- return fileView()->isReversed() ? Qt::Descending : Qt::Ascending;
+ return fileView()->isReversed() ? TQt::Descending : TQt::Ascending;
}
void DolphinView::goBack()
@@ -483,7 +483,7 @@ void DolphinView::editURL()
m_urlNavigator->editURL();
}
-const QValueList<URLNavigator::HistoryElem> DolphinView::urlHistory(int& index) const
+const TQValueList<URLNavigator::HistoryElem> DolphinView::urlHistory(int& index) const
{
return m_urlNavigator->history(index);
}
@@ -521,13 +521,13 @@ const KFileItem* DolphinView::currentFileItem() const
return fileView()->currentFileItem();
}
-void DolphinView::openContextMenu(KFileItem* fileInfo, const QPoint& pos)
+void DolphinView::openContextMenu(KFileItem* fileInfo, const TQPoint& pos)
{
DolphinContextMenu contextMenu(this, fileInfo, pos);
contextMenu.open();
}
-void DolphinView::rename(const KURL& source, const QString& newName)
+void DolphinView::rename(const KURL& source, const TQString& newName)
{
bool ok = false;
@@ -575,14 +575,14 @@ void DolphinView::rename(const KURL& source, const QString& newName)
}
if (ok) {
- m_statusBar->setMessage(i18n("Renamed file '%1' to '%2'.").arg(source.fileName(), dest.fileName()),
+ m_statusBar->setMessage(i18n("Renamed file '%1' to '%2'.").tqarg(source.fileName(), dest.fileName()),
DolphinStatusBar::OperationCompleted);
DolphinCommand command(DolphinCommand::Rename, source, dest);
UndoManager::instance().addCommand(command);
}
else {
- m_statusBar->setMessage(i18n("Renaming of file '%1' to '%2' failed.").arg(source.fileName(), dest.fileName()),
+ m_statusBar->setMessage(i18n("Renaming of file '%1' to '%2' failed.").tqarg(source.fileName(), dest.fileName()),
DolphinStatusBar::Error);
reload();
}
@@ -593,7 +593,7 @@ void DolphinView::reload()
startDirLister(m_urlNavigator->url(), true);
}
-void DolphinView::slotURLListDropped(QDropEvent* /* event */,
+void DolphinView::slotURLListDropped(TQDropEvent* /* event */,
const KURL::List& urls,
const KURL& url)
{
@@ -614,9 +614,9 @@ void DolphinView::slotURLListDropped(QDropEvent* /* event */,
Dolphin::mainWin().dropURLs(urls, destination);
}
-void DolphinView::mouseReleaseEvent(QMouseEvent* event)
+void DolphinView::mouseReleaseEvent(TQMouseEvent* event)
{
- QWidget::mouseReleaseEvent(event);
+ TQWidget::mouseReleaseEvent(event);
Dolphin::mainWin().setActiveView(this);
}
@@ -643,7 +643,7 @@ void DolphinView::slotURLChanged(const KURL& url)
emit signalURLChanged(url);
}
-void DolphinView::triggerIconsViewItem(QIconViewItem* item)
+void DolphinView::triggerIconsViewItem(TQIconViewItem* item)
{
const ButtonState keyboardState = KApplication::keyboardMouseState();
const bool isSelectionActive = ((keyboardState & ShiftButton) > 0) ||
@@ -651,13 +651,13 @@ void DolphinView::triggerIconsViewItem(QIconViewItem* item)
if ((item != 0) && !isSelectionActive) {
// Updating the URL must be done outside the scope of this slot,
// as iconview items will get deleted.
- QTimer::singleShot(0, this, SLOT(updateURL()));
+ TQTimer::singleShot(0, this, TQT_SLOT(updateURL()));
Dolphin::mainWin().setActiveView(this);
}
}
-void DolphinView::triggerDetailsViewItem(QListViewItem* item,
- const QPoint& pos,
+void DolphinView::triggerDetailsViewItem(TQListViewItem* item,
+ const TQPoint& pos,
int /* column */)
{
if (item == 0) {
@@ -667,7 +667,7 @@ void DolphinView::triggerDetailsViewItem(QListViewItem* item,
if (m_detailsView->isOnFilename(item, pos)) {
// Updating the URL must be done outside the scope of this slot,
// as listview items will get deleted.
- QTimer::singleShot(0, this, SLOT(updateURL()));
+ TQTimer::singleShot(0, this, TQT_SLOT(updateURL()));
Dolphin::mainWin().setActiveView(this);
}
else {
@@ -675,9 +675,9 @@ void DolphinView::triggerDetailsViewItem(QListViewItem* item,
}
}
-void DolphinView::triggerDetailsViewItem(QListViewItem* item)
+void DolphinView::triggerDetailsViewItem(TQListViewItem* item)
{
- const QPoint pos(0, item->itemPos());
+ const TQPoint pos(0, item->itemPos());
triggerDetailsViewItem(item, pos, 0);
}
@@ -697,7 +697,7 @@ void DolphinView::updateURL()
// 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());
+ const TQString localPath(fileItem->localPath());
if (localPath.isEmpty()) {
setURL(fileItem->url());
}
@@ -757,7 +757,7 @@ void DolphinView::slotCompleted()
KFileView* view = fileView();
view->clearView();
- // TODO: in Qt4 the code should get a lot
+ // TODO: in TQt4 the code should get a lot
// simpler and nicer due to Interview...
if (m_iconsView != 0) {
m_iconsView->beginItemUpdates();
@@ -767,7 +767,7 @@ void DolphinView::slotCompleted()
}
if (m_showProgress) {
- m_statusBar->setProgressText(QString::null);
+ m_statusBar->setProgressText(TQString());
m_statusBar->setProgress(100);
m_showProgress = false;
}
@@ -796,7 +796,7 @@ void DolphinView::slotCompleted()
// Prevent a flickering of the icon view widget by giving a small
// timeslot to swallow asynchronous update events.
m_iconsView->setUpdatesEnabled(false);
- QTimer::singleShot(10, this, SLOT(slotDelayedUpdate()));
+ TQTimer::singleShot(10, this, TQT_SLOT(slotDelayedUpdate()));
}
if (m_detailsView != 0) {
@@ -814,19 +814,19 @@ void DolphinView::slotDelayedUpdate()
m_refreshing = false;
}
-void DolphinView::slotInfoMessage(const QString& msg)
+void DolphinView::slotInfoMessage(const TQString& msg)
{
m_statusBar->setMessage(msg, DolphinStatusBar::Information);
}
-void DolphinView::slotErrorMessage(const QString& msg)
+void DolphinView::slotErrorMessage(const TQString& msg)
{
m_statusBar->setMessage(msg, DolphinStatusBar::Error);
}
void DolphinView::slotRefreshItems(const KFileItemList& /* list */)
{
- QTimer::singleShot(0, this, SLOT(reload()));
+ TQTimer::singleShot(0, this, TQT_SLOT(reload()));
}
void DolphinView::slotAddItems(const KFileItemList& list)
@@ -858,19 +858,19 @@ void DolphinView::createView()
switch (m_mode) {
case IconsView:
case PreviewsView: {
- const DolphinIconsView::LayoutMode layoutMode = (m_mode == IconsView) ?
+ const DolphinIconsView::LayoutMode tqlayoutMode = (m_mode == IconsView) ?
DolphinIconsView::Icons :
DolphinIconsView::Previews;
- m_iconsView = new DolphinIconsView(this, layoutMode);
+ m_iconsView = new DolphinIconsView(this, tqlayoutMode);
m_topLayout->insertWidget(1, m_iconsView);
setFocusProxy(m_iconsView);
- connect(m_iconsView, SIGNAL(executed(QIconViewItem*)),
- this, SLOT(triggerIconsViewItem(QIconViewItem*)));
- connect(m_iconsView, SIGNAL(returnPressed(QIconViewItem*)),
- this, SLOT(triggerIconsViewItem(QIconViewItem*)));
- connect(m_iconsView, SIGNAL(signalRequestActivation()),
- this, SLOT(slotGrabActivation()));
+ connect(m_iconsView, TQT_SIGNAL(executed(TQIconViewItem*)),
+ this, TQT_SLOT(triggerIconsViewItem(TQIconViewItem*)));
+ connect(m_iconsView, TQT_SIGNAL(returnPressed(TQIconViewItem*)),
+ this, TQT_SLOT(triggerIconsViewItem(TQIconViewItem*)));
+ connect(m_iconsView, TQT_SIGNAL(signalRequestActivation()),
+ this, TQT_SLOT(slotGrabActivation()));
m_iconsView->endItemUpdates();
m_iconsView->show();
@@ -883,12 +883,12 @@ void DolphinView::createView()
m_topLayout->insertWidget(1, m_detailsView);
setFocusProxy(m_detailsView);
- connect(m_detailsView, SIGNAL(executed(QListViewItem*, const QPoint&, int)),
- this, SLOT(triggerDetailsViewItem(QListViewItem*, const QPoint&, int)));
- connect(m_detailsView, SIGNAL(returnPressed(QListViewItem*)),
- this, SLOT(triggerDetailsViewItem(QListViewItem*)));
- connect(m_detailsView, SIGNAL(signalRequestActivation()),
- this, SLOT(slotGrabActivation()));
+ connect(m_detailsView, TQT_SIGNAL(executed(TQListViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT(triggerDetailsViewItem(TQListViewItem*, const TQPoint&, int)));
+ connect(m_detailsView, TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ this, TQT_SLOT(triggerDetailsViewItem(TQListViewItem*)));
+ connect(m_detailsView, TQT_SIGNAL(signalRequestActivation()),
+ this, TQT_SLOT(slotGrabActivation()));
m_detailsView->show();
m_detailsView->setFocus();
break;
@@ -898,8 +898,8 @@ void DolphinView::createView()
break;
}
- connect(scrollView(), SIGNAL(contentsMoving(int, int)),
- this, SLOT(slotContentsMoving(int, int)));
+ connect(scrollView(), TQT_SIGNAL(contentsMoving(int, int)),
+ this, TQT_SLOT(slotContentsMoving(int, int)));
startDirLister(m_urlNavigator->url());
}
@@ -910,10 +910,10 @@ KFileView* DolphinView::fileView() const
static_cast<KFileView*>(m_iconsView);
}
-QScrollView* DolphinView::scrollView() const
+TQScrollView* DolphinView::scrollView() const
{
- return (m_mode == DetailsView) ? static_cast<QScrollView*>(m_detailsView) :
- static_cast<QScrollView*>(m_iconsView);
+ return (m_mode == DetailsView) ? static_cast<TQScrollView*>(m_detailsView) :
+ static_cast<TQScrollView*>(m_iconsView);
}
ItemEffectsManager* DolphinView::itemEffectsManager() const
@@ -925,12 +925,12 @@ ItemEffectsManager* DolphinView::itemEffectsManager() const
void DolphinView::startDirLister(const KURL& url, bool reload)
{
if (!url.isValid()) {
- const QString location(url.prettyURL());
+ const TQString location(url.prettyURL());
if (location.isEmpty()) {
m_statusBar->setMessage(i18n("The location is empty."), DolphinStatusBar::Error);
}
else {
- m_statusBar->setMessage(i18n("The location '%1' is invalid.").arg(location),
+ m_statusBar->setMessage(i18n("The location '%1' is invalid.").tqarg(location),
DolphinStatusBar::Error);
}
return;
@@ -939,7 +939,7 @@ void DolphinView::startDirLister(const KURL& url, bool reload)
// Only show the directory loading progress if the status bar does
// not contain another progress information. This means that
// the directory loading progress information has the lowest priority.
- const QString progressText(m_statusBar->progressText());
+ const TQString progressText(m_statusBar->progressText());
m_showProgress = progressText.isEmpty() ||
(progressText == i18n("Loading directory..."));
if (m_showProgress) {
@@ -952,20 +952,20 @@ void DolphinView::startDirLister(const KURL& url, bool reload)
m_dirLister->openURL(url, false, reload);
}
-QString DolphinView::defaultStatusBarText() const
+TQString DolphinView::defaultStatusBarText() const
{
const int itemCount = m_folderCount + m_fileCount;
- QString text = i18n( "1 Item", "%n Items", itemCount );
+ TQString text = i18n( "1 Item", "%n Items", itemCount );
text += i18n(" (1 Folder, ", " (%n Folders, ", m_folderCount );
text += i18n("1 File)", "%n Files)", m_fileCount);
return text;
}
-QString DolphinView::selectionStatusBarText() const
+TQString DolphinView::selectionStatusBarText() const
{
- QString text;
+ TQString text;
const KFileItemList* list = selectedItems();
assert((list != 0) && !list->isEmpty());
@@ -992,18 +992,18 @@ QString DolphinView::selectionStatusBarText() const
}
if (fileCount > 0) {
- const QString sizeText(KIO::convertSize(byteSize));
- text += i18n("1 File selected (%1)", "%n Files selected (%1)", fileCount).arg(sizeText);
+ const TQString sizeText(KIO::convertSize(byteSize));
+ text += i18n("1 File selected (%1)", "%n Files selected (%1)", fileCount).tqarg(sizeText);
}
return text;
}
-QString DolphinView::renameIndexPresentation(int index, int itemCount) const
+TQString DolphinView::renameIndexPresentation(int index, int itemCount) const
{
// assure that the string reprentation for all indicess have the same
// number of characters based on the given number of items
- QString str(QString::number(index));
+ TQString str(TQString::number(index));
int chrCount = 1;
while (itemCount >= 10) {
++chrCount;
@@ -1029,23 +1029,23 @@ void DolphinView::slotShowFilterBar(bool show)
}
}
-void DolphinView::slotChangeNameFilter(const QString& nameFilter)
+void DolphinView::slotChangeNameFilter(const TQString& nameFilter)
{
// The name filter of KDirLister does a 'hard' filtering, which
// means that only the items are shown where the names match
// exactly the filter. This is non-transparent for the user, which
// just wants to have a 'soft' filtering: does the name contain
// the filter string?
- QString adjustedFilter(nameFilter);
+ TQString adjustedFilter(nameFilter);
adjustedFilter.insert(0, '*');
adjustedFilter.append('*');
m_dirLister->setNameFilter(adjustedFilter);
m_dirLister->emitChanges();
- // TODO: this is a workaround for QIconView: the item position
+ // TODO: this is a workaround for TQIconView: the item position
// stay as they are by filtering, only an inserting of an item
- // results to an automatic adjusting of the item position. In Qt4/KDE4
+ // results to an automatic adjusting of the item position. In TQt4/KDE4
// this workaround should get obsolete due to Interview.
KFileView* view = fileView();
if (view == m_iconsView) {