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
v3.5.13-sru
tpearson 14 years ago
parent a48487ef0c
commit 7a741e43ff

@ -40,11 +40,11 @@ noinst_HEADERS = bookmarkselector.h bookmarkssettingspage.h \
urlbutton.h urlnavigator.h urlnavigatorbutton.h viewproperties.h \ urlbutton.h urlnavigator.h urlnavigatorbutton.h viewproperties.h \
viewpropertiesdialog.h viewsettingspage.h viewpropertiesdialog.h viewsettingspage.h
# let automoc handle all of the meta source files (moc) # let autotqmoc handle all of the meta source files (tqmoc)
METASOURCES = AUTO METASOURCES = AUTO
messages: rc.cpp messages: rc.cpp
$(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp $(EXTRACTRC) `tqfind . -name \*.ui -o -name \*.rc` > rc.cpp
$(XGETTEXT) *.cpp -o $(podir)/d3lphin.pot $(XGETTEXT) *.cpp -o $(podir)/d3lphin.pot

@ -20,9 +20,9 @@
#include <assert.h> #include <assert.h>
#include <qpopupmenu.h> #include <tqpopupmenu.h>
#include <qpainter.h> #include <tqpainter.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <kglobalsettings.h> #include <kglobalsettings.h>
@ -34,22 +34,22 @@
#include "dolphin.h" #include "dolphin.h"
#include "urlnavigator.h" #include "urlnavigator.h"
BookmarkSelector::BookmarkSelector(URLNavigator* parent) : BookmarkSelector::BookmarkSelector(URLNavigator* tqparent) :
URLButton(parent), URLButton(tqparent),
m_selectedIndex(0) m_selectedIndex(0)
{ {
setFocusPolicy(QWidget::NoFocus); setFocusPolicy(TQ_NoFocus);
m_bookmarksMenu = new QPopupMenu(this); m_bookmarksMenu = new TQPopupMenu(this);
KBookmarkManager* manager = DolphinSettings::instance().bookmarkManager(); KBookmarkManager* manager = DolphinSettings::instance().bookmarkManager();
connect(manager, SIGNAL(changed(const QString&, const QString&)), connect(manager, TQT_SIGNAL(changed(const TQString&, const TQString&)),
this, SLOT(updateBookmarks())); this, TQT_SLOT(updateBookmarks()));
updateBookmarks(); updateBookmarks();
connect(m_bookmarksMenu, SIGNAL(activated(int)), connect(m_bookmarksMenu, TQT_SIGNAL(activated(int)),
this, SLOT(slotBookmarkActivated(int))); this, TQT_SLOT(slotBookmarkActivated(int)));
setPopup(m_bookmarksMenu); setPopup(m_bookmarksMenu);
} }
@ -70,7 +70,7 @@ void BookmarkSelector::updateBookmarks()
bookmark.text(), bookmark.text(),
i); i);
if (i == m_selectedIndex) { if (i == m_selectedIndex) {
QPixmap pixmap = SmallIcon(bookmark.icon()); TQPixmap pixmap = SmallIcon(bookmark.icon());
setPixmap(pixmap); setPixmap(pixmap);
setMinimumWidth(pixmap.width() + 2); setMinimumWidth(pixmap.width() + 2);
} }
@ -88,8 +88,8 @@ void BookmarkSelector::updateSelection(const KURL& url)
int maxLength = 0; int maxLength = 0;
m_selectedIndex = -1; m_selectedIndex = -1;
// Search the bookmark which is equal to the URL or at least is a parent URL. // Search the bookmark which is equal to the URL or at least is a tqparent URL.
// If there are more than one possible parent URL candidates, choose the bookmark // If there are more than one possible tqparent URL candidates, choose the bookmark
// which covers the bigger range of the URL. // which covers the bigger range of the URL.
int i = 0; int i = 0;
while (!bookmark.isNull()) { while (!bookmark.isNull()) {
@ -118,13 +118,13 @@ KBookmark BookmarkSelector::selectedBookmark() const
return DolphinSettings::instance().bookmark(m_selectedIndex); return DolphinSettings::instance().bookmark(m_selectedIndex);
} }
void BookmarkSelector::drawButton(QPainter* painter) void BookmarkSelector::drawButton(TQPainter* painter)
{ {
const int buttonWidth = width(); const int buttonWidth = width();
const int buttonHeight = height(); const int buttonHeight = height();
QColor backgroundColor; TQColor backgroundColor;
QColor foregroundColor; TQColor foregroundColor;
const bool isHighlighted = isDisplayHintEnabled(EnteredHint) || const bool isHighlighted = isDisplayHintEnabled(EnteredHint) ||
isDisplayHintEnabled(DraggedHint); isDisplayHintEnabled(DraggedHint);
if (isHighlighted) { if (isHighlighted) {
@ -132,17 +132,17 @@ void BookmarkSelector::drawButton(QPainter* painter)
foregroundColor = KGlobalSettings::highlightedTextColor(); foregroundColor = KGlobalSettings::highlightedTextColor();
} }
else { else {
backgroundColor = colorGroup().background(); backgroundColor = tqcolorGroup().background();
foregroundColor = KGlobalSettings::buttonTextColor(); foregroundColor = KGlobalSettings::buttonTextColor();
} }
// dimm the colors if the parent view does not have the focus // dimm the colors if the tqparent view does not have the focus
const DolphinView* parentView = urlNavigator()->dolphinView(); const DolphinView* tqparentView = urlNavigator()->dolphinView();
const Dolphin& dolphin = Dolphin::mainWin(); const Dolphin& dolphin = Dolphin::mainWin();
const bool isActive = (dolphin.activeView() == parentView); const bool isActive = (dolphin.activeView() == tqparentView);
if (!isActive) { if (!isActive) {
QColor dimmColor(colorGroup().background()); TQColor dimmColor(tqcolorGroup().background());
foregroundColor = mixColors(foregroundColor, dimmColor); foregroundColor = mixColors(foregroundColor, dimmColor);
if (isHighlighted) { if (isHighlighted) {
backgroundColor = mixColors(backgroundColor, dimmColor); backgroundColor = mixColors(backgroundColor, dimmColor);
@ -161,7 +161,7 @@ void BookmarkSelector::drawButton(QPainter* painter)
painter->drawRect(0, 0, buttonWidth, buttonHeight); painter->drawRect(0, 0, buttonWidth, buttonHeight);
// draw icon // draw icon
const QPixmap* icon = pixmap(); const TQPixmap* icon = pixmap();
if (icon != 0) { if (icon != 0) {
const int x = (buttonWidth - icon->width()) / 2; const int x = (buttonWidth - icon->width()) / 2;
const int y = (buttonHeight - icon->height()) / 2; const int y = (buttonHeight - icon->height()) / 2;

@ -25,7 +25,7 @@
#include <urlbutton.h> #include <urlbutton.h>
class URLNavigator; class URLNavigator;
class QPopupMenu; class TQPopupMenu;
class KURL; class KURL;
/** /**
@ -40,21 +40,22 @@ class KURL;
class BookmarkSelector : public URLButton class BookmarkSelector : public URLButton
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
/** /**
* @param parent Parent widget where the bookmark selector * @param tqparent Parent widget where the bookmark selector
* is embedded into. * is embedded into.
*/ */
BookmarkSelector(URLNavigator* parent); BookmarkSelector(URLNavigator* tqparent);
virtual ~BookmarkSelector(); virtual ~BookmarkSelector();
/** /**
* Updates the selection dependent from the given URL \a url. The * Updates the selection dependent from the given URL \a url. The
* URL must not match exactly to one of the available bookmarks: * 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 * The bookmark which is equal to the URL or at least is a tqparent URL
* is selected. If there are more than one possible parent URL candidates, * is selected. If there are more than one possible tqparent URL candidates,
* the bookmark which covers the bigger range of the URL is selected. * the bookmark which covers the bigger range of the URL is selected.
*/ */
void updateSelection(const KURL& url); void updateSelection(const KURL& url);
@ -80,7 +81,7 @@ protected:
* Draws the icon of the selected URL as content of the URL * Draws the icon of the selected URL as content of the URL
* selector. * selector.
*/ */
virtual void drawButton(QPainter* painter); virtual void drawButton(TQPainter* painter);
private slots: private slots:
/** /**
@ -92,7 +93,7 @@ private slots:
private: private:
int m_selectedIndex; int m_selectedIndex;
QPopupMenu* m_bookmarksMenu; TQPopupMenu* m_bookmarksMenu;
}; };
#endif #endif

@ -22,10 +22,10 @@
#include <assert.h> #include <assert.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qlineedit.h> #include <tqlineedit.h>
#include <qvbox.h> #include <tqvbox.h>
#include <kbookmark.h> #include <kbookmark.h>
#include <kbookmarkmanager.h> #include <kbookmarkmanager.h>
@ -37,70 +37,70 @@
#include "dolphinsettings.h" #include "dolphinsettings.h"
#include "editbookmarkdialog.h" #include "editbookmarkdialog.h"
BookmarksSettingsPage::BookmarksSettingsPage(QWidget*parent) : BookmarksSettingsPage::BookmarksSettingsPage(TQWidget*tqparent) :
SettingsPageBase(parent), SettingsPageBase(tqparent),
m_addButton(0), m_addButton(0),
m_removeButton(0), m_removeButton(0),
m_moveUpButton(0), m_moveUpButton(0),
m_moveDownButton(0) m_moveDownButton(0)
{ {
QVBoxLayout* topLayout = new QVBoxLayout(parent, 2, KDialog::spacingHint()); TQVBoxLayout* topLayout = new TQVBoxLayout(tqparent, 2, KDialog::spacingHint());
const int spacing = KDialog::spacingHint(); const int spacing = KDialog::spacingHint();
QHBox* hBox = new QHBox(parent); TQHBox* hBox = new TQHBox(tqparent);
hBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); hBox->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed);
hBox->setSpacing(spacing); hBox->setSpacing(spacing);
hBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Ignored); hBox->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Ignored);
m_listView = new KListView(hBox); m_listView = new KListView(hBox);
m_listView->addColumn(i18n("Icon")); m_listView->addColumn(i18n("Icon"));
m_listView->addColumn(i18n("Name")); m_listView->addColumn(i18n("Name"));
m_listView->addColumn(i18n("Location")); m_listView->addColumn(i18n("Location"));
m_listView->setResizeMode(QListView::LastColumn); m_listView->setResizeMode(TQListView::LastColumn);
m_listView->setColumnAlignment(0, Qt::AlignHCenter); m_listView->setColumnAlignment(0, TQt::AlignHCenter);
m_listView->setAllColumnsShowFocus(true); m_listView->setAllColumnsShowFocus(true);
m_listView->setSorting(-1); m_listView->setSorting(-1);
connect(m_listView, SIGNAL(selectionChanged()), connect(m_listView, TQT_SIGNAL(selectionChanged()),
this, SLOT(updateButtons())); this, TQT_SLOT(updateButtons()));
connect(m_listView, SIGNAL(pressed(QListViewItem*)), connect(m_listView, TQT_SIGNAL(pressed(TQListViewItem*)),
this, SLOT(slotBookmarkPressed(QListViewItem*))); this, TQT_SLOT(slotBookmarkPressed(TQListViewItem*)));
connect(m_listView, SIGNAL(doubleClicked(QListViewItem*, const QPoint&, int)), connect(m_listView, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint&, int)),
this, SLOT(slotBookmarkDoubleClicked(QListViewItem*, const QPoint&, int))); this, TQT_SLOT(slotBookmarkDoubleClicked(TQListViewItem*, const TQPoint&, int)));
QVBox* buttonBox = new QVBox(hBox); TQVBox* buttonBox = new TQVBox(hBox);
buttonBox->setSpacing(spacing); buttonBox->setSpacing(spacing);
const QSizePolicy buttonSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); const TQSizePolicy buttonSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Maximum);
m_addButton = new KPushButton(i18n("Add..."), buttonBox); m_addButton = new KPushButton(i18n("Add..."), buttonBox);
connect(m_addButton, SIGNAL(clicked()), connect(m_addButton, TQT_SIGNAL(clicked()),
this, SLOT(slotAddButtonClicked())); this, TQT_SLOT(slotAddButtonClicked()));
m_addButton->setSizePolicy(buttonSizePolicy); m_addButton->tqsetSizePolicy(buttonSizePolicy);
m_editButton = new KPushButton(i18n("Edit..."), buttonBox); m_editButton = new KPushButton(i18n("Edit..."), buttonBox);
connect(m_editButton, SIGNAL(clicked()), connect(m_editButton, TQT_SIGNAL(clicked()),
this, SLOT(slotEditButtonClicked())); this, TQT_SLOT(slotEditButtonClicked()));
m_editButton->setSizePolicy(buttonSizePolicy); m_editButton->tqsetSizePolicy(buttonSizePolicy);
m_removeButton = new KPushButton(i18n("Remove"), buttonBox); m_removeButton = new KPushButton(i18n("Remove"), buttonBox);
connect(m_removeButton, SIGNAL(clicked()), connect(m_removeButton, TQT_SIGNAL(clicked()),
this, SLOT(slotRemoveButtonClicked())); this, TQT_SLOT(slotRemoveButtonClicked()));
m_removeButton->setSizePolicy(buttonSizePolicy); m_removeButton->tqsetSizePolicy(buttonSizePolicy);
m_moveUpButton = new KPushButton(i18n("Move Up"), buttonBox); m_moveUpButton = new KPushButton(i18n("Move Up"), buttonBox);
connect(m_moveUpButton, SIGNAL(clicked()), connect(m_moveUpButton, TQT_SIGNAL(clicked()),
this, SLOT(slotMoveUpButtonClicked())); this, TQT_SLOT(slotMoveUpButtonClicked()));
m_moveUpButton->setSizePolicy(buttonSizePolicy); m_moveUpButton->tqsetSizePolicy(buttonSizePolicy);
m_moveDownButton = new KPushButton(i18n("Move Down"), buttonBox); m_moveDownButton = new KPushButton(i18n("Move Down"), buttonBox);
connect(m_moveDownButton, SIGNAL(clicked()), connect(m_moveDownButton, TQT_SIGNAL(clicked()),
this, SLOT(slotMoveDownButtonClicked())); this, TQT_SLOT(slotMoveDownButtonClicked()));
m_moveDownButton->setSizePolicy(buttonSizePolicy); m_moveDownButton->tqsetSizePolicy(buttonSizePolicy);
// Add a dummy widget with no restriction regarding a vertical resizing. // Add a dummy widget with no restriction regarding a vertical resizing.
// This assures that the spacing between the buttons is not increased. // This assures that the spacing between the buttons is not increased.
new QWidget(buttonBox); new TQWidget(buttonBox);
topLayout->addWidget(hBox); topLayout->addWidget(hBox);
@ -108,9 +108,9 @@ BookmarksSettingsPage::BookmarksSettingsPage(QWidget*parent) :
KBookmarkGroup root = DolphinSettings::instance().bookmarkManager()->root(); KBookmarkGroup root = DolphinSettings::instance().bookmarkManager()->root();
KBookmark bookmark = root.first(); KBookmark bookmark = root.first();
QListViewItem* prev = 0; TQListViewItem* prev = 0;
while (!bookmark.isNull()) { while (!bookmark.isNull()) {
QListViewItem* item = new QListViewItem(m_listView); TQListViewItem* item = new TQListViewItem(m_listView);
item->setPixmap(PixmapIdx, SmallIcon(bookmark.icon())); item->setPixmap(PixmapIdx, SmallIcon(bookmark.icon()));
item->setText(NameIdx, bookmark.text()); item->setText(NameIdx, bookmark.text());
item->setText(URLIdx, bookmark.url().prettyURL()); item->setText(URLIdx, bookmark.url().prettyURL());
@ -148,7 +148,7 @@ void BookmarksSettingsPage::applySettings()
} }
// add all items as bookmarks // add all items as bookmarks
QListViewItem* item = m_listView->firstChild(); TQListViewItem* item = m_listView->firstChild();
while (item != 0) { while (item != 0) {
root.addBookmark(manager, root.addBookmark(manager,
item->text(NameIdx), item->text(NameIdx),
@ -162,7 +162,7 @@ void BookmarksSettingsPage::applySettings()
void BookmarksSettingsPage::updateButtons() void BookmarksSettingsPage::updateButtons()
{ {
const QListViewItem* selectedItem = m_listView->selectedItem(); const TQListViewItem* selectedItem = m_listView->selectedItem();
const bool hasSelection = (selectedItem != 0); const bool hasSelection = (selectedItem != 0);
m_editButton->setEnabled(hasSelection); m_editButton->setEnabled(hasSelection);
@ -177,14 +177,14 @@ void BookmarksSettingsPage::updateButtons()
m_moveDownButton->setEnabled(enableMoveDown); m_moveDownButton->setEnabled(enableMoveDown);
} }
void BookmarksSettingsPage::slotBookmarkDoubleClicked(QListViewItem*, void BookmarksSettingsPage::slotBookmarkDoubleClicked(TQListViewItem*,
const QPoint&, const TQPoint&,
int) int)
{ {
slotEditButtonClicked(); slotEditButtonClicked();
} }
void BookmarksSettingsPage::slotBookmarkPressed(QListViewItem* item) void BookmarksSettingsPage::slotBookmarkPressed(TQListViewItem* item)
{ {
if (item == 0) { if (item == 0) {
m_listView->setSelected(m_listView->currentItem(), true); m_listView->setSelected(m_listView->currentItem(), true);
@ -199,14 +199,14 @@ void BookmarksSettingsPage::slotAddButtonClicked()
"bookmark"); "bookmark");
if (!bookmark.isNull()) { if (!bookmark.isNull()) {
// insert bookmark into listview // insert bookmark into listview
QListViewItem* item = new QListViewItem(m_listView); TQListViewItem* item = new TQListViewItem(m_listView);
item->setPixmap(PixmapIdx, SmallIcon(bookmark.icon())); item->setPixmap(PixmapIdx, SmallIcon(bookmark.icon()));
item->setText(NameIdx, bookmark.text()); 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());
m_listView->insertItem(item); m_listView->insertItem(item);
QListViewItem* lastItem = m_listView->lastChild(); TQListViewItem* lastItem = m_listView->lastChild();
if (lastItem != 0) { if (lastItem != 0) {
item->moveItem(lastItem); item->moveItem(lastItem);
} }
@ -218,7 +218,7 @@ void BookmarksSettingsPage::slotAddButtonClicked()
void BookmarksSettingsPage::slotEditButtonClicked() void BookmarksSettingsPage::slotEditButtonClicked()
{ {
QListViewItem* item = m_listView->selectedItem(); TQListViewItem* item = m_listView->selectedItem();
assert(item != 0); // 'edit' may not get invoked when having no items assert(item != 0); // 'edit' may not get invoked when having no items
KBookmark bookmark = EditBookmarkDialog::getBookmark(i18n("Edit Bookmark"), KBookmark bookmark = EditBookmarkDialog::getBookmark(i18n("Edit Bookmark"),
@ -235,9 +235,9 @@ void BookmarksSettingsPage::slotEditButtonClicked()
void BookmarksSettingsPage::slotRemoveButtonClicked() void BookmarksSettingsPage::slotRemoveButtonClicked()
{ {
QListViewItem* selectedItem = m_listView->selectedItem(); TQListViewItem* selectedItem = m_listView->selectedItem();
assert(selectedItem != 0); assert(selectedItem != 0);
QListViewItem* nextItem = selectedItem->itemBelow(); TQListViewItem* nextItem = selectedItem->itemBelow();
if (nextItem == 0) { if (nextItem == 0) {
nextItem = selectedItem->itemAbove(); nextItem = selectedItem->itemAbove();
} }
@ -262,10 +262,10 @@ int BookmarksSettingsPage::selectedBookmarkIndex() const
{ {
int index = -1; int index = -1;
QListViewItem* selectedItem = m_listView->selectedItem(); TQListViewItem* selectedItem = m_listView->selectedItem();
if (selectedItem != 0) { if (selectedItem != 0) {
index = 0; index = 0;
QListViewItem* item = m_listView->firstChild(); TQListViewItem* item = m_listView->firstChild();
while (item != selectedItem) { while (item != selectedItem) {
item = item->nextSibling(); item = item->nextSibling();
++index; ++index;
@ -282,19 +282,19 @@ void BookmarksSettingsPage::moveBookmark(int direction)
assert((direction >= -1) && (direction <= +1)); assert((direction >= -1) && (direction <= +1));
// swap bookmarks in listview // swap bookmarks in listview
QListViewItem* selectedItem = m_listView->selectedItem(); TQListViewItem* selectedItem = m_listView->selectedItem();
assert(selectedItem != 0); assert(selectedItem != 0);
QListViewItem* item = (direction < 0) ? selectedItem->itemAbove() : TQListViewItem* item = (direction < 0) ? selectedItem->itemAbove() :
selectedItem->itemBelow(); selectedItem->itemBelow();
assert(item != 0); assert(item != 0);
QPixmap pixmap; TQPixmap pixmap;
if (item->pixmap(0) != 0) { if (item->pixmap(0) != 0) {
pixmap = *(item->pixmap(0)); pixmap = *(item->pixmap(0));
} }
QString name(item->text(NameIdx)); TQString name(item->text(NameIdx));
QString url(item->text(URLIdx)); TQString url(item->text(URLIdx));
QString icon(item->text(IconIdx)); TQString icon(item->text(IconIdx));
if (selectedItem->pixmap(0) != 0) { if (selectedItem->pixmap(0) != 0) {
item->setPixmap(PixmapIdx, *(selectedItem->pixmap(0))); item->setPixmap(PixmapIdx, *(selectedItem->pixmap(0)));

@ -22,11 +22,11 @@
#define BOOKMARKSSETTINGSPAGE_H #define BOOKMARKSSETTINGSPAGE_H
#include <settingspagebase.h> #include <settingspagebase.h>
#include <qvaluelist.h> #include <tqvaluelist.h>
class KListView; class KListView;
class KPushButton; class KPushButton;
class QListViewItem; class TQListViewItem;
/** /**
* @brief Represents the page from the Dolphin Settings which allows * @brief Represents the page from the Dolphin Settings which allows
@ -35,9 +35,10 @@ class QListViewItem;
class BookmarksSettingsPage : public SettingsPageBase class BookmarksSettingsPage : public SettingsPageBase
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
BookmarksSettingsPage(QWidget* parent); BookmarksSettingsPage(TQWidget* tqparent);
virtual ~BookmarksSettingsPage(); virtual ~BookmarksSettingsPage();
@ -46,7 +47,7 @@ public:
private slots: private slots:
void updateButtons(); void updateButtons();
void slotBookmarkDoubleClicked(QListViewItem*, const QPoint&, int); void slotBookmarkDoubleClicked(TQListViewItem*, const TQPoint&, int);
void slotAddButtonClicked(); void slotAddButtonClicked();
void slotEditButtonClicked(); void slotEditButtonClicked();
void slotRemoveButtonClicked(); void slotRemoveButtonClicked();
@ -54,13 +55,13 @@ private slots:
void slotMoveDownButtonClicked(); void slotMoveDownButtonClicked();
/** /**
* Is connected with the signal QListView::pressed(QListViewItem* item) * Is connected with the signal TQListView::pressed(TQListViewItem* item)
* and assures that always one bookmarks stays selected although a * and assures that always one bookmarks stays selected although a
* click has been done on the viewport area. * click has been done on the viewport area.
* TODO: this is a workaround, possibly there is a more easy approach * TODO: this is a workaround, possibly there is a more easy approach
* doing this... * doing this...
*/ */
void slotBookmarkPressed(QListViewItem* item); void slotBookmarkPressed(TQListViewItem* item);
private: private:
enum ColumnIndex { enum ColumnIndex {

@ -19,11 +19,11 @@
#include "bookmarkssidebarpage.h" #include "bookmarkssidebarpage.h"
#include <qlistbox.h> #include <tqlistbox.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qpainter.h> #include <tqpainter.h>
#include <assert.h> #include <assert.h>
#include <qpopupmenu.h> #include <tqpopupmenu.h>
#include <kbookmarkmanager.h> #include <kbookmarkmanager.h>
#include <kmessagebox.h> #include <kmessagebox.h>
@ -35,22 +35,22 @@
#include "dolphinview.h" #include "dolphinview.h"
#include "editbookmarkdialog.h" #include "editbookmarkdialog.h"
BookmarksSidebarPage::BookmarksSidebarPage(QWidget* parent) : BookmarksSidebarPage::BookmarksSidebarPage(TQWidget* tqparent) :
SidebarPage(parent) SidebarPage(tqparent)
{ {
QVBoxLayout* layout = new QVBoxLayout(this); TQVBoxLayout* tqlayout = new TQVBoxLayout(this);
m_bookmarksList = new BookmarksListBox(this); m_bookmarksList = new BookmarksListBox(this);
m_bookmarksList->setPaletteBackgroundColor(colorGroup().background()); m_bookmarksList->setPaletteBackgroundColor(tqcolorGroup().background());
layout->addWidget(m_bookmarksList); tqlayout->addWidget(m_bookmarksList);
connect(m_bookmarksList, SIGNAL(mouseButtonClicked(int, QListBoxItem*, const QPoint&)), connect(m_bookmarksList, TQT_SIGNAL(mouseButtonClicked(int, TQListBoxItem*, const TQPoint&)),
this, SLOT(slotMouseButtonClicked(int, QListBoxItem*))); this, TQT_SLOT(slotMouseButtonClicked(int, TQListBoxItem*)));
connect(m_bookmarksList, SIGNAL(contextMenuRequested(QListBoxItem*, const QPoint&)), connect(m_bookmarksList, TQT_SIGNAL(contextMenuRequested(TQListBoxItem*, const TQPoint&)),
this, SLOT(slotContextMenuRequested(QListBoxItem*, const QPoint&))); this, TQT_SLOT(slotContextMenuRequested(TQListBoxItem*, const TQPoint&)));
KBookmarkManager* manager = DolphinSettings::instance().bookmarkManager(); KBookmarkManager* manager = DolphinSettings::instance().bookmarkManager();
connect(manager, SIGNAL(changed(const QString&, const QString&)), connect(manager, TQT_SIGNAL(changed(const TQString&, const TQString&)),
this, SLOT(updateBookmarks())); this, TQT_SLOT(updateBookmarks()));
updateBookmarks(); updateBookmarks();
} }
@ -81,7 +81,7 @@ void BookmarksSidebarPage::updateBookmarks()
connectToActiveView(); connectToActiveView();
} }
void BookmarksSidebarPage::slotMouseButtonClicked(int button, QListBoxItem* item) void BookmarksSidebarPage::slotMouseButtonClicked(int button, TQListBoxItem* item)
{ {
if ((button != Qt::LeftButton) || (item == 0)) { if ((button != Qt::LeftButton) || (item == 0)) {
return; return;
@ -92,15 +92,15 @@ void BookmarksSidebarPage::slotMouseButtonClicked(int button, QListBoxItem* item
Dolphin::mainWin().activeView()->setURL(bookmark.url()); Dolphin::mainWin().activeView()->setURL(bookmark.url());
} }
void BookmarksSidebarPage::slotContextMenuRequested(QListBoxItem* item, void BookmarksSidebarPage::slotContextMenuRequested(TQListBoxItem* item,
const QPoint& pos) const TQPoint& pos)
{ {
const int insertID = 1; const int insertID = 1;
const int editID = 2; const int editID = 2;
const int deleteID = 3; const int deleteID = 3;
const int addID = 4; const int addID = 4;
QPopupMenu* popup = new QPopupMenu(); TQPopupMenu* popup = new TQPopupMenu();
if (item == 0) { if (item == 0) {
popup->insertItem(SmallIcon("filenew"), i18n("Add Bookmark..."), addID); popup->insertItem(SmallIcon("filenew"), i18n("Add Bookmark..."), addID);
} }
@ -194,8 +194,8 @@ void BookmarksSidebarPage::adjustSelection(const KURL& url)
int maxLength = 0; int maxLength = 0;
int selectedIndex = -1; int selectedIndex = -1;
// Search the bookmark which is equal to the URL or at least is a parent URL. // Search the bookmark which is equal to the URL or at least is a tqparent URL.
// If there are more than one possible parent URL candidates, choose the bookmark // If there are more than one possible tqparent URL candidates, choose the bookmark
// which covers the bigger range of the URL. // which covers the bigger range of the URL.
int i = 0; int i = 0;
while (!bookmark.isNull()) { while (!bookmark.isNull()) {
@ -234,12 +234,12 @@ void BookmarksSidebarPage::connectToActiveView()
{ {
DolphinView* view = Dolphin::mainWin().activeView(); DolphinView* view = Dolphin::mainWin().activeView();
adjustSelection(view->url()); adjustSelection(view->url());
connect(view, SIGNAL(signalURLChanged(const KURL&)), connect(view, TQT_SIGNAL(signalURLChanged(const KURL&)),
this, SLOT(slotURLChanged(const KURL&))); this, TQT_SLOT(slotURLChanged(const KURL&)));
} }
BookmarksListBox::BookmarksListBox(QWidget* parent) : BookmarksListBox::BookmarksListBox(TQWidget* tqparent) :
QListBox(parent) TQListBox(tqparent)
{ {
setAcceptDrops(true); setAcceptDrops(true);
} }
@ -247,32 +247,32 @@ BookmarksListBox::~BookmarksListBox()
{ {
} }
void BookmarksListBox::paintEvent(QPaintEvent* /* event */) void BookmarksListBox::paintEvent(TQPaintEvent* /* event */)
{ {
// don't invoke QListBox::paintEvent(event) to prevent // don't invoke TQListBox::paintEvent(event) to prevent
// that any kind of frame is drawn // that any kind of frame is drawn
} }
void BookmarksListBox::contentsMousePressEvent(QMouseEvent *event) void BookmarksListBox::contentsMousePressEvent(TQMouseEvent *event)
{ {
if (event->button() == LeftButton) if (event->button() == Qt::LeftButton)
dragPos = event->pos(); dragPos = event->pos();
QListBox::contentsMousePressEvent(event); TQListBox::contentsMousePressEvent(event);
} }
void BookmarksListBox::contentsMouseMoveEvent(QMouseEvent *event) void BookmarksListBox::contentsMouseMoveEvent(TQMouseEvent *event)
{ {
if (event->state() & LeftButton) { if (event->state() & Qt::LeftButton) {
int distance = (event->pos() - dragPos).manhattanLength(); int distance = (event->pos() - dragPos).manhattanLength();
if (distance > QApplication::startDragDistance()) if (distance > TQApplication::startDragDistance())
startDrag(); startDrag();
} }
QListBox::contentsMouseMoveEvent(event); TQListBox::contentsMouseMoveEvent(event);
} }
void BookmarksListBox::startDrag() void BookmarksListBox::startDrag()
{ {
int currentItem = QListBox::currentItem(); int currentItem = TQListBox::currentItem();
if (currentItem != -1) { if (currentItem != -1) {
BookmarkItem* bookmark = (BookmarkItem*)item(currentItem); BookmarkItem* bookmark = (BookmarkItem*)item(currentItem);
if (bookmark!=0){ if (bookmark!=0){
@ -284,12 +284,12 @@ void BookmarksListBox::startDrag()
} }
} }
void BookmarksListBox::dragEnterEvent( QDragEnterEvent *event ) void BookmarksListBox::dragEnterEvent( TQDragEnterEvent *event )
{ {
event->accept(KURLDrag::canDecode(event)); event->accept(KURLDrag::canDecode(event));
} }
void BookmarksListBox::dropEvent( QDropEvent *event ) void BookmarksListBox::dropEvent( TQDropEvent *event )
{ {
KURL::List urls; KURL::List urls;
if (KURLDrag::decode(event, urls) && !urls.isEmpty()) { if (KURLDrag::decode(event, urls) && !urls.isEmpty()) {
@ -304,8 +304,8 @@ void BookmarksListBox::dropEvent( QDropEvent *event )
} }
} }
BookmarkItem::BookmarkItem(const QPixmap& pixmap, const QString& text, const KURL& url) : BookmarkItem::BookmarkItem(const TQPixmap& pixmap, const TQString& text, const KURL& url) :
QListBoxPixmap(pixmap, text), TQListBoxPixmap(pixmap, text),
m_url(url) m_url(url)
{ {
} }
@ -314,9 +314,9 @@ BookmarkItem::~BookmarkItem()
{ {
} }
int BookmarkItem::height(const QListBox* listBox) const int BookmarkItem::height(const TQListBox* listBox) const
{ {
return QListBoxPixmap::height(listBox) + 8; return TQListBoxPixmap::height(listBox) + 8;
} }
const KURL& BookmarkItem::url() const const KURL& BookmarkItem::url() const
@ -326,7 +326,7 @@ const KURL& BookmarkItem::url() const
BookmarkItem* BookmarkItem::fromKbookmark(const KBookmark& bookmark, const KIconLoader& iconLoader) BookmarkItem* BookmarkItem::fromKbookmark(const KBookmark& bookmark, const KIconLoader& iconLoader)
{ {
QPixmap icon(iconLoader.loadIcon(bookmark.icon(), KIcon::NoGroup, KIcon::SizeMedium)); TQPixmap icon(iconLoader.loadIcon(bookmark.icon(), KIcon::NoGroup, KIcon::SizeMedium));
return new BookmarkItem(icon, bookmark.text(), bookmark.url()); return new BookmarkItem(icon, bookmark.text(), bookmark.url());
} }

@ -20,7 +20,7 @@
#define _BOOKMARKSSIDEBARPAGE_H_ #define _BOOKMARKSSIDEBARPAGE_H_
#include <sidebarpage.h> #include <sidebarpage.h>
#include <qlistbox.h> #include <tqlistbox.h>
#include <kurl.h> #include <kurl.h>
#include <kbookmark.h> #include <kbookmark.h>
#include <kiconloader.h> #include <kiconloader.h>
@ -38,9 +38,10 @@ class BookmarksListBox;
class BookmarksSidebarPage : public SidebarPage class BookmarksSidebarPage : public SidebarPage
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
BookmarksSidebarPage(QWidget* parent); BookmarksSidebarPage(TQWidget* tqparent);
virtual ~BookmarksSidebarPage(); virtual ~BookmarksSidebarPage();
protected: protected:
@ -55,10 +56,10 @@ private slots:
* 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, QListBoxItem* item); void slotMouseButtonClicked(int button, TQListBoxItem* item);
/** @see QListBox::slotContextMenuRequested */ /** @see TQListBox::slotContextMenuRequested */
void slotContextMenuRequested(QListBoxItem* item, const QPoint& pos); void slotContextMenuRequested(TQListBoxItem* item, const TQPoint& pos);
/** /**
* Is invoked whenever the URL of the active view has been changed. Adjusts * Is invoked whenever the URL of the active view has been changed. Adjusts
@ -70,8 +71,8 @@ private:
/** /**
* Updates the selection dependent from the given URL \a url. The * Updates the selection dependent from the given URL \a url. The
* URL must not match exactly to one of the available bookmarks: * 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 * The bookmark which is equal to the URL or at least is a tqparent URL
* is selected. If there are more than one possible parent URL candidates, * is selected. If there are more than one possible tqparent URL candidates,
* the bookmark which covers the bigger range of the URL is selected. * the bookmark which covers the bigger range of the URL is selected.
*/ */
void adjustSelection(const KURL& url); void adjustSelection(const KURL& url);
@ -88,30 +89,31 @@ private:
/** /**
* @brief Listbox which contains a list of bookmarks. * @brief Listbox which contains a list of bookmarks.
* *
* Only QListBox::paintEvent() has been overwritten to prevent * Only TQListBox::paintEvent() has been overwritten to prevent
* that a (not wanted) frameborder is drawn. * that a (not wanted) frameborder is drawn.
*/ */
class BookmarksListBox : public QListBox class BookmarksListBox : public TQListBox
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
BookmarksListBox(QWidget* parent); BookmarksListBox(TQWidget* tqparent);
virtual ~BookmarksListBox(); virtual ~BookmarksListBox();
protected: protected:
//drag //drag
void contentsMousePressEvent(QMouseEvent *event); void contentsMousePressEvent(TQMouseEvent *event);
void contentsMouseMoveEvent(QMouseEvent *event); void contentsMouseMoveEvent(TQMouseEvent *event);
//drop //drop
void dragEnterEvent( QDragEnterEvent *evt ); void dragEnterEvent( TQDragEnterEvent *evt );
void dropEvent( QDropEvent *evt ); void dropEvent( TQDropEvent *evt );
// void mousePressEvent( QMouseEvent *evt ); // void mousePressEvent( TQMouseEvent *evt );
// void mouseMoveEvent( QMouseEvent * ); // void mouseMoveEvent( TQMouseEvent * );
/** @see QWidget::paintEvent() */ /** @see TQWidget::paintEvent() */
virtual void paintEvent(QPaintEvent* event); virtual void paintEvent(TQPaintEvent* event);
private: private:
QPoint dragPos; TQPoint dragPos;
void startDrag(); void startDrag();
}; };
@ -119,15 +121,15 @@ private:
/** /**
* @brief Item which can be added to a BookmarksListBox. * @brief Item which can be added to a BookmarksListBox.
* *
* Only QListBoxPixmap::height() has been overwritten to get * Only TQListBoxPixmap::height() has been overwritten to get
* a spacing between the items. * a spacing between the items.
*/ */
class BookmarkItem : public QListBoxPixmap class BookmarkItem : public TQListBoxPixmap
{ {
public: public:
BookmarkItem(const QPixmap& pixmap, const QString& text, const KURL& url); BookmarkItem(const TQPixmap& pixmap, const TQString& text, const KURL& url);
virtual ~BookmarkItem(); virtual ~BookmarkItem();
virtual int height(const QListBox* listBox) const; virtual int height(const TQListBox* listBox) const;
const KURL& url() const; const KURL& url() const;
static BookmarkItem* fromKbookmark(const KBookmark& bookmark, const KIconLoader& iconLoader); static BookmarkItem* fromKbookmark(const KBookmark& bookmark, const KIconLoader& iconLoader);

@ -19,25 +19,25 @@
***************************************************************************/ ***************************************************************************/
#include "detailsviewsettingspage.h" #include "detailsviewsettingspage.h"
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <klocale.h> #include <klocale.h>
#include <kdialog.h> #include <kdialog.h>
#include <kfontcombo.h> #include <kfontcombo.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qgrid.h> #include <tqgrid.h>
#include <assert.h> #include <assert.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qradiobutton.h> #include <tqradiobutton.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include <qgroupbox.h> #include <tqgroupbox.h>
#include <qgroupbox.h> #include <tqgroupbox.h>
#include "dolphinsettings.h" #include "dolphinsettings.h"
#include "dolphindetailsviewsettings.h" #include "dolphindetailsviewsettings.h"
#include "dolphindetailsview.h" #include "dolphindetailsview.h"
DetailsViewSettingsPage::DetailsViewSettingsPage(QWidget *parent) : DetailsViewSettingsPage::DetailsViewSettingsPage(TQWidget *tqparent) :
QVBox(parent), TQVBox(tqparent),
m_dateBox(0), m_dateBox(0),
m_permissionsBox(0), m_permissionsBox(0),
m_ownerBox(0), m_ownerBox(0),
@ -48,7 +48,7 @@ DetailsViewSettingsPage::DetailsViewSettingsPage(QWidget *parent) :
{ {
const int spacing = KDialog::spacingHint(); const int spacing = KDialog::spacingHint();
const int margin = KDialog::marginHint(); const int margin = KDialog::marginHint();
const QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); const TQSizePolicy sizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed);
setSpacing(spacing); setSpacing(spacing);
setMargin(margin); setMargin(margin);
@ -57,30 +57,30 @@ DetailsViewSettingsPage::DetailsViewSettingsPage(QWidget *parent) :
assert(settings != 0); assert(settings != 0);
// create "Columns" properties // create "Columns" properties
QGroupBox* columnsGroup = new QGroupBox(4, Qt::Vertical, i18n("Columns"), this); TQGroupBox* columnsGroup = new TQGroupBox(4, Qt::Vertical, i18n("Columns"), this);
columnsGroup->setSizePolicy(sizePolicy); columnsGroup->tqsetSizePolicy(sizePolicy);
columnsGroup->setMargin(margin); columnsGroup->setMargin(margin);
QHBox* visibleColumnsLayout = new QHBox(columnsGroup); TQHBox* visibleColumnsLayout = new TQHBox(columnsGroup);
m_dateBox = new QCheckBox(i18n("Date"), visibleColumnsLayout); m_dateBox = new TQCheckBox(i18n("Date"), visibleColumnsLayout);
m_dateBox->setChecked(settings->isColumnEnabled(DolphinDetailsView::DateColumn)); m_dateBox->setChecked(settings->isColumnEnabled(DolphinDetailsView::DateColumn));
m_permissionsBox = new QCheckBox(i18n("Permissions"), visibleColumnsLayout); m_permissionsBox = new TQCheckBox(i18n("Permissions"), visibleColumnsLayout);
m_permissionsBox->setChecked(settings->isColumnEnabled(DolphinDetailsView::PermissionsColumn)); m_permissionsBox->setChecked(settings->isColumnEnabled(DolphinDetailsView::PermissionsColumn));
m_ownerBox = new QCheckBox(i18n("Owner"), visibleColumnsLayout); m_ownerBox = new TQCheckBox(i18n("Owner"), visibleColumnsLayout);
m_ownerBox->setChecked(settings->isColumnEnabled(DolphinDetailsView::OwnerColumn)); m_ownerBox->setChecked(settings->isColumnEnabled(DolphinDetailsView::OwnerColumn));
m_groupBox = new QCheckBox(i18n("Group"), visibleColumnsLayout); m_groupBox = new TQCheckBox(i18n("Group"), visibleColumnsLayout);
m_groupBox->setChecked(settings->isColumnEnabled(DolphinDetailsView::GroupColumn)); m_groupBox->setChecked(settings->isColumnEnabled(DolphinDetailsView::GroupColumn));
// Create "Icon" properties // Create "Icon" properties
QButtonGroup* iconSizeGroup = new QButtonGroup(3, Qt::Horizontal, i18n("Icon Size"), this); TQButtonGroup* iconSizeGroup = new TQButtonGroup(3, Qt::Horizontal, i18n("Icon Size"), this);
iconSizeGroup->setSizePolicy(sizePolicy); iconSizeGroup->tqsetSizePolicy(sizePolicy);
iconSizeGroup->setMargin(margin); iconSizeGroup->setMargin(margin);
m_smallIconSize = new QRadioButton(i18n("Small"), iconSizeGroup); m_smallIconSize = new TQRadioButton(i18n("Small"), iconSizeGroup);
m_mediumIconSize = new QRadioButton(i18n("Medium"), iconSizeGroup); m_mediumIconSize = new TQRadioButton(i18n("Medium"), iconSizeGroup);
m_largeIconSize = new QRadioButton(i18n("Large"), iconSizeGroup); m_largeIconSize = new TQRadioButton(i18n("Large"), iconSizeGroup);
switch (settings->iconSize()) { switch (settings->iconSize()) {
case KIcon::SizeLarge: case KIcon::SizeLarge:
m_largeIconSize->setChecked(true); m_largeIconSize->setChecked(true);
@ -95,29 +95,29 @@ DetailsViewSettingsPage::DetailsViewSettingsPage(QWidget *parent) :
m_smallIconSize->setChecked(true); m_smallIconSize->setChecked(true);
} }
//new QLabel(i18n("Icon size:"), iconGroup); //new TQLabel(i18n("Icon size:"), iconGroup);
//m_iconSizeBox = new QComboBox(iconGroup); //m_iconSizeBox = new TQComboBox(iconGroup);
//m_iconSizeBox->insertItem(i18n("Small")); //m_iconSizeBox->insertItem(i18n("Small"));
//m_iconSizeBox->insertItem(i18n("Medium")); //m_iconSizeBox->insertItem(i18n("Medium"));
//m_iconSizeBox->insertItem(i18n("Large")); //m_iconSizeBox->insertItem(i18n("Large"));
// create "Text" properties // create "Text" properties
QGroupBox* textGroup = new QGroupBox(2, Qt::Horizontal, i18n("Text"), this); TQGroupBox* textGroup = new TQGroupBox(2, Qt::Horizontal, i18n("Text"), this);
textGroup->setSizePolicy(sizePolicy); textGroup->tqsetSizePolicy(sizePolicy);
textGroup->setMargin(margin); textGroup->setMargin(margin);
new QLabel(i18n("Font family:"), textGroup); new TQLabel(i18n("Font family:"), textGroup);
m_fontFamilyBox = new KFontCombo(textGroup); m_fontFamilyBox = new KFontCombo(textGroup);
m_fontFamilyBox->setCurrentFont(settings->fontFamily()); m_fontFamilyBox->setCurrentFont(settings->fontFamily());
new QLabel(i18n("Font size:"), textGroup); new TQLabel(i18n("Font size:"), textGroup);
m_fontSizeBox = new QSpinBox(6, 99, 1, textGroup); m_fontSizeBox = new TQSpinBox(6, 99, 1, textGroup);
m_fontSizeBox->setValue(settings->fontSize()); m_fontSizeBox->setValue(settings->fontSize());
// Add a dummy widget with no restriction regarding // Add a dummy widget with no restriction regarding
// a vertical resizing. This assures that the dialog layout // a vertical resizing. This assures that the dialog tqlayout
// is not stretched vertically. // is not stretched vertically.
new QWidget(this); new TQWidget(this);
} }

@ -21,12 +21,12 @@
#ifndef DETAILSVIEWSETTINGSPAGE_H #ifndef DETAILSVIEWSETTINGSPAGE_H
#define DETAILSVIEWSETTINGSPAGE_H #define DETAILSVIEWSETTINGSPAGE_H
#include <qvbox.h> #include <tqvbox.h>
class QCheckBox; class TQCheckBox;
class KFontCombo; class KFontCombo;
class QSpinBox; class TQSpinBox;
class QComboBox; class TQComboBox;
class QRadioButton; class TQRadioButton;
/** /**
* @brief Represents the page from the Dolphin Settings which allows * @brief Represents the page from the Dolphin Settings which allows
@ -34,12 +34,13 @@ class QRadioButton;
* *
* @author Peter Penz <peter.penz@gmx.at> * @author Peter Penz <peter.penz@gmx.at>
*/ */
class DetailsViewSettingsPage : public QVBox class DetailsViewSettingsPage : public TQVBox
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
DetailsViewSettingsPage(QWidget* parent); DetailsViewSettingsPage(TQWidget* tqparent);
virtual ~DetailsViewSettingsPage(); virtual ~DetailsViewSettingsPage();
/** /**
@ -50,16 +51,16 @@ public:
void applySettings(); void applySettings();
private: private:
QCheckBox* m_dateBox; TQCheckBox* m_dateBox;
QCheckBox* m_permissionsBox; TQCheckBox* m_permissionsBox;
QCheckBox* m_ownerBox; TQCheckBox* m_ownerBox;
QCheckBox* m_groupBox; TQCheckBox* m_groupBox;
QRadioButton* m_smallIconSize; TQRadioButton* m_smallIconSize;
QRadioButton* m_mediumIconSize; TQRadioButton* m_mediumIconSize;
QRadioButton* m_largeIconSize; TQRadioButton* m_largeIconSize;
KFontCombo* m_fontFamilyBox; KFontCombo* m_fontFamilyBox;
QSpinBox* m_fontSizeBox; TQSpinBox* m_fontSizeBox;
}; };
#endif #endif

@ -52,8 +52,8 @@
#include <kstandarddirs.h> #include <kstandarddirs.h>
#include <krun.h> #include <krun.h>
#include <qclipboard.h> #include <tqclipboard.h>
#include <qdragobject.h> #include <tqdragobject.h>
#include "urlnavigator.h" #include "urlnavigator.h"
#include "viewpropertiesdialog.h" #include "viewpropertiesdialog.h"
@ -132,7 +132,7 @@ void Dolphin::dropURLs(const KURL::List& urls,
popup.insertItem(SmallIcon("stop"), i18n("Cancel"), 3); popup.insertItem(SmallIcon("stop"), i18n("Cancel"), 3);
popup.setAccel(i18n("Escape"), 3); popup.setAccel(i18n("Escape"), 3);
selectedIndex = popup.exec(QCursor::pos()); selectedIndex = popup.exec(TQCursor::pos());
} }
if (selectedIndex < 0) { if (selectedIndex < 0) {
@ -267,10 +267,10 @@ void Dolphin::slotSortingChanged(DolphinView::Sorting sorting)
} }
} }
void Dolphin::slotSortOrderChanged(Qt::SortOrder order) void Dolphin::slotSortOrderChanged(TQt::SortOrder order)
{ {
KToggleAction* descending = static_cast<KToggleAction*>(actionCollection()->action("descending")); KToggleAction* descending = static_cast<KToggleAction*>(actionCollection()->action("descending"));
const bool sortDescending = (order == Qt::Descending); const bool sortDescending = (order == TQt::Descending);
descending->setChecked(sortDescending); descending->setChecked(sortDescending);
} }
@ -292,7 +292,7 @@ void Dolphin::slotSelectionChanged()
emit selectionChanged(); emit selectionChanged();
} }
void Dolphin::closeEvent(QCloseEvent* event) void Dolphin::closeEvent(TQCloseEvent* event)
{ {
KConfig* config = kapp->config(); KConfig* config = kapp->config();
config->setGroup("General"); config->setGroup("General");
@ -363,8 +363,8 @@ void Dolphin::createFolder()
DolphinStatusBar* statusBar = m_activeView->statusBar(); DolphinStatusBar* statusBar = m_activeView->statusBar();
const KURL baseURL(m_activeView->url()); const KURL baseURL(m_activeView->url());
QString name(i18n("New Folder")); TQString name(i18n("New Folder"));
if (baseURL.isLocalFile() && QFileInfo(baseURL.path(+1) + name).exists()) { if (baseURL.isLocalFile() && TQFileInfo(baseURL.path(+1) + name).exists()) {
name = KIO::RenameDlg::suggestName(baseURL, i18n("New Folder")); name = KIO::RenameDlg::suggestName(baseURL, i18n("New Folder"));
} }
@ -395,7 +395,7 @@ void Dolphin::createFolder()
// TODO: provide message type hint // TODO: provide message type hint
if (ok) { if (ok) {
statusBar->setMessage(i18n("Created folder %1.").arg(url.path()), statusBar->setMessage(i18n("Created folder %1.").tqarg(url.path()),
DolphinStatusBar::OperationCompleted); DolphinStatusBar::OperationCompleted);
DolphinCommand command(DolphinCommand::CreateFolder, KURL::List(), url); DolphinCommand command(DolphinCommand::CreateFolder, KURL::List(), url);
@ -405,11 +405,11 @@ void Dolphin::createFolder()
// Creating of the folder has been failed. Check whether the creating // Creating of the folder has been failed. Check whether the creating
// has been failed because a folder with the same name exists... // has been failed because a folder with the same name exists...
if (KIO::NetAccess::exists(url, true, this)) { if (KIO::NetAccess::exists(url, true, this)) {
statusBar->setMessage(i18n("A folder named %1 already exists.").arg(url.path()), statusBar->setMessage(i18n("A folder named %1 already exists.").tqarg(url.path()),
DolphinStatusBar::Error); DolphinStatusBar::Error);
} }
else { else {
statusBar->setMessage(i18n("Creating of folder %1 failed.").arg(url.path()), statusBar->setMessage(i18n("Creating of folder %1 failed.").tqarg(url.path()),
DolphinStatusBar::Error); DolphinStatusBar::Error);
} }
@ -426,12 +426,12 @@ void Dolphin::createFile()
clearStatusBar(); clearStatusBar();
// TODO: const Entry& entry = m_createFileTemplates[QString(sender->name())]; // TODO: const Entry& entry = m_createFileTemplates[TQString(sender->name())];
// should be enough. Anyway: the implemantation of [] does a linear search internally too. // should be enough. Anyway: the implemantation of [] does a linear search internally too.
KSortableValueList<CreateFileEntry, QString>::ConstIterator it = m_createFileTemplates.begin(); KSortableValueList<CreateFileEntry, TQString>::ConstIterator it = m_createFileTemplates.begin();
KSortableValueList<CreateFileEntry, QString>::ConstIterator end = m_createFileTemplates.end(); KSortableValueList<CreateFileEntry, TQString>::ConstIterator end = m_createFileTemplates.end();
const QString senderName(sender()->name()); const TQString senderName(TQT_TQOBJECT(sender())->name());
bool found = false; bool found = false;
CreateFileEntry entry; CreateFileEntry entry;
while (!found && (it != end)) { while (!found && (it != end)) {
@ -445,30 +445,30 @@ void Dolphin::createFile()
} }
DolphinStatusBar* statusBar = m_activeView->statusBar(); DolphinStatusBar* statusBar = m_activeView->statusBar();
if (!found || !QFile::exists(entry.templatePath)) { if (!found || !TQFile::exists(entry.templatePath)) {
statusBar->setMessage(i18n("Could not create file."), DolphinStatusBar::Error); statusBar->setMessage(i18n("Could not create file."), DolphinStatusBar::Error);
return; return;
} }
// 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('/'); const int pos = entry.templatePath.tqfindRev('/');
QString sourcePath(entry.templatePath.left(pos + 1)); TQString 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())); TQString name(i18n(entry.name.ascii()));
// Most entry names end with "..." (e. g. "HTML File..."), which is ok for // Most entry names end with "..." (e. g. "HTML File..."), which is ok for
// menus but no good choice for a new file name -> remove the dots... // menus but no good choice for a new file name -> remove the dots...
name.replace("...", QString::null); name.tqreplace("...", TQString());
// add the file extension to the name // add the file extension to the name
name.append(sourcePath.right(sourcePath.length() - sourcePath.findRev('.'))); name.append(sourcePath.right(sourcePath.length() - sourcePath.tqfindRev('.')));
// Check whether a file with the current name already exists. If yes suggest automatically // 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"). // a unique file name (e. g. "HTML File" will be replaced by "HTML File_1").
const KURL viewURL(m_activeView->url()); const KURL viewURL(m_activeView->url());
const bool fileExists = viewURL.isLocalFile() && const bool fileExists = viewURL.isLocalFile() &&
QFileInfo(viewURL.path(+1) + KIO::encodeFileName(name)).exists(); TQFileInfo(viewURL.path(+1) + KIO::encodeFileName(name)).exists();
if (fileExists) { if (fileExists) {
name = KIO::RenameDlg::suggestName(viewURL, name); name = KIO::RenameDlg::suggestName(viewURL, name);
} }
@ -487,10 +487,10 @@ void Dolphin::createFile()
// before copying the template to the destination path check whether a file // before copying the template to the destination path check whether a file
// with the given name already exists // with the given name already exists
const QString destPath(viewURL.prettyURL() + "/" + KIO::encodeFileName(name)); const TQString destPath(viewURL.prettyURL() + "/" + KIO::encodeFileName(name));
const KURL destURL(destPath); const KURL destURL(destPath);
if (KIO::NetAccess::exists(destURL, false, this)) { if (KIO::NetAccess::exists(destURL, false, this)) {
statusBar->setMessage(i18n("A file named %1 already exists.").arg(name), statusBar->setMessage(i18n("A file named %1 already exists.").tqarg(name),
DolphinStatusBar::Error); DolphinStatusBar::Error);
return; return;
} }
@ -500,7 +500,7 @@ void Dolphin::createFile()
KIO::CopyJob* job = KIO::copyAs(sourceURL, destURL); KIO::CopyJob* job = KIO::copyAs(sourceURL, destURL);
job->setDefaultPermissions(true); job->setDefaultPermissions(true);
if (KIO::NetAccess::synchronousRun(job, this)) { if (KIO::NetAccess::synchronousRun(job, this)) {
statusBar->setMessage(i18n("Created file %1.").arg(name), statusBar->setMessage(i18n("Created file %1.").tqarg(name),
DolphinStatusBar::OperationCompleted); DolphinStatusBar::OperationCompleted);
KURL::List list; KURL::List list;
@ -510,7 +510,7 @@ void Dolphin::createFile()
} }
else { else {
statusBar->setMessage(i18n("Creating of file %1 failed.").arg(name), statusBar->setMessage(i18n("Creating of file %1 failed.").tqarg(name),
DolphinStatusBar::Error); DolphinStatusBar::Error);
} }
} }
@ -537,26 +537,26 @@ void Dolphin::deleteItems()
const uint itemCount = list.count(); const uint itemCount = list.count();
assert(itemCount >= 1); assert(itemCount >= 1);
QString text; TQString text;
if (itemCount > 1) { if (itemCount > 1) {
text = i18n("Do you really want to delete the %1 selected items?").arg(itemCount); text = i18n("Do you really want to delete the %1 selected items?").tqarg(itemCount);
} }
else { else {
const KURL& url = list.first(); const KURL& url = list.first();
text = i18n("Do you really want to delete '%1'?").arg(url.fileName()); text = i18n("Do you really want to delete '%1'?").tqarg(url.fileName());
} }
const bool del = KMessageBox::warningContinueCancel(this, const bool del = KMessageBox::warningContinueCancel(this,
text, text,
QString::null, TQString(),
KGuiItem(i18n("Delete"), SmallIcon("editdelete")) KGuiItem(i18n("Delete"), SmallIcon("editdelete"))
) == KMessageBox::Continue; ) == KMessageBox::Continue;
if (del) { if (del) {
KIO::Job* job = KIO::del(list); KIO::Job* job = KIO::del(list);
connect(job, SIGNAL(result(KIO::Job*)), connect(job, TQT_SIGNAL(result(KIO::Job*)),
this, SLOT(slotHandleJobError(KIO::Job*))); this, TQT_SLOT(slotHandleJobError(KIO::Job*)));
connect(job, SIGNAL(result(KIO::Job*)), connect(job, TQT_SIGNAL(result(KIO::Job*)),
this, SLOT(slotDeleteFileFinished(KIO::Job*))); this, TQT_SLOT(slotDeleteFileFinished(KIO::Job*)));
} }
} }
@ -613,7 +613,7 @@ void Dolphin::slotUndoAvailable(bool available)
} }
} }
void Dolphin::slotUndoTextChanged(const QString& text) void Dolphin::slotUndoTextChanged(const TQString& text)
{ {
KAction* undoAction = actionCollection()->action(KStdAction::stdName(KStdAction::Undo)); KAction* undoAction = actionCollection()->action(KStdAction::stdName(KStdAction::Undo));
if (undoAction != 0) { if (undoAction != 0) {
@ -629,7 +629,7 @@ void Dolphin::slotRedoAvailable(bool available)
} }
} }
void Dolphin::slotRedoTextChanged(const QString& text) void Dolphin::slotRedoTextChanged(const TQString& text)
{ {
KAction* redoAction = actionCollection()->action(KStdAction::stdName(KStdAction::Redo)); KAction* redoAction = actionCollection()->action(KStdAction::stdName(KStdAction::Redo));
if (redoAction != 0) { if (redoAction != 0) {
@ -640,23 +640,23 @@ void Dolphin::slotRedoTextChanged(const QString& text)
void Dolphin::cut() void Dolphin::cut()
{ {
m_clipboardContainsCutData = true; m_clipboardContainsCutData = true;
QDragObject* data = new KURLDrag(m_activeView->selectedURLs(), TQDragObject* data = new KURLDrag(m_activeView->selectedURLs(),
widget()); widget());
QApplication::clipboard()->setData(data); TQApplication::tqclipboard()->setData(data);
} }
void Dolphin::copy() void Dolphin::copy()
{ {
m_clipboardContainsCutData = false; m_clipboardContainsCutData = false;
QDragObject* data = new KURLDrag(m_activeView->selectedURLs(), TQDragObject* data = new KURLDrag(m_activeView->selectedURLs(),
widget()); widget());
QApplication::clipboard()->setData(data); TQApplication::tqclipboard()->setData(data);
} }
void Dolphin::paste() void Dolphin::paste()
{ {
QClipboard* clipboard = QApplication::clipboard(); TQClipboard* clipboard = TQApplication::tqclipboard();
QMimeSource* data = clipboard->data(); TQMimeSource* data = clipboard->data();
if (!KURLDrag::canDecode(data)) { if (!KURLDrag::canDecode(data)) {
return; return;
} }
@ -702,9 +702,9 @@ void Dolphin::updatePasteAction()
return; return;
} }
QString text(i18n("Paste")); TQString text(i18n("Paste"));
QClipboard* clipboard = QApplication::clipboard(); TQClipboard* clipboard = TQApplication::tqclipboard();
QMimeSource* data = clipboard->data(); TQMimeSource* data = clipboard->data();
if (KURLDrag::canDecode(data)) { if (KURLDrag::canDecode(data)) {
pasteAction->setEnabled(true); pasteAction->setEnabled(true);
@ -715,7 +715,7 @@ void Dolphin::updatePasteAction()
pasteAction->setText(i18n("Paste 1 File")); pasteAction->setText(i18n("Paste 1 File"));
} }
else { else {
pasteAction->setText(i18n("Paste %1 Files").arg(count)); pasteAction->setText(i18n("Paste %1 Files").tqarg(count));
} }
} }
else { else {
@ -786,9 +786,9 @@ void Dolphin::sortByDate()
void Dolphin::toggleSortOrder() void Dolphin::toggleSortOrder()
{ {
const Qt::SortOrder order = (m_activeView->sortOrder() == Qt::Ascending) ? const TQt::SortOrder order = (m_activeView->sortOrder() == TQt::Ascending) ?
Qt::Descending : TQt::Descending :
Qt::Ascending; TQt::Ascending;
m_activeView->setSortOrder(order); m_activeView->setSortOrder(order);
} }
@ -803,7 +803,7 @@ void Dolphin::toggleSplitView()
m_view[PrimaryIdx]->mode(), m_view[PrimaryIdx]->mode(),
m_view[PrimaryIdx]->isShowHiddenFilesEnabled()); m_view[PrimaryIdx]->isShowHiddenFilesEnabled());
QValueList<int> list = m_splitter->sizes(); TQValueList<int> list = m_splitter->sizes();
assert(!list.isEmpty()); assert(!list.isEmpty());
list.pop_back(); list.pop_back();
list.append(newWidth); list.append(newWidth);
@ -922,7 +922,7 @@ void Dolphin::goHome()
void Dolphin::openTerminal() void Dolphin::openTerminal()
{ {
QString command("konsole --workdir \""); TQString command("konsole --workdir \"");
command.append(m_activeView->url().path()); command.append(m_activeView->url().path());
command.append('\"'); command.append('\"');
@ -931,7 +931,7 @@ void Dolphin::openTerminal()
void Dolphin::findFile() void Dolphin::findFile()
{ {
KRun::run("kfind", m_activeView->url()); KRun::run("ktqfind", m_activeView->url());
} }
void Dolphin::compareFiles() void Dolphin::compareFiles()
@ -980,7 +980,7 @@ void Dolphin::compareFiles()
} }
} }
QString command("kompare -c \""); TQString command("kompare -c \"");
command.append(urlA.prettyURL()); command.append(urlA.prettyURL());
command.append("\" \""); command.append("\" \"");
command.append(urlB.prettyURL()); command.append(urlB.prettyURL());
@ -1005,8 +1005,8 @@ void Dolphin::addUndoOperation(KIO::Job* job)
const int id = job->progressId(); const int id = job->progressId();
// set iterator to the executed command with the current id... // set iterator to the executed command with the current id...
QValueList<UndoInfo>::Iterator it = m_pendingUndoJobs.begin(); TQValueList<UndoInfo>::Iterator it = m_pendingUndoJobs.begin();
const QValueList<UndoInfo>::Iterator end = m_pendingUndoJobs.end(); const TQValueList<UndoInfo>::Iterator end = m_pendingUndoJobs.end();
bool found = false; bool found = false;
while (!found && (it != end)) { while (!found && (it != end)) {
if ((*it).id == id) { if ((*it).id == id) {
@ -1024,7 +1024,7 @@ void Dolphin::addUndoOperation(KIO::Job* job)
// 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, // 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". // then the filenames in the trash are "0-test.txt" and "1-test.txt".
QMap<QString, QString> metaData = job->metaData(); TQMap<TQString, TQString> metaData = job->metaData();
KURL::List newSourceURLs; KURL::List newSourceURLs;
KURL::List sourceURLs = command.source(); KURL::List sourceURLs = command.source();
@ -1032,7 +1032,7 @@ void Dolphin::addUndoOperation(KIO::Job* job)
const KURL::List::Iterator sourceEnd = sourceURLs.end(); const KURL::List::Iterator sourceEnd = sourceURLs.end();
while (sourceIt != sourceEnd) { while (sourceIt != sourceEnd) {
QMap<QString, QString>::ConstIterator metaIt = metaData.find("trashURL-" + (*sourceIt).path()); TQMap<TQString, TQString>::ConstIterator metaIt = metaData.tqfind("trashURL-" + (*sourceIt).path());
if (metaIt != metaData.end()) { if (metaIt != metaData.end()) {
newSourceURLs.append(KURL(metaIt.data())); newSourceURLs.append(KURL(metaIt.data()));
} }
@ -1095,7 +1095,7 @@ void Dolphin::init()
setAcceptDrops(true); setAcceptDrops(true);
m_splitter = new QSplitter(this); m_splitter = new TQSplitter(this);
DolphinSettings& settings = DolphinSettings::instance(); DolphinSettings& settings = DolphinSettings::instance();
@ -1144,9 +1144,9 @@ void Dolphin::init()
stateChanged("new_file"); stateChanged("new_file");
setAutoSaveSettings(); setAutoSaveSettings();
QClipboard* clipboard = QApplication::clipboard(); TQClipboard* clipboard = TQApplication::tqclipboard();
connect(clipboard, SIGNAL(dataChanged()), connect(clipboard, TQT_SIGNAL(dataChanged()),
this, SLOT(updatePasteAction())); this, TQT_SLOT(updatePasteAction()));
updatePasteAction(); updatePasteAction();
updateGoActions(); updateGoActions();
@ -1177,173 +1177,173 @@ void Dolphin::setupActions()
{ {
// setup 'File' menu // setup 'File' menu
KAction* createFolder = new KAction(i18n("Folder..."), "Ctrl+N", KAction* createFolder = new KAction(i18n("Folder..."), "Ctrl+N",
this, SLOT(createFolder()), TQT_TQOBJECT(this), TQT_SLOT(createFolder()),
actionCollection(), "create_folder"); actionCollection(), "create_folder");
createFolder->setIcon("folder"); createFolder->setIcon("folder");
new KAction(i18n("Rename"), KKey(Key_F2), new KAction(i18n("Rename"), KKey(Key_F2),
this, SLOT(rename()), TQT_TQOBJECT(this), TQT_SLOT(rename()),
actionCollection(), "rename"); actionCollection(), "rename");
KAction* moveToTrashAction = new KAction(i18n("Move to Trash"), KKey(Key_Delete), KAction* moveToTrashAction = new KAction(i18n("Move to Trash"), KKey(Key_Delete),
this, SLOT(moveToTrash()), TQT_TQOBJECT(this), TQT_SLOT(moveToTrash()),
actionCollection(), "move_to_trash"); actionCollection(), "move_to_trash");
moveToTrashAction->setIcon("edittrash"); moveToTrashAction->setIcon("edittrash");
KAction* deleteAction = new KAction(i18n("Delete"), "Shift+Delete", KAction* deleteAction = new KAction(i18n("Delete"), "Shift+Delete",
this, SLOT(deleteItems()), TQT_TQOBJECT(this), TQT_SLOT(deleteItems()),
actionCollection(), "delete"); actionCollection(), "delete");
deleteAction->setIcon("editdelete"); deleteAction->setIcon("editdelete");
new KAction(i18n("Propert&ies"), "Alt+Return", new KAction(i18n("Propert&ies"), "Alt+Return",
this, SLOT(properties()), TQT_TQOBJECT(this), TQT_SLOT(properties()),
actionCollection(), "properties"); actionCollection(), "properties");
KStdAction::quit(this, SLOT(quit()), actionCollection()); KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(quit()), actionCollection());
// setup 'Edit' menu // setup 'Edit' menu
UndoManager& undoManager = UndoManager::instance(); UndoManager& undoManager = UndoManager::instance();
KStdAction::undo(&undoManager, KStdAction::undo(&undoManager,
SLOT(undo()), TQT_SLOT(undo()),
actionCollection()); actionCollection());
connect(&undoManager, SIGNAL(undoAvailable(bool)), connect(&undoManager, TQT_SIGNAL(undoAvailable(bool)),
this, SLOT(slotUndoAvailable(bool))); TQT_TQOBJECT(this), TQT_SLOT(slotUndoAvailable(bool)));
connect(&undoManager, SIGNAL(undoTextChanged(const QString&)), connect(&undoManager, TQT_SIGNAL(undoTextChanged(const TQString&)),
this, SLOT(slotUndoTextChanged(const QString&))); TQT_TQOBJECT(this), TQT_SLOT(slotUndoTextChanged(const TQString&)));
KStdAction::redo(&undoManager, KStdAction::redo(&undoManager,
SLOT(redo()), TQT_SLOT(redo()),
actionCollection()); actionCollection());
connect(&undoManager, SIGNAL(redoAvailable(bool)), connect(&undoManager, TQT_SIGNAL(redoAvailable(bool)),
this, SLOT(slotRedoAvailable(bool))); TQT_TQOBJECT(this), TQT_SLOT(slotRedoAvailable(bool)));
connect(&undoManager, SIGNAL(redoTextChanged(const QString&)), connect(&undoManager, TQT_SIGNAL(redoTextChanged(const TQString&)),
this, SLOT(slotRedoTextChanged(const QString&))); TQT_TQOBJECT(this), TQT_SLOT(slotRedoTextChanged(const TQString&)));
KStdAction::cut(this, SLOT(cut()), actionCollection()); KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(cut()), actionCollection());
KStdAction::copy(this, SLOT(copy()), actionCollection()); KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(copy()), actionCollection());
KStdAction::paste(this, SLOT(paste()), actionCollection()); KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(paste()), actionCollection());
new KAction(i18n("Select All"), "Ctrl+A", new KAction(i18n("Select All"), "Ctrl+A",
this, SLOT(selectAll()), TQT_TQOBJECT(this), TQT_SLOT(selectAll()),
actionCollection(), "select_all"); actionCollection(), "select_all");
new KAction(i18n("Invert Selection"), "Ctrl+Shift+A", new KAction(i18n("Invert Selection"), "Ctrl+Shift+A",
this, SLOT(invertSelection()), TQT_TQOBJECT(this), TQT_SLOT(invertSelection()),
actionCollection(), "invert_selection"); actionCollection(), "invert_selection");
// setup 'View' menu // setup 'View' menu
KStdAction::zoomIn(this, KStdAction::zoomIn(TQT_TQOBJECT(this),
SLOT(zoomIn()), TQT_SLOT(zoomIn()),
actionCollection()); actionCollection());
KStdAction::zoomOut(this, KStdAction::zoomOut(TQT_TQOBJECT(this),
SLOT(zoomOut()), TQT_SLOT(zoomOut()),
actionCollection()); actionCollection());
KRadioAction* iconsView = new KRadioAction(i18n("Icons"), "Ctrl+1", KRadioAction* iconsView = new KRadioAction(i18n("Icons"), "Ctrl+1",
this, SLOT(setIconsView()), TQT_TQOBJECT(this), TQT_SLOT(setIconsView()),
actionCollection(), "icons"); actionCollection(), "icons");
iconsView->setExclusiveGroup("view_mode"); iconsView->setExclusiveGroup("view_mode");
iconsView->setIcon("view_icon"); iconsView->setIcon("view_icon");
KRadioAction* detailsView = new KRadioAction(i18n("Details"), "Ctrl+2", KRadioAction* detailsView = new KRadioAction(i18n("Details"), "Ctrl+2",
this, SLOT(setDetailsView()), TQT_TQOBJECT(this), TQT_SLOT(setDetailsView()),
actionCollection(), "details"); actionCollection(), "details");
detailsView->setExclusiveGroup("view_mode"); detailsView->setExclusiveGroup("view_mode");
detailsView->setIcon("view_text"); detailsView->setIcon("view_text");
KRadioAction* previewsView = new KRadioAction(i18n("Previews"), "Ctrl+3", KRadioAction* previewsView = new KRadioAction(i18n("Previews"), "Ctrl+3",
this, SLOT(setPreviewsView()), TQT_TQOBJECT(this), TQT_SLOT(setPreviewsView()),
actionCollection(), "previews"); actionCollection(), "previews");
previewsView->setExclusiveGroup("view_mode"); previewsView->setExclusiveGroup("view_mode");
previewsView->setIcon("gvdirpart"); previewsView->setIcon("gvdirpart");
KRadioAction* sortByName = new KRadioAction(i18n("By Name"), 0, KRadioAction* sortByName = new KRadioAction(i18n("By Name"), 0,
this, SLOT(sortByName()), TQT_TQOBJECT(this), TQT_SLOT(sortByName()),
actionCollection(), "by_name"); actionCollection(), "by_name");
sortByName->setExclusiveGroup("sort"); sortByName->setExclusiveGroup("sort");
KRadioAction* sortBySize = new KRadioAction(i18n("By Size"), 0, KRadioAction* sortBySize = new KRadioAction(i18n("By Size"), 0,
this, SLOT(sortBySize()), TQT_TQOBJECT(this), TQT_SLOT(sortBySize()),
actionCollection(), "by_size"); actionCollection(), "by_size");
sortBySize->setExclusiveGroup("sort"); sortBySize->setExclusiveGroup("sort");
KRadioAction* sortByDate = new KRadioAction(i18n("By Date"), 0, KRadioAction* sortByDate = new KRadioAction(i18n("By Date"), 0,
this, SLOT(sortByDate()), TQT_TQOBJECT(this), TQT_SLOT(sortByDate()),
actionCollection(), "by_date"); actionCollection(), "by_date");
sortByDate->setExclusiveGroup("sort"); sortByDate->setExclusiveGroup("sort");
new KToggleAction(i18n("Descending"), 0, this, SLOT(toggleSortOrder()), new KToggleAction(i18n("Descending"), 0, TQT_TQOBJECT(this), TQT_SLOT(toggleSortOrder()),
actionCollection(), "descending"); actionCollection(), "descending");
new KToggleAction(i18n("Show Hidden Files"), "Alt+.", new KToggleAction(i18n("Show Hidden Files"), "Alt+.",
this, SLOT(showHiddenFiles()), TQT_TQOBJECT(this), TQT_SLOT(showHiddenFiles()),
actionCollection(), "show_hidden_files"); actionCollection(), "show_hidden_files");
KToggleAction* splitAction = new KToggleAction(i18n("Split View"), "F10", KToggleAction* splitAction = new KToggleAction(i18n("Split View"), "F10",
this, SLOT(toggleSplitView()), TQT_TQOBJECT(this), TQT_SLOT(toggleSplitView()),
actionCollection(), "split_view"); actionCollection(), "split_view");
splitAction->setIcon("view_left_right"); splitAction->setIcon("view_left_right");
KAction* reloadAction = new KAction(i18n("Reload"), "F5", KAction* reloadAction = new KAction(i18n("Reload"), "F5",
this, SLOT(reloadView()), TQT_TQOBJECT(this), TQT_SLOT(reloadView()),
actionCollection(), "reload"); actionCollection(), "reload");
reloadAction->setIcon("reload"); reloadAction->setIcon("reload");
KAction* stopAction = new KAction(i18n("Stop"), 0, KAction* stopAction = new KAction(i18n("Stop"), 0,
this, SLOT(stopLoading()), TQT_TQOBJECT(this), TQT_SLOT(stopLoading()),
actionCollection(), "stop"); actionCollection(), "stop");
stopAction->setIcon("stop"); stopAction->setIcon("stop");
new KAction(i18n("Edit Location"), "Ctrl+L", new KAction(i18n("Edit Location"), "Ctrl+L",
this, SLOT(editLocation()), TQT_TQOBJECT(this), TQT_SLOT(editLocation()),
actionCollection(), "edit_location"); actionCollection(), "edit_location");
new KAction(i18n("Browse"), "Ctrl+B", new KAction(i18n("Browse"), "Ctrl+B",
this, SLOT(browse()), TQT_TQOBJECT(this), TQT_SLOT(browse()),
actionCollection(), "browse"); actionCollection(), "browse");
new KToggleAction(i18n("Left Sidebar"), "F8", new KToggleAction(i18n("Left Sidebar"), "F8",
this, SLOT(toggleleftSidebar()), TQT_TQOBJECT(this), TQT_SLOT(toggleleftSidebar()),
actionCollection(), "leftsidebar"); actionCollection(), "leftsidebar");
new KToggleAction(i18n("Right Sidebar"), "F9", new KToggleAction(i18n("Right Sidebar"), "F9",
this, SLOT(togglerightSidebar()), TQT_TQOBJECT(this), TQT_SLOT(togglerightSidebar()),
actionCollection(), "rightsidebar"); actionCollection(), "rightsidebar");
new KAction(i18n("Adjust View Properties..."), 0, new KAction(i18n("Adjust View Properties..."), 0,
this, SLOT(adjustViewProperties()), TQT_TQOBJECT(this), TQT_SLOT(adjustViewProperties()),
actionCollection(), "view_properties"); actionCollection(), "view_properties");
// setup 'Go' menu // setup 'Go' menu
KStdAction::back(this, SLOT(goBack()), actionCollection()); KStdAction::back(TQT_TQOBJECT(this), TQT_SLOT(goBack()), actionCollection());
KStdAction::forward(this, SLOT(goForward()), actionCollection()); KStdAction::forward(TQT_TQOBJECT(this), TQT_SLOT(goForward()), actionCollection());
KStdAction::up(this, SLOT(goUp()), actionCollection()); KStdAction::up(TQT_TQOBJECT(this), TQT_SLOT(goUp()), actionCollection());
KStdAction::home(this, SLOT(goHome()), actionCollection()); KStdAction::home(TQT_TQOBJECT(this), TQT_SLOT(goHome()), actionCollection());
// setup 'Tools' menu // setup 'Tools' menu
KAction* openTerminalAction = new KAction(i18n("Open Terminal"), "F4", KAction* openTerminalAction = new KAction(i18n("Open Terminal"), "F4",
this, SLOT(openTerminal()), TQT_TQOBJECT(this), TQT_SLOT(openTerminal()),
actionCollection(), "open_terminal"); actionCollection(), "open_terminal");
openTerminalAction->setIcon("konsole"); openTerminalAction->setIcon("konsole");
KAction* findFileAction = new KAction(i18n("Find File..."), "Ctrl+F", KAction* findFileAction = new KAction(i18n("Find File..."), "Ctrl+F",
this, SLOT(findFile()), TQT_TQOBJECT(this), TQT_SLOT(findFile()),
actionCollection(), "find_file"); actionCollection(), "find_file");
findFileAction->setIcon("filefind"); findFileAction->setIcon("filetqfind");
new KToggleAction(i18n("Show Filter Bar"), "filter", "/", new KToggleAction(i18n("Show Filter Bar"), "filter", "/",
this, SLOT(showFilterBar()), TQT_TQOBJECT(this), TQT_SLOT(showFilterBar()),
actionCollection(), "show_filter_bar"); actionCollection(), "show_filter_bar");
KAction* compareFilesAction = new KAction(i18n("Compare Files"), 0, KAction* compareFilesAction = new KAction(i18n("Compare Files"), 0,
this, SLOT(compareFiles()), TQT_TQOBJECT(this), TQT_SLOT(compareFiles()),
actionCollection(), "compare_files"); actionCollection(), "compare_files");
compareFilesAction->setIcon("kompare"); compareFilesAction->setIcon("kompare");
compareFilesAction->setEnabled(false); compareFilesAction->setEnabled(false);
// setup 'Settings' menu // setup 'Settings' menu
KStdAction::preferences(this, SLOT(editSettings()), actionCollection()); KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(editSettings()), actionCollection());
} }
void Dolphin::setupCreateNewMenuActions() void Dolphin::setupCreateNewMenuActions()
@ -1354,18 +1354,18 @@ void Dolphin::setupCreateNewMenuActions()
// Copyright (C) 1998, 1999 David Faure <faure@kde.org> // Copyright (C) 1998, 1999 David Faure <faure@kde.org>
// 2003 Sven Leiber <s.leiber@web.de> // 2003 Sven Leiber <s.leiber@web.de>
QStringList files = actionCollection()->instance()->dirs()->findAllResources("templates"); TQStringList files = actionCollection()->instance()->dirs()->findAllResources("templates");
for (QStringList::Iterator it = files.begin() ; it != files.end(); ++it) { for (TQStringList::Iterator it = files.begin() ; it != files.end(); ++it) {
if ((*it)[0] != '.' ) { if ((*it)[0] != '.' ) {
KSimpleConfig config(*it, true); KSimpleConfig config(*it, true);
config.setDesktopGroup(); config.setDesktopGroup();
// tricky solution to ensure that TextFile is at the beginning // tricky solution to ensure that TextFile is at the beginning
// because this filetype is the most used (according kde-core discussion) // because this filetype is the most used (according kde-core discussion)
const QString name(config.readEntry("Name")); const TQString name(config.readEntry("Name"));
QString key(name); TQString key(name);
const QString path(config.readPathEntry("URL")); const TQString path(config.readPathEntry("URL"));
if (!path.endsWith("emptydir")) { if (!path.endsWith("emptydir")) {
if (path.endsWith("TextFile.txt")) { if (path.endsWith("TextFile.txt")) {
key = "1" + key; key = "1" + key;
@ -1383,11 +1383,11 @@ void Dolphin::setupCreateNewMenuActions()
key = "5"; key = "5";
} }
const QString icon(config.readEntry("Icon")); const TQString icon(config.readEntry("Icon"));
const QString comment(config.readEntry("Comment")); const TQString comment(config.readEntry("Comment"));
const QString type(config.readEntry("Type")); const TQString type(config.readEntry("Type"));
const QString filePath(*it); const TQString filePath(*it);
if (type == "Link") { if (type == "Link") {
@ -1404,17 +1404,17 @@ void Dolphin::setupCreateNewMenuActions()
m_createFileTemplates.sort(); m_createFileTemplates.sort();
unplugActionList("create_actions"); unplugActionList("create_actions");
KSortableValueList<CreateFileEntry, QString>::ConstIterator it = m_createFileTemplates.begin(); KSortableValueList<CreateFileEntry, TQString>::ConstIterator it = m_createFileTemplates.begin();
KSortableValueList<CreateFileEntry, QString>::ConstIterator end = m_createFileTemplates.end(); KSortableValueList<CreateFileEntry, TQString>::ConstIterator end = m_createFileTemplates.end();
while (it != end) { while (it != end) {
CreateFileEntry entry = (*it).value(); CreateFileEntry entry = (*it).value();
KAction* action = new KAction(entry.name); KAction* action = new KAction(entry.name);
action->setIcon(entry.icon); action->setIcon(entry.icon);
action->setName((*it).index().ascii()); action->setName((*it).index().ascii());
connect(action, SIGNAL(activated()), connect(action, TQT_SIGNAL(activated()),
this, SLOT(createFile())); this, TQT_SLOT(createFile()));
const QChar section = ((*it).index()[0]); const TQChar section = ((*it).index()[0]);
switch (section) { switch (section) {
case '1': case '1':
case '2': { case '2': {
@ -1450,7 +1450,7 @@ void Dolphin::setupCreateNewMenuActions()
void Dolphin::updateHistory() void Dolphin::updateHistory()
{ {
int index = 0; int index = 0;
const QValueList<URLNavigator::HistoryElem> list = m_activeView->urlHistory(index); const TQValueList<URLNavigator::HistoryElem> list = m_activeView->urlHistory(index);
KAction* backAction = actionCollection()->action("go_back"); KAction* backAction = actionCollection()->action("go_back");
if (backAction != 0) { if (backAction != 0) {
@ -1567,7 +1567,7 @@ void Dolphin::updateViewProperties(const KURL::List& urls)
// use case is not worth the effort, but at least the main widget // use case is not worth the effort, but at least the main widget
// must be disabled and a progress should be shown. // must be disabled and a progress should be shown.
ProgressIndicator progressIndicator(i18n("Updating view properties..."), ProgressIndicator progressIndicator(i18n("Updating view properties..."),
QString::null, TQString(),
urls.count()); urls.count());
KURL::List::ConstIterator end = urls.end(); KURL::List::ConstIterator end = urls.end();
@ -1596,8 +1596,8 @@ void Dolphin::addPendingUndoJob(KIO::Job* job,
const KURL::List& source, const KURL::List& source,
const KURL& dest) const KURL& dest)
{ {
connect(job, SIGNAL(result(KIO::Job*)), connect(job, TQT_SIGNAL(result(KIO::Job*)),
this, SLOT(addUndoOperation(KIO::Job*))); this, TQT_SLOT(addUndoOperation(KIO::Job*)));
UndoInfo undoInfo; UndoInfo undoInfo;
undoInfo.id = job->progressId(); undoInfo.id = job->progressId();
@ -1620,10 +1620,10 @@ void Dolphin::openleftSidebar()
m_leftsidebar = new leftSidebar(m_splitter); m_leftsidebar = new leftSidebar(m_splitter);
m_leftsidebar->show(); m_leftsidebar->show();
connect(m_leftsidebar, SIGNAL(urlChanged(const KURL&)), connect(m_leftsidebar, TQT_SIGNAL(urlChanged(const KURL&)),
this, SLOT(slotURLChangeRequest(const KURL&))); this, TQT_SLOT(slotURLChangeRequest(const KURL&)));
m_splitter->setCollapsible(m_leftsidebar, false); m_splitter->setCollapsible(m_leftsidebar, false);
m_splitter->setResizeMode(m_leftsidebar, QSplitter::KeepSize); m_splitter->setResizeMode(m_leftsidebar, TQSplitter::KeepSize);
m_splitter->moveToFirst(m_leftsidebar); m_splitter->moveToFirst(m_leftsidebar);
leftSidebarSettings* settings = DolphinSettings::instance().leftsidebar(); leftSidebarSettings* settings = DolphinSettings::instance().leftsidebar();
@ -1640,10 +1640,10 @@ void Dolphin::openrightSidebar()
m_rightsidebar = new rightSidebar(m_splitter); m_rightsidebar = new rightSidebar(m_splitter);
m_rightsidebar->show(); m_rightsidebar->show();
connect(m_rightsidebar, SIGNAL(urlChanged(const KURL&)), connect(m_rightsidebar, TQT_SIGNAL(urlChanged(const KURL&)),
this, SLOT(slotURLChangeRequest(const KURL&))); this, TQT_SLOT(slotURLChangeRequest(const KURL&)));
m_splitter->setCollapsible(m_rightsidebar, false); m_splitter->setCollapsible(m_rightsidebar, false);
m_splitter->setResizeMode(m_rightsidebar, QSplitter::KeepSize); m_splitter->setResizeMode(m_rightsidebar, TQSplitter::KeepSize);
m_splitter->moveToLast(m_rightsidebar); m_splitter->moveToLast(m_rightsidebar);
rightSidebarSettings* settings = DolphinSettings::instance().rightsidebar(); rightSidebarSettings* settings = DolphinSettings::instance().rightsidebar();

@ -28,9 +28,9 @@
#include <kapplication.h> #include <kapplication.h>
#include <kmainwindow.h> #include <kmainwindow.h>
#include <qvaluelist.h> #include <tqvaluelist.h>
#include <qptrlist.h> #include <tqptrlist.h>
#include <qstring.h> #include <tqstring.h>
#include <ksortablevaluelist.h> #include <ksortablevaluelist.h>
#include "dolphinview.h" #include "dolphinview.h"
@ -38,11 +38,11 @@
class KPrinter; class KPrinter;
class KURL; class KURL;
class QLineEdit; class TQLineEdit;
class KFileIconView; class KFileIconView;
class QHBox; class TQHBox;
class QIconViewItem; class TQIconViewItem;
class QSplitter; class TQSplitter;
class KAction; class KAction;
class URLNavigator; class URLNavigator;
class leftSidebar; class leftSidebar;
@ -58,6 +58,7 @@ class rightSidebar;
class Dolphin : public KMainWindow class Dolphin : public KMainWindow
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
/** /**
@ -107,9 +108,9 @@ public:
* of the 'Create New...' sub menu. Usually the list contains actions * of the 'Create New...' sub menu. Usually the list contains actions
* for creating folders, text files, HTML files etc. * for creating folders, text files, HTML files etc.
*/ */
const QPtrList<KAction>& fileGroupActions() const { return m_fileGroupActions; } const TQPtrList<KAction>& fileGroupActions() const { return m_fileGroupActions; }
//const QPtrList<KAction>& linkGroupActions() const { return m_linkGroupActions; } //const TQPtrList<KAction>& linkGroupActions() const { return m_linkGroupActions; }
//const QPtrList<KAction>& linkToDeviceActions() const { return m_linkToDeviceActions; } //const TQPtrList<KAction>& linkToDeviceActions() const { return m_linkToDeviceActions; }
/** /**
* Refreshs the views of the main window by recreating them dependent from * Refreshs the views of the main window by recreating them dependent from
@ -161,14 +162,14 @@ public slots:
void slotSortingChanged(DolphinView::Sorting sorting); void slotSortingChanged(DolphinView::Sorting sorting);
/** Updates the state of the 'Sort Ascending/Descending' action. */ /** Updates the state of the 'Sort Ascending/Descending' action. */
void slotSortOrderChanged(Qt::SortOrder order); void slotSortOrderChanged(TQt::SortOrder order);
/** Updates the state of the 'Edit' menu actions. */ /** Updates the state of the 'Edit' menu actions. */
void slotSelectionChanged(); void slotSelectionChanged();
protected: protected:
/** @see QMainWindow::closeEvent */ /** @see TQMainWindow::closeEvent */
virtual void closeEvent(QCloseEvent* event); virtual void closeEvent(TQCloseEvent* event);
/** /**
* This method is called when it is time for the app to save its * This method is called when it is time for the app to save its
@ -228,7 +229,7 @@ private slots:
void slotUndoAvailable(bool available); void slotUndoAvailable(bool available);
/** Sets the text of the 'Undo' menu action to \a text. */ /** Sets the text of the 'Undo' menu action to \a text. */
void slotUndoTextChanged(const QString& text); void slotUndoTextChanged(const TQString& text);
/** /**
* Updates the state of the 'Redo' menu action dependent * Updates the state of the 'Redo' menu action dependent
@ -237,7 +238,7 @@ private slots:
void slotRedoAvailable(bool available); void slotRedoAvailable(bool available);
/** Sets the text of the 'Redo' menu action to \a text. */ /** Sets the text of the 'Redo' menu action to \a text. */
void slotRedoTextChanged(const QString& text); void slotRedoTextChanged(const TQString& text);
/** /**
* Copies all selected items to the clipboard and marks * Copies all selected items to the clipboard and marks
@ -398,7 +399,7 @@ private:
void openleftSidebar(); void openleftSidebar();
void openrightSidebar(); void openrightSidebar();
QSplitter* m_splitter; TQSplitter* m_splitter;
leftSidebar* m_leftsidebar; leftSidebar* m_leftsidebar;
rightSidebar* m_rightsidebar; rightSidebar* m_rightsidebar;
DolphinView* m_activeView; DolphinView* m_activeView;
@ -431,25 +432,25 @@ private:
int id; int id;
DolphinCommand command; DolphinCommand command;
}; };
QValueList<UndoInfo> m_pendingUndoJobs; TQValueList<UndoInfo> m_pendingUndoJobs;
/** Contains meta information for creating files. */ /** Contains meta information for creating files. */
struct CreateFileEntry struct CreateFileEntry
{ {
QString name; TQString name;
QString filePath; TQString filePath;
QString templatePath; TQString templatePath;
QString icon; TQString icon;
QString comment; TQString comment;
}; };
QPtrList<KAction> m_fileGroupActions; TQPtrList<KAction> m_fileGroupActions;
KSortableValueList<CreateFileEntry,QString> m_createFileTemplates; KSortableValueList<CreateFileEntry,TQString> m_createFileTemplates;
// TODO: not used yet. See documentation of Dolphin::linkGroupActions() // TODO: not used yet. See documentation of Dolphin::linkGroupActions()
// and Dolphin::linkToDeviceActions() in for details. // and Dolphin::linkToDeviceActions() in for details.
//QPtrList<KAction> m_linkGroupActions; //TQPtrList<KAction> m_linkGroupActions;
//QPtrList<KAction> m_linkToDeviceActions; //TQPtrList<KAction> m_linkToDeviceActions;
}; };
#endif // _DOLPHIN_H_ #endif // _DOLPHIN_H_

@ -26,7 +26,7 @@
#include <ktrader.h> #include <ktrader.h>
#include <klocale.h> #include <klocale.h>
#include <krun.h> #include <krun.h>
#include <qdir.h> #include <tqdir.h>
#include <kglobal.h> #include <kglobal.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
#include <kiconloader.h> #include <kiconloader.h>
@ -44,10 +44,10 @@
#include "dolphinsettings.h" #include "dolphinsettings.h"
DolphinContextMenu::DolphinContextMenu(DolphinView* parent, DolphinContextMenu::DolphinContextMenu(DolphinView* tqparent,
KFileItem* fileInfo, KFileItem* fileInfo,
const QPoint& pos) : const TQPoint& pos) :
m_dolphinView(parent), m_dolphinView(tqparent),
m_fileInfo(fileInfo), m_fileInfo(fileInfo),
m_pos(pos) m_pos(pos)
{ {
@ -93,7 +93,7 @@ void DolphinContextMenu::openViewportContextMenu()
KAction* action = 0; KAction* action = 0;
QPtrListIterator<KAction> fileGrouptIt(dolphin.fileGroupActions()); TQPtrListIterator<KAction> fileGrouptIt(dolphin.fileGroupActions());
while ((action = fileGrouptIt.current()) != 0) { while ((action = fileGrouptIt.current()) != 0) {
action->plug(createNewMenu); action->plug(createNewMenu);
++fileGrouptIt; ++fileGrouptIt;
@ -104,14 +104,14 @@ void DolphinContextMenu::openViewportContextMenu()
// //
//createNewMenu->insertSeparator(); //createNewMenu->insertSeparator();
// //
//QPtrListIterator<KAction> linkGroupIt(dolphin.linkGroupActions()); //TQPtrListIterator<KAction> linkGroupIt(dolphin.linkGroupActions());
//while ((action = linkGroupIt.current()) != 0) { //while ((action = linkGroupIt.current()) != 0) {
// action->plug(createNewMenu); // action->plug(createNewMenu);
// ++linkGroupIt; // ++linkGroupIt;
//} //}
// //
//KPopupMenu* linkToDeviceMenu = new KPopupMenu(); //KPopupMenu* linkToDeviceMenu = new KPopupMenu();
//QPtrListIterator<KAction> linkToDeviceIt(dolphin.linkToDeviceActions()); //TQPtrListIterator<KAction> linkToDeviceIt(dolphin.linkToDeviceActions());
//while ((action = linkToDeviceIt.current()) != 0) { //while ((action = linkToDeviceIt.current()) != 0) {
// action->plug(linkToDeviceMenu); // action->plug(linkToDeviceMenu);
// ++linkToDeviceIt; // ++linkToDeviceIt;
@ -231,11 +231,11 @@ void DolphinContextMenu::openItemContextMenu()
popup->insertSeparator(); popup->insertSeparator();
// Insert 'Open With...' sub menu // Insert 'Open With...' sub menu
QValueVector<KService::Ptr> openWithVector; TQValueVector<KService::Ptr> openWithVector;
const int openWithID = insertOpenWithItems(popup, openWithVector); const int openWithID = insertOpenWithItems(popup, openWithVector);
// Insert 'Actions' sub menu // Insert 'Actions' sub menu
QValueVector<KDEDesktopMimeType::Service> actionsVector; TQValueVector<KDEDesktopMimeType::Service> actionsVector;
insertActionItems(popup, actionsVector); insertActionItems(popup, actionsVector);
// insert 'Properties...' entry // insert 'Properties...' entry
@ -283,7 +283,7 @@ void DolphinContextMenu::openItemContextMenu()
} }
int DolphinContextMenu::insertOpenWithItems(KPopupMenu* popup, int DolphinContextMenu::insertOpenWithItems(KPopupMenu* popup,
QValueVector<KService::Ptr>& openWithVector) TQValueVector<KService::Ptr>& openWithVector)
{ {
// Prepare 'Open With' sub menu. Usually a sub menu is created, where all applications // Prepare 'Open With' sub menu. Usually a sub menu is created, where all applications
// are listed which are registered to open the item. As last entry "Other..." will be // are listed which are registered to open the item. As last entry "Other..." will be
@ -293,7 +293,7 @@ int DolphinContextMenu::insertOpenWithItems(KPopupMenu* popup,
assert(list != 0); assert(list != 0);
bool insertOpenWithItems = true; bool insertOpenWithItems = true;
const QString contextMimeType(m_fileInfo->mimetype()); const TQString contextMimeType(m_fileInfo->mimetype());
KFileItemListIterator mimeIt(*list); KFileItemListIterator mimeIt(*list);
KFileItem* item = 0; KFileItem* item = 0;
while (insertOpenWithItems && ((item = mimeIt.current()) != 0)) { while (insertOpenWithItems && ((item = mimeIt.current()) != 0)) {
@ -317,7 +317,7 @@ int DolphinContextMenu::insertOpenWithItems(KPopupMenu* popup,
// application entries. Although this seems to be a configuration // application entries. Although this seems to be a configuration
// problem outside the scope of Dolphin, duplicated entries just // problem outside the scope of Dolphin, duplicated entries just
// will be skipped here. // will be skipped here.
const QString appName((*it)->name()); const TQString appName((*it)->name());
if (!containsEntry(openWithMenu, appName)) { if (!containsEntry(openWithMenu, appName)) {
openWithMenu->insertItem((*it)->pixmap(KIcon::Small), openWithMenu->insertItem((*it)->pixmap(KIcon::Small),
appName, index); appName, index);
@ -351,25 +351,25 @@ int DolphinContextMenu::insertOpenWithItems(KPopupMenu* popup,
} }
void DolphinContextMenu::insertActionItems(KPopupMenu* popup, void DolphinContextMenu::insertActionItems(KPopupMenu* popup,
QValueVector<KDEDesktopMimeType::Service>& actionsVector) TQValueVector<KDEDesktopMimeType::Service>& actionsVector)
{ {
KPopupMenu* actionsMenu = new KPopupMenu(); KPopupMenu* actionsMenu = new KPopupMenu();
int actionsIndex = 0; int actionsIndex = 0;
QStringList dirs = KGlobal::dirs()->findDirs("data", "d3lphin/servicemenus/"); TQStringList dirs = KGlobal::dirs()->findDirs("data", "d3lphin/servicemenus/");
KPopupMenu* menu = 0; KPopupMenu* menu = 0;
for (QStringList::ConstIterator dirIt = dirs.begin(); dirIt != dirs.end(); ++dirIt) { for (TQStringList::ConstIterator dirIt = dirs.begin(); dirIt != dirs.end(); ++dirIt) {
QDir dir(*dirIt); TQDir dir(*dirIt);
QStringList entries = dir.entryList("*.desktop", QDir::Files); TQStringList entries = dir.entryList("*.desktop", TQDir::Files);
for (QStringList::ConstIterator entryIt = entries.begin(); entryIt != entries.end(); ++entryIt) { for (TQStringList::ConstIterator entryIt = entries.begin(); entryIt != entries.end(); ++entryIt) {
KSimpleConfig cfg(*dirIt + *entryIt, true); KSimpleConfig cfg(*dirIt + *entryIt, true);
cfg.setDesktopGroup(); cfg.setDesktopGroup();
if ((cfg.hasKey("Actions") || cfg.hasKey("X-KDE-GetActionMenu")) && cfg.hasKey("ServiceTypes")) { if ((cfg.hasKey("Actions") || cfg.hasKey("X-KDE-GetActionMenu")) && cfg.hasKey("ServiceTypes")) {
const QStringList types = cfg.readListEntry("ServiceTypes"); const TQStringList types = cfg.readListEntry("ServiceTypes");
for (QStringList::ConstIterator it = types.begin(); it != types.end(); ++it) { for (TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it) {
// check whether the mime type is equal or whether the // check whether the mime type is equal or whether the
// mimegroup (e. g. image/*) is supported // mimegroup (e. g. image/*) is supported
@ -400,12 +400,12 @@ void DolphinContextMenu::insertActionItems(KPopupMenu* popup,
KFileItem* item = 0; KFileItem* item = 0;
insert = true; insert = true;
while (insert && ((item = mimeIt.current()) != 0)) { while (insert && ((item = mimeIt.current()) != 0)) {
const QString mimeType((*mimeIt)->mimetype()); const TQString mimeType((*mimeIt)->mimetype());
const QString mimeGroup(mimeType.left(mimeType.find('/'))); const TQString mimeGroup(mimeType.left(mimeType.tqfind('/')));
insert = (*it == mimeType) || insert = (*it == mimeType) ||
((*it).right(1) == "*") && ((*it).right(1) == "*") &&
((*it).left((*it).find('/')) == mimeGroup); ((*it).left((*it).tqfind('/')) == mimeGroup);
++mimeIt; ++mimeIt;
} }
} }
@ -413,16 +413,16 @@ void DolphinContextMenu::insertActionItems(KPopupMenu* popup,
if (insert) { if (insert) {
menu = actionsMenu; menu = actionsMenu;
const QString submenuName = cfg.readEntry( "X-KDE-Submenu" ); const TQString submenuName = cfg.readEntry( "X-KDE-Submenu" );
if (!submenuName.isEmpty()) { if (!submenuName.isEmpty()) {
menu = new KPopupMenu(); menu = new KPopupMenu();
actionsMenu->insertItem(submenuName, menu, submenuID); actionsMenu->insertItem(submenuName, menu, submenuID);
} }
QValueList<KDEDesktopMimeType::Service> userServices = TQValueList<KDEDesktopMimeType::Service> userServices =
KDEDesktopMimeType::userDefinedServices(*dirIt + *entryIt, true); KDEDesktopMimeType::userDefinedServices(*dirIt + *entryIt, true);
QValueList<KDEDesktopMimeType::Service>::Iterator serviceIt; TQValueList<KDEDesktopMimeType::Service>::Iterator serviceIt;
for (serviceIt = userServices.begin(); serviceIt != userServices.end(); ++serviceIt) { for (serviceIt = userServices.begin(); serviceIt != userServices.end(); ++serviceIt) {
KDEDesktopMimeType::Service service = (*serviceIt); KDEDesktopMimeType::Service service = (*serviceIt);
if (!service.m_strIcon.isEmpty()) { if (!service.m_strIcon.isEmpty()) {
@ -456,8 +456,8 @@ void DolphinContextMenu::insertActionItems(KPopupMenu* popup,
if (menu == actionsMenu) { if (menu == actionsMenu) {
// The item is an action, hence show the action in the root menu. // The item is an action, hence show the action in the root menu.
const int id = actionsMenu->idAt(0); const int id = actionsMenu->idAt(0);
const QString text(actionsMenu->text(id)); const TQString text(actionsMenu->text(id));
const QIconSet* iconSet = actionsMenu->iconSet(id); const TQIconSet* iconSet = actionsMenu->iconSet(id);
if (iconSet == 0) { if (iconSet == 0) {
popup->insertItem(text, id); popup->insertItem(text, id);
} }
@ -478,7 +478,7 @@ void DolphinContextMenu::insertActionItems(KPopupMenu* popup,
} }
bool DolphinContextMenu::containsEntry(const KPopupMenu* menu, bool DolphinContextMenu::containsEntry(const KPopupMenu* menu,
const QString& entryName) const const TQString& entryName) const
{ {
assert(menu != 0); assert(menu != 0);

@ -22,18 +22,18 @@
#define DOLPHINCONTEXTMENU_H #define DOLPHINCONTEXTMENU_H
#include <kpopupmenu.h> #include <kpopupmenu.h>
#include <qpoint.h> #include <tqpoint.h>
#include <qstring.h> #include <tqstring.h>
#include <qvaluelist.h> #include <tqvaluelist.h>
#include <kmountpoint.h> #include <kmountpoint.h>
#include <qvaluevector.h> #include <tqvaluevector.h>
#include <kservice.h> #include <kservice.h>
#include <kpropertiesdialog.h> #include <kpropertiesdialog.h>
class KPopupMenu; class KPopupMenu;
class KFileItem; class KFileItem;
class QPoint; class TQPoint;
class QWidget; class TQWidget;
class DolphinView; class DolphinView;
/** /**
@ -54,16 +54,16 @@ class DolphinContextMenu
{ {
public: public:
/** /**
* @parent Pointer to the dolphin view the context menu * @tqparent Pointer to the dolphin view the context menu
* belongs to. * belongs to.
* @fileInfo Pointer to the file item the context menu * @fileInfo Pointer to the file item the context menu
* is applied. If 0 is passed, the context menu * is applied. If 0 is passed, the context menu
* is above the viewport. * is above the viewport.
* @pos Position of the upper left edge of the context menu. * @pos Position of the upper left edge of the context menu.
*/ */
DolphinContextMenu(DolphinView* parent, DolphinContextMenu(DolphinView* tqparent,
KFileItem* fileInfo, KFileItem* fileInfo,
const QPoint& pos); const TQPoint& pos);
virtual ~DolphinContextMenu(); virtual ~DolphinContextMenu();
@ -85,7 +85,7 @@ private:
* to the predecessor. * to the predecessor.
*/ */
int insertOpenWithItems(KPopupMenu* popup, int insertOpenWithItems(KPopupMenu* popup,
QValueVector<KService::Ptr>& openWithVector); TQValueVector<KService::Ptr>& openWithVector);
/** /**
* Inserts the 'Actions...' submenu to \a popup. * Inserts the 'Actions...' submenu to \a popup.
@ -95,14 +95,14 @@ private:
* services. * services.
*/ */
void insertActionItems(KPopupMenu* popup, void insertActionItems(KPopupMenu* popup,
QValueVector<KDEDesktopMimeType::Service>& actionsVector); TQValueVector<KDEDesktopMimeType::Service>& actionsVector);
/** /**
* Returns true, if 'menu' contains already * Returns true, if 'menu' contains already
* an entry with the name 'entryName'. * an entry with the name 'entryName'.
*/ */
bool containsEntry(const KPopupMenu* menu, bool containsEntry(const KPopupMenu* menu,
const QString& entryName) const; const TQString& entryName) const;
enum { enum {
restoreID = 80, restoreID = 80,
@ -115,15 +115,15 @@ private:
DolphinView* m_dolphinView; DolphinView* m_dolphinView;
KFileItem* m_fileInfo; KFileItem* m_fileInfo;
QPoint m_pos; TQPoint m_pos;
struct Entry { struct Entry {
int type; int type;
QString name; TQString name;
QString filePath; // empty for separator TQString filePath; // empty for separator
QString templatePath; // same as filePath for template TQString templatePath; // same as filePath for template
QString icon; TQString icon;
QString comment; TQString comment;
}; };
}; };

@ -21,16 +21,16 @@
#include "dolphindetailsview.h" #include "dolphindetailsview.h"
#include <kurldrag.h> #include <kurldrag.h>
#include <qpainter.h> #include <tqpainter.h>
#include <qobjectlist.h> #include <tqobjectlist.h>
#include <qheader.h> #include <tqheader.h>
#include <qclipboard.h> #include <tqclipboard.h>
#include <qpainter.h> #include <tqpainter.h>
#include <klocale.h> #include <klocale.h>
#include <kglobalsettings.h> #include <kglobalsettings.h>
#include <qscrollbar.h> #include <tqscrollbar.h>
#include <qcursor.h> #include <tqcursor.h>
#include <qstyle.h> #include <tqstyle.h>
#include <assert.h> #include <assert.h>
#include "dolphinview.h" #include "dolphinview.h"
@ -41,55 +41,55 @@
#include "dolphinstatusbar.h" #include "dolphinstatusbar.h"
#include "dolphindetailsviewsettings.h" #include "dolphindetailsviewsettings.h"
DolphinDetailsView::DolphinDetailsView(DolphinView* parent) : DolphinDetailsView::DolphinDetailsView(DolphinView* tqparent) :
KFileDetailView(parent, 0), KFileDetailView(tqparent, 0),
m_dolphinView(parent), m_dolphinView(tqparent),
m_resizeTimer(0), m_resizeTimer(0),
m_scrollTimer(0), m_scrollTimer(0),
m_rubber(0) m_rubber(0)
{ {
m_resizeTimer = new QTimer(this); m_resizeTimer = new TQTimer(this);
connect(m_resizeTimer, SIGNAL(timeout()), connect(m_resizeTimer, TQT_SIGNAL(timeout()),
this, SLOT(updateColumnsWidth())); this, TQT_SLOT(updateColumnsWidth()));
setAcceptDrops(true); setAcceptDrops(true);
setSelectionMode(KFile::Extended); setSelectionMode(KFile::Extended);
setHScrollBarMode(QScrollView::AlwaysOff); setHScrollBarMode(TQScrollView::AlwaysOff);
setColumnAlignment(SizeColumn, Qt::AlignRight); setColumnAlignment(SizeColumn, TQt::AlignRight);
for (int i = DateColumn; i <= GroupColumn; ++i) { for (int i = DateColumn; i <= GroupColumn; ++i) {
setColumnAlignment(i, Qt::AlignHCenter); setColumnAlignment(i, TQt::AlignHCenter);
} }
Dolphin& dolphin = Dolphin::mainWin(); Dolphin& dolphin = Dolphin::mainWin();
connect(this, SIGNAL(onItem(QListViewItem*)), connect(this, TQT_SIGNAL(onItem(TQListViewItem*)),
this, SLOT(slotOnItem(QListViewItem*))); this, TQT_SLOT(slotOnItem(TQListViewItem*)));
connect(this, SIGNAL(onViewport()), connect(this, TQT_SIGNAL(onViewport()),
this, SLOT(slotOnViewport())); this, TQT_SLOT(slotOnViewport()));
connect(this, SIGNAL(contextMenuRequested(QListViewItem*, const QPoint&, int)), connect(this, TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint&, int)),
this, SLOT(slotContextMenuRequested(QListViewItem*, const QPoint&, int))); this, TQT_SLOT(slotContextMenuRequested(TQListViewItem*, const TQPoint&, int)));
connect(this, SIGNAL(selectionChanged()), connect(this, TQT_SIGNAL(selectionChanged()),
&dolphin, SLOT(slotSelectionChanged())); &dolphin, TQT_SLOT(slotSelectionChanged()));
connect(&dolphin, SIGNAL(activeViewChanged()), connect(&dolphin, TQT_SIGNAL(activeViewChanged()),
this, SLOT(slotActivationUpdate())); this, TQT_SLOT(slotActivationUpdate()));
connect(this, SIGNAL(itemRenamed(QListViewItem*, const QString&, int)), connect(this, TQT_SIGNAL(itemRenamed(TQListViewItem*, const TQString&, int)),
this, SLOT(slotItemRenamed(QListViewItem*, const QString&, int))); this, TQT_SLOT(slotItemRenamed(TQListViewItem*, const TQString&, int)));
connect(this, SIGNAL(dropped(QDropEvent*, const KURL::List&, const KURL&)), connect(this, TQT_SIGNAL(dropped(TQDropEvent*, const KURL::List&, const KURL&)),
parent, SLOT(slotURLListDropped(QDropEvent*, const KURL::List&, const KURL&))); tqparent, TQT_SLOT(slotURLListDropped(TQDropEvent*, const KURL::List&, const KURL&)));
QClipboard* clipboard = QApplication::clipboard(); TQClipboard* clipboard = TQApplication::tqclipboard();
connect(clipboard, SIGNAL(dataChanged()), connect(clipboard, TQT_SIGNAL(dataChanged()),
this, SLOT(slotUpdateDisabledItems())); this, TQT_SLOT(slotUpdateDisabledItems()));
QHeader* viewHeader = header(); TQHeader* viewHeader = header();
viewHeader->setResizeEnabled(false); viewHeader->setResizeEnabled(false);
viewHeader->setMovingEnabled(false); viewHeader->setMovingEnabled(false);
connect(viewHeader, SIGNAL(clicked(int)), connect(viewHeader, TQT_SIGNAL(clicked(int)),
this, SLOT(slotHeaderClicked(int))); this, TQT_SLOT(slotHeaderClicked(int)));
setMouseTracking(true); setMouseTracking(true);
setDefaultRenameAction(QListView::Accept); setDefaultRenameAction(TQListView::Accept);
refreshSettings(); refreshSettings();
} }
@ -117,7 +117,7 @@ void DolphinDetailsView::endItemUpdates()
} }
int index = 0; int index = 0;
const QValueList<URLNavigator::HistoryElem> history = m_dolphinView->urlHistory(index); const TQValueList<URLNavigator::HistoryElem> history = m_dolphinView->urlHistory(index);
if (!history.isEmpty()) { if (!history.isEmpty()) {
KFileView* fileView = static_cast<KFileView*>(this); KFileView* fileView = static_cast<KFileView*>(this);
fileView->setCurrentItem(history[index].currentFileName()); fileView->setCurrentItem(history[index].currentFileName());
@ -131,15 +131,15 @@ void DolphinDetailsView::insertItem(KFileItem* fileItem)
{ {
KFileView::insertItem(fileItem); KFileView::insertItem(fileItem);
DolphinListViewItem* item = new DolphinListViewItem(static_cast<QListView*>(this), fileItem); DolphinListViewItem* item = new DolphinListViewItem(static_cast<TQListView*>(this), fileItem);
QDir::SortSpec spec = KFileView::sorting(); TQDir::SortSpec spec = KFileView::sorting();
if (spec & QDir::Time) { if (spec & TQDir::Time) {
item->setKey(sortingKey(fileItem->time(KIO::UDS_MODIFICATION_TIME), item->setKey(sortingKey(fileItem->time(KIO::UDS_MODIFICATION_TIME),
fileItem->isDir(), fileItem->isDir(),
spec)); spec));
} }
else if (spec & QDir::Size) { else if (spec & TQDir::Size) {
item->setKey(sortingKey(fileItem->size(), fileItem->isDir(), spec)); item->setKey(sortingKey(fileItem->size(), fileItem->isDir(), spec));
} }
else { else {
@ -149,9 +149,9 @@ void DolphinDetailsView::insertItem(KFileItem* fileItem)
fileItem->setExtraData(this, item); fileItem->setExtraData(this, item);
} }
bool DolphinDetailsView::isOnFilename(const QListViewItem* item, const QPoint& pos) const bool DolphinDetailsView::isOnFilename(const TQListViewItem* item, const TQPoint& pos) const
{ {
const QPoint absPos(mapToGlobal(QPoint(0, 0))); const TQPoint absPos(mapToGlobal(TQPoint(0, 0)));
return (pos.x() - absPos.x()) <= filenameWidth(item); return (pos.x() - absPos.x()) <= filenameWidth(item);
} }
@ -166,7 +166,7 @@ void DolphinDetailsView::refreshSettings()
} }
} }
QFont adjustedFont(font()); TQFont adjustedFont(font());
adjustedFont.setFamily(settings->fontFamily()); adjustedFont.setFamily(settings->fontFamily());
adjustedFont.setPointSize(settings->fontSize()); adjustedFont.setPointSize(settings->fontSize());
setFont(adjustedFont); setFont(adjustedFont);
@ -224,9 +224,9 @@ void DolphinDetailsView::resizeContents(int width, int height)
m_resizeTimer->start(50, true); m_resizeTimer->start(50, true);
} }
void DolphinDetailsView::slotOnItem(QListViewItem* item) void DolphinDetailsView::slotOnItem(TQListViewItem* item)
{ {
if (isOnFilename(item, QCursor::pos())) { if (isOnFilename(item, TQCursor::pos())) {
activateItem(item); activateItem(item);
KFileItem* fileItem = static_cast<KFileListViewItem*>(item)->fileInfo(); KFileItem* fileItem = static_cast<KFileListViewItem*>(item)->fileInfo();
m_dolphinView->requestItemInfo(fileItem->url()); m_dolphinView->requestItemInfo(fileItem->url());
@ -243,12 +243,12 @@ void DolphinDetailsView::slotOnViewport()
} }
void DolphinDetailsView::setContextPixmap(void* context, void DolphinDetailsView::setContextPixmap(void* context,
const QPixmap& pixmap) const TQPixmap& pixmap)
{ {
reinterpret_cast<KFileListViewItem*>(context)->setPixmap(0, pixmap); reinterpret_cast<KFileListViewItem*>(context)->setPixmap(0, pixmap);
} }
const QPixmap* DolphinDetailsView::contextPixmap(void* context) const TQPixmap* DolphinDetailsView::contextPixmap(void* context)
{ {
return reinterpret_cast<KFileListViewItem*>(context)->pixmap(0); return reinterpret_cast<KFileListViewItem*>(context)->pixmap(0);
} }
@ -270,7 +270,7 @@ KFileItem* DolphinDetailsView::contextFileInfo(void* context)
} }
void DolphinDetailsView::contentsDragMoveEvent(QDragMoveEvent* event) void DolphinDetailsView::contentsDragMoveEvent(TQDragMoveEvent* event)
{ {
KFileDetailView::contentsDragMoveEvent(event); KFileDetailView::contentsDragMoveEvent(event);
@ -292,7 +292,7 @@ void DolphinDetailsView::contentsDragMoveEvent(QDragMoveEvent* event)
} }
} }
void DolphinDetailsView::resizeEvent(QResizeEvent* event) void DolphinDetailsView::resizeEvent(TQResizeEvent* event)
{ {
KFileDetailView::resizeEvent(event); KFileDetailView::resizeEvent(event);
@ -304,14 +304,14 @@ void DolphinDetailsView::resizeEvent(QResizeEvent* event)
m_resizeTimer->start(50, true); m_resizeTimer->start(50, true);
} }
bool DolphinDetailsView::acceptDrag(QDropEvent* event) const bool DolphinDetailsView::acceptDrag(TQDropEvent* event) const
{ {
bool accept = KURLDrag::canDecode(event) && bool accept = KURLDrag::canDecode(event) &&
(event->action() == QDropEvent::Copy || (event->action() == TQDropEvent::Copy ||
event->action() == QDropEvent::Move || event->action() == TQDropEvent::Move ||
event->action() == QDropEvent::Link); event->action() == TQDropEvent::Link);
if (accept) { if (accept) {
if (static_cast<const QWidget*>(event->source()) == this) { if (static_cast<const TQWidget*>(event->source()) == this) {
KFileListViewItem* item = static_cast<KFileListViewItem*>(itemAt(event->pos())); KFileListViewItem* item = static_cast<KFileListViewItem*>(itemAt(event->pos()));
accept = (item != 0); accept = (item != 0);
if (accept) { if (accept) {
@ -324,15 +324,15 @@ bool DolphinDetailsView::acceptDrag(QDropEvent* event) const
return accept; return accept;
} }
void DolphinDetailsView::contentsDropEvent(QDropEvent* event) void DolphinDetailsView::contentsDropEvent(TQDropEvent* event)
{ {
// KFileDetailView::contentsDropEvent does not care whether the mouse // KFileDetailView::contentsDropEvent does not care whether the mouse
// cursor is above a filename or not, the destination URL is always // 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 // 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. // URL is only the URL of the item if the cursor is above the filename.
const QPoint pos(QCursor::pos()); const TQPoint pos(TQCursor::pos());
const QPoint viewportPos(viewport()->mapToGlobal(QPoint(0, 0))); const TQPoint viewportPos(viewport()->mapToGlobal(TQPoint(0, 0)));
QListViewItem* item = itemAt(QPoint(pos.x() - viewportPos.x(), pos.y() - viewportPos.y())); TQListViewItem* item = itemAt(TQPoint(pos.x() - viewportPos.x(), pos.y() - viewportPos.y()));
if ((item == 0) || ((item != 0) && isOnFilename(item, pos))) { if ((item == 0) || ((item != 0) && isOnFilename(item, pos))) {
// dropping is done on the viewport or directly above a filename // dropping is done on the viewport or directly above a filename
KFileDetailView::contentsDropEvent(event); KFileDetailView::contentsDropEvent(event);
@ -360,7 +360,7 @@ void DolphinDetailsView::contentsDropEvent(QDropEvent* event)
} }
} }
void DolphinDetailsView::contentsMousePressEvent(QMouseEvent* event) void DolphinDetailsView::contentsMousePressEvent(TQMouseEvent* event)
{ {
if (m_rubber != 0) { if (m_rubber != 0) {
drawRubber(); drawRubber();
@ -372,9 +372,9 @@ void DolphinDetailsView::contentsMousePressEvent(QMouseEvent* event)
// if the mouse cursor is not above the filename. This prevents // if the mouse cursor is not above the filename. This prevents
// that the item gets selected and simulates an equal usability // that the item gets selected and simulates an equal usability
// like in the icon view. // like in the icon view.
const QPoint pos(QCursor::pos()); const TQPoint pos(TQCursor::pos());
const QPoint viewportPos(viewport()->mapToGlobal(QPoint(0, 0))); const TQPoint viewportPos(viewport()->mapToGlobal(TQPoint(0, 0)));
QListViewItem* item = itemAt(QPoint(pos.x() - viewportPos.x(), pos.y() - viewportPos.y())); TQListViewItem* item = itemAt(TQPoint(pos.x() - viewportPos.x(), pos.y() - viewportPos.y()));
if ((item != 0) && isOnFilename(item, pos)) { if ((item != 0) && isOnFilename(item, pos)) {
KFileDetailView::contentsMousePressEvent(event); KFileDetailView::contentsMousePressEvent(event);
} }
@ -387,7 +387,7 @@ void DolphinDetailsView::contentsMousePressEvent(QMouseEvent* event)
} }
assert(m_rubber == 0); assert(m_rubber == 0);
m_rubber = new QRect(event->x(), event->y(), 0, 0); m_rubber = new TQRect(event->x(), event->y(), 0, 0);
} }
resetActivatedItem(); resetActivatedItem();
@ -396,7 +396,7 @@ void DolphinDetailsView::contentsMousePressEvent(QMouseEvent* event)
m_dolphinView->statusBar()->clear(); m_dolphinView->statusBar()->clear();
} }
void DolphinDetailsView::contentsMouseMoveEvent(QMouseEvent* event) void DolphinDetailsView::contentsMouseMoveEvent(TQMouseEvent* event)
{ {
if (m_rubber != 0) { if (m_rubber != 0) {
slotAutoScroll(); slotAutoScroll();
@ -405,9 +405,9 @@ void DolphinDetailsView::contentsMouseMoveEvent(QMouseEvent* event)
KFileDetailView::contentsMouseMoveEvent(event); KFileDetailView::contentsMouseMoveEvent(event);
const QPoint& pos = event->globalPos(); const TQPoint& pos = event->globalPos();
const QPoint viewportPos = viewport()->mapToGlobal(QPoint(0, 0)); const TQPoint viewportPos = viewport()->mapToGlobal(TQPoint(0, 0));
QListViewItem* item = itemAt(QPoint(pos.x() - viewportPos.x(), pos.y() - viewportPos.y())); TQListViewItem* item = itemAt(TQPoint(pos.x() - viewportPos.x(), pos.y() - viewportPos.y()));
if ((item != 0) && isOnFilename(item, pos)) { if ((item != 0) && isOnFilename(item, pos)) {
activateItem(item); activateItem(item);
} }
@ -416,7 +416,7 @@ void DolphinDetailsView::contentsMouseMoveEvent(QMouseEvent* event)
} }
} }
void DolphinDetailsView::contentsMouseReleaseEvent(QMouseEvent* event) void DolphinDetailsView::contentsMouseReleaseEvent(TQMouseEvent* event)
{ {
if (m_rubber != 0) { if (m_rubber != 0) {
drawRubber(); drawRubber();
@ -425,8 +425,8 @@ void DolphinDetailsView::contentsMouseReleaseEvent(QMouseEvent* event)
} }
if (m_scrollTimer != 0) { if (m_scrollTimer != 0) {
disconnect(m_scrollTimer, SIGNAL(timeout()), disconnect(m_scrollTimer, TQT_SIGNAL(timeout()),
this, SLOT(slotAutoScroll())); this, TQT_SLOT(slotAutoScroll()));
m_scrollTimer->stop(); m_scrollTimer->stop();
delete m_scrollTimer; delete m_scrollTimer;
m_scrollTimer = 0; m_scrollTimer = 0;
@ -435,13 +435,13 @@ void DolphinDetailsView::contentsMouseReleaseEvent(QMouseEvent* event)
KFileDetailView::contentsMouseReleaseEvent(event); KFileDetailView::contentsMouseReleaseEvent(event);
} }
void DolphinDetailsView::paintEmptyArea(QPainter* painter, const QRect& rect) void DolphinDetailsView::paintEmptyArea(TQPainter* painter, const TQRect& rect)
{ {
if (m_dolphinView->isActive()) { if (m_dolphinView->isActive()) {
KFileDetailView::paintEmptyArea(painter, rect); KFileDetailView::paintEmptyArea(painter, rect);
} }
else { else {
const QBrush brush(colorGroup().background()); const TQBrush brush(tqcolorGroup().background());
painter->fillRect(rect, brush); painter->fillRect(rect, brush);
} }
} }
@ -457,28 +457,28 @@ void DolphinDetailsView::drawRubber()
return; return;
} }
QPainter p; TQPainter p;
p.begin(viewport()); p.begin(viewport());
p.setRasterOp(NotROP); p.setRasterOp(NotROP);
p.setPen(QPen(color0, 1)); p.setPen(TQPen(color0, 1));
p.setBrush(NoBrush); p.setBrush(NoBrush);
QPoint point(m_rubber->x(), m_rubber->y()); TQPoint point(m_rubber->x(), m_rubber->y());
point = contentsToViewport(point); point = contentsToViewport(point);
style().drawPrimitive(QStyle::PE_FocusRect, &p, tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, &p,
QRect(point.x(), point.y(), m_rubber->width(), m_rubber->height()), TQRect(point.x(), point.y(), m_rubber->width(), m_rubber->height()),
colorGroup(), QStyle::Style_Default, colorGroup().base()); tqcolorGroup(), TQStyle::Style_Default, tqcolorGroup().base());
p.end(); p.end();
} }
void DolphinDetailsView::viewportPaintEvent(QPaintEvent* paintEvent) void DolphinDetailsView::viewportPaintEvent(TQPaintEvent* paintEvent)
{ {
drawRubber(); drawRubber();
KFileDetailView::viewportPaintEvent(paintEvent); KFileDetailView::viewportPaintEvent(paintEvent);
drawRubber(); drawRubber();
} }
void DolphinDetailsView::leaveEvent(QEvent* event) void DolphinDetailsView::leaveEvent(TQEvent* event)
{ {
KFileDetailView::leaveEvent(event); KFileDetailView::leaveEvent(event);
slotOnViewport(); slotOnViewport();
@ -489,25 +489,25 @@ void DolphinDetailsView::slotActivationUpdate()
update(); update();
// TODO: there must be a simpler way to say // TODO: there must be a simpler way to say
// "update all children" // "update all tqchildren"
const QObjectList* list = children(); const TQObjectList list = childrenListObject();
if (list == 0) { if (list.isEmpty()) {
return; return;
} }
QObjectListIterator it(*list); TQObjectListIterator it(list);
QObject* object = 0; TQObject* object = 0;
while ((object = it.current()) != 0) { while ((object = it.current()) != 0) {
if (object->inherits("QWidget")) { if (object->inherits(TQWIDGET_OBJECT_NAME_STRING)) {
QWidget* widget = static_cast<QWidget*>(object); TQWidget* widget = TQT_TQWIDGET(object);
widget->update(); widget->update();
} }
++it; ++it;
} }
} }
void DolphinDetailsView::slotContextMenuRequested(QListViewItem* item, void DolphinDetailsView::slotContextMenuRequested(TQListViewItem* item,
const QPoint& pos, const TQPoint& pos,
int /* col */) int /* col */)
{ {
KFileItem* fileInfo = 0; KFileItem* fileInfo = 0;
@ -531,8 +531,8 @@ void DolphinDetailsView::slotAutoScroll()
// (Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> // (Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
// 2001, 2002, 2004 Michael Brade <brade@kde.org>) // 2001, 2002, 2004 Michael Brade <brade@kde.org>)
const QPoint pos(viewport()->mapFromGlobal(QCursor::pos())); const TQPoint pos(viewport()->mapFromGlobal(TQCursor::pos()));
const QPoint vc(viewportToContents(pos)); const TQPoint vc(viewportToContents(pos));
if (vc == m_rubber->bottomRight()) { if (vc == m_rubber->bottomRight()) {
return; return;
@ -542,20 +542,20 @@ void DolphinDetailsView::slotAutoScroll()
m_rubber->setBottomRight(vc); m_rubber->setBottomRight(vc);
QListViewItem* item = itemAt(QPoint(0,0)); TQListViewItem* item = itemAt(TQPoint(0,0));
const bool block = signalsBlocked(); const bool block = signalsBlocked();
blockSignals(true); blockSignals(true);
const QRect rubber(m_rubber->normalize()); const TQRect rubber(m_rubber->normalize());
const int bottom = contentsY() + visibleHeight() - 1; const int bottom = contentsY() + visibleHeight() - 1;
// select all items which intersect with the rubber, deselect all others // select all items which intersect with the rubber, deselect all others
bool bottomReached = false; bool bottomReached = false;
while ((item != 0) && !bottomReached) { while ((item != 0) && !bottomReached) {
QRect rect(itemRect(item)); TQRect rect(tqitemRect(item));
rect.setWidth(filenameWidth(item)); rect.setWidth(filenameWidth(item));
rect = QRect(viewportToContents(rect.topLeft()), rect = TQRect(viewportToContents(rect.topLeft()),
viewportToContents(rect.bottomRight())); viewportToContents(rect.bottomRight()));
if (rect.isValid() && (rect.top() <= bottom)) { if (rect.isValid() && (rect.top() <= bottom)) {
const KFileItem* fileItem = static_cast<KFileListViewItem*>(item)->fileInfo(); const KFileItem* fileItem = static_cast<KFileListViewItem*>(item)->fileInfo();
@ -575,21 +575,21 @@ void DolphinDetailsView::slotAutoScroll()
// scroll the viewport if the top or bottom margin is reached // scroll the viewport if the top or bottom margin is reached
const int scrollMargin = 40; const int scrollMargin = 40;
ensureVisible(vc.x(), vc.y(), scrollMargin, scrollMargin); ensureVisible(vc.x(), vc.y(), scrollMargin, scrollMargin);
const bool scroll = !QRect(scrollMargin, const bool scroll = !TQRect(scrollMargin,
scrollMargin, scrollMargin,
viewport()->width() - 2 * scrollMargin, viewport()->width() - 2 * scrollMargin,
viewport()->height() - 2 * scrollMargin).contains(pos); viewport()->height() - 2 * scrollMargin).tqcontains(pos);
if (scroll) { if (scroll) {
if (m_scrollTimer == 0) { if (m_scrollTimer == 0) {
m_scrollTimer = new QTimer( this ); m_scrollTimer = new TQTimer( this );
connect(m_scrollTimer, SIGNAL(timeout()), connect(m_scrollTimer, TQT_SIGNAL(timeout()),
this, SLOT(slotAutoScroll())); this, TQT_SLOT(slotAutoScroll()));
m_scrollTimer->start(100, false); m_scrollTimer->start(100, false);
} }
} }
else if (m_scrollTimer != 0) { else if (m_scrollTimer != 0) {
disconnect(m_scrollTimer, SIGNAL(timeout()), disconnect(m_scrollTimer, TQT_SIGNAL(timeout()),
this, SLOT(slotAutoScroll())); this, TQT_SLOT(slotAutoScroll()));
m_scrollTimer->stop(); m_scrollTimer->stop();
delete m_scrollTimer; delete m_scrollTimer;
m_scrollTimer = 0; m_scrollTimer = 0;
@ -605,8 +605,8 @@ void DolphinDetailsView::updateColumnsWidth()
// the column must be available, so that the header is readable. // the column must be available, so that the header is readable.
// TODO: use header data instead of the hardcoded 64 value... // TODO: use header data instead of the hardcoded 64 value...
int columnWidth = 64; int columnWidth = 64;
QFontMetrics fontMetrics(font()); TQFontMetrics fontMetrics(font());
for (QListViewItem* item = firstChild(); item != 0; item = item->nextSibling()) { for (TQListViewItem* item = firstChild(); item != 0; item = item->nextSibling()) {
const int width = item->width(fontMetrics, this, i); const int width = item->width(fontMetrics, this, i);
if (width > columnWidth) { if (width > columnWidth) {
columnWidth = width; columnWidth = width;
@ -626,8 +626,8 @@ void DolphinDetailsView::updateColumnsWidth()
setColumnWidth(0, firstColumnWidth); setColumnWidth(0, firstColumnWidth);
} }
void DolphinDetailsView::slotItemRenamed(QListViewItem* item, void DolphinDetailsView::slotItemRenamed(TQListViewItem* item,
const QString& name, const TQString& name,
int /* column */) int /* column */)
{ {
KFileItem* fileInfo = static_cast<KFileListViewItem*>(item)->fileInfo(); KFileItem* fileInfo = static_cast<KFileListViewItem*>(item)->fileInfo();
@ -636,7 +636,7 @@ void DolphinDetailsView::slotItemRenamed(QListViewItem* item,
void DolphinDetailsView::slotHeaderClicked(int /* section */) void DolphinDetailsView::slotHeaderClicked(int /* section */)
{ {
// The sorting has already been changed in QListView if this slot is // The sorting has already been changed in TQListView if this slot is
// invoked, but Dolphin was not informed about this (no signal is available // invoked, but Dolphin was not informed about this (no signal is available
// which indicates a change of the sorting). This is bypassed by changing // which indicates a change of the sorting). This is bypassed by changing
// the sorting and sort order to a temporary other value and readjust it again. // the sorting and sort order to a temporary other value and readjust it again.
@ -650,15 +650,15 @@ void DolphinDetailsView::slotHeaderClicked(int /* section */)
default: break; default: break;
} }
const Qt::SortOrder currSortOrder = sortOrder(); const TQt::SortOrder currSortOrder = sortOrder();
// temporary adjust the sorting and sort order to different values... // temporary adjust the sorting and sort order to different values...
const DolphinView::Sorting tempSorting = (sorting == DolphinView::SortByName) ? const DolphinView::Sorting tempSorting = (sorting == DolphinView::SortByName) ?
DolphinView::SortBySize : DolphinView::SortBySize :
DolphinView::SortByName; DolphinView::SortByName;
m_dolphinView->setSorting(tempSorting); m_dolphinView->setSorting(tempSorting);
const Qt::SortOrder tempSortOrder = (currSortOrder == Qt::Ascending) ? const TQt::SortOrder tempSortOrder = (currSortOrder == TQt::Ascending) ?
Qt::Descending : Qt::Ascending; TQt::Descending : TQt::Ascending;
m_dolphinView->setSortOrder(tempSortOrder); m_dolphinView->setSortOrder(tempSortOrder);
// ... so that setting them again results in storing the new setting. // ... so that setting them again results in storing the new setting.
@ -667,9 +667,9 @@ void DolphinDetailsView::slotHeaderClicked(int /* section */)
} }
} }
DolphinDetailsView::DolphinListViewItem::DolphinListViewItem(QListView* parent, DolphinDetailsView::DolphinListViewItem::DolphinListViewItem(TQListView* tqparent,
KFileItem* fileItem) : KFileItem* fileItem) :
KFileListViewItem(parent, fileItem) KFileListViewItem(tqparent, fileItem)
{ {
const int iconSize = DolphinSettings::instance().detailsView()->iconSize(); const int iconSize = DolphinSettings::instance().detailsView()->iconSize();
KFileItem* info = fileInfo(); KFileItem* info = fileInfo();
@ -683,14 +683,14 @@ DolphinDetailsView::DolphinListViewItem::DolphinListViewItem(QListView* parent,
setText(SizeColumn, " - "); setText(SizeColumn, " - ");
} }
else { else {
QString sizeText(KIO::convertSize(fileItem->size())); TQString sizeText(KIO::convertSize(fileItem->size()));
sizeText.append(" "); sizeText.append(" ");
setText(SizeColumn, sizeText); setText(SizeColumn, sizeText);
} }
// Dolphin allows to remove specific columns, but the base class KFileListViewItem // Dolphin allows to remove specific columns, but the base class KFileListViewItem
// is not aware about this (or at least the class KFileDetailView does not react on // is not aware about this (or at least the class KFileDetailView does not react on
// QListView::remove()). Therefore the columns are rearranged here. // TQListView::remove()). Therefore the columns are rearranged here.
const DolphinDetailsViewSettings* settings = DolphinSettings::instance().detailsView(); const DolphinDetailsViewSettings* settings = DolphinSettings::instance().detailsView();
assert(settings != 0); assert(settings != 0);
@ -709,42 +709,42 @@ DolphinDetailsView::DolphinListViewItem::~DolphinListViewItem()
{ {
} }
void DolphinDetailsView::DolphinListViewItem::paintCell(QPainter* painter, void DolphinDetailsView::DolphinListViewItem::paintCell(TQPainter* painter,
const QColorGroup& colorGroup, const TQColorGroup& tqcolorGroup,
int column, int column,
int cellWidth, int cellWidth,
int alignment) int tqalignment)
{ {
const QListView* view = listView(); const TQListView* view = listView();
const bool isActive = view->parent() == Dolphin::mainWin().activeView(); const bool isActive = TQT_BASE_OBJECT(view->tqparent()) == TQT_BASE_OBJECT(Dolphin::mainWin().activeView());
if (isSelected()) { if (isSelected()) {
// Per default the selection is drawn above the whole width of the item. As a consistent // Per default the selection is drawn above the whole width of the item. As a consistent
// behavior with the icon view is wanted, only the the column containing the file name // behavior with the icon view is wanted, only the the column containing the file name
// should be shown as selected. // should be shown as selected.
QColorGroup defaultColorGroup(colorGroup); TQColorGroup defaultColorGroup(tqcolorGroup);
const QColor highlightColor(isActive ? backgroundColor(column) : view->colorGroup().background()); const TQColor highlightColor(isActive ? backgroundColor(column) : view->tqcolorGroup().background());
defaultColorGroup.setColor(QColorGroup::Highlight , highlightColor); defaultColorGroup.setColor(TQColorGroup::Highlight , highlightColor);
defaultColorGroup.setColor(QColorGroup::HighlightedText, colorGroup.color(QColorGroup::Text)); defaultColorGroup.setColor(TQColorGroup::HighlightedText, tqcolorGroup.color(TQColorGroup::Text));
KFileListViewItem::paintCell(painter, defaultColorGroup, column, cellWidth, alignment); KFileListViewItem::paintCell(painter, defaultColorGroup, column, cellWidth, tqalignment);
if (column == 0) { if (column == 0) {
// draw the selection only on the first column // draw the selection only on the first column
QListView* parent = listView(); TQListView* tqparent = listView();
const int itemWidth = width(parent->fontMetrics(), parent, 0); const int itemWidth = width(tqparent->fontMetrics(), tqparent, 0);
if (isActive) { if (isActive) {
KFileListViewItem::paintCell(painter, colorGroup, column, itemWidth, alignment); KFileListViewItem::paintCell(painter, tqcolorGroup, column, itemWidth, tqalignment);
} }
else { else {
QListViewItem::paintCell(painter, colorGroup, column, itemWidth, alignment); TQListViewItem::paintCell(painter, tqcolorGroup, column, itemWidth, tqalignment);
} }
} }
} }
else { else {
if (isActive) { if (isActive) {
KFileListViewItem::paintCell(painter, colorGroup, column, cellWidth, alignment); KFileListViewItem::paintCell(painter, tqcolorGroup, column, cellWidth, tqalignment);
} }
else { else {
QListViewItem::paintCell(painter, colorGroup, column, cellWidth, alignment); TQListViewItem::paintCell(painter, tqcolorGroup, column, cellWidth, tqalignment);
} }
} }
@ -755,26 +755,26 @@ void DolphinDetailsView::DolphinListViewItem::paintCell(QPainter* painter,
} }
} }
void DolphinDetailsView::DolphinListViewItem::paintFocus(QPainter* painter, void DolphinDetailsView::DolphinListViewItem::paintFocus(TQPainter* painter,
const QColorGroup& colorGroup, const TQColorGroup& tqcolorGroup,
const QRect& rect) const TQRect& rect)
{ {
// draw the focus consistently with the selection (see implementation notes // draw the focus consistently with the selection (see implementation notes
// in DolphinListViewItem::paintCell) // in DolphinListViewItem::paintCell)
QListView* parent = listView(); TQListView* tqparent = listView();
int visibleWidth = width(parent->fontMetrics(), parent, 0); int visibleWidth = width(tqparent->fontMetrics(), tqparent, 0);
const int colWidth = parent->columnWidth(0); const int colWidth = tqparent->columnWidth(0);
if (visibleWidth > colWidth) { if (visibleWidth > colWidth) {
visibleWidth = colWidth; visibleWidth = colWidth;
} }
QRect focusRect(rect); TQRect focusRect(rect);
focusRect.setWidth(visibleWidth); focusRect.setWidth(visibleWidth);
KFileListViewItem::paintFocus(painter, colorGroup, focusRect); KFileListViewItem::paintFocus(painter, tqcolorGroup, focusRect);
} }
int DolphinDetailsView::filenameWidth(const QListViewItem* item) const int DolphinDetailsView::filenameWidth(const TQListViewItem* item) const
{ {
assert(item != 0); assert(item != 0);

@ -24,8 +24,8 @@
#include <kfiledetailview.h> #include <kfiledetailview.h>
#include <itemeffectsmanager.h> #include <itemeffectsmanager.h>
class QRect; class TQRect;
class QTimer; class TQTimer;
class DolphinView; class DolphinView;
/** /**
@ -41,6 +41,7 @@ class DolphinView;
class DolphinDetailsView : public KFileDetailView, public ItemEffectsManager class DolphinDetailsView : public KFileDetailView, public ItemEffectsManager
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
/** /**
@ -56,7 +57,7 @@ public:
GroupColumn = 5 GroupColumn = 5
}; };
DolphinDetailsView(DolphinView* parent); DolphinDetailsView(DolphinView* tqparent);
virtual ~DolphinDetailsView(); virtual ~DolphinDetailsView();
@ -73,14 +74,14 @@ public:
* @return True, if the position \a pos is above the name of * @return True, if the position \a pos is above the name of
* item \a item. * item \a item.
*/ */
bool isOnFilename(const QListViewItem* item, const QPoint& pos) const; bool isOnFilename(const TQListViewItem* item, const TQPoint& pos) const;
/** /**
* Reads out the dolphin settings for the details view and refreshs * Reads out the dolphin settings for the details view and refreshs
* the details view. * the details view.
*/ */
// TODO: Other view implementations use a similar interface. When using // TODO: Other view implementations use a similar interface. When using
// Interview in Qt4 this method should be moved to a base class (currently // Interview in TQt4 this method should be moved to a base class (currently
// not possible due to having different base classes for the views). // not possible due to having different base classes for the views).
void refreshSettings(); void refreshSettings();
@ -108,7 +109,7 @@ public slots:
virtual void resizeContents(int width, int height); virtual void resizeContents(int width, int height);
/** Is connected to the onItem-signal from KFileDetailView. */ /** Is connected to the onItem-signal from KFileDetailView. */
void slotOnItem(QListViewItem* item); void slotOnItem(TQListViewItem* item);
/** Is connected to the onViewport-signal from KFileDetailView. */ /** Is connected to the onViewport-signal from KFileDetailView. */
void slotOnViewport(); void slotOnViewport();
@ -116,10 +117,10 @@ public slots:
protected: protected:
/** @see ItemEffectsManager::setContextPixmap() */ /** @see ItemEffectsManager::setContextPixmap() */
virtual void setContextPixmap(void* context, virtual void setContextPixmap(void* context,
const QPixmap& pixmap); const TQPixmap& pixmap);
/** @see ItemEffectsManager::setContextPixmap() */ /** @see ItemEffectsManager::setContextPixmap() */
virtual const QPixmap* contextPixmap(void* context); virtual const TQPixmap* contextPixmap(void* context);
/** @see ItemEffectsManager::setContextPixmap() */ /** @see ItemEffectsManager::setContextPixmap() */
virtual void* firstContext(); virtual void* firstContext();
@ -131,48 +132,48 @@ protected:
virtual KFileItem* contextFileInfo(void* context); virtual KFileItem* contextFileInfo(void* context);
/** @see KFileDetailView::contentsDragMoveEvent() */ /** @see KFileDetailView::contentsDragMoveEvent() */
virtual void contentsDragMoveEvent(QDragMoveEvent* event); virtual void contentsDragMoveEvent(TQDragMoveEvent* event);
/** @see KFileDetailView::resizeEvent() */ /** @see KFileDetailView::resizeEvent() */
virtual void resizeEvent(QResizeEvent* event); virtual void resizeEvent(TQResizeEvent* event);
/** @see KFileDetailView::acceptDrag() */ /** @see KFileDetailView::acceptDrag() */
virtual bool acceptDrag (QDropEvent* event) const; virtual bool acceptDrag (TQDropEvent* event) const;
/** @see KFileDetailView::contentsDropEvent() */ /** @see KFileDetailView::contentsDropEvent() */
virtual void contentsDropEvent(QDropEvent* event); virtual void contentsDropEvent(TQDropEvent* event);
/** @see KFileDetailView::contentsMousePressEvent() */ /** @see KFileDetailView::contentsMousePressEvent() */
virtual void contentsMousePressEvent(QMouseEvent* event); virtual void contentsMousePressEvent(TQMouseEvent* event);
/** @see KFileDetailView::contentsMouseMoveEvent() */ /** @see KFileDetailView::contentsMouseMoveEvent() */
virtual void contentsMouseMoveEvent(QMouseEvent* event); virtual void contentsMouseMoveEvent(TQMouseEvent* event);
/** @see KFileDetailView::contentsMouseReleaseEvent() */ /** @see KFileDetailView::contentsMouseReleaseEvent() */
virtual void contentsMouseReleaseEvent(QMouseEvent* event); virtual void contentsMouseReleaseEvent(TQMouseEvent* event);
/** @see QListView::paintEmptyArea() */ /** @see TQListView::paintEmptyArea() */
virtual void paintEmptyArea(QPainter* painter, const QRect& rect); virtual void paintEmptyArea(TQPainter* painter, const TQRect& rect);
/** Draws the selection rubber. */ /** Draws the selection rubber. */
void drawRubber(); void drawRubber();
/** @see QListView::viewportPaintEvent() */ /** @see TQListView::viewportPaintEvent() */
virtual void viewportPaintEvent(QPaintEvent* paintEvent); virtual void viewportPaintEvent(TQPaintEvent* paintEvent);
/** @see QWidget::leaveEvent() */ /** @see TQWidget::leaveEvent() */
virtual void leaveEvent(QEvent* event); virtual void leaveEvent(TQEvent* event);
private slots: private slots:
void slotActivationUpdate(); void slotActivationUpdate();
void slotContextMenuRequested(QListViewItem* item, void slotContextMenuRequested(TQListViewItem* item,
const QPoint& pos, const TQPoint& pos,
int col); int col);
void slotUpdateDisabledItems(); void slotUpdateDisabledItems();
void slotAutoScroll(); void slotAutoScroll();
void updateColumnsWidth(); void updateColumnsWidth();
void slotItemRenamed(QListViewItem* item, void slotItemRenamed(TQListViewItem* item,
const QString& name, const TQString& name,
int column); int column);
/** /**
@ -185,31 +186,31 @@ private slots:
private: private:
class DolphinListViewItem : public KFileListViewItem { class DolphinListViewItem : public KFileListViewItem {
public: public:
DolphinListViewItem(QListView* parent, DolphinListViewItem(TQListView* tqparent,
KFileItem* fileItem); KFileItem* fileItem);
virtual ~DolphinListViewItem(); virtual ~DolphinListViewItem();
virtual void paintCell(QPainter* painter, virtual void paintCell(TQPainter* painter,
const QColorGroup& colorGroup, const TQColorGroup& tqcolorGroup,
int column, int column,
int cellWidth, int cellWidth,
int alignment); int tqalignment);
virtual void paintFocus(QPainter* painter, virtual void paintFocus(TQPainter* painter,
const QColorGroup& colorGroup, const TQColorGroup& tqcolorGroup,
const QRect& rect); const TQRect& rect);
}; };
DolphinView* m_dolphinView; DolphinView* m_dolphinView;
QTimer* m_resizeTimer; TQTimer* m_resizeTimer;
QTimer* m_scrollTimer; TQTimer* m_scrollTimer;
QRect* m_rubber; TQRect* m_rubber;
/** /**
* Returns the width of the filename in pixels including * Returns the width of the filename in pixels including
* the icon. It is assured that the returned width is * the icon. It is assured that the returned width is
* <= the width of the filename column. * <= the width of the filename column.
*/ */
int filenameWidth(const QListViewItem* item) const; int filenameWidth(const TQListViewItem* item) const;
}; };

@ -53,7 +53,7 @@ DolphinDetailsViewSettings::DolphinDetailsViewSettings() :
m_fontSize = config->readNumEntry("Font Size", -1); m_fontSize = config->readNumEntry("Font Size", -1);
m_fontFamily = config->readEntry("Font Family"); m_fontFamily = config->readEntry("Font Family");
const QFont font(KGlobalSettings::generalFont()); const TQFont font(KGlobalSettings::generalFont());
if (m_fontSize < 0) { if (m_fontSize < 0) {
m_fontSize = font.pointSize(); m_fontSize = font.pointSize();
} }

@ -21,8 +21,8 @@
#ifndef DOLPHINDETAILSVIEWSETTINGS_H #ifndef DOLPHINDETAILSVIEWSETTINGS_H
#define DOLPHINDETAILSVIEWSETTINGS_H #define DOLPHINDETAILSVIEWSETTINGS_H
#include <qstring.h> #include <tqstring.h>
#include <qnamespace.h> #include <tqnamespace.h>
#include <dolphinsettingsbase.h> #include <dolphinsettingsbase.h>
/** /**
@ -52,8 +52,8 @@ public:
void setIconSize(int size) { m_iconSize = size; } void setIconSize(int size) { m_iconSize = size; }
int iconSize() const { return m_iconSize; } int iconSize() const { return m_iconSize; }
void setFontFamily(const QString& family) { m_fontFamily = family; } void setFontFamily(const TQString& family) { m_fontFamily = family; }
const QString& fontFamily() const { return m_fontFamily; } const TQString& fontFamily() const { return m_fontFamily; }
void setFontSize(int size) { m_fontSize = size; } void setFontSize(int size) { m_fontSize = size; }
int fontSize() const { return m_fontSize; } int fontSize() const { return m_fontSize; }
@ -65,7 +65,7 @@ private:
int m_columnEnabled; int m_columnEnabled;
int m_iconSize; int m_iconSize;
int m_fontSize; int m_fontSize;
QString m_fontFamily; TQString m_fontFamily;
}; };
#endif #endif

@ -32,6 +32,7 @@
class DolphinDirLister : public KDirLister class DolphinDirLister : public KDirLister
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
DolphinDirLister(); DolphinDirLister();
@ -39,7 +40,7 @@ public:
signals: signals:
/** Is emitted whenever an error occured. */ /** Is emitted whenever an error occured. */
void errorMessage(const QString& msg); void errorMessage(const TQString& msg);
protected: protected:
virtual void handleError(KIO::Job* job); virtual void handleError(KIO::Job* job);

@ -19,13 +19,13 @@
***************************************************************************/ ***************************************************************************/
#include "dolphiniconsview.h" #include "dolphiniconsview.h"
#include <qpainter.h> #include <tqpainter.h>
#include <kiconeffect.h> #include <kiconeffect.h>
#include <kapplication.h> #include <kapplication.h>
#include <qobjectlist.h> #include <tqobjectlist.h>
#include <kglobalsettings.h> #include <kglobalsettings.h>
#include <kurldrag.h> #include <kurldrag.h>
#include <qclipboard.h> #include <tqclipboard.h>
#include <assert.h> #include <assert.h>
#include <kaction.h> #include <kaction.h>
#include <kstdaction.h> #include <kstdaction.h>
@ -38,35 +38,35 @@
#include "dolphinsettings.h" #include "dolphinsettings.h"
#include "dolphiniconsviewsettings.h" #include "dolphiniconsviewsettings.h"
DolphinIconsView::DolphinIconsView(DolphinView* parent, LayoutMode layoutMode) : DolphinIconsView::DolphinIconsView(DolphinView* tqparent, LayoutMode tqlayoutMode) :
KFileIconView(parent, 0), KFileIconView(tqparent, 0),
m_previewIconSize(-1), m_previewIconSize(-1),
m_layoutMode(layoutMode), m_tqlayoutMode(tqlayoutMode),
m_dolphinView(parent) m_dolphinView(tqparent)
{ {
setAcceptDrops(true); setAcceptDrops(true);
setMode(KIconView::Execute); setMode(KIconView::Execute);
setSelectionMode(KFile::Extended); setSelectionMode(KFile::Extended);
Dolphin& dolphin = Dolphin::mainWin(); Dolphin& dolphin = Dolphin::mainWin();
connect(this, SIGNAL(onItem(QIconViewItem*)), connect(this, TQT_SIGNAL(onItem(TQIconViewItem*)),
this, SLOT(slotOnItem(QIconViewItem*))); this, TQT_SLOT(slotOnItem(TQIconViewItem*)));
connect(this, SIGNAL(onViewport()), connect(this, TQT_SIGNAL(onViewport()),
this, SLOT(slotOnViewport())); this, TQT_SLOT(slotOnViewport()));
connect(this, SIGNAL(contextMenuRequested(QIconViewItem*, const QPoint&)), connect(this, TQT_SIGNAL(contextMenuRequested(TQIconViewItem*, const TQPoint&)),
this, SLOT(slotContextMenuRequested(QIconViewItem*, const QPoint&))); this, TQT_SLOT(slotContextMenuRequested(TQIconViewItem*, const TQPoint&)));
connect(this, SIGNAL(selectionChanged()), connect(this, TQT_SIGNAL(selectionChanged()),
&dolphin, SLOT(slotSelectionChanged())); &dolphin, TQT_SLOT(slotSelectionChanged()));
connect(&dolphin, SIGNAL(activeViewChanged()), connect(&dolphin, TQT_SIGNAL(activeViewChanged()),
this, SLOT(slotActivationUpdate())); this, TQT_SLOT(slotActivationUpdate()));
connect(this, SIGNAL(itemRenamed(QIconViewItem*, const QString&)), connect(this, TQT_SIGNAL(itemRenamed(TQIconViewItem*, const TQString&)),
this, SLOT(slotItemRenamed(QIconViewItem*, const QString&))); this, TQT_SLOT(slotItemRenamed(TQIconViewItem*, const TQString&)));
connect(this, SIGNAL(dropped(QDropEvent*, const KURL::List&, const KURL&)), connect(this, TQT_SIGNAL(dropped(TQDropEvent*, const KURL::List&, const KURL&)),
parent, SLOT(slotURLListDropped(QDropEvent*, const KURL::List&, const KURL&))); tqparent, TQT_SLOT(slotURLListDropped(TQDropEvent*, const KURL::List&, const KURL&)));
QClipboard* clipboard = QApplication::clipboard(); TQClipboard* clipboard = TQApplication::tqclipboard();
connect(clipboard, SIGNAL(dataChanged()), connect(clipboard, TQT_SIGNAL(dataChanged()),
this, SLOT(slotUpdateDisabledItems())); this, TQT_SLOT(slotUpdateDisabledItems()));
// KFileIconView creates two actions for zooming, which are directly connected to the // KFileIconView creates two actions for zooming, which are directly connected to the
// slots KFileIconView::zoomIn() and KFileIconView::zoomOut(). As this behavior is not // slots KFileIconView::zoomIn() and KFileIconView::zoomOut(). As this behavior is not
@ -81,7 +81,7 @@ DolphinIconsView::DolphinIconsView(DolphinView* parent, LayoutMode layoutMode) :
setItemsMovable(true); setItemsMovable(true);
setWordWrapIconText(true); setWordWrapIconText(true);
if (m_layoutMode == Previews) { if (m_tqlayoutMode == Previews) {
showPreviews(); showPreviews();
} }
refreshSettings(); refreshSettings();
@ -93,8 +93,8 @@ DolphinIconsView::~DolphinIconsView()
void DolphinIconsView::setLayoutMode(LayoutMode mode) void DolphinIconsView::setLayoutMode(LayoutMode mode)
{ {
if (m_layoutMode != mode) { if (m_tqlayoutMode != mode) {
m_layoutMode = mode; m_tqlayoutMode = mode;
refreshSettings(); refreshSettings();
} }
} }
@ -111,7 +111,7 @@ void DolphinIconsView::endItemUpdates()
// has been finished. Using a delay of 300 ms is a temporary workaround // has been finished. Using a delay of 300 ms is a temporary workaround
// until the DolphinIconsView will implement the previews by it's own in // until the DolphinIconsView will implement the previews by it's own in
// future releases. // future releases.
QTimer::singleShot(300, this, SLOT(slotUpdateDisabledItems())); TQTimer::singleShot(300, this, TQT_SLOT(slotUpdateDisabledItems()));
const KFileIconViewItem* item = static_cast<const KFileIconViewItem*>(firstItem()); const KFileIconViewItem* item = static_cast<const KFileIconViewItem*>(firstItem());
if (item != 0) { if (item != 0) {
@ -119,7 +119,7 @@ void DolphinIconsView::endItemUpdates()
} }
int index = 0; int index = 0;
const QValueList<URLNavigator::HistoryElem> history = m_dolphinView->urlHistory(index); const TQValueList<URLNavigator::HistoryElem> history = m_dolphinView->urlHistory(index);
if (!history.isEmpty()) { if (!history.isEmpty()) {
KFileView* fileView = static_cast<KFileView*>(this); KFileView* fileView = static_cast<KFileView*>(this);
fileView->setCurrentItem(history[index].currentFileName()); fileView->setCurrentItem(history[index].currentFileName());
@ -129,15 +129,15 @@ void DolphinIconsView::endItemUpdates()
void DolphinIconsView::refreshSettings() void DolphinIconsView::refreshSettings()
{ {
const DolphinIconsViewSettings* settings = DolphinSettings::instance().iconsView(m_layoutMode); const DolphinIconsViewSettings* settings = DolphinSettings::instance().iconsView(m_tqlayoutMode);
assert(settings != 0); assert(settings != 0);
setIconSize(settings->iconSize()); setIconSize(settings->iconSize());
const QIconView::Arrangement arrangement = settings->arrangement(); const TQIconView::Arrangement arrangement = settings->arrangement();
const QIconView::ItemTextPos textPos = (arrangement == QIconView::LeftToRight) ? const TQIconView::ItemTextPos textPos = (arrangement == TQIconView::LeftToRight) ?
QIconView::Bottom : TQIconView::Bottom :
QIconView::Right; TQIconView::Right;
setArrangement(arrangement); setArrangement(arrangement);
setItemTextPos(textPos); setItemTextPos(textPos);
@ -145,13 +145,13 @@ void DolphinIconsView::refreshSettings()
setGridY(settings->gridHeight()); setGridY(settings->gridHeight());
setSpacing(settings->gridSpacing()); setSpacing(settings->gridSpacing());
QFont adjustedFont(font()); TQFont adjustedFont(font());
adjustedFont.setFamily(settings->fontFamily()); adjustedFont.setFamily(settings->fontFamily());
adjustedFont.setPointSize(settings->fontSize()); adjustedFont.setPointSize(settings->fontSize());
setFont(adjustedFont); setFont(adjustedFont);
setIconTextHeight(settings->textlinesCount()); setIconTextHeight(settings->textlinesCount());
if (m_layoutMode == Previews) { if (m_tqlayoutMode == Previews) {
// There is no getter method for the current size in KFileIconView. To // There is no getter method for the current size in KFileIconView. To
// prevent a flickering the current size is stored in m_previewIconSize and // prevent a flickering the current size is stored in m_previewIconSize and
// setPreviewSize is only invoked if the size really has changed. // setPreviewSize is only invoked if the size really has changed.
@ -168,13 +168,13 @@ void DolphinIconsView::refreshSettings()
void DolphinIconsView::zoomIn() void DolphinIconsView::zoomIn()
{ {
if (isZoomInPossible()) { if (isZoomInPossible()) {
DolphinIconsViewSettings* settings = DolphinSettings::instance().iconsView(m_layoutMode); DolphinIconsViewSettings* settings = DolphinSettings::instance().iconsView(m_tqlayoutMode);
const int textWidthHint = settings->textWidthHint(); const int textWidthHint = settings->textWidthHint();
const int iconSize = increasedIconSize(settings->iconSize()); const int iconSize = increasedIconSize(settings->iconSize());
settings->setIconSize(iconSize); settings->setIconSize(iconSize);
if (m_layoutMode == Previews) { if (m_tqlayoutMode == Previews) {
const int previewSize = increasedIconSize(settings->previewSize()); const int previewSize = increasedIconSize(settings->previewSize());
settings->setPreviewSize(previewSize); settings->setPreviewSize(previewSize);
} }
@ -187,13 +187,13 @@ void DolphinIconsView::zoomIn()
void DolphinIconsView::zoomOut() void DolphinIconsView::zoomOut()
{ {
if (isZoomOutPossible()) { if (isZoomOutPossible()) {
DolphinIconsViewSettings* settings = DolphinSettings::instance().iconsView(m_layoutMode); DolphinIconsViewSettings* settings = DolphinSettings::instance().iconsView(m_tqlayoutMode);
const int textWidthHint = settings->textWidthHint(); const int textWidthHint = settings->textWidthHint();
const int iconSize = decreasedIconSize(settings->iconSize()); const int iconSize = decreasedIconSize(settings->iconSize());
settings->setIconSize(iconSize); settings->setIconSize(iconSize);
if (m_layoutMode == Previews) { if (m_tqlayoutMode == Previews) {
const int previewSize = decreasedIconSize(settings->previewSize()); const int previewSize = decreasedIconSize(settings->previewSize());
settings->setPreviewSize(previewSize); settings->setPreviewSize(previewSize);
} }
@ -205,14 +205,14 @@ void DolphinIconsView::zoomOut()
bool DolphinIconsView::isZoomInPossible() const bool DolphinIconsView::isZoomInPossible() const
{ {
DolphinIconsViewSettings* settings = DolphinSettings::instance().iconsView(m_layoutMode); DolphinIconsViewSettings* settings = DolphinSettings::instance().iconsView(m_tqlayoutMode);
const int size = (m_layoutMode == Icons) ? settings->iconSize() : settings->previewSize(); const int size = (m_tqlayoutMode == Icons) ? settings->iconSize() : settings->previewSize();
return size < KIcon::SizeEnormous; return size < KIcon::SizeEnormous;
} }
bool DolphinIconsView::isZoomOutPossible() const bool DolphinIconsView::isZoomOutPossible() const
{ {
DolphinIconsViewSettings* settings = DolphinSettings::instance().iconsView(m_layoutMode); DolphinIconsViewSettings* settings = DolphinSettings::instance().iconsView(m_tqlayoutMode);
return settings->iconSize() > KIcon::SizeSmall; return settings->iconSize() > KIcon::SizeSmall;
} }
@ -221,21 +221,21 @@ void DolphinIconsView::arrangeItemsInGrid( bool updated )
KFileIconView::arrangeItemsInGrid(updated); KFileIconView::arrangeItemsInGrid(updated);
if (m_layoutMode == Previews) { if (m_tqlayoutMode == Previews) {
// The class KFileIconView has a bug when the size of the previews differs from the size // The class KFileIconView has a bug when the size of the previews differs from the size
// of the icons: For specific MIME types the y-position and the height is calculated in // of the icons: For specific MIME types the y-position and the height is calculated in
// a wrong manner. The following code bypasses this issue. No bugreport has been submitted // a wrong manner. The following code bypasses this issue. No bugreport has been submitted
// as this functionality is not used by any KDE3 application and the core developers are // as this functionality is not used by any KDE3 application and the core developers are
// busy enough for KDE4 now :-) // busy enough for KDE4 now :-)
KFileIconViewItem* item = static_cast<KFileIconViewItem*>(QIconView::firstItem()); KFileIconViewItem* item = static_cast<KFileIconViewItem*>(TQIconView::firstItem());
QString mimetype; TQString mimetype;
while (item != 0) { while (item != 0) {
mimetype = item->fileInfo()->mimetype(); mimetype = item->fileInfo()->mimetype();
const bool fixSize = mimetype.contains("text") || const bool fixSize = mimetype.tqcontains("text") ||
mimetype.contains("application/x-"); mimetype.tqcontains("application/x-");
if (fixSize) { if (fixSize) {
item->setPixmapSize(QSize(m_previewIconSize, m_previewIconSize)); item->setPixmapSize(TQSize(m_previewIconSize, m_previewIconSize));
} }
item = static_cast<KFileIconViewItem *>(item->nextItem()); item = static_cast<KFileIconViewItem *>(item->nextItem());
} }
@ -243,12 +243,12 @@ void DolphinIconsView::arrangeItemsInGrid( bool updated )
} }
void DolphinIconsView::setContextPixmap(void* context, void DolphinIconsView::setContextPixmap(void* context,
const QPixmap& pixmap) const TQPixmap& pixmap)
{ {
reinterpret_cast<KFileIconViewItem*>(context)->setPixmap(pixmap); reinterpret_cast<KFileIconViewItem*>(context)->setPixmap(pixmap);
} }
const QPixmap* DolphinIconsView::contextPixmap(void* context) const TQPixmap* DolphinIconsView::contextPixmap(void* context)
{ {
return reinterpret_cast<KFileIconViewItem*>(context)->pixmap(); return reinterpret_cast<KFileIconViewItem*>(context)->pixmap();
} }
@ -269,7 +269,7 @@ KFileItem* DolphinIconsView::contextFileInfo(void* context)
return reinterpret_cast<KFileIconViewItem*>(context)->fileInfo(); return reinterpret_cast<KFileIconViewItem*>(context)->fileInfo();
} }
void DolphinIconsView::contentsMousePressEvent(QMouseEvent* event) void DolphinIconsView::contentsMousePressEvent(TQMouseEvent* event)
{ {
KFileIconView::contentsMousePressEvent(event); KFileIconView::contentsMousePressEvent(event);
resetActivatedItem(); resetActivatedItem();
@ -277,7 +277,7 @@ void DolphinIconsView::contentsMousePressEvent(QMouseEvent* event)
m_dolphinView->statusBar()->clear(); m_dolphinView->statusBar()->clear();
} }
void DolphinIconsView::contentsMouseReleaseEvent(QMouseEvent* event) void DolphinIconsView::contentsMouseReleaseEvent(TQMouseEvent* event)
{ {
KFileIconView::contentsMouseReleaseEvent(event); KFileIconView::contentsMouseReleaseEvent(event);
@ -287,18 +287,18 @@ void DolphinIconsView::contentsMouseReleaseEvent(QMouseEvent* event)
Dolphin::mainWin().slotSelectionChanged(); Dolphin::mainWin().slotSelectionChanged();
} }
void DolphinIconsView::drawBackground(QPainter* painter, const QRect& rect) void DolphinIconsView::drawBackground(TQPainter* painter, const TQRect& rect)
{ {
if (m_dolphinView->isActive()) { if (m_dolphinView->isActive()) {
KFileIconView::drawBackground(painter, rect); KFileIconView::drawBackground(painter, rect);
} }
else { else {
const QBrush brush(colorGroup().background()); const TQBrush brush(tqcolorGroup().background());
painter->fillRect(0, 0, width(), height(), brush); painter->fillRect(0, 0, width(), height(), brush);
} }
} }
QDragObject* DolphinIconsView::dragObject() TQDragObject* DolphinIconsView::dragObject()
{ {
KURL::List urls; KURL::List urls;
KFileItemListIterator it(*KFileView::selectedItems()); KFileItemListIterator it(*KFileView::selectedItems());
@ -307,7 +307,7 @@ QDragObject* DolphinIconsView::dragObject()
++it; ++it;
} }
QPixmap pixmap; TQPixmap pixmap;
if(urls.count() > 1) { if(urls.count() > 1) {
pixmap = DesktopIcon("kmultiple", iconSize()); pixmap = DesktopIcon("kmultiple", iconSize());
} }
@ -322,12 +322,12 @@ QDragObject* DolphinIconsView::dragObject()
pixmap = currentFileItem()->pixmap(iconSize()); pixmap = currentFileItem()->pixmap(iconSize());
} }
QDragObject* dragObj = new KURLDrag(urls, widget()); TQDragObject* dragObj = new KURLDrag(urls, widget());
dragObj->setPixmap(pixmap); dragObj->setPixmap(pixmap);
return dragObj; return dragObj;
} }
void DolphinIconsView::contentsDragEnterEvent(QDragEnterEvent* event) void DolphinIconsView::contentsDragEnterEvent(TQDragEnterEvent* event)
{ {
// TODO: The method KFileIconView::contentsDragEnterEvent() does // TODO: The method KFileIconView::contentsDragEnterEvent() does
// not allow drag and drop inside itself, which prevents the possability // not allow drag and drop inside itself, which prevents the possability
@ -343,9 +343,9 @@ void DolphinIconsView::contentsDragEnterEvent(QDragEnterEvent* event)
} }
const bool accept = KURLDrag::canDecode(event) && const bool accept = KURLDrag::canDecode(event) &&
(event->action() == QDropEvent::Copy || (event->action() == TQDropEvent::Copy ||
event->action() == QDropEvent::Move || event->action() == TQDropEvent::Move ||
event->action() == QDropEvent::Link ); event->action() == TQDropEvent::Link );
if (accept) { if (accept) {
event->acceptAction(); event->acceptAction();
} }
@ -354,13 +354,13 @@ void DolphinIconsView::contentsDragEnterEvent(QDragEnterEvent* event)
} }
} }
void DolphinIconsView::contentsDragMoveEvent(QDragMoveEvent* event) void DolphinIconsView::contentsDragMoveEvent(TQDragMoveEvent* event)
{ {
KFileIconView::contentsDragMoveEvent(event); KFileIconView::contentsDragMoveEvent(event);
// If a dragging is done above a directory, show the icon as 'active' for // If a dragging is done above a directory, show the icon as 'active' for
// a visual feedback // a visual feedback
KFileIconViewItem* item = static_cast<KFileIconViewItem*>(findItem(contentsToViewport(event->pos()))); KFileIconViewItem* item = static_cast<KFileIconViewItem*>(tqfindItem(contentsToViewport(event->pos())));
bool showActive = false; bool showActive = false;
if (item != 0) { if (item != 0) {
@ -376,7 +376,7 @@ void DolphinIconsView::contentsDragMoveEvent(QDragMoveEvent* event)
} }
} }
void DolphinIconsView::contentsDropEvent(QDropEvent* event) void DolphinIconsView::contentsDropEvent(TQDropEvent* event)
{ {
// TODO: Most of the following code is a copy of // TODO: Most of the following code is a copy of
// KFileIconView::contentsDropEvent. See comment in // KFileIconView::contentsDropEvent. See comment in
@ -387,11 +387,11 @@ void DolphinIconsView::contentsDropEvent(QDropEvent* event)
return; return;
} }
KFileIconViewItem* item = static_cast<KFileIconViewItem*>(findItem(contentsToViewport(event->pos()))); KFileIconViewItem* item = static_cast<KFileIconViewItem*>(tqfindItem(contentsToViewport(event->pos())));
const bool accept = KURLDrag::canDecode(event) && const bool accept = KURLDrag::canDecode(event) &&
(event->action() == QDropEvent::Copy || (event->action() == TQDropEvent::Copy ||
event->action() == QDropEvent::Move || event->action() == TQDropEvent::Move ||
event->action() == QDropEvent::Link ) && event->action() == TQDropEvent::Link ) &&
(item != 0); (item != 0);
if (!accept) { if (!accept) {
return; return;
@ -410,7 +410,7 @@ void DolphinIconsView::contentsDropEvent(QDropEvent* event)
} }
} }
void DolphinIconsView::slotOnItem(QIconViewItem* item) void DolphinIconsView::slotOnItem(TQIconViewItem* item)
{ {
assert(item != 0); assert(item != 0);
activateItem(reinterpret_cast<void*>(item)); activateItem(reinterpret_cast<void*>(item));
@ -425,8 +425,8 @@ void DolphinIconsView::slotOnViewport()
m_dolphinView->requestItemInfo(KURL()); m_dolphinView->requestItemInfo(KURL());
} }
void DolphinIconsView::slotContextMenuRequested(QIconViewItem* item, void DolphinIconsView::slotContextMenuRequested(TQIconViewItem* item,
const QPoint& pos) const TQPoint& pos)
{ {
KFileItem* fileInfo = 0; KFileItem* fileInfo = 0;
if (item != 0) { if (item != 0) {
@ -435,8 +435,8 @@ void DolphinIconsView::slotContextMenuRequested(QIconViewItem* item,
m_dolphinView->openContextMenu(fileInfo, pos); m_dolphinView->openContextMenu(fileInfo, pos);
} }
void DolphinIconsView::slotItemRenamed(QIconViewItem* item, void DolphinIconsView::slotItemRenamed(TQIconViewItem* item,
const QString& name) const TQString& name)
{ {
KFileItem* fileInfo = static_cast<KFileIconViewItem*>(item)->fileInfo(); KFileItem* fileInfo = static_cast<KFileIconViewItem*>(item)->fileInfo();
m_dolphinView->rename(KURL(fileInfo->url()), name); m_dolphinView->rename(KURL(fileInfo->url()), name);
@ -447,17 +447,17 @@ void DolphinIconsView::slotActivationUpdate()
update(); update();
// TODO: there must be a simpler way to say // TODO: there must be a simpler way to say
// "update all children" // "update all tqchildren"
const QObjectList* list = children(); const TQObjectList list = childrenListObject();
if (list == 0) { if (list.isEmpty()) {
return; return;
} }
QObjectListIterator it(*list); TQObjectListIterator it(list);
QObject* object = 0; TQObject* object = 0;
while ((object = it.current()) != 0) { while ((object = it.current()) != 0) {
if (object->inherits("QWidget")) { if (object->inherits(TQWIDGET_OBJECT_NAME_STRING)) {
QWidget* widget = static_cast<QWidget*>(object); TQWidget* widget = TQT_TQWIDGET(object);
widget->update(); widget->update();
} }
++it; ++it;

@ -22,7 +22,7 @@
#define DOLPHINICONSVIEW_H #define DOLPHINICONSVIEW_H
#include <kfileiconview.h> #include <kfileiconview.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <kurl.h> #include <kurl.h>
#include <itemeffectsmanager.h> #include <itemeffectsmanager.h>
@ -39,6 +39,7 @@ class DolphinView;
class DolphinIconsView : public KFileIconView, public ItemEffectsManager class DolphinIconsView : public KFileIconView, public ItemEffectsManager
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
enum LayoutMode { enum LayoutMode {
@ -46,12 +47,12 @@ public:
Previews Previews
}; };
DolphinIconsView(DolphinView *parent, LayoutMode layoutMode); DolphinIconsView(DolphinView *tqparent, LayoutMode tqlayoutMode);
virtual ~DolphinIconsView(); virtual ~DolphinIconsView();
void setLayoutMode(LayoutMode mode); void setLayoutMode(LayoutMode mode);
LayoutMode layoutMode() const { return m_layoutMode; } LayoutMode tqlayoutMode() const { return m_tqlayoutMode; }
/** @see ItemEffectsManager::updateItems */ /** @see ItemEffectsManager::updateItems */
virtual void beginItemUpdates(); virtual void beginItemUpdates();
@ -64,7 +65,7 @@ public:
* the details view. * the details view.
*/ */
// TODO: Other view implementations use a similar interface. When using // TODO: Other view implementations use a similar interface. When using
// Interview in Qt4 this method should be moved to a base class (currently // Interview in TQt4 this method should be moved to a base class (currently
// not possible due to having different base classes for the views). // not possible due to having different base classes for the views).
void refreshSettings(); void refreshSettings();
@ -82,7 +83,7 @@ public:
public slots: public slots:
/** /**
* Bypass a layout issue in KFileIconView in combination with previews. * Bypass a tqlayout issue in KFileIconView in combination with previews.
* @see KFileIconView::arrangeItemsInGrid * @see KFileIconView::arrangeItemsInGrid
*/ */
virtual void arrangeItemsInGrid(bool updated = true); virtual void arrangeItemsInGrid(bool updated = true);
@ -97,10 +98,10 @@ signals:
protected: protected:
/** @see ItemEffectsManager::setContextPixmap */ /** @see ItemEffectsManager::setContextPixmap */
virtual void setContextPixmap(void* context, virtual void setContextPixmap(void* context,
const QPixmap& pixmap); const TQPixmap& pixmap);
/** @see ItemEffectsManager::contextPixmap */ /** @see ItemEffectsManager::contextPixmap */
virtual const QPixmap* contextPixmap(void* context); virtual const TQPixmap* contextPixmap(void* context);
/** @see ItemEffectsManager::firstContext */ /** @see ItemEffectsManager::firstContext */
virtual void* firstContext(); virtual void* firstContext();
@ -112,29 +113,29 @@ protected:
virtual KFileItem* contextFileInfo(void* context); virtual KFileItem* contextFileInfo(void* context);
/** @see KFileIconView::contentsMousePressEvent */ /** @see KFileIconView::contentsMousePressEvent */
virtual void contentsMousePressEvent(QMouseEvent* event); virtual void contentsMousePressEvent(TQMouseEvent* event);
/** @see KFileIconView::contentsMouseReleaseEvent */ /** @see KFileIconView::contentsMouseReleaseEvent */
virtual void contentsMouseReleaseEvent(QMouseEvent* event); virtual void contentsMouseReleaseEvent(TQMouseEvent* event);
/** @see KFileIconView::drawBackground */ /** @see KFileIconView::drawBackground */
virtual void drawBackground(QPainter* painter, const QRect& rect); virtual void drawBackground(TQPainter* painter, const TQRect& rect);
/** @see KFileIconView::dragObject */ /** @see KFileIconView::dragObject */
virtual QDragObject* dragObject(); virtual TQDragObject* dragObject();
/** @see KFileIconView::contentsDragEnterEvent */ /** @see KFileIconView::contentsDragEnterEvent */
virtual void contentsDragEnterEvent(QDragEnterEvent* event); virtual void contentsDragEnterEvent(TQDragEnterEvent* event);
/** @see KFileIconView::contentsDragMoveEvent */ /** @see KFileIconView::contentsDragMoveEvent */
virtual void contentsDragMoveEvent(QDragMoveEvent* event); virtual void contentsDragMoveEvent(TQDragMoveEvent* event);
/** @see KFileIconView::contentsDropEvent */ /** @see KFileIconView::contentsDropEvent */
virtual void contentsDropEvent(QDropEvent* event); virtual void contentsDropEvent(TQDropEvent* event);
private slots: private slots:
/** Is connected to the onItem-signal from KFileIconView. */ /** Is connected to the onItem-signal from KFileIconView. */
void slotOnItem(QIconViewItem* item); void slotOnItem(TQIconViewItem* item);
/** Is connected to the onViewport-signal from KFileIconView. */ /** Is connected to the onViewport-signal from KFileIconView. */
void slotOnViewport(); void slotOnViewport();
@ -143,19 +144,19 @@ private slots:
* Opens the context menu for the item \a item on the given * Opens the context menu for the item \a item on the given
* position \a pos. * position \a pos.
*/ */
void slotContextMenuRequested(QIconViewItem* item, void slotContextMenuRequested(TQIconViewItem* item,
const QPoint& pos); const TQPoint& pos);
/** Renames the item \a item to the name \a name. */ /** Renames the item \a item to the name \a name. */
void slotItemRenamed(QIconViewItem* item, void slotItemRenamed(TQIconViewItem* item,
const QString& name); const TQString& name);
void slotActivationUpdate(); void slotActivationUpdate();
void slotUpdateDisabledItems(); void slotUpdateDisabledItems();
private: private:
int m_previewIconSize; int m_previewIconSize;
LayoutMode m_layoutMode; LayoutMode m_tqlayoutMode;
DolphinView* m_dolphinView; DolphinView* m_dolphinView;
/** Returns the increased icon size for the size \a size. */ /** Returns the increased icon size for the size \a size. */

@ -25,8 +25,8 @@
#include <assert.h> #include <assert.h>
DolphinIconsViewSettings::DolphinIconsViewSettings(DolphinIconsView::LayoutMode mode) : DolphinIconsViewSettings::DolphinIconsViewSettings(DolphinIconsView::LayoutMode mode) :
m_arrangement(QIconView::LeftToRight), m_arrangement(TQIconView::LeftToRight),
m_layoutMode(mode), m_tqlayoutMode(mode),
m_iconSize(KIcon::SizeMedium), m_iconSize(KIcon::SizeMedium),
m_previewSize(KIcon::SizeMedium), m_previewSize(KIcon::SizeMedium),
m_gridWidth(0), m_gridWidth(0),
@ -45,12 +45,12 @@ DolphinIconsViewSettings::DolphinIconsViewSettings(DolphinIconsView::LayoutMode
} }
// read arrangement // read arrangement
const QString arrangement(config->readEntry("Arrangement")); const TQString arrangement(config->readEntry("Arrangement"));
if (arrangement == "Left to Right") { if (arrangement == "Left to Right") {
m_arrangement = QIconView::LeftToRight; m_arrangement = TQIconView::LeftToRight;
} }
else if (arrangement == "Top to Bottom") { else if (arrangement == "Top to Bottom") {
m_arrangement = QIconView::TopToBottom; m_arrangement = TQIconView::TopToBottom;
} }
// read preview size, grid width and grid height // read preview size, grid width and grid height
@ -79,7 +79,7 @@ DolphinIconsViewSettings::DolphinIconsViewSettings(DolphinIconsView::LayoutMode
m_fontSize = config->readNumEntry("Font Size", -1); m_fontSize = config->readNumEntry("Font Size", -1);
m_fontFamily = config->readEntry("Font Family"); m_fontFamily = config->readEntry("Font Family");
const QFont font(KGlobalSettings::generalFont()); const TQFont font(KGlobalSettings::generalFont());
if (m_fontSize < 0) { if (m_fontSize < 0) {
m_fontSize = font.pointSize(); m_fontSize = font.pointSize();
} }
@ -121,7 +121,7 @@ void DolphinIconsViewSettings::save()
setConfigGroup(config); setConfigGroup(config);
config->writeEntry("Icon Size", m_iconSize); config->writeEntry("Icon Size", m_iconSize);
if (m_arrangement == QIconView::LeftToRight) { if (m_arrangement == TQIconView::LeftToRight) {
config->writeEntry("Arrangement", "Left to Right"); config->writeEntry("Arrangement", "Left to Right");
} }
else { else {
@ -140,7 +140,7 @@ void DolphinIconsViewSettings::save()
void DolphinIconsViewSettings::calculateGridSize(int hint) void DolphinIconsViewSettings::calculateGridSize(int hint)
{ {
const int maxSize = (m_previewSize > m_iconSize) ? m_previewSize : m_iconSize; const int maxSize = (m_previewSize > m_iconSize) ? m_previewSize : m_iconSize;
if (m_arrangement == QIconView::LeftToRight) { if (m_arrangement == TQIconView::LeftToRight) {
int widthUnit = maxSize + (maxSize / 2); int widthUnit = maxSize + (maxSize / 2);
if (widthUnit < KIcon::SizeLarge) { if (widthUnit < KIcon::SizeLarge) {
widthUnit = KIcon::SizeLarge; widthUnit = KIcon::SizeLarge;
@ -157,7 +157,7 @@ void DolphinIconsViewSettings::calculateGridSize(int hint)
} }
} }
else { else {
assert(m_arrangement == QIconView::TopToBottom); assert(m_arrangement == TQIconView::TopToBottom);
m_gridWidth = maxSize + (hint + 1) * (8 * m_fontSize); m_gridWidth = maxSize + (hint + 1) * (8 * m_fontSize);
// The height-setting is ignored yet by KFileIconView if the TopToBottom // The height-setting is ignored yet by KFileIconView if the TopToBottom
@ -170,7 +170,7 @@ int DolphinIconsViewSettings::textWidthHint() const
{ {
const int maxSize = (m_previewSize > m_iconSize) ? m_previewSize : m_iconSize; const int maxSize = (m_previewSize > m_iconSize) ? m_previewSize : m_iconSize;
int hint = 0; int hint = 0;
if (m_arrangement == QIconView::LeftToRight) { if (m_arrangement == TQIconView::LeftToRight) {
int widthUnit = maxSize + (maxSize / 2); int widthUnit = maxSize + (maxSize / 2);
if (widthUnit < KIcon::SizeLarge) { if (widthUnit < KIcon::SizeLarge) {
widthUnit = KIcon::SizeLarge; widthUnit = KIcon::SizeLarge;
@ -178,7 +178,7 @@ int DolphinIconsViewSettings::textWidthHint() const
hint = (m_gridWidth - widthUnit) / KIcon::SizeLarge; hint = (m_gridWidth - widthUnit) / KIcon::SizeLarge;
} }
else { else {
assert(m_arrangement == QIconView::TopToBottom); assert(m_arrangement == TQIconView::TopToBottom);
hint = (m_gridWidth - maxSize) / (8 * m_fontSize) - 1; hint = (m_gridWidth - maxSize) / (8 * m_fontSize) - 1;
if (hint > 2) { if (hint > 2) {
hint = 2; hint = 2;
@ -189,7 +189,7 @@ int DolphinIconsViewSettings::textWidthHint() const
void DolphinIconsViewSettings::setConfigGroup(KConfig* config) void DolphinIconsViewSettings::setConfigGroup(KConfig* config)
{ {
if (m_layoutMode == DolphinIconsView::Previews) { if (m_tqlayoutMode == DolphinIconsView::Previews) {
config->setGroup("Previews Mode"); config->setGroup("Previews Mode");
} }
else { else {

@ -20,8 +20,8 @@
#ifndef DOLPHINICONSVIEWSETTINGS_H #ifndef DOLPHINICONSVIEWSETTINGS_H
#define DOLPHINICONSVIEWSETTINGS_H #define DOLPHINICONSVIEWSETTINGS_H
#include <qstring.h> #include <tqstring.h>
#include <qiconview.h> #include <tqiconview.h>
#include <dolphinview.h> #include <dolphinview.h>
#include <dolphiniconsview.h> #include <dolphiniconsview.h>
#include <dolphinsettingsbase.h> #include <dolphinsettingsbase.h>
@ -30,7 +30,7 @@
* @brief Contains the settings for the icons view. * @brief Contains the settings for the icons view.
* *
* The following properties are stored: * The following properties are stored:
* - layout mode (icons or previews) * - tqlayout mode (icons or previews)
* - icon size * - icon size
* - preview size * - preview size
* - grid width, height and spacing * - grid width, height and spacing
@ -69,11 +69,11 @@ public:
void setGridSpacing(int spacing); void setGridSpacing(int spacing);
int gridSpacing() const { return m_gridSpacing; } int gridSpacing() const { return m_gridSpacing; }
void setArrangement(QIconView::Arrangement arrangement) { m_arrangement = arrangement; } void setArrangement(TQIconView::Arrangement arrangement) { m_arrangement = arrangement; }
QIconView::Arrangement arrangement() const { return m_arrangement; } TQIconView::Arrangement arrangement() const { return m_arrangement; }
void setFontFamily(const QString& family) { m_fontFamily = family; } void setFontFamily(const TQString& family) { m_fontFamily = family; }
const QString& fontFamily() const { return m_fontFamily; } const TQString& fontFamily() const { return m_fontFamily; }
void setFontSize(int size) { m_fontSize = size; } void setFontSize(int size) { m_fontSize = size; }
int fontSize() const { return m_fontSize; } int fontSize() const { return m_fontSize; }
@ -92,11 +92,11 @@ public:
* DolhinIconsViewSettings::textWidthHint. * DolhinIconsViewSettings::textWidthHint.
* *
* The calculation of the grid width and grid height is a little bit tricky, * The calculation of the grid width and grid height is a little bit tricky,
* as the user model does not fit to the implementation model of QIconView. The user model * as the user model does not fit to the implementation model of TQIconView. The user model
* allows to specify icon-, preview- and text width sizes, whereas the implementation * allows to specify icon-, preview- and text width sizes, whereas the implementation
* model expects only a grid width and height. The nasty thing is that the specified * model expects only a grid width and height. The nasty thing is that the specified
* width and height varies dependant from the arrangement (e. g. the height is totally * width and height varies dependant from the arrangement (e. g. the height is totally
* ignored for the top-to-bottom arrangement inside QIconView). * ignored for the top-to-bottom arrangement inside TQIconView).
*/ */
void calculateGridSize(int hint); void calculateGridSize(int hint);
@ -109,8 +109,8 @@ public:
int textWidthHint() const; int textWidthHint() const;
private: private:
QIconView::Arrangement m_arrangement; TQIconView::Arrangement m_arrangement;
DolphinIconsView::LayoutMode m_layoutMode; DolphinIconsView::LayoutMode m_tqlayoutMode;
int m_iconSize; int m_iconSize;
int m_previewSize; int m_previewSize;
int m_gridWidth; int m_gridWidth;
@ -118,7 +118,7 @@ private:
int m_gridSpacing; int m_gridSpacing;
int m_fontSize; int m_fontSize;
int m_textlinesCount; int m_textlinesCount;
QString m_fontFamily; TQString m_fontFamily;
void setConfigGroup(KConfig* config); void setConfigGroup(KConfig* config);
}; };

@ -19,7 +19,7 @@
***************************************************************************/ ***************************************************************************/
#include "dolphinsettings.h" #include "dolphinsettings.h"
#include <qdir.h> #include <tqdir.h>
#include <kapplication.h> #include <kapplication.h>
#include <kbookmark.h> #include <kbookmark.h>
@ -55,7 +55,7 @@ DolphinSettings::DolphinSettings() :
{ {
KConfig* config = kapp->config(); KConfig* config = kapp->config();
config->setGroup("General"); config->setGroup("General");
m_homeURL = KURL(config->readEntry("Home URL", QDir::homeDirPath())); m_homeURL = KURL(config->readEntry("Home URL", TQDir::homeDirPath()));
m_defaultMode = static_cast<DolphinView::Mode>(config->readNumEntry("Default View Mode", DolphinView::IconsView)); m_defaultMode = static_cast<DolphinView::Mode>(config->readNumEntry("Default View Mode", DolphinView::IconsView));
m_isViewSplit = config->readBoolEntry("Split View", false); m_isViewSplit = config->readBoolEntry("Split View", false);
m_isSaveView = config->readBoolEntry("Save View", false); m_isSaveView = config->readBoolEntry("Save View", false);
@ -109,9 +109,9 @@ DolphinIconsViewSettings* DolphinSettings::iconsView(DolphinIconsView::LayoutMod
KBookmarkManager* DolphinSettings::bookmarkManager() const KBookmarkManager* DolphinSettings::bookmarkManager() const
{ {
QString basePath = KGlobal::instance()->instanceName(); TQString basePath = KGlobal::instance()->instanceName();
basePath.append("/bookmarks.xml"); basePath.append("/bookmarks.xml");
const QString file = locateLocal("data", basePath); const TQString file = locateLocal("data", basePath);
return KBookmarkManager::managerForFile(file, false); return KBookmarkManager::managerForFile(file, false);
} }
@ -133,9 +133,9 @@ void DolphinSettings::save()
m_leftsidebar->save(); m_leftsidebar->save();
m_rightsidebar->save(); m_rightsidebar->save();
QString basePath = KGlobal::instance()->instanceName(); TQString basePath = KGlobal::instance()->instanceName();
basePath.append("/bookmarks.xml"); basePath.append("/bookmarks.xml");
const QString file = locateLocal( "data", basePath); const TQString file = locateLocal( "data", basePath);
KBookmarkManager* manager = KBookmarkManager::managerForFile(file, false); KBookmarkManager* manager = KBookmarkManager::managerForFile(file, false);
manager->save(false); manager->save(false);

@ -21,7 +21,7 @@
#ifndef DOLPHINSETTINGS_H #ifndef DOLPHINSETTINGS_H
#define DOLPHINSETTINGS_H #define DOLPHINSETTINGS_H
#include <qvaluelist.h> #include <tqvaluelist.h>
#include <dolphiniconsview.h> #include <dolphiniconsview.h>
#include <dolphinview.h> #include <dolphinview.h>

@ -31,19 +31,19 @@ DolphinSettingsDialog::DolphinSettingsDialog() :
Ok|Apply|Cancel, Ok) Ok|Apply|Cancel, Ok)
{ {
KIconLoader iconLoader; KIconLoader iconLoader;
QFrame* generalSettingsFrame = addPage(i18n("General"), 0, TQFrame* generalSettingsFrame = addPage(i18n("General"), 0,
iconLoader.loadIcon("exec", iconLoader.loadIcon("exec",
KIcon::NoGroup, KIcon::NoGroup,
KIcon::SizeMedium)); KIcon::SizeMedium));
m_generalSettingsPage = new GeneralSettingsPage(generalSettingsFrame); m_generalSettingsPage = new GeneralSettingsPage(generalSettingsFrame);
QFrame* viewSettingsFrame = addPage(i18n("View Modes"), 0, TQFrame* viewSettingsFrame = addPage(i18n("View Modes"), 0,
iconLoader.loadIcon("view_choose", iconLoader.loadIcon("view_choose",
KIcon::NoGroup, KIcon::NoGroup,
KIcon::SizeMedium)); KIcon::SizeMedium));
m_viewSettingsPage = new ViewSettingsPage(viewSettingsFrame); m_viewSettingsPage = new ViewSettingsPage(viewSettingsFrame);
QFrame* bookmarksSettingsFrame = addPage(i18n("Bookmarks"), 0, TQFrame* bookmarksSettingsFrame = addPage(i18n("Bookmarks"), 0,
iconLoader.loadIcon("bookmark", iconLoader.loadIcon("bookmark",
KIcon::NoGroup, KIcon::NoGroup,
KIcon::SizeMedium)); KIcon::SizeMedium));

@ -36,6 +36,7 @@ class BookmarksSettingsPage;
*/ */
class DolphinSettingsDialog : public KDialogBase { class DolphinSettingsDialog : public KDialogBase {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
DolphinSettingsDialog(); DolphinSettingsDialog();

@ -20,44 +20,44 @@
#include "dolphinstatusbar.h" #include "dolphinstatusbar.h"
#include <kprogress.h> #include <kprogress.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qtimer.h> #include <tqtimer.h>
#include <kiconloader.h> #include <kiconloader.h>
#include "dolphinview.h" #include "dolphinview.h"
#include "statusbarmessagelabel.h" #include "statusbarmessagelabel.h"
#include "statusbarspaceinfo.h" #include "statusbarspaceinfo.h"
DolphinStatusBar::DolphinStatusBar(DolphinView* parent) : DolphinStatusBar::DolphinStatusBar(DolphinView* tqparent) :
QHBox(parent), TQHBox(tqparent),
m_messageLabel(0), m_messageLabel(0),
m_spaceInfo(0), m_spaceInfo(0),
m_progressBar(0), m_progressBar(0),
m_progress(100) m_progress(100)
{ {
m_messageLabel = new StatusBarMessageLabel(this); m_messageLabel = new StatusBarMessageLabel(this);
m_messageLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed); m_messageLabel->tqsetSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed);
m_spaceInfo = new StatusBarSpaceInfo(this); m_spaceInfo = new StatusBarSpaceInfo(this);
m_spaceInfo->setURL(parent->url()); m_spaceInfo->setURL(tqparent->url());
m_progressText = new QLabel(this); m_progressText = new TQLabel(this);
m_progressText->hide(); m_progressText->hide();
m_progressBar = new KProgress(this); m_progressBar = new KProgress(this);
m_progressBar->hide(); m_progressBar->hide();
m_progressTimer = new QTimer(this); m_progressTimer = new TQTimer(this);
connect(m_progressTimer, SIGNAL(timeout()), connect(m_progressTimer, TQT_SIGNAL(timeout()),
this, SLOT(slotProgressTimer())); this, TQT_SLOT(slotProgressTimer()));
const QSize size(m_progressBar->sizeHint()); const TQSize size(m_progressBar->tqsizeHint());
m_progressBar->setMaximumWidth(size.width()); m_progressBar->setMaximumWidth(size.width());
setMinimumHeight(size.height()); setMinimumHeight(size.height());
m_messageLabel->setMinimumTextHeight(size.height()); m_messageLabel->setMinimumTextHeight(size.height());
connect(parent, SIGNAL(signalURLChanged(const KURL&)), connect(tqparent, TQT_SIGNAL(signalURLChanged(const KURL&)),
this, SLOT(slotURLChanged(const KURL&))); this, TQT_SLOT(slotURLChanged(const KURL&)));
} }
@ -65,7 +65,7 @@ DolphinStatusBar::~DolphinStatusBar()
{ {
} }
void DolphinStatusBar::setMessage(const QString& msg, void DolphinStatusBar::setMessage(const TQString& msg,
Type type) Type type)
{ {
m_messageLabel->setText(msg); m_messageLabel->setText(msg);
@ -89,17 +89,17 @@ DolphinStatusBar::Type DolphinStatusBar::type() const
return m_messageLabel->type(); return m_messageLabel->type();
} }
QString DolphinStatusBar::message() const TQString DolphinStatusBar::message() const
{ {
return m_messageLabel->text(); return m_messageLabel->text();
} }
void DolphinStatusBar::setProgressText(const QString& text) void DolphinStatusBar::setProgressText(const TQString& text)
{ {
m_progressText->setText(text); m_progressText->setText(text);
} }
QString DolphinStatusBar::progressText() const TQString DolphinStatusBar::progressText() const
{ {
return m_progressText->text(); return m_progressText->text();
} }
@ -117,10 +117,10 @@ void DolphinStatusBar::setProgress(int percent)
m_progressBar->setProgress(m_progress); m_progressBar->setProgress(m_progress);
m_progressTimer->start(300, true); m_progressTimer->start(300, true);
const QString msg(m_messageLabel->text()); const TQString msg(m_messageLabel->text());
if (msg.isEmpty() || (msg == m_defaultText)) { if (msg.isEmpty() || (msg == m_defaultText)) {
if (percent == 0) { if (percent == 0) {
m_messageLabel->setText(QString::null); m_messageLabel->setText(TQString());
m_messageLabel->setType(Default); m_messageLabel->setType(Default);
} }
else if (percent == 100) { else if (percent == 100) {
@ -137,7 +137,7 @@ void DolphinStatusBar::clear()
m_messageLabel->setType(Default); m_messageLabel->setType(Default);
} }
void DolphinStatusBar::setDefaultText(const QString& text) void DolphinStatusBar::setDefaultText(const TQString& text)
{ {
m_defaultText = text; m_defaultText = text;
} }

@ -21,10 +21,10 @@
#ifndef DOLPHINSTATUSBAR_H #ifndef DOLPHINSTATUSBAR_H
#define DOLPHINSTATUSBAR_H #define DOLPHINSTATUSBAR_H
#include <qhbox.h> #include <tqhbox.h>
class KProgress; class KProgress;
class QLabel; class TQLabel;
class QTimer; class TQTimer;
class StatusBarMessageLabel; class StatusBarMessageLabel;
class StatusBarSpaceInfo; class StatusBarSpaceInfo;
class DolphinView; class DolphinView;
@ -38,8 +38,9 @@ class KURL;
* *
* @author Peter Penz * @author Peter Penz
*/ */
class DolphinStatusBar : public QHBox { class DolphinStatusBar : public TQHBox {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
/** /**
@ -54,7 +55,7 @@ public:
Error Error
}; };
DolphinStatusBar(DolphinView* parent = 0); DolphinStatusBar(DolphinView* tqparent = 0);
virtual ~DolphinStatusBar(); virtual ~DolphinStatusBar();
/** /**
@ -68,9 +69,9 @@ public:
* with the type Type::Error is set, the progress * with the type Type::Error is set, the progress
* is cleared automatically. * is cleared automatically.
*/ */
void setMessage(const QString& msg, Type type); void setMessage(const TQString& msg, Type type);
QString message() const; TQString message() const;
Type type() const; Type type() const;
/** /**
@ -82,8 +83,8 @@ public:
* no flickering occurs for showing a progress of fast * no flickering occurs for showing a progress of fast
* operations. * operations.
*/ */
void setProgressText(const QString& text); void setProgressText(const TQString& text);
QString progressText() const; TQString progressText() const;
/** /**
* Sets the progress in percent (0 - 100). The * Sets the progress in percent (0 - 100). The
@ -108,8 +109,8 @@ public:
* Sets the default text, which is shown if the status bar * Sets the default text, which is shown if the status bar
* is cleared by DolphinStatusBar::clear(). * is cleared by DolphinStatusBar::clear().
*/ */
void setDefaultText(const QString& text); void setDefaultText(const TQString& text);
const QString& defaultText() const { return m_defaultText; } const TQString& defaultText() const { return m_defaultText; }
private slots: private slots:
void slotProgressTimer(); void slotProgressTimer();
@ -123,11 +124,11 @@ private slots:
private: private:
StatusBarMessageLabel* m_messageLabel; StatusBarMessageLabel* m_messageLabel;
StatusBarSpaceInfo* m_spaceInfo; StatusBarSpaceInfo* m_spaceInfo;
QLabel* m_progressText; TQLabel* m_progressText;
KProgress* m_progressBar; KProgress* m_progressBar;
QTimer* m_progressTimer; TQTimer* m_progressTimer;
int m_progress; int m_progress;
QString m_defaultText; TQString m_defaultText;
}; };
#endif #endif

@ -20,7 +20,7 @@
#include "dolphinview.h" #include "dolphinview.h"
#include <qlayout.h> #include <tqlayout.h>
#include <kurl.h> #include <kurl.h>
#include <klocale.h> #include <klocale.h>
#include <kio/netaccess.h> #include <kio/netaccess.h>
@ -41,11 +41,11 @@
#include "filterbar.h" #include "filterbar.h"
DolphinView::DolphinView(QWidget *parent, DolphinView::DolphinView(TQWidget *tqparent,
const KURL& url, const KURL& url,
Mode mode, Mode mode,
bool showHiddenFiles) : bool showHiddenFiles) :
QWidget(parent), TQWidget(tqparent),
m_refreshing(false), m_refreshing(false),
m_showProgress(false), m_showProgress(false),
m_mode(mode), m_mode(mode),
@ -57,27 +57,27 @@ DolphinView::DolphinView(QWidget *parent,
m_fileCount(0), m_fileCount(0),
m_filterBar(0) m_filterBar(0)
{ {
setFocusPolicy(QWidget::StrongFocus); setFocusPolicy(TQ_StrongFocus);
m_topLayout = new QVBoxLayout(this); m_topLayout = new TQVBoxLayout(this);
Dolphin& dolphin = Dolphin::mainWin(); Dolphin& dolphin = Dolphin::mainWin();
connect(this, SIGNAL(signalModeChanged()), connect(this, TQT_SIGNAL(signalModeChanged()),
&dolphin, SLOT(slotViewModeChanged())); &dolphin, TQT_SLOT(slotViewModeChanged()));
connect(this, SIGNAL(signalShowHiddenFilesChanged()), connect(this, TQT_SIGNAL(signalShowHiddenFilesChanged()),
&dolphin, SLOT(slotShowHiddenFilesChanged())); &dolphin, TQT_SLOT(slotShowHiddenFilesChanged()));
connect(this, SIGNAL(signalSortingChanged(DolphinView::Sorting)), connect(this, TQT_SIGNAL(signalSortingChanged(DolphinView::Sorting)),
&dolphin, SLOT(slotSortingChanged(DolphinView::Sorting))); &dolphin, TQT_SLOT(slotSortingChanged(DolphinView::Sorting)));
connect(this, SIGNAL(signalSortOrderChanged(Qt::SortOrder)), connect(this, TQT_SIGNAL(signalSortOrderChanged(TQt::SortOrder)),
&dolphin, SLOT(slotSortOrderChanged(Qt::SortOrder))); &dolphin, TQT_SLOT(slotSortOrderChanged(TQt::SortOrder)));
m_urlNavigator = new URLNavigator(url, this); m_urlNavigator = new URLNavigator(url, this);
connect(m_urlNavigator, SIGNAL(urlChanged(const KURL&)), connect(m_urlNavigator, TQT_SIGNAL(urlChanged(const KURL&)),
this, SLOT(slotURLChanged(const KURL&))); this, TQT_SLOT(slotURLChanged(const KURL&)));
connect(m_urlNavigator, SIGNAL(urlChanged(const KURL&)), connect(m_urlNavigator, TQT_SIGNAL(urlChanged(const KURL&)),
&dolphin, SLOT(slotURLChanged(const KURL&))); &dolphin, TQT_SLOT(slotURLChanged(const KURL&)));
connect(m_urlNavigator, SIGNAL(historyChanged()), connect(m_urlNavigator, TQT_SIGNAL(historyChanged()),
&dolphin, SLOT(slotHistoryChanged())); &dolphin, TQT_SLOT(slotHistoryChanged()));
m_statusBar = new DolphinStatusBar(this); m_statusBar = new DolphinStatusBar(this);
@ -85,22 +85,22 @@ DolphinView::DolphinView(QWidget *parent,
m_dirLister->setAutoUpdate(true); m_dirLister->setAutoUpdate(true);
m_dirLister->setMainWindow(this); m_dirLister->setMainWindow(this);
m_dirLister->setShowingDotFiles(showHiddenFiles); m_dirLister->setShowingDotFiles(showHiddenFiles);
connect(m_dirLister, SIGNAL(clear()), connect(m_dirLister, TQT_SIGNAL(clear()),
this, SLOT(slotClear())); this, TQT_SLOT(slotClear()));
connect(m_dirLister, SIGNAL(percent(int)), connect(m_dirLister, TQT_SIGNAL(percent(int)),
this, SLOT(slotPercent(int))); this, TQT_SLOT(slotPercent(int)));
connect(m_dirLister, SIGNAL(deleteItem(KFileItem*)), connect(m_dirLister, TQT_SIGNAL(deleteItem(KFileItem*)),
this, SLOT(slotDeleteItem(KFileItem*))); this, TQT_SLOT(slotDeleteItem(KFileItem*)));
connect(m_dirLister, SIGNAL(completed()), connect(m_dirLister, TQT_SIGNAL(completed()),
this, SLOT(slotCompleted())); this, TQT_SLOT(slotCompleted()));
connect(m_dirLister, SIGNAL(infoMessage(const QString&)), connect(m_dirLister, TQT_SIGNAL(infoMessage(const TQString&)),
this, SLOT(slotInfoMessage(const QString&))); this, TQT_SLOT(slotInfoMessage(const TQString&)));
connect(m_dirLister, SIGNAL(errorMessage(const QString&)), connect(m_dirLister, TQT_SIGNAL(errorMessage(const TQString&)),
this, SLOT(slotErrorMessage(const QString&))); this, TQT_SLOT(slotErrorMessage(const TQString&)));
connect(m_dirLister, SIGNAL(refreshItems (const KFileItemList&)), connect(m_dirLister, TQT_SIGNAL(refreshItems (const KFileItemList&)),
this, SLOT(slotRefreshItems(const KFileItemList&))); this, TQT_SLOT(slotRefreshItems(const KFileItemList&)));
connect(m_dirLister, SIGNAL(newItems(const KFileItemList&)), connect(m_dirLister, TQT_SIGNAL(newItems(const KFileItemList&)),
this, SLOT(slotAddItems(const KFileItemList&))); this, TQT_SLOT(slotAddItems(const KFileItemList&)));
m_iconSize = KIcon::SizeMedium; m_iconSize = KIcon::SizeMedium;
@ -110,8 +110,8 @@ DolphinView::DolphinView(QWidget *parent,
m_filterBar = new FilterBar(this); m_filterBar = new FilterBar(this);
m_filterBar->hide(); m_filterBar->hide();
m_topLayout->addWidget(m_filterBar); m_topLayout->addWidget(m_filterBar);
connect(m_filterBar, SIGNAL(signalFilterChanged(const QString&)), connect(m_filterBar, TQT_SIGNAL(signalFilterChanged(const TQString&)),
this, SLOT(slotChangeNameFilter(const QString&))); this, TQT_SLOT(slotChangeNameFilter(const TQString&)));
m_topLayout->addWidget(m_statusBar); m_topLayout->addWidget(m_statusBar);
} }
@ -148,8 +148,8 @@ void DolphinView::setMode(Mode mode)
return; // the wished mode is already set return; // the wished mode is already set
} }
QWidget* view = (m_iconsView != 0) ? static_cast<QWidget*>(m_iconsView) : TQWidget* view = (m_iconsView != 0) ? static_cast<TQWidget*>(m_iconsView) :
static_cast<QWidget*>(m_detailsView); static_cast<TQWidget*>(m_detailsView);
if (view != 0) { if (view != 0) {
m_topLayout->remove(view); m_topLayout->remove(view);
view->close(); view->close();
@ -210,12 +210,12 @@ void DolphinView::renameSelectedItems()
// More than one item has been selected for renaming. Open // More than one item has been selected for renaming. Open
// a rename dialog and rename all items afterwards. // a rename dialog and rename all items afterwards.
RenameDialog dialog(urls); RenameDialog dialog(urls);
if (dialog.exec() == QDialog::Rejected) { if (dialog.exec() == TQDialog::Rejected) {
return; return;
} }
DolphinView* view = Dolphin::mainWin().activeView(); DolphinView* view = Dolphin::mainWin().activeView();
const QString& newName = dialog.newName(); const TQString& newName = dialog.newName();
if (newName.isEmpty()) { if (newName.isEmpty()) {
view->statusBar()->setMessage(i18n("The new item name is invalid."), view->statusBar()->setMessage(i18n("The new item name is invalid."),
DolphinStatusBar::Error); DolphinStatusBar::Error);
@ -224,7 +224,7 @@ void DolphinView::renameSelectedItems()
UndoManager& undoMan = UndoManager::instance(); UndoManager& undoMan = UndoManager::instance();
undoMan.beginMacro(); undoMan.beginMacro();
assert(newName.contains('#')); assert(newName.tqcontains('#'));
const int urlsCount = urls.count(); const int urlsCount = urls.count();
ProgressIndicator* progressIndicator = ProgressIndicator* progressIndicator =
@ -233,12 +233,12 @@ void DolphinView::renameSelectedItems()
urlsCount); urlsCount);
// iterate through all selected items and rename them... // iterate through all selected items and rename them...
const int replaceIndex = newName.find('#'); const int replaceIndex = newName.tqfind('#');
assert(replaceIndex >= 0); assert(replaceIndex >= 0);
for (int i = 0; i < urlsCount; ++i) { for (int i = 0; i < urlsCount; ++i) {
const KURL& source = urls[i]; const KURL& source = urls[i];
QString name(newName); TQString name(newName);
name.replace(replaceIndex, 1, renameIndexPresentation(i + 1, urlsCount)); name.tqreplace(replaceIndex, 1, renameIndexPresentation(i + 1, urlsCount));
if (source.fileName() != name) { if (source.fileName() != name) {
KURL dest(source.upURL()); KURL dest(source.upURL());
@ -248,7 +248,7 @@ void DolphinView::renameSelectedItems()
if (destExists) { if (destExists) {
delete progressIndicator; delete progressIndicator;
progressIndicator = 0; 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); DolphinStatusBar::Error);
break; break;
} }
@ -273,7 +273,7 @@ void DolphinView::renameSelectedItems()
// renaming mechanism from the views. // renaming mechanism from the views.
assert(urls.count() == 1); assert(urls.count() == 1);
if (m_mode == DetailsView) { if (m_mode == DetailsView) {
QListViewItem* item = m_detailsView->firstChild(); TQListViewItem* item = m_detailsView->firstChild();
while (item != 0) { while (item != 0) {
if (item->isSelected()) { if (item->isSelected()) {
m_detailsView->rename(item, DolphinDetailsView::NameColumn); m_detailsView->rename(item, DolphinDetailsView::NameColumn);
@ -327,10 +327,10 @@ void DolphinView::refreshSettings()
} }
if (m_detailsView != 0) { 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 // to hide/show columns. The easiest approach is to delete
// the current instance and recreate a new one, which automatically // 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_detailsView->refreshSettings() would be enough.
m_topLayout->remove(m_detailsView); m_topLayout->remove(m_detailsView);
m_detailsView->close(); m_detailsView->close();
@ -350,13 +350,13 @@ void DolphinView::updateStatusBar()
// - shows already the item count information or // - shows already the item count information or
// - shows only a not very important information // - shows only a not very important information
// - if any progress is given don't show the item count info at all // - 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() || const bool updateStatusBarMsg = (msg.isEmpty() ||
(msg == m_statusBar->defaultText()) || (msg == m_statusBar->defaultText()) ||
(m_statusBar->type() == DolphinStatusBar::Information)) && (m_statusBar->type() == DolphinStatusBar::Information)) &&
(m_statusBar->progress() == 100); (m_statusBar->progress() == 100);
const QString text(hasSelection() ? selectionStatusBarText() : defaultStatusBarText()); const TQString text(hasSelection() ? selectionStatusBarText() : defaultStatusBarText());
m_statusBar->setDefaultText(text); m_statusBar->setDefaultText(text);
if (updateStatusBarMsg) { if (updateStatusBarMsg) {
@ -398,19 +398,19 @@ void DolphinView::setSorting(Sorting sorting)
{ {
if (sorting != this->sorting()) { if (sorting != this->sorting()) {
KFileView* view = fileView(); 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) { switch (sorting) {
case SortByName: spec = spec | QDir::Name; break; case SortByName: spec = spec | TQDir::Name; break;
case SortBySize: spec = spec | QDir::Size; break; case SortBySize: spec = spec | TQDir::Size; break;
case SortByDate: spec = spec | QDir::Time; break; case SortByDate: spec = spec | TQDir::Time; break;
default: break; default: break;
} }
ViewProperties props(url()); ViewProperties props(url());
props.setSorting(sorting); props.setSorting(sorting);
view->setSorting(static_cast<QDir::SortSpec>(spec)); view->setSorting(static_cast<TQDir::SortSpec>(spec));
emit signalSortingChanged(sorting); emit signalSortingChanged(sorting);
} }
@ -418,39 +418,39 @@ void DolphinView::setSorting(Sorting sorting)
DolphinView::Sorting DolphinView::sorting() const 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; return SortByDate;
} }
if (spec & QDir::Size) { if (spec & TQDir::Size) {
return SortBySize; return SortBySize;
} }
return SortByName; return SortByName;
} }
void DolphinView::setSortOrder(Qt::SortOrder order) void DolphinView::setSortOrder(TQt::SortOrder order)
{ {
if (sortOrder() != order) { if (sortOrder() != order) {
KFileView* view = fileView(); KFileView* view = fileView();
int sorting = view->sorting(); int sorting = view->sorting();
sorting = (order == Qt::Ascending) ? (sorting & ~QDir::Reversed) : sorting = (order == TQt::Ascending) ? (sorting & ~TQDir::Reversed) :
(sorting | QDir::Reversed); (sorting | TQDir::Reversed);
ViewProperties props(url()); ViewProperties props(url());
props.setSortOrder(order); props.setSortOrder(order);
view->setSorting(static_cast<QDir::SortSpec>(sorting)); view->setSorting(static_cast<TQDir::SortSpec>(sorting));
emit signalSortOrderChanged(order); 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() void DolphinView::goBack()
@ -483,7 +483,7 @@ void DolphinView::editURL()
m_urlNavigator->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); return m_urlNavigator->history(index);
} }
@ -521,13 +521,13 @@ const KFileItem* DolphinView::currentFileItem() const
return fileView()->currentFileItem(); return fileView()->currentFileItem();
} }
void DolphinView::openContextMenu(KFileItem* fileInfo, const QPoint& pos) void DolphinView::openContextMenu(KFileItem* fileInfo, const TQPoint& pos)
{ {
DolphinContextMenu contextMenu(this, fileInfo, pos); DolphinContextMenu contextMenu(this, fileInfo, pos);
contextMenu.open(); contextMenu.open();
} }
void DolphinView::rename(const KURL& source, const QString& newName) void DolphinView::rename(const KURL& source, const TQString& newName)
{ {
bool ok = false; bool ok = false;
@ -575,14 +575,14 @@ void DolphinView::rename(const KURL& source, const QString& newName)
} }
if (ok) { 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); DolphinStatusBar::OperationCompleted);
DolphinCommand command(DolphinCommand::Rename, source, dest); DolphinCommand command(DolphinCommand::Rename, source, dest);
UndoManager::instance().addCommand(command); UndoManager::instance().addCommand(command);
} }
else { 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); DolphinStatusBar::Error);
reload(); reload();
} }
@ -593,7 +593,7 @@ void DolphinView::reload()
startDirLister(m_urlNavigator->url(), true); startDirLister(m_urlNavigator->url(), true);
} }
void DolphinView::slotURLListDropped(QDropEvent* /* event */, void DolphinView::slotURLListDropped(TQDropEvent* /* event */,
const KURL::List& urls, const KURL::List& urls,
const KURL& url) const KURL& url)
{ {
@ -614,9 +614,9 @@ void DolphinView::slotURLListDropped(QDropEvent* /* event */,
Dolphin::mainWin().dropURLs(urls, destination); 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); Dolphin::mainWin().setActiveView(this);
} }
@ -643,7 +643,7 @@ void DolphinView::slotURLChanged(const KURL& url)
emit signalURLChanged(url); emit signalURLChanged(url);
} }
void DolphinView::triggerIconsViewItem(QIconViewItem* item) void DolphinView::triggerIconsViewItem(TQIconViewItem* item)
{ {
const ButtonState keyboardState = KApplication::keyboardMouseState(); const ButtonState keyboardState = KApplication::keyboardMouseState();
const bool isSelectionActive = ((keyboardState & ShiftButton) > 0) || const bool isSelectionActive = ((keyboardState & ShiftButton) > 0) ||
@ -651,13 +651,13 @@ void DolphinView::triggerIconsViewItem(QIconViewItem* item)
if ((item != 0) && !isSelectionActive) { 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())); TQTimer::singleShot(0, this, TQT_SLOT(updateURL()));
Dolphin::mainWin().setActiveView(this); Dolphin::mainWin().setActiveView(this);
} }
} }
void DolphinView::triggerDetailsViewItem(QListViewItem* item, void DolphinView::triggerDetailsViewItem(TQListViewItem* item,
const QPoint& pos, const TQPoint& pos,
int /* column */) int /* column */)
{ {
if (item == 0) { if (item == 0) {
@ -667,7 +667,7 @@ void DolphinView::triggerDetailsViewItem(QListViewItem* item,
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())); TQTimer::singleShot(0, this, TQT_SLOT(updateURL()));
Dolphin::mainWin().setActiveView(this); Dolphin::mainWin().setActiveView(this);
} }
else { 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); 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 // 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 // to the root partition (and hence wrong) and for the local path the space
// info is related to the windows partition (-> correct). // info is related to the windows partition (-> correct).
const QString localPath(fileItem->localPath()); const TQString localPath(fileItem->localPath());
if (localPath.isEmpty()) { if (localPath.isEmpty()) {
setURL(fileItem->url()); setURL(fileItem->url());
} }
@ -757,7 +757,7 @@ void DolphinView::slotCompleted()
KFileView* view = fileView(); KFileView* view = fileView();
view->clearView(); 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... // simpler and nicer due to Interview...
if (m_iconsView != 0) { if (m_iconsView != 0) {
m_iconsView->beginItemUpdates(); m_iconsView->beginItemUpdates();
@ -767,7 +767,7 @@ void DolphinView::slotCompleted()
} }
if (m_showProgress) { if (m_showProgress) {
m_statusBar->setProgressText(QString::null); m_statusBar->setProgressText(TQString());
m_statusBar->setProgress(100); m_statusBar->setProgress(100);
m_showProgress = false; m_showProgress = false;
} }
@ -796,7 +796,7 @@ void DolphinView::slotCompleted()
// Prevent a flickering of the icon view widget by giving a small // Prevent a flickering of the icon view widget by giving a small
// timeslot to swallow asynchronous update events. // timeslot to swallow asynchronous update events.
m_iconsView->setUpdatesEnabled(false); m_iconsView->setUpdatesEnabled(false);
QTimer::singleShot(10, this, SLOT(slotDelayedUpdate())); TQTimer::singleShot(10, this, TQT_SLOT(slotDelayedUpdate()));
} }
if (m_detailsView != 0) { if (m_detailsView != 0) {
@ -814,19 +814,19 @@ void DolphinView::slotDelayedUpdate()
m_refreshing = false; m_refreshing = false;
} }
void DolphinView::slotInfoMessage(const QString& msg) void DolphinView::slotInfoMessage(const TQString& msg)
{ {
m_statusBar->setMessage(msg, DolphinStatusBar::Information); m_statusBar->setMessage(msg, DolphinStatusBar::Information);
} }
void DolphinView::slotErrorMessage(const QString& msg) void DolphinView::slotErrorMessage(const TQString& msg)
{ {
m_statusBar->setMessage(msg, DolphinStatusBar::Error); m_statusBar->setMessage(msg, DolphinStatusBar::Error);
} }
void DolphinView::slotRefreshItems(const KFileItemList& /* list */) 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) void DolphinView::slotAddItems(const KFileItemList& list)
@ -858,19 +858,19 @@ void DolphinView::createView()
switch (m_mode) { switch (m_mode) {
case IconsView: case IconsView:
case PreviewsView: { case PreviewsView: {
const DolphinIconsView::LayoutMode layoutMode = (m_mode == IconsView) ? const DolphinIconsView::LayoutMode tqlayoutMode = (m_mode == IconsView) ?
DolphinIconsView::Icons : DolphinIconsView::Icons :
DolphinIconsView::Previews; DolphinIconsView::Previews;
m_iconsView = new DolphinIconsView(this, layoutMode); m_iconsView = new DolphinIconsView(this, tqlayoutMode);
m_topLayout->insertWidget(1, m_iconsView); m_topLayout->insertWidget(1, m_iconsView);
setFocusProxy(m_iconsView); setFocusProxy(m_iconsView);
connect(m_iconsView, SIGNAL(executed(QIconViewItem*)), connect(m_iconsView, TQT_SIGNAL(executed(TQIconViewItem*)),
this, SLOT(triggerIconsViewItem(QIconViewItem*))); this, TQT_SLOT(triggerIconsViewItem(TQIconViewItem*)));
connect(m_iconsView, SIGNAL(returnPressed(QIconViewItem*)), connect(m_iconsView, TQT_SIGNAL(returnPressed(TQIconViewItem*)),
this, SLOT(triggerIconsViewItem(QIconViewItem*))); this, TQT_SLOT(triggerIconsViewItem(TQIconViewItem*)));
connect(m_iconsView, SIGNAL(signalRequestActivation()), connect(m_iconsView, TQT_SIGNAL(signalRequestActivation()),
this, SLOT(slotGrabActivation())); this, TQT_SLOT(slotGrabActivation()));
m_iconsView->endItemUpdates(); m_iconsView->endItemUpdates();
m_iconsView->show(); m_iconsView->show();
@ -883,12 +883,12 @@ void DolphinView::createView()
m_topLayout->insertWidget(1, m_detailsView); m_topLayout->insertWidget(1, m_detailsView);
setFocusProxy(m_detailsView); setFocusProxy(m_detailsView);
connect(m_detailsView, SIGNAL(executed(QListViewItem*, const QPoint&, int)), connect(m_detailsView, TQT_SIGNAL(executed(TQListViewItem*, const TQPoint&, int)),
this, SLOT(triggerDetailsViewItem(QListViewItem*, const QPoint&, int))); this, TQT_SLOT(triggerDetailsViewItem(TQListViewItem*, const TQPoint&, int)));
connect(m_detailsView, SIGNAL(returnPressed(QListViewItem*)), connect(m_detailsView, TQT_SIGNAL(returnPressed(TQListViewItem*)),
this, SLOT(triggerDetailsViewItem(QListViewItem*))); this, TQT_SLOT(triggerDetailsViewItem(TQListViewItem*)));
connect(m_detailsView, SIGNAL(signalRequestActivation()), connect(m_detailsView, TQT_SIGNAL(signalRequestActivation()),
this, SLOT(slotGrabActivation())); this, TQT_SLOT(slotGrabActivation()));
m_detailsView->show(); m_detailsView->show();
m_detailsView->setFocus(); m_detailsView->setFocus();
break; break;
@ -898,8 +898,8 @@ void DolphinView::createView()
break; break;
} }
connect(scrollView(), SIGNAL(contentsMoving(int, int)), connect(scrollView(), TQT_SIGNAL(contentsMoving(int, int)),
this, SLOT(slotContentsMoving(int, int))); this, TQT_SLOT(slotContentsMoving(int, int)));
startDirLister(m_urlNavigator->url()); startDirLister(m_urlNavigator->url());
} }
@ -910,10 +910,10 @@ KFileView* DolphinView::fileView() const
static_cast<KFileView*>(m_iconsView); static_cast<KFileView*>(m_iconsView);
} }
QScrollView* DolphinView::scrollView() const TQScrollView* DolphinView::scrollView() const
{ {
return (m_mode == DetailsView) ? static_cast<QScrollView*>(m_detailsView) : return (m_mode == DetailsView) ? static_cast<TQScrollView*>(m_detailsView) :
static_cast<QScrollView*>(m_iconsView); static_cast<TQScrollView*>(m_iconsView);
} }
ItemEffectsManager* DolphinView::itemEffectsManager() const ItemEffectsManager* DolphinView::itemEffectsManager() const
@ -925,12 +925,12 @@ ItemEffectsManager* DolphinView::itemEffectsManager() const
void DolphinView::startDirLister(const KURL& url, bool reload) void DolphinView::startDirLister(const KURL& url, bool reload)
{ {
if (!url.isValid()) { if (!url.isValid()) {
const QString location(url.prettyURL()); const TQString location(url.prettyURL());
if (location.isEmpty()) { if (location.isEmpty()) {
m_statusBar->setMessage(i18n("The location is empty."), DolphinStatusBar::Error); m_statusBar->setMessage(i18n("The location is empty."), DolphinStatusBar::Error);
} }
else { 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); DolphinStatusBar::Error);
} }
return; return;
@ -939,7 +939,7 @@ void DolphinView::startDirLister(const KURL& url, bool reload)
// Only show the directory loading progress if the status bar does // Only show the directory loading progress if the status bar does
// not contain another progress information. This means that // not contain another progress information. This means that
// the directory loading progress information has the lowest priority. // 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() || m_showProgress = progressText.isEmpty() ||
(progressText == i18n("Loading directory...")); (progressText == i18n("Loading directory..."));
if (m_showProgress) { if (m_showProgress) {
@ -952,20 +952,20 @@ void DolphinView::startDirLister(const KURL& url, bool reload)
m_dirLister->openURL(url, false, reload); m_dirLister->openURL(url, false, reload);
} }
QString DolphinView::defaultStatusBarText() const TQString DolphinView::defaultStatusBarText() const
{ {
const int itemCount = m_folderCount + m_fileCount; 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 Folder, ", " (%n Folders, ", m_folderCount );
text += i18n("1 File)", "%n Files)", m_fileCount); text += i18n("1 File)", "%n Files)", m_fileCount);
return text; return text;
} }
QString DolphinView::selectionStatusBarText() const TQString DolphinView::selectionStatusBarText() const
{ {
QString text; TQString text;
const KFileItemList* list = selectedItems(); const KFileItemList* list = selectedItems();
assert((list != 0) && !list->isEmpty()); assert((list != 0) && !list->isEmpty());
@ -992,18 +992,18 @@ QString DolphinView::selectionStatusBarText() const
} }
if (fileCount > 0) { if (fileCount > 0) {
const QString sizeText(KIO::convertSize(byteSize)); const TQString sizeText(KIO::convertSize(byteSize));
text += i18n("1 File selected (%1)", "%n Files selected (%1)", fileCount).arg(sizeText); text += i18n("1 File selected (%1)", "%n Files selected (%1)", fileCount).tqarg(sizeText);
} }
return text; 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 // assure that the string reprentation for all indicess have the same
// number of characters based on the given number of items // number of characters based on the given number of items
QString str(QString::number(index)); TQString str(TQString::number(index));
int chrCount = 1; int chrCount = 1;
while (itemCount >= 10) { while (itemCount >= 10) {
++chrCount; ++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 // The name filter of KDirLister does a 'hard' filtering, which
// means that only the items are shown where the names match // means that only the items are shown where the names match
// exactly the filter. This is non-transparent for the user, which // exactly the filter. This is non-transparent for the user, which
// just wants to have a 'soft' filtering: does the name contain // just wants to have a 'soft' filtering: does the name contain
// the filter string? // the filter string?
QString adjustedFilter(nameFilter); TQString adjustedFilter(nameFilter);
adjustedFilter.insert(0, '*'); adjustedFilter.insert(0, '*');
adjustedFilter.append('*'); adjustedFilter.append('*');
m_dirLister->setNameFilter(adjustedFilter); m_dirLister->setNameFilter(adjustedFilter);
m_dirLister->emitChanges(); 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 // 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. // this workaround should get obsolete due to Interview.
KFileView* view = fileView(); KFileView* view = fileView();
if (view == m_iconsView) { if (view == m_iconsView) {

@ -22,21 +22,21 @@
#ifndef _DOLPHINVIEW_H_ #ifndef _DOLPHINVIEW_H_
#define _DOLPHINVIEW_H_ #define _DOLPHINVIEW_H_
#include <qwidget.h> #include <tqwidget.h>
#include <kparts/part.h> #include <kparts/part.h>
#include <kfileitem.h> #include <kfileitem.h>
#include <kfileiconview.h> #include <kfileiconview.h>
#include <kio/job.h> #include <kio/job.h>
#include <urlnavigator.h> #include <urlnavigator.h>
class QPainter; class TQPainter;
class KURL; class KURL;
class QLineEdit; class TQLineEdit;
class URLNavigator; class URLNavigator;
class QTimer; class TQTimer;
class QIconViewItem; class TQIconViewItem;
class QListViewItem; class TQListViewItem;
class QVBoxLayout; class TQVBoxLayout;
class KFileView; class KFileView;
class Dolphin; class Dolphin;
class DolphinDirLister; class DolphinDirLister;
@ -44,7 +44,7 @@ class DolphinStatusBar;
class DolphinIconsView; class DolphinIconsView;
class DolphinDetailsView; class DolphinDetailsView;
class ViewProperties; class ViewProperties;
class QScrollView; class TQScrollView;
class KProgress; class KProgress;
class ItemEffectsManager; class ItemEffectsManager;
class FilterBar; class FilterBar;
@ -62,9 +62,10 @@ class FilterBar;
* *
* @author Peter Penz <peter.penz@gmx.at> * @author Peter Penz <peter.penz@gmx.at>
*/ */
class DolphinView : public QWidget class DolphinView : public TQWidget
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
/** /**
@ -102,7 +103,7 @@ public:
SortByDate = 2 SortByDate = 2
}; };
DolphinView(QWidget* parent, DolphinView(TQWidget* tqparent,
const KURL& url, const KURL& url,
Mode mode = IconsView, Mode mode = IconsView,
bool showHiddenFiles = false); bool showHiddenFiles = false);
@ -194,7 +195,7 @@ public:
* @param index Output parameter which indicates the current * @param index Output parameter which indicates the current
* index of the location. * index of the location.
*/ */
const QValueList<URLNavigator::HistoryElem> urlHistory(int& index) const; const TQValueList<URLNavigator::HistoryElem> urlHistory(int& index) const;
/** /**
* Returns true, if at least one item is selected. * Returns true, if at least one item is selected.
@ -228,14 +229,14 @@ public:
* on the position \a pos. If 0 is passed for the file info, a context * on the position \a pos. If 0 is passed for the file info, a context
* menu for the viewport is opened. * menu for the viewport is opened.
*/ */
void openContextMenu(KFileItem* fileInfo, const QPoint& pos); void openContextMenu(KFileItem* fileInfo, const TQPoint& 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 * If the new file name already exists, a dialog is opened which
* asks the user to enter a new name. * asks the user to enter a new name.
*/ */
void rename(const KURL& source, const QString& newName); void rename(const KURL& source, const TQString& newName);
/** Returns the status bar of the view. */ /** Returns the status bar of the view. */
DolphinStatusBar* statusBar() const; DolphinStatusBar* statusBar() const;
@ -284,11 +285,11 @@ public:
/** Returns the sort order of the items inside a directory (see DolphinView::Sorting). */ /** Returns the sort order of the items inside a directory (see DolphinView::Sorting). */
Sorting sorting() const; Sorting sorting() const;
/** Sets the sort order (Qt::Ascending or Qt::Descending) for the items. */ /** Sets the sort order (TQt::Ascending or TQt::Descending) for the items. */
void setSortOrder(Qt::SortOrder order); void setSortOrder(TQt::SortOrder order);
/** Returns the current used sort order (Qt::Ascending or Qt::Descending). */ /** Returns the current used sort order (TQt::Ascending or TQt::Descending). */
Qt::SortOrder sortOrder() const; TQt::SortOrder sortOrder() const;
/** Refreshs the view settings by reading out the stored settings. */ /** Refreshs the view settings by reading out the stored settings. */
void refreshSettings(); void refreshSettings();
@ -321,7 +322,7 @@ public:
public slots: public slots:
void reload(); void reload();
void slotURLListDropped(QDropEvent* event, void slotURLListDropped(TQDropEvent* event,
const KURL::List& urls, const KURL::List& urls,
const KURL& url); const KURL& url);
@ -347,7 +348,7 @@ signals:
void signalSortingChanged(DolphinView::Sorting sorting); void signalSortingChanged(DolphinView::Sorting sorting);
/** Is emitted if the sort order (ascending or descending) has been changed. */ /** Is emitted if the sort order (ascending or descending) has been changed. */
void signalSortOrderChanged(Qt::SortOrder order); void signalSortOrderChanged(TQt::SortOrder order);
/** /**
* 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.
@ -366,16 +367,16 @@ signals:
void signalSelectionChanged(); void signalSelectionChanged();
protected: protected:
/** @see QWidget::mouseReleaseEvent */ /** @see TQWidget::mouseReleaseEvent */
virtual void mouseReleaseEvent(QMouseEvent* event); virtual void mouseReleaseEvent(TQMouseEvent* event);
private slots: private slots:
void slotURLChanged(const KURL& kurl); void slotURLChanged(const KURL& kurl);
void triggerIconsViewItem(QIconViewItem *item); void triggerIconsViewItem(TQIconViewItem *item);
void triggerDetailsViewItem(QListViewItem* item, void triggerDetailsViewItem(TQListViewItem* item,
const QPoint& pos, const TQPoint& pos,
int column); int column);
void triggerDetailsViewItem(QListViewItem* item); void triggerDetailsViewItem(TQListViewItem* item);
void updateURL(); void updateURL();
void slotPercent(int percent); void slotPercent(int percent);
@ -383,8 +384,8 @@ private slots:
void slotDeleteItem(KFileItem* item); void slotDeleteItem(KFileItem* item);
void slotCompleted(); void slotCompleted();
void slotDelayedUpdate(); void slotDelayedUpdate();
void slotInfoMessage(const QString& msg); void slotInfoMessage(const TQString& msg);
void slotErrorMessage(const QString& msg); void slotErrorMessage(const TQString& msg);
void slotRefreshItems(const KFileItemList& list); void slotRefreshItems(const KFileItemList& list);
void slotAddItems(const KFileItemList& list); void slotAddItems(const KFileItemList& list);
@ -402,12 +403,12 @@ private slots:
* Filters the currently shown items by \a nameFilter. All items * Filters the currently shown items by \a nameFilter. All items
* which contain the given filter string will be shown. * which contain the given filter string will be shown.
*/ */
void slotChangeNameFilter(const QString& nameFilter); void slotChangeNameFilter(const TQString& nameFilter);
private: private:
void createView(); void createView();
KFileView* fileView() const; KFileView* fileView() const;
QScrollView* scrollView() const; TQScrollView* scrollView() const;
ItemEffectsManager* itemEffectsManager() const; ItemEffectsManager* itemEffectsManager() const;
void startDirLister(const KURL& url, bool reload = false); void startDirLister(const KURL& url, bool reload = false);
@ -415,25 +416,25 @@ private:
* Returns the default text of the status bar, if no item is * Returns the default text of the status bar, if no item is
* selected. * selected.
*/ */
QString defaultStatusBarText() const; TQString defaultStatusBarText() const;
/** /**
* Returns the text for the status bar, if at least one item * Returns the text for the status bar, if at least one item
* is selected. * is selected.
*/ */
QString selectionStatusBarText() const; TQString selectionStatusBarText() const;
/** /**
* Returns the string representation for the index \a index * Returns the string representation for the index \a index
* for renaming \itemCount items. * for renaming \itemCount items.
*/ */
QString renameIndexPresentation(int index, int itemCount) const; TQString renameIndexPresentation(int index, int itemCount) const;
bool m_refreshing; bool m_refreshing;
bool m_showProgress; bool m_showProgress;
Mode m_mode; Mode m_mode;
QVBoxLayout* m_topLayout; TQVBoxLayout* m_topLayout;
URLNavigator* m_urlNavigator; URLNavigator* m_urlNavigator;
DolphinIconsView* m_iconsView; DolphinIconsView* m_iconsView;

@ -19,26 +19,26 @@
***************************************************************************/ ***************************************************************************/
#include "editbookmarkdialog.h" #include "editbookmarkdialog.h"
#include <qgrid.h> #include <tqgrid.h>
#include <klocale.h> #include <klocale.h>
#include <qlineedit.h> #include <tqlineedit.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qlayout.h> #include <tqlayout.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <kurl.h> #include <kurl.h>
#include <kfiledialog.h> #include <kfiledialog.h>
#include <kicondialog.h> #include <kicondialog.h>
#include <qhbox.h> #include <tqhbox.h>
EditBookmarkDialog::~EditBookmarkDialog() EditBookmarkDialog::~EditBookmarkDialog()
{ {
} }
KBookmark EditBookmarkDialog::getBookmark(const QString& title, KBookmark EditBookmarkDialog::getBookmark(const TQString& title,
const QString& name, const TQString& name,
const KURL& url, const KURL& url,
const QString& icon) const TQString& icon)
{ {
EditBookmarkDialog dialog(title, name, url, icon); EditBookmarkDialog dialog(title, name, url, icon);
dialog.exec(); dialog.exec();
@ -54,54 +54,54 @@ void EditBookmarkDialog::slotOk()
KDialogBase::slotOk(); KDialogBase::slotOk();
} }
EditBookmarkDialog::EditBookmarkDialog(const QString& title, EditBookmarkDialog::EditBookmarkDialog(const TQString& title,
const QString& name, const TQString& name,
const KURL& url, const KURL& url,
const QString& icon) : const TQString& icon) :
KDialogBase(Plain, title, Ok|Cancel, Ok), KDialogBase(Plain, title, Ok|Cancel, Ok),
m_iconButton(0), m_iconButton(0),
m_name(0), m_name(0),
m_location(0) m_location(0)
{ {
QVBoxLayout* topLayout = new QVBoxLayout(plainPage(), 0, spacingHint()); TQVBoxLayout* topLayout = new TQVBoxLayout(plainPage(), 0, spacingHint());
QGrid* grid = new QGrid(2, Qt::Horizontal, plainPage()); TQGrid* grid = new TQGrid(2, Qt::Horizontal, plainPage());
grid->setSpacing(spacingHint()); grid->setSpacing(spacingHint());
// create icon widgets // create icon widgets
new QLabel(i18n("Icon:"), grid); new TQLabel(i18n("Icon:"), grid);
m_iconName = icon; m_iconName = icon;
m_iconButton = new QPushButton(SmallIcon(m_iconName), QString::null, grid); m_iconButton = new TQPushButton(SmallIcon(m_iconName), TQString(), grid);
m_iconButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); m_iconButton->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
connect(m_iconButton, SIGNAL(clicked()), connect(m_iconButton, TQT_SIGNAL(clicked()),
this, SLOT(selectIcon())); this, TQT_SLOT(selectIcon()));
// create name widgets // create name widgets
new QLabel(i18n("Name:"), grid); new TQLabel(i18n("Name:"), grid);
m_name = new QLineEdit(name, grid); m_name = new TQLineEdit(name, grid);
m_name->selectAll(); m_name->selectAll();
m_name->setFocus(); m_name->setFocus();
// create location widgets // create location widgets
new QLabel(i18n("Location:"), grid); new TQLabel(i18n("Location:"), grid);
QHBox* locationBox = new QHBox(grid); TQHBox* locationBox = new TQHBox(grid);
locationBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); locationBox->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed);
locationBox->setSpacing(spacingHint()); locationBox->setSpacing(spacingHint());
m_location = new QLineEdit(url.prettyURL(), locationBox); m_location = new TQLineEdit(url.prettyURL(), locationBox);
m_location->setMinimumWidth(320); m_location->setMinimumWidth(320);
QPushButton* selectLocationButton = new QPushButton(SmallIcon("folder"), QString::null, locationBox); TQPushButton* selectLocationButton = new TQPushButton(SmallIcon("folder"), TQString(), locationBox);
selectLocationButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); selectLocationButton->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
connect(selectLocationButton, SIGNAL(clicked()), connect(selectLocationButton, TQT_SIGNAL(clicked()),
this, SLOT(selectLocation())); this, TQT_SLOT(selectLocation()));
topLayout->addWidget(grid); topLayout->addWidget(grid);
} }
void EditBookmarkDialog::selectIcon() void EditBookmarkDialog::selectIcon()
{ {
const QString iconName(KIconDialog::getIcon(KIcon::Small, KIcon::FileSystem)); const TQString iconName(KIconDialog::getIcon(KIcon::Small, KIcon::FileSystem));
if (!iconName.isEmpty()) { if (!iconName.isEmpty()) {
m_iconName = iconName; m_iconName = iconName;
m_iconButton->setIconSet(SmallIcon(iconName)); m_iconButton->setIconSet(SmallIcon(iconName));
@ -110,7 +110,7 @@ void EditBookmarkDialog::selectIcon()
void EditBookmarkDialog::selectLocation() void EditBookmarkDialog::selectLocation()
{ {
const QString location(m_location->text()); const TQString location(m_location->text());
KURL url(KFileDialog::getExistingURL(location)); KURL url(KFileDialog::getExistingURL(location));
if (!url.isEmpty()) { if (!url.isEmpty()) {
m_location->setText(url.prettyURL()); m_location->setText(url.prettyURL());

@ -24,8 +24,8 @@
#include <kdialogbase.h> #include <kdialogbase.h>
class Bookmark; class Bookmark;
class QLineEdit; class TQLineEdit;
class QPushButton; class TQPushButton;
/** /**
* @brief Allows to edit the icon, URL and name of a bookmark. * @brief Allows to edit the icon, URL and name of a bookmark.
@ -44,6 +44,7 @@ class QPushButton;
class EditBookmarkDialog : public KDialogBase class EditBookmarkDialog : public KDialogBase
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
virtual ~EditBookmarkDialog(); virtual ~EditBookmarkDialog();
@ -54,29 +55,29 @@ public:
* @return A valid bookmark, if the user has pressed OK. Otherwise * @return A valid bookmark, if the user has pressed OK. Otherwise
* a null bookmark is returned (see Bookmark::isNull()). * a null bookmark is returned (see Bookmark::isNull()).
*/ */
static KBookmark getBookmark(const QString& title, static KBookmark getBookmark(const TQString& title,
const QString& name, const TQString& name,
const KURL& url, const KURL& url,
const QString& icon); const TQString& icon);
protected slots: protected slots:
virtual void slotOk(); virtual void slotOk();
protected: protected:
EditBookmarkDialog(const QString& title, EditBookmarkDialog(const TQString& title,
const QString& name, const TQString& name,
const KURL& url, const KURL& url,
const QString& icon); const TQString& icon);
private slots: private slots:
void selectIcon(); void selectIcon();
void selectLocation(); void selectLocation();
private: private:
QString m_iconName; TQString m_iconName;
QPushButton* m_iconButton; TQPushButton* m_iconButton;
QLineEdit* m_name; TQLineEdit* m_name;
QLineEdit* m_location; TQLineEdit* m_location;
KBookmark m_bookmark; KBookmark m_bookmark;
}; };
#endif #endif

@ -19,8 +19,8 @@
***************************************************************************/ ***************************************************************************/
#include "filterbar.h" #include "filterbar.h"
#include <qlabel.h> #include <tqlabel.h>
#include <qlayout.h> #include <tqlayout.h>
#include <kdialog.h> #include <kdialog.h>
#include <klocale.h> #include <klocale.h>
@ -30,35 +30,35 @@
#include "dolphin.h" #include "dolphin.h"
FilterBar::FilterBar(QWidget *parent, const char *name) : FilterBar::FilterBar(TQWidget *tqparent, const char *name) :
QWidget(parent, name) TQWidget(tqparent, name)
{ {
const int gap = 3; const int gap = 3;
QVBoxLayout* foo = new QVBoxLayout(this); TQVBoxLayout* foo = new TQVBoxLayout(this);
foo->addSpacing(gap); foo->addSpacing(gap);
QHBoxLayout* layout = new QHBoxLayout(foo); TQHBoxLayout* tqlayout = new TQHBoxLayout(foo);
layout->addSpacing(gap); tqlayout->addSpacing(gap);
m_filter = new QLabel(i18n("Filter:"), this); m_filter = new TQLabel(i18n("Filter:"), this);
layout->addWidget(m_filter); tqlayout->addWidget(m_filter);
layout->addSpacing(KDialog::spacingHint()); tqlayout->addSpacing(KDialog::spacingHint());
m_filterInput = new KLineEdit(this); m_filterInput = new KLineEdit(this);
layout->addWidget(m_filterInput); tqlayout->addWidget(m_filterInput);
m_close = new KPushButton(this); m_close = new KPushButton(this);
m_close->setIconSet(SmallIcon("fileclose")); m_close->setIconSet(SmallIcon("fileclose"));
m_close->setFlat(true); m_close->setFlat(true);
layout->addWidget(m_close); tqlayout->addWidget(m_close);
layout->addSpacing(gap); tqlayout->addSpacing(gap);
connect(m_filterInput, SIGNAL(textChanged(const QString&)), connect(m_filterInput, TQT_SIGNAL(textChanged(const TQString&)),
this, SIGNAL(signalFilterChanged(const QString&))); this, TQT_SIGNAL(signalFilterChanged(const TQString&)));
connect(m_close, SIGNAL(clicked()), this, SLOT(hide())); connect(m_close, TQT_SIGNAL(clicked()), this, TQT_SLOT(hide()));
connect(m_close, SIGNAL(clicked()), connect(m_close, TQT_SIGNAL(clicked()),
&Dolphin::mainWin(), SLOT(slotShowFilterBarChanged())); &Dolphin::mainWin(), TQT_SLOT(slotShowFilterBarChanged()));
} }
FilterBar::~FilterBar() FilterBar::~FilterBar()
@ -69,19 +69,19 @@ void FilterBar::hide()
{ {
m_filterInput->clear(); m_filterInput->clear();
m_filterInput->clearFocus(); m_filterInput->clearFocus();
QWidget::hide(); TQWidget::hide();
} }
void FilterBar::show() void FilterBar::show()
{ {
m_filterInput->setFocus(); m_filterInput->setFocus();
QWidget::show(); TQWidget::show();
} }
void FilterBar::keyReleaseEvent(QKeyEvent* event) void FilterBar::keyReleaseEvent(TQKeyEvent* event)
{ {
QWidget::keyReleaseEvent(event); TQWidget::keyReleaseEvent(event);
if ((event->key() == Qt::Key_Escape)) { if ((event->key() == TQt::Key_Escape)) {
hide(); hide();
Dolphin::mainWin().slotShowFilterBarChanged(); Dolphin::mainWin().slotShowFilterBarChanged();
} }

@ -20,9 +20,9 @@
#ifndef FILTERBAR_H #ifndef FILTERBAR_H
#define FILTERBAR_H #define FILTERBAR_H
#include <qwidget.h> #include <tqwidget.h>
class QLabel; class TQLabel;
class KLineEdit; class KLineEdit;
class KPushButton; class KPushButton;
@ -31,12 +31,13 @@ class KPushButton;
* *
* @author Gregor Kališnik <gregor@podnapisi.net> * @author Gregor Kališnik <gregor@podnapisi.net>
*/ */
class FilterBar : public QWidget class FilterBar : public TQWidget
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
FilterBar(QWidget *parent = 0, const char *name = 0); FilterBar(TQWidget *tqparent = 0, const char *name = 0);
virtual ~FilterBar(); virtual ~FilterBar();
signals: signals:
@ -44,20 +45,20 @@ signals:
* Signal that reports the name filter has been * Signal that reports the name filter has been
* changed to \a nameFilter. * changed to \a nameFilter.
*/ */
void signalFilterChanged(const QString& nameFilter); void signalFilterChanged(const TQString& nameFilter);
public slots: public slots:
/** @see QWidget::hide() */ /** @see TQWidget::hide() */
virtual void hide(); virtual void hide();
/** @see QWidget::show() */ /** @see TQWidget::show() */
virtual void show(); virtual void show();
protected: protected:
virtual void keyReleaseEvent(QKeyEvent* event); virtual void keyReleaseEvent(TQKeyEvent* event);
private: private:
QLabel* m_filter; TQLabel* m_filter;
KLineEdit* m_filterInput; KLineEdit* m_filterInput;
KPushButton* m_close; KPushButton* m_close;
}; };

@ -20,78 +20,78 @@
#include "generalsettingspage.h" #include "generalsettingspage.h"
#include <qlayout.h> #include <tqlayout.h>
#include <kdialog.h> #include <kdialog.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qlineedit.h> #include <tqlineedit.h>
#include <qvbox.h> #include <tqvbox.h>
#include <qgrid.h> #include <tqgrid.h>
#include <qgroupbox.h> #include <tqgroupbox.h>
#include <klocale.h> #include <klocale.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <kfiledialog.h> #include <kfiledialog.h>
#include <qradiobutton.h> #include <tqradiobutton.h>
#include "dolphinsettings.h" #include "dolphinsettings.h"
#include "dolphin.h" #include "dolphin.h"
#include "dolphinview.h" #include "dolphinview.h"
GeneralSettingsPage::GeneralSettingsPage(QWidget* parent) : GeneralSettingsPage::GeneralSettingsPage(TQWidget* tqparent) :
SettingsPageBase(parent), SettingsPageBase(tqparent),
m_homeURL(0), m_homeURL(0),
m_startSplit(0), m_startSplit(0),
m_startEditable(0) m_startEditable(0)
{ {
QVBoxLayout* topLayout = new QVBoxLayout(parent, 2, KDialog::spacingHint()); TQVBoxLayout* topLayout = new TQVBoxLayout(tqparent, 2, KDialog::spacingHint());
const int spacing = KDialog::spacingHint(); const int spacing = KDialog::spacingHint();
const int margin = KDialog::marginHint(); const int margin = KDialog::marginHint();
const QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); const TQSizePolicy sizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed);
DolphinSettings& settings = DolphinSettings::instance(); DolphinSettings& settings = DolphinSettings::instance();
QVBox* vBox = new QVBox(parent); TQVBox* vBox = new TQVBox(tqparent);
vBox->setSizePolicy(sizePolicy); vBox->tqsetSizePolicy(sizePolicy);
vBox->setSpacing(spacing); vBox->setSpacing(spacing);
vBox->setMargin(margin); vBox->setMargin(margin);
vBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Ignored); vBox->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Ignored);
// create 'Home URL' editor // create 'Home URL' editor
QGroupBox* homeGroup = new QGroupBox(1, Qt::Horizontal, i18n("Home URL"), vBox); TQGroupBox* homeGroup = new TQGroupBox(1, Qt::Horizontal, i18n("Home URL"), vBox);
homeGroup->setSizePolicy(sizePolicy); homeGroup->tqsetSizePolicy(sizePolicy);
homeGroup->setMargin(margin); homeGroup->setMargin(margin);
QHBox* homeURLBox = new QHBox(homeGroup); TQHBox* homeURLBox = new TQHBox(homeGroup);
homeURLBox->setSizePolicy(sizePolicy); homeURLBox->tqsetSizePolicy(sizePolicy);
homeURLBox->setSpacing(spacing); homeURLBox->setSpacing(spacing);
new QLabel(i18n("Location:"), homeURLBox); new TQLabel(i18n("Location:"), homeURLBox);
m_homeURL = new QLineEdit(settings.homeURL().prettyURL(), homeURLBox); m_homeURL = new TQLineEdit(settings.homeURL().prettyURL(), homeURLBox);
QPushButton* selectHomeURLButton = new QPushButton(SmallIcon("folder"), QString::null, homeURLBox); TQPushButton* selectHomeURLButton = new TQPushButton(SmallIcon("folder"), TQString(), homeURLBox);
connect(selectHomeURLButton, SIGNAL(clicked()), connect(selectHomeURLButton, TQT_SIGNAL(clicked()),
this, SLOT(selectHomeURL())); this, TQT_SLOT(selectHomeURL()));
QHBox* buttonBox = new QHBox(homeGroup); TQHBox* buttonBox = new TQHBox(homeGroup);
buttonBox->setSizePolicy(sizePolicy); buttonBox->tqsetSizePolicy(sizePolicy);
buttonBox->setSpacing(spacing); buttonBox->setSpacing(spacing);
QPushButton* useCurrentButton = new QPushButton(i18n("Use current location"), buttonBox); TQPushButton* useCurrentButton = new TQPushButton(i18n("Use current location"), buttonBox);
connect(useCurrentButton, SIGNAL(clicked()), connect(useCurrentButton, TQT_SIGNAL(clicked()),
this, SLOT(useCurrentLocation())); this, TQT_SLOT(useCurrentLocation()));
QPushButton* useDefaultButton = new QPushButton(i18n("Use default location"), buttonBox); TQPushButton* useDefaultButton = new TQPushButton(i18n("Use default location"), buttonBox);
connect(useDefaultButton, SIGNAL(clicked()), connect(useDefaultButton, TQT_SIGNAL(clicked()),
this, SLOT(useDefaulLocation())); this, TQT_SLOT(useDefaulLocation()));
// create 'Default View Mode' group // create 'Default View Mode' group
QButtonGroup* buttonGroup = new QButtonGroup(3, Qt::Vertical, i18n("Default View Mode"), vBox); TQButtonGroup* buttonGroup = new TQButtonGroup(3, Qt::Vertical, i18n("Default View Mode"), vBox);
buttonGroup->setSizePolicy(sizePolicy); buttonGroup->tqsetSizePolicy(sizePolicy);
buttonGroup->setMargin(margin); buttonGroup->setMargin(margin);
m_iconsView = new QRadioButton(i18n("Icons"), buttonGroup); m_iconsView = new TQRadioButton(i18n("Icons"), buttonGroup);
m_detailsView = new QRadioButton(i18n("Details"), buttonGroup); m_detailsView = new TQRadioButton(i18n("Details"), buttonGroup);
m_previewsView = new QRadioButton(i18n("Previews"), buttonGroup); m_previewsView = new TQRadioButton(i18n("Previews"), buttonGroup);
switch (settings.defaultViewMode()) { switch (settings.defaultViewMode()) {
case DolphinView::IconsView: m_iconsView->setChecked(true); break; case DolphinView::IconsView: m_iconsView->setChecked(true); break;
@ -100,21 +100,21 @@ GeneralSettingsPage::GeneralSettingsPage(QWidget* parent) :
} }
// create 'Start with split view' checkbox // create 'Start with split view' checkbox
m_startSplit = new QCheckBox(i18n("Start with split view"), vBox); m_startSplit = new TQCheckBox(i18n("Start with split view"), vBox);
m_startSplit->setChecked(settings.isViewSplit()); m_startSplit->setChecked(settings.isViewSplit());
// create 'Start with editable navigation bar' checkbox // create 'Start with editable navigation bar' checkbox
m_startEditable = new QCheckBox(i18n("Start with editable navigation bar"), vBox); m_startEditable = new TQCheckBox(i18n("Start with editable navigation bar"), vBox);
m_startEditable->setChecked(settings.isURLEditable()); m_startEditable->setChecked(settings.isURLEditable());
// create 'Save view properties for each folder' checkbox // create 'Save view properties for each folder' checkbox
m_saveView = new QCheckBox(i18n("Save view properties for each folder"), vBox); m_saveView = new TQCheckBox(i18n("Save view properties for each folder"), vBox);
m_saveView->setChecked(settings.isSaveView()); m_saveView->setChecked(settings.isSaveView());
// Add a dummy widget with no restriction regarding // Add a dummy widget with no restriction regarding
// a vertical resizing. This assures that the dialog layout // a vertical resizing. This assures that the dialog tqlayout
// is not stretched vertically. // is not stretched vertically.
new QWidget(vBox); new TQWidget(vBox);
topLayout->addWidget(vBox); topLayout->addWidget(vBox);
} }
@ -150,7 +150,7 @@ void GeneralSettingsPage::applySettings()
void GeneralSettingsPage::selectHomeURL() void GeneralSettingsPage::selectHomeURL()
{ {
const QString homeURL(m_homeURL->text()); const TQString homeURL(m_homeURL->text());
KURL url(KFileDialog::getExistingURL(homeURL)); KURL url(KFileDialog::getExistingURL(homeURL));
if (!url.isEmpty()) { if (!url.isEmpty()) {
m_homeURL->setText(url.prettyURL()); m_homeURL->setText(url.prettyURL());
@ -165,7 +165,7 @@ void GeneralSettingsPage::useCurrentLocation()
void GeneralSettingsPage::useDefaulLocation() void GeneralSettingsPage::useDefaulLocation()
{ {
m_homeURL->setText("file://" + QDir::homeDirPath()); m_homeURL->setText("file://" + TQDir::homeDirPath());
} }
#include "generalsettingspage.moc" #include "generalsettingspage.moc"

@ -21,9 +21,9 @@
#define GENERALSETTINGSPAGE_H #define GENERALSETTINGSPAGE_H
#include <settingspagebase.h> #include <settingspagebase.h>
class QLineEdit; class TQLineEdit;
class QRadioButton; class TQRadioButton;
class QCheckBox; class TQCheckBox;
/** /**
* @brief Page for the 'General' settings of the Dolphin settings dialog. * @brief Page for the 'General' settings of the Dolphin settings dialog.
@ -36,9 +36,10 @@ class QCheckBox;
class GeneralSettingsPage : public SettingsPageBase class GeneralSettingsPage : public SettingsPageBase
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
GeneralSettingsPage(QWidget* parent); GeneralSettingsPage(TQWidget* tqparent);
virtual ~GeneralSettingsPage(); virtual ~GeneralSettingsPage();
@ -51,13 +52,13 @@ private slots:
void useDefaulLocation(); void useDefaulLocation();
private: private:
QLineEdit* m_homeURL; TQLineEdit* m_homeURL;
QRadioButton* m_iconsView; TQRadioButton* m_iconsView;
QRadioButton* m_detailsView; TQRadioButton* m_detailsView;
QRadioButton* m_previewsView; TQRadioButton* m_previewsView;
QCheckBox* m_startSplit; TQCheckBox* m_startSplit;
QCheckBox* m_startEditable; TQCheckBox* m_startEditable;
QCheckBox* m_saveView; TQCheckBox* m_saveView;
}; };
#endif #endif

@ -20,11 +20,11 @@
#include "iconsviewsettingspage.h" #include "iconsviewsettingspage.h"
#include <qlabel.h> #include <tqlabel.h>
#include <qslider.h> #include <tqslider.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qradiobutton.h> #include <tqradiobutton.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <kfontcombo.h> #include <kfontcombo.h>
#include <kdialog.h> #include <kdialog.h>
@ -39,8 +39,8 @@
#define GRID_SPACING_INC 12 #define GRID_SPACING_INC 12
IconsViewSettingsPage::IconsViewSettingsPage(DolphinIconsView::LayoutMode mode, IconsViewSettingsPage::IconsViewSettingsPage(DolphinIconsView::LayoutMode mode,
QWidget* parent) : TQWidget* tqparent) :
QVBox(parent), TQVBox(tqparent),
m_mode(mode), m_mode(mode),
m_iconSizeSlider(0), m_iconSizeSlider(0),
m_previewSizeSlider(0), m_previewSizeSlider(0),
@ -53,7 +53,7 @@ IconsViewSettingsPage::IconsViewSettingsPage(DolphinIconsView::LayoutMode mode,
{ {
const int spacing = KDialog::spacingHint(); const int spacing = KDialog::spacingHint();
const int margin = KDialog::marginHint(); const int margin = KDialog::marginHint();
const QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); const TQSizePolicy sizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed);
setSpacing(spacing); setSpacing(spacing);
setMargin(margin); setMargin(margin);
@ -61,26 +61,26 @@ IconsViewSettingsPage::IconsViewSettingsPage(DolphinIconsView::LayoutMode mode,
DolphinIconsViewSettings* settings = DolphinSettings::instance().iconsView(m_mode); DolphinIconsViewSettings* settings = DolphinSettings::instance().iconsView(m_mode);
assert(settings != 0); assert(settings != 0);
QHBox* sizesLayout = new QHBox(this); TQHBox* sizesLayout = new TQHBox(this);
sizesLayout->setSpacing(spacing); sizesLayout->setSpacing(spacing);
sizesLayout->setSizePolicy(sizePolicy); sizesLayout->tqsetSizePolicy(sizePolicy);
// create 'Icon Size' group including slider and preview // create 'Icon Size' group including slider and preview
QGroupBox* iconSizeGroup = new QGroupBox(2, Qt::Vertical, i18n("Icon Size"), sizesLayout); TQGroupBox* iconSizeGroup = new TQGroupBox(2, Qt::Vertical, i18n("Icon Size"), sizesLayout);
iconSizeGroup->setSizePolicy(sizePolicy); iconSizeGroup->tqsetSizePolicy(sizePolicy);
iconSizeGroup->setMargin(margin); iconSizeGroup->setMargin(margin);
const QColor iconBackgroundColor(KGlobalSettings::baseColor()); const TQColor iconBackgroundColor(KGlobalSettings::baseColor());
QHBox* iconSizeVBox = new QHBox(iconSizeGroup); TQHBox* iconSizeVBox = new TQHBox(iconSizeGroup);
iconSizeVBox->setSpacing(spacing); iconSizeVBox->setSpacing(spacing);
new QLabel(i18n("Small"), iconSizeVBox); new TQLabel(i18n("Small"), iconSizeVBox);
m_iconSizeSlider = new QSlider(0, 5, 1, 0, Qt::Horizontal, iconSizeVBox); m_iconSizeSlider = new TQSlider(0, 5, 1, 0, Qt::Horizontal, iconSizeVBox);
m_iconSizeSlider->setValue(sliderValue(settings->iconSize())); m_iconSizeSlider->setValue(sliderValue(settings->iconSize()));
m_iconSizeSlider->setTickmarks(QSlider::Below); m_iconSizeSlider->setTickmarks(TQSlider::Below);
connect(m_iconSizeSlider, SIGNAL(valueChanged(int)), connect(m_iconSizeSlider, TQT_SIGNAL(valueChanged(int)),
this, SLOT(slotIconSizeChanged(int))); this, TQT_SLOT(slotIconSizeChanged(int)));
new QLabel(i18n("Large"), iconSizeVBox); new TQLabel(i18n("Large"), iconSizeVBox);
m_iconSizeViewer = new PixmapViewer(iconSizeGroup); m_iconSizeViewer = new PixmapViewer(iconSizeGroup);
m_iconSizeViewer->setMinimumWidth(KIcon::SizeEnormous); m_iconSizeViewer->setMinimumWidth(KIcon::SizeEnormous);
@ -90,19 +90,19 @@ IconsViewSettingsPage::IconsViewSettingsPage(DolphinIconsView::LayoutMode mode,
if (m_mode == DolphinIconsView::Previews) { if (m_mode == DolphinIconsView::Previews) {
// create 'Preview Size' group including slider and preview // create 'Preview Size' group including slider and preview
QGroupBox* previewSizeGroup = new QGroupBox(2, Qt::Vertical, i18n("Preview Size"), sizesLayout); TQGroupBox* previewSizeGroup = new TQGroupBox(2, Qt::Vertical, i18n("Preview Size"), sizesLayout);
previewSizeGroup->setSizePolicy(sizePolicy); previewSizeGroup->tqsetSizePolicy(sizePolicy);
previewSizeGroup->setMargin(margin); previewSizeGroup->setMargin(margin);
QHBox* previewSizeVBox = new QHBox(previewSizeGroup); TQHBox* previewSizeVBox = new TQHBox(previewSizeGroup);
previewSizeVBox->setSpacing(spacing); previewSizeVBox->setSpacing(spacing);
new QLabel(i18n("Small"), previewSizeVBox); new TQLabel(i18n("Small"), previewSizeVBox);
m_previewSizeSlider = new QSlider(0, 5, 1, 0, Qt::Horizontal, previewSizeVBox); m_previewSizeSlider = new TQSlider(0, 5, 1, 0, Qt::Horizontal, previewSizeVBox);
m_previewSizeSlider->setValue(sliderValue(settings->previewSize())); m_previewSizeSlider->setValue(sliderValue(settings->previewSize()));
m_previewSizeSlider->setTickmarks(QSlider::Below); m_previewSizeSlider->setTickmarks(TQSlider::Below);
connect(m_previewSizeSlider, SIGNAL(valueChanged(int)), connect(m_previewSizeSlider, TQT_SIGNAL(valueChanged(int)),
this, SLOT(slotPreviewSizeChanged(int))); this, TQT_SLOT(slotPreviewSizeChanged(int)));
new QLabel(i18n("Large"), previewSizeVBox); new TQLabel(i18n("Large"), previewSizeVBox);
m_previewSizeViewer = new PixmapViewer(previewSizeGroup); m_previewSizeViewer = new PixmapViewer(previewSizeGroup);
m_previewSizeViewer->setMinimumWidth(KIcon::SizeEnormous); m_previewSizeViewer->setMinimumWidth(KIcon::SizeEnormous);
@ -112,50 +112,50 @@ IconsViewSettingsPage::IconsViewSettingsPage(DolphinIconsView::LayoutMode mode,
slotPreviewSizeChanged(m_previewSizeSlider->value()); slotPreviewSizeChanged(m_previewSizeSlider->value());
} }
QGroupBox* textGroup = new QGroupBox(2, Qt::Horizontal, i18n("Text"), this); TQGroupBox* textGroup = new TQGroupBox(2, Qt::Horizontal, i18n("Text"), this);
textGroup->setSizePolicy(sizePolicy); textGroup->tqsetSizePolicy(sizePolicy);
textGroup->setMargin(margin); textGroup->setMargin(margin);
new QLabel(i18n("Font family:"), textGroup); new TQLabel(i18n("Font family:"), textGroup);
m_fontFamilyBox = new KFontCombo(textGroup); m_fontFamilyBox = new KFontCombo(textGroup);
m_fontFamilyBox->setCurrentFont(settings->fontFamily()); m_fontFamilyBox->setCurrentFont(settings->fontFamily());
new QLabel(i18n("Font size:"), textGroup); new TQLabel(i18n("Font size:"), textGroup);
m_fontSizeBox = new QSpinBox(6, 99, 1, textGroup); m_fontSizeBox = new TQSpinBox(6, 99, 1, textGroup);
m_fontSizeBox->setValue(settings->fontSize()); m_fontSizeBox->setValue(settings->fontSize());
new QLabel(i18n("Number of lines:"), textGroup); new TQLabel(i18n("Number of lines:"), textGroup);
m_textlinesCountBox = new QSpinBox(1, 5, 1, textGroup); m_textlinesCountBox = new TQSpinBox(1, 5, 1, textGroup);
m_textlinesCountBox->setValue(settings->textlinesCount()); m_textlinesCountBox->setValue(settings->textlinesCount());
new QLabel(i18n("Text width:"), textGroup); new TQLabel(i18n("Text width:"), textGroup);
m_textWidthBox = new QComboBox(textGroup); m_textWidthBox = new TQComboBox(textGroup);
m_textWidthBox->insertItem(i18n("Small")); m_textWidthBox->insertItem(i18n("Small"));
m_textWidthBox->insertItem(i18n("Medium")); m_textWidthBox->insertItem(i18n("Medium"));
m_textWidthBox->insertItem(i18n("Large")); m_textWidthBox->insertItem(i18n("Large"));
QGroupBox* gridGroup = new QGroupBox(2, Qt::Horizontal, i18n("Grid"), this); TQGroupBox* gridGroup = new TQGroupBox(2, Qt::Horizontal, i18n("Grid"), this);
gridGroup->setSizePolicy(sizePolicy); gridGroup->tqsetSizePolicy(sizePolicy);
gridGroup->setMargin(margin); gridGroup->setMargin(margin);
const bool leftToRightArrangement = (settings->arrangement() == QIconView::LeftToRight); const bool leftToRightArrangement = (settings->arrangement() == TQIconView::LeftToRight);
new QLabel(i18n("Arrangement:"), gridGroup); new TQLabel(i18n("Arrangement:"), gridGroup);
m_arrangementBox = new QComboBox(gridGroup); m_arrangementBox = new TQComboBox(gridGroup);
m_arrangementBox->insertItem(i18n("Left to right")); m_arrangementBox->insertItem(i18n("Left to right"));
m_arrangementBox->insertItem(i18n("Top to bottom")); m_arrangementBox->insertItem(i18n("Top to bottom"));
m_arrangementBox->setCurrentItem(leftToRightArrangement ? 0 : 1); m_arrangementBox->setCurrentItem(leftToRightArrangement ? 0 : 1);
new QLabel(i18n("Grid spacing:"), gridGroup); new TQLabel(i18n("Grid spacing:"), gridGroup);
m_gridSpacingBox = new QComboBox(gridGroup); m_gridSpacingBox = new TQComboBox(gridGroup);
m_gridSpacingBox->insertItem(i18n("Small")); m_gridSpacingBox->insertItem(i18n("Small"));
m_gridSpacingBox->insertItem(i18n("Medium")); m_gridSpacingBox->insertItem(i18n("Medium"));
m_gridSpacingBox->insertItem(i18n("Large")); m_gridSpacingBox->insertItem(i18n("Large"));
m_gridSpacingBox->setCurrentItem((settings->gridSpacing() - GRID_SPACING_BASE) / GRID_SPACING_INC); m_gridSpacingBox->setCurrentItem((settings->gridSpacing() - GRID_SPACING_BASE) / GRID_SPACING_INC);
// Add a dummy widget with no restriction regarding // Add a dummy widget with no restriction regarding
// a vertical resizing. This assures that the dialog layout // a vertical resizing. This assures that the dialog tqlayout
// is not stretched vertically. // is not stretched vertically.
new QWidget(this); new TQWidget(this);
adjustTextWidthSelection(); adjustTextWidthSelection();
} }
@ -183,9 +183,9 @@ void IconsViewSettingsPage::applySettings()
const int fontSize = m_fontSizeBox->value(); const int fontSize = m_fontSizeBox->value();
QIconView::Arrangement arrangement = (m_arrangementBox->currentItem() == 0) ? TQIconView::Arrangement arrangement = (m_arrangementBox->currentItem() == 0) ?
QIconView::LeftToRight : TQIconView::LeftToRight :
QIconView::TopToBottom; TQIconView::TopToBottom;
settings->setArrangement(arrangement); settings->setArrangement(arrangement);
settings->calculateGridSize(m_textWidthBox->currentItem()); settings->calculateGridSize(m_textWidthBox->currentItem());

@ -21,14 +21,14 @@
#ifndef ICONSVIEWSETTINGSPAGE_H #ifndef ICONSVIEWSETTINGSPAGE_H
#define ICONSVIEWSETTINGSPAGE_H #define ICONSVIEWSETTINGSPAGE_H
#include <qvbox.h> #include <tqvbox.h>
#include <dolphiniconsview.h> #include <dolphiniconsview.h>
class QSlider; class TQSlider;
class QComboBox; class TQComboBox;
class QCheckBox; class TQCheckBox;
class QPushButton; class TQPushButton;
class QSpinBox; class TQSpinBox;
class KFontCombo; class KFontCombo;
class PixmapViewer; class PixmapViewer;
@ -49,13 +49,14 @@ class PixmapViewer;
* @see DolphinIconsViewSettings * @see DolphinIconsViewSettings
* @author Peter Penz <peter.penz@gmx.at> * @author Peter Penz <peter.penz@gmx.at>
*/ */
class IconsViewSettingsPage : public QVBox class IconsViewSettingsPage : public TQVBox
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
IconsViewSettingsPage(DolphinIconsView::LayoutMode mode, IconsViewSettingsPage(DolphinIconsView::LayoutMode mode,
QWidget* parent); TQWidget* tqparent);
virtual ~IconsViewSettingsPage(); virtual ~IconsViewSettingsPage();
/** /**
@ -72,16 +73,16 @@ private slots:
private: private:
DolphinIconsView::LayoutMode m_mode; DolphinIconsView::LayoutMode m_mode;
QSlider* m_iconSizeSlider; TQSlider* m_iconSizeSlider;
PixmapViewer* m_iconSizeViewer; PixmapViewer* m_iconSizeViewer;
QSlider* m_previewSizeSlider; TQSlider* m_previewSizeSlider;
PixmapViewer* m_previewSizeViewer; PixmapViewer* m_previewSizeViewer;
QComboBox* m_textWidthBox; TQComboBox* m_textWidthBox;
QComboBox* m_gridSpacingBox; TQComboBox* m_gridSpacingBox;
KFontCombo* m_fontFamilyBox; KFontCombo* m_fontFamilyBox;
QSpinBox* m_fontSizeBox; TQSpinBox* m_fontSizeBox;
QSpinBox* m_textlinesCountBox; TQSpinBox* m_textlinesCountBox;
QComboBox* m_arrangementBox; TQComboBox* m_arrangementBox;
/** Returns the icon size for the given slider value. */ /** Returns the icon size for the given slider value. */
int iconSize(int sliderValue) const; int iconSize(int sliderValue) const;

@ -20,18 +20,18 @@
#include "infosidebarpage.h" #include "infosidebarpage.h"
#include <assert.h> #include <assert.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qtimer.h> #include <tqtimer.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qvbox.h> #include <tqvbox.h>
#include <qvgroupbox.h> #include <tqvgroupbox.h>
#include <qpopupmenu.h> #include <tqpopupmenu.h>
#include <qpainter.h> #include <tqpainter.h>
#include <qfontmetrics.h> #include <tqfontmetrics.h>
#include <qgrid.h> #include <tqgrid.h>
#include <qhgroupbox.h> #include <tqhgroupbox.h>
#include <kbookmarkmanager.h> #include <kbookmarkmanager.h>
#include <klocale.h> #include <klocale.h>
@ -46,8 +46,8 @@
#include "pixmapviewer.h" #include "pixmapviewer.h"
#include "dolphinsettings.h" #include "dolphinsettings.h"
InfoSidebarPage::InfoSidebarPage(QWidget* parent) : InfoSidebarPage::InfoSidebarPage(TQWidget* tqparent) :
SidebarPage(parent), SidebarPage(tqparent),
m_multipleSelection(false), m_multipleSelection(false),
m_pendingPreview(false), m_pendingPreview(false),
m_timer(0), m_timer(0),
@ -59,12 +59,12 @@ InfoSidebarPage::InfoSidebarPage(QWidget* parent) :
{ {
const int spacing = KDialog::spacingHint(); const int spacing = KDialog::spacingHint();
m_timer = new QTimer(this); m_timer = new TQTimer(this);
connect(m_timer, SIGNAL(timeout()), connect(m_timer, TQT_SIGNAL(timeout()),
this, SLOT(slotTimeout())); this, TQT_SLOT(slotTimeout()));
QVBoxLayout* layout = new QVBoxLayout(this); TQVBoxLayout* tqlayout = new TQVBoxLayout(this);
layout->setSpacing(spacing); tqlayout->setSpacing(spacing);
// preview // preview
m_preview = new PixmapViewer(this); m_preview = new PixmapViewer(this);
@ -72,42 +72,42 @@ InfoSidebarPage::InfoSidebarPage(QWidget* parent) :
m_preview->setFixedHeight(KIcon::SizeEnormous); m_preview->setFixedHeight(KIcon::SizeEnormous);
// name // name
m_name = new QLabel(this); m_name = new TQLabel(this);
m_name->setTextFormat(Qt::RichText); m_name->setTextFormat(TQt::RichText);
m_name->setAlignment(m_name->alignment() | Qt::AlignHCenter); m_name->tqsetAlignment(m_name->tqalignment() | TQt::AlignHCenter);
QFontMetrics fontMetrics(m_name->font()); TQFontMetrics fontMetrics(m_name->font());
m_name->setMinimumHeight(fontMetrics.height() * 3); m_name->setMinimumHeight(fontMetrics.height() * 3);
m_name->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Maximum); m_name->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Maximum);
QWidget* sep1 = new QHGroupBox(this); // TODO: check whether default widget exist for this? TQWidget* sep1 = new TQHGroupBox(this); // TODO: check whether default widget exist for this?
sep1->setFixedHeight(1); sep1->setFixedHeight(1);
// general information // general information
m_infoGrid = new QGrid(2, this); m_infoGrid = new TQGrid(2, this);
m_infoGrid->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); m_infoGrid->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed);
QWidget* sep2 = new QHGroupBox(this); // TODO: check whether default widget exist for this? TQWidget* sep2 = new TQHGroupBox(this); // TODO: check whether default widget exist for this?
sep2->setFixedHeight(1); sep2->setFixedHeight(1);
// actions // actions
m_actionBox = new QVBox(this); m_actionBox = new TQVBox(this);
m_actionBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); m_actionBox->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed);
// Add a dummy widget with no restriction regarding a vertical resizing. // Add a dummy widget with no restriction regarding a vertical resizing.
// This assures that information is always top aligned. // This assures that information is always top aligned.
QWidget* dummy = new QWidget(this); TQWidget* dummy = new TQWidget(this);
layout->addItem(new QSpacerItem(spacing, spacing, QSizePolicy::Preferred, QSizePolicy::Fixed)); tqlayout->addItem(new TQSpacerItem(spacing, spacing, TQSizePolicy::Preferred, TQSizePolicy::Fixed));
layout->addWidget(m_preview); tqlayout->addWidget(m_preview);
layout->addWidget(m_name); tqlayout->addWidget(m_name);
layout->addWidget(sep1); tqlayout->addWidget(sep1);
layout->addWidget(m_infoGrid); tqlayout->addWidget(m_infoGrid);
layout->addWidget(sep2); tqlayout->addWidget(sep2);
layout->addWidget(m_actionBox); tqlayout->addWidget(m_actionBox);
layout->addWidget(dummy); tqlayout->addWidget(dummy);
connect(&Dolphin::mainWin(), SIGNAL(selectionChanged()), connect(&Dolphin::mainWin(), TQT_SIGNAL(selectionChanged()),
this, SLOT(showItemInfo())); this, TQT_SLOT(showItemInfo()));
connectToActiveView(); connectToActiveView();
} }
@ -156,7 +156,7 @@ void InfoSidebarPage::showItemInfo()
if (m_multipleSelection) { if (m_multipleSelection) {
KIconLoader iconLoader; KIconLoader iconLoader;
QPixmap icon = iconLoader.loadIcon("exec", TQPixmap icon = iconLoader.loadIcon("exec",
KIcon::NoGroup, KIcon::NoGroup,
KIcon::SizeEnormous); KIcon::SizeEnormous);
m_preview->setPixmap(icon); m_preview->setPixmap(icon);
@ -168,17 +168,17 @@ void InfoSidebarPage::showItemInfo()
list.append(m_shownURL); list.append(m_shownURL);
m_pendingPreview = true; m_pendingPreview = true;
m_preview->setPixmap(QPixmap()); m_preview->setPixmap(TQPixmap());
KIO::PreviewJob* job = KIO::filePreview(list, KIO::PreviewJob* job = KIO::filePreview(list,
m_preview->width(), m_preview->width(),
KIcon::SizeEnormous); KIcon::SizeEnormous);
connect(job, SIGNAL(gotPreview(const KFileItem*, const QPixmap&)), connect(job, TQT_SIGNAL(gotPreview(const KFileItem*, const TQPixmap&)),
this, SLOT(gotPreview(const KFileItem*, const QPixmap&))); this, TQT_SLOT(gotPreview(const KFileItem*, const TQPixmap&)));
connect(job, SIGNAL(failed(const KFileItem*)), connect(job, TQT_SIGNAL(failed(const KFileItem*)),
this, SLOT(slotPreviewFailed(const KFileItem*))); this, TQT_SLOT(slotPreviewFailed(const KFileItem*)));
QString text("<b>"); TQString text("<b>");
text.append(m_shownURL.fileName()); text.append(m_shownURL.fileName());
text.append("</b>"); text.append("</b>");
m_name->setText(text); m_name->setText(text);
@ -203,7 +203,7 @@ void InfoSidebarPage::slotPreviewFailed(const KFileItem* item)
} }
void InfoSidebarPage::gotPreview(const KFileItem* /* item */, void InfoSidebarPage::gotPreview(const KFileItem* /* item */,
const QPixmap& pixmap) const TQPixmap& pixmap)
{ {
if (m_pendingPreview) { if (m_pendingPreview) {
m_preview->setPixmap(pixmap); m_preview->setPixmap(pixmap);
@ -228,10 +228,10 @@ void InfoSidebarPage::connectToActiveView()
cancelRequest(); cancelRequest();
DolphinView* view = Dolphin::mainWin().activeView(); DolphinView* view = Dolphin::mainWin().activeView();
connect(view, SIGNAL(signalRequestItemInfo(const KURL&)), connect(view, TQT_SIGNAL(signalRequestItemInfo(const KURL&)),
this, SLOT(requestDelayedItemInfo(const KURL&))); this, TQT_SLOT(requestDelayedItemInfo(const KURL&)));
connect(view, SIGNAL(signalURLChanged(const KURL&)), connect(view, TQT_SIGNAL(signalURLChanged(const KURL&)),
this, SLOT(requestItemInfo(const KURL&))); this, TQT_SLOT(requestItemInfo(const KURL&)));
m_shownURL = view->url(); m_shownURL = view->url();
showItemInfo(); showItemInfo();
@ -243,13 +243,13 @@ bool InfoSidebarPage::applyBookmark()
KBookmark bookmark = root.first(); KBookmark bookmark = root.first();
while (!bookmark.isNull()) { while (!bookmark.isNull()) {
if (m_shownURL.equals(bookmark.url(), true)) { if (m_shownURL.equals(bookmark.url(), true)) {
QString text("<b>"); TQString text("<b>");
text.append(bookmark.text()); text.append(bookmark.text());
text.append("</b>"); text.append("</b>");
m_name->setText(text); m_name->setText(text);
KIconLoader iconLoader; KIconLoader iconLoader;
QPixmap icon = iconLoader.loadIcon(bookmark.icon(), TQPixmap icon = iconLoader.loadIcon(bookmark.icon(),
KIcon::NoGroup, KIcon::NoGroup,
KIcon::SizeEnormous); KIcon::SizeEnormous);
m_preview->setPixmap(icon); m_preview->setPixmap(icon);
@ -285,14 +285,14 @@ void InfoSidebarPage::createMetaInfo()
else { else {
addInfoLine(i18n("Type:"), fileItem.mimeComment()); addInfoLine(i18n("Type:"), fileItem.mimeComment());
QString sizeText(KIO::convertSize(fileItem.size())); TQString sizeText(KIO::convertSize(fileItem.size()));
addInfoLine(i18n("Size:"), sizeText); addInfoLine(i18n("Size:"), sizeText);
addInfoLine(i18n("Modified:"), fileItem.timeString()); addInfoLine(i18n("Modified:"), fileItem.timeString());
const KFileMetaInfo& metaInfo = fileItem.metaInfo(); const KFileMetaInfo& metaInfo = fileItem.metaInfo();
if (metaInfo.isValid()) { if (metaInfo.isValid()) {
QStringList keys = metaInfo.supportedKeys(); TQStringList keys = metaInfo.supportedKeys();
for (QStringList::Iterator it = keys.begin(); it != keys.end(); ++it) { for (TQStringList::Iterator it = keys.begin(); it != keys.end(); ++it) {
if (showMetaInfo(*it)) { if (showMetaInfo(*it)) {
KFileMetaInfoItem metaInfoItem = metaInfo.item(*it); KFileMetaInfoItem metaInfoItem = metaInfo.item(*it);
addInfoLine(*it, metaInfoItem.string()); addInfoLine(*it, metaInfoItem.string());
@ -317,10 +317,10 @@ void InfoSidebarPage::endInfoLines()
// remove labels which have not been used // remove labels which have not been used
if (m_currInfoLineIdx < static_cast<int>(m_infoWidgets.count())) { if (m_currInfoLineIdx < static_cast<int>(m_infoWidgets.count())) {
QPtrListIterator<QLabel> deleteIter(m_infoWidgets); TQPtrListIterator<TQLabel> deleteIter(m_infoWidgets);
deleteIter += m_currInfoLineIdx; deleteIter += m_currInfoLineIdx;
QWidget* widget = 0; TQWidget* widget = 0;
int removeCount = 0; int removeCount = 0;
while ((widget = deleteIter.current()) != 0) { while ((widget = deleteIter.current()) != 0) {
widget->close(); widget->close();
@ -334,7 +334,7 @@ void InfoSidebarPage::endInfoLines()
} }
} }
bool InfoSidebarPage::showMetaInfo(const QString& key) const bool InfoSidebarPage::showMetaInfo(const TQString& key) const
{ {
// sorted list of keys, where it's data should be shown // sorted list of keys, where it's data should be shown
static const char* keys[] = { static const char* keys[] = {
@ -372,9 +372,9 @@ bool InfoSidebarPage::showMetaInfo(const QString& key) const
return false; return false;
} }
void InfoSidebarPage::addInfoLine(const QString& labelText, const QString& infoText) void InfoSidebarPage::addInfoLine(const TQString& labelText, const TQString& infoText)
{ {
QString labelStr("<b>"); TQString labelStr("<b>");
labelStr.append(labelText); labelStr.append(labelText);
labelStr.append("</b>&nbsp;"); labelStr.append("</b>&nbsp;");
@ -386,16 +386,16 @@ void InfoSidebarPage::addInfoLine(const QString& labelText, const QString& infoT
} }
else { else {
// no labels are available anymore, hence create 2 new ones // no labels are available anymore, hence create 2 new ones
QLabel* label = new QLabel(labelStr, m_infoGrid); TQLabel* label = new TQLabel(labelStr, m_infoGrid);
label->setTextFormat(Qt::RichText); label->setTextFormat(TQt::RichText);
label->setAlignment(Qt::AlignRight | label->tqsetAlignment(TQt::AlignRight |
Qt::AlignTop); TQt::AlignTop);
label->show(); label->show();
m_infoWidgets.append(label); m_infoWidgets.append(label);
QLabel* info = new QLabel(infoText, m_infoGrid); TQLabel* info = new TQLabel(infoText, m_infoGrid);
info->setTextFormat(Qt::RichText); info->setTextFormat(TQt::RichText);
info->setAlignment(Qt::AlignTop | Qt::WordBreak); info->tqsetAlignment(TQt::AlignTop | TQt::WordBreak);
info->show(); info->show();
m_infoWidgets.append(info); m_infoWidgets.append(info);
@ -406,9 +406,9 @@ void InfoSidebarPage::addInfoLine(const QString& labelText, const QString& infoT
void InfoSidebarPage::insertActions() void InfoSidebarPage::insertActions()
{ {
// delete all existing action widgets // delete all existing action widgets
// TODO: just use children() from QObject... // TODO: just use tqchildren() from TQObject...
QPtrListIterator<QWidget> deleteIter(m_actionWidgets); TQPtrListIterator<TQWidget> deleteIter(m_actionWidgets);
QWidget* widget = 0; TQWidget* widget = 0;
while ((widget = deleteIter.current()) != 0) { while ((widget = deleteIter.current()) != 0) {
widget->close(); widget->close();
widget->deleteLater(); widget->deleteLater();
@ -435,17 +435,17 @@ void InfoSidebarPage::insertActions()
// 'itemList' contains now all KFileItems, where an item information should be shown. // 'itemList' contains now all KFileItems, where an item information should be shown.
// TODO: the following algorithm is quite equal to DolphinContextMenu::insertActionItems(). // TODO: the following algorithm is quite equal to DolphinContextMenu::insertActionItems().
// It's open yet whether they should be merged or whether they have to work slightly different. // It's open yet whether they should be merged or whether they have to work slightly different.
QStringList dirs = KGlobal::dirs()->findDirs("data", "d3lphin/servicemenus/"); TQStringList dirs = KGlobal::dirs()->findDirs("data", "d3lphin/servicemenus/");
for (QStringList::ConstIterator dirIt = dirs.begin(); dirIt != dirs.end(); ++dirIt) { for (TQStringList::ConstIterator dirIt = dirs.begin(); dirIt != dirs.end(); ++dirIt) {
QDir dir(*dirIt); TQDir dir(*dirIt);
QStringList entries = dir.entryList("*.desktop", QDir::Files); TQStringList entries = dir.entryList("*.desktop", TQDir::Files);
for (QStringList::ConstIterator entryIt = entries.begin(); entryIt != entries.end(); ++entryIt) { for (TQStringList::ConstIterator entryIt = entries.begin(); entryIt != entries.end(); ++entryIt) {
KSimpleConfig cfg(*dirIt + *entryIt, true); KSimpleConfig cfg(*dirIt + *entryIt, true);
cfg.setDesktopGroup(); cfg.setDesktopGroup();
if ((cfg.hasKey("Actions") || cfg.hasKey("X-KDE-GetActionMenu")) && cfg.hasKey("ServiceTypes")) { if ((cfg.hasKey("Actions") || cfg.hasKey("X-KDE-GetActionMenu")) && cfg.hasKey("ServiceTypes")) {
const QStringList types = cfg.readListEntry("ServiceTypes"); const TQStringList types = cfg.readListEntry("ServiceTypes");
for (QStringList::ConstIterator it = types.begin(); it != types.end(); ++it) { for (TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it) {
// check whether the mime type is equal or whether the // check whether the mime type is equal or whether the
// mimegroup (e. g. image/*) is supported // mimegroup (e. g. image/*) is supported
@ -470,37 +470,37 @@ void InfoSidebarPage::insertActions()
KFileItem* item = 0; KFileItem* item = 0;
insert = true; insert = true;
while (insert && ((item = mimeIt.current()) != 0)) { while (insert && ((item = mimeIt.current()) != 0)) {
const QString mimeType((*mimeIt)->mimetype()); const TQString mimeType((*mimeIt)->mimetype());
const QString mimeGroup(mimeType.left(mimeType.find('/'))); const TQString mimeGroup(mimeType.left(mimeType.tqfind('/')));
insert = (*it == mimeType) || insert = (*it == mimeType) ||
((*it).right(1) == "*") && ((*it).right(1) == "*") &&
((*it).left((*it).find('/')) == mimeGroup); ((*it).left((*it).tqfind('/')) == mimeGroup);
++mimeIt; ++mimeIt;
} }
} }
if (insert) { if (insert) {
const QString submenuName = cfg.readEntry( "X-KDE-Submenu" ); const TQString submenuName = cfg.readEntry( "X-KDE-Submenu" );
QPopupMenu* popup = 0; TQPopupMenu* popup = 0;
if (!submenuName.isEmpty()) { if (!submenuName.isEmpty()) {
// create a sub menu containing all actions // create a sub menu containing all actions
popup = new QPopupMenu(); popup = new TQPopupMenu();
connect(popup, SIGNAL(activated(int)), connect(popup, TQT_SIGNAL(activated(int)),
this, SLOT(startService(int))); this, TQT_SLOT(startService(int)));
QPushButton* button = new QPushButton(submenuName, m_actionBox); TQPushButton* button = new TQPushButton(submenuName, m_actionBox);
button->setFlat(true); button->setFlat(true);
button->setPopup(popup); button->setPopup(popup);
button->show(); button->show();
m_actionWidgets.append(button); m_actionWidgets.append(button);
} }
QValueList<KDEDesktopMimeType::Service> userServices = TQValueList<KDEDesktopMimeType::Service> userServices =
KDEDesktopMimeType::userDefinedServices(*dirIt + *entryIt, true); KDEDesktopMimeType::userDefinedServices(*dirIt + *entryIt, true);
// iterate through all actions and add them to a widget // iterate through all actions and add them to a widget
QValueList<KDEDesktopMimeType::Service>::Iterator serviceIt; TQValueList<KDEDesktopMimeType::Service>::Iterator serviceIt;
for (serviceIt = userServices.begin(); serviceIt != userServices.end(); ++serviceIt) { for (serviceIt = userServices.begin(); serviceIt != userServices.end(); ++serviceIt) {
KDEDesktopMimeType::Service service = (*serviceIt); KDEDesktopMimeType::Service service = (*serviceIt);
if (popup == 0) { if (popup == 0) {
@ -508,8 +508,8 @@ void InfoSidebarPage::insertActions()
service.m_strName, service.m_strName,
m_actionBox, m_actionBox,
actionsIndex); actionsIndex);
connect(button, SIGNAL(requestServiceStart(int)), connect(button, TQT_SIGNAL(requestServiceStart(int)),
this, SLOT(startService(int))); this, TQT_SLOT(startService(int)));
m_actionWidgets.append(button); m_actionWidgets.append(button);
button->show(); button->show();
} }
@ -527,37 +527,37 @@ void InfoSidebarPage::insertActions()
} }
} }
ServiceButton::ServiceButton(const QIconSet& icon, ServiceButton::ServiceButton(const TQIconSet& icon,
const QString& text, const TQString& text,
QWidget* parent, TQWidget* tqparent,
int index) : int index) :
QPushButton(icon, text, parent), TQPushButton(icon, text, tqparent),
m_hover(false), m_hover(false),
m_index(index) m_index(index)
{ {
setEraseColor(colorGroup().background()); setEraseColor(tqcolorGroup().background());
setFocusPolicy(QWidget::NoFocus); setFocusPolicy(TQ_NoFocus);
connect(this, SIGNAL(released()), connect(this, TQT_SIGNAL(released()),
this, SLOT(slotReleased())); this, TQT_SLOT(slotReleased()));
} }
ServiceButton::~ServiceButton() ServiceButton::~ServiceButton()
{ {
} }
void ServiceButton::drawButton(QPainter* painter) void ServiceButton::drawButton(TQPainter* painter)
{ {
const int buttonWidth = width(); const int buttonWidth = width();
const int buttonHeight = height(); const int buttonHeight = height();
QColor backgroundColor; TQColor backgroundColor;
QColor foregroundColor; TQColor foregroundColor;
if (m_hover) { if (m_hover) {
backgroundColor = KGlobalSettings::highlightColor(); backgroundColor = KGlobalSettings::highlightColor();
foregroundColor = KGlobalSettings::highlightedTextColor(); foregroundColor = KGlobalSettings::highlightedTextColor();
} }
else { else {
backgroundColor = colorGroup().background(); backgroundColor = tqcolorGroup().background();
foregroundColor = KGlobalSettings::buttonTextColor(); foregroundColor = KGlobalSettings::buttonTextColor();
} }
@ -571,9 +571,9 @@ void ServiceButton::drawButton(QPainter* painter)
// draw icon // draw icon
int x = spacing; int x = spacing;
const int y = (buttonHeight - KIcon::SizeSmall) / 2; const int y = (buttonHeight - KIcon::SizeSmall) / 2;
const QIconSet* set = iconSet(); const TQIconSet* set = iconSet();
if (set != 0) { if (set != 0) {
painter->drawPixmap(x, y, set->pixmap(QIconSet::Small, QIconSet::Normal)); painter->drawPixmap(x, y, set->pixmap(TQIconSet::Small, TQIconSet::Normal));
} }
x += KIcon::SizeSmall + spacing; x += KIcon::SizeSmall + spacing;
@ -581,26 +581,26 @@ void ServiceButton::drawButton(QPainter* painter)
painter->setPen(foregroundColor); painter->setPen(foregroundColor);
const int textWidth = buttonWidth - x; const int textWidth = buttonWidth - x;
QFontMetrics fontMetrics(font()); TQFontMetrics fontMetrics(font());
const bool clipped = fontMetrics.width(text()) >= textWidth; const bool clipped = fontMetrics.width(text()) >= textWidth;
//const int align = clipped ? Qt::AlignVCenter : Qt::AlignCenter; //const int align = clipped ? TQt::AlignVCenter : TQt::AlignCenter;
painter->drawText(QRect(x, 0, textWidth, buttonHeight), Qt::AlignVCenter, text()); painter->drawText(TQRect(x, 0, textWidth, buttonHeight), TQt::AlignVCenter, text());
if (clipped) { if (clipped) {
// Blend the right area of the text with the background, as the // Blend the right area of the text with the background, as the
// text is clipped. // text is clipped.
// TODO #1: use alpha blending in Qt4 instead of drawing the text that often // TODO #1: use alpha blending in TQt4 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; const int blendSteps = 16;
QColor blendColor(backgroundColor); TQColor blendColor(backgroundColor);
const int redInc = (foregroundColor.red() - backgroundColor.red()) / blendSteps; const int redInc = (foregroundColor.red() - backgroundColor.red()) / blendSteps;
const int greenInc = (foregroundColor.green() - backgroundColor.green()) / blendSteps; const int greenInc = (foregroundColor.green() - backgroundColor.green()) / blendSteps;
const int blueInc = (foregroundColor.blue() - backgroundColor.blue()) / blendSteps; const int blueInc = (foregroundColor.blue() - backgroundColor.blue()) / blendSteps;
for (int i = 0; i < blendSteps; ++i) { for (int i = 0; i < blendSteps; ++i) {
painter->setClipRect(QRect(x + textWidth - i, 0, 1, buttonHeight)); painter->setClipRect(TQRect(x + textWidth - i, 0, 1, buttonHeight));
painter->setPen(blendColor); painter->setPen(blendColor);
painter->drawText(QRect(x, 0, textWidth, buttonHeight), Qt::AlignVCenter, text()); painter->drawText(TQRect(x, 0, textWidth, buttonHeight), TQt::AlignVCenter, text());
blendColor.setRgb(blendColor.red() + redInc, blendColor.setRgb(blendColor.red() + redInc,
blendColor.green() + greenInc, blendColor.green() + greenInc,
@ -609,16 +609,16 @@ void ServiceButton::drawButton(QPainter* painter)
} }
} }
void ServiceButton::enterEvent(QEvent* event) void ServiceButton::enterEvent(TQEvent* event)
{ {
QPushButton::enterEvent(event); TQPushButton::enterEvent(event);
m_hover = true; m_hover = true;
update(); update();
} }
void ServiceButton::leaveEvent(QEvent* event) void ServiceButton::leaveEvent(TQEvent* event)
{ {
QPushButton::leaveEvent(event); TQPushButton::leaveEvent(event);
m_hover = false; m_hover = false;
update(); update();
} }

@ -22,8 +22,8 @@
#include <sidebarpage.h> #include <sidebarpage.h>
#include <qvaluevector.h> #include <tqvaluevector.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <kurl.h> #include <kurl.h>
#include <ksortablevaluelist.h> #include <ksortablevaluelist.h>
@ -33,14 +33,14 @@ namespace KIO {
class Job; class Job;
}; };
class QPixmap; class TQPixmap;
class QIconSet; class TQIconSet;
class QString; class TQString;
class QPainter; class TQPainter;
class KFileItem; class KFileItem;
class QLabel; class TQLabel;
class QVBox; class TQVBox;
class QGrid; class TQGrid;
class PixmapViewer; class PixmapViewer;
/** /**
@ -51,9 +51,10 @@ class PixmapViewer;
class InfoSidebarPage : public SidebarPage class InfoSidebarPage : public SidebarPage
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
InfoSidebarPage(QWidget* parent); InfoSidebarPage(TQWidget* tqparent);
virtual ~InfoSidebarPage(); virtual ~InfoSidebarPage();
protected: protected:
@ -99,7 +100,7 @@ private slots:
* Is invoked if a preview is available for the item. The preview * Is invoked if a preview is available for the item. The preview
* \a pixmap is shown inside the info page. * \a pixmap is shown inside the info page.
*/ */
void gotPreview(const KFileItem* item, const QPixmap& pixmap); void gotPreview(const KFileItem* item, const TQPixmap& pixmap);
/** /**
* Starts the service of m_actionsVector with the index \index on * Starts the service of m_actionsVector with the index \index on
@ -127,8 +128,8 @@ private:
// TODO: the following methods are just a prototypes for meta // TODO: the following methods are just a prototypes for meta
// info generation... // info generation...
void createMetaInfo(); void createMetaInfo();
void addInfoLine(const QString& labelText, void addInfoLine(const TQString& labelText,
const QString& infoText); const TQString& infoText);
void beginInfoLines(); void beginInfoLines();
void endInfoLines(); void endInfoLines();
@ -136,7 +137,7 @@ private:
* Returns true, if the string \a key represents a meta information * Returns true, if the string \a key represents a meta information
* that should be shown. * that should be shown.
*/ */
bool showMetaInfo(const QString& key) const; bool showMetaInfo(const TQString& key) const;
/** /**
* Inserts the available actions to the info page for the given item. * Inserts the available actions to the info page for the given item.
@ -145,33 +146,34 @@ private:
bool m_multipleSelection; bool m_multipleSelection;
bool m_pendingPreview; bool m_pendingPreview;
QTimer* m_timer; TQTimer* m_timer;
KURL m_shownURL; KURL m_shownURL;
KURL m_urlCandidate; KURL m_urlCandidate;
PixmapViewer* m_preview; PixmapViewer* m_preview;
QLabel* m_name; TQLabel* m_name;
int m_currInfoLineIdx; int m_currInfoLineIdx;
QGrid* m_infoGrid; TQGrid* m_infoGrid;
QPtrList<QLabel> m_infoWidgets; // TODO: use children() from QObject instead TQPtrList<TQLabel> m_infoWidgets; // TODO: use tqchildren() from TQObject instead
QVBox* m_actionBox; TQVBox* m_actionBox;
QPtrList<QWidget> m_actionWidgets; // TODO: use children() from QObject instead TQPtrList<TQWidget> m_actionWidgets; // TODO: use tqchildren() from TQObject instead
QValueVector<KDEDesktopMimeType::Service> m_actionsVector; TQValueVector<KDEDesktopMimeType::Service> m_actionsVector;
}; };
// 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 // -> provide helper class or common base class
class ServiceButton : public QPushButton class ServiceButton : public TQPushButton
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
ServiceButton(const QIconSet& icon, ServiceButton(const TQIconSet& icon,
const QString& text, const TQString& text,
QWidget* parent, TQWidget* tqparent,
int index); int index);
virtual ~ServiceButton(); virtual ~ServiceButton();
@ -179,9 +181,9 @@ signals:
void requestServiceStart(int index); void requestServiceStart(int index);
protected: protected:
virtual void drawButton(QPainter* painter); virtual void drawButton(TQPainter* painter);
virtual void enterEvent(QEvent* event); virtual void enterEvent(TQEvent* event);
virtual void leaveEvent(QEvent* event); virtual void leaveEvent(TQEvent* event);
private slots: private slots:
void slotReleased(); void slotReleased();

@ -21,9 +21,9 @@
#include "itemeffectsmanager.h" #include "itemeffectsmanager.h"
#include <kiconeffect.h> #include <kiconeffect.h>
#include <kapplication.h> #include <kapplication.h>
#include <qobjectlist.h> #include <tqobjectlist.h>
#include <kglobalsettings.h> #include <kglobalsettings.h>
#include <qclipboard.h> #include <tqclipboard.h>
#include <kurldrag.h> #include <kurldrag.h>
#include <klocale.h> #include <klocale.h>
@ -32,7 +32,7 @@
ItemEffectsManager::ItemEffectsManager() ItemEffectsManager::ItemEffectsManager()
{ {
m_pixmapCopy = new QPixmap(); m_pixmapCopy = new TQPixmap();
} }
ItemEffectsManager::~ItemEffectsManager() ItemEffectsManager::~ItemEffectsManager()
@ -64,7 +64,7 @@ void ItemEffectsManager::activateItem(void* context)
resetActivatedItem(); resetActivatedItem();
const QPixmap* itemPixmap = contextPixmap(context); const TQPixmap* itemPixmap = contextPixmap(context);
if (itemPixmap != 0) { if (itemPixmap != 0) {
// remember the pixmap and item to be able to // remember the pixmap and item to be able to
// restore it to the old state later // restore it to the old state later
@ -73,7 +73,7 @@ void ItemEffectsManager::activateItem(void* context)
// apply an icon effect to the item below the mouse pointer // apply an icon effect to the item below the mouse pointer
KIconEffect iconEffect; KIconEffect iconEffect;
QPixmap pixmap = iconEffect.apply(*itemPixmap, TQPixmap pixmap = iconEffect.apply(*itemPixmap,
KIcon::Desktop, KIcon::Desktop,
KIcon::ActiveState); KIcon::ActiveState);
setContextPixmap(context, pixmap); setContextPixmap(context, pixmap);
@ -96,14 +96,14 @@ void ItemEffectsManager::resetActivatedItem()
if (itemURL == m_highlightedURL) { if (itemURL == m_highlightedURL) {
// the highlighted item has been found and is restored to the default state // the highlighted item has been found and is restored to the default state
KIconEffect iconEffect; KIconEffect iconEffect;
QPixmap pixmap = iconEffect.apply(*m_pixmapCopy, TQPixmap pixmap = iconEffect.apply(*m_pixmapCopy,
KIcon::Desktop, KIcon::Desktop,
KIcon::DefaultState); KIcon::DefaultState);
// TODO: KFileIconView does not emit any signal when the preview has been finished. // TODO: KFileIconView does not emit any signal when the preview has been finished.
// Hence check the size to prevent that a preview is hidden by restoring a // Hence check the size to prevent that a preview is hidden by restoring a
// non-preview pixmap. // non-preview pixmap.
const QPixmap* highlightedPixmap = contextPixmap(context); const TQPixmap* highlightedPixmap = contextPixmap(context);
const bool restore = (pixmap.width() == highlightedPixmap->width()) && const bool restore = (pixmap.width() == highlightedPixmap->width()) &&
(pixmap.height() == highlightedPixmap->height()); (pixmap.height() == highlightedPixmap->height());
if (restore) { if (restore) {
@ -126,7 +126,7 @@ void ItemEffectsManager::updateDisabledItems()
for (void* context = firstContext(); context != 0; context = nextContext(context)) { for (void* context = firstContext(); context != 0; context = nextContext(context)) {
const KFileItem* fileInfo = contextFileInfo(context); const KFileItem* fileInfo = contextFileInfo(context);
const KURL& fileURL = fileInfo->url(); const KURL& fileURL = fileInfo->url();
QValueListIterator<DisabledItem> it = m_disabledItems.begin(); TQValueListIterator<DisabledItem> it = m_disabledItems.begin();
while (it != m_disabledItems.end()) { while (it != m_disabledItems.end()) {
if (fileURL == (*it).url) { if (fileURL == (*it).url) {
setContextPixmap(context, (*it).pixmap); setContextPixmap(context, (*it).pixmap);
@ -141,8 +141,8 @@ void ItemEffectsManager::updateDisabledItems()
return; return;
} }
QClipboard* clipboard = QApplication::clipboard(); TQClipboard* clipboard = TQApplication::tqclipboard();
QMimeSource* data = clipboard->data(); TQMimeSource* data = clipboard->data();
if (!KURLDrag::canDecode(data)) { if (!KURLDrag::canDecode(data)) {
return; return;
} }
@ -156,7 +156,7 @@ void ItemEffectsManager::updateDisabledItems()
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); const TQPixmap* itemPixmap = contextPixmap(context);
if (itemPixmap != 0) { if (itemPixmap != 0) {
// remember old pixmap // remember old pixmap
DisabledItem disabledItem; DisabledItem disabledItem;
@ -165,7 +165,7 @@ void ItemEffectsManager::updateDisabledItems()
m_disabledItems.append(disabledItem); m_disabledItems.append(disabledItem);
KIconEffect iconEffect; KIconEffect iconEffect;
QPixmap disabledPixmap = iconEffect.apply(*itemPixmap, TQPixmap disabledPixmap = iconEffect.apply(*itemPixmap,
KIcon::Desktop, KIcon::Desktop,
KIcon::DisabledState); KIcon::DisabledState);
setContextPixmap(context, disabledPixmap); setContextPixmap(context, disabledPixmap);
@ -176,13 +176,13 @@ void ItemEffectsManager::updateDisabledItems()
} }
} }
QString ItemEffectsManager::statusBarText(KFileItem* fileInfo) const TQString ItemEffectsManager::statusBarText(KFileItem* fileInfo) const
{ {
if (fileInfo->isDir()) { if (fileInfo->isDir()) {
// KFileItem::getStatusBar() returns "MyDocuments/ Folder" as // KFileItem::getStatusBar() returns "MyDocuments/ Folder" as
// status bar text for a folder 'MyDocuments'. This is adjusted // status bar text for a folder 'MyDocuments'. This is adjusted
// to "MyDocuments (Folder)" in Dolphin. // to "MyDocuments (Folder)" in Dolphin.
return i18n("%1 (Folder)").arg(fileInfo->name()); return i18n("%1 (Folder)").tqarg(fileInfo->name());
} }
return fileInfo->getStatusBarInfo(); return fileInfo->getStatusBarInfo();

@ -21,10 +21,10 @@
#ifndef ITEMEFFECTSMANAGER_H #ifndef ITEMEFFECTSMANAGER_H
#define ITEMEFFECTSMANAGER_H #define ITEMEFFECTSMANAGER_H
#include <qobject.h> #include <tqobject.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <kurl.h> #include <kurl.h>
#include <qvaluelist.h> #include <tqvaluelist.h>
class KFileItem; class KFileItem;
/** /**
@ -42,10 +42,10 @@ class KFileItem;
* which usually is represented by a KFileListViewItem or * which usually is represented by a KFileListViewItem or
* a KFileIconViewItem. * a KFileIconViewItem.
* *
* In Qt4 the item effects manager should get integrated as part of Interview * In TQt4 the item effects manager should get integrated as part of Interview
* and hence no abstract context handling should be necessary anymore. The main * and hence no abstract context handling should be necessary anymore. The main
* purpose of the current interface is to prevent code duplication as there is * purpose of the current interface is to prevent code duplication as there is
* no common model shared by QListView and QIconView of Qt3. * no common model shared by TQListView and TQIconView of TQt3.
* *
* @see DolphinIconsView * @see DolphinIconsView
* @see DolphinDetailsView * @see DolphinDetailsView
@ -91,8 +91,8 @@ public:
protected: protected:
virtual void setContextPixmap(void* context, virtual void setContextPixmap(void* context,
const QPixmap& pixmap) = 0; const TQPixmap& pixmap) = 0;
virtual const QPixmap* contextPixmap(void* context) = 0; virtual const TQPixmap* contextPixmap(void* context) = 0;
virtual void* firstContext() = 0; virtual void* firstContext() = 0;
virtual void* nextContext(void* context) = 0; virtual void* nextContext(void* context) = 0;
virtual KFileItem* contextFileInfo(void* context) = 0; virtual KFileItem* contextFileInfo(void* context) = 0;
@ -104,17 +104,17 @@ protected:
private: private:
struct DisabledItem { struct DisabledItem {
KURL url; KURL url;
QPixmap pixmap; TQPixmap pixmap;
}; };
QPixmap* m_pixmapCopy; TQPixmap* m_pixmapCopy;
KURL m_highlightedURL; KURL m_highlightedURL;
// contains all items which have been disabled by a 'cut' operation // contains all items which have been disabled by a 'cut' operation
QValueList<DisabledItem> m_disabledItems; TQValueList<DisabledItem> m_disabledItems;
/** Returns the text for the statusbar for an activated item. */ /** Returns the text for the statusbar for an activated item. */
QString statusBarText(KFileItem* fileInfo) const; TQString statusBarText(KFileItem* fileInfo) const;
}; };
#endif #endif

@ -22,10 +22,10 @@
#include <kglobalsettings.h> #include <kglobalsettings.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <qpainter.h> #include <tqpainter.h>
PixmapViewer::PixmapViewer(QWidget* parent) : PixmapViewer::PixmapViewer(TQWidget* tqparent) :
QWidget(parent) TQWidget(tqparent)
{ {
setMinimumWidth(KIcon::SizeEnormous); setMinimumWidth(KIcon::SizeEnormous);
setMinimumWidth(KIcon::SizeEnormous); setMinimumWidth(KIcon::SizeEnormous);
@ -35,17 +35,17 @@ PixmapViewer::~PixmapViewer()
{ {
} }
void PixmapViewer::setPixmap(const QPixmap& pixmap) void PixmapViewer::setPixmap(const TQPixmap& pixmap)
{ {
m_pixmap = pixmap; m_pixmap = pixmap;
update(); update();
} }
void PixmapViewer::paintEvent(QPaintEvent* event) void PixmapViewer::paintEvent(TQPaintEvent* event)
{ {
QWidget::paintEvent(event); TQWidget::paintEvent(event);
QPainter painter; TQPainter painter;
painter.begin(this); painter.begin(this);
const int x = (width() - m_pixmap.width()) / 2; const int x = (width() - m_pixmap.width()) / 2;
const int y = (height() - m_pixmap.height()) / 2; const int y = (height() - m_pixmap.height()) / 2;

@ -21,8 +21,8 @@
#ifndef PIXMAPVIEWER_H #ifndef PIXMAPVIEWER_H
#define PIXMAPVIEWER_H #define PIXMAPVIEWER_H
#include <qwidget.h> #include <tqwidget.h>
#include <qpixmap.h> #include <tqpixmap.h>
/** /**
* @brief Widget which shows a pixmap centered inside the boundaries. * @brief Widget which shows a pixmap centered inside the boundaries.
@ -30,20 +30,21 @@
* @see IconsViewSettingsPage * @see IconsViewSettingsPage
* @author Peter Penz <peter.penz@gmx.at> * @author Peter Penz <peter.penz@gmx.at>
*/ */
class PixmapViewer : public QWidget class PixmapViewer : public TQWidget
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
PixmapViewer(QWidget* parent); PixmapViewer(TQWidget* tqparent);
virtual ~PixmapViewer(); virtual ~PixmapViewer();
void setPixmap(const QPixmap& pixmap); void setPixmap(const TQPixmap& pixmap);
const QPixmap& pixmap() const { return m_pixmap; } const TQPixmap& pixmap() const { return m_pixmap; }
protected: protected:
virtual void paintEvent(QPaintEvent* event); virtual void paintEvent(TQPaintEvent* event);
private: private:
QPixmap m_pixmap; TQPixmap m_pixmap;
}; };

@ -22,13 +22,13 @@
#include "dolphin.h" #include "dolphin.h"
#include "dolphinstatusbar.h" #include "dolphinstatusbar.h"
ProgressIndicator::ProgressIndicator(const QString& progressText, ProgressIndicator::ProgressIndicator(const TQString& progressText,
const QString& finishedText, const TQString& finishedText,
int operationsCount) int operationsCount)
: m_showProgress(false), : m_showProgress(false),
m_operationsCount(operationsCount), m_operationsCount(operationsCount),
m_operationsIndex(0), m_operationsIndex(0),
m_startTime(QTime::currentTime()), m_startTime(TQTime::currentTime()),
m_finishedText(finishedText) m_finishedText(finishedText)
{ {
DolphinStatusBar* statusBar = Dolphin::mainWin().activeView()->statusBar(); DolphinStatusBar* statusBar = Dolphin::mainWin().activeView()->statusBar();
@ -41,7 +41,7 @@ ProgressIndicator::ProgressIndicator(const QString& progressText,
ProgressIndicator::~ProgressIndicator() ProgressIndicator::~ProgressIndicator()
{ {
DolphinStatusBar* statusBar = Dolphin::mainWin().activeView()->statusBar(); DolphinStatusBar* statusBar = Dolphin::mainWin().activeView()->statusBar();
statusBar->setProgressText(QString::null); statusBar->setProgressText(TQString());
statusBar->setProgress(100); statusBar->setProgress(100);
statusBar->setMessage(m_finishedText, DolphinStatusBar::OperationCompleted); statusBar->setMessage(m_finishedText, DolphinStatusBar::OperationCompleted);
@ -55,7 +55,7 @@ void ProgressIndicator::execOperation()
++m_operationsIndex; ++m_operationsIndex;
if (!m_showProgress) { if (!m_showProgress) {
const int elapsed = m_startTime.msecsTo(QTime::currentTime()); const int elapsed = m_startTime.msecsTo(TQTime::currentTime());
if (elapsed > 500) { if (elapsed > 500) {
// the operations took already more than 500 milliseconds, // the operations took already more than 500 milliseconds,
// therefore show a progress indication // therefore show a progress indication
@ -65,14 +65,14 @@ void ProgressIndicator::execOperation()
} }
if (m_showProgress) { if (m_showProgress) {
const QTime currentTime = QTime::currentTime(); const TQTime currentTime = TQTime::currentTime();
if (m_startTime.msecsTo(currentTime) > 100) { if (m_startTime.msecsTo(currentTime) > 100) {
m_startTime = currentTime; m_startTime = currentTime;
DolphinStatusBar* statusBar = Dolphin::mainWin().activeView()->statusBar(); DolphinStatusBar* statusBar = Dolphin::mainWin().activeView()->statusBar();
statusBar->setProgress((m_operationsIndex * 100) / m_operationsCount); statusBar->setProgress((m_operationsIndex * 100) / m_operationsCount);
kapp->processEvents(); kapp->processEvents();
statusBar->repaint(); statusBar->tqrepaint();
} }
} }
} }

@ -20,7 +20,7 @@
#ifndef PROGRESSINDICATOR_H #ifndef PROGRESSINDICATOR_H
#define PROGRESSINDICATOR_H #define PROGRESSINDICATOR_H
#include <qdatetime.h> #include <tqdatetime.h>
/** /**
* Allows to show a progress of synchronous operations. Sample code: * Allows to show a progress of synchronous operations. Sample code:
@ -51,8 +51,8 @@ public:
* (e. g. "Loading finished."). * (e. g. "Loading finished.").
* @param operationsCount Number of operations. * @param operationsCount Number of operations.
*/ */
ProgressIndicator(const QString& progressText, ProgressIndicator(const TQString& progressText,
const QString& finishedText, const TQString& finishedText,
int operationsCount); int operationsCount);
/** /**
@ -71,8 +71,8 @@ private:
bool m_showProgress; bool m_showProgress;
int m_operationsCount; int m_operationsCount;
int m_operationsIndex; int m_operationsIndex;
QTime m_startTime; TQTime m_startTime;
QString m_finishedText; TQString m_finishedText;
}; };
#endif #endif

@ -20,9 +20,9 @@
#include "renamedialog.h" #include "renamedialog.h"
#include <klocale.h> #include <klocale.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qvbox.h> #include <tqvbox.h>
#include <assert.h> #include <assert.h>
#include <klineedit.h> #include <klineedit.h>
@ -32,24 +32,24 @@ RenameDialog::RenameDialog(const KURL::List& items) :
{ {
setButtonOK(KGuiItem(i18n("Rename"), "apply")); setButtonOK(KGuiItem(i18n("Rename"), "apply"));
QVBoxLayout* topLayout = new QVBoxLayout(plainPage(), 0, spacingHint()); TQVBoxLayout* topLayout = new TQVBoxLayout(plainPage(), 0, spacingHint());
topLayout->setMargin(KDialog::marginHint()); topLayout->setMargin(KDialog::marginHint());
const int itemCount = items.count(); const int itemCount = items.count();
QLabel* editLabel = new QLabel(i18n("Rename the %n selected items to:", "Rename the %n selected items to:", itemCount), TQLabel* editLabel = new TQLabel(i18n("Rename the %n selected items to:", "Rename the %n selected items to:", itemCount),
plainPage()); plainPage());
m_lineEdit = new KLineEdit(plainPage()); m_lineEdit = new KLineEdit(plainPage());
m_newName = i18n("New name #"); m_newName = i18n("New name #");
assert(itemCount > 1); assert(itemCount > 1);
QString postfix(items[0].prettyURL().section('.',1)); TQString postfix(items[0].prettyURL().section('.',1));
if (postfix.length() > 0) { if (postfix.length() > 0) {
// The first item seems to have a postfix (e. g. 'jpg' or 'txt'). Now // The first item seems to have a postfix (e. g. 'jpg' or 'txt'). Now
// check whether all other items have the same postfix. If this is the // check whether all other items have the same postfix. If this is the
// case, add this postfix to the name suggestion. // case, add this postfix to the name suggestion.
postfix.insert(0, '.'); postfix.insert(0, '.');
for (int i = 1; i < itemCount; ++i) { for (int i = 1; i < itemCount; ++i) {
if (!items[i].prettyURL().contains(postfix)) { if (!items[i].prettyURL().tqcontains(postfix)) {
// at least one item does not have the same postfix // at least one item does not have the same postfix
postfix.truncate(0); postfix.truncate(0);
break; break;
@ -65,7 +65,7 @@ RenameDialog::RenameDialog(const KURL::List& items) :
m_lineEdit->setSelection(0, selectionLength - 1); m_lineEdit->setSelection(0, selectionLength - 1);
m_lineEdit->setFocus(); m_lineEdit->setFocus();
QLabel* infoLabel = new QLabel(i18n("(# will be replaced by ascending numbers)"), plainPage()); TQLabel* infoLabel = new TQLabel(i18n("(# will be replaced by ascending numbers)"), plainPage());
topLayout->addWidget(editLabel); topLayout->addWidget(editLabel);
topLayout->addWidget(m_lineEdit); topLayout->addWidget(m_lineEdit);
@ -79,7 +79,7 @@ RenameDialog::~RenameDialog()
void RenameDialog::slotOk() void RenameDialog::slotOk()
{ {
m_newName = m_lineEdit->text(); m_newName = m_lineEdit->text();
if (m_newName.contains('#') != 1) { if (m_newName.tqcontains('#') != 1) {
m_newName.truncate(0); m_newName.truncate(0);
} }

@ -22,7 +22,7 @@
#include <kdialogbase.h> #include <kdialogbase.h>
#include <kurl.h> #include <kurl.h>
#include <qstring.h> #include <tqstring.h>
class KLineEdit; class KLineEdit;
@ -33,8 +33,8 @@ class KLineEdit;
* must do this itself: * must do this itself:
* \code * \code
* RenameDialog dialog(...); * RenameDialog dialog(...);
* if (dialog.exec() == QDialog::Accepted) { * if (dialog.exec() == TQDialog::Accepted) {
* const QString& newName = dialog.newName(); * const TQString& newName = dialog.newName();
* // ... rename items corresponding to the new name * // ... rename items corresponding to the new name
* } * }
* \endcode * \endcode
@ -43,6 +43,7 @@ class KLineEdit;
class RenameDialog : public KDialogBase class RenameDialog : public KDialogBase
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
RenameDialog(const KURL::List& items); RenameDialog(const KURL::List& items);
@ -54,14 +55,14 @@ public:
* which should be replaced by ascending numbers. An empty string indicates * which should be replaced by ascending numbers. An empty string indicates
* that the user has removed the # character. * that the user has removed the # character.
*/ */
const QString& newName() const { return m_newName; } const TQString& newName() const { return m_newName; }
protected slots: protected slots:
virtual void slotOk(); virtual void slotOk();
private: private:
KLineEdit* m_lineEdit; KLineEdit* m_lineEdit;
QString m_newName; TQString m_newName;
}; };
#endif #endif

@ -31,11 +31,11 @@ Name[mk]=Свири аудиоцд со Амарок
Name[nds]=Audio-CD mit Amarok afspelen Name[nds]=Audio-CD mit Amarok afspelen
Name[nl]=Audio-cd met Amarok afspelen Name[nl]=Audio-cd met Amarok afspelen
Name[pa]=ਅਮਰੋਕ ਨਾਲ ਆਡੀਓ CD ਚਲਾਓ Name[pa]=ਅਮਰੋਕ ਨਾਲ ਆਡੀਓ CD ਚਲਾਓ
Name[pl]=Odtwórz Audio CD za pomocą Amarok Name[pl]=Odtwórz Audio CD za potqmocą Amarok
Name[pt]=Tocar o CD de Áudio com o Amarok Name[pt]=Tocar o CD de Áudio com o Amarok
Name[pt_BR]=Reproduzir CD de Áudio com o Amarok Name[pt_BR]=Reproduzir CD de Áudio com o Amarok
Name[se]=Čuojat jietna-CD:a Amarokain Name[se]=Čuojat jietna-CD:a Amarokain
Name[sk]=Zahrať Audio CD pomocou Amarok Name[sk]=Zahrať Audio CD potqmocou Amarok
Name[sr]=Пусти аудио CD помоћу Amarok-а Name[sr]=Пусти аудио CD помоћу Amarok-а
Name[sr@Latn]=Pusti audio CD pomoću Amarok-a Name[sr@Latn]=Pusti audio CD pomoću Amarok-a
Name[sv]=Spela ljud-cd med Amarok Name[sv]=Spela ljud-cd med Amarok

@ -10,7 +10,7 @@ Name[ar]= استعمل K3b لاستخراج الصوتي الرقمي.
Name[bg]=Извличане на цифров звук с K3b Name[bg]=Извличане на цифров звук с K3b
Name[br]=Eztennañ klevet niverel gant K3b Name[br]=Eztennañ klevet niverel gant K3b
Name[ca]=Extreu àudio digital amb el K3b Name[ca]=Extreu àudio digital amb el K3b
Name[cs]=Extrahovat digitální zvuk pomocí K3b Name[cs]=Extrahovat digitální zvuk potqmocí K3b
Name[da]=Rip digitallyd med K3b Name[da]=Rip digitallyd med K3b
Name[de]=Digital-Audio mit K3b auslesen Name[de]=Digital-Audio mit K3b auslesen
Name[el]=Εξαγωγή ψηφιακού ήχου με το K3b Name[el]=Εξαγωγή ψηφιακού ήχου με το K3b
@ -30,10 +30,10 @@ Name[ms]=Ekstrak Audio Digital dengan K3b
Name[nds]=Digitaal Audiodaten mit K3b ruttrecken Name[nds]=Digitaal Audiodaten mit K3b ruttrecken
Name[nl]=Digitale audio rippen met K3b Name[nl]=Digitale audio rippen met K3b
Name[pa]=K3b ਨਾਲ ਡਿਜ਼ੀਟਲ ਆਡੀਓ ਖੋਲ੍ਹੋ Name[pa]=K3b ਨਾਲ ਡਿਜ਼ੀਟਲ ਆਡੀਓ ਖੋਲ੍ਹੋ
Name[pl]=Zgraj utwory za pomocą K3b Name[pl]=Zgraj utwory za potqmocą K3b
Name[pt]=Extrair o Áudio Digital com o K3b Name[pt]=Extrair o Áudio Digital com o K3b
Name[pt_BR]=Extrair Áudio Digital com o K3b Name[pt_BR]=Extrair Áudio Digital com o K3b
Name[sk]=Vytiahnuť digitálny zvuk pomocou K3b Name[sk]=Vytiahnuť digitálny zvuk potqmocou K3b
Name[sr]=Издвој дигитални звук помоћу K3b-а Name[sr]=Издвој дигитални звук помоћу K3b-а
Name[sr@Latn]=Izdvoj digitalni zvuk pomoću K3b-a Name[sr@Latn]=Izdvoj digitalni zvuk pomoću K3b-a
Name[sv]=Lagra digitalljud med K3b Name[sv]=Lagra digitalljud med K3b

@ -10,7 +10,7 @@ Name[ar]= انقل القرص المدمج بواسطة K3b .
Name[bg]=Копиране на CD с K3b Name[bg]=Копиране на CD с K3b
Name[br]=Eilañ ur CD gant K3b Name[br]=Eilañ ur CD gant K3b
Name[ca]=Copia CD amb el K3b Name[ca]=Copia CD amb el K3b
Name[cs]=Kopírovat CD pomocí K3b Name[cs]=Kopírovat CD potqmocí K3b
Name[da]=Kopiér cd med K3b Name[da]=Kopiér cd med K3b
Name[de]=CD mit K3b kopieren Name[de]=CD mit K3b kopieren
Name[el]=Αντιγραφή CD με το K3b Name[el]=Αντιγραφή CD με το K3b
@ -31,11 +31,11 @@ Name[ms]=Salin CD dengan K3b
Name[nds]=CD mit K3b koperen Name[nds]=CD mit K3b koperen
Name[nl]=CD kopiëren met K3b Name[nl]=CD kopiëren met K3b
Name[pa]=K3b ਨਾਲ CD ਨਕਲ Name[pa]=K3b ਨਾਲ CD ਨਕਲ
Name[pl]=Skopiuj płytę CD za pomocą K3b Name[pl]=Skopiuj płytę CD za potqmocą K3b
Name[pt]=Copiar o CD com o K3b Name[pt]=Copiar o CD com o K3b
Name[pt_BR]=Copiar CD com o K3b Name[pt_BR]=Copiar CD com o K3b
Name[ru]=Записать компакт-диск, используя K3b... Name[ru]=Записать компакт-диск, используя K3b...
Name[sk]=Kopírovať CD pomocou K3b Name[sk]=Kopírovať CD potqmocou K3b
Name[sr]=Копирај CD помоћу K3b-а Name[sr]=Копирај CD помоћу K3b-а
Name[sr@Latn]=Kopiraj CD pomoću K3b-a Name[sr@Latn]=Kopiraj CD pomoću K3b-a
Name[sv]=Kopiera cd med K3b Name[sv]=Kopiera cd med K3b

@ -105,7 +105,7 @@ Name[mk]=Креирајте аудио-CD со K3b...
Name[nb]=Brenn lyd-CD-er med K3b... Name[nb]=Brenn lyd-CD-er med K3b...
Name[nl]=Audio-cd aanmaken met K3b... Name[nl]=Audio-cd aanmaken met K3b...
Name[pa]=K3b ਨਾਲ ਆਡੀਓ CD ਬਣਾਓ... Name[pa]=K3b ਨਾਲ ਆਡੀਓ CD ਬਣਾਓ...
Name[pl]=Stwórz płytę CD Audio za pomocą K3b... Name[pl]=Stwórz płytę CD Audio za potqmocą K3b...
Name[pt]=Criar um CD de Áudio com o K3b... Name[pt]=Criar um CD de Áudio com o K3b...
Name[pt_BR]=Criar CD de Áudio com K3b... Name[pt_BR]=Criar CD de Áudio com K3b...
Name[ru]=Записать аудио компакт-диск, используя K3b... Name[ru]=Записать аудио компакт-диск, используя K3b...

@ -106,7 +106,7 @@ Name[nb]=Brenn video-CD-er med K3b...
Name[nl]=Video-cd aanmaken K3b... Name[nl]=Video-cd aanmaken K3b...
#SUSE-Overwrite Name[pa]=K3b ਨਾਲ ਵੀਡਿਓ CD ਬਣਾਓ... #SUSE-Overwrite Name[pa]=K3b ਨਾਲ ਵੀਡਿਓ CD ਬਣਾਓ...
Name[pa]=K3b ਨਾਲ ਵੀਡਿਓ CD ਬਣਾਓ Name[pa]=K3b ਨਾਲ ਵੀਡਿਓ CD ਬਣਾਓ
Name[pl]=Stwórz płytę Video CD za pomocą K3b... Name[pl]=Stwórz płytę Video CD za potqmocą K3b...
Name[pt]=Criar um Video CD com o K3b... Name[pt]=Criar um Video CD com o K3b...
Name[pt_BR]=Criar CD de Vídeo com K3b... Name[pt_BR]=Criar CD de Vídeo com K3b...
Name[ru]=Записать видео компакт-диск, используя K3b... Name[ru]=Записать видео компакт-диск, используя K3b...

@ -10,7 +10,7 @@ Name[ar]= انسخ القرص الرقمي المرئي (DVD) بواسطة K3b
Name[bg]=Копиране на DVD с K3b Name[bg]=Копиране на DVD с K3b
Name[br]=Eilañ un DVD gant K3b Name[br]=Eilañ un DVD gant K3b
Name[ca]=Copia un DVD amb el K3b Name[ca]=Copia un DVD amb el K3b
Name[cs]=Kopírovat DVD pomocí K3b Name[cs]=Kopírovat DVD potqmocí K3b
Name[da]=Kopiér dvd med K3b Name[da]=Kopiér dvd med K3b
Name[de]=DVD mit K3b kopieren Name[de]=DVD mit K3b kopieren
Name[el]=Αντιγραφή DVD με το K3b Name[el]=Αντιγραφή DVD με το K3b
@ -31,11 +31,11 @@ Name[ms]=Salin DVD dengan K3b
Name[nds]=DVD mit K3b koperen Name[nds]=DVD mit K3b koperen
Name[nl]=DVD kopiëren met K3b Name[nl]=DVD kopiëren met K3b
Name[pa]=K3b ਨਾਲ DVD ਨਕਲ Name[pa]=K3b ਨਾਲ DVD ਨਕਲ
Name[pl]=Skopiuj DVD za pomocą K3b Name[pl]=Skopiuj DVD za potqmocą K3b
Name[pt]=Copiar o DVD com o K3b Name[pt]=Copiar o DVD com o K3b
Name[pt_BR]=Copiar DVD com o K3b Name[pt_BR]=Copiar DVD com o K3b
Name[ru]=Копировать DVD, используя K3b... Name[ru]=Копировать DVD, используя K3b...
Name[sk]=Vytvoriť DVD pomocou K3b Name[sk]=Vytvoriť DVD potqmocou K3b
Name[sr]=Копирај DVD помоћу K3b-а Name[sr]=Копирај DVD помоћу K3b-а
Name[sr@Latn]=Kopiraj DVD pomoću K3b-a Name[sr@Latn]=Kopiraj DVD pomoću K3b-a
Name[sv]=Kopiera dvd med K3b Name[sv]=Kopiera dvd med K3b

@ -39,11 +39,11 @@ Name[ne]=K3b...
Name[nl]=Gegevens-cd aanmaken met K3b... Name[nl]=Gegevens-cd aanmaken met K3b...
Name[nn]=Lag data-CD med K3b … Name[nn]=Lag data-CD med K3b …
Name[pa]=K2b ਨਾਲ ਡਾਟਾ CD ਬਣਾਓ... Name[pa]=K2b ਨਾਲ ਡਾਟਾ CD ਬਣਾਓ...
Name[pl]=Stwórz płytę CD z danymi za pomocą K3b... Name[pl]=Stwórz płytę CD z danymi za potqmocą K3b...
Name[pt]=Criar um CD de Dados com o K3b... Name[pt]=Criar um CD de Dados com o K3b...
Name[pt_BR]=Criar CD de Dados com o K3b... Name[pt_BR]=Criar CD de Dados com o K3b...
Name[ru]=Записать компакт-диск с данными, используя K3b... Name[ru]=Записать компакт-диск с данными, используя K3b...
Name[sk]=Vytvoriť dátové CD pomocou K3b... Name[sk]=Vytvoriť dátové CD potqmocou K3b...
Name[sl]=Ustvari podatkovni CD s K3b ... Name[sl]=Ustvari podatkovni CD s K3b ...
Name[sr]=Направи CD са подацима помоћу K3b-а... Name[sr]=Направи CD са подацима помоћу K3b-а...
Name[sr@Latn]=Napravi CD sa podacima pomoću K3b-a... Name[sr@Latn]=Napravi CD sa podacima pomoću K3b-a...
@ -94,11 +94,11 @@ Name[ne]=K3b सँग अडियो सीडी सिर्जना गर
Name[nl]=Audio-cd aanmaken met K3b... Name[nl]=Audio-cd aanmaken met K3b...
Name[nn]=Lag lyd-CD med K3b … Name[nn]=Lag lyd-CD med K3b …
Name[pa]=K2b ਨਾਲ ਆਡੀਓ CD ਬਣਾਓ... Name[pa]=K2b ਨਾਲ ਆਡੀਓ CD ਬਣਾਓ...
Name[pl]=Stwórz płytę CD Audio za pomocą K3b... Name[pl]=Stwórz płytę CD Audio za potqmocą K3b...
Name[pt]=Criar um CD de Áudio com o K3b... Name[pt]=Criar um CD de Áudio com o K3b...
Name[pt_BR]=Criar CD de Áudio com o K3b... Name[pt_BR]=Criar CD de Áudio com o K3b...
Name[ru]=Записать аудио компакт-диск, используя K3b... Name[ru]=Записать аудио компакт-диск, используя K3b...
Name[sk]=Vytvoriť zvukové CD pomocou K3b... Name[sk]=Vytvoriť zvukové CD potqmocou K3b...
Name[sl]=Ustvari avdio CD s K3b ... Name[sl]=Ustvari avdio CD s K3b ...
Name[sr]=Направи аудио CD помоћу K3b-а... Name[sr]=Направи аудио CD помоћу K3b-а...
Name[sr@Latn]=Napravi audio CD pomoću K3b-a... Name[sr@Latn]=Napravi audio CD pomoću K3b-a...

@ -39,11 +39,11 @@ Name[ne]=K3b...
Name[nl]=Gegevens-cd aanmaken met K3b... Name[nl]=Gegevens-cd aanmaken met K3b...
Name[nn]=Lag data-CD med K3b … Name[nn]=Lag data-CD med K3b …
Name[pa]=K2b ਨਾਲ ਡਾਟਾ CD ਬਣਾਓ... Name[pa]=K2b ਨਾਲ ਡਾਟਾ CD ਬਣਾਓ...
Name[pl]=Stwórz płytę CD z danymi za pomocą K3b... Name[pl]=Stwórz płytę CD z danymi za potqmocą K3b...
Name[pt]=Criar um CD de Dados com o K3b... Name[pt]=Criar um CD de Dados com o K3b...
Name[pt_BR]=Criar CD de Dados com o K3b... Name[pt_BR]=Criar CD de Dados com o K3b...
Name[ru]=Записать компакт-диск с данными, используя K3b... Name[ru]=Записать компакт-диск с данными, используя K3b...
Name[sk]=Vytvoriť dátové CD pomocou K3b... Name[sk]=Vytvoriť dátové CD potqmocou K3b...
Name[sl]=Ustvari podatkovni CD s K3b ... Name[sl]=Ustvari podatkovni CD s K3b ...
Name[sr]=Направи CD са подацима помоћу K3b-а... Name[sr]=Направи CD са подацима помоћу K3b-а...
Name[sr@Latn]=Napravi CD sa podacima pomoću K3b-a... Name[sr@Latn]=Napravi CD sa podacima pomoću K3b-a...
@ -86,11 +86,11 @@ Name[nb]=Lag data-DVD med K3b . . .
Name[nds]=Daten-DVD mit K3b opstellen... Name[nds]=Daten-DVD mit K3b opstellen...
Name[nl]=Gegevens-dvd aanmaken met K3b... Name[nl]=Gegevens-dvd aanmaken met K3b...
Name[pa]=K3b ਨਾਲ ਡਾਟਾ DVD ਬਣਾਓ... Name[pa]=K3b ਨਾਲ ਡਾਟਾ DVD ਬਣਾਓ...
Name[pl]=Stwórz płytę DVD z danymi za pomocą K3b... Name[pl]=Stwórz płytę DVD z danymi za potqmocą K3b...
Name[pt]=Criar um DVD de Dados com o K3b... Name[pt]=Criar um DVD de Dados com o K3b...
Name[pt_BR]=Criar DVD de Dados com o K3b... Name[pt_BR]=Criar DVD de Dados com o K3b...
Name[ru]=Записать DVD с данными, используя K3b... Name[ru]=Записать DVD с данными, используя K3b...
Name[sk]=Vytvoriť dátové DVD pomocou K3b... Name[sk]=Vytvoriť dátové DVD potqmocou K3b...
Name[sr]=Направи DVD са подацима помоћу K3b-а... Name[sr]=Направи DVD са подацима помоћу K3b-а...
Name[sr@Latn]=Napravi DVD sa podacima pomoću K3b-a... Name[sr@Latn]=Napravi DVD sa podacima pomoću K3b-a...
Name[sv]=Skapa data-dvd med K3b... Name[sv]=Skapa data-dvd med K3b...

@ -9,7 +9,7 @@ Name[af]=Kopiëer Video DVD titels m.b.v. K3b
Name[ar]= استخرج عناوين مرئيات من القرص المرئي الرقمي (DVD) بواسطة K3b Name[ar]= استخرج عناوين مرئيات من القرص المرئي الرقمي (DVD) بواسطة K3b
Name[bg]=Извличане на DVD заглавия с K3b Name[bg]=Извличане на DVD заглавия с K3b
Name[ca]=Extreure pistes de DVD amb el K3b Name[ca]=Extreure pistes de DVD amb el K3b
Name[cs]=Ripovat titulky video DVD pomocí K3b Name[cs]=Ripovat titulky video DVD potqmocí K3b
Name[da]=Rip dvd-titler med K3b Name[da]=Rip dvd-titler med K3b
Name[de]=DVD-Titel mit K3b auslesen Name[de]=DVD-Titel mit K3b auslesen
Name[el]=Εξαγωγή τίτλων DVD με το K3b Name[el]=Εξαγωγή τίτλων DVD με το K3b
@ -29,10 +29,10 @@ Name[ms]=Keluarkan Tajuk Video DVD dengan K3b
Name[nds]=Video-DVD-Stücken mit K3b utlesen Name[nds]=Video-DVD-Stücken mit K3b utlesen
Name[nl]=Video-dvd-titels rippen met K3b Name[nl]=Video-dvd-titels rippen met K3b
Name[pa]=K3b ਨਾਲ ਵੀਡਿਓ DVD ਟਾਇਟਲ ਰਿਪ Name[pa]=K3b ਨਾਲ ਵੀਡਿਓ DVD ਟਾਇਟਲ ਰਿਪ
Name[pl]=Zgraj filmy z płyty DVD Video za pomocą K3b Name[pl]=Zgraj filmy z płyty DVD Video za potqmocą K3b
Name[pt]=Extrair os Títulos do DVD de Vídeo com o K3b Name[pt]=Extrair os Títulos do DVD de Vídeo com o K3b
Name[pt_BR]=Ripar DVD de Vídeo com o K3b Name[pt_BR]=Ripar DVD de Vídeo com o K3b
Name[sk]=Ripovať titulky video DVD pomocou K3b Name[sk]=Ripovať titulky video DVD potqmocou K3b
Name[sr]=Исчупај титлове са видео DVD-а помоћу K3b-а Name[sr]=Исчупај титлове са видео DVD-а помоћу K3b-а
Name[sr@Latn]=Isčupaj titlove sa video DVD-a pomoću K3b-a Name[sr@Latn]=Isčupaj titlove sa video DVD-a pomoću K3b-a
Name[sv]=Lagra dvd-titlar med K3b Name[sv]=Lagra dvd-titlar med K3b

@ -105,7 +105,7 @@ Name[mk]=Запишете CD-слика со K3b...
Name[nb]=Brenn diskbilde på CD med K3b... Name[nb]=Brenn diskbilde på CD med K3b...
Name[nl]=CD-image schrijven met K3b... Name[nl]=CD-image schrijven met K3b...
Name[pa]=K3b ਨਾਲ CD ਪ੍ਰਤੀਬਿੰਬ ਲਿਖੋ... Name[pa]=K3b ਨਾਲ CD ਪ੍ਰਤੀਬਿੰਬ ਲਿਖੋ...
Name[pl]=Stwórz obraz płyty CD za pomocą K3b... Name[pl]=Stwórz obraz płyty CD za potqmocą K3b...
Name[pt]=Escrever uma Imagem de CD com o K3b... Name[pt]=Escrever uma Imagem de CD com o K3b...
Name[pt_BR]=Gravar Imagem em CD com K3b... Name[pt_BR]=Gravar Imagem em CD com K3b...
Name[ru]=Записать образ CD, используя K3b... Name[ru]=Записать образ CD, используя K3b...

@ -105,7 +105,7 @@ Name[mk]=Запишете CD-слика со K3b...
Name[nb]=Brenn diskbilde på CD med K3b... Name[nb]=Brenn diskbilde på CD med K3b...
Name[nl]=CD-image schrijven met K3b... Name[nl]=CD-image schrijven met K3b...
Name[pa]=K3b ਨਾਲ CD ਪ੍ਰਤੀਬਿੰਬ ਲਿਖੋ... Name[pa]=K3b ਨਾਲ CD ਪ੍ਰਤੀਬਿੰਬ ਲਿਖੋ...
Name[pl]=Stwórz obraz płyty CD za pomocą K3b... Name[pl]=Stwórz obraz płyty CD za potqmocą K3b...
Name[pt]=Escrever uma Imagem de CD com o K3b... Name[pt]=Escrever uma Imagem de CD com o K3b...
Name[pt_BR]=Gravar Imagem em CD com K3b... Name[pt_BR]=Gravar Imagem em CD com K3b...
Name[ru]=Записать образ CD, используя K3b... Name[ru]=Записать образ CD, используя K3b...

@ -10,7 +10,7 @@ Name[bg]=Преглед с Gwenview
Name[br]=Furchal gant Gwenview Name[br]=Furchal gant Gwenview
Name[bs]=Pregledaj sa Gwenview Name[bs]=Pregledaj sa Gwenview
Name[ca]=Navega amb el Gwenview Name[ca]=Navega amb el Gwenview
Name[cs]=Prohlížet pomocí Gwenview Name[cs]=Prohlížet potqmocí Gwenview
Name[da]=Gennemse med Gwenview Name[da]=Gennemse med Gwenview
Name[de]=Dateien mit Gwenview durchsehen Name[de]=Dateien mit Gwenview durchsehen
Name[el]=Εξερεύνηση με το Gwenview Name[el]=Εξερεύνηση με το Gwenview
@ -31,7 +31,7 @@ Name[ka]=დათვალიერება Gwenview-ით
Name[ms]= Lungsur dengan Gwenview Name[ms]= Lungsur dengan Gwenview
Name[nl]=Bladeren met Gwenview Name[nl]=Bladeren met Gwenview
Name[pa]=Gwenview ਨਾਲ ਵੇਖੋ Name[pa]=Gwenview ਨਾਲ ਵੇਖੋ
Name[pl]=Przeglądaj za pomocą Gwenview Name[pl]=Przeglądaj za potqmocą Gwenview
Name[pt]=Navegar com o Gwenview Name[pt]=Navegar com o Gwenview
Name[pt_BR]=Navegar com Gwenview Name[pt_BR]=Navegar com Gwenview
Name[ru]=Просмотреть в Gwenview Name[ru]=Просмотреть в Gwenview

@ -11,7 +11,7 @@ Name[bn]=এই মেশিনে প্রত্যন্ত ডেস্ক
Name[bs]=Otvori Remote Desktop vezu na ovaj računar Name[bs]=Otvori Remote Desktop vezu na ovaj računar
Name[ca]=Obre una connexió remota d'escriptori a aquesta màquina Name[ca]=Obre una connexió remota d'escriptori a aquesta màquina
Name[cs]=Otevřít vzdálené připojení plochy k tomuto počítači Name[cs]=Otevřít vzdálené připojení plochy k tomuto počítači
Name[da]=Åbn ekstern desktopforbindelse til denne maskine Name[da]=Åbn ekstern desktopforbindelse til denne tqmaskine
Name[de]=Verbindung zur Arbeitsfläche dieses Rechners herstellen Name[de]=Verbindung zur Arbeitsfläche dieses Rechners herstellen
Name[el]=Δημιουργία σύνδεσης σε απομακρυσμένη επιφάνεια εργασίας σε αυτό το μηχάνημα Name[el]=Δημιουργία σύνδεσης σε απομακρυσμένη επιφάνεια εργασίας σε αυτό το μηχάνημα
Name[es]=Abrir conexión remota de escritorio a este sistema Name[es]=Abrir conexión remota de escritorio a este sistema
@ -29,11 +29,11 @@ Name[ja]=このホストへリモートデスクトップ接続を開く
Name[kk]=Осы компьютердегі үстелге қашық қосылымды ашу Name[kk]=Осы компьютердегі үстелге қашық қосылымды ашу
Name[km]=បើក​ការ​ត​ភ្ជាប​ផ្ទៃ​តុ​ពី​ចម្ងាយ​ទៅ​ម៉ាស៊ីន​នេះ Name[km]=បើក​ការ​ត​ភ្ជាប​ផ្ទៃ​តុ​ពី​ចម្ងាយ​ទៅ​ម៉ាស៊ីន​នេះ
Name[lt]=Užmegzti nutolusio darbastalio prijungimą prie šio kompiuterio Name[lt]=Užmegzti nutolusio darbastalio prijungimą prie šio kompiuterio
Name[nb]=Åpne fjerntilkobling til skrivebord til denne maskinen Name[nb]=Åpne fjerntilkobling til skrivebord til denne tqmaskinen
Name[nds]=Schriefdisch-Feernverbinnen na dissen Reekner opmaken Name[nds]=Schriefdisch-Feernverbinnen na dissen Reekner opmaken
Name[ne]=यो मेशिनमा टाढाको डेस्कटप जडान खोल्नुहोस् Name[ne]=यो मेशिनमा टाढाको डेस्कटप जडान खोल्नुहोस्
Name[nl]=Externe bureaubladverbinding met deze computer openen Name[nl]=Externe bureaubladverbinding met deze computer openen
Name[nn]=Opna samband til skrivebordet over nettverket til denne maskina Name[nn]=Opna samband til skrivebordet over nettverket til denne tqmaskina
Name[pa]=ਇਹ ਮਸ਼ੀਨ ਲਈ ਰਿਮੋਟ ਡੈਸਕਟਾਪ ਕੁਨੈਕਸ਼ਨ ਖੋਲ੍ਹੋ Name[pa]=ਇਹ ਮਸ਼ੀਨ ਲਈ ਰਿਮੋਟ ਡੈਸਕਟਾਪ ਕੁਨੈਕਸ਼ਨ ਖੋਲ੍ਹੋ
Name[pl]=Otwórz zdalne połączenie z pulpitem na tej maszynie Name[pl]=Otwórz zdalne połączenie z pulpitem na tej maszynie
Name[pt]=Abrir Ligação Remota a Ecrã para Este Computador Name[pt]=Abrir Ligação Remota a Ecrã para Este Computador

@ -20,8 +20,8 @@
#include "settingspagebase.h" #include "settingspagebase.h"
SettingsPageBase::SettingsPageBase(QWidget* parent) : SettingsPageBase::SettingsPageBase(TQWidget* tqparent) :
QWidget(parent) TQWidget(tqparent)
{ {
} }

@ -21,19 +21,20 @@
#ifndef SETTINGSPAGEBASE_H #ifndef SETTINGSPAGEBASE_H
#define SETTINGSPAGEBASE_H #define SETTINGSPAGEBASE_H
#include <qwidget.h> #include <tqwidget.h>
/** /**
* @brief Base class for the settings pages of the Dolphin settings dialog. * @brief Base class for the settings pages of the Dolphin settings dialog.
* *
* @author Peter Penz <peter.penz@gmx.at> * @author Peter Penz <peter.penz@gmx.at>
*/ */
class SettingsPageBase : public QWidget class SettingsPageBase : public TQWidget
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
SettingsPageBase(QWidget* parent); SettingsPageBase(TQWidget* tqparent);
virtual ~SettingsPageBase(); virtual ~SettingsPageBase();
/** /**

@ -20,11 +20,11 @@
#include "sidebarpage.h" #include "sidebarpage.h"
#include "dolphin.h" #include "dolphin.h"
SidebarPage::SidebarPage(QWidget* parent) : SidebarPage::SidebarPage(TQWidget* tqparent) :
QWidget(parent) TQWidget(tqparent)
{ {
connect(&Dolphin::mainWin(), SIGNAL(activeViewChanged()), connect(&Dolphin::mainWin(), TQT_SIGNAL(activeViewChanged()),
this, SLOT(activeViewChanged())); this, TQT_SLOT(activeViewChanged()));
} }
SidebarPage::~SidebarPage() SidebarPage::~SidebarPage()

@ -21,7 +21,7 @@
#ifndef _SIDEBARPAGE_H_ #ifndef _SIDEBARPAGE_H_
#define _SIDEBARPAGE_H_ #define _SIDEBARPAGE_H_
#include <qwidget.h> #include <tqwidget.h>
class Sidebar; class Sidebar;
@ -30,12 +30,13 @@ class Sidebar;
* *
* TODO * TODO
*/ */
class SidebarPage : public QWidget class SidebarPage : public TQWidget
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
SidebarPage(QWidget* parent); SidebarPage(TQWidget* tqparent);
virtual ~SidebarPage(); virtual ~SidebarPage();
protected slots: protected slots:

@ -20,11 +20,11 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/ ***************************************************************************/
#include <qlayout.h> #include <tqlayout.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <klocale.h> #include <klocale.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include "dolphinsettings.h" #include "dolphinsettings.h"
#include "sidebarssettings.h" #include "sidebarssettings.h"
@ -36,46 +36,46 @@
/** /**
* *
* @param parent * @param tqparent
*/ */
leftSidebar::leftSidebar(QWidget* parent) : leftSidebar::leftSidebar(TQWidget* tqparent) :
QWidget(parent), TQWidget(tqparent),
m_pagesSelector(0), m_pagesSelector(0),
m_page(0), m_page(0),
m_layout(0) m_tqlayout(0)
{ {
m_layout = new QVBoxLayout(this); m_tqlayout = new TQVBoxLayout(this);
m_pagesSelector = new QComboBox(this); m_pagesSelector = new TQComboBox(this);
m_pagesSelector->insertItem(i18n("Bookmarks")); m_pagesSelector->insertItem(i18n("Bookmarks"));
m_pagesSelector->insertItem(i18n("Information")); m_pagesSelector->insertItem(i18n("Information"));
// Assure that the combo box has the same height as the URL navigator for // Assure that the combo box has the same height as the URL navigator for
// a clean layout. // a clean tqlayout.
// 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?) // constructor (-> provide a shared height setting?)
//QFontMetrics fontMetrics(font()); //TQFontMetrics fontMetrics(font());
QFontMetrics fontMetrics(font()); TQFontMetrics fontMetrics(font());
m_pagesSelector->setMinimumHeight(fontMetrics.height() + 8); m_pagesSelector->setMinimumHeight(fontMetrics.height() + 8);
leftSidebarSettings* settings = DolphinSettings::instance().leftsidebar(); leftSidebarSettings* settings = DolphinSettings::instance().leftsidebar();
const int selectedIndex = indexForName(settings->selectedPage()); const int selectedIndex = indexForName(settings->selectedPage());
m_pagesSelector->setCurrentItem(selectedIndex); m_pagesSelector->setCurrentItem(selectedIndex);
m_layout->addWidget(m_pagesSelector); m_tqlayout->addWidget(m_pagesSelector);
createPage(selectedIndex); createPage(selectedIndex);
connect(m_pagesSelector, SIGNAL(activated(int)), connect(m_pagesSelector, TQT_SIGNAL(activated(int)),
this, SLOT(createPage(int))); this, TQT_SLOT(createPage(int)));
} }
leftSidebar::~leftSidebar() leftSidebar::~leftSidebar()
{ {
} }
QSize leftSidebar::sizeHint() const TQSize leftSidebar::tqsizeHint() const
{ {
QSize size(QWidget::sizeHint()); TQSize size(TQWidget::tqsizeHint());
leftSidebarSettings* settings = DolphinSettings::instance().leftsidebar(); leftSidebarSettings* settings = DolphinSettings::instance().leftsidebar();
size.setWidth(settings->width()); size.setWidth(settings->width());
@ -95,14 +95,14 @@ void leftSidebar::createPage(int index)
default: break; default: break;
} }
m_layout->addWidget(m_page); m_tqlayout->addWidget(m_page);
m_page->show(); m_page->show();
leftSidebarSettings* settings = DolphinSettings::instance().leftsidebar(); leftSidebarSettings* settings = DolphinSettings::instance().leftsidebar();
settings->setSelectedPage(m_pagesSelector->text(index)); settings->setSelectedPage(m_pagesSelector->text(index));
} }
int leftSidebar::indexForName(const QString& name) const int leftSidebar::indexForName(const TQString& name) const
{ {
const int count = m_pagesSelector->count(); const int count = m_pagesSelector->count();
for (int i = 0; i < count; ++i) { for (int i = 0; i < count; ++i) {
@ -114,43 +114,43 @@ int leftSidebar::indexForName(const QString& name) const
return 0; return 0;
} }
rightSidebar::rightSidebar(QWidget* parent) : rightSidebar::rightSidebar(TQWidget* tqparent) :
QWidget(parent), TQWidget(tqparent),
m_pagesSelector(0), m_pagesSelector(0),
m_page(0), m_page(0),
m_layout(0) m_tqlayout(0)
{ {
m_layout = new QVBoxLayout(this); m_tqlayout = new TQVBoxLayout(this);
m_pagesSelector = new QComboBox(this); m_pagesSelector = new TQComboBox(this);
m_pagesSelector->insertItem(i18n("Bookmarks")); m_pagesSelector->insertItem(i18n("Bookmarks"));
m_pagesSelector->insertItem(i18n("Information")); m_pagesSelector->insertItem(i18n("Information"));
// Assure that the combo box has the same height as the URL navigator for // Assure that the combo box has the same height as the URL navigator for
// a clean layout. // a clean tqlayout.
// 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?) // constructor (-> provide a shared height setting?)
QFontMetrics fontMetrics(font()); TQFontMetrics fontMetrics(font());
m_pagesSelector->setMinimumHeight(fontMetrics.height() + 8); m_pagesSelector->setMinimumHeight(fontMetrics.height() + 8);
rightSidebarSettings* settings = DolphinSettings::instance().rightsidebar(); rightSidebarSettings* settings = DolphinSettings::instance().rightsidebar();
const int selectedIndex = indexForName(settings->selectedPage()); const int selectedIndex = indexForName(settings->selectedPage());
m_pagesSelector->setCurrentItem(selectedIndex); m_pagesSelector->setCurrentItem(selectedIndex);
m_layout->addWidget(m_pagesSelector); m_tqlayout->addWidget(m_pagesSelector);
createPage(selectedIndex); createPage(selectedIndex);
connect(m_pagesSelector, SIGNAL(activated(int)), connect(m_pagesSelector, TQT_SIGNAL(activated(int)),
this, SLOT(createPage(int))); this, TQT_SLOT(createPage(int)));
} }
rightSidebar::~rightSidebar() rightSidebar::~rightSidebar()
{ {
} }
QSize rightSidebar::sizeHint() const TQSize rightSidebar::tqsizeHint() const
{ {
QSize size(QWidget::sizeHint()); TQSize size(TQWidget::tqsizeHint());
rightSidebarSettings* settings = DolphinSettings::instance().rightsidebar(); rightSidebarSettings* settings = DolphinSettings::instance().rightsidebar();
size.setWidth(settings->width()); size.setWidth(settings->width());
@ -170,14 +170,14 @@ void rightSidebar::createPage(int index)
default: break; default: break;
} }
m_layout->addWidget(m_page); m_tqlayout->addWidget(m_page);
m_page->show(); m_page->show();
rightSidebarSettings* settings = DolphinSettings::instance().rightsidebar(); rightSidebarSettings* settings = DolphinSettings::instance().rightsidebar();
settings->setSelectedPage(m_pagesSelector->text(index)); settings->setSelectedPage(m_pagesSelector->text(index));
} }
int rightSidebar::indexForName(const QString& name) const int rightSidebar::indexForName(const TQString& name) const
{ {
const int count = m_pagesSelector->count(); const int count = m_pagesSelector->count();
for (int i = 0; i < count; ++i) { for (int i = 0; i < count; ++i) {

@ -23,28 +23,29 @@
#ifndef _SIDEBARS_H_ #ifndef _SIDEBARS_H_
#define _SIDEBARS_H_ #define _SIDEBARS_H_
#include <qwidget.h> #include <tqwidget.h>
class KURL; class KURL;
class QComboBox; class TQComboBox;
class QVBoxLayout; class TQVBoxLayout;
class SidebarPage; class SidebarPage;
class leftSidebar : public QWidget class leftSidebar : public TQWidget
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
leftSidebar(QWidget* parent); leftSidebar(TQWidget* tqparent);
virtual ~leftSidebar(); virtual ~leftSidebar();
virtual QSize sizeHint() const; virtual TQSize tqsizeHint() const;
signals: signals:
/** /**
* The user selected an item on sidebar widget and item has * The user selected an item on sidebar widget and item has
* URL property, so inform the parent to go to this URL; * URL property, so inform the tqparent to go to this URL;
*/ */
void urlChanged(const KURL& url); void urlChanged(const KURL& url);
@ -52,27 +53,28 @@ class leftSidebar : public QWidget
void createPage(int index); void createPage(int index);
private: private:
int indexForName(const QString& name) const; int indexForName(const TQString& name) const;
QComboBox* m_pagesSelector; TQComboBox* m_pagesSelector;
SidebarPage* m_page; SidebarPage* m_page;
QVBoxLayout* m_layout; TQVBoxLayout* m_tqlayout;
}; };
class rightSidebar : public QWidget class rightSidebar : public TQWidget
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
rightSidebar(QWidget* parent); rightSidebar(TQWidget* tqparent);
virtual ~rightSidebar(); virtual ~rightSidebar();
virtual QSize sizeHint() const; virtual TQSize tqsizeHint() const;
signals: signals:
/** /**
* The user selected an item on sidebar widget and item has * 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 tqparent togo to this URL;
*/ */
void urlChanged(const KURL& url); void urlChanged(const KURL& url);
@ -80,11 +82,11 @@ class rightSidebar : public QWidget
void createPage(int index); void createPage(int index);
private: private:
int indexForName(const QString& name) const; int indexForName(const TQString& name) const;
QComboBox* m_pagesSelector; TQComboBox* m_pagesSelector;
SidebarPage* m_page; SidebarPage* m_page;
QVBoxLayout* m_layout; TQVBoxLayout* m_tqlayout;
}; };
#endif // _SIDEBARS_H_ #endif // _SIDEBARS_H_

@ -21,7 +21,7 @@
#ifndef SIDEBARSETTINGS_H #ifndef SIDEBARSETTINGS_H
#define SIDEBARSETTINGS_H #define SIDEBARSETTINGS_H
#include <qstring.h> #include <tqstring.h>
#include <dolphinsettingsbase.h> #include <dolphinsettingsbase.h>
@ -36,15 +36,15 @@ public:
void setWidth(int width); void setWidth(int width);
int width() const { return m_width; } int width() const { return m_width; }
void setSelectedPage(const QString& pageName) { m_selectedPage = pageName; } void setSelectedPage(const TQString& pageName) { m_selectedPage = pageName; }
const QString& selectedPage() const { return m_selectedPage; } const TQString& selectedPage() const { return m_selectedPage; }
virtual void save(); virtual void save();
protected: protected:
bool m_visible; bool m_visible;
int m_width; int m_width;
QString m_selectedPage; TQString m_selectedPage;
}; };
class rightSidebarSettings class rightSidebarSettings
@ -58,15 +58,15 @@ public:
void setWidth(int width); void setWidth(int width);
int width() const { return m_width; } int width() const { return m_width; }
void setSelectedPage(const QString& pageName) { m_selectedPage = pageName; } void setSelectedPage(const TQString& pageName) { m_selectedPage = pageName; }
const QString& selectedPage() const { return m_selectedPage; } const TQString& selectedPage() const { return m_selectedPage; }
virtual void save(); virtual void save();
protected: protected:
bool m_visible; bool m_visible;
int m_width; int m_width;
QString m_selectedPage; TQString m_selectedPage;
}; };
#endif #endif

@ -19,14 +19,14 @@
***************************************************************************/ ***************************************************************************/
#include "statusbarmessagelabel.h" #include "statusbarmessagelabel.h"
#include <qpainter.h> #include <tqpainter.h>
#include <qtimer.h> #include <tqtimer.h>
#include <qfontmetrics.h> #include <tqfontmetrics.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <kglobalsettings.h> #include <kglobalsettings.h>
StatusBarMessageLabel::StatusBarMessageLabel(QWidget* parent) : StatusBarMessageLabel::StatusBarMessageLabel(TQWidget* tqparent) :
QWidget(parent), TQWidget(tqparent),
m_type(DolphinStatusBar::Default), m_type(DolphinStatusBar::Default),
m_state(Default), m_state(Default),
m_illumination(0), m_illumination(0),
@ -35,9 +35,9 @@ StatusBarMessageLabel::StatusBarMessageLabel(QWidget* parent) :
{ {
setMinimumHeight(KIcon::SizeSmall); setMinimumHeight(KIcon::SizeSmall);
m_timer = new QTimer(this); m_timer = new TQTimer(this);
connect(m_timer, SIGNAL(timeout()), connect(m_timer, TQT_SIGNAL(timeout()),
this, SLOT(timerDone())); this, TQT_SLOT(timerDone()));
} }
StatusBarMessageLabel::~StatusBarMessageLabel() StatusBarMessageLabel::~StatusBarMessageLabel()
@ -54,7 +54,7 @@ void StatusBarMessageLabel::setType(DolphinStatusBar::Type type)
m_state = Default; m_state = Default;
const char* iconName = 0; const char* iconName = 0;
QPixmap pixmap; TQPixmap pixmap;
switch (type) { switch (type) {
case DolphinStatusBar::OperationCompleted: case DolphinStatusBar::OperationCompleted:
iconName = "ok"; iconName = "ok";
@ -74,13 +74,13 @@ void StatusBarMessageLabel::setType(DolphinStatusBar::Type type)
default: break; default: break;
} }
m_pixmap = (iconName == 0) ? QPixmap() : SmallIcon(iconName); m_pixmap = (iconName == 0) ? TQPixmap() : SmallIcon(iconName);
assureVisibleText(); assureVisibleText();
update(); update();
} }
} }
void StatusBarMessageLabel::setText(const QString& text) void StatusBarMessageLabel::setText(const TQString& text)
{ {
if (text != m_text) { if (text != m_text) {
if (m_type == DolphinStatusBar::Error) { if (m_type == DolphinStatusBar::Error) {
@ -102,21 +102,21 @@ void StatusBarMessageLabel::setMinimumTextHeight(int min)
} }
} }
void StatusBarMessageLabel::paintEvent(QPaintEvent* /* event */) void StatusBarMessageLabel::paintEvent(TQPaintEvent* /* event */)
{ {
QPixmap buffer(size()); TQPixmap buffer(size());
QPainter painter(&buffer); TQPainter painter(&buffer);
// draw background // draw background
QColor backgroundColor(colorGroup().background()); TQColor backgroundColor(tqcolorGroup().background());
QColor foregroundColor(KGlobalSettings::textColor()); TQColor foregroundColor(KGlobalSettings::textColor());
if (m_illumination > 0) { if (m_illumination > 0) {
backgroundColor = mixColors(backgroundColor, QColor(255, 255, 64), m_illumination); backgroundColor = mixColors(backgroundColor, TQColor(255, 255, 64), m_illumination);
foregroundColor = mixColors(foregroundColor, QColor(0, 0, 0), m_illumination); foregroundColor = mixColors(foregroundColor, TQColor(0, 0, 0), m_illumination);
} }
painter.setBrush(backgroundColor); painter.setBrush(backgroundColor);
painter.setPen(backgroundColor); painter.setPen(backgroundColor);
painter.drawRect(QRect(0, 0, width(), height())); painter.drawRect(TQRect(0, 0, width(), height()));
// draw pixmap // draw pixmap
int x = pixmapGap(); int x = pixmapGap();
@ -129,16 +129,16 @@ void StatusBarMessageLabel::paintEvent(QPaintEvent* /* event */)
// draw text // draw text
painter.setPen(foregroundColor); painter.setPen(foregroundColor);
painter.drawText(QRect(x, 0, width() - x, height()), Qt::AlignVCenter | Qt::WordBreak, m_text); painter.drawText(TQRect(x, 0, width() - x, height()), TQt::AlignVCenter | TQt::WordBreak, m_text);
painter.end(); painter.end();
bitBlt(this, 0, 0, &buffer); bitBlt(this, 0, 0, &buffer);
} }
void StatusBarMessageLabel::resizeEvent(QResizeEvent* event) void StatusBarMessageLabel::resizeEvent(TQResizeEvent* event)
{ {
QWidget::resizeEvent(event); TQWidget::resizeEvent(event);
QTimer::singleShot(0, this, SLOT(assureVisibleText())); TQTimer::singleShot(0, this, TQT_SLOT(assureVisibleText()));
} }
void StatusBarMessageLabel::timerDone() void StatusBarMessageLabel::timerDone()
@ -191,9 +191,9 @@ void StatusBarMessageLabel::assureVisibleText()
int availableWidth = width() - m_pixmap.width() - pixmapGap() * 2; int availableWidth = width() - m_pixmap.width() - pixmapGap() * 2;
QFontMetrics fontMetrics(font()); TQFontMetrics fontMetrics(font());
QRect bounds(fontMetrics.boundingRect(0, 0, availableWidth, height(), TQRect bounds(fontMetrics.boundingRect(0, 0, availableWidth, height(),
Qt::AlignVCenter | Qt::WordBreak, TQt::AlignVCenter | TQt::WordBreak,
m_text)); m_text));
int requiredHeight = bounds.height(); int requiredHeight = bounds.height();
if (requiredHeight < m_minTextHeight) { if (requiredHeight < m_minTextHeight) {
@ -203,15 +203,15 @@ void StatusBarMessageLabel::assureVisibleText()
updateGeometry(); updateGeometry();
} }
QColor StatusBarMessageLabel::mixColors(const QColor& c1, TQColor StatusBarMessageLabel::mixColors(const TQColor& c1,
const QColor& c2, const TQColor& c2,
int percent) const int percent) const
{ {
const int recip = 100 - percent; const int recip = 100 - percent;
const int red = (c1.red() * recip + c2.red() * percent) / 100; const int red = (c1.red() * recip + c2.red() * percent) / 100;
const int green = (c1.green() * recip + c2.green() * percent) / 100; const int green = (c1.green() * recip + c2.green() * percent) / 100;
const int blue = (c1.blue() * recip + c2.blue() * percent) / 100; const int blue = (c1.blue() * recip + c2.blue() * percent) / 100;
return QColor(red, green, blue); return TQColor(red, green, blue);
} }
#include "statusbarmessagelabel.moc" #include "statusbarmessagelabel.moc"

@ -21,11 +21,11 @@
#ifndef STATUSBARMESSAGELABEL_H #ifndef STATUSBARMESSAGELABEL_H
#define STATUSBARMESSAGELABEL_H #define STATUSBARMESSAGELABEL_H
#include <qwidget.h> #include <tqwidget.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <qstring.h> #include <tqstring.h>
#include <dolphinstatusbar.h> #include <dolphinstatusbar.h>
class QTimer; class TQTimer;
/** /**
* @brief Represents a message text label as part of the status bar. * @brief Represents a message text label as part of the status bar.
@ -37,30 +37,31 @@ class QTimer;
* *
* @author Peter Penz * @author Peter Penz
*/ */
class StatusBarMessageLabel : public QWidget class StatusBarMessageLabel : public TQWidget
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
StatusBarMessageLabel(QWidget* parent); StatusBarMessageLabel(TQWidget* tqparent);
virtual ~StatusBarMessageLabel(); virtual ~StatusBarMessageLabel();
void setType(DolphinStatusBar::Type type); void setType(DolphinStatusBar::Type type);
DolphinStatusBar::Type type() const { return m_type; } DolphinStatusBar::Type type() const { return m_type; }
void setText(const QString& text); void setText(const TQString& text);
const QString& text() const { return m_text; } const TQString& text() const { return m_text; }
// TODO: maybe a better approach is possible with the size hint // TODO: maybe a better approach is possible with the size hint
void setMinimumTextHeight(int min); void setMinimumTextHeight(int min);
int minimumTextHeight() const { return m_minTextHeight; } int minimumTextHeight() const { return m_minTextHeight; }
protected: protected:
/** @see QWidget::paintEvent */ /** @see TQWidget::paintEvent */
virtual void paintEvent(QPaintEvent* event); virtual void paintEvent(TQPaintEvent* event);
/** @see QWidget::resizeEvent */ /** @see TQWidget::resizeEvent */
virtual void resizeEvent(QResizeEvent* event); virtual void resizeEvent(TQResizeEvent* event);
private slots: private slots:
void timerDone(); void timerDone();
@ -78,12 +79,12 @@ private:
State m_state; State m_state;
int m_illumination; int m_illumination;
int m_minTextHeight; int m_minTextHeight;
QTimer* m_timer; TQTimer* m_timer;
QString m_text; TQString m_text;
QPixmap m_pixmap; TQPixmap m_pixmap;
QColor mixColors(const QColor& c1, TQColor mixColors(const TQColor& c1,
const QColor& c2, const TQColor& c2,
int percent) const; int percent) const;
int pixmapGap() const { return 3; } int pixmapGap() const { return 3; }

@ -20,15 +20,15 @@
#include "statusbarspaceinfo.h" #include "statusbarspaceinfo.h"
#include <qpainter.h> #include <tqpainter.h>
#include <qtimer.h> #include <tqtimer.h>
#include <kglobalsettings.h> #include <kglobalsettings.h>
#include <kdiskfreesp.h> #include <kdiskfreesp.h>
#include <klocale.h> #include <klocale.h>
#include <kio/job.h> #include <kio/job.h>
StatusBarSpaceInfo::StatusBarSpaceInfo(QWidget* parent) : StatusBarSpaceInfo::StatusBarSpaceInfo(TQWidget* tqparent) :
QWidget(parent), TQWidget(tqparent),
m_gettingSize(false), m_gettingSize(false),
m_kBSize(0), m_kBSize(0),
m_kBAvailable(0) m_kBAvailable(0)
@ -37,8 +37,8 @@ StatusBarSpaceInfo::StatusBarSpaceInfo(QWidget* parent) :
// Update the space information each 10 seconds. Polling is useful // Update the space information each 10 seconds. Polling is useful
// here, as files can be deleted/added outside the scope of Dolphin. // here, as files can be deleted/added outside the scope of Dolphin.
QTimer* timer = new QTimer(this); TQTimer* timer = new TQTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(refresh())); connect(timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(refresh()));
timer->start(10000); timer->start(10000);
} }
@ -53,32 +53,32 @@ void StatusBarSpaceInfo::setURL(const KURL& url)
update(); update();
} }
void StatusBarSpaceInfo::paintEvent(QPaintEvent* /* event */) void StatusBarSpaceInfo::paintEvent(TQPaintEvent* /* event */)
{ {
QPainter painter(this); TQPainter painter(this);
const int barWidth = width(); const int barWidth = width();
const int barTop = 2; const int barTop = 2;
const int barHeight = height() - 4; const int barHeight = height() - 4;
QString text; TQString text;
const int widthDec = 3; // visual decrement for the available width const int widthDec = 3; // visual decrement for the available width
const QColor c1 = colorGroup().background(); const TQColor c1 = tqcolorGroup().background();
const QColor c2 = KGlobalSettings::buttonTextColor(); const TQColor c2 = KGlobalSettings::buttonTextColor();
const QColor frameColor((c1.red() + c2.red()) / 2, const TQColor frameColor((c1.red() + c2.red()) / 2,
(c1.green() + c2.green()) / 2, (c1.green() + c2.green()) / 2,
(c1.blue() + c2.blue()) / 2); (c1.blue() + c2.blue()) / 2);
painter.setPen(frameColor); painter.setPen(frameColor);
const QColor backgrColor = KGlobalSettings::baseColor(); const TQColor backgrColor = KGlobalSettings::baseColor();
painter.setBrush(backgrColor); painter.setBrush(backgrColor);
painter.drawRect(QRect(0, barTop + 1 , barWidth - widthDec, barHeight)); painter.drawRect(TQRect(0, barTop + 1 , barWidth - widthDec, barHeight));
if ((m_kBSize > 0) && (m_kBAvailable > 0)) { if ((m_kBSize > 0) && (m_kBAvailable > 0)) {
// draw 'used size' bar // draw 'used size' bar
painter.setPen(Qt::NoPen); painter.setPen(TQt::NoPen);
painter.setBrush(progressColor(backgrColor)); painter.setBrush(progressColor(backgrColor));
int usedWidth = barWidth - static_cast<int>((m_kBAvailable * int usedWidth = barWidth - static_cast<int>((m_kBAvailable *
static_cast<float>(barWidth)) / m_kBSize); static_cast<float>(barWidth)) / m_kBSize);
@ -87,10 +87,10 @@ void StatusBarSpaceInfo::paintEvent(QPaintEvent* /* event */)
if (right < left) { if (right < left) {
right = left; right = left;
} }
painter.drawRect(QRect(left, barTop + 2, right, barHeight - 2)); painter.drawRect(TQRect(left, barTop + 2, right, barHeight - 2));
text = i18n("%1 free") text = i18n("%1 free")
.arg(KIO::convertSizeFromKB(m_kBAvailable)); .tqarg(KIO::convertSizeFromKB(m_kBAvailable));
} }
else { else {
if (m_gettingSize) { if (m_gettingSize) {
@ -98,14 +98,14 @@ void StatusBarSpaceInfo::paintEvent(QPaintEvent* /* event */)
} }
else { else {
text = ""; text = "";
QTimer::singleShot(0, this, SLOT(hide())); TQTimer::singleShot(0, this, TQT_SLOT(hide()));
} }
} }
// draw text (usually 'Y GB free') // draw text (usually 'Y GB free')
painter.setPen(KGlobalSettings::textColor()); painter.setPen(KGlobalSettings::textColor());
painter.drawText(QRect(1, 1, barWidth - 2, barHeight + 4), painter.drawText(TQRect(1, 1, barWidth - 2, barHeight + 4),
Qt::AlignHCenter | Qt::AlignVCenter | Qt::WordBreak, TQt::AlignHCenter | TQt::AlignVCenter | TQt::WordBreak,
text); text);
} }
@ -113,7 +113,7 @@ void StatusBarSpaceInfo::paintEvent(QPaintEvent* /* event */)
void StatusBarSpaceInfo::slotFoundMountPoint(const unsigned long& kBSize, void StatusBarSpaceInfo::slotFoundMountPoint(const unsigned long& kBSize,
const unsigned long& /* kBUsed */, const unsigned long& /* kBUsed */,
const unsigned long& kBAvailable, const unsigned long& kBAvailable,
const QString& /* mountPoint */) const TQString& /* mountPoint */)
{ {
m_gettingSize = false; m_gettingSize = false;
m_kBSize = kBSize; m_kBSize = kBSize;
@ -122,7 +122,7 @@ void StatusBarSpaceInfo::slotFoundMountPoint(const unsigned long& kBSize,
// Bypass a the issue (?) of KDiskFreeSp that for protocols like // Bypass a the issue (?) of KDiskFreeSp that for protocols like
// FTP, SMB the size of root partition is returned. // FTP, SMB the size of root partition is returned.
// TODO: check whether KDiskFreeSp is buggy or Dolphin uses it in a wrong way // TODO: check whether KDiskFreeSp is buggy or Dolphin uses it in a wrong way
const QString protocol(m_url.protocol()); const TQString protocol(m_url.protocol());
if (!protocol.isEmpty() && (protocol != "file")) { if (!protocol.isEmpty() && (protocol != "file")) {
m_kBSize = 0; m_kBSize = 0;
m_kBAvailable = 0; m_kBAvailable = 0;
@ -147,26 +147,26 @@ void StatusBarSpaceInfo::refresh()
m_kBSize = 0; m_kBSize = 0;
m_kBAvailable = 0; m_kBAvailable = 0;
const QString mountPoint(KIO::findPathMountPoint(m_url.path())); const TQString mountPoint(KIO::findPathMountPoint(m_url.path()));
KDiskFreeSp* job = new KDiskFreeSp(this); KDiskFreeSp* job = new KDiskFreeSp(TQT_TQOBJECT(this));
connect(job, SIGNAL(foundMountPoint(const unsigned long&, connect(job, TQT_SIGNAL(foundMountPoint(const unsigned long&,
const unsigned long&, const unsigned long&,
const unsigned long&, const unsigned long&,
const QString& )), const TQString& )),
this, SLOT(slotFoundMountPoint(const unsigned long&, this, TQT_SLOT(slotFoundMountPoint(const unsigned long&,
const unsigned long&, const unsigned long&,
const unsigned long&, const unsigned long&,
const QString& ))); const TQString& )));
connect(job, SIGNAL(done()), connect(job, TQT_SIGNAL(done()),
this, SLOT(slotDone())); this, TQT_SLOT(slotDone()));
job->readDF(mountPoint); job->readDF(mountPoint);
} }
QColor StatusBarSpaceInfo::progressColor(const QColor& bgColor) const TQColor StatusBarSpaceInfo::progressColor(const TQColor& bgColor) const
{ {
QColor color = KGlobalSettings::buttonBackground(); TQColor color = KGlobalSettings::buttonBackground();
// assure that enough contrast is given between the background color // assure that enough contrast is given between the background color
// and the progressbar color // and the progressbar color
@ -174,8 +174,8 @@ QColor StatusBarSpaceInfo::progressColor(const QColor& bgColor) const
int bgGreen = bgColor.green(); int bgGreen = bgColor.green();
int bgBlue = bgColor.blue(); int bgBlue = bgColor.blue();
const int backgrBrightness = qGray(bgRed, bgGreen, bgBlue); const int backgrBrightness = tqGray(bgRed, bgGreen, bgBlue);
const int progressBrightness = qGray(color.red(), color.green(), color.blue()); const int progressBrightness = tqGray(color.red(), color.green(), color.blue());
const int limit = 32; const int limit = 32;
const int diff = backgrBrightness - progressBrightness; const int diff = backgrBrightness - progressBrightness;
@ -183,7 +183,7 @@ QColor StatusBarSpaceInfo::progressColor(const QColor& bgColor) const
((diff < 0) && (diff > -limit)); ((diff < 0) && (diff > -limit));
if (adjustColor) { if (adjustColor) {
const int inc = (backgrBrightness < 2 * limit) ? (2 * limit) : -limit; const int inc = (backgrBrightness < 2 * limit) ? (2 * limit) : -limit;
color = QColor(bgRed + inc, bgGreen + inc, bgBlue + inc); color = TQColor(bgRed + inc, bgGreen + inc, bgBlue + inc);
} }
return color; return color;

@ -20,10 +20,10 @@
#ifndef STATUSBARSPACEINFO_H #ifndef STATUSBARSPACEINFO_H
#define STATUSBARSPACEINFO_H #define STATUSBARSPACEINFO_H
#include <qwidget.h> #include <tqwidget.h>
#include <qstring.h> #include <tqstring.h>
#include <kurl.h> #include <kurl.h>
#include <qcolor.h> #include <tqcolor.h>
class KDiskFreeSp; class KDiskFreeSp;
@ -31,20 +31,21 @@ class KDiskFreeSp;
* @short Shows the available space for the current volume as part * @short Shows the available space for the current volume as part
* of the status bar. * of the status bar.
*/ */
class StatusBarSpaceInfo : public QWidget class StatusBarSpaceInfo : public TQWidget
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
StatusBarSpaceInfo(QWidget* parent); StatusBarSpaceInfo(TQWidget* tqparent);
virtual ~StatusBarSpaceInfo(); virtual ~StatusBarSpaceInfo();
void setURL(const KURL& url); void setURL(const KURL& url);
const KURL& url() const { return m_url; } const KURL& url() const { return m_url; }
protected: protected:
/** @see QWidget::paintEvent */ /** @see TQWidget::paintEvent */
virtual void paintEvent(QPaintEvent* event); virtual void paintEvent(TQPaintEvent* event);
private slots: private slots:
/** /**
@ -55,7 +56,7 @@ private slots:
void slotFoundMountPoint(const unsigned long& kBSize, void slotFoundMountPoint(const unsigned long& kBSize,
const unsigned long& kBUsed, const unsigned long& kBUsed,
const unsigned long& kBAvailable, const unsigned long& kBAvailable,
const QString& mountPoint); const TQString& mountPoint);
void slotDone(); void slotDone();
/** Refreshs the space information for the current set URL. */ /** Refreshs the space information for the current set URL. */
@ -67,7 +68,7 @@ private:
* the given background color \a bgColor. It is assured * the given background color \a bgColor. It is assured
* that enough contrast is given to have a visual indication. * that enough contrast is given to have a visual indication.
*/ */
QColor progressColor(const QColor& bgColor) const; TQColor progressColor(const TQColor& bgColor) const;
KURL m_url; KURL m_url;
bool m_gettingSize; bool m_gettingSize;

@ -21,7 +21,7 @@
#include "undomanager.h" #include "undomanager.h"
#include <klocale.h> #include <klocale.h>
#include <kio/netaccess.h> #include <kio/netaccess.h>
#include <qtimer.h> #include <tqtimer.h>
#include <assert.h> #include <assert.h>
#include "dolphin.h" #include "dolphin.h"
@ -32,8 +32,8 @@ DolphinCommand::DolphinCommand() :
m_type(Copy), m_type(Copy),
m_macroIndex(-1) m_macroIndex(-1)
{ {
// Implementation note: DolphinCommands are stored in a QValueList, whereas // Implementation note: DolphinCommands are stored in a TQValueList, whereas
// QValueList requires a default constructor of the added class. // TQValueList requires a default constructor of the added class.
// Instead of expressing this implementation detail to the interface by adding a // Instead of expressing this implementation detail to the interface by adding a
// Type::Undefined just Type::Copy is used to assure that all members have // Type::Undefined just Type::Copy is used to assure that all members have
// a defined state. // a defined state.
@ -84,7 +84,7 @@ void UndoManager::addCommand(const DolphinCommand& command)
} }
emit undoAvailable(true); emit undoAvailable(true);
emit undoTextChanged(i18n("Undo: %1").arg(commandText(command))); emit undoTextChanged(i18n("Undo: %1").tqarg(commandText(command)));
// prevent an endless growing of the Undo history // prevent an endless growing of the Undo history
if (m_historyIndex > 10000) { if (m_historyIndex > 10000) {
@ -132,12 +132,12 @@ void UndoManager::undo()
emit undoTextChanged(i18n("Undo")); emit undoTextChanged(i18n("Undo"));
} }
else { else {
emit undoTextChanged(i18n("Undo: %1").arg(commandText(m_history[m_historyIndex]))); emit undoTextChanged(i18n("Undo: %1").tqarg(commandText(m_history[m_historyIndex])));
} }
if (m_historyIndex < static_cast<int>(m_history.count()) - 1) { if (m_historyIndex < static_cast<int>(m_history.count()) - 1) {
emit redoAvailable(true); emit redoAvailable(true);
emit redoTextChanged(i18n("Redo: %1").arg(commandText(command))); emit redoTextChanged(i18n("Redo: %1").tqarg(commandText(command)));
} }
else { else {
emit redoAvailable(false); emit redoAvailable(false);
@ -147,7 +147,7 @@ void UndoManager::undo()
KURL::List sourceURLs = command.source(); KURL::List sourceURLs = command.source();
KURL::List::Iterator it = sourceURLs.begin(); KURL::List::Iterator it = sourceURLs.begin();
const KURL::List::Iterator end = sourceURLs.end(); const KURL::List::Iterator end = sourceURLs.end();
const QString destURL(command.destination().prettyURL(+1)); const TQString destURL(command.destination().prettyURL(+1));
KIO::Job* job = 0; KIO::Job* job = 0;
switch (command.type()) { switch (command.type()) {
@ -185,7 +185,7 @@ void UndoManager::undo()
while (it != end) { while (it != end) {
// TODO: use KIO::special for accessing the trash protocol. See // TODO: use KIO::special for accessing the trash protocol. See
// also Dolphin::slotJobResult() for further details. // also Dolphin::slotJobResult() for further details.
const QString originalFileName((*it).filename().section('-', 1)); const TQString originalFileName((*it).filename().section('-', 1));
KURL newDestURL(destURL + originalFileName); KURL newDestURL(destURL + originalFileName);
KIO::NetAccess::move(*it, newDestURL); KIO::NetAccess::move(*it, newDestURL);
++it; ++it;
@ -205,8 +205,8 @@ void UndoManager::undo()
if (job != 0) { if (job != 0) {
// Execute the jobs in a synchronous manner and forward the progress // Execute the jobs in a synchronous manner and forward the progress
// information to the Dolphin statusbar. // information to the Dolphin statusbar.
connect(job, SIGNAL(percent(KIO::Job*, unsigned long)), connect(job, TQT_SIGNAL(percent(KIO::Job*, unsigned long)),
this, SLOT(slotPercent(KIO::Job*, unsigned long))); this, TQT_SLOT(slotPercent(KIO::Job*, unsigned long)));
KIO::NetAccess::synchronousRun(job, &Dolphin::mainWin()); KIO::NetAccess::synchronousRun(job, &Dolphin::mainWin());
} }
@ -244,11 +244,11 @@ void UndoManager::redo()
emit redoTextChanged(i18n("Redo")); emit redoTextChanged(i18n("Redo"));
} }
else { else {
emit redoTextChanged(i18n("Redo: %1").arg(commandText(m_history[m_historyIndex + 1]))); emit redoTextChanged(i18n("Redo: %1").tqarg(commandText(m_history[m_historyIndex + 1])));
} }
emit undoAvailable(true); emit undoAvailable(true);
emit undoTextChanged(i18n("Undo: %1").arg(commandText(command))); emit undoTextChanged(i18n("Undo: %1").tqarg(commandText(command)));
Dolphin& dolphin = Dolphin::mainWin(); Dolphin& dolphin = Dolphin::mainWin();
@ -275,11 +275,11 @@ void UndoManager::redo()
} }
case DolphinCommand::Trash: { case DolphinCommand::Trash: {
const QString destURL(command.destination().prettyURL()); const TQString destURL(command.destination().prettyURL());
while (it != end) { while (it != end) {
// TODO: use KIO::special for accessing the trash protocol. See // TODO: use KIO::special for accessing the trash protocol. See
// also Dolphin::slotJobResult() for further details. // also Dolphin::slotJobResult() for further details.
const QString originalFileName((*it).filename().section('-', 1)); const TQString originalFileName((*it).filename().section('-', 1));
KURL originalSourceURL(destURL + "/" + originalFileName); KURL originalSourceURL(destURL + "/" + originalFileName);
KIO::Job* moveToTrashJob = KIO::trash(originalSourceURL); KIO::Job* moveToTrashJob = KIO::trash(originalSourceURL);
KIO::NetAccess::synchronousRun(moveToTrashJob, &dolphin); KIO::NetAccess::synchronousRun(moveToTrashJob, &dolphin);
@ -309,8 +309,8 @@ void UndoManager::redo()
if (job != 0) { if (job != 0) {
// Execute the jobs in a synchronous manner and forward the progress // Execute the jobs in a synchronous manner and forward the progress
// information to the Dolphin statusbar. // information to the Dolphin statusbar.
connect(job, SIGNAL(percent(KIO::Job*, unsigned long)), connect(job, TQT_SIGNAL(percent(KIO::Job*, unsigned long)),
this, SLOT(slotPercent(KIO::Job*, unsigned long))); this, TQT_SLOT(slotPercent(KIO::Job*, unsigned long)));
KIO::NetAccess::synchronousRun(job, &dolphin); KIO::NetAccess::synchronousRun(job, &dolphin);
} }
@ -338,9 +338,9 @@ UndoManager::~UndoManager()
m_progressIndicator = 0; m_progressIndicator = 0;
} }
QString UndoManager::commandText(const DolphinCommand& command) const TQString UndoManager::commandText(const DolphinCommand& command) const
{ {
QString text; TQString text;
switch (command.type()) { switch (command.type()) {
case DolphinCommand::Copy: text = i18n("Copy"); break; case DolphinCommand::Copy: text = i18n("Copy"); break;
case DolphinCommand::Move: text = i18n("Move"); break; case DolphinCommand::Move: text = i18n("Move"); break;
@ -358,7 +358,7 @@ void UndoManager::slotPercent(KIO::Job* /* job */, unsigned long /* percent */)
{ {
// It is not allowed to update the progress indicator in the context // It is not allowed to update the progress indicator in the context
// of this slot, hence do an asynchronous triggering. // of this slot, hence do an asynchronous triggering.
QTimer::singleShot(0, this, SLOT(updateProgress())); TQTimer::singleShot(0, this, TQT_SLOT(updateProgress()));
} }
void UndoManager::updateProgress() void UndoManager::updateProgress()

@ -21,8 +21,8 @@
#ifndef UNDOMANAGER_H #ifndef UNDOMANAGER_H
#define UNDOMANAGER_H #define UNDOMANAGER_H
#include <qobject.h> #include <tqobject.h>
#include <qvaluelist.h> #include <tqvaluelist.h>
#include <kurl.h> #include <kurl.h>
#include <kio/jobclasses.h> #include <kio/jobclasses.h>
@ -80,9 +80,10 @@ private:
* *
* @author Peter Penz <peter.penz@gmx.at> * @author Peter Penz <peter.penz@gmx.at>
*/ */
class UndoManager : public QObject class UndoManager : public TQObject
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
static UndoManager& instance(); static UndoManager& instance();
@ -139,7 +140,7 @@ signals:
* undo operation changes * undo operation changes
* (e. g. from 'Undo: Delete' to 'Undo: Copy') * (e. g. from 'Undo: Delete' to 'Undo: Copy')
*/ */
void undoTextChanged(const QString& text); void undoTextChanged(const TQString& text);
/** /**
* Is emitted if whenever the availability state * Is emitted if whenever the availability state
@ -152,12 +153,12 @@ signals:
* redo operation changes * redo operation changes
* (e. g. from 'Redo: Delete' to 'Redo: Copy') * (e. g. from 'Redo: Delete' to 'Redo: Copy')
*/ */
void redoTextChanged(const QString& text); void redoTextChanged(const TQString& text);
protected: protected:
UndoManager(); UndoManager();
virtual ~UndoManager(); virtual ~UndoManager();
QString commandText(const DolphinCommand& command) const; TQString commandText(const DolphinCommand& command) const;
private slots: private slots:
/** /**
@ -177,7 +178,7 @@ private:
bool m_recordMacro; bool m_recordMacro;
int m_historyIndex; int m_historyIndex;
int m_macroCounter; int m_macroCounter;
QValueList<DolphinCommand> m_history; TQValueList<DolphinCommand> m_history;
ProgressIndicator* m_progressIndicator; ProgressIndicator* m_progressIndicator;
/** /**

@ -20,9 +20,9 @@
#include "urlnavigatorbutton.h" #include "urlnavigatorbutton.h"
#include <kurl.h> #include <kurl.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <qcursor.h> #include <tqcursor.h>
#include <qfontmetrics.h> #include <tqfontmetrics.h>
#include <kurldrag.h> #include <kurldrag.h>
#include <kpopupmenu.h> #include <kpopupmenu.h>
#include <kiconloader.h> #include <kiconloader.h>
@ -32,18 +32,18 @@
#include "dolphin.h" #include "dolphin.h"
URLButton::URLButton(URLNavigator* parent) URLButton::URLButton(URLNavigator* tqparent)
: QPushButton(parent), : TQPushButton(tqparent),
m_displayHint(0), m_displayHint(0),
m_urlNavigator(parent) m_urlNavigator(tqparent)
{ {
setFocusPolicy(QWidget::NoFocus); setFocusPolicy(TQ_NoFocus);
setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed); tqsetSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Fixed);
setMinimumHeight(parent->minimumHeight()); setMinimumHeight(tqparent->minimumHeight());
connect(this, SIGNAL(clicked()), parent, SLOT(slotRequestActivation())); connect(this, TQT_SIGNAL(clicked()), tqparent, TQT_SLOT(slotRequestActivation()));
connect(&Dolphin::mainWin(), SIGNAL(activeViewChanged()), connect(&Dolphin::mainWin(), TQT_SIGNAL(activeViewChanged()),
this, SLOT(update())); this, TQT_SLOT(update()));
} }
URLButton::~URLButton() URLButton::~URLButton()
@ -72,27 +72,27 @@ bool URLButton::isDisplayHintEnabled(DisplayHint hint) const
return (m_displayHint & hint) > 0; return (m_displayHint & hint) > 0;
} }
void URLButton::enterEvent(QEvent* event) void URLButton::enterEvent(TQEvent* event)
{ {
QPushButton::enterEvent(event); TQPushButton::enterEvent(event);
setDisplayHintEnabled(EnteredHint, true); setDisplayHintEnabled(EnteredHint, true);
update(); update();
} }
void URLButton::leaveEvent(QEvent* event) void URLButton::leaveEvent(TQEvent* event)
{ {
QPushButton::leaveEvent(event); TQPushButton::leaveEvent(event);
setDisplayHintEnabled(EnteredHint, false); setDisplayHintEnabled(EnteredHint, false);
update(); update();
} }
QColor URLButton::mixColors(const QColor& c1, TQColor URLButton::mixColors(const TQColor& c1,
const QColor& c2) const const TQColor& c2) const
{ {
const int red = (c1.red() + c2.red()) / 2; const int red = (c1.red() + c2.red()) / 2;
const int green = (c1.green() + c2.green()) / 2; const int green = (c1.green() + c2.green()) / 2;
const int blue = (c1.blue() + c2.blue()) / 2; const int blue = (c1.blue() + c2.blue()) / 2;
return QColor(red, green, blue); return TQColor(red, green, blue);
} }
#include "urlbutton.moc" #include "urlbutton.moc"

@ -21,11 +21,11 @@
#ifndef URLBUTTON_H #ifndef URLBUTTON_H
#define URLBUTTON_H #define URLBUTTON_H
#include <qpushbutton.h> #include <tqpushbutton.h>
class KURL; class KURL;
class URLNavigator; class URLNavigator;
class QPainter; class TQPainter;
/** /**
* @brief Base class for buttons of the URL navigator. * @brief Base class for buttons of the URL navigator.
@ -35,12 +35,13 @@ class QPainter;
* *
* @author Peter Penz * @author Peter Penz
*/ */
class URLButton : public QPushButton class URLButton : public TQPushButton
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
URLButton(URLNavigator* parent); URLButton(URLNavigator* tqparent);
virtual ~URLButton(); virtual ~URLButton();
URLNavigator* urlNavigator() const; URLNavigator* urlNavigator() const;
@ -56,10 +57,10 @@ protected:
void setDisplayHintEnabled(DisplayHint hint, bool enable); void setDisplayHintEnabled(DisplayHint hint, bool enable);
bool isDisplayHintEnabled(DisplayHint hint) const; bool isDisplayHintEnabled(DisplayHint hint) const;
virtual void enterEvent(QEvent* event); virtual void enterEvent(TQEvent* event);
virtual void leaveEvent(QEvent* event); virtual void leaveEvent(TQEvent* event);
QColor mixColors(const QColor& c1, const QColor& c2) const; TQColor mixColors(const TQColor& c1, const TQColor& c2) const;
private: private:
int m_displayHint; int m_displayHint;

@ -23,17 +23,17 @@
#include <assert.h> #include <assert.h>
#include <kurl.h> #include <kurl.h>
#include <qobjectlist.h> #include <tqobjectlist.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include <klocale.h> #include <klocale.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <qpopupmenu.h> #include <tqpopupmenu.h>
#include <qlineedit.h> #include <tqlineedit.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qsizepolicy.h> #include <tqsizepolicy.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <qfont.h> #include <tqfont.h>
#include <qlistbox.h> #include <tqlistbox.h>
#include <kio/job.h> #include <kio/job.h>
#include <kurlcombobox.h> #include <kurlcombobox.h>
@ -69,29 +69,29 @@ URLNavigator::HistoryElem::~HistoryElem()
URLNavigator::URLNavigator(const KURL& url, URLNavigator::URLNavigator(const KURL& url,
DolphinView* dolphinView) : DolphinView* dolphinView) :
QHBox(dolphinView), TQHBox(dolphinView),
m_historyIndex(0), m_historyIndex(0),
m_dolphinView(dolphinView) m_dolphinView(dolphinView)
{ {
m_history.prepend(HistoryElem(url)); m_history.prepend(HistoryElem(url));
QFontMetrics fontMetrics(font()); TQFontMetrics fontMetrics(font());
setMinimumHeight(fontMetrics.height() + 8); setMinimumHeight(fontMetrics.height() + 8);
m_toggleButton = new QPushButton(SmallIcon("editurl"), 0, this); m_toggleButton = new TQPushButton(SmallIcon("editurl"), 0, this);
m_toggleButton->setFlat(true); m_toggleButton->setFlat(true);
m_toggleButton->setToggleButton(true); m_toggleButton->setToggleButton(true);
m_toggleButton->setFocusPolicy(QWidget::NoFocus); m_toggleButton->setFocusPolicy(TQ_NoFocus);
m_toggleButton->setMinimumHeight(minimumHeight()); m_toggleButton->setMinimumHeight(minimumHeight());
connect(m_toggleButton, SIGNAL(clicked()), connect(m_toggleButton, TQT_SIGNAL(clicked()),
this, SLOT(slotClicked())); this, TQT_SLOT(slotClicked()));
if (DolphinSettings::instance().isURLEditable()) { if (DolphinSettings::instance().isURLEditable()) {
m_toggleButton->toggle(); m_toggleButton->toggle();
} }
m_bookmarkSelector = new BookmarkSelector(this); m_bookmarkSelector = new BookmarkSelector(this);
connect(m_bookmarkSelector, SIGNAL(bookmarkActivated(int)), connect(m_bookmarkSelector, TQT_SIGNAL(bookmarkActivated(int)),
this, SLOT(slotBookmarkActivated(int))); this, TQT_SLOT(slotBookmarkActivated(int)));
m_pathBox = new KURLComboBox(KURLComboBox::Directories, true, this); m_pathBox = new KURLComboBox(KURLComboBox::Directories, true, this);
@ -99,13 +99,13 @@ URLNavigator::URLNavigator(const KURL& url,
m_pathBox->setCompletionObject(kurlCompletion); m_pathBox->setCompletionObject(kurlCompletion);
m_pathBox->setAutoDeleteCompletionObject(true); m_pathBox->setAutoDeleteCompletionObject(true);
connect(m_pathBox, SIGNAL(returnPressed(const QString&)), connect(m_pathBox, TQT_SIGNAL(returnPressed(const TQString&)),
this, SLOT(slotReturnPressed(const QString&))); this, TQT_SLOT(slotReturnPressed(const TQString&)));
connect(m_pathBox, SIGNAL(urlActivated(const KURL&)), connect(m_pathBox, TQT_SIGNAL(urlActivated(const KURL&)),
this, SLOT(slotURLActivated(const KURL&))); this, TQT_SLOT(slotURLActivated(const KURL&)));
connect(dolphinView, SIGNAL(contentsMoved(int, int)), connect(dolphinView, TQT_SIGNAL(contentsMoved(int, int)),
this, SLOT(slotContentsMoved(int, int))); this, TQT_SLOT(slotContentsMoved(int, int)));
updateContent(); updateContent();
} }
@ -115,7 +115,7 @@ URLNavigator::~URLNavigator()
void URLNavigator::setURL(const KURL& url) void URLNavigator::setURL(const KURL& url)
{ {
QString urlStr(url.prettyURL()); TQString urlStr(url.prettyURL());
if (url.protocol() == "zip") { if (url.protocol() == "zip") {
bool stillInside = false; bool stillInside = false;
@ -179,9 +179,9 @@ void URLNavigator::setURL(const KURL& url)
if (urlStr.at(0) == '~') { if (urlStr.at(0) == '~') {
// replace '~' by the home directory // tqreplace '~' by the home directory
urlStr.remove(0, 1); urlStr.remove(0, 1);
urlStr.insert(0, QDir::home().path()); urlStr.insert(0, TQDir::home().path());
} }
const KURL transformedURL(urlStr); const KURL transformedURL(urlStr);
@ -205,7 +205,7 @@ void URLNavigator::setURL(const KURL& url)
updateHistoryElem(); updateHistoryElem();
const QValueListIterator<URLNavigator::HistoryElem> it = m_history.at(m_historyIndex); const TQValueListIterator<URLNavigator::HistoryElem> it = m_history.at(m_historyIndex);
m_history.insert(it, HistoryElem(transformedURL)); m_history.insert(it, HistoryElem(transformedURL));
updateContent(); updateContent();
emit urlChanged(transformedURL); emit urlChanged(transformedURL);
@ -228,7 +228,7 @@ const KURL& URLNavigator::url() const
KURL URLNavigator::url(int index) const KURL URLNavigator::url(int index) const
{ {
assert(index >= 0); assert(index >= 0);
QString path(url().prettyURL()); TQString path(url().prettyURL());
path = path.section('/', 0, index); path = path.section('/', 0, index);
if (path.at(path.length()) != '/') if (path.at(path.length()) != '/')
@ -239,7 +239,7 @@ KURL URLNavigator::url(int index) const
return path; return path;
} }
const QValueList<URLNavigator::HistoryElem>& URLNavigator::history(int& index) const const TQValueList<URLNavigator::HistoryElem>& URLNavigator::history(int& index) const
{ {
index = m_historyIndex; index = m_historyIndex;
return m_history; return m_history;
@ -288,7 +288,7 @@ void URLNavigator::setURLEditable(bool editable)
bool URLNavigator::isURLEditable() const bool URLNavigator::isURLEditable() const
{ {
return m_toggleButton->state() == QButton::On; return m_toggleButton->state() == TQButton::On;
} }
void URLNavigator::editURL() void URLNavigator::editURL()
@ -302,15 +302,15 @@ DolphinView* URLNavigator::dolphinView() const
return m_dolphinView; return m_dolphinView;
} }
void URLNavigator::keyReleaseEvent(QKeyEvent* event) void URLNavigator::keyReleaseEvent(TQKeyEvent* event)
{ {
QHBox::keyReleaseEvent(event); TQHBox::keyReleaseEvent(event);
if (isURLEditable() && (event->key() == Qt::Key_Escape)) { if (isURLEditable() && (event->key() == TQt::Key_Escape)) {
setURLEditable(false); setURLEditable(false);
} }
} }
void URLNavigator::slotReturnPressed(const QString& text) void URLNavigator::slotReturnPressed(const TQString& text)
{ {
// Parts of the following code have been taken // Parts of the following code have been taken
// from the class KateFileSelector located in // from the class KateFileSelector located in
@ -321,10 +321,10 @@ void URLNavigator::slotReturnPressed(const QString& text)
KURL typedURL(text); KURL typedURL(text);
if (typedURL.hasPass()) { if (typedURL.hasPass()) {
typedURL.setPass(QString::null); typedURL.setPass(TQString());
} }
QStringList urls = m_pathBox->urls(); TQStringList urls = m_pathBox->urls();
urls.remove(typedURL.url()); urls.remove(typedURL.url());
urls.prepend(typedURL.url()); urls.prepend(typedURL.url());
m_pathBox->setURLs(urls, KURLComboBox::RemoveBottom); m_pathBox->setURLs(urls, KURLComboBox::RemoveBottom);
@ -384,14 +384,14 @@ void URLNavigator::updateHistoryElem()
void URLNavigator::updateContent() void URLNavigator::updateContent()
{ {
const QObjectList* list = children(); const TQObjectList list = childrenListObject();
if (list == 0) { if (list.isEmpty()) {
return; return;
} }
// set the iterator to the first URL navigator button // set the iterator to the first URL navigator button
QObjectListIterator it(*list); TQObjectListIterator it(list);
QObject* object = 0; TQObject* object = 0;
while ((object = it.current()) != 0) { while ((object = it.current()) != 0) {
if (object->inherits("URLNavigatorButton")) { if (object->inherits("URLNavigatorButton")) {
break; break;
@ -400,20 +400,20 @@ void URLNavigator::updateContent()
} }
// delete all existing URL navigator buttons // delete all existing URL navigator buttons
QPtrList<QWidget> deleteList; TQPtrList<TQWidget> deleteList;
while ((object = it.current()) != 0) { while ((object = it.current()) != 0) {
if (object->inherits("URLNavigatorButton")) { if (object->inherits("URLNavigatorButton")) {
// Don't close and delete the navigator button immediatly, otherwise // Don't close and delete the navigator button immediatly, otherwise
// the iterator won't work anymore and an object would get deleted more // the iterator won't work anymore and an object would get deleted more
// than once (-> crash). // than once (-> crash).
deleteList.append(static_cast<QWidget*>(object)); deleteList.append(TQT_TQWIDGET(object));
} }
++it; ++it;
} }
// now close and delete all unused navigator buttons // now close and delete all unused navigator buttons
QPtrListIterator<QWidget> deleteIter(deleteList); TQPtrListIterator<TQWidget> deleteIter(deleteList);
QWidget* widget = 0; TQWidget* widget = 0;
while ((widget = deleteIter.current()) != 0) { while ((widget = deleteIter.current()) != 0) {
widget->close(); widget->close();
widget->deleteLater(); widget->deleteLater();
@ -422,37 +422,37 @@ void URLNavigator::updateContent()
m_bookmarkSelector->updateSelection(url()); m_bookmarkSelector->updateSelection(url());
QToolTip::remove(m_toggleButton); TQToolTip::remove(m_toggleButton);
QString path(url().prettyURL()); TQString path(url().prettyURL());
if (m_toggleButton->state() == QButton::On) { if (m_toggleButton->state() == TQButton::On) {
// TODO: don't hardcode the shortcut as part of the text // TODO: don't hardcode the shortcut as part of the text
QToolTip::add(m_toggleButton, i18n("Browse (Ctrl+B, Escape)")); TQToolTip::add(m_toggleButton, i18n("Browse (Ctrl+B, Escape)"));
setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
m_pathBox->show(); m_pathBox->show();
m_pathBox->setURL(url()); m_pathBox->setURL(url());
} }
else { else {
// TODO: don't hardcode the shortcut as part of the text // TODO: don't hardcode the shortcut as part of the text
QToolTip::add(m_toggleButton, i18n("Edit location (Ctrl+L)")); TQToolTip::add(m_toggleButton, i18n("Edit location (Ctrl+L)"));
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
m_pathBox->hide(); m_pathBox->hide();
QString dir_name; TQString dir_name;
// get the data from the currently selected bookmark // get the data from the currently selected bookmark
KBookmark bookmark = m_bookmarkSelector->selectedBookmark(); KBookmark bookmark = m_bookmarkSelector->selectedBookmark();
//int bookmarkIndex = m_bookmarkSelector->selectedIndex(); //int bookmarkIndex = m_bookmarkSelector->selectedIndex();
QString bookmarkPath; TQString bookmarkPath;
if (bookmark.isNull()) { 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 // The following code tries to guess the bookmark
// path. E. g. "fish://root@192.168.0.2/var/lib" writes // path. E. g. "fish://root@192.168.0.2/var/lib" writes
// "fish://root@192.168.0.2" to 'bookmarkPath', which leads to the // "fish://root@192.168.0.2" to 'bookmarkPath', which leads to the
// navigation indication 'Custom Path > var > lib". // navigation indication 'Custom Path > var > lib".
int idx = path.find(QString("//")); int idx = path.tqfind(TQString("//"));
idx = path.find("/", (idx < 0) ? 0 : idx + 2); idx = path.tqfind("/", (idx < 0) ? 0 : idx + 2);
bookmarkPath = (idx < 0) ? path : path.left(idx); bookmarkPath = (idx < 0) ? path : path.left(idx);
} }
else { else {
@ -464,11 +464,11 @@ void URLNavigator::updateContent()
// the slashs inside the bookmark URL // the slashs inside the bookmark URL
int slashCount = 0; int slashCount = 0;
for (uint i = 0; i < len; ++i) { for (uint i = 0; i < len; ++i) {
if (bookmarkPath.at(i) == QChar('/')) { if (bookmarkPath.at(i) == TQChar('/')) {
++slashCount; ++slashCount;
} }
} }
if ((len > 0) && bookmarkPath.at(len - 1) == QChar('/')) { if ((len > 0) && bookmarkPath.at(len - 1) == TQChar('/')) {
assert(slashCount > 0); assert(slashCount > 0);
--slashCount; --slashCount;
} }
@ -485,7 +485,7 @@ void URLNavigator::updateContent()
if (isFirstButton) { if (isFirstButton) {
// the first URL navigator button should get the name of the bookmark // the first URL navigator button should get the name of the bookmark
// instead of the directory name // instead of the directory name
QString text = bookmark.text(); TQString text = bookmark.text();
if (text.isEmpty()) { if (text.isEmpty()) {
text = bookmarkPath; text = bookmarkPath;
} }

@ -21,14 +21,14 @@
#ifndef URLNAVIGATOR_H #ifndef URLNAVIGATOR_H
#define URLNAVIGATOR_H #define URLNAVIGATOR_H
#include <qhbox.h> #include <tqhbox.h>
#include <kurl.h> #include <kurl.h>
#include <qstring.h> #include <tqstring.h>
class DolphinView; class DolphinView;
class QPopupMenu; class TQPopupMenu;
class QPushButton; class TQPushButton;
class QComboBox; class TQComboBox;
class BookmarkSelector; class BookmarkSelector;
class KURLComboBox; class KURLComboBox;
class KFileItem; class KFileItem;
@ -52,9 +52,10 @@ class KFileItem;
* *
* @author Peter Penz * @author Peter Penz
*/ */
class URLNavigator : public QHBox class URLNavigator : public TQHBox
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
/** /**
@ -72,8 +73,8 @@ public:
const KURL& url() const { return m_url; } const KURL& url() const { return m_url; }
void setCurrentFileName(const QString& name) { m_currentFileName = name; } void setCurrentFileName(const TQString& name) { m_currentFileName = name; }
const QString& currentFileName() const { return m_currentFileName; } const TQString& currentFileName() const { return m_currentFileName; }
void setContentsX(int x) { m_contentsX = x; } void setContentsX(int x) { m_contentsX = x; }
int contentsX() const { return m_contentsX; } int contentsX() const { return m_contentsX; }
@ -83,7 +84,7 @@ public:
private: private:
KURL m_url; KURL m_url;
QString m_currentFileName; TQString m_currentFileName;
int m_contentsX; int m_contentsX;
int m_contentsY; int m_contentsY;
}; };
@ -110,7 +111,7 @@ public:
* @param index Output parameter which indicates the current * @param index Output parameter which indicates the current
* index of the location. * index of the location.
*/ */
const QValueList<HistoryElem>& history(int& index) const; const TQValueList<HistoryElem>& history(int& index) const;
/** /**
* Goes back one step in the URL history. The signals * Goes back one step in the URL history. The signals
@ -168,10 +169,10 @@ signals:
protected: protected:
/** If the Escape key is pressed, the navigation bar should switch /** If the Escape key is pressed, the navigation bar should switch
to the browse mode. */ to the browse mode. */
virtual void keyReleaseEvent(QKeyEvent* event); virtual void keyReleaseEvent(TQKeyEvent* event);
private slots: private slots:
void slotReturnPressed(const QString& text); void slotReturnPressed(const TQString& text);
void slotURLActivated(const KURL& url); void slotURLActivated(const KURL& url);
void slotRequestActivation(); void slotRequestActivation();
@ -194,8 +195,8 @@ private slots:
private: private:
int m_historyIndex; int m_historyIndex;
DolphinView* m_dolphinView; DolphinView* m_dolphinView;
QValueList<HistoryElem> m_history; TQValueList<HistoryElem> m_history;
QPushButton* m_toggleButton; TQPushButton* m_toggleButton;
BookmarkSelector* m_bookmarkSelector; BookmarkSelector* m_bookmarkSelector;
KURLComboBox* m_pathBox; KURLComboBox* m_pathBox;

@ -19,11 +19,11 @@
***************************************************************************/ ***************************************************************************/
#include "urlnavigatorbutton.h" #include "urlnavigatorbutton.h"
#include <qcursor.h> #include <tqcursor.h>
#include <qfontmetrics.h> #include <tqfontmetrics.h>
#include <qpainter.h> #include <tqpainter.h>
#include <qtimer.h> #include <tqtimer.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <kglobalsettings.h> #include <kglobalsettings.h>
#include <kiconloader.h> #include <kiconloader.h>
@ -38,19 +38,19 @@
#include "dolphinview.h" #include "dolphinview.h"
#include "dolphin.h" #include "dolphin.h"
URLNavigatorButton::URLNavigatorButton(int index, URLNavigator* parent) : URLNavigatorButton::URLNavigatorButton(int index, URLNavigator* tqparent) :
URLButton(parent), URLButton(tqparent),
m_index(-1), m_index(-1),
m_listJob(0) m_listJob(0)
{ {
setAcceptDrops(true); setAcceptDrops(true);
setMinimumWidth(arrowWidth()); setMinimumWidth(arrowWidth());
setIndex(index); setIndex(index);
connect(this, SIGNAL(clicked()), this, SLOT(updateNavigatorURL())); connect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(updateNavigatorURL()));
m_popupDelay = new QTimer(this); m_popupDelay = new TQTimer(this);
connect(m_popupDelay, SIGNAL(timeout()), this, SLOT(startListJob())); connect(m_popupDelay, TQT_SIGNAL(timeout()), this, TQT_SLOT(startListJob()));
connect(this, SIGNAL(pressed()), this, SLOT(startPopupDelay())); connect(this, TQT_SIGNAL(pressed()), this, TQT_SLOT(startPopupDelay()));
} }
URLNavigatorButton::~URLNavigatorButton() URLNavigatorButton::~URLNavigatorButton()
@ -64,13 +64,13 @@ void URLNavigatorButton::setIndex(int index)
} }
m_index = index; m_index = index;
QString path(urlNavigator()->url().prettyURL()); TQString path(urlNavigator()->url().prettyURL());
setText(path.section('/', index, index)); 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'. // this is the case, the button is marked as 'active'.
++index; ++index;
QFont adjustedFont(font()); TQFont adjustedFont(font());
if (path.section('/', index, index).isEmpty()) { if (path.section('/', index, index).isEmpty()) {
setDisplayHintEnabled(ActivatedHint, true); setDisplayHintEnabled(ActivatedHint, true);
adjustedFont.setBold(true); adjustedFont.setBold(true);
@ -89,13 +89,13 @@ int URLNavigatorButton::index() const
return m_index; return m_index;
} }
void URLNavigatorButton::drawButton(QPainter* painter) void URLNavigatorButton::drawButton(TQPainter* painter)
{ {
const int buttonWidth = width(); const int buttonWidth = width();
const int buttonHeight = height(); const int buttonHeight = height();
QColor backgroundColor; TQColor backgroundColor;
QColor foregroundColor; TQColor foregroundColor;
const bool isHighlighted = isDisplayHintEnabled(EnteredHint) || const bool isHighlighted = isDisplayHintEnabled(EnteredHint) ||
isDisplayHintEnabled(DraggedHint) || isDisplayHintEnabled(DraggedHint) ||
isDisplayHintEnabled(PopupActiveHint); isDisplayHintEnabled(PopupActiveHint);
@ -104,17 +104,17 @@ void URLNavigatorButton::drawButton(QPainter* painter)
foregroundColor = KGlobalSettings::highlightedTextColor(); foregroundColor = KGlobalSettings::highlightedTextColor();
} }
else { else {
backgroundColor = colorGroup().background(); backgroundColor = tqcolorGroup().background();
foregroundColor = KGlobalSettings::buttonTextColor(); foregroundColor = KGlobalSettings::buttonTextColor();
} }
// dimm the colors if the parent view does not have the focus // dimm the colors if the tqparent view does not have the focus
const DolphinView* parentView = urlNavigator()->dolphinView(); const DolphinView* tqparentView = urlNavigator()->dolphinView();
const Dolphin& dolphin = Dolphin::mainWin(); const Dolphin& dolphin = Dolphin::mainWin();
const bool isActive = (dolphin.activeView() == parentView); const bool isActive = (dolphin.activeView() == tqparentView);
if (!isActive) { if (!isActive) {
QColor dimmColor(colorGroup().background()); TQColor dimmColor(tqcolorGroup().background());
foregroundColor = mixColors(foregroundColor, dimmColor); foregroundColor = mixColors(foregroundColor, dimmColor);
if (isHighlighted) { if (isHighlighted) {
backgroundColor = mixColors(backgroundColor, dimmColor); backgroundColor = mixColors(backgroundColor, dimmColor);
@ -153,23 +153,23 @@ void URLNavigatorButton::drawButton(QPainter* painter)
} }
const bool clipped = isTextClipped(); const bool clipped = isTextClipped();
const int align = clipped ? Qt::AlignVCenter : Qt::AlignCenter; const int align = clipped ? TQt::AlignVCenter : TQt::AlignCenter;
painter->drawText(QRect(0, 0, textWidth, buttonHeight), align, text()); painter->drawText(TQRect(0, 0, textWidth, buttonHeight), align, text());
if (clipped) { if (clipped) {
// Blend the right area of the text with the background, as the // Blend the right area of the text with the background, as the
// text is clipped. // text is clipped.
// TODO: use alpha blending in Qt4 instead of drawing the text that often // TODO: use alpha blending in TQt4 instead of drawing the text that often
const int blendSteps = 16; const int blendSteps = 16;
QColor blendColor(backgroundColor); TQColor blendColor(backgroundColor);
const int redInc = (foregroundColor.red() - backgroundColor.red()) / blendSteps; const int redInc = (foregroundColor.red() - backgroundColor.red()) / blendSteps;
const int greenInc = (foregroundColor.green() - backgroundColor.green()) / blendSteps; const int greenInc = (foregroundColor.green() - backgroundColor.green()) / blendSteps;
const int blueInc = (foregroundColor.blue() - backgroundColor.blue()) / blendSteps; const int blueInc = (foregroundColor.blue() - backgroundColor.blue()) / blendSteps;
for (int i = 0; i < blendSteps; ++i) { for (int i = 0; i < blendSteps; ++i) {
painter->setClipRect(QRect(textWidth - i, 0, 1, buttonHeight)); painter->setClipRect(TQRect(textWidth - i, 0, 1, buttonHeight));
painter->setPen(blendColor); painter->setPen(blendColor);
painter->drawText(QRect(0, 0, textWidth, buttonHeight), align, text()); painter->drawText(TQRect(0, 0, textWidth, buttonHeight), align, text());
blendColor.setRgb(blendColor.red() + redInc, blendColor.setRgb(blendColor.red() + redInc,
blendColor.green() + greenInc, blendColor.green() + greenInc,
@ -178,30 +178,30 @@ void URLNavigatorButton::drawButton(QPainter* painter)
} }
} }
void URLNavigatorButton::enterEvent(QEvent* event) void URLNavigatorButton::enterEvent(TQEvent* event)
{ {
URLButton::enterEvent(event); URLButton::enterEvent(event);
// if the text is clipped due to a small window width, the text should // if the text is clipped due to a small window width, the text should
// be shown as tooltip // be shown as tooltip
if (isTextClipped()) { if (isTextClipped()) {
QToolTip::add(this, text()); TQToolTip::add(this, text());
} }
} }
void URLNavigatorButton::leaveEvent(QEvent* event) void URLNavigatorButton::leaveEvent(TQEvent* event)
{ {
URLButton::leaveEvent(event); URLButton::leaveEvent(event);
QToolTip::remove(this); TQToolTip::remove(this);
} }
void URLNavigatorButton::dropEvent(QDropEvent* event) void URLNavigatorButton::dropEvent(TQDropEvent* event)
{ {
KURL::List urls; KURL::List urls;
if (KURLDrag::decode(event, urls) && !urls.isEmpty()) { if (KURLDrag::decode(event, urls) && !urls.isEmpty()) {
setDisplayHintEnabled(DraggedHint, true); setDisplayHintEnabled(DraggedHint, true);
QString path(urlNavigator()->url().prettyURL()); TQString path(urlNavigator()->url().prettyURL());
path = path.section('/', 0, m_index); path = path.section('/', 0, m_index);
Dolphin::mainWin().dropURLs(urls, KURL(path)); Dolphin::mainWin().dropURLs(urls, KURL(path));
@ -211,7 +211,7 @@ void URLNavigatorButton::dropEvent(QDropEvent* event)
} }
} }
void URLNavigatorButton::dragEnterEvent(QDragEnterEvent* event) void URLNavigatorButton::dragEnterEvent(TQDragEnterEvent* event)
{ {
event->accept(KURLDrag::canDecode(event)); event->accept(KURLDrag::canDecode(event));
@ -219,7 +219,7 @@ void URLNavigatorButton::dragEnterEvent(QDragEnterEvent* event)
update(); update();
} }
void URLNavigatorButton::dragLeaveEvent(QDragLeaveEvent* event) void URLNavigatorButton::dragLeaveEvent(TQDragLeaveEvent* event)
{ {
URLButton::dragLeaveEvent(event); URLButton::dragLeaveEvent(event);
@ -263,9 +263,9 @@ void URLNavigatorButton::startListJob()
m_listJob = KIO::listDir(url, false, false); m_listJob = KIO::listDir(url, false, false);
m_subdirs.clear(); // just to be ++safe m_subdirs.clear(); // just to be ++safe
connect(m_listJob, SIGNAL(entries(KIO::Job*, const KIO::UDSEntryList &)), connect(m_listJob, TQT_SIGNAL(entries(KIO::Job*, const KIO::UDSEntryList &)),
this, SLOT(entriesList(KIO::Job*, const KIO::UDSEntryList&))); this, TQT_SLOT(entriesList(KIO::Job*, const KIO::UDSEntryList&)));
connect(m_listJob, SIGNAL(result(KIO::Job*)), this, SLOT(listJobFinished(KIO::Job*))); connect(m_listJob, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(listJobFinished(KIO::Job*)));
} }
void URLNavigatorButton::entriesList(KIO::Job* job, const KIO::UDSEntryList& entries) void URLNavigatorButton::entriesList(KIO::Job* job, const KIO::UDSEntryList& entries)
@ -277,7 +277,7 @@ void URLNavigatorButton::entriesList(KIO::Job* job, const KIO::UDSEntryList& ent
KIO::UDSEntryList::const_iterator it = entries.constBegin(); KIO::UDSEntryList::const_iterator it = entries.constBegin();
KIO::UDSEntryList::const_iterator itEnd = entries.constEnd(); KIO::UDSEntryList::const_iterator itEnd = entries.constEnd();
while (it != itEnd) { while (it != itEnd) {
QString name; TQString name;
bool isDir = false; bool isDir = false;
KIO::UDSEntry entry = *it; KIO::UDSEntry entry = *it;
KIO::UDSEntry::const_iterator atomIt = entry.constBegin(); KIO::UDSEntry::const_iterator atomIt = entry.constBegin();
@ -320,10 +320,10 @@ void URLNavigatorButton::listJobFinished(KIO::Job* job)
setDisplayHintEnabled(PopupActiveHint, true); setDisplayHintEnabled(PopupActiveHint, true);
update(); // ensure the button is drawn highlighted update(); // ensure the button is drawn highlighted
QPopupMenu* dirsMenu = new QPopupMenu(this); TQPopupMenu* dirsMenu = new TQPopupMenu(this);
//setPopup(dirsMenu); //setPopup(dirsMenu);
QStringList::const_iterator it = m_subdirs.constBegin(); TQStringList::const_iterator it = m_subdirs.constBegin();
QStringList::const_iterator itEnd = m_subdirs.constEnd(); TQStringList::const_iterator itEnd = m_subdirs.constEnd();
int i = 0; int i = 0;
while (it != itEnd) { while (it != itEnd) {
dirsMenu->insertItem(*it, i); dirsMenu->insertItem(*it, i);
@ -331,7 +331,7 @@ void URLNavigatorButton::listJobFinished(KIO::Job* job)
++it; ++it;
} }
int result = dirsMenu->exec(urlNavigator()->mapToGlobal(geometry().bottomLeft())); int result = dirsMenu->exec(urlNavigator()->mapToGlobal(tqgeometry().bottomLeft()));
if (result >= 0) { if (result >= 0) {
KURL url = urlNavigator()->url(m_index); KURL url = urlNavigator()->url(m_index);
@ -361,23 +361,23 @@ bool URLNavigatorButton::isTextClipped() const
availableWidth -= arrowWidth() + 1; availableWidth -= arrowWidth() + 1;
} }
QFontMetrics fontMetrics(font()); TQFontMetrics fontMetrics(font());
return fontMetrics.width(text()) >= availableWidth; return fontMetrics.width(text()) >= availableWidth;
} }
void URLNavigatorButton::mousePressEvent(QMouseEvent * event) void URLNavigatorButton::mousePressEvent(TQMouseEvent * event)
{ {
if (event->button() == LeftButton) if (event->button() == Qt::LeftButton)
dragPos = event->pos(); dragPos = event->pos();
URLButton::mousePressEvent(event); URLButton::mousePressEvent(event);
} }
void URLNavigatorButton::mouseMoveEvent(QMouseEvent * event) void URLNavigatorButton::mouseMoveEvent(TQMouseEvent * event)
{ {
if (event->state() & LeftButton) { if (event->state() & Qt::LeftButton) {
int distance = (event->pos() - dragPos).manhattanLength(); int distance = (event->pos() - dragPos).manhattanLength();
if (distance > QApplication::startDragDistance()*2)//don't start on small move (for submenu usability) if (distance > TQApplication::startDragDistance()*2)//don't start on small move (for submenu usability)
startDrag(); startDrag();
} }
URLButton::mouseMoveEvent(event); URLButton::mouseMoveEvent(event);

@ -20,7 +20,7 @@
#ifndef URLNAVIGATORBUTTON_H #ifndef URLNAVIGATORBUTTON_H
#define URLNAVIGATORBUTTON_H #define URLNAVIGATORBUTTON_H
#include <qstringlist.h> #include <tqstringlist.h>
#include <kio/global.h> #include <kio/global.h>
@ -28,7 +28,7 @@
class KURL; class KURL;
class URLNavigator; class URLNavigator;
class QPainter; class TQPainter;
namespace KIO namespace KIO
{ {
@ -46,24 +46,25 @@ namespace KIO
class URLNavigatorButton : public URLButton class URLNavigatorButton : public URLButton
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
URLNavigatorButton(int index, URLNavigator* parent = 0); URLNavigatorButton(int index, URLNavigator* tqparent = 0);
virtual ~URLNavigatorButton(); virtual ~URLNavigatorButton();
void setIndex(int index); void setIndex(int index);
int index() const; int index() const;
protected: protected:
virtual void drawButton(QPainter* painter); virtual void drawButton(TQPainter* painter);
virtual void enterEvent(QEvent* event); virtual void enterEvent(TQEvent* event);
virtual void leaveEvent(QEvent* event); virtual void leaveEvent(TQEvent* event);
//drag //drag
void mousePressEvent( QMouseEvent *event ); void mousePressEvent( TQMouseEvent *event );
void mouseMoveEvent( QMouseEvent *event ); void mouseMoveEvent( TQMouseEvent *event );
//drop //drop
virtual void dropEvent(QDropEvent* event); virtual void dropEvent(TQDropEvent* event);
virtual void dragEnterEvent(QDragEnterEvent* event); virtual void dragEnterEvent(TQDragEnterEvent* event);
virtual void dragLeaveEvent(QDragLeaveEvent* event); virtual void dragLeaveEvent(TQDragLeaveEvent* event);
private slots: private slots:
void updateNavigatorURL(); void updateNavigatorURL();
@ -79,10 +80,10 @@ private:
void startDrag(); void startDrag();
int m_index; int m_index;
QTimer* m_popupDelay; TQTimer* m_popupDelay;
KIO::Job* m_listJob; KIO::Job* m_listJob;
QStringList m_subdirs; TQStringList m_subdirs;
QPoint dragPos; TQPoint dragPos;
}; };
#endif #endif

@ -20,9 +20,9 @@
#include <assert.h> #include <assert.h>
#include <qdatetime.h> #include <tqdatetime.h>
#include <qdir.h> #include <tqdir.h>
#include <qfile.h> #include <tqfile.h>
#include <klocale.h> #include <klocale.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
@ -41,7 +41,7 @@ ViewProperties::ViewProperties(KURL url) :
url.cleanPath(true); url.cleanPath(true);
m_filepath = url.path(); m_filepath = url.path();
if ((m_filepath.length() < 1) || (m_filepath.at(0) != QChar('/'))) { if ((m_filepath.length() < 1) || (m_filepath.at(0) != TQChar('/'))) {
return; return;
} }
@ -50,41 +50,41 @@ ViewProperties::ViewProperties(KURL url) :
// we store the properties information in a local file // we store the properties information in a local file
DolphinSettings& settings = DolphinSettings::instance(); DolphinSettings& settings = DolphinSettings::instance();
if (settings.isSaveView()) { if (settings.isSaveView()) {
QString rootDir("/"); // TODO: should this be set to the root of the bookmark, if any? TQString rootDir("/"); // TODO: should this be set to the root of the bookmark, if any?
if (url.isLocalFile()) { if (url.isLocalFile()) {
QFileInfo info(m_filepath); TQFileInfo info(m_filepath);
if (!info.isWritable()) { if (!info.isWritable()) {
QString basePath = KGlobal::instance()->instanceName(); TQString basePath = KGlobal::instance()->instanceName();
basePath.append("/view_properties/local"); basePath.append("/view_properties/local");
rootDir = locateLocal("data", basePath); rootDir = locateLocal("data", basePath);
m_filepath = rootDir + m_filepath; m_filepath = rootDir + m_filepath;
} }
} }
else { else {
QString basePath = KGlobal::instance()->instanceName(); TQString basePath = KGlobal::instance()->instanceName();
basePath.append("/view_properties/remote/").append(url.host()); basePath.append("/view_properties/remote/").append(url.host());
rootDir = locateLocal("data", basePath); rootDir = locateLocal("data", basePath);
m_filepath = rootDir + m_filepath; m_filepath = rootDir + m_filepath;
} }
QDir dir(m_filepath); TQDir dir(m_filepath);
QFile file(m_filepath + FILE_NAME); TQFile file(m_filepath + FILE_NAME);
PropertiesNode node(&file); PropertiesNode node(&file);
const bool isValidForSubDirs = !node.isEmpty() && node.isValidForSubDirs(); const bool isValidForSubDirs = !node.isEmpty() && node.isValidForSubDirs();
while ((dir.path() != rootDir) && dir.cdUp()) { while ((dir.path() != rootDir) && dir.cdUp()) {
QFile file(dir.path() + FILE_NAME); TQFile file(dir.path() + FILE_NAME);
PropertiesNode parentNode(&file); PropertiesNode tqparentNode(&file);
if (!parentNode.isEmpty()) { if (!tqparentNode.isEmpty()) {
const bool inheritProps = parentNode.isValidForSubDirs() && const bool inheritProps = tqparentNode.isValidForSubDirs() &&
(parentNode.subDirProperties().m_timeStamp > (tqparentNode.subDirProperties().m_timeStamp >
node.localProperties().m_timeStamp); node.localProperties().m_timeStamp);
if (inheritProps) { if (inheritProps) {
node.setLocalProperties(parentNode.subDirProperties()); node.setLocalProperties(tqparentNode.subDirProperties());
break; break;
} }
} }
@ -145,7 +145,7 @@ DolphinView::Sorting ViewProperties::sorting() const
return m_node.localProperties().m_sorting; return m_node.localProperties().m_sorting;
} }
void ViewProperties::setSortOrder(Qt::SortOrder sortOrder) void ViewProperties::setSortOrder(TQt::SortOrder sortOrder)
{ {
if (m_node.localProperties().m_sortOrder != sortOrder) { if (m_node.localProperties().m_sortOrder != sortOrder) {
m_node.setSortOrder(sortOrder); m_node.setSortOrder(sortOrder);
@ -153,7 +153,7 @@ void ViewProperties::setSortOrder(Qt::SortOrder sortOrder)
} }
} }
Qt::SortOrder ViewProperties::sortOrder() const TQt::SortOrder ViewProperties::sortOrder() const
{ {
return m_node.localProperties().m_sortOrder; return m_node.localProperties().m_sortOrder;
} }
@ -185,7 +185,7 @@ void ViewProperties::save()
{ {
DolphinSettings& settings = DolphinSettings::instance(); DolphinSettings& settings = DolphinSettings::instance();
if (settings.isSaveView()) { if (settings.isSaveView()) {
QFile file(m_filepath + FILE_NAME); TQFile file(m_filepath + FILE_NAME);
KStandardDirs::makeDir(m_filepath); KStandardDirs::makeDir(m_filepath);
if (!file.open(IO_WriteOnly)) { if (!file.open(IO_WriteOnly)) {
return; return;
@ -196,13 +196,13 @@ void ViewProperties::save()
char sorting = static_cast<char>(props.m_sorting) + '0'; char sorting = static_cast<char>(props.m_sorting) + '0';
const bool isValidForSubDirs = m_node.isValidForSubDirs() || m_subDirValidityHidden; const bool isValidForSubDirs = m_node.isValidForSubDirs() || m_subDirValidityHidden;
QTextStream stream(&file); TQTextStream stream(&file);
stream << "V01" stream << "V01"
<< viewMode << viewMode
<< (props.m_showHiddenFiles ? '1' : '0') << (props.m_showHiddenFiles ? '1' : '0')
<< props.m_timeStamp.toString("yyyyMMddhhmmss") << props.m_timeStamp.toString("yyyyMMddhhmmss")
<< sorting << sorting
<< ((props.m_sortOrder == Qt::Ascending) ? 'A' : 'D') << ((props.m_sortOrder == TQt::Ascending) ? 'A' : 'D')
<< (isValidForSubDirs ? '1' : '0'); << (isValidForSubDirs ? '1' : '0');
if (m_node.isValidForSubDirs()) { if (m_node.isValidForSubDirs()) {
@ -217,7 +217,7 @@ void ViewProperties::save()
<< (subDirProps.m_showHiddenFiles ? '1' : '0') << (subDirProps.m_showHiddenFiles ? '1' : '0')
<< subDirProps.m_timeStamp.toString("yyyyMMddhhmmss") << subDirProps.m_timeStamp.toString("yyyyMMddhhmmss")
<< sorting << sorting
<< ((subDirProps.m_sortOrder == Qt::Ascending) ? 'A' : 'D'); << ((subDirProps.m_sortOrder == TQt::Ascending) ? 'A' : 'D');
} }
file.flush(); file.flush();
file.close(); file.close();
@ -229,17 +229,17 @@ void ViewProperties::save()
void ViewProperties::updateTimeStamp() void ViewProperties::updateTimeStamp()
{ {
m_changedProps = true; m_changedProps = true;
m_node.setTimeStamp(QDateTime::currentDateTime()); m_node.setTimeStamp(TQDateTime::tqcurrentDateTime());
} }
ViewProperties::Properties::Properties() : ViewProperties::Properties::Properties() :
m_showHiddenFiles(false), m_showHiddenFiles(false),
m_viewMode(DolphinView::IconsView), m_viewMode(DolphinView::IconsView),
m_sorting(DolphinView::SortByName), m_sorting(DolphinView::SortByName),
m_sortOrder(Qt::Ascending) m_sortOrder(TQt::Ascending)
{ {
m_timeStamp.setDate(QDate(1999, 12, 31)); m_timeStamp.setDate(TQDate(1999, 12, 31));
m_timeStamp.setTime(QTime(23, 59, 59)); m_timeStamp.setTime(TQTime(23, 59, 59));
m_viewMode = DolphinSettings::instance().defaultViewMode(); m_viewMode = DolphinSettings::instance().defaultViewMode();
} }
@ -248,7 +248,7 @@ ViewProperties::Properties::~Properties()
{ {
} }
ViewProperties::PropertiesNode::PropertiesNode(QFile* file) : ViewProperties::PropertiesNode::PropertiesNode(TQFile* file) :
m_empty(true) m_empty(true)
{ {
m_isValidForSubDirs = false; m_isValidForSubDirs = false;
@ -332,18 +332,18 @@ int ViewProperties::PropertiesNode::readProperties(Properties& props,
props.m_showHiddenFiles = (buffer[1] != '0'); props.m_showHiddenFiles = (buffer[1] != '0');
// read date // read date
QDateTime timeStamp; TQDateTime timeStamp;
const int year = toInt(&(buffer[2]), 4); const int year = toInt(&(buffer[2]), 4);
const int month = toInt(&(buffer[6]), 2); const int month = toInt(&(buffer[6]), 2);
const int day = toInt(&(buffer[8]), 2); const int day = toInt(&(buffer[8]), 2);
QDate date(year, month, day); TQDate date(year, month, day);
timeStamp.setDate(date); timeStamp.setDate(date);
// read time // read time
const int hour = toInt(&(buffer[10]), 2); const int hour = toInt(&(buffer[10]), 2);
const int minute = toInt(&(buffer[12]), 2); const int minute = toInt(&(buffer[12]), 2);
const int second = toInt(&(buffer[14]), 2); const int second = toInt(&(buffer[14]), 2);
QTime time(hour, minute, second); TQTime time(hour, minute, second);
timeStamp.setTime(time); timeStamp.setTime(time);
props.m_timeStamp = timeStamp; props.m_timeStamp = timeStamp;
@ -352,7 +352,7 @@ int ViewProperties::PropertiesNode::readProperties(Properties& props,
if (version >= 1) { if (version >= 1) {
// read sorting type and sorting order // read sorting type and sorting order
props.m_sorting = static_cast<DolphinView::Sorting>(buffer[16] - '0'); props.m_sorting = static_cast<DolphinView::Sorting>(buffer[16] - '0');
props.m_sortOrder = (buffer[17] == 'A') ? Qt::Ascending : Qt::Descending; props.m_sortOrder = (buffer[17] == 'A') ? TQt::Ascending : TQt::Descending;
readCount = 18; readCount = 18;
} }

@ -23,8 +23,8 @@
#include <dolphinview.h> #include <dolphinview.h>
#include <kurl.h> #include <kurl.h>
#include <qdatetime.h> #include <tqdatetime.h>
class QFile; class TQFile;
/** /**
* @short Maintains the view properties like 'view mode' or 'show hidden files' for a directory. * @short Maintains the view properties like 'view mode' or 'show hidden files' for a directory.
@ -59,8 +59,8 @@ public:
void setSorting(DolphinView::Sorting sorting); void setSorting(DolphinView::Sorting sorting);
DolphinView::Sorting sorting() const; DolphinView::Sorting sorting() const;
void setSortOrder(Qt::SortOrder sortOrder); void setSortOrder(TQt::SortOrder sortOrder);
Qt::SortOrder sortOrder() const; TQt::SortOrder sortOrder() const;
void setValidForSubDirs(bool valid); void setValidForSubDirs(bool valid);
bool isValidForSubDirs() const; bool isValidForSubDirs() const;
@ -80,15 +80,15 @@ private:
bool m_showHiddenFiles; bool m_showHiddenFiles;
DolphinView::Mode m_viewMode; DolphinView::Mode m_viewMode;
QDateTime m_timeStamp; TQDateTime m_timeStamp;
DolphinView::Sorting m_sorting; DolphinView::Sorting m_sorting;
Qt::SortOrder m_sortOrder; TQt::SortOrder m_sortOrder;
}; };
class PropertiesNode class PropertiesNode
{ {
public: public:
PropertiesNode(QFile* file = 0); PropertiesNode(TQFile* file = 0);
~PropertiesNode(); ~PropertiesNode();
PropertiesNode& operator = (const PropertiesNode& node); PropertiesNode& operator = (const PropertiesNode& node);
bool isEmpty() const { return m_empty; } bool isEmpty() const { return m_empty; }
@ -101,10 +101,10 @@ private:
void setShowHiddenFilesEnabled(bool show) { m_props.m_showHiddenFiles = show; } void setShowHiddenFilesEnabled(bool show) { m_props.m_showHiddenFiles = show; }
void setViewMode(DolphinView::Mode mode) { m_props.m_viewMode = mode; } void setViewMode(DolphinView::Mode mode) { m_props.m_viewMode = mode; }
void setTimeStamp(const QDateTime timeStamp) { m_props.m_timeStamp = timeStamp; } void setTimeStamp(const TQDateTime timeStamp) { m_props.m_timeStamp = timeStamp; }
const QDateTime& timeStamp() const { return m_props.m_timeStamp; } const TQDateTime& timeStamp() const { return m_props.m_timeStamp; }
void setSorting(DolphinView::Sorting sorting) { m_props.m_sorting = sorting; } void setSorting(DolphinView::Sorting sorting) { m_props.m_sorting = sorting; }
void setSortOrder(Qt::SortOrder sortOrder) { m_props.m_sortOrder = sortOrder; } void setSortOrder(TQt::SortOrder sortOrder) { m_props.m_sortOrder = sortOrder; }
void setSubDirProperties(const Properties& props) { m_subDirProps = props; } void setSubDirProperties(const Properties& props) { m_subDirProps = props; }
const Properties& subDirProperties() const { return m_subDirProps; } const Properties& subDirProperties() const { return m_subDirProps; }
@ -122,7 +122,7 @@ private:
bool m_changedProps; bool m_changedProps;
bool m_autoSave; bool m_autoSave;
bool m_subDirValidityHidden; bool m_subDirValidityHidden;
QString m_filepath; TQString m_filepath;
PropertiesNode m_node; PropertiesNode m_node;
}; };

@ -20,16 +20,16 @@
#include "viewpropertiesdialog.h" #include "viewpropertiesdialog.h"
#include <klocale.h> #include <klocale.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qvbox.h> #include <tqvbox.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qradiobutton.h> #include <tqradiobutton.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qsizepolicy.h> #include <tqsizepolicy.h>
#include <qgroupbox.h> #include <tqgroupbox.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <assert.h> #include <assert.h>
@ -46,29 +46,29 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) :
assert(dolphinView != 0); assert(dolphinView != 0);
const int margin = KDialog::marginHint(); const int margin = KDialog::marginHint();
const QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); const TQSizePolicy sizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed);
const KURL& url = dolphinView->url(); const KURL& url = dolphinView->url();
m_viewProps = new ViewProperties(url); m_viewProps = new ViewProperties(url);
m_viewProps->setAutoSaveEnabled(false); m_viewProps->setAutoSaveEnabled(false);
QVBoxLayout* topLayout = new QVBoxLayout(plainPage(), 0, spacingHint()); TQVBoxLayout* topLayout = new TQVBoxLayout(plainPage(), 0, spacingHint());
// create 'Properties' group containing view mode, sorting, sort order and show hidden files // create 'Properties' group containing view mode, sorting, sort order and show hidden files
QGroupBox* propsGroup = new QGroupBox(2, Qt::Horizontal, i18n("Properties"), plainPage()); TQGroupBox* propsGroup = new TQGroupBox(2, Qt::Horizontal, i18n("Properties"), plainPage());
propsGroup->setSizePolicy(sizePolicy); propsGroup->tqsetSizePolicy(sizePolicy);
propsGroup->setMargin(margin); propsGroup->setMargin(margin);
new QLabel(i18n("View mode:"), propsGroup); new TQLabel(i18n("View mode:"), propsGroup);
m_viewMode = new QComboBox(propsGroup); m_viewMode = new TQComboBox(propsGroup);
m_viewMode->insertItem(SmallIcon("view_icon"), i18n("Icons")); m_viewMode->insertItem(SmallIcon("view_icon"), i18n("Icons"));
m_viewMode->insertItem(SmallIcon("view_text"), i18n("Details")); m_viewMode->insertItem(SmallIcon("view_text"), i18n("Details"));
m_viewMode->insertItem(SmallIcon("gvdirpart"), i18n("Previews")); m_viewMode->insertItem(SmallIcon("gvdirpart"), i18n("Previews"));
const int index = static_cast<int>(m_viewProps->viewMode()); const int index = static_cast<int>(m_viewProps->viewMode());
m_viewMode->setCurrentItem(index); m_viewMode->setCurrentItem(index);
new QLabel(i18n("Sorting:"), propsGroup); new TQLabel(i18n("Sorting:"), propsGroup);
m_sorting = new QComboBox(propsGroup); m_sorting = new TQComboBox(propsGroup);
m_sorting->insertItem("By Name"); m_sorting->insertItem("By Name");
m_sorting->insertItem("By Size"); m_sorting->insertItem("By Size");
m_sorting->insertItem("By Date"); m_sorting->insertItem("By Date");
@ -81,31 +81,31 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) :
} }
m_sorting->setCurrentItem(sortingIdx); m_sorting->setCurrentItem(sortingIdx);
new QLabel(i18n("Sort order:"), propsGroup); new TQLabel(i18n("Sort order:"), propsGroup);
m_sortOrder = new QComboBox(propsGroup); m_sortOrder = new TQComboBox(propsGroup);
m_sortOrder->insertItem(i18n("Ascending")); m_sortOrder->insertItem(i18n("Ascending"));
m_sortOrder->insertItem(i18n("Descending")); m_sortOrder->insertItem(i18n("Descending"));
const int sortOrderIdx = (m_viewProps->sortOrder() == Qt::Ascending) ? 0 : 1; const int sortOrderIdx = (m_viewProps->sortOrder() == TQt::Ascending) ? 0 : 1;
m_sortOrder->setCurrentItem(sortOrderIdx); m_sortOrder->setCurrentItem(sortOrderIdx);
m_showHiddenFiles = new QCheckBox(i18n("Show hidden files"), propsGroup); m_showHiddenFiles = new TQCheckBox(i18n("Show hidden files"), propsGroup);
m_showHiddenFiles->setChecked(m_viewProps->isShowHiddenFilesEnabled()); m_showHiddenFiles->setChecked(m_viewProps->isShowHiddenFilesEnabled());
// create 'Apply view properties to:' group // create 'Apply view properties to:' group
QButtonGroup* buttonGroup = new QButtonGroup(3, TQButtonGroup* buttonGroup = new TQButtonGroup(3,
Qt::Vertical, Qt::Vertical,
i18n("Apply view properties to:"), i18n("Apply view properties to:"),
plainPage()); plainPage());
buttonGroup->setSizePolicy(sizePolicy); buttonGroup->tqsetSizePolicy(sizePolicy);
buttonGroup->setMargin(margin); buttonGroup->setMargin(margin);
m_applyToCurrentFolder = new QRadioButton(i18n("Current folder"), buttonGroup); m_applyToCurrentFolder = new TQRadioButton(i18n("Current folder"), buttonGroup);
buttonGroup->insert(m_applyToCurrentFolder); buttonGroup->insert(m_applyToCurrentFolder);
m_applyToSubFolders = new QRadioButton(i18n("Current folder including all sub folders"), buttonGroup); m_applyToSubFolders = new TQRadioButton(i18n("Current folder including all sub folders"), buttonGroup);
buttonGroup->insert(m_applyToSubFolders); buttonGroup->insert(m_applyToSubFolders);
m_applyToAllFolders = new QRadioButton(i18n("All folders"), buttonGroup); m_applyToAllFolders = new TQRadioButton(i18n("All folders"), buttonGroup);
buttonGroup->insert(m_applyToAllFolders); buttonGroup->insert(m_applyToAllFolders);
if (m_viewProps->isValidForSubDirs()) { if (m_viewProps->isValidForSubDirs()) {
@ -118,20 +118,20 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) :
topLayout->addWidget(propsGroup); topLayout->addWidget(propsGroup);
topLayout->addWidget(buttonGroup); topLayout->addWidget(buttonGroup);
connect(m_viewMode, SIGNAL(activated(int)), connect(m_viewMode, TQT_SIGNAL(activated(int)),
this, SLOT(slotViewModeChanged(int))); this, TQT_SLOT(slotViewModeChanged(int)));
connect(m_sorting, SIGNAL(activated(int)), connect(m_sorting, TQT_SIGNAL(activated(int)),
this, SLOT(slotSortingChanged(int))); this, TQT_SLOT(slotSortingChanged(int)));
connect(m_sortOrder, SIGNAL(activated(int)), connect(m_sortOrder, TQT_SIGNAL(activated(int)),
this, SLOT(slotSortOrderChanged(int))); this, TQT_SLOT(slotSortOrderChanged(int)));
connect(m_showHiddenFiles, SIGNAL(clicked()), connect(m_showHiddenFiles, TQT_SIGNAL(clicked()),
this, SLOT(slotShowHiddenFilesChanged())); this, TQT_SLOT(slotShowHiddenFilesChanged()));
connect(m_applyToCurrentFolder, SIGNAL(clicked()), connect(m_applyToCurrentFolder, TQT_SIGNAL(clicked()),
this, SLOT(slotApplyToCurrentFolder())); this, TQT_SLOT(slotApplyToCurrentFolder()));
connect(m_applyToSubFolders, SIGNAL(clicked()), connect(m_applyToSubFolders, TQT_SIGNAL(clicked()),
this, SLOT(slotApplyToSubFolders())); this, TQT_SLOT(slotApplyToSubFolders()));
connect(m_applyToAllFolders, SIGNAL(clicked()), connect(m_applyToAllFolders, TQT_SIGNAL(clicked()),
this, SLOT(slotApplyToAllFolders())); this, TQT_SLOT(slotApplyToAllFolders()));
} }
ViewPropertiesDialog::~ViewPropertiesDialog() ViewPropertiesDialog::~ViewPropertiesDialog()
@ -174,7 +174,7 @@ void ViewPropertiesDialog::slotSortingChanged(int index)
void ViewPropertiesDialog::slotSortOrderChanged(int index) void ViewPropertiesDialog::slotSortOrderChanged(int index)
{ {
Qt::SortOrder sortOrder = (index == 0) ? Qt::Ascending : Qt::Descending; TQt::SortOrder sortOrder = (index == 0) ? TQt::Ascending : TQt::Descending;
m_viewProps->setSortOrder(sortOrder); m_viewProps->setSortOrder(sortOrder);
m_isDirty = true; m_isDirty = true;
} }
@ -207,13 +207,13 @@ void ViewPropertiesDialog::applyViewProperties()
{ {
if (m_applyToAllFolders->isChecked()) { if (m_applyToAllFolders->isChecked()) {
if (m_isDirty) { if (m_isDirty) {
const QString text(i18n("The view properties of all folders will be replaced. Do you want to continue?")); const TQString text(i18n("The view properties of all folders will be replaced. Do you want to continue?"));
if (KMessageBox::questionYesNo(this, text) == KMessageBox::No) { if (KMessageBox::questionYesNo(this, text) == KMessageBox::No) {
return; return;
} }
} }
ViewProperties props(QDir::homeDirPath()); ViewProperties props(TQDir::homeDirPath());
props.setViewMode(m_viewProps->viewMode()); props.setViewMode(m_viewProps->viewMode());
props.setSorting(m_viewProps->sorting()); props.setSorting(m_viewProps->sorting());
props.setSortOrder(m_viewProps->sortOrder()); props.setSortOrder(m_viewProps->sortOrder());
@ -221,7 +221,7 @@ void ViewPropertiesDialog::applyViewProperties()
props.setValidForSubDirs(true); props.setValidForSubDirs(true);
} }
else if (m_applyToSubFolders->isChecked() && m_isDirty) { else if (m_applyToSubFolders->isChecked() && m_isDirty) {
const QString text(i18n("The view properties of all sub folders will be replaced. Do you want to continue?")); const TQString text(i18n("The view properties of all sub folders will be replaced. Do you want to continue?"));
if (KMessageBox::questionYesNo(this, text) == KMessageBox::No) { if (KMessageBox::questionYesNo(this, text) == KMessageBox::No) {
return; return;
} }

@ -22,10 +22,10 @@
#include <kdialogbase.h> #include <kdialogbase.h>
class QCheckBox; class TQCheckBox;
class QButtonGroup; class TQButtonGroup;
class QComboBox; class TQComboBox;
class QRadioButton; class TQRadioButton;
class ViewProperties; class ViewProperties;
class DolphinView; class DolphinView;
@ -41,6 +41,7 @@ class DolphinView;
class ViewPropertiesDialog : public KDialogBase class ViewPropertiesDialog : public KDialogBase
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
ViewPropertiesDialog(DolphinView* dolphinView); ViewPropertiesDialog(DolphinView* dolphinView);
@ -64,13 +65,13 @@ private:
DolphinView* m_dolphinView; DolphinView* m_dolphinView;
ViewProperties* m_viewProps; ViewProperties* m_viewProps;
QComboBox* m_viewMode; TQComboBox* m_viewMode;
QComboBox* m_sorting; TQComboBox* m_sorting;
QComboBox* m_sortOrder; TQComboBox* m_sortOrder;
QCheckBox* m_showHiddenFiles; TQCheckBox* m_showHiddenFiles;
QRadioButton* m_applyToCurrentFolder; TQRadioButton* m_applyToCurrentFolder;
QRadioButton* m_applyToSubFolders; TQRadioButton* m_applyToSubFolders;
QRadioButton* m_applyToAllFolders; TQRadioButton* m_applyToAllFolders;
void applyViewProperties(); void applyViewProperties();
}; };

@ -19,23 +19,23 @@
***************************************************************************/ ***************************************************************************/
#include "viewsettingspage.h" #include "viewsettingspage.h"
#include <qtabwidget.h> #include <tqtabwidget.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qlabel.h> #include <tqlabel.h>
#include <kdialogbase.h> #include <kdialogbase.h>
#include <klocale.h> #include <klocale.h>
#include "iconsviewsettingspage.h" #include "iconsviewsettingspage.h"
#include "detailsviewsettingspage.h" #include "detailsviewsettingspage.h"
ViewSettingsPage::ViewSettingsPage(QWidget *parent) : ViewSettingsPage::ViewSettingsPage(TQWidget *tqparent) :
SettingsPageBase(parent), SettingsPageBase(tqparent),
m_iconsPage(0), m_iconsPage(0),
m_detailsPage(0), m_detailsPage(0),
m_previewsPage(0) m_previewsPage(0)
{ {
QVBoxLayout* topLayout = new QVBoxLayout(parent, 0, KDialog::spacingHint()); TQVBoxLayout* topLayout = new TQVBoxLayout(tqparent, 0, KDialog::spacingHint());
QTabWidget* tabWidget = new QTabWidget(parent); TQTabWidget* tabWidget = new TQTabWidget(tqparent);
// initialize 'Icons' tab // initialize 'Icons' tab
m_iconsPage = new IconsViewSettingsPage(DolphinIconsView::Icons, tabWidget); m_iconsPage = new IconsViewSettingsPage(DolphinIconsView::Icons, tabWidget);

@ -20,7 +20,7 @@
#ifndef VIEWSETTINGSPAGE_H #ifndef VIEWSETTINGSPAGE_H
#define VIEWSETTINGSPAGE_H #define VIEWSETTINGSPAGE_H
#include <qwidget.h> #include <tqwidget.h>
#include <settingspagebase.h> #include <settingspagebase.h>
class IconsViewSettingsPage; class IconsViewSettingsPage;
@ -37,9 +37,10 @@ class DetailsViewSettingsPage;
class ViewSettingsPage : public SettingsPageBase class ViewSettingsPage : public SettingsPageBase
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
ViewSettingsPage(QWidget* parent); ViewSettingsPage(TQWidget* tqparent);
virtual ~ViewSettingsPage(); virtual ~ViewSettingsPage();

Loading…
Cancel
Save