diff options
Diffstat (limited to 'src')
86 files changed, 1853 insertions, 1821 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index aaa60fd..61ae3b9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -40,11 +40,11 @@ noinst_HEADERS = bookmarkselector.h bookmarkssettingspage.h \ urlbutton.h urlnavigator.h urlnavigatorbutton.h viewproperties.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 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 diff --git a/src/bookmarkselector.cpp b/src/bookmarkselector.cpp index 9a0c3cd..02f5905 100644 --- a/src/bookmarkselector.cpp +++ b/src/bookmarkselector.cpp @@ -20,9 +20,9 @@ #include <assert.h> -#include <qpopupmenu.h> -#include <qpainter.h> -#include <qpixmap.h> +#include <tqpopupmenu.h> +#include <tqpainter.h> +#include <tqpixmap.h> #include <kiconloader.h> #include <kglobalsettings.h> @@ -34,22 +34,22 @@ #include "dolphin.h" #include "urlnavigator.h" -BookmarkSelector::BookmarkSelector(URLNavigator* parent) : - URLButton(parent), +BookmarkSelector::BookmarkSelector(URLNavigator* tqparent) : + URLButton(tqparent), m_selectedIndex(0) { - setFocusPolicy(QWidget::NoFocus); + setFocusPolicy(TQ_NoFocus); - m_bookmarksMenu = new QPopupMenu(this); + m_bookmarksMenu = new TQPopupMenu(this); KBookmarkManager* manager = DolphinSettings::instance().bookmarkManager(); - connect(manager, SIGNAL(changed(const QString&, const QString&)), - this, SLOT(updateBookmarks())); + connect(manager, TQT_SIGNAL(changed(const TQString&, const TQString&)), + this, TQT_SLOT(updateBookmarks())); updateBookmarks(); - connect(m_bookmarksMenu, SIGNAL(activated(int)), - this, SLOT(slotBookmarkActivated(int))); + connect(m_bookmarksMenu, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotBookmarkActivated(int))); setPopup(m_bookmarksMenu); } @@ -70,7 +70,7 @@ void BookmarkSelector::updateBookmarks() bookmark.text(), i); if (i == m_selectedIndex) { - QPixmap pixmap = SmallIcon(bookmark.icon()); + TQPixmap pixmap = SmallIcon(bookmark.icon()); setPixmap(pixmap); setMinimumWidth(pixmap.width() + 2); } @@ -88,8 +88,8 @@ void BookmarkSelector::updateSelection(const KURL& url) int maxLength = 0; m_selectedIndex = -1; - // Search the bookmark which is equal to the URL or at least is a parent URL. - // If there are more than one possible parent URL candidates, choose the bookmark + // Search the bookmark which is equal to the URL or at least is a tqparent URL. + // If there are more than one possible tqparent URL candidates, choose the bookmark // which covers the bigger range of the URL. int i = 0; while (!bookmark.isNull()) { @@ -118,13 +118,13 @@ KBookmark BookmarkSelector::selectedBookmark() const return DolphinSettings::instance().bookmark(m_selectedIndex); } -void BookmarkSelector::drawButton(QPainter* painter) +void BookmarkSelector::drawButton(TQPainter* painter) { const int buttonWidth = width(); const int buttonHeight = height(); - QColor backgroundColor; - QColor foregroundColor; + TQColor backgroundColor; + TQColor foregroundColor; const bool isHighlighted = isDisplayHintEnabled(EnteredHint) || isDisplayHintEnabled(DraggedHint); if (isHighlighted) { @@ -132,17 +132,17 @@ void BookmarkSelector::drawButton(QPainter* painter) foregroundColor = KGlobalSettings::highlightedTextColor(); } else { - backgroundColor = colorGroup().background(); + backgroundColor = tqcolorGroup().background(); foregroundColor = KGlobalSettings::buttonTextColor(); } - // dimm the colors if the parent view does not have the focus - const DolphinView* parentView = urlNavigator()->dolphinView(); + // dimm the colors if the tqparent view does not have the focus + const DolphinView* tqparentView = urlNavigator()->dolphinView(); const Dolphin& dolphin = Dolphin::mainWin(); - const bool isActive = (dolphin.activeView() == parentView); + const bool isActive = (dolphin.activeView() == tqparentView); if (!isActive) { - QColor dimmColor(colorGroup().background()); + TQColor dimmColor(tqcolorGroup().background()); foregroundColor = mixColors(foregroundColor, dimmColor); if (isHighlighted) { backgroundColor = mixColors(backgroundColor, dimmColor); @@ -161,7 +161,7 @@ void BookmarkSelector::drawButton(QPainter* painter) painter->drawRect(0, 0, buttonWidth, buttonHeight); // draw icon - const QPixmap* icon = pixmap(); + const TQPixmap* icon = pixmap(); if (icon != 0) { const int x = (buttonWidth - icon->width()) / 2; const int y = (buttonHeight - icon->height()) / 2; diff --git a/src/bookmarkselector.h b/src/bookmarkselector.h index 9bede96..d56aec2 100644 --- a/src/bookmarkselector.h +++ b/src/bookmarkselector.h @@ -25,7 +25,7 @@ #include <urlbutton.h> class URLNavigator; -class QPopupMenu; +class TQPopupMenu; class KURL; /** @@ -40,21 +40,22 @@ class KURL; class BookmarkSelector : public URLButton { Q_OBJECT + TQ_OBJECT public: /** - * @param parent Parent widget where the bookmark selector + * @param tqparent Parent widget where the bookmark selector * is embedded into. */ - BookmarkSelector(URLNavigator* parent); + BookmarkSelector(URLNavigator* tqparent); virtual ~BookmarkSelector(); /** * Updates the selection dependent from the given URL \a url. The * URL must not match exactly to one of the available bookmarks: - * The bookmark which is equal to the URL or at least is a parent URL - * is selected. If there are more than one possible parent URL candidates, + * The bookmark which is equal to the URL or at least is a tqparent URL + * is selected. If there are more than one possible tqparent URL candidates, * the bookmark which covers the bigger range of the URL is selected. */ void updateSelection(const KURL& url); @@ -80,7 +81,7 @@ protected: * Draws the icon of the selected URL as content of the URL * selector. */ - virtual void drawButton(QPainter* painter); + virtual void drawButton(TQPainter* painter); private slots: /** @@ -92,7 +93,7 @@ private slots: private: int m_selectedIndex; - QPopupMenu* m_bookmarksMenu; + TQPopupMenu* m_bookmarksMenu; }; #endif diff --git a/src/bookmarkssettingspage.cpp b/src/bookmarkssettingspage.cpp index 5b615f8..379f186 100644 --- a/src/bookmarkssettingspage.cpp +++ b/src/bookmarkssettingspage.cpp @@ -22,10 +22,10 @@ #include <assert.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qvbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqvbox.h> #include <kbookmark.h> #include <kbookmarkmanager.h> @@ -37,70 +37,70 @@ #include "dolphinsettings.h" #include "editbookmarkdialog.h" -BookmarksSettingsPage::BookmarksSettingsPage(QWidget*parent) : - SettingsPageBase(parent), +BookmarksSettingsPage::BookmarksSettingsPage(TQWidget*tqparent) : + SettingsPageBase(tqparent), m_addButton(0), m_removeButton(0), m_moveUpButton(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(); - QHBox* hBox = new QHBox(parent); - hBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + TQHBox* hBox = new TQHBox(tqparent); + hBox->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); hBox->setSpacing(spacing); - hBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Ignored); + hBox->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Ignored); m_listView = new KListView(hBox); m_listView->addColumn(i18n("Icon")); m_listView->addColumn(i18n("Name")); m_listView->addColumn(i18n("Location")); - m_listView->setResizeMode(QListView::LastColumn); - m_listView->setColumnAlignment(0, Qt::AlignHCenter); + m_listView->setResizeMode(TQListView::LastColumn); + m_listView->setColumnAlignment(0, TQt::AlignHCenter); m_listView->setAllColumnsShowFocus(true); m_listView->setSorting(-1); - connect(m_listView, SIGNAL(selectionChanged()), - this, SLOT(updateButtons())); - connect(m_listView, SIGNAL(pressed(QListViewItem*)), - this, SLOT(slotBookmarkPressed(QListViewItem*))); - connect(m_listView, SIGNAL(doubleClicked(QListViewItem*, const QPoint&, int)), - this, SLOT(slotBookmarkDoubleClicked(QListViewItem*, const QPoint&, int))); - - QVBox* buttonBox = new QVBox(hBox); + connect(m_listView, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(updateButtons())); + connect(m_listView, TQT_SIGNAL(pressed(TQListViewItem*)), + this, TQT_SLOT(slotBookmarkPressed(TQListViewItem*))); + connect(m_listView, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint&, int)), + this, TQT_SLOT(slotBookmarkDoubleClicked(TQListViewItem*, const TQPoint&, int))); + + TQVBox* buttonBox = new TQVBox(hBox); buttonBox->setSpacing(spacing); - const QSizePolicy buttonSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); + const TQSizePolicy buttonSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Maximum); m_addButton = new KPushButton(i18n("Add..."), buttonBox); - connect(m_addButton, SIGNAL(clicked()), - this, SLOT(slotAddButtonClicked())); - m_addButton->setSizePolicy(buttonSizePolicy); + connect(m_addButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddButtonClicked())); + m_addButton->tqsetSizePolicy(buttonSizePolicy); m_editButton = new KPushButton(i18n("Edit..."), buttonBox); - connect(m_editButton, SIGNAL(clicked()), - this, SLOT(slotEditButtonClicked())); - m_editButton->setSizePolicy(buttonSizePolicy); + connect(m_editButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotEditButtonClicked())); + m_editButton->tqsetSizePolicy(buttonSizePolicy); m_removeButton = new KPushButton(i18n("Remove"), buttonBox); - connect(m_removeButton, SIGNAL(clicked()), - this, SLOT(slotRemoveButtonClicked())); - m_removeButton->setSizePolicy(buttonSizePolicy); + connect(m_removeButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRemoveButtonClicked())); + m_removeButton->tqsetSizePolicy(buttonSizePolicy); m_moveUpButton = new KPushButton(i18n("Move Up"), buttonBox); - connect(m_moveUpButton, SIGNAL(clicked()), - this, SLOT(slotMoveUpButtonClicked())); - m_moveUpButton->setSizePolicy(buttonSizePolicy); + connect(m_moveUpButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotMoveUpButtonClicked())); + m_moveUpButton->tqsetSizePolicy(buttonSizePolicy); m_moveDownButton = new KPushButton(i18n("Move Down"), buttonBox); - connect(m_moveDownButton, SIGNAL(clicked()), - this, SLOT(slotMoveDownButtonClicked())); - m_moveDownButton->setSizePolicy(buttonSizePolicy); + connect(m_moveDownButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotMoveDownButtonClicked())); + m_moveDownButton->tqsetSizePolicy(buttonSizePolicy); // Add a dummy widget with no restriction regarding a vertical resizing. // This assures that the spacing between the buttons is not increased. - new QWidget(buttonBox); + new TQWidget(buttonBox); topLayout->addWidget(hBox); @@ -108,9 +108,9 @@ BookmarksSettingsPage::BookmarksSettingsPage(QWidget*parent) : KBookmarkGroup root = DolphinSettings::instance().bookmarkManager()->root(); KBookmark bookmark = root.first(); - QListViewItem* prev = 0; + TQListViewItem* prev = 0; while (!bookmark.isNull()) { - QListViewItem* item = new QListViewItem(m_listView); + TQListViewItem* item = new TQListViewItem(m_listView); item->setPixmap(PixmapIdx, SmallIcon(bookmark.icon())); item->setText(NameIdx, bookmark.text()); item->setText(URLIdx, bookmark.url().prettyURL()); @@ -148,7 +148,7 @@ void BookmarksSettingsPage::applySettings() } // add all items as bookmarks - QListViewItem* item = m_listView->firstChild(); + TQListViewItem* item = m_listView->firstChild(); while (item != 0) { root.addBookmark(manager, item->text(NameIdx), @@ -162,7 +162,7 @@ void BookmarksSettingsPage::applySettings() void BookmarksSettingsPage::updateButtons() { - const QListViewItem* selectedItem = m_listView->selectedItem(); + const TQListViewItem* selectedItem = m_listView->selectedItem(); const bool hasSelection = (selectedItem != 0); m_editButton->setEnabled(hasSelection); @@ -177,14 +177,14 @@ void BookmarksSettingsPage::updateButtons() m_moveDownButton->setEnabled(enableMoveDown); } -void BookmarksSettingsPage::slotBookmarkDoubleClicked(QListViewItem*, - const QPoint&, +void BookmarksSettingsPage::slotBookmarkDoubleClicked(TQListViewItem*, + const TQPoint&, int) { slotEditButtonClicked(); } -void BookmarksSettingsPage::slotBookmarkPressed(QListViewItem* item) +void BookmarksSettingsPage::slotBookmarkPressed(TQListViewItem* item) { if (item == 0) { m_listView->setSelected(m_listView->currentItem(), true); @@ -199,14 +199,14 @@ void BookmarksSettingsPage::slotAddButtonClicked() "bookmark"); if (!bookmark.isNull()) { // insert bookmark into listview - QListViewItem* item = new QListViewItem(m_listView); + TQListViewItem* item = new TQListViewItem(m_listView); item->setPixmap(PixmapIdx, SmallIcon(bookmark.icon())); item->setText(NameIdx, bookmark.text()); item->setText(URLIdx, bookmark.url().prettyURL()); item->setText(IconIdx, bookmark.icon()); m_listView->insertItem(item); - QListViewItem* lastItem = m_listView->lastChild(); + TQListViewItem* lastItem = m_listView->lastChild(); if (lastItem != 0) { item->moveItem(lastItem); } @@ -218,7 +218,7 @@ void BookmarksSettingsPage::slotAddButtonClicked() 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 KBookmark bookmark = EditBookmarkDialog::getBookmark(i18n("Edit Bookmark"), @@ -235,9 +235,9 @@ void BookmarksSettingsPage::slotEditButtonClicked() void BookmarksSettingsPage::slotRemoveButtonClicked() { - QListViewItem* selectedItem = m_listView->selectedItem(); + TQListViewItem* selectedItem = m_listView->selectedItem(); assert(selectedItem != 0); - QListViewItem* nextItem = selectedItem->itemBelow(); + TQListViewItem* nextItem = selectedItem->itemBelow(); if (nextItem == 0) { nextItem = selectedItem->itemAbove(); } @@ -262,10 +262,10 @@ int BookmarksSettingsPage::selectedBookmarkIndex() const { int index = -1; - QListViewItem* selectedItem = m_listView->selectedItem(); + TQListViewItem* selectedItem = m_listView->selectedItem(); if (selectedItem != 0) { index = 0; - QListViewItem* item = m_listView->firstChild(); + TQListViewItem* item = m_listView->firstChild(); while (item != selectedItem) { item = item->nextSibling(); ++index; @@ -282,19 +282,19 @@ void BookmarksSettingsPage::moveBookmark(int direction) assert((direction >= -1) && (direction <= +1)); // swap bookmarks in listview - QListViewItem* selectedItem = m_listView->selectedItem(); + TQListViewItem* selectedItem = m_listView->selectedItem(); assert(selectedItem != 0); - QListViewItem* item = (direction < 0) ? selectedItem->itemAbove() : + TQListViewItem* item = (direction < 0) ? selectedItem->itemAbove() : selectedItem->itemBelow(); assert(item != 0); - QPixmap pixmap; + TQPixmap pixmap; if (item->pixmap(0) != 0) { pixmap = *(item->pixmap(0)); } - QString name(item->text(NameIdx)); - QString url(item->text(URLIdx)); - QString icon(item->text(IconIdx)); + TQString name(item->text(NameIdx)); + TQString url(item->text(URLIdx)); + TQString icon(item->text(IconIdx)); if (selectedItem->pixmap(0) != 0) { item->setPixmap(PixmapIdx, *(selectedItem->pixmap(0))); diff --git a/src/bookmarkssettingspage.h b/src/bookmarkssettingspage.h index 89f3752..8a292ad 100644 --- a/src/bookmarkssettingspage.h +++ b/src/bookmarkssettingspage.h @@ -22,11 +22,11 @@ #define BOOKMARKSSETTINGSPAGE_H #include <settingspagebase.h> -#include <qvaluelist.h> +#include <tqvaluelist.h> class KListView; class KPushButton; -class QListViewItem; +class TQListViewItem; /** * @brief Represents the page from the Dolphin Settings which allows @@ -35,9 +35,10 @@ class QListViewItem; class BookmarksSettingsPage : public SettingsPageBase { Q_OBJECT + TQ_OBJECT public: - BookmarksSettingsPage(QWidget* parent); + BookmarksSettingsPage(TQWidget* tqparent); virtual ~BookmarksSettingsPage(); @@ -46,7 +47,7 @@ public: private slots: void updateButtons(); - void slotBookmarkDoubleClicked(QListViewItem*, const QPoint&, int); + void slotBookmarkDoubleClicked(TQListViewItem*, const TQPoint&, int); void slotAddButtonClicked(); void slotEditButtonClicked(); void slotRemoveButtonClicked(); @@ -54,13 +55,13 @@ private slots: 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 * click has been done on the viewport area. * TODO: this is a workaround, possibly there is a more easy approach * doing this... */ - void slotBookmarkPressed(QListViewItem* item); + void slotBookmarkPressed(TQListViewItem* item); private: enum ColumnIndex { diff --git a/src/bookmarkssidebarpage.cpp b/src/bookmarkssidebarpage.cpp index 4c32540..7ffa321 100644 --- a/src/bookmarkssidebarpage.cpp +++ b/src/bookmarkssidebarpage.cpp @@ -19,11 +19,11 @@ #include "bookmarkssidebarpage.h" -#include <qlistbox.h> -#include <qlayout.h> -#include <qpainter.h> +#include <tqlistbox.h> +#include <tqlayout.h> +#include <tqpainter.h> #include <assert.h> -#include <qpopupmenu.h> +#include <tqpopupmenu.h> #include <kbookmarkmanager.h> #include <kmessagebox.h> @@ -35,22 +35,22 @@ #include "dolphinview.h" #include "editbookmarkdialog.h" -BookmarksSidebarPage::BookmarksSidebarPage(QWidget* parent) : - SidebarPage(parent) +BookmarksSidebarPage::BookmarksSidebarPage(TQWidget* tqparent) : + SidebarPage(tqparent) { - QVBoxLayout* layout = new QVBoxLayout(this); + TQVBoxLayout* tqlayout = new TQVBoxLayout(this); m_bookmarksList = new BookmarksListBox(this); - m_bookmarksList->setPaletteBackgroundColor(colorGroup().background()); + m_bookmarksList->setPaletteBackgroundColor(tqcolorGroup().background()); - layout->addWidget(m_bookmarksList); - connect(m_bookmarksList, SIGNAL(mouseButtonClicked(int, QListBoxItem*, const QPoint&)), - this, SLOT(slotMouseButtonClicked(int, QListBoxItem*))); - connect(m_bookmarksList, SIGNAL(contextMenuRequested(QListBoxItem*, const QPoint&)), - this, SLOT(slotContextMenuRequested(QListBoxItem*, const QPoint&))); + tqlayout->addWidget(m_bookmarksList); + connect(m_bookmarksList, TQT_SIGNAL(mouseButtonClicked(int, TQListBoxItem*, const TQPoint&)), + this, TQT_SLOT(slotMouseButtonClicked(int, TQListBoxItem*))); + connect(m_bookmarksList, TQT_SIGNAL(contextMenuRequested(TQListBoxItem*, const TQPoint&)), + this, TQT_SLOT(slotContextMenuRequested(TQListBoxItem*, const TQPoint&))); KBookmarkManager* manager = DolphinSettings::instance().bookmarkManager(); - connect(manager, SIGNAL(changed(const QString&, const QString&)), - this, SLOT(updateBookmarks())); + connect(manager, TQT_SIGNAL(changed(const TQString&, const TQString&)), + this, TQT_SLOT(updateBookmarks())); updateBookmarks(); } @@ -81,7 +81,7 @@ void BookmarksSidebarPage::updateBookmarks() connectToActiveView(); } -void BookmarksSidebarPage::slotMouseButtonClicked(int button, QListBoxItem* item) +void BookmarksSidebarPage::slotMouseButtonClicked(int button, TQListBoxItem* item) { if ((button != Qt::LeftButton) || (item == 0)) { return; @@ -92,15 +92,15 @@ void BookmarksSidebarPage::slotMouseButtonClicked(int button, QListBoxItem* item Dolphin::mainWin().activeView()->setURL(bookmark.url()); } -void BookmarksSidebarPage::slotContextMenuRequested(QListBoxItem* item, - const QPoint& pos) +void BookmarksSidebarPage::slotContextMenuRequested(TQListBoxItem* item, + const TQPoint& pos) { const int insertID = 1; const int editID = 2; const int deleteID = 3; const int addID = 4; - QPopupMenu* popup = new QPopupMenu(); + TQPopupMenu* popup = new TQPopupMenu(); if (item == 0) { popup->insertItem(SmallIcon("filenew"), i18n("Add Bookmark..."), addID); } @@ -194,8 +194,8 @@ void BookmarksSidebarPage::adjustSelection(const KURL& url) int maxLength = 0; int selectedIndex = -1; - // Search the bookmark which is equal to the URL or at least is a parent URL. - // If there are more than one possible parent URL candidates, choose the bookmark + // Search the bookmark which is equal to the URL or at least is a tqparent URL. + // If there are more than one possible tqparent URL candidates, choose the bookmark // which covers the bigger range of the URL. int i = 0; while (!bookmark.isNull()) { @@ -234,12 +234,12 @@ void BookmarksSidebarPage::connectToActiveView() { DolphinView* view = Dolphin::mainWin().activeView(); adjustSelection(view->url()); - connect(view, SIGNAL(signalURLChanged(const KURL&)), - this, SLOT(slotURLChanged(const KURL&))); + connect(view, TQT_SIGNAL(signalURLChanged(const KURL&)), + this, TQT_SLOT(slotURLChanged(const KURL&))); } -BookmarksListBox::BookmarksListBox(QWidget* parent) : - QListBox(parent) +BookmarksListBox::BookmarksListBox(TQWidget* tqparent) : + TQListBox(tqparent) { 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 } -void BookmarksListBox::contentsMousePressEvent(QMouseEvent *event) +void BookmarksListBox::contentsMousePressEvent(TQMouseEvent *event) { - if (event->button() == LeftButton) + if (event->button() == Qt::LeftButton) 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(); - if (distance > QApplication::startDragDistance()) + if (distance > TQApplication::startDragDistance()) startDrag(); } - QListBox::contentsMouseMoveEvent(event); + TQListBox::contentsMouseMoveEvent(event); } void BookmarksListBox::startDrag() { - int currentItem = QListBox::currentItem(); + int currentItem = TQListBox::currentItem(); if (currentItem != -1) { BookmarkItem* bookmark = (BookmarkItem*)item(currentItem); 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)); } -void BookmarksListBox::dropEvent( QDropEvent *event ) +void BookmarksListBox::dropEvent( TQDropEvent *event ) { KURL::List urls; 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) : - QListBoxPixmap(pixmap, text), +BookmarkItem::BookmarkItem(const TQPixmap& pixmap, const TQString& text, const KURL& url) : + TQListBoxPixmap(pixmap, text), 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 @@ -326,7 +326,7 @@ const KURL& BookmarkItem::url() const 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()); } diff --git a/src/bookmarkssidebarpage.h b/src/bookmarkssidebarpage.h index 7941fd6..20ef4c9 100644 --- a/src/bookmarkssidebarpage.h +++ b/src/bookmarkssidebarpage.h @@ -20,7 +20,7 @@ #define _BOOKMARKSSIDEBARPAGE_H_ #include <sidebarpage.h> -#include <qlistbox.h> +#include <tqlistbox.h> #include <kurl.h> #include <kbookmark.h> #include <kiconloader.h> @@ -38,9 +38,10 @@ class BookmarksListBox; class BookmarksSidebarPage : public SidebarPage { Q_OBJECT + TQ_OBJECT public: - BookmarksSidebarPage(QWidget* parent); + BookmarksSidebarPage(TQWidget* tqparent); virtual ~BookmarksSidebarPage(); protected: @@ -55,10 +56,10 @@ private slots: * Checks whether the left mouse button has been clicked above a bookmark. * If this is the case, the URL for the currently active view is adjusted. */ - void slotMouseButtonClicked(int button, QListBoxItem* item); + void slotMouseButtonClicked(int button, TQListBoxItem* item); - /** @see QListBox::slotContextMenuRequested */ - void slotContextMenuRequested(QListBoxItem* item, const QPoint& pos); + /** @see TQListBox::slotContextMenuRequested */ + void slotContextMenuRequested(TQListBoxItem* item, const TQPoint& pos); /** * 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 * URL must not match exactly to one of the available bookmarks: - * The bookmark which is equal to the URL or at least is a parent URL - * is selected. If there are more than one possible parent URL candidates, + * The bookmark which is equal to the URL or at least is a tqparent URL + * is selected. If there are more than one possible tqparent URL candidates, * the bookmark which covers the bigger range of the URL is selected. */ void adjustSelection(const KURL& url); @@ -88,30 +89,31 @@ private: /** * @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. */ -class BookmarksListBox : public QListBox +class BookmarksListBox : public TQListBox { Q_OBJECT + TQ_OBJECT public: - BookmarksListBox(QWidget* parent); + BookmarksListBox(TQWidget* tqparent); virtual ~BookmarksListBox(); protected: //drag - void contentsMousePressEvent(QMouseEvent *event); - void contentsMouseMoveEvent(QMouseEvent *event); + void contentsMousePressEvent(TQMouseEvent *event); + void contentsMouseMoveEvent(TQMouseEvent *event); //drop - void dragEnterEvent( QDragEnterEvent *evt ); - void dropEvent( QDropEvent *evt ); -// void mousePressEvent( QMouseEvent *evt ); -// void mouseMoveEvent( QMouseEvent * ); - /** @see QWidget::paintEvent() */ - virtual void paintEvent(QPaintEvent* event); + void dragEnterEvent( TQDragEnterEvent *evt ); + void dropEvent( TQDropEvent *evt ); +// void mousePressEvent( TQMouseEvent *evt ); +// void mouseMoveEvent( TQMouseEvent * ); + /** @see TQWidget::paintEvent() */ + virtual void paintEvent(TQPaintEvent* event); private: - QPoint dragPos; + TQPoint dragPos; void startDrag(); }; @@ -119,15 +121,15 @@ private: /** * @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. */ -class BookmarkItem : public QListBoxPixmap +class BookmarkItem : public TQListBoxPixmap { public: - BookmarkItem(const QPixmap& pixmap, const QString& text, const KURL& url); + BookmarkItem(const TQPixmap& pixmap, const TQString& text, const KURL& url); virtual ~BookmarkItem(); - virtual int height(const QListBox* listBox) const; + virtual int height(const TQListBox* listBox) const; const KURL& url() const; static BookmarkItem* fromKbookmark(const KBookmark& bookmark, const KIconLoader& iconLoader); diff --git a/src/detailsviewsettingspage.cpp b/src/detailsviewsettingspage.cpp index b8c4d97..c1300be 100644 --- a/src/detailsviewsettingspage.cpp +++ b/src/detailsviewsettingspage.cpp @@ -19,25 +19,25 @@ ***************************************************************************/ #include "detailsviewsettingspage.h" -#include <qcheckbox.h> +#include <tqcheckbox.h> #include <klocale.h> #include <kdialog.h> #include <kfontcombo.h> -#include <qspinbox.h> -#include <qlabel.h> -#include <qgrid.h> +#include <tqspinbox.h> +#include <tqlabel.h> +#include <tqgrid.h> #include <assert.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qcombobox.h> -#include <qgroupbox.h> -#include <qgroupbox.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqcombobox.h> +#include <tqgroupbox.h> +#include <tqgroupbox.h> #include "dolphinsettings.h" #include "dolphindetailsviewsettings.h" #include "dolphindetailsview.h" -DetailsViewSettingsPage::DetailsViewSettingsPage(QWidget *parent) : - QVBox(parent), +DetailsViewSettingsPage::DetailsViewSettingsPage(TQWidget *tqparent) : + TQVBox(tqparent), m_dateBox(0), m_permissionsBox(0), m_ownerBox(0), @@ -48,7 +48,7 @@ DetailsViewSettingsPage::DetailsViewSettingsPage(QWidget *parent) : { const int spacing = KDialog::spacingHint(); const int margin = KDialog::marginHint(); - const QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + const TQSizePolicy sizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); setSpacing(spacing); setMargin(margin); @@ -57,30 +57,30 @@ DetailsViewSettingsPage::DetailsViewSettingsPage(QWidget *parent) : assert(settings != 0); // create "Columns" properties - QGroupBox* columnsGroup = new QGroupBox(4, Qt::Vertical, i18n("Columns"), this); - columnsGroup->setSizePolicy(sizePolicy); + TQGroupBox* columnsGroup = new TQGroupBox(4, Qt::Vertical, i18n("Columns"), this); + columnsGroup->tqsetSizePolicy(sizePolicy); columnsGroup->setMargin(margin); - QHBox* visibleColumnsLayout = new QHBox(columnsGroup); - m_dateBox = new QCheckBox(i18n("Date"), visibleColumnsLayout); + TQHBox* visibleColumnsLayout = new TQHBox(columnsGroup); + m_dateBox = new TQCheckBox(i18n("Date"), visibleColumnsLayout); 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_ownerBox = new QCheckBox(i18n("Owner"), visibleColumnsLayout); + m_ownerBox = new TQCheckBox(i18n("Owner"), visibleColumnsLayout); 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)); // Create "Icon" properties - QButtonGroup* iconSizeGroup = new QButtonGroup(3, Qt::Horizontal, i18n("Icon Size"), this); - iconSizeGroup->setSizePolicy(sizePolicy); + TQButtonGroup* iconSizeGroup = new TQButtonGroup(3, Qt::Horizontal, i18n("Icon Size"), this); + iconSizeGroup->tqsetSizePolicy(sizePolicy); iconSizeGroup->setMargin(margin); - m_smallIconSize = new QRadioButton(i18n("Small"), iconSizeGroup); - m_mediumIconSize = new QRadioButton(i18n("Medium"), iconSizeGroup); - m_largeIconSize = new QRadioButton(i18n("Large"), iconSizeGroup); + m_smallIconSize = new TQRadioButton(i18n("Small"), iconSizeGroup); + m_mediumIconSize = new TQRadioButton(i18n("Medium"), iconSizeGroup); + m_largeIconSize = new TQRadioButton(i18n("Large"), iconSizeGroup); switch (settings->iconSize()) { case KIcon::SizeLarge: m_largeIconSize->setChecked(true); @@ -95,29 +95,29 @@ DetailsViewSettingsPage::DetailsViewSettingsPage(QWidget *parent) : m_smallIconSize->setChecked(true); } - //new QLabel(i18n("Icon size:"), iconGroup); - //m_iconSizeBox = new QComboBox(iconGroup); + //new TQLabel(i18n("Icon size:"), iconGroup); + //m_iconSizeBox = new TQComboBox(iconGroup); //m_iconSizeBox->insertItem(i18n("Small")); //m_iconSizeBox->insertItem(i18n("Medium")); //m_iconSizeBox->insertItem(i18n("Large")); // create "Text" properties - QGroupBox* textGroup = new QGroupBox(2, Qt::Horizontal, i18n("Text"), this); - textGroup->setSizePolicy(sizePolicy); + TQGroupBox* textGroup = new TQGroupBox(2, Qt::Horizontal, i18n("Text"), this); + textGroup->tqsetSizePolicy(sizePolicy); textGroup->setMargin(margin); - new QLabel(i18n("Font family:"), textGroup); + new TQLabel(i18n("Font family:"), textGroup); m_fontFamilyBox = new KFontCombo(textGroup); m_fontFamilyBox->setCurrentFont(settings->fontFamily()); - new QLabel(i18n("Font size:"), textGroup); - m_fontSizeBox = new QSpinBox(6, 99, 1, textGroup); + new TQLabel(i18n("Font size:"), textGroup); + m_fontSizeBox = new TQSpinBox(6, 99, 1, textGroup); m_fontSizeBox->setValue(settings->fontSize()); // 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. - new QWidget(this); + new TQWidget(this); } diff --git a/src/detailsviewsettingspage.h b/src/detailsviewsettingspage.h index c9bde55..2c32520 100644 --- a/src/detailsviewsettingspage.h +++ b/src/detailsviewsettingspage.h @@ -21,12 +21,12 @@ #ifndef DETAILSVIEWSETTINGSPAGE_H #define DETAILSVIEWSETTINGSPAGE_H -#include <qvbox.h> -class QCheckBox; +#include <tqvbox.h> +class TQCheckBox; class KFontCombo; -class QSpinBox; -class QComboBox; -class QRadioButton; +class TQSpinBox; +class TQComboBox; +class TQRadioButton; /** * @brief Represents the page from the Dolphin Settings which allows @@ -34,12 +34,13 @@ class QRadioButton; * * @author Peter Penz <[email protected]> */ -class DetailsViewSettingsPage : public QVBox +class DetailsViewSettingsPage : public TQVBox { Q_OBJECT + TQ_OBJECT public: - DetailsViewSettingsPage(QWidget* parent); + DetailsViewSettingsPage(TQWidget* tqparent); virtual ~DetailsViewSettingsPage(); /** @@ -50,16 +51,16 @@ public: void applySettings(); private: - QCheckBox* m_dateBox; - QCheckBox* m_permissionsBox; - QCheckBox* m_ownerBox; - QCheckBox* m_groupBox; - QRadioButton* m_smallIconSize; - QRadioButton* m_mediumIconSize; - QRadioButton* m_largeIconSize; + TQCheckBox* m_dateBox; + TQCheckBox* m_permissionsBox; + TQCheckBox* m_ownerBox; + TQCheckBox* m_groupBox; + TQRadioButton* m_smallIconSize; + TQRadioButton* m_mediumIconSize; + TQRadioButton* m_largeIconSize; KFontCombo* m_fontFamilyBox; - QSpinBox* m_fontSizeBox; + TQSpinBox* m_fontSizeBox; }; #endif diff --git a/src/dolphin.cpp b/src/dolphin.cpp index 0e81b6b..2b8ddb8 100644 --- a/src/dolphin.cpp +++ b/src/dolphin.cpp @@ -52,8 +52,8 @@ #include <kstandarddirs.h> #include <krun.h> -#include <qclipboard.h> -#include <qdragobject.h> +#include <tqclipboard.h> +#include <tqdragobject.h> #include "urlnavigator.h" #include "viewpropertiesdialog.h" @@ -132,7 +132,7 @@ void Dolphin::dropURLs(const KURL::List& urls, popup.insertItem(SmallIcon("stop"), i18n("Cancel"), 3); popup.setAccel(i18n("Escape"), 3); - selectedIndex = popup.exec(QCursor::pos()); + selectedIndex = popup.exec(TQCursor::pos()); } 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")); - const bool sortDescending = (order == Qt::Descending); + const bool sortDescending = (order == TQt::Descending); descending->setChecked(sortDescending); } @@ -292,7 +292,7 @@ void Dolphin::slotSelectionChanged() emit selectionChanged(); } -void Dolphin::closeEvent(QCloseEvent* event) +void Dolphin::closeEvent(TQCloseEvent* event) { KConfig* config = kapp->config(); config->setGroup("General"); @@ -363,8 +363,8 @@ void Dolphin::createFolder() DolphinStatusBar* statusBar = m_activeView->statusBar(); const KURL baseURL(m_activeView->url()); - QString name(i18n("New Folder")); - if (baseURL.isLocalFile() && QFileInfo(baseURL.path(+1) + name).exists()) { + TQString name(i18n("New Folder")); + if (baseURL.isLocalFile() && TQFileInfo(baseURL.path(+1) + name).exists()) { name = KIO::RenameDlg::suggestName(baseURL, i18n("New Folder")); } @@ -395,7 +395,7 @@ void Dolphin::createFolder() // TODO: provide message type hint if (ok) { - statusBar->setMessage(i18n("Created folder %1.").arg(url.path()), + statusBar->setMessage(i18n("Created folder %1.").tqarg(url.path()), DolphinStatusBar::OperationCompleted); 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 // has been failed because a folder with the same name exists... 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); } 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); } @@ -426,12 +426,12 @@ void Dolphin::createFile() 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. - KSortableValueList<CreateFileEntry, QString>::ConstIterator it = m_createFileTemplates.begin(); - KSortableValueList<CreateFileEntry, QString>::ConstIterator end = m_createFileTemplates.end(); + KSortableValueList<CreateFileEntry, TQString>::ConstIterator it = m_createFileTemplates.begin(); + KSortableValueList<CreateFileEntry, TQString>::ConstIterator end = m_createFileTemplates.end(); - const QString senderName(sender()->name()); + const TQString senderName(TQT_TQOBJECT(sender())->name()); bool found = false; CreateFileEntry entry; while (!found && (it != end)) { @@ -445,30 +445,30 @@ void Dolphin::createFile() } 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); return; } // Get the source path of the template which should be copied. // The source path is part of the URL entry of the desktop file. - const int pos = entry.templatePath.findRev('/'); - QString sourcePath(entry.templatePath.left(pos + 1)); + const int pos = entry.templatePath.tqfindRev('/'); + TQString sourcePath(entry.templatePath.left(pos + 1)); 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 // 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 - 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 // a unique file name (e. g. "HTML File" will be replaced by "HTML File_1"). const KURL viewURL(m_activeView->url()); const bool fileExists = viewURL.isLocalFile() && - QFileInfo(viewURL.path(+1) + KIO::encodeFileName(name)).exists(); + TQFileInfo(viewURL.path(+1) + KIO::encodeFileName(name)).exists(); if (fileExists) { 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 // 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); 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); return; } @@ -500,7 +500,7 @@ void Dolphin::createFile() KIO::CopyJob* job = KIO::copyAs(sourceURL, destURL); job->setDefaultPermissions(true); if (KIO::NetAccess::synchronousRun(job, this)) { - statusBar->setMessage(i18n("Created file %1.").arg(name), + statusBar->setMessage(i18n("Created file %1.").tqarg(name), DolphinStatusBar::OperationCompleted); KURL::List list; @@ -510,7 +510,7 @@ void Dolphin::createFile() } else { - statusBar->setMessage(i18n("Creating of file %1 failed.").arg(name), + statusBar->setMessage(i18n("Creating of file %1 failed.").tqarg(name), DolphinStatusBar::Error); } } @@ -537,26 +537,26 @@ void Dolphin::deleteItems() const uint itemCount = list.count(); assert(itemCount >= 1); - QString text; + TQString text; 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 { 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, text, - QString::null, + TQString(), KGuiItem(i18n("Delete"), SmallIcon("editdelete")) ) == KMessageBox::Continue; if (del) { KIO::Job* job = KIO::del(list); - connect(job, SIGNAL(result(KIO::Job*)), - this, SLOT(slotHandleJobError(KIO::Job*))); - connect(job, SIGNAL(result(KIO::Job*)), - this, SLOT(slotDeleteFileFinished(KIO::Job*))); + connect(job, TQT_SIGNAL(result(KIO::Job*)), + this, TQT_SLOT(slotHandleJobError(KIO::Job*))); + connect(job, TQT_SIGNAL(result(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)); 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)); if (redoAction != 0) { @@ -640,23 +640,23 @@ void Dolphin::slotRedoTextChanged(const QString& text) void Dolphin::cut() { m_clipboardContainsCutData = true; - QDragObject* data = new KURLDrag(m_activeView->selectedURLs(), + TQDragObject* data = new KURLDrag(m_activeView->selectedURLs(), widget()); - QApplication::clipboard()->setData(data); + TQApplication::tqclipboard()->setData(data); } void Dolphin::copy() { m_clipboardContainsCutData = false; - QDragObject* data = new KURLDrag(m_activeView->selectedURLs(), + TQDragObject* data = new KURLDrag(m_activeView->selectedURLs(), widget()); - QApplication::clipboard()->setData(data); + TQApplication::tqclipboard()->setData(data); } void Dolphin::paste() { - QClipboard* clipboard = QApplication::clipboard(); - QMimeSource* data = clipboard->data(); + TQClipboard* clipboard = TQApplication::tqclipboard(); + TQMimeSource* data = clipboard->data(); if (!KURLDrag::canDecode(data)) { return; } @@ -702,9 +702,9 @@ void Dolphin::updatePasteAction() return; } - QString text(i18n("Paste")); - QClipboard* clipboard = QApplication::clipboard(); - QMimeSource* data = clipboard->data(); + TQString text(i18n("Paste")); + TQClipboard* clipboard = TQApplication::tqclipboard(); + TQMimeSource* data = clipboard->data(); if (KURLDrag::canDecode(data)) { pasteAction->setEnabled(true); @@ -715,7 +715,7 @@ void Dolphin::updatePasteAction() pasteAction->setText(i18n("Paste 1 File")); } else { - pasteAction->setText(i18n("Paste %1 Files").arg(count)); + pasteAction->setText(i18n("Paste %1 Files").tqarg(count)); } } else { @@ -786,9 +786,9 @@ void Dolphin::sortByDate() void Dolphin::toggleSortOrder() { - const Qt::SortOrder order = (m_activeView->sortOrder() == Qt::Ascending) ? - Qt::Descending : - Qt::Ascending; + const TQt::SortOrder order = (m_activeView->sortOrder() == TQt::Ascending) ? + TQt::Descending : + TQt::Ascending; m_activeView->setSortOrder(order); } @@ -803,7 +803,7 @@ void Dolphin::toggleSplitView() m_view[PrimaryIdx]->mode(), m_view[PrimaryIdx]->isShowHiddenFilesEnabled()); - QValueList<int> list = m_splitter->sizes(); + TQValueList<int> list = m_splitter->sizes(); assert(!list.isEmpty()); list.pop_back(); list.append(newWidth); @@ -922,7 +922,7 @@ void Dolphin::goHome() void Dolphin::openTerminal() { - QString command("konsole --workdir \""); + TQString command("konsole --workdir \""); command.append(m_activeView->url().path()); command.append('\"'); @@ -931,7 +931,7 @@ void Dolphin::openTerminal() void Dolphin::findFile() { - KRun::run("kfind", m_activeView->url()); + KRun::run("ktqfind", m_activeView->url()); } void Dolphin::compareFiles() @@ -980,7 +980,7 @@ void Dolphin::compareFiles() } } - QString command("kompare -c \""); + TQString command("kompare -c \""); command.append(urlA.prettyURL()); command.append("\" \""); command.append(urlB.prettyURL()); @@ -1005,8 +1005,8 @@ void Dolphin::addUndoOperation(KIO::Job* job) const int id = job->progressId(); // set iterator to the executed command with the current id... - QValueList<UndoInfo>::Iterator it = m_pendingUndoJobs.begin(); - const QValueList<UndoInfo>::Iterator end = m_pendingUndoJobs.end(); + TQValueList<UndoInfo>::Iterator it = m_pendingUndoJobs.begin(); + const TQValueList<UndoInfo>::Iterator end = m_pendingUndoJobs.end(); bool found = false; while (!found && (it != end)) { 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 // a file "test.txt" and a second file "test.txt" to the trash, // then the filenames in the trash are "0-test.txt" and "1-test.txt". - QMap<QString, QString> metaData = job->metaData(); + TQMap<TQString, TQString> metaData = job->metaData(); KURL::List newSourceURLs; KURL::List sourceURLs = command.source(); @@ -1032,7 +1032,7 @@ void Dolphin::addUndoOperation(KIO::Job* job) const KURL::List::Iterator sourceEnd = sourceURLs.end(); 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()) { newSourceURLs.append(KURL(metaIt.data())); } @@ -1095,7 +1095,7 @@ void Dolphin::init() setAcceptDrops(true); - m_splitter = new QSplitter(this); + m_splitter = new TQSplitter(this); DolphinSettings& settings = DolphinSettings::instance(); @@ -1144,9 +1144,9 @@ void Dolphin::init() stateChanged("new_file"); setAutoSaveSettings(); - QClipboard* clipboard = QApplication::clipboard(); - connect(clipboard, SIGNAL(dataChanged()), - this, SLOT(updatePasteAction())); + TQClipboard* clipboard = TQApplication::tqclipboard(); + connect(clipboard, TQT_SIGNAL(dataChanged()), + this, TQT_SLOT(updatePasteAction())); updatePasteAction(); updateGoActions(); @@ -1177,173 +1177,173 @@ void Dolphin::setupActions() { // setup 'File' menu KAction* createFolder = new KAction(i18n("Folder..."), "Ctrl+N", - this, SLOT(createFolder()), + TQT_TQOBJECT(this), TQT_SLOT(createFolder()), actionCollection(), "create_folder"); createFolder->setIcon("folder"); new KAction(i18n("Rename"), KKey(Key_F2), - this, SLOT(rename()), + TQT_TQOBJECT(this), TQT_SLOT(rename()), actionCollection(), "rename"); KAction* moveToTrashAction = new KAction(i18n("Move to Trash"), KKey(Key_Delete), - this, SLOT(moveToTrash()), + TQT_TQOBJECT(this), TQT_SLOT(moveToTrash()), actionCollection(), "move_to_trash"); moveToTrashAction->setIcon("edittrash"); KAction* deleteAction = new KAction(i18n("Delete"), "Shift+Delete", - this, SLOT(deleteItems()), + TQT_TQOBJECT(this), TQT_SLOT(deleteItems()), actionCollection(), "delete"); deleteAction->setIcon("editdelete"); new KAction(i18n("Propert&ies"), "Alt+Return", - this, SLOT(properties()), + TQT_TQOBJECT(this), TQT_SLOT(properties()), actionCollection(), "properties"); - KStdAction::quit(this, SLOT(quit()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(quit()), actionCollection()); // setup 'Edit' menu UndoManager& undoManager = UndoManager::instance(); KStdAction::undo(&undoManager, - SLOT(undo()), + TQT_SLOT(undo()), actionCollection()); - connect(&undoManager, SIGNAL(undoAvailable(bool)), - this, SLOT(slotUndoAvailable(bool))); - connect(&undoManager, SIGNAL(undoTextChanged(const QString&)), - this, SLOT(slotUndoTextChanged(const QString&))); + connect(&undoManager, TQT_SIGNAL(undoAvailable(bool)), + TQT_TQOBJECT(this), TQT_SLOT(slotUndoAvailable(bool))); + connect(&undoManager, TQT_SIGNAL(undoTextChanged(const TQString&)), + TQT_TQOBJECT(this), TQT_SLOT(slotUndoTextChanged(const TQString&))); KStdAction::redo(&undoManager, - SLOT(redo()), + TQT_SLOT(redo()), actionCollection()); - connect(&undoManager, SIGNAL(redoAvailable(bool)), - this, SLOT(slotRedoAvailable(bool))); - connect(&undoManager, SIGNAL(redoTextChanged(const QString&)), - this, SLOT(slotRedoTextChanged(const QString&))); + connect(&undoManager, TQT_SIGNAL(redoAvailable(bool)), + TQT_TQOBJECT(this), TQT_SLOT(slotRedoAvailable(bool))); + connect(&undoManager, TQT_SIGNAL(redoTextChanged(const TQString&)), + TQT_TQOBJECT(this), TQT_SLOT(slotRedoTextChanged(const TQString&))); - KStdAction::cut(this, SLOT(cut()), actionCollection()); - KStdAction::copy(this, SLOT(copy()), actionCollection()); - KStdAction::paste(this, SLOT(paste()), actionCollection()); + KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(cut()), actionCollection()); + KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(copy()), actionCollection()); + KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(paste()), actionCollection()); new KAction(i18n("Select All"), "Ctrl+A", - this, SLOT(selectAll()), + TQT_TQOBJECT(this), TQT_SLOT(selectAll()), actionCollection(), "select_all"); new KAction(i18n("Invert Selection"), "Ctrl+Shift+A", - this, SLOT(invertSelection()), + TQT_TQOBJECT(this), TQT_SLOT(invertSelection()), actionCollection(), "invert_selection"); // setup 'View' menu - KStdAction::zoomIn(this, - SLOT(zoomIn()), + KStdAction::zoomIn(TQT_TQOBJECT(this), + TQT_SLOT(zoomIn()), actionCollection()); - KStdAction::zoomOut(this, - SLOT(zoomOut()), + KStdAction::zoomOut(TQT_TQOBJECT(this), + TQT_SLOT(zoomOut()), actionCollection()); KRadioAction* iconsView = new KRadioAction(i18n("Icons"), "Ctrl+1", - this, SLOT(setIconsView()), + TQT_TQOBJECT(this), TQT_SLOT(setIconsView()), actionCollection(), "icons"); iconsView->setExclusiveGroup("view_mode"); iconsView->setIcon("view_icon"); KRadioAction* detailsView = new KRadioAction(i18n("Details"), "Ctrl+2", - this, SLOT(setDetailsView()), + TQT_TQOBJECT(this), TQT_SLOT(setDetailsView()), actionCollection(), "details"); detailsView->setExclusiveGroup("view_mode"); detailsView->setIcon("view_text"); KRadioAction* previewsView = new KRadioAction(i18n("Previews"), "Ctrl+3", - this, SLOT(setPreviewsView()), + TQT_TQOBJECT(this), TQT_SLOT(setPreviewsView()), actionCollection(), "previews"); previewsView->setExclusiveGroup("view_mode"); previewsView->setIcon("gvdirpart"); KRadioAction* sortByName = new KRadioAction(i18n("By Name"), 0, - this, SLOT(sortByName()), + TQT_TQOBJECT(this), TQT_SLOT(sortByName()), actionCollection(), "by_name"); sortByName->setExclusiveGroup("sort"); KRadioAction* sortBySize = new KRadioAction(i18n("By Size"), 0, - this, SLOT(sortBySize()), + TQT_TQOBJECT(this), TQT_SLOT(sortBySize()), actionCollection(), "by_size"); sortBySize->setExclusiveGroup("sort"); KRadioAction* sortByDate = new KRadioAction(i18n("By Date"), 0, - this, SLOT(sortByDate()), + TQT_TQOBJECT(this), TQT_SLOT(sortByDate()), actionCollection(), "by_date"); sortByDate->setExclusiveGroup("sort"); - new KToggleAction(i18n("Descending"), 0, this, SLOT(toggleSortOrder()), + new KToggleAction(i18n("Descending"), 0, TQT_TQOBJECT(this), TQT_SLOT(toggleSortOrder()), actionCollection(), "descending"); new KToggleAction(i18n("Show Hidden Files"), "Alt+.", - this, SLOT(showHiddenFiles()), + TQT_TQOBJECT(this), TQT_SLOT(showHiddenFiles()), actionCollection(), "show_hidden_files"); KToggleAction* splitAction = new KToggleAction(i18n("Split View"), "F10", - this, SLOT(toggleSplitView()), + TQT_TQOBJECT(this), TQT_SLOT(toggleSplitView()), actionCollection(), "split_view"); splitAction->setIcon("view_left_right"); KAction* reloadAction = new KAction(i18n("Reload"), "F5", - this, SLOT(reloadView()), + TQT_TQOBJECT(this), TQT_SLOT(reloadView()), actionCollection(), "reload"); reloadAction->setIcon("reload"); KAction* stopAction = new KAction(i18n("Stop"), 0, - this, SLOT(stopLoading()), + TQT_TQOBJECT(this), TQT_SLOT(stopLoading()), actionCollection(), "stop"); stopAction->setIcon("stop"); new KAction(i18n("Edit Location"), "Ctrl+L", - this, SLOT(editLocation()), + TQT_TQOBJECT(this), TQT_SLOT(editLocation()), actionCollection(), "edit_location"); new KAction(i18n("Browse"), "Ctrl+B", - this, SLOT(browse()), + TQT_TQOBJECT(this), TQT_SLOT(browse()), actionCollection(), "browse"); new KToggleAction(i18n("Left Sidebar"), "F8", - this, SLOT(toggleleftSidebar()), + TQT_TQOBJECT(this), TQT_SLOT(toggleleftSidebar()), actionCollection(), "leftsidebar"); new KToggleAction(i18n("Right Sidebar"), "F9", - this, SLOT(togglerightSidebar()), + TQT_TQOBJECT(this), TQT_SLOT(togglerightSidebar()), actionCollection(), "rightsidebar"); new KAction(i18n("Adjust View Properties..."), 0, - this, SLOT(adjustViewProperties()), + TQT_TQOBJECT(this), TQT_SLOT(adjustViewProperties()), actionCollection(), "view_properties"); // setup 'Go' menu - KStdAction::back(this, SLOT(goBack()), actionCollection()); - KStdAction::forward(this, SLOT(goForward()), actionCollection()); - KStdAction::up(this, SLOT(goUp()), actionCollection()); - KStdAction::home(this, SLOT(goHome()), actionCollection()); + KStdAction::back(TQT_TQOBJECT(this), TQT_SLOT(goBack()), actionCollection()); + KStdAction::forward(TQT_TQOBJECT(this), TQT_SLOT(goForward()), actionCollection()); + KStdAction::up(TQT_TQOBJECT(this), TQT_SLOT(goUp()), actionCollection()); + KStdAction::home(TQT_TQOBJECT(this), TQT_SLOT(goHome()), actionCollection()); // setup 'Tools' menu KAction* openTerminalAction = new KAction(i18n("Open Terminal"), "F4", - this, SLOT(openTerminal()), + TQT_TQOBJECT(this), TQT_SLOT(openTerminal()), actionCollection(), "open_terminal"); openTerminalAction->setIcon("konsole"); KAction* findFileAction = new KAction(i18n("Find File..."), "Ctrl+F", - this, SLOT(findFile()), + TQT_TQOBJECT(this), TQT_SLOT(findFile()), actionCollection(), "find_file"); - findFileAction->setIcon("filefind"); + findFileAction->setIcon("filetqfind"); new KToggleAction(i18n("Show Filter Bar"), "filter", "/", - this, SLOT(showFilterBar()), + TQT_TQOBJECT(this), TQT_SLOT(showFilterBar()), actionCollection(), "show_filter_bar"); KAction* compareFilesAction = new KAction(i18n("Compare Files"), 0, - this, SLOT(compareFiles()), + TQT_TQOBJECT(this), TQT_SLOT(compareFiles()), actionCollection(), "compare_files"); compareFilesAction->setIcon("kompare"); compareFilesAction->setEnabled(false); // setup 'Settings' menu - KStdAction::preferences(this, SLOT(editSettings()), actionCollection()); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(editSettings()), actionCollection()); } void Dolphin::setupCreateNewMenuActions() @@ -1354,18 +1354,18 @@ void Dolphin::setupCreateNewMenuActions() // Copyright (C) 1998, 1999 David Faure <[email protected]> // 2003 Sven Leiber <[email protected]> - QStringList files = actionCollection()->instance()->dirs()->findAllResources("templates"); - for (QStringList::Iterator it = files.begin() ; it != files.end(); ++it) { + TQStringList files = actionCollection()->instance()->dirs()->findAllResources("templates"); + for (TQStringList::Iterator it = files.begin() ; it != files.end(); ++it) { if ((*it)[0] != '.' ) { KSimpleConfig config(*it, true); config.setDesktopGroup(); // tricky solution to ensure that TextFile is at the beginning // because this filetype is the most used (according kde-core discussion) - const QString name(config.readEntry("Name")); - QString key(name); + const TQString name(config.readEntry("Name")); + TQString key(name); - const QString path(config.readPathEntry("URL")); + const TQString path(config.readPathEntry("URL")); if (!path.endsWith("emptydir")) { if (path.endsWith("TextFile.txt")) { key = "1" + key; @@ -1383,11 +1383,11 @@ void Dolphin::setupCreateNewMenuActions() key = "5"; } - const QString icon(config.readEntry("Icon")); - const QString comment(config.readEntry("Comment")); - const QString type(config.readEntry("Type")); + const TQString icon(config.readEntry("Icon")); + const TQString comment(config.readEntry("Comment")); + const TQString type(config.readEntry("Type")); - const QString filePath(*it); + const TQString filePath(*it); if (type == "Link") { @@ -1404,17 +1404,17 @@ void Dolphin::setupCreateNewMenuActions() m_createFileTemplates.sort(); unplugActionList("create_actions"); - KSortableValueList<CreateFileEntry, QString>::ConstIterator it = m_createFileTemplates.begin(); - KSortableValueList<CreateFileEntry, QString>::ConstIterator end = m_createFileTemplates.end(); + KSortableValueList<CreateFileEntry, TQString>::ConstIterator it = m_createFileTemplates.begin(); + KSortableValueList<CreateFileEntry, TQString>::ConstIterator end = m_createFileTemplates.end(); while (it != end) { CreateFileEntry entry = (*it).value(); KAction* action = new KAction(entry.name); action->setIcon(entry.icon); action->setName((*it).index().ascii()); - connect(action, SIGNAL(activated()), - this, SLOT(createFile())); + connect(action, TQT_SIGNAL(activated()), + this, TQT_SLOT(createFile())); - const QChar section = ((*it).index()[0]); + const TQChar section = ((*it).index()[0]); switch (section) { case '1': case '2': { @@ -1450,7 +1450,7 @@ void Dolphin::setupCreateNewMenuActions() void Dolphin::updateHistory() { 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"); 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 // must be disabled and a progress should be shown. ProgressIndicator progressIndicator(i18n("Updating view properties..."), - QString::null, + TQString(), urls.count()); KURL::List::ConstIterator end = urls.end(); @@ -1596,8 +1596,8 @@ void Dolphin::addPendingUndoJob(KIO::Job* job, const KURL::List& source, const KURL& dest) { - connect(job, SIGNAL(result(KIO::Job*)), - this, SLOT(addUndoOperation(KIO::Job*))); + connect(job, TQT_SIGNAL(result(KIO::Job*)), + this, TQT_SLOT(addUndoOperation(KIO::Job*))); UndoInfo undoInfo; undoInfo.id = job->progressId(); @@ -1620,10 +1620,10 @@ void Dolphin::openleftSidebar() m_leftsidebar = new leftSidebar(m_splitter); m_leftsidebar->show(); - connect(m_leftsidebar, SIGNAL(urlChanged(const KURL&)), - this, SLOT(slotURLChangeRequest(const KURL&))); + connect(m_leftsidebar, TQT_SIGNAL(urlChanged(const KURL&)), + this, TQT_SLOT(slotURLChangeRequest(const KURL&))); 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); leftSidebarSettings* settings = DolphinSettings::instance().leftsidebar(); @@ -1640,10 +1640,10 @@ void Dolphin::openrightSidebar() m_rightsidebar = new rightSidebar(m_splitter); m_rightsidebar->show(); - connect(m_rightsidebar, SIGNAL(urlChanged(const KURL&)), - this, SLOT(slotURLChangeRequest(const KURL&))); + connect(m_rightsidebar, TQT_SIGNAL(urlChanged(const KURL&)), + this, TQT_SLOT(slotURLChangeRequest(const KURL&))); 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); rightSidebarSettings* settings = DolphinSettings::instance().rightsidebar(); diff --git a/src/dolphin.h b/src/dolphin.h index bccfbba..ca295b2 100644 --- a/src/dolphin.h +++ b/src/dolphin.h @@ -28,9 +28,9 @@ #include <kapplication.h> #include <kmainwindow.h> -#include <qvaluelist.h> -#include <qptrlist.h> -#include <qstring.h> +#include <tqvaluelist.h> +#include <tqptrlist.h> +#include <tqstring.h> #include <ksortablevaluelist.h> #include "dolphinview.h" @@ -38,11 +38,11 @@ class KPrinter; class KURL; -class QLineEdit; +class TQLineEdit; class KFileIconView; -class QHBox; -class QIconViewItem; -class QSplitter; +class TQHBox; +class TQIconViewItem; +class TQSplitter; class KAction; class URLNavigator; class leftSidebar; @@ -58,6 +58,7 @@ class rightSidebar; class Dolphin : public KMainWindow { Q_OBJECT + TQ_OBJECT public: /** @@ -107,9 +108,9 @@ public: * of the 'Create New...' sub menu. Usually the list contains actions * for creating folders, text files, HTML files etc. */ - const QPtrList<KAction>& fileGroupActions() const { return m_fileGroupActions; } - //const QPtrList<KAction>& linkGroupActions() const { return m_linkGroupActions; } - //const QPtrList<KAction>& linkToDeviceActions() const { return m_linkToDeviceActions; } + const TQPtrList<KAction>& fileGroupActions() const { return m_fileGroupActions; } + //const TQPtrList<KAction>& linkGroupActions() const { return m_linkGroupActions; } + //const TQPtrList<KAction>& linkToDeviceActions() const { return m_linkToDeviceActions; } /** * Refreshs the views of the main window by recreating them dependent from @@ -161,14 +162,14 @@ public slots: void slotSortingChanged(DolphinView::Sorting sorting); /** 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. */ void slotSelectionChanged(); protected: - /** @see QMainWindow::closeEvent */ - virtual void closeEvent(QCloseEvent* event); + /** @see TQMainWindow::closeEvent */ + virtual void closeEvent(TQCloseEvent* event); /** * This method is called when it is time for the app to save its @@ -228,7 +229,7 @@ private slots: void slotUndoAvailable(bool available); /** 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 @@ -237,7 +238,7 @@ private slots: void slotRedoAvailable(bool available); /** 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 @@ -398,7 +399,7 @@ private: void openleftSidebar(); void openrightSidebar(); - QSplitter* m_splitter; + TQSplitter* m_splitter; leftSidebar* m_leftsidebar; rightSidebar* m_rightsidebar; DolphinView* m_activeView; @@ -431,25 +432,25 @@ private: int id; DolphinCommand command; }; - QValueList<UndoInfo> m_pendingUndoJobs; + TQValueList<UndoInfo> m_pendingUndoJobs; /** Contains meta information for creating files. */ struct CreateFileEntry { - QString name; - QString filePath; - QString templatePath; - QString icon; - QString comment; + TQString name; + TQString filePath; + TQString templatePath; + TQString icon; + TQString comment; }; - QPtrList<KAction> m_fileGroupActions; - KSortableValueList<CreateFileEntry,QString> m_createFileTemplates; + TQPtrList<KAction> m_fileGroupActions; + KSortableValueList<CreateFileEntry,TQString> m_createFileTemplates; // TODO: not used yet. See documentation of Dolphin::linkGroupActions() // and Dolphin::linkToDeviceActions() in for details. - //QPtrList<KAction> m_linkGroupActions; - //QPtrList<KAction> m_linkToDeviceActions; + //TQPtrList<KAction> m_linkGroupActions; + //TQPtrList<KAction> m_linkToDeviceActions; }; #endif // _DOLPHIN_H_ diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index 7ac2a56..be433ea 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -26,7 +26,7 @@ #include <ktrader.h> #include <klocale.h> #include <krun.h> -#include <qdir.h> +#include <tqdir.h> #include <kglobal.h> #include <kstandarddirs.h> #include <kiconloader.h> @@ -44,10 +44,10 @@ #include "dolphinsettings.h" -DolphinContextMenu::DolphinContextMenu(DolphinView* parent, +DolphinContextMenu::DolphinContextMenu(DolphinView* tqparent, KFileItem* fileInfo, - const QPoint& pos) : - m_dolphinView(parent), + const TQPoint& pos) : + m_dolphinView(tqparent), m_fileInfo(fileInfo), m_pos(pos) { @@ -93,7 +93,7 @@ void DolphinContextMenu::openViewportContextMenu() KAction* action = 0; - QPtrListIterator<KAction> fileGrouptIt(dolphin.fileGroupActions()); + TQPtrListIterator<KAction> fileGrouptIt(dolphin.fileGroupActions()); while ((action = fileGrouptIt.current()) != 0) { action->plug(createNewMenu); ++fileGrouptIt; @@ -104,14 +104,14 @@ void DolphinContextMenu::openViewportContextMenu() // //createNewMenu->insertSeparator(); // - //QPtrListIterator<KAction> linkGroupIt(dolphin.linkGroupActions()); + //TQPtrListIterator<KAction> linkGroupIt(dolphin.linkGroupActions()); //while ((action = linkGroupIt.current()) != 0) { // action->plug(createNewMenu); // ++linkGroupIt; //} // //KPopupMenu* linkToDeviceMenu = new KPopupMenu(); - //QPtrListIterator<KAction> linkToDeviceIt(dolphin.linkToDeviceActions()); + //TQPtrListIterator<KAction> linkToDeviceIt(dolphin.linkToDeviceActions()); //while ((action = linkToDeviceIt.current()) != 0) { // action->plug(linkToDeviceMenu); // ++linkToDeviceIt; @@ -231,11 +231,11 @@ void DolphinContextMenu::openItemContextMenu() popup->insertSeparator(); // Insert 'Open With...' sub menu - QValueVector<KService::Ptr> openWithVector; + TQValueVector<KService::Ptr> openWithVector; const int openWithID = insertOpenWithItems(popup, openWithVector); // Insert 'Actions' sub menu - QValueVector<KDEDesktopMimeType::Service> actionsVector; + TQValueVector<KDEDesktopMimeType::Service> actionsVector; insertActionItems(popup, actionsVector); // insert 'Properties...' entry @@ -283,7 +283,7 @@ void DolphinContextMenu::openItemContextMenu() } 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 // 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); bool insertOpenWithItems = true; - const QString contextMimeType(m_fileInfo->mimetype()); + const TQString contextMimeType(m_fileInfo->mimetype()); KFileItemListIterator mimeIt(*list); KFileItem* item = 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 // problem outside the scope of Dolphin, duplicated entries just // will be skipped here. - const QString appName((*it)->name()); + const TQString appName((*it)->name()); if (!containsEntry(openWithMenu, appName)) { openWithMenu->insertItem((*it)->pixmap(KIcon::Small), appName, index); @@ -351,25 +351,25 @@ int DolphinContextMenu::insertOpenWithItems(KPopupMenu* popup, } void DolphinContextMenu::insertActionItems(KPopupMenu* popup, - QValueVector<KDEDesktopMimeType::Service>& actionsVector) + TQValueVector<KDEDesktopMimeType::Service>& actionsVector) { KPopupMenu* actionsMenu = new KPopupMenu(); int actionsIndex = 0; - QStringList dirs = KGlobal::dirs()->findDirs("data", "d3lphin/servicemenus/"); + TQStringList dirs = KGlobal::dirs()->findDirs("data", "d3lphin/servicemenus/"); KPopupMenu* menu = 0; - for (QStringList::ConstIterator dirIt = dirs.begin(); dirIt != dirs.end(); ++dirIt) { - QDir dir(*dirIt); - QStringList entries = dir.entryList("*.desktop", QDir::Files); + for (TQStringList::ConstIterator dirIt = dirs.begin(); dirIt != dirs.end(); ++dirIt) { + TQDir dir(*dirIt); + 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); cfg.setDesktopGroup(); if ((cfg.hasKey("Actions") || cfg.hasKey("X-KDE-GetActionMenu")) && cfg.hasKey("ServiceTypes")) { - const QStringList types = cfg.readListEntry("ServiceTypes"); - for (QStringList::ConstIterator it = types.begin(); it != types.end(); ++it) { + const TQStringList types = cfg.readListEntry("ServiceTypes"); + for (TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it) { // check whether the mime type is equal or whether the // mimegroup (e. g. image/*) is supported @@ -400,12 +400,12 @@ void DolphinContextMenu::insertActionItems(KPopupMenu* popup, KFileItem* item = 0; insert = true; while (insert && ((item = mimeIt.current()) != 0)) { - const QString mimeType((*mimeIt)->mimetype()); - const QString mimeGroup(mimeType.left(mimeType.find('/'))); + const TQString mimeType((*mimeIt)->mimetype()); + const TQString mimeGroup(mimeType.left(mimeType.tqfind('/'))); insert = (*it == mimeType) || ((*it).right(1) == "*") && - ((*it).left((*it).find('/')) == mimeGroup); + ((*it).left((*it).tqfind('/')) == mimeGroup); ++mimeIt; } } @@ -413,16 +413,16 @@ void DolphinContextMenu::insertActionItems(KPopupMenu* popup, if (insert) { menu = actionsMenu; - const QString submenuName = cfg.readEntry( "X-KDE-Submenu" ); + const TQString submenuName = cfg.readEntry( "X-KDE-Submenu" ); if (!submenuName.isEmpty()) { menu = new KPopupMenu(); actionsMenu->insertItem(submenuName, menu, submenuID); } - QValueList<KDEDesktopMimeType::Service> userServices = + TQValueList<KDEDesktopMimeType::Service> userServices = KDEDesktopMimeType::userDefinedServices(*dirIt + *entryIt, true); - QValueList<KDEDesktopMimeType::Service>::Iterator serviceIt; + TQValueList<KDEDesktopMimeType::Service>::Iterator serviceIt; for (serviceIt = userServices.begin(); serviceIt != userServices.end(); ++serviceIt) { KDEDesktopMimeType::Service service = (*serviceIt); if (!service.m_strIcon.isEmpty()) { @@ -456,8 +456,8 @@ void DolphinContextMenu::insertActionItems(KPopupMenu* popup, if (menu == actionsMenu) { // The item is an action, hence show the action in the root menu. const int id = actionsMenu->idAt(0); - const QString text(actionsMenu->text(id)); - const QIconSet* iconSet = actionsMenu->iconSet(id); + const TQString text(actionsMenu->text(id)); + const TQIconSet* iconSet = actionsMenu->iconSet(id); if (iconSet == 0) { popup->insertItem(text, id); } @@ -478,7 +478,7 @@ void DolphinContextMenu::insertActionItems(KPopupMenu* popup, } bool DolphinContextMenu::containsEntry(const KPopupMenu* menu, - const QString& entryName) const + const TQString& entryName) const { assert(menu != 0); diff --git a/src/dolphincontextmenu.h b/src/dolphincontextmenu.h index f14419e..1b0a0c9 100644 --- a/src/dolphincontextmenu.h +++ b/src/dolphincontextmenu.h @@ -22,18 +22,18 @@ #define DOLPHINCONTEXTMENU_H #include <kpopupmenu.h> -#include <qpoint.h> -#include <qstring.h> -#include <qvaluelist.h> +#include <tqpoint.h> +#include <tqstring.h> +#include <tqvaluelist.h> #include <kmountpoint.h> -#include <qvaluevector.h> +#include <tqvaluevector.h> #include <kservice.h> #include <kpropertiesdialog.h> class KPopupMenu; class KFileItem; -class QPoint; -class QWidget; +class TQPoint; +class TQWidget; class DolphinView; /** @@ -54,16 +54,16 @@ class DolphinContextMenu { public: /** - * @parent Pointer to the dolphin view the context menu + * @tqparent Pointer to the dolphin view the context menu * belongs to. * @fileInfo Pointer to the file item the context menu * is applied. If 0 is passed, the context menu * is above the viewport. * @pos Position of the upper left edge of the context menu. */ - DolphinContextMenu(DolphinView* parent, + DolphinContextMenu(DolphinView* tqparent, KFileItem* fileInfo, - const QPoint& pos); + const TQPoint& pos); virtual ~DolphinContextMenu(); @@ -85,7 +85,7 @@ private: * to the predecessor. */ int insertOpenWithItems(KPopupMenu* popup, - QValueVector<KService::Ptr>& openWithVector); + TQValueVector<KService::Ptr>& openWithVector); /** * Inserts the 'Actions...' submenu to \a popup. @@ -95,14 +95,14 @@ private: * services. */ void insertActionItems(KPopupMenu* popup, - QValueVector<KDEDesktopMimeType::Service>& actionsVector); + TQValueVector<KDEDesktopMimeType::Service>& actionsVector); /** * Returns true, if 'menu' contains already * an entry with the name 'entryName'. */ bool containsEntry(const KPopupMenu* menu, - const QString& entryName) const; + const TQString& entryName) const; enum { restoreID = 80, @@ -115,15 +115,15 @@ private: DolphinView* m_dolphinView; KFileItem* m_fileInfo; - QPoint m_pos; + TQPoint m_pos; struct Entry { int type; - QString name; - QString filePath; // empty for separator - QString templatePath; // same as filePath for template - QString icon; - QString comment; + TQString name; + TQString filePath; // empty for separator + TQString templatePath; // same as filePath for template + TQString icon; + TQString comment; }; }; diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp index 66d524e..df23295 100644 --- a/src/dolphindetailsview.cpp +++ b/src/dolphindetailsview.cpp @@ -21,16 +21,16 @@ #include "dolphindetailsview.h" #include <kurldrag.h> -#include <qpainter.h> -#include <qobjectlist.h> -#include <qheader.h> -#include <qclipboard.h> -#include <qpainter.h> +#include <tqpainter.h> +#include <tqobjectlist.h> +#include <tqheader.h> +#include <tqclipboard.h> +#include <tqpainter.h> #include <klocale.h> #include <kglobalsettings.h> -#include <qscrollbar.h> -#include <qcursor.h> -#include <qstyle.h> +#include <tqscrollbar.h> +#include <tqcursor.h> +#include <tqstyle.h> #include <assert.h> #include "dolphinview.h" @@ -41,55 +41,55 @@ #include "dolphinstatusbar.h" #include "dolphindetailsviewsettings.h" -DolphinDetailsView::DolphinDetailsView(DolphinView* parent) : - KFileDetailView(parent, 0), - m_dolphinView(parent), +DolphinDetailsView::DolphinDetailsView(DolphinView* tqparent) : + KFileDetailView(tqparent, 0), + m_dolphinView(tqparent), m_resizeTimer(0), m_scrollTimer(0), m_rubber(0) { - m_resizeTimer = new QTimer(this); - connect(m_resizeTimer, SIGNAL(timeout()), - this, SLOT(updateColumnsWidth())); + m_resizeTimer = new TQTimer(this); + connect(m_resizeTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(updateColumnsWidth())); setAcceptDrops(true); setSelectionMode(KFile::Extended); - setHScrollBarMode(QScrollView::AlwaysOff); + setHScrollBarMode(TQScrollView::AlwaysOff); - setColumnAlignment(SizeColumn, Qt::AlignRight); + setColumnAlignment(SizeColumn, TQt::AlignRight); for (int i = DateColumn; i <= GroupColumn; ++i) { - setColumnAlignment(i, Qt::AlignHCenter); + setColumnAlignment(i, TQt::AlignHCenter); } Dolphin& dolphin = Dolphin::mainWin(); - connect(this, SIGNAL(onItem(QListViewItem*)), - this, SLOT(slotOnItem(QListViewItem*))); - connect(this, SIGNAL(onViewport()), - this, SLOT(slotOnViewport())); - connect(this, SIGNAL(contextMenuRequested(QListViewItem*, const QPoint&, int)), - this, SLOT(slotContextMenuRequested(QListViewItem*, const QPoint&, int))); - connect(this, SIGNAL(selectionChanged()), - &dolphin, SLOT(slotSelectionChanged())); - connect(&dolphin, SIGNAL(activeViewChanged()), - this, SLOT(slotActivationUpdate())); - connect(this, SIGNAL(itemRenamed(QListViewItem*, const QString&, int)), - this, SLOT(slotItemRenamed(QListViewItem*, const QString&, int))); - connect(this, SIGNAL(dropped(QDropEvent*, const KURL::List&, const KURL&)), - parent, SLOT(slotURLListDropped(QDropEvent*, const KURL::List&, const KURL&))); - - QClipboard* clipboard = QApplication::clipboard(); - connect(clipboard, SIGNAL(dataChanged()), - this, SLOT(slotUpdateDisabledItems())); - - QHeader* viewHeader = header(); + connect(this, TQT_SIGNAL(onItem(TQListViewItem*)), + this, TQT_SLOT(slotOnItem(TQListViewItem*))); + connect(this, TQT_SIGNAL(onViewport()), + this, TQT_SLOT(slotOnViewport())); + connect(this, TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint&, int)), + this, TQT_SLOT(slotContextMenuRequested(TQListViewItem*, const TQPoint&, int))); + connect(this, TQT_SIGNAL(selectionChanged()), + &dolphin, TQT_SLOT(slotSelectionChanged())); + connect(&dolphin, TQT_SIGNAL(activeViewChanged()), + this, TQT_SLOT(slotActivationUpdate())); + connect(this, TQT_SIGNAL(itemRenamed(TQListViewItem*, const TQString&, int)), + this, TQT_SLOT(slotItemRenamed(TQListViewItem*, const TQString&, int))); + connect(this, TQT_SIGNAL(dropped(TQDropEvent*, const KURL::List&, const KURL&)), + tqparent, TQT_SLOT(slotURLListDropped(TQDropEvent*, const KURL::List&, const KURL&))); + + TQClipboard* clipboard = TQApplication::tqclipboard(); + connect(clipboard, TQT_SIGNAL(dataChanged()), + this, TQT_SLOT(slotUpdateDisabledItems())); + + TQHeader* viewHeader = header(); viewHeader->setResizeEnabled(false); viewHeader->setMovingEnabled(false); - connect(viewHeader, SIGNAL(clicked(int)), - this, SLOT(slotHeaderClicked(int))); + connect(viewHeader, TQT_SIGNAL(clicked(int)), + this, TQT_SLOT(slotHeaderClicked(int))); setMouseTracking(true); - setDefaultRenameAction(QListView::Accept); + setDefaultRenameAction(TQListView::Accept); refreshSettings(); } @@ -117,7 +117,7 @@ void DolphinDetailsView::endItemUpdates() } int index = 0; - const QValueList<URLNavigator::HistoryElem> history = m_dolphinView->urlHistory(index); + const TQValueList<URLNavigator::HistoryElem> history = m_dolphinView->urlHistory(index); if (!history.isEmpty()) { KFileView* fileView = static_cast<KFileView*>(this); fileView->setCurrentItem(history[index].currentFileName()); @@ -131,15 +131,15 @@ void DolphinDetailsView::insertItem(KFileItem* 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(); - if (spec & QDir::Time) { + TQDir::SortSpec spec = KFileView::sorting(); + if (spec & TQDir::Time) { item->setKey(sortingKey(fileItem->time(KIO::UDS_MODIFICATION_TIME), fileItem->isDir(), spec)); } - else if (spec & QDir::Size) { + else if (spec & TQDir::Size) { item->setKey(sortingKey(fileItem->size(), fileItem->isDir(), spec)); } else { @@ -149,9 +149,9 @@ void DolphinDetailsView::insertItem(KFileItem* fileItem) 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); } @@ -166,7 +166,7 @@ void DolphinDetailsView::refreshSettings() } } - QFont adjustedFont(font()); + TQFont adjustedFont(font()); adjustedFont.setFamily(settings->fontFamily()); adjustedFont.setPointSize(settings->fontSize()); setFont(adjustedFont); @@ -224,9 +224,9 @@ void DolphinDetailsView::resizeContents(int width, int height) 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); KFileItem* fileItem = static_cast<KFileListViewItem*>(item)->fileInfo(); m_dolphinView->requestItemInfo(fileItem->url()); @@ -243,12 +243,12 @@ void DolphinDetailsView::slotOnViewport() } void DolphinDetailsView::setContextPixmap(void* context, - const QPixmap& pixmap) + const TQPixmap& 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); } @@ -270,7 +270,7 @@ KFileItem* DolphinDetailsView::contextFileInfo(void* context) } -void DolphinDetailsView::contentsDragMoveEvent(QDragMoveEvent* event) +void DolphinDetailsView::contentsDragMoveEvent(TQDragMoveEvent* 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); @@ -304,14 +304,14 @@ void DolphinDetailsView::resizeEvent(QResizeEvent* event) m_resizeTimer->start(50, true); } -bool DolphinDetailsView::acceptDrag(QDropEvent* event) const +bool DolphinDetailsView::acceptDrag(TQDropEvent* event) const { bool accept = KURLDrag::canDecode(event) && - (event->action() == QDropEvent::Copy || - event->action() == QDropEvent::Move || - event->action() == QDropEvent::Link); + (event->action() == TQDropEvent::Copy || + event->action() == TQDropEvent::Move || + event->action() == TQDropEvent::Link); 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())); accept = (item != 0); if (accept) { @@ -324,15 +324,15 @@ bool DolphinDetailsView::acceptDrag(QDropEvent* event) const return accept; } -void DolphinDetailsView::contentsDropEvent(QDropEvent* event) +void DolphinDetailsView::contentsDropEvent(TQDropEvent* event) { // KFileDetailView::contentsDropEvent does not care whether the mouse // cursor is above a filename or not, the destination URL is always // the URL of the item. This is fixed here in a way that the destination // URL is only the URL of the item if the cursor is above the filename. - const QPoint pos(QCursor::pos()); - const QPoint viewportPos(viewport()->mapToGlobal(QPoint(0, 0))); - QListViewItem* item = itemAt(QPoint(pos.x() - viewportPos.x(), pos.y() - viewportPos.y())); + const TQPoint pos(TQCursor::pos()); + const TQPoint viewportPos(viewport()->mapToGlobal(TQPoint(0, 0))); + TQListViewItem* item = itemAt(TQPoint(pos.x() - viewportPos.x(), pos.y() - viewportPos.y())); if ((item == 0) || ((item != 0) && isOnFilename(item, pos))) { // dropping is done on the viewport or directly above a filename 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) { drawRubber(); @@ -372,9 +372,9 @@ void DolphinDetailsView::contentsMousePressEvent(QMouseEvent* event) // if the mouse cursor is not above the filename. This prevents // that the item gets selected and simulates an equal usability // like in the icon view. - const QPoint pos(QCursor::pos()); - const QPoint viewportPos(viewport()->mapToGlobal(QPoint(0, 0))); - QListViewItem* item = itemAt(QPoint(pos.x() - viewportPos.x(), pos.y() - viewportPos.y())); + const TQPoint pos(TQCursor::pos()); + const TQPoint viewportPos(viewport()->mapToGlobal(TQPoint(0, 0))); + TQListViewItem* item = itemAt(TQPoint(pos.x() - viewportPos.x(), pos.y() - viewportPos.y())); if ((item != 0) && isOnFilename(item, pos)) { KFileDetailView::contentsMousePressEvent(event); } @@ -387,7 +387,7 @@ void DolphinDetailsView::contentsMousePressEvent(QMouseEvent* event) } 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(); @@ -396,7 +396,7 @@ void DolphinDetailsView::contentsMousePressEvent(QMouseEvent* event) m_dolphinView->statusBar()->clear(); } -void DolphinDetailsView::contentsMouseMoveEvent(QMouseEvent* event) +void DolphinDetailsView::contentsMouseMoveEvent(TQMouseEvent* event) { if (m_rubber != 0) { slotAutoScroll(); @@ -405,9 +405,9 @@ void DolphinDetailsView::contentsMouseMoveEvent(QMouseEvent* event) KFileDetailView::contentsMouseMoveEvent(event); - const QPoint& pos = event->globalPos(); - const QPoint viewportPos = viewport()->mapToGlobal(QPoint(0, 0)); - QListViewItem* item = itemAt(QPoint(pos.x() - viewportPos.x(), pos.y() - viewportPos.y())); + const TQPoint& pos = event->globalPos(); + const TQPoint viewportPos = viewport()->mapToGlobal(TQPoint(0, 0)); + TQListViewItem* item = itemAt(TQPoint(pos.x() - viewportPos.x(), pos.y() - viewportPos.y())); if ((item != 0) && isOnFilename(item, pos)) { 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) { drawRubber(); @@ -425,8 +425,8 @@ void DolphinDetailsView::contentsMouseReleaseEvent(QMouseEvent* event) } if (m_scrollTimer != 0) { - disconnect(m_scrollTimer, SIGNAL(timeout()), - this, SLOT(slotAutoScroll())); + disconnect(m_scrollTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotAutoScroll())); m_scrollTimer->stop(); delete m_scrollTimer; m_scrollTimer = 0; @@ -435,13 +435,13 @@ void DolphinDetailsView::contentsMouseReleaseEvent(QMouseEvent* event) KFileDetailView::contentsMouseReleaseEvent(event); } -void DolphinDetailsView::paintEmptyArea(QPainter* painter, const QRect& rect) +void DolphinDetailsView::paintEmptyArea(TQPainter* painter, const TQRect& rect) { if (m_dolphinView->isActive()) { KFileDetailView::paintEmptyArea(painter, rect); } else { - const QBrush brush(colorGroup().background()); + const TQBrush brush(tqcolorGroup().background()); painter->fillRect(rect, brush); } } @@ -457,28 +457,28 @@ void DolphinDetailsView::drawRubber() return; } - QPainter p; + TQPainter p; p.begin(viewport()); p.setRasterOp(NotROP); - p.setPen(QPen(color0, 1)); + p.setPen(TQPen(color0, 1)); p.setBrush(NoBrush); - QPoint point(m_rubber->x(), m_rubber->y()); + TQPoint point(m_rubber->x(), m_rubber->y()); point = contentsToViewport(point); - style().drawPrimitive(QStyle::PE_FocusRect, &p, - QRect(point.x(), point.y(), m_rubber->width(), m_rubber->height()), - colorGroup(), QStyle::Style_Default, colorGroup().base()); + tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, &p, + TQRect(point.x(), point.y(), m_rubber->width(), m_rubber->height()), + tqcolorGroup(), TQStyle::Style_Default, tqcolorGroup().base()); p.end(); } -void DolphinDetailsView::viewportPaintEvent(QPaintEvent* paintEvent) +void DolphinDetailsView::viewportPaintEvent(TQPaintEvent* paintEvent) { drawRubber(); KFileDetailView::viewportPaintEvent(paintEvent); drawRubber(); } -void DolphinDetailsView::leaveEvent(QEvent* event) +void DolphinDetailsView::leaveEvent(TQEvent* event) { KFileDetailView::leaveEvent(event); slotOnViewport(); @@ -489,25 +489,25 @@ void DolphinDetailsView::slotActivationUpdate() update(); // TODO: there must be a simpler way to say - // "update all children" - const QObjectList* list = children(); - if (list == 0) { + // "update all tqchildren" + const TQObjectList list = childrenListObject(); + if (list.isEmpty()) { return; } - QObjectListIterator it(*list); - QObject* object = 0; + TQObjectListIterator it(list); + TQObject* object = 0; while ((object = it.current()) != 0) { - if (object->inherits("QWidget")) { - QWidget* widget = static_cast<QWidget*>(object); + if (object->inherits(TQWIDGET_OBJECT_NAME_STRING)) { + TQWidget* widget = TQT_TQWIDGET(object); widget->update(); } ++it; } } -void DolphinDetailsView::slotContextMenuRequested(QListViewItem* item, - const QPoint& pos, +void DolphinDetailsView::slotContextMenuRequested(TQListViewItem* item, + const TQPoint& pos, int /* col */) { KFileItem* fileInfo = 0; @@ -531,8 +531,8 @@ void DolphinDetailsView::slotAutoScroll() // (Copyright (C) 1998, 1999 Torben Weis <[email protected]> // 2001, 2002, 2004 Michael Brade <[email protected]>) - const QPoint pos(viewport()->mapFromGlobal(QCursor::pos())); - const QPoint vc(viewportToContents(pos)); + const TQPoint pos(viewport()->mapFromGlobal(TQCursor::pos())); + const TQPoint vc(viewportToContents(pos)); if (vc == m_rubber->bottomRight()) { return; @@ -542,20 +542,20 @@ void DolphinDetailsView::slotAutoScroll() m_rubber->setBottomRight(vc); - QListViewItem* item = itemAt(QPoint(0,0)); + TQListViewItem* item = itemAt(TQPoint(0,0)); const bool block = signalsBlocked(); blockSignals(true); - const QRect rubber(m_rubber->normalize()); + const TQRect rubber(m_rubber->normalize()); const int bottom = contentsY() + visibleHeight() - 1; // select all items which intersect with the rubber, deselect all others bool bottomReached = false; while ((item != 0) && !bottomReached) { - QRect rect(itemRect(item)); + TQRect rect(tqitemRect(item)); rect.setWidth(filenameWidth(item)); - rect = QRect(viewportToContents(rect.topLeft()), + rect = TQRect(viewportToContents(rect.topLeft()), viewportToContents(rect.bottomRight())); if (rect.isValid() && (rect.top() <= bottom)) { 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 const int scrollMargin = 40; ensureVisible(vc.x(), vc.y(), scrollMargin, scrollMargin); - const bool scroll = !QRect(scrollMargin, + const bool scroll = !TQRect(scrollMargin, scrollMargin, viewport()->width() - 2 * scrollMargin, - viewport()->height() - 2 * scrollMargin).contains(pos); + viewport()->height() - 2 * scrollMargin).tqcontains(pos); if (scroll) { if (m_scrollTimer == 0) { - m_scrollTimer = new QTimer( this ); - connect(m_scrollTimer, SIGNAL(timeout()), - this, SLOT(slotAutoScroll())); + m_scrollTimer = new TQTimer( this ); + connect(m_scrollTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotAutoScroll())); m_scrollTimer->start(100, false); } } else if (m_scrollTimer != 0) { - disconnect(m_scrollTimer, SIGNAL(timeout()), - this, SLOT(slotAutoScroll())); + disconnect(m_scrollTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotAutoScroll())); m_scrollTimer->stop(); delete m_scrollTimer; m_scrollTimer = 0; @@ -605,8 +605,8 @@ void DolphinDetailsView::updateColumnsWidth() // the column must be available, so that the header is readable. // TODO: use header data instead of the hardcoded 64 value... int columnWidth = 64; - QFontMetrics fontMetrics(font()); - for (QListViewItem* item = firstChild(); item != 0; item = item->nextSibling()) { + TQFontMetrics fontMetrics(font()); + for (TQListViewItem* item = firstChild(); item != 0; item = item->nextSibling()) { const int width = item->width(fontMetrics, this, i); if (width > columnWidth) { columnWidth = width; @@ -626,8 +626,8 @@ void DolphinDetailsView::updateColumnsWidth() setColumnWidth(0, firstColumnWidth); } -void DolphinDetailsView::slotItemRenamed(QListViewItem* item, - const QString& name, +void DolphinDetailsView::slotItemRenamed(TQListViewItem* item, + const TQString& name, int /* column */) { KFileItem* fileInfo = static_cast<KFileListViewItem*>(item)->fileInfo(); @@ -636,7 +636,7 @@ void DolphinDetailsView::slotItemRenamed(QListViewItem* item, 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 // 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. @@ -650,15 +650,15 @@ void DolphinDetailsView::slotHeaderClicked(int /* section */) default: break; } - const Qt::SortOrder currSortOrder = sortOrder(); + const TQt::SortOrder currSortOrder = sortOrder(); // temporary adjust the sorting and sort order to different values... const DolphinView::Sorting tempSorting = (sorting == DolphinView::SortByName) ? DolphinView::SortBySize : DolphinView::SortByName; m_dolphinView->setSorting(tempSorting); - const Qt::SortOrder tempSortOrder = (currSortOrder == Qt::Ascending) ? - Qt::Descending : Qt::Ascending; + const TQt::SortOrder tempSortOrder = (currSortOrder == TQt::Ascending) ? + TQt::Descending : TQt::Ascending; m_dolphinView->setSortOrder(tempSortOrder); // ... 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) : - KFileListViewItem(parent, fileItem) + KFileListViewItem(tqparent, fileItem) { const int iconSize = DolphinSettings::instance().detailsView()->iconSize(); KFileItem* info = fileInfo(); @@ -683,14 +683,14 @@ DolphinDetailsView::DolphinListViewItem::DolphinListViewItem(QListView* parent, setText(SizeColumn, " - "); } else { - QString sizeText(KIO::convertSize(fileItem->size())); + TQString sizeText(KIO::convertSize(fileItem->size())); sizeText.append(" "); setText(SizeColumn, sizeText); } // 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 - // QListView::remove()). Therefore the columns are rearranged here. + // TQListView::remove()). Therefore the columns are rearranged here. const DolphinDetailsViewSettings* settings = DolphinSettings::instance().detailsView(); assert(settings != 0); @@ -709,42 +709,42 @@ DolphinDetailsView::DolphinListViewItem::~DolphinListViewItem() { } -void DolphinDetailsView::DolphinListViewItem::paintCell(QPainter* painter, - const QColorGroup& colorGroup, +void DolphinDetailsView::DolphinListViewItem::paintCell(TQPainter* painter, + const TQColorGroup& tqcolorGroup, int column, int cellWidth, - int alignment) + int tqalignment) { - const QListView* view = listView(); - const bool isActive = view->parent() == Dolphin::mainWin().activeView(); + const TQListView* view = listView(); + const bool isActive = TQT_BASE_OBJECT(view->tqparent()) == TQT_BASE_OBJECT(Dolphin::mainWin().activeView()); if (isSelected()) { // 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 // should be shown as selected. - QColorGroup defaultColorGroup(colorGroup); - const QColor highlightColor(isActive ? backgroundColor(column) : view->colorGroup().background()); - defaultColorGroup.setColor(QColorGroup::Highlight , highlightColor); - defaultColorGroup.setColor(QColorGroup::HighlightedText, colorGroup.color(QColorGroup::Text)); - KFileListViewItem::paintCell(painter, defaultColorGroup, column, cellWidth, alignment); + TQColorGroup defaultColorGroup(tqcolorGroup); + const TQColor highlightColor(isActive ? backgroundColor(column) : view->tqcolorGroup().background()); + defaultColorGroup.setColor(TQColorGroup::Highlight , highlightColor); + defaultColorGroup.setColor(TQColorGroup::HighlightedText, tqcolorGroup.color(TQColorGroup::Text)); + KFileListViewItem::paintCell(painter, defaultColorGroup, column, cellWidth, tqalignment); if (column == 0) { // draw the selection only on the first column - QListView* parent = listView(); - const int itemWidth = width(parent->fontMetrics(), parent, 0); + TQListView* tqparent = listView(); + const int itemWidth = width(tqparent->fontMetrics(), tqparent, 0); if (isActive) { - KFileListViewItem::paintCell(painter, colorGroup, column, itemWidth, alignment); + KFileListViewItem::paintCell(painter, tqcolorGroup, column, itemWidth, tqalignment); } else { - QListViewItem::paintCell(painter, colorGroup, column, itemWidth, alignment); + TQListViewItem::paintCell(painter, tqcolorGroup, column, itemWidth, tqalignment); } } } else { if (isActive) { - KFileListViewItem::paintCell(painter, colorGroup, column, cellWidth, alignment); + KFileListViewItem::paintCell(painter, tqcolorGroup, column, cellWidth, tqalignment); } 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, - const QColorGroup& colorGroup, - const QRect& rect) +void DolphinDetailsView::DolphinListViewItem::paintFocus(TQPainter* painter, + const TQColorGroup& tqcolorGroup, + const TQRect& rect) { // draw the focus consistently with the selection (see implementation notes // in DolphinListViewItem::paintCell) - QListView* parent = listView(); - int visibleWidth = width(parent->fontMetrics(), parent, 0); - const int colWidth = parent->columnWidth(0); + TQListView* tqparent = listView(); + int visibleWidth = width(tqparent->fontMetrics(), tqparent, 0); + const int colWidth = tqparent->columnWidth(0); if (visibleWidth > colWidth) { visibleWidth = colWidth; } - QRect focusRect(rect); + TQRect focusRect(rect); 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); diff --git a/src/dolphindetailsview.h b/src/dolphindetailsview.h index e1ee95f..5945796 100644 --- a/src/dolphindetailsview.h +++ b/src/dolphindetailsview.h @@ -24,8 +24,8 @@ #include <kfiledetailview.h> #include <itemeffectsmanager.h> -class QRect; -class QTimer; +class TQRect; +class TQTimer; class DolphinView; /** @@ -41,6 +41,7 @@ class DolphinView; class DolphinDetailsView : public KFileDetailView, public ItemEffectsManager { Q_OBJECT + TQ_OBJECT public: /** @@ -56,7 +57,7 @@ public: GroupColumn = 5 }; - DolphinDetailsView(DolphinView* parent); + DolphinDetailsView(DolphinView* tqparent); virtual ~DolphinDetailsView(); @@ -73,14 +74,14 @@ public: * @return True, if the position \a pos is above the name of * 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 * the details view. */ // 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). void refreshSettings(); @@ -108,7 +109,7 @@ public slots: virtual void resizeContents(int width, int height); /** Is connected to the onItem-signal from KFileDetailView. */ - void slotOnItem(QListViewItem* item); + void slotOnItem(TQListViewItem* item); /** Is connected to the onViewport-signal from KFileDetailView. */ void slotOnViewport(); @@ -116,10 +117,10 @@ public slots: protected: /** @see ItemEffectsManager::setContextPixmap() */ virtual void setContextPixmap(void* context, - const QPixmap& pixmap); + const TQPixmap& pixmap); /** @see ItemEffectsManager::setContextPixmap() */ - virtual const QPixmap* contextPixmap(void* context); + virtual const TQPixmap* contextPixmap(void* context); /** @see ItemEffectsManager::setContextPixmap() */ virtual void* firstContext(); @@ -131,48 +132,48 @@ protected: virtual KFileItem* contextFileInfo(void* context); /** @see KFileDetailView::contentsDragMoveEvent() */ - virtual void contentsDragMoveEvent(QDragMoveEvent* event); + virtual void contentsDragMoveEvent(TQDragMoveEvent* event); /** @see KFileDetailView::resizeEvent() */ - virtual void resizeEvent(QResizeEvent* event); + virtual void resizeEvent(TQResizeEvent* event); /** @see KFileDetailView::acceptDrag() */ - virtual bool acceptDrag (QDropEvent* event) const; + virtual bool acceptDrag (TQDropEvent* event) const; /** @see KFileDetailView::contentsDropEvent() */ - virtual void contentsDropEvent(QDropEvent* event); + virtual void contentsDropEvent(TQDropEvent* event); /** @see KFileDetailView::contentsMousePressEvent() */ - virtual void contentsMousePressEvent(QMouseEvent* event); + virtual void contentsMousePressEvent(TQMouseEvent* event); /** @see KFileDetailView::contentsMouseMoveEvent() */ - virtual void contentsMouseMoveEvent(QMouseEvent* event); + virtual void contentsMouseMoveEvent(TQMouseEvent* event); /** @see KFileDetailView::contentsMouseReleaseEvent() */ - virtual void contentsMouseReleaseEvent(QMouseEvent* event); + virtual void contentsMouseReleaseEvent(TQMouseEvent* event); - /** @see QListView::paintEmptyArea() */ - virtual void paintEmptyArea(QPainter* painter, const QRect& rect); + /** @see TQListView::paintEmptyArea() */ + virtual void paintEmptyArea(TQPainter* painter, const TQRect& rect); /** Draws the selection rubber. */ void drawRubber(); - /** @see QListView::viewportPaintEvent() */ - virtual void viewportPaintEvent(QPaintEvent* paintEvent); + /** @see TQListView::viewportPaintEvent() */ + virtual void viewportPaintEvent(TQPaintEvent* paintEvent); - /** @see QWidget::leaveEvent() */ - virtual void leaveEvent(QEvent* event); + /** @see TQWidget::leaveEvent() */ + virtual void leaveEvent(TQEvent* event); private slots: void slotActivationUpdate(); - void slotContextMenuRequested(QListViewItem* item, - const QPoint& pos, + void slotContextMenuRequested(TQListViewItem* item, + const TQPoint& pos, int col); void slotUpdateDisabledItems(); void slotAutoScroll(); void updateColumnsWidth(); - void slotItemRenamed(QListViewItem* item, - const QString& name, + void slotItemRenamed(TQListViewItem* item, + const TQString& name, int column); /** @@ -185,31 +186,31 @@ private slots: private: class DolphinListViewItem : public KFileListViewItem { public: - DolphinListViewItem(QListView* parent, + DolphinListViewItem(TQListView* tqparent, KFileItem* fileItem); virtual ~DolphinListViewItem(); - virtual void paintCell(QPainter* painter, - const QColorGroup& colorGroup, + virtual void paintCell(TQPainter* painter, + const TQColorGroup& tqcolorGroup, int column, int cellWidth, - int alignment); + int tqalignment); - virtual void paintFocus(QPainter* painter, - const QColorGroup& colorGroup, - const QRect& rect); + virtual void paintFocus(TQPainter* painter, + const TQColorGroup& tqcolorGroup, + const TQRect& rect); }; DolphinView* m_dolphinView; - QTimer* m_resizeTimer; - QTimer* m_scrollTimer; - QRect* m_rubber; + TQTimer* m_resizeTimer; + TQTimer* m_scrollTimer; + TQRect* m_rubber; /** * Returns the width of the filename in pixels including * the icon. It is assured that the returned width is * <= the width of the filename column. */ - int filenameWidth(const QListViewItem* item) const; + int filenameWidth(const TQListViewItem* item) const; }; diff --git a/src/dolphindetailsviewsettings.cpp b/src/dolphindetailsviewsettings.cpp index 005ebf0..5575ebc 100644 --- a/src/dolphindetailsviewsettings.cpp +++ b/src/dolphindetailsviewsettings.cpp @@ -53,7 +53,7 @@ DolphinDetailsViewSettings::DolphinDetailsViewSettings() : m_fontSize = config->readNumEntry("Font Size", -1); m_fontFamily = config->readEntry("Font Family"); - const QFont font(KGlobalSettings::generalFont()); + const TQFont font(KGlobalSettings::generalFont()); if (m_fontSize < 0) { m_fontSize = font.pointSize(); } diff --git a/src/dolphindetailsviewsettings.h b/src/dolphindetailsviewsettings.h index d296f96..c516bad 100644 --- a/src/dolphindetailsviewsettings.h +++ b/src/dolphindetailsviewsettings.h @@ -21,8 +21,8 @@ #ifndef DOLPHINDETAILSVIEWSETTINGS_H #define DOLPHINDETAILSVIEWSETTINGS_H -#include <qstring.h> -#include <qnamespace.h> +#include <tqstring.h> +#include <tqnamespace.h> #include <dolphinsettingsbase.h> /** @@ -52,8 +52,8 @@ public: void setIconSize(int size) { m_iconSize = size; } int iconSize() const { return m_iconSize; } - void setFontFamily(const QString& family) { m_fontFamily = family; } - const QString& fontFamily() const { return m_fontFamily; } + void setFontFamily(const TQString& family) { m_fontFamily = family; } + const TQString& fontFamily() const { return m_fontFamily; } void setFontSize(int size) { m_fontSize = size; } int fontSize() const { return m_fontSize; } @@ -65,7 +65,7 @@ private: int m_columnEnabled; int m_iconSize; int m_fontSize; - QString m_fontFamily; + TQString m_fontFamily; }; #endif diff --git a/src/dolphindirlister.h b/src/dolphindirlister.h index 8d49d98..a72c3f0 100644 --- a/src/dolphindirlister.h +++ b/src/dolphindirlister.h @@ -32,6 +32,7 @@ class DolphinDirLister : public KDirLister { Q_OBJECT + TQ_OBJECT public: DolphinDirLister(); @@ -39,7 +40,7 @@ public: signals: /** Is emitted whenever an error occured. */ - void errorMessage(const QString& msg); + void errorMessage(const TQString& msg); protected: virtual void handleError(KIO::Job* job); diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp index 7a2489b..7ddc762 100644 --- a/src/dolphiniconsview.cpp +++ b/src/dolphiniconsview.cpp @@ -19,13 +19,13 @@ ***************************************************************************/ #include "dolphiniconsview.h" -#include <qpainter.h> +#include <tqpainter.h> #include <kiconeffect.h> #include <kapplication.h> -#include <qobjectlist.h> +#include <tqobjectlist.h> #include <kglobalsettings.h> #include <kurldrag.h> -#include <qclipboard.h> +#include <tqclipboard.h> #include <assert.h> #include <kaction.h> #include <kstdaction.h> @@ -38,35 +38,35 @@ #include "dolphinsettings.h" #include "dolphiniconsviewsettings.h" -DolphinIconsView::DolphinIconsView(DolphinView* parent, LayoutMode layoutMode) : - KFileIconView(parent, 0), +DolphinIconsView::DolphinIconsView(DolphinView* tqparent, LayoutMode tqlayoutMode) : + KFileIconView(tqparent, 0), m_previewIconSize(-1), - m_layoutMode(layoutMode), - m_dolphinView(parent) + m_tqlayoutMode(tqlayoutMode), + m_dolphinView(tqparent) { setAcceptDrops(true); setMode(KIconView::Execute); setSelectionMode(KFile::Extended); Dolphin& dolphin = Dolphin::mainWin(); - connect(this, SIGNAL(onItem(QIconViewItem*)), - this, SLOT(slotOnItem(QIconViewItem*))); - connect(this, SIGNAL(onViewport()), - this, SLOT(slotOnViewport())); - connect(this, SIGNAL(contextMenuRequested(QIconViewItem*, const QPoint&)), - this, SLOT(slotContextMenuRequested(QIconViewItem*, const QPoint&))); - connect(this, SIGNAL(selectionChanged()), - &dolphin, SLOT(slotSelectionChanged())); - connect(&dolphin, SIGNAL(activeViewChanged()), - this, SLOT(slotActivationUpdate())); - connect(this, SIGNAL(itemRenamed(QIconViewItem*, const QString&)), - this, SLOT(slotItemRenamed(QIconViewItem*, const QString&))); - connect(this, SIGNAL(dropped(QDropEvent*, const KURL::List&, const KURL&)), - parent, SLOT(slotURLListDropped(QDropEvent*, const KURL::List&, const KURL&))); - - QClipboard* clipboard = QApplication::clipboard(); - connect(clipboard, SIGNAL(dataChanged()), - this, SLOT(slotUpdateDisabledItems())); + connect(this, TQT_SIGNAL(onItem(TQIconViewItem*)), + this, TQT_SLOT(slotOnItem(TQIconViewItem*))); + connect(this, TQT_SIGNAL(onViewport()), + this, TQT_SLOT(slotOnViewport())); + connect(this, TQT_SIGNAL(contextMenuRequested(TQIconViewItem*, const TQPoint&)), + this, TQT_SLOT(slotContextMenuRequested(TQIconViewItem*, const TQPoint&))); + connect(this, TQT_SIGNAL(selectionChanged()), + &dolphin, TQT_SLOT(slotSelectionChanged())); + connect(&dolphin, TQT_SIGNAL(activeViewChanged()), + this, TQT_SLOT(slotActivationUpdate())); + connect(this, TQT_SIGNAL(itemRenamed(TQIconViewItem*, const TQString&)), + this, TQT_SLOT(slotItemRenamed(TQIconViewItem*, const TQString&))); + connect(this, TQT_SIGNAL(dropped(TQDropEvent*, const KURL::List&, const KURL&)), + tqparent, TQT_SLOT(slotURLListDropped(TQDropEvent*, const KURL::List&, const KURL&))); + + TQClipboard* clipboard = TQApplication::tqclipboard(); + connect(clipboard, TQT_SIGNAL(dataChanged()), + this, TQT_SLOT(slotUpdateDisabledItems())); // KFileIconView creates two actions for zooming, which are directly connected to the // slots KFileIconView::zoomIn() and KFileIconView::zoomOut(). As this behavior is not @@ -81,7 +81,7 @@ DolphinIconsView::DolphinIconsView(DolphinView* parent, LayoutMode layoutMode) : setItemsMovable(true); setWordWrapIconText(true); - if (m_layoutMode == Previews) { + if (m_tqlayoutMode == Previews) { showPreviews(); } refreshSettings(); @@ -93,8 +93,8 @@ DolphinIconsView::~DolphinIconsView() void DolphinIconsView::setLayoutMode(LayoutMode mode) { - if (m_layoutMode != mode) { - m_layoutMode = mode; + if (m_tqlayoutMode != mode) { + m_tqlayoutMode = mode; refreshSettings(); } } @@ -111,7 +111,7 @@ void DolphinIconsView::endItemUpdates() // 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 // future releases. - QTimer::singleShot(300, this, SLOT(slotUpdateDisabledItems())); + TQTimer::singleShot(300, this, TQT_SLOT(slotUpdateDisabledItems())); const KFileIconViewItem* item = static_cast<const KFileIconViewItem*>(firstItem()); if (item != 0) { @@ -119,7 +119,7 @@ void DolphinIconsView::endItemUpdates() } int index = 0; - const QValueList<URLNavigator::HistoryElem> history = m_dolphinView->urlHistory(index); + const TQValueList<URLNavigator::HistoryElem> history = m_dolphinView->urlHistory(index); if (!history.isEmpty()) { KFileView* fileView = static_cast<KFileView*>(this); fileView->setCurrentItem(history[index].currentFileName()); @@ -129,15 +129,15 @@ void DolphinIconsView::endItemUpdates() void DolphinIconsView::refreshSettings() { - const DolphinIconsViewSettings* settings = DolphinSettings::instance().iconsView(m_layoutMode); + const DolphinIconsViewSettings* settings = DolphinSettings::instance().iconsView(m_tqlayoutMode); assert(settings != 0); setIconSize(settings->iconSize()); - const QIconView::Arrangement arrangement = settings->arrangement(); - const QIconView::ItemTextPos textPos = (arrangement == QIconView::LeftToRight) ? - QIconView::Bottom : - QIconView::Right; + const TQIconView::Arrangement arrangement = settings->arrangement(); + const TQIconView::ItemTextPos textPos = (arrangement == TQIconView::LeftToRight) ? + TQIconView::Bottom : + TQIconView::Right; setArrangement(arrangement); setItemTextPos(textPos); @@ -145,13 +145,13 @@ void DolphinIconsView::refreshSettings() setGridY(settings->gridHeight()); setSpacing(settings->gridSpacing()); - QFont adjustedFont(font()); + TQFont adjustedFont(font()); adjustedFont.setFamily(settings->fontFamily()); adjustedFont.setPointSize(settings->fontSize()); setFont(adjustedFont); setIconTextHeight(settings->textlinesCount()); - if (m_layoutMode == Previews) { + if (m_tqlayoutMode == Previews) { // There is no getter method for the current size in KFileIconView. To // prevent a flickering the current size is stored in m_previewIconSize and // setPreviewSize is only invoked if the size really has changed. @@ -168,13 +168,13 @@ void DolphinIconsView::refreshSettings() void DolphinIconsView::zoomIn() { if (isZoomInPossible()) { - DolphinIconsViewSettings* settings = DolphinSettings::instance().iconsView(m_layoutMode); + DolphinIconsViewSettings* settings = DolphinSettings::instance().iconsView(m_tqlayoutMode); const int textWidthHint = settings->textWidthHint(); const int iconSize = increasedIconSize(settings->iconSize()); settings->setIconSize(iconSize); - if (m_layoutMode == Previews) { + if (m_tqlayoutMode == Previews) { const int previewSize = increasedIconSize(settings->previewSize()); settings->setPreviewSize(previewSize); } @@ -187,13 +187,13 @@ void DolphinIconsView::zoomIn() void DolphinIconsView::zoomOut() { if (isZoomOutPossible()) { - DolphinIconsViewSettings* settings = DolphinSettings::instance().iconsView(m_layoutMode); + DolphinIconsViewSettings* settings = DolphinSettings::instance().iconsView(m_tqlayoutMode); const int textWidthHint = settings->textWidthHint(); const int iconSize = decreasedIconSize(settings->iconSize()); settings->setIconSize(iconSize); - if (m_layoutMode == Previews) { + if (m_tqlayoutMode == Previews) { const int previewSize = decreasedIconSize(settings->previewSize()); settings->setPreviewSize(previewSize); } @@ -205,14 +205,14 @@ void DolphinIconsView::zoomOut() bool DolphinIconsView::isZoomInPossible() const { - DolphinIconsViewSettings* settings = DolphinSettings::instance().iconsView(m_layoutMode); - const int size = (m_layoutMode == Icons) ? settings->iconSize() : settings->previewSize(); + DolphinIconsViewSettings* settings = DolphinSettings::instance().iconsView(m_tqlayoutMode); + const int size = (m_tqlayoutMode == Icons) ? settings->iconSize() : settings->previewSize(); return size < KIcon::SizeEnormous; } bool DolphinIconsView::isZoomOutPossible() const { - DolphinIconsViewSettings* settings = DolphinSettings::instance().iconsView(m_layoutMode); + DolphinIconsViewSettings* settings = DolphinSettings::instance().iconsView(m_tqlayoutMode); return settings->iconSize() > KIcon::SizeSmall; } @@ -221,21 +221,21 @@ void DolphinIconsView::arrangeItemsInGrid( bool 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 // 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 // as this functionality is not used by any KDE3 application and the core developers are // busy enough for KDE4 now :-) - KFileIconViewItem* item = static_cast<KFileIconViewItem*>(QIconView::firstItem()); - QString mimetype; + KFileIconViewItem* item = static_cast<KFileIconViewItem*>(TQIconView::firstItem()); + TQString mimetype; while (item != 0) { mimetype = item->fileInfo()->mimetype(); - const bool fixSize = mimetype.contains("text") || - mimetype.contains("application/x-"); + const bool fixSize = mimetype.tqcontains("text") || + mimetype.tqcontains("application/x-"); if (fixSize) { - item->setPixmapSize(QSize(m_previewIconSize, m_previewIconSize)); + item->setPixmapSize(TQSize(m_previewIconSize, m_previewIconSize)); } item = static_cast<KFileIconViewItem *>(item->nextItem()); } @@ -243,12 +243,12 @@ void DolphinIconsView::arrangeItemsInGrid( bool updated ) } void DolphinIconsView::setContextPixmap(void* context, - const QPixmap& pixmap) + const TQPixmap& 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(); } @@ -269,7 +269,7 @@ KFileItem* DolphinIconsView::contextFileInfo(void* context) return reinterpret_cast<KFileIconViewItem*>(context)->fileInfo(); } -void DolphinIconsView::contentsMousePressEvent(QMouseEvent* event) +void DolphinIconsView::contentsMousePressEvent(TQMouseEvent* event) { KFileIconView::contentsMousePressEvent(event); resetActivatedItem(); @@ -277,7 +277,7 @@ void DolphinIconsView::contentsMousePressEvent(QMouseEvent* event) m_dolphinView->statusBar()->clear(); } -void DolphinIconsView::contentsMouseReleaseEvent(QMouseEvent* event) +void DolphinIconsView::contentsMouseReleaseEvent(TQMouseEvent* event) { KFileIconView::contentsMouseReleaseEvent(event); @@ -287,18 +287,18 @@ void DolphinIconsView::contentsMouseReleaseEvent(QMouseEvent* event) Dolphin::mainWin().slotSelectionChanged(); } -void DolphinIconsView::drawBackground(QPainter* painter, const QRect& rect) +void DolphinIconsView::drawBackground(TQPainter* painter, const TQRect& rect) { if (m_dolphinView->isActive()) { KFileIconView::drawBackground(painter, rect); } else { - const QBrush brush(colorGroup().background()); + const TQBrush brush(tqcolorGroup().background()); painter->fillRect(0, 0, width(), height(), brush); } } -QDragObject* DolphinIconsView::dragObject() +TQDragObject* DolphinIconsView::dragObject() { KURL::List urls; KFileItemListIterator it(*KFileView::selectedItems()); @@ -307,7 +307,7 @@ QDragObject* DolphinIconsView::dragObject() ++it; } - QPixmap pixmap; + TQPixmap pixmap; if(urls.count() > 1) { pixmap = DesktopIcon("kmultiple", iconSize()); } @@ -322,12 +322,12 @@ QDragObject* DolphinIconsView::dragObject() pixmap = currentFileItem()->pixmap(iconSize()); } - QDragObject* dragObj = new KURLDrag(urls, widget()); + TQDragObject* dragObj = new KURLDrag(urls, widget()); dragObj->setPixmap(pixmap); return dragObj; } -void DolphinIconsView::contentsDragEnterEvent(QDragEnterEvent* event) +void DolphinIconsView::contentsDragEnterEvent(TQDragEnterEvent* event) { // TODO: The method KFileIconView::contentsDragEnterEvent() does // 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) && - (event->action() == QDropEvent::Copy || - event->action() == QDropEvent::Move || - event->action() == QDropEvent::Link ); + (event->action() == TQDropEvent::Copy || + event->action() == TQDropEvent::Move || + event->action() == TQDropEvent::Link ); if (accept) { event->acceptAction(); } @@ -354,13 +354,13 @@ void DolphinIconsView::contentsDragEnterEvent(QDragEnterEvent* event) } } -void DolphinIconsView::contentsDragMoveEvent(QDragMoveEvent* event) +void DolphinIconsView::contentsDragMoveEvent(TQDragMoveEvent* event) { KFileIconView::contentsDragMoveEvent(event); // If a dragging is done above a directory, show the icon as 'active' for // a visual feedback - KFileIconViewItem* item = static_cast<KFileIconViewItem*>(findItem(contentsToViewport(event->pos()))); + KFileIconViewItem* item = static_cast<KFileIconViewItem*>(tqfindItem(contentsToViewport(event->pos()))); bool showActive = false; 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 // KFileIconView::contentsDropEvent. See comment in @@ -387,11 +387,11 @@ void DolphinIconsView::contentsDropEvent(QDropEvent* event) 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) && - (event->action() == QDropEvent::Copy || - event->action() == QDropEvent::Move || - event->action() == QDropEvent::Link ) && + (event->action() == TQDropEvent::Copy || + event->action() == TQDropEvent::Move || + event->action() == TQDropEvent::Link ) && (item != 0); if (!accept) { return; @@ -410,7 +410,7 @@ void DolphinIconsView::contentsDropEvent(QDropEvent* event) } } -void DolphinIconsView::slotOnItem(QIconViewItem* item) +void DolphinIconsView::slotOnItem(TQIconViewItem* item) { assert(item != 0); activateItem(reinterpret_cast<void*>(item)); @@ -425,8 +425,8 @@ void DolphinIconsView::slotOnViewport() m_dolphinView->requestItemInfo(KURL()); } -void DolphinIconsView::slotContextMenuRequested(QIconViewItem* item, - const QPoint& pos) +void DolphinIconsView::slotContextMenuRequested(TQIconViewItem* item, + const TQPoint& pos) { KFileItem* fileInfo = 0; if (item != 0) { @@ -435,8 +435,8 @@ void DolphinIconsView::slotContextMenuRequested(QIconViewItem* item, m_dolphinView->openContextMenu(fileInfo, pos); } -void DolphinIconsView::slotItemRenamed(QIconViewItem* item, - const QString& name) +void DolphinIconsView::slotItemRenamed(TQIconViewItem* item, + const TQString& name) { KFileItem* fileInfo = static_cast<KFileIconViewItem*>(item)->fileInfo(); m_dolphinView->rename(KURL(fileInfo->url()), name); @@ -447,17 +447,17 @@ void DolphinIconsView::slotActivationUpdate() update(); // TODO: there must be a simpler way to say - // "update all children" - const QObjectList* list = children(); - if (list == 0) { + // "update all tqchildren" + const TQObjectList list = childrenListObject(); + if (list.isEmpty()) { return; } - QObjectListIterator it(*list); - QObject* object = 0; + TQObjectListIterator it(list); + TQObject* object = 0; while ((object = it.current()) != 0) { - if (object->inherits("QWidget")) { - QWidget* widget = static_cast<QWidget*>(object); + if (object->inherits(TQWIDGET_OBJECT_NAME_STRING)) { + TQWidget* widget = TQT_TQWIDGET(object); widget->update(); } ++it; diff --git a/src/dolphiniconsview.h b/src/dolphiniconsview.h index 9be2102..adfd512 100644 --- a/src/dolphiniconsview.h +++ b/src/dolphiniconsview.h @@ -22,7 +22,7 @@ #define DOLPHINICONSVIEW_H #include <kfileiconview.h> -#include <qpixmap.h> +#include <tqpixmap.h> #include <kurl.h> #include <itemeffectsmanager.h> @@ -39,6 +39,7 @@ class DolphinView; class DolphinIconsView : public KFileIconView, public ItemEffectsManager { Q_OBJECT + TQ_OBJECT public: enum LayoutMode { @@ -46,12 +47,12 @@ public: Previews }; - DolphinIconsView(DolphinView *parent, LayoutMode layoutMode); + DolphinIconsView(DolphinView *tqparent, LayoutMode tqlayoutMode); virtual ~DolphinIconsView(); void setLayoutMode(LayoutMode mode); - LayoutMode layoutMode() const { return m_layoutMode; } + LayoutMode tqlayoutMode() const { return m_tqlayoutMode; } /** @see ItemEffectsManager::updateItems */ virtual void beginItemUpdates(); @@ -64,7 +65,7 @@ public: * the details view. */ // 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). void refreshSettings(); @@ -82,7 +83,7 @@ public: 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 */ virtual void arrangeItemsInGrid(bool updated = true); @@ -97,10 +98,10 @@ signals: protected: /** @see ItemEffectsManager::setContextPixmap */ virtual void setContextPixmap(void* context, - const QPixmap& pixmap); + const TQPixmap& pixmap); /** @see ItemEffectsManager::contextPixmap */ - virtual const QPixmap* contextPixmap(void* context); + virtual const TQPixmap* contextPixmap(void* context); /** @see ItemEffectsManager::firstContext */ virtual void* firstContext(); @@ -112,29 +113,29 @@ protected: virtual KFileItem* contextFileInfo(void* context); /** @see KFileIconView::contentsMousePressEvent */ - virtual void contentsMousePressEvent(QMouseEvent* event); + virtual void contentsMousePressEvent(TQMouseEvent* event); /** @see KFileIconView::contentsMouseReleaseEvent */ - virtual void contentsMouseReleaseEvent(QMouseEvent* event); + virtual void contentsMouseReleaseEvent(TQMouseEvent* event); /** @see KFileIconView::drawBackground */ - virtual void drawBackground(QPainter* painter, const QRect& rect); + virtual void drawBackground(TQPainter* painter, const TQRect& rect); /** @see KFileIconView::dragObject */ - virtual QDragObject* dragObject(); + virtual TQDragObject* dragObject(); /** @see KFileIconView::contentsDragEnterEvent */ - virtual void contentsDragEnterEvent(QDragEnterEvent* event); + virtual void contentsDragEnterEvent(TQDragEnterEvent* event); /** @see KFileIconView::contentsDragMoveEvent */ - virtual void contentsDragMoveEvent(QDragMoveEvent* event); + virtual void contentsDragMoveEvent(TQDragMoveEvent* event); /** @see KFileIconView::contentsDropEvent */ - virtual void contentsDropEvent(QDropEvent* event); + virtual void contentsDropEvent(TQDropEvent* event); private slots: /** Is connected to the onItem-signal from KFileIconView. */ - void slotOnItem(QIconViewItem* item); + void slotOnItem(TQIconViewItem* item); /** Is connected to the onViewport-signal from KFileIconView. */ void slotOnViewport(); @@ -143,19 +144,19 @@ private slots: * Opens the context menu for the item \a item on the given * position \a pos. */ - void slotContextMenuRequested(QIconViewItem* item, - const QPoint& pos); + void slotContextMenuRequested(TQIconViewItem* item, + const TQPoint& pos); /** Renames the item \a item to the name \a name. */ - void slotItemRenamed(QIconViewItem* item, - const QString& name); + void slotItemRenamed(TQIconViewItem* item, + const TQString& name); void slotActivationUpdate(); void slotUpdateDisabledItems(); private: int m_previewIconSize; - LayoutMode m_layoutMode; + LayoutMode m_tqlayoutMode; DolphinView* m_dolphinView; /** Returns the increased icon size for the size \a size. */ diff --git a/src/dolphiniconsviewsettings.cpp b/src/dolphiniconsviewsettings.cpp index d47f0f7..e764e70 100644 --- a/src/dolphiniconsviewsettings.cpp +++ b/src/dolphiniconsviewsettings.cpp @@ -25,8 +25,8 @@ #include <assert.h> DolphinIconsViewSettings::DolphinIconsViewSettings(DolphinIconsView::LayoutMode mode) : - m_arrangement(QIconView::LeftToRight), - m_layoutMode(mode), + m_arrangement(TQIconView::LeftToRight), + m_tqlayoutMode(mode), m_iconSize(KIcon::SizeMedium), m_previewSize(KIcon::SizeMedium), m_gridWidth(0), @@ -45,12 +45,12 @@ DolphinIconsViewSettings::DolphinIconsViewSettings(DolphinIconsView::LayoutMode } // read arrangement - const QString arrangement(config->readEntry("Arrangement")); + const TQString arrangement(config->readEntry("Arrangement")); if (arrangement == "Left to Right") { - m_arrangement = QIconView::LeftToRight; + m_arrangement = TQIconView::LeftToRight; } else if (arrangement == "Top to Bottom") { - m_arrangement = QIconView::TopToBottom; + m_arrangement = TQIconView::TopToBottom; } // read preview size, grid width and grid height @@ -79,7 +79,7 @@ DolphinIconsViewSettings::DolphinIconsViewSettings(DolphinIconsView::LayoutMode m_fontSize = config->readNumEntry("Font Size", -1); m_fontFamily = config->readEntry("Font Family"); - const QFont font(KGlobalSettings::generalFont()); + const TQFont font(KGlobalSettings::generalFont()); if (m_fontSize < 0) { m_fontSize = font.pointSize(); } @@ -121,7 +121,7 @@ void DolphinIconsViewSettings::save() setConfigGroup(config); config->writeEntry("Icon Size", m_iconSize); - if (m_arrangement == QIconView::LeftToRight) { + if (m_arrangement == TQIconView::LeftToRight) { config->writeEntry("Arrangement", "Left to Right"); } else { @@ -140,7 +140,7 @@ void DolphinIconsViewSettings::save() void DolphinIconsViewSettings::calculateGridSize(int hint) { 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); if (widthUnit < KIcon::SizeLarge) { widthUnit = KIcon::SizeLarge; @@ -157,7 +157,7 @@ void DolphinIconsViewSettings::calculateGridSize(int hint) } } else { - assert(m_arrangement == QIconView::TopToBottom); + assert(m_arrangement == TQIconView::TopToBottom); m_gridWidth = maxSize + (hint + 1) * (8 * m_fontSize); // 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; int hint = 0; - if (m_arrangement == QIconView::LeftToRight) { + if (m_arrangement == TQIconView::LeftToRight) { int widthUnit = maxSize + (maxSize / 2); if (widthUnit < KIcon::SizeLarge) { widthUnit = KIcon::SizeLarge; @@ -178,7 +178,7 @@ int DolphinIconsViewSettings::textWidthHint() const hint = (m_gridWidth - widthUnit) / KIcon::SizeLarge; } else { - assert(m_arrangement == QIconView::TopToBottom); + assert(m_arrangement == TQIconView::TopToBottom); hint = (m_gridWidth - maxSize) / (8 * m_fontSize) - 1; if (hint > 2) { hint = 2; @@ -189,7 +189,7 @@ int DolphinIconsViewSettings::textWidthHint() const void DolphinIconsViewSettings::setConfigGroup(KConfig* config) { - if (m_layoutMode == DolphinIconsView::Previews) { + if (m_tqlayoutMode == DolphinIconsView::Previews) { config->setGroup("Previews Mode"); } else { diff --git a/src/dolphiniconsviewsettings.h b/src/dolphiniconsviewsettings.h index ec63677..cc78074 100644 --- a/src/dolphiniconsviewsettings.h +++ b/src/dolphiniconsviewsettings.h @@ -20,8 +20,8 @@ #ifndef DOLPHINICONSVIEWSETTINGS_H #define DOLPHINICONSVIEWSETTINGS_H -#include <qstring.h> -#include <qiconview.h> +#include <tqstring.h> +#include <tqiconview.h> #include <dolphinview.h> #include <dolphiniconsview.h> #include <dolphinsettingsbase.h> @@ -30,7 +30,7 @@ * @brief Contains the settings for the icons view. * * The following properties are stored: - * - layout mode (icons or previews) + * - tqlayout mode (icons or previews) * - icon size * - preview size * - grid width, height and spacing @@ -69,11 +69,11 @@ public: void setGridSpacing(int spacing); int gridSpacing() const { return m_gridSpacing; } - void setArrangement(QIconView::Arrangement arrangement) { m_arrangement = arrangement; } - QIconView::Arrangement arrangement() const { return m_arrangement; } + void setArrangement(TQIconView::Arrangement arrangement) { m_arrangement = arrangement; } + TQIconView::Arrangement arrangement() const { return m_arrangement; } - void setFontFamily(const QString& family) { m_fontFamily = family; } - const QString& fontFamily() const { return m_fontFamily; } + void setFontFamily(const TQString& family) { m_fontFamily = family; } + const TQString& fontFamily() const { return m_fontFamily; } void setFontSize(int size) { m_fontSize = size; } int fontSize() const { return m_fontSize; } @@ -92,11 +92,11 @@ public: * DolhinIconsViewSettings::textWidthHint. * * 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 * 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 - * ignored for the top-to-bottom arrangement inside QIconView). + * ignored for the top-to-bottom arrangement inside TQIconView). */ void calculateGridSize(int hint); @@ -109,8 +109,8 @@ public: int textWidthHint() const; private: - QIconView::Arrangement m_arrangement; - DolphinIconsView::LayoutMode m_layoutMode; + TQIconView::Arrangement m_arrangement; + DolphinIconsView::LayoutMode m_tqlayoutMode; int m_iconSize; int m_previewSize; int m_gridWidth; @@ -118,7 +118,7 @@ private: int m_gridSpacing; int m_fontSize; int m_textlinesCount; - QString m_fontFamily; + TQString m_fontFamily; void setConfigGroup(KConfig* config); }; diff --git a/src/dolphinsettings.cpp b/src/dolphinsettings.cpp index 01ef80e..1b13d2b 100644 --- a/src/dolphinsettings.cpp +++ b/src/dolphinsettings.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ #include "dolphinsettings.h" -#include <qdir.h> +#include <tqdir.h> #include <kapplication.h> #include <kbookmark.h> @@ -55,7 +55,7 @@ DolphinSettings::DolphinSettings() : { KConfig* config = kapp->config(); 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_isViewSplit = config->readBoolEntry("Split View", false); m_isSaveView = config->readBoolEntry("Save View", false); @@ -109,9 +109,9 @@ DolphinIconsViewSettings* DolphinSettings::iconsView(DolphinIconsView::LayoutMod KBookmarkManager* DolphinSettings::bookmarkManager() const { - QString basePath = KGlobal::instance()->instanceName(); + TQString basePath = KGlobal::instance()->instanceName(); basePath.append("/bookmarks.xml"); - const QString file = locateLocal("data", basePath); + const TQString file = locateLocal("data", basePath); return KBookmarkManager::managerForFile(file, false); } @@ -133,9 +133,9 @@ void DolphinSettings::save() m_leftsidebar->save(); m_rightsidebar->save(); - QString basePath = KGlobal::instance()->instanceName(); + TQString basePath = KGlobal::instance()->instanceName(); basePath.append("/bookmarks.xml"); - const QString file = locateLocal( "data", basePath); + const TQString file = locateLocal( "data", basePath); KBookmarkManager* manager = KBookmarkManager::managerForFile(file, false); manager->save(false); diff --git a/src/dolphinsettings.h b/src/dolphinsettings.h index 3e70fd4..a61fce9 100644 --- a/src/dolphinsettings.h +++ b/src/dolphinsettings.h @@ -21,7 +21,7 @@ #ifndef DOLPHINSETTINGS_H #define DOLPHINSETTINGS_H -#include <qvaluelist.h> +#include <tqvaluelist.h> #include <dolphiniconsview.h> #include <dolphinview.h> diff --git a/src/dolphinsettingsdialog.cpp b/src/dolphinsettingsdialog.cpp index 4bed70b..ecbcf3f 100644 --- a/src/dolphinsettingsdialog.cpp +++ b/src/dolphinsettingsdialog.cpp @@ -31,19 +31,19 @@ DolphinSettingsDialog::DolphinSettingsDialog() : Ok|Apply|Cancel, Ok) { KIconLoader iconLoader; - QFrame* generalSettingsFrame = addPage(i18n("General"), 0, + TQFrame* generalSettingsFrame = addPage(i18n("General"), 0, iconLoader.loadIcon("exec", KIcon::NoGroup, KIcon::SizeMedium)); m_generalSettingsPage = new GeneralSettingsPage(generalSettingsFrame); - QFrame* viewSettingsFrame = addPage(i18n("View Modes"), 0, + TQFrame* viewSettingsFrame = addPage(i18n("View Modes"), 0, iconLoader.loadIcon("view_choose", KIcon::NoGroup, KIcon::SizeMedium)); m_viewSettingsPage = new ViewSettingsPage(viewSettingsFrame); - QFrame* bookmarksSettingsFrame = addPage(i18n("Bookmarks"), 0, + TQFrame* bookmarksSettingsFrame = addPage(i18n("Bookmarks"), 0, iconLoader.loadIcon("bookmark", KIcon::NoGroup, KIcon::SizeMedium)); diff --git a/src/dolphinsettingsdialog.h b/src/dolphinsettingsdialog.h index 7b8023d..49c3618 100644 --- a/src/dolphinsettingsdialog.h +++ b/src/dolphinsettingsdialog.h @@ -36,6 +36,7 @@ class BookmarksSettingsPage; */ class DolphinSettingsDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: DolphinSettingsDialog(); diff --git a/src/dolphinstatusbar.cpp b/src/dolphinstatusbar.cpp index cfa5fb4..9c0dcbd 100644 --- a/src/dolphinstatusbar.cpp +++ b/src/dolphinstatusbar.cpp @@ -20,44 +20,44 @@ #include "dolphinstatusbar.h" #include <kprogress.h> -#include <qlabel.h> -#include <qtimer.h> +#include <tqlabel.h> +#include <tqtimer.h> #include <kiconloader.h> #include "dolphinview.h" #include "statusbarmessagelabel.h" #include "statusbarspaceinfo.h" -DolphinStatusBar::DolphinStatusBar(DolphinView* parent) : - QHBox(parent), +DolphinStatusBar::DolphinStatusBar(DolphinView* tqparent) : + TQHBox(tqparent), m_messageLabel(0), m_spaceInfo(0), m_progressBar(0), m_progress(100) { 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->setURL(parent->url()); + m_spaceInfo->setURL(tqparent->url()); - m_progressText = new QLabel(this); + m_progressText = new TQLabel(this); m_progressText->hide(); m_progressBar = new KProgress(this); m_progressBar->hide(); - m_progressTimer = new QTimer(this); - connect(m_progressTimer, SIGNAL(timeout()), - this, SLOT(slotProgressTimer())); + m_progressTimer = new TQTimer(this); + connect(m_progressTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotProgressTimer())); - const QSize size(m_progressBar->sizeHint()); + const TQSize size(m_progressBar->tqsizeHint()); m_progressBar->setMaximumWidth(size.width()); setMinimumHeight(size.height()); m_messageLabel->setMinimumTextHeight(size.height()); - connect(parent, SIGNAL(signalURLChanged(const KURL&)), - this, SLOT(slotURLChanged(const KURL&))); + connect(tqparent, TQT_SIGNAL(signalURLChanged(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) { m_messageLabel->setText(msg); @@ -89,17 +89,17 @@ DolphinStatusBar::Type DolphinStatusBar::type() const return m_messageLabel->type(); } -QString DolphinStatusBar::message() const +TQString DolphinStatusBar::message() const { return m_messageLabel->text(); } -void DolphinStatusBar::setProgressText(const QString& text) +void DolphinStatusBar::setProgressText(const TQString& text) { m_progressText->setText(text); } -QString DolphinStatusBar::progressText() const +TQString DolphinStatusBar::progressText() const { return m_progressText->text(); } @@ -117,10 +117,10 @@ void DolphinStatusBar::setProgress(int percent) m_progressBar->setProgress(m_progress); m_progressTimer->start(300, true); - const QString msg(m_messageLabel->text()); + const TQString msg(m_messageLabel->text()); if (msg.isEmpty() || (msg == m_defaultText)) { if (percent == 0) { - m_messageLabel->setText(QString::null); + m_messageLabel->setText(TQString()); m_messageLabel->setType(Default); } else if (percent == 100) { @@ -137,7 +137,7 @@ void DolphinStatusBar::clear() m_messageLabel->setType(Default); } -void DolphinStatusBar::setDefaultText(const QString& text) +void DolphinStatusBar::setDefaultText(const TQString& text) { m_defaultText = text; } diff --git a/src/dolphinstatusbar.h b/src/dolphinstatusbar.h index e4e3e8d..28ff69d 100644 --- a/src/dolphinstatusbar.h +++ b/src/dolphinstatusbar.h @@ -21,10 +21,10 @@ #ifndef DOLPHINSTATUSBAR_H #define DOLPHINSTATUSBAR_H -#include <qhbox.h> +#include <tqhbox.h> class KProgress; -class QLabel; -class QTimer; +class TQLabel; +class TQTimer; class StatusBarMessageLabel; class StatusBarSpaceInfo; class DolphinView; @@ -38,8 +38,9 @@ class KURL; * * @author Peter Penz */ -class DolphinStatusBar : public QHBox { +class DolphinStatusBar : public TQHBox { Q_OBJECT + TQ_OBJECT public: /** @@ -54,7 +55,7 @@ public: Error }; - DolphinStatusBar(DolphinView* parent = 0); + DolphinStatusBar(DolphinView* tqparent = 0); virtual ~DolphinStatusBar(); /** @@ -68,9 +69,9 @@ public: * with the type Type::Error is set, the progress * 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; /** @@ -82,8 +83,8 @@ public: * no flickering occurs for showing a progress of fast * operations. */ - void setProgressText(const QString& text); - QString progressText() const; + void setProgressText(const TQString& text); + TQString progressText() const; /** * Sets the progress in percent (0 - 100). The @@ -108,8 +109,8 @@ public: * Sets the default text, which is shown if the status bar * is cleared by DolphinStatusBar::clear(). */ - void setDefaultText(const QString& text); - const QString& defaultText() const { return m_defaultText; } + void setDefaultText(const TQString& text); + const TQString& defaultText() const { return m_defaultText; } private slots: void slotProgressTimer(); @@ -123,11 +124,11 @@ private slots: private: StatusBarMessageLabel* m_messageLabel; StatusBarSpaceInfo* m_spaceInfo; - QLabel* m_progressText; + TQLabel* m_progressText; KProgress* m_progressBar; - QTimer* m_progressTimer; + TQTimer* m_progressTimer; int m_progress; - QString m_defaultText; + TQString m_defaultText; }; #endif diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 7bf57f0..5416062 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -20,7 +20,7 @@ #include "dolphinview.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kurl.h> #include <klocale.h> #include <kio/netaccess.h> @@ -41,11 +41,11 @@ #include "filterbar.h" -DolphinView::DolphinView(QWidget *parent, +DolphinView::DolphinView(TQWidget *tqparent, const KURL& url, Mode mode, bool showHiddenFiles) : - QWidget(parent), + TQWidget(tqparent), m_refreshing(false), m_showProgress(false), m_mode(mode), @@ -57,27 +57,27 @@ DolphinView::DolphinView(QWidget *parent, m_fileCount(0), m_filterBar(0) { - setFocusPolicy(QWidget::StrongFocus); - m_topLayout = new QVBoxLayout(this); + setFocusPolicy(TQ_StrongFocus); + m_topLayout = new TQVBoxLayout(this); Dolphin& dolphin = Dolphin::mainWin(); - connect(this, SIGNAL(signalModeChanged()), - &dolphin, SLOT(slotViewModeChanged())); - connect(this, SIGNAL(signalShowHiddenFilesChanged()), - &dolphin, SLOT(slotShowHiddenFilesChanged())); - connect(this, SIGNAL(signalSortingChanged(DolphinView::Sorting)), - &dolphin, SLOT(slotSortingChanged(DolphinView::Sorting))); - connect(this, SIGNAL(signalSortOrderChanged(Qt::SortOrder)), - &dolphin, SLOT(slotSortOrderChanged(Qt::SortOrder))); + connect(this, TQT_SIGNAL(signalModeChanged()), + &dolphin, TQT_SLOT(slotViewModeChanged())); + connect(this, TQT_SIGNAL(signalShowHiddenFilesChanged()), + &dolphin, TQT_SLOT(slotShowHiddenFilesChanged())); + connect(this, TQT_SIGNAL(signalSortingChanged(DolphinView::Sorting)), + &dolphin, TQT_SLOT(slotSortingChanged(DolphinView::Sorting))); + connect(this, TQT_SIGNAL(signalSortOrderChanged(TQt::SortOrder)), + &dolphin, TQT_SLOT(slotSortOrderChanged(TQt::SortOrder))); m_urlNavigator = new URLNavigator(url, this); - connect(m_urlNavigator, SIGNAL(urlChanged(const KURL&)), - this, SLOT(slotURLChanged(const KURL&))); - connect(m_urlNavigator, SIGNAL(urlChanged(const KURL&)), - &dolphin, SLOT(slotURLChanged(const KURL&))); - connect(m_urlNavigator, SIGNAL(historyChanged()), - &dolphin, SLOT(slotHistoryChanged())); + connect(m_urlNavigator, TQT_SIGNAL(urlChanged(const KURL&)), + this, TQT_SLOT(slotURLChanged(const KURL&))); + connect(m_urlNavigator, TQT_SIGNAL(urlChanged(const KURL&)), + &dolphin, TQT_SLOT(slotURLChanged(const KURL&))); + connect(m_urlNavigator, TQT_SIGNAL(historyChanged()), + &dolphin, TQT_SLOT(slotHistoryChanged())); m_statusBar = new DolphinStatusBar(this); @@ -85,22 +85,22 @@ DolphinView::DolphinView(QWidget *parent, m_dirLister->setAutoUpdate(true); m_dirLister->setMainWindow(this); m_dirLister->setShowingDotFiles(showHiddenFiles); - connect(m_dirLister, SIGNAL(clear()), - this, SLOT(slotClear())); - connect(m_dirLister, SIGNAL(percent(int)), - this, SLOT(slotPercent(int))); - connect(m_dirLister, SIGNAL(deleteItem(KFileItem*)), - this, SLOT(slotDeleteItem(KFileItem*))); - connect(m_dirLister, SIGNAL(completed()), - this, SLOT(slotCompleted())); - connect(m_dirLister, SIGNAL(infoMessage(const QString&)), - this, SLOT(slotInfoMessage(const QString&))); - connect(m_dirLister, SIGNAL(errorMessage(const QString&)), - this, SLOT(slotErrorMessage(const QString&))); - connect(m_dirLister, SIGNAL(refreshItems (const KFileItemList&)), - this, SLOT(slotRefreshItems(const KFileItemList&))); - connect(m_dirLister, SIGNAL(newItems(const KFileItemList&)), - this, SLOT(slotAddItems(const KFileItemList&))); + connect(m_dirLister, TQT_SIGNAL(clear()), + this, TQT_SLOT(slotClear())); + connect(m_dirLister, TQT_SIGNAL(percent(int)), + this, TQT_SLOT(slotPercent(int))); + connect(m_dirLister, TQT_SIGNAL(deleteItem(KFileItem*)), + this, TQT_SLOT(slotDeleteItem(KFileItem*))); + connect(m_dirLister, TQT_SIGNAL(completed()), + this, TQT_SLOT(slotCompleted())); + connect(m_dirLister, TQT_SIGNAL(infoMessage(const TQString&)), + this, TQT_SLOT(slotInfoMessage(const TQString&))); + connect(m_dirLister, TQT_SIGNAL(errorMessage(const TQString&)), + this, TQT_SLOT(slotErrorMessage(const TQString&))); + connect(m_dirLister, TQT_SIGNAL(refreshItems (const KFileItemList&)), + this, TQT_SLOT(slotRefreshItems(const KFileItemList&))); + connect(m_dirLister, TQT_SIGNAL(newItems(const KFileItemList&)), + this, TQT_SLOT(slotAddItems(const KFileItemList&))); m_iconSize = KIcon::SizeMedium; @@ -110,8 +110,8 @@ DolphinView::DolphinView(QWidget *parent, m_filterBar = new FilterBar(this); m_filterBar->hide(); m_topLayout->addWidget(m_filterBar); - connect(m_filterBar, SIGNAL(signalFilterChanged(const QString&)), - this, SLOT(slotChangeNameFilter(const QString&))); + connect(m_filterBar, TQT_SIGNAL(signalFilterChanged(const TQString&)), + this, TQT_SLOT(slotChangeNameFilter(const TQString&))); m_topLayout->addWidget(m_statusBar); } @@ -148,8 +148,8 @@ void DolphinView::setMode(Mode mode) return; // the wished mode is already set } - QWidget* view = (m_iconsView != 0) ? static_cast<QWidget*>(m_iconsView) : - static_cast<QWidget*>(m_detailsView); + TQWidget* view = (m_iconsView != 0) ? static_cast<TQWidget*>(m_iconsView) : + static_cast<TQWidget*>(m_detailsView); if (view != 0) { m_topLayout->remove(view); view->close(); @@ -210,12 +210,12 @@ void DolphinView::renameSelectedItems() // More than one item has been selected for renaming. Open // a rename dialog and rename all items afterwards. RenameDialog dialog(urls); - if (dialog.exec() == QDialog::Rejected) { + if (dialog.exec() == TQDialog::Rejected) { return; } DolphinView* view = Dolphin::mainWin().activeView(); - const QString& newName = dialog.newName(); + const TQString& newName = dialog.newName(); if (newName.isEmpty()) { view->statusBar()->setMessage(i18n("The new item name is invalid."), DolphinStatusBar::Error); @@ -224,7 +224,7 @@ void DolphinView::renameSelectedItems() UndoManager& undoMan = UndoManager::instance(); undoMan.beginMacro(); - assert(newName.contains('#')); + assert(newName.tqcontains('#')); const int urlsCount = urls.count(); ProgressIndicator* progressIndicator = @@ -233,12 +233,12 @@ void DolphinView::renameSelectedItems() urlsCount); // iterate through all selected items and rename them... - const int replaceIndex = newName.find('#'); + const int replaceIndex = newName.tqfind('#'); assert(replaceIndex >= 0); for (int i = 0; i < urlsCount; ++i) { const KURL& source = urls[i]; - QString name(newName); - name.replace(replaceIndex, 1, renameIndexPresentation(i + 1, urlsCount)); + TQString name(newName); + name.tqreplace(replaceIndex, 1, renameIndexPresentation(i + 1, urlsCount)); if (source.fileName() != name) { KURL dest(source.upURL()); @@ -248,7 +248,7 @@ void DolphinView::renameSelectedItems() if (destExists) { delete progressIndicator; progressIndicator = 0; - view->statusBar()->setMessage(i18n("Renaming failed (item '%1' already exists).").arg(name), + view->statusBar()->setMessage(i18n("Renaming failed (item '%1' already exists).").tqarg(name), DolphinStatusBar::Error); break; } @@ -273,7 +273,7 @@ void DolphinView::renameSelectedItems() // renaming mechanism from the views. assert(urls.count() == 1); if (m_mode == DetailsView) { - QListViewItem* item = m_detailsView->firstChild(); + TQListViewItem* item = m_detailsView->firstChild(); while (item != 0) { if (item->isSelected()) { m_detailsView->rename(item, DolphinDetailsView::NameColumn); @@ -327,10 +327,10 @@ void DolphinView::refreshSettings() } if (m_detailsView != 0) { - // TODO: There is no usable interface in QListView/KFileDetailView + // TODO: There is no usable interface in TQListView/KFileDetailView // to hide/show columns. The easiest approach is to delete // the current instance and recreate a new one, which automatically - // refreshs the settings. If a proper interface is available in Qt4 + // refreshs the settings. If a proper interface is available in TQt4 // m_detailsView->refreshSettings() would be enough. m_topLayout->remove(m_detailsView); m_detailsView->close(); @@ -350,13 +350,13 @@ void DolphinView::updateStatusBar() // - shows already the item count information or // - shows only a not very important information // - if any progress is given don't show the item count info at all - const QString msg(m_statusBar->message()); + const TQString msg(m_statusBar->message()); const bool updateStatusBarMsg = (msg.isEmpty() || (msg == m_statusBar->defaultText()) || (m_statusBar->type() == DolphinStatusBar::Information)) && (m_statusBar->progress() == 100); - const QString text(hasSelection() ? selectionStatusBarText() : defaultStatusBarText()); + const TQString text(hasSelection() ? selectionStatusBarText() : defaultStatusBarText()); m_statusBar->setDefaultText(text); if (updateStatusBarMsg) { @@ -398,19 +398,19 @@ void DolphinView::setSorting(Sorting sorting) { if (sorting != this->sorting()) { KFileView* view = fileView(); - int spec = view->sorting() & ~QDir::Name & ~QDir::Size & ~QDir::Time & ~QDir::Unsorted; + int spec = view->sorting() & ~TQDir::Name & ~TQDir::Size & ~TQDir::Time & ~TQDir::Unsorted; switch (sorting) { - case SortByName: spec = spec | QDir::Name; break; - case SortBySize: spec = spec | QDir::Size; break; - case SortByDate: spec = spec | QDir::Time; break; + case SortByName: spec = spec | TQDir::Name; break; + case SortBySize: spec = spec | TQDir::Size; break; + case SortByDate: spec = spec | TQDir::Time; break; default: break; } ViewProperties props(url()); props.setSorting(sorting); - view->setSorting(static_cast<QDir::SortSpec>(spec)); + view->setSorting(static_cast<TQDir::SortSpec>(spec)); emit signalSortingChanged(sorting); } @@ -418,39 +418,39 @@ void DolphinView::setSorting(Sorting sorting) DolphinView::Sorting DolphinView::sorting() const { - const QDir::SortSpec spec = fileView()->sorting(); + const TQDir::SortSpec spec = fileView()->sorting(); - if (spec & QDir::Time) { + if (spec & TQDir::Time) { return SortByDate; } - if (spec & QDir::Size) { + if (spec & TQDir::Size) { return SortBySize; } return SortByName; } -void DolphinView::setSortOrder(Qt::SortOrder order) +void DolphinView::setSortOrder(TQt::SortOrder order) { if (sortOrder() != order) { KFileView* view = fileView(); int sorting = view->sorting(); - sorting = (order == Qt::Ascending) ? (sorting & ~QDir::Reversed) : - (sorting | QDir::Reversed); + sorting = (order == TQt::Ascending) ? (sorting & ~TQDir::Reversed) : + (sorting | TQDir::Reversed); ViewProperties props(url()); props.setSortOrder(order); - view->setSorting(static_cast<QDir::SortSpec>(sorting)); + view->setSorting(static_cast<TQDir::SortSpec>(sorting)); emit signalSortOrderChanged(order); } } -Qt::SortOrder DolphinView::sortOrder() const +TQt::SortOrder DolphinView::sortOrder() const { - return fileView()->isReversed() ? Qt::Descending : Qt::Ascending; + return fileView()->isReversed() ? TQt::Descending : TQt::Ascending; } void DolphinView::goBack() @@ -483,7 +483,7 @@ void DolphinView::editURL() m_urlNavigator->editURL(); } -const QValueList<URLNavigator::HistoryElem> DolphinView::urlHistory(int& index) const +const TQValueList<URLNavigator::HistoryElem> DolphinView::urlHistory(int& index) const { return m_urlNavigator->history(index); } @@ -521,13 +521,13 @@ const KFileItem* DolphinView::currentFileItem() const return fileView()->currentFileItem(); } -void DolphinView::openContextMenu(KFileItem* fileInfo, const QPoint& pos) +void DolphinView::openContextMenu(KFileItem* fileInfo, const TQPoint& pos) { DolphinContextMenu contextMenu(this, fileInfo, pos); contextMenu.open(); } -void DolphinView::rename(const KURL& source, const QString& newName) +void DolphinView::rename(const KURL& source, const TQString& newName) { bool ok = false; @@ -575,14 +575,14 @@ void DolphinView::rename(const KURL& source, const QString& newName) } if (ok) { - m_statusBar->setMessage(i18n("Renamed file '%1' to '%2'.").arg(source.fileName(), dest.fileName()), + m_statusBar->setMessage(i18n("Renamed file '%1' to '%2'.").tqarg(source.fileName(), dest.fileName()), DolphinStatusBar::OperationCompleted); DolphinCommand command(DolphinCommand::Rename, source, dest); UndoManager::instance().addCommand(command); } else { - m_statusBar->setMessage(i18n("Renaming of file '%1' to '%2' failed.").arg(source.fileName(), dest.fileName()), + m_statusBar->setMessage(i18n("Renaming of file '%1' to '%2' failed.").tqarg(source.fileName(), dest.fileName()), DolphinStatusBar::Error); reload(); } @@ -593,7 +593,7 @@ void DolphinView::reload() startDirLister(m_urlNavigator->url(), true); } -void DolphinView::slotURLListDropped(QDropEvent* /* event */, +void DolphinView::slotURLListDropped(TQDropEvent* /* event */, const KURL::List& urls, const KURL& url) { @@ -614,9 +614,9 @@ void DolphinView::slotURLListDropped(QDropEvent* /* event */, Dolphin::mainWin().dropURLs(urls, destination); } -void DolphinView::mouseReleaseEvent(QMouseEvent* event) +void DolphinView::mouseReleaseEvent(TQMouseEvent* event) { - QWidget::mouseReleaseEvent(event); + TQWidget::mouseReleaseEvent(event); Dolphin::mainWin().setActiveView(this); } @@ -643,7 +643,7 @@ void DolphinView::slotURLChanged(const KURL& url) emit signalURLChanged(url); } -void DolphinView::triggerIconsViewItem(QIconViewItem* item) +void DolphinView::triggerIconsViewItem(TQIconViewItem* item) { const ButtonState keyboardState = KApplication::keyboardMouseState(); const bool isSelectionActive = ((keyboardState & ShiftButton) > 0) || @@ -651,13 +651,13 @@ void DolphinView::triggerIconsViewItem(QIconViewItem* item) if ((item != 0) && !isSelectionActive) { // Updating the URL must be done outside the scope of this slot, // as iconview items will get deleted. - QTimer::singleShot(0, this, SLOT(updateURL())); + TQTimer::singleShot(0, this, TQT_SLOT(updateURL())); Dolphin::mainWin().setActiveView(this); } } -void DolphinView::triggerDetailsViewItem(QListViewItem* item, - const QPoint& pos, +void DolphinView::triggerDetailsViewItem(TQListViewItem* item, + const TQPoint& pos, int /* column */) { if (item == 0) { @@ -667,7 +667,7 @@ void DolphinView::triggerDetailsViewItem(QListViewItem* item, if (m_detailsView->isOnFilename(item, pos)) { // Updating the URL must be done outside the scope of this slot, // as listview items will get deleted. - QTimer::singleShot(0, this, SLOT(updateURL())); + TQTimer::singleShot(0, this, TQT_SLOT(updateURL())); Dolphin::mainWin().setActiveView(this); } else { @@ -675,9 +675,9 @@ void DolphinView::triggerDetailsViewItem(QListViewItem* item, } } -void DolphinView::triggerDetailsViewItem(QListViewItem* item) +void DolphinView::triggerDetailsViewItem(TQListViewItem* item) { - const QPoint pos(0, item->itemPos()); + const TQPoint pos(0, item->itemPos()); triggerDetailsViewItem(item, pos, 0); } @@ -697,7 +697,7 @@ void DolphinView::updateURL() // and the local path is /windows/C: For the URL the space info is related // to the root partition (and hence wrong) and for the local path the space // info is related to the windows partition (-> correct). - const QString localPath(fileItem->localPath()); + const TQString localPath(fileItem->localPath()); if (localPath.isEmpty()) { setURL(fileItem->url()); } @@ -757,7 +757,7 @@ void DolphinView::slotCompleted() KFileView* view = fileView(); view->clearView(); - // TODO: in Qt4 the code should get a lot + // TODO: in TQt4 the code should get a lot // simpler and nicer due to Interview... if (m_iconsView != 0) { m_iconsView->beginItemUpdates(); @@ -767,7 +767,7 @@ void DolphinView::slotCompleted() } if (m_showProgress) { - m_statusBar->setProgressText(QString::null); + m_statusBar->setProgressText(TQString()); m_statusBar->setProgress(100); m_showProgress = false; } @@ -796,7 +796,7 @@ void DolphinView::slotCompleted() // Prevent a flickering of the icon view widget by giving a small // timeslot to swallow asynchronous update events. m_iconsView->setUpdatesEnabled(false); - QTimer::singleShot(10, this, SLOT(slotDelayedUpdate())); + TQTimer::singleShot(10, this, TQT_SLOT(slotDelayedUpdate())); } if (m_detailsView != 0) { @@ -814,19 +814,19 @@ void DolphinView::slotDelayedUpdate() m_refreshing = false; } -void DolphinView::slotInfoMessage(const QString& msg) +void DolphinView::slotInfoMessage(const TQString& msg) { m_statusBar->setMessage(msg, DolphinStatusBar::Information); } -void DolphinView::slotErrorMessage(const QString& msg) +void DolphinView::slotErrorMessage(const TQString& msg) { m_statusBar->setMessage(msg, DolphinStatusBar::Error); } void DolphinView::slotRefreshItems(const KFileItemList& /* list */) { - QTimer::singleShot(0, this, SLOT(reload())); + TQTimer::singleShot(0, this, TQT_SLOT(reload())); } void DolphinView::slotAddItems(const KFileItemList& list) @@ -858,19 +858,19 @@ void DolphinView::createView() switch (m_mode) { case IconsView: case PreviewsView: { - const DolphinIconsView::LayoutMode layoutMode = (m_mode == IconsView) ? + const DolphinIconsView::LayoutMode tqlayoutMode = (m_mode == IconsView) ? DolphinIconsView::Icons : DolphinIconsView::Previews; - m_iconsView = new DolphinIconsView(this, layoutMode); + m_iconsView = new DolphinIconsView(this, tqlayoutMode); m_topLayout->insertWidget(1, m_iconsView); setFocusProxy(m_iconsView); - connect(m_iconsView, SIGNAL(executed(QIconViewItem*)), - this, SLOT(triggerIconsViewItem(QIconViewItem*))); - connect(m_iconsView, SIGNAL(returnPressed(QIconViewItem*)), - this, SLOT(triggerIconsViewItem(QIconViewItem*))); - connect(m_iconsView, SIGNAL(signalRequestActivation()), - this, SLOT(slotGrabActivation())); + connect(m_iconsView, TQT_SIGNAL(executed(TQIconViewItem*)), + this, TQT_SLOT(triggerIconsViewItem(TQIconViewItem*))); + connect(m_iconsView, TQT_SIGNAL(returnPressed(TQIconViewItem*)), + this, TQT_SLOT(triggerIconsViewItem(TQIconViewItem*))); + connect(m_iconsView, TQT_SIGNAL(signalRequestActivation()), + this, TQT_SLOT(slotGrabActivation())); m_iconsView->endItemUpdates(); m_iconsView->show(); @@ -883,12 +883,12 @@ void DolphinView::createView() m_topLayout->insertWidget(1, m_detailsView); setFocusProxy(m_detailsView); - connect(m_detailsView, SIGNAL(executed(QListViewItem*, const QPoint&, int)), - this, SLOT(triggerDetailsViewItem(QListViewItem*, const QPoint&, int))); - connect(m_detailsView, SIGNAL(returnPressed(QListViewItem*)), - this, SLOT(triggerDetailsViewItem(QListViewItem*))); - connect(m_detailsView, SIGNAL(signalRequestActivation()), - this, SLOT(slotGrabActivation())); + connect(m_detailsView, TQT_SIGNAL(executed(TQListViewItem*, const TQPoint&, int)), + this, TQT_SLOT(triggerDetailsViewItem(TQListViewItem*, const TQPoint&, int))); + connect(m_detailsView, TQT_SIGNAL(returnPressed(TQListViewItem*)), + this, TQT_SLOT(triggerDetailsViewItem(TQListViewItem*))); + connect(m_detailsView, TQT_SIGNAL(signalRequestActivation()), + this, TQT_SLOT(slotGrabActivation())); m_detailsView->show(); m_detailsView->setFocus(); break; @@ -898,8 +898,8 @@ void DolphinView::createView() break; } - connect(scrollView(), SIGNAL(contentsMoving(int, int)), - this, SLOT(slotContentsMoving(int, int))); + connect(scrollView(), TQT_SIGNAL(contentsMoving(int, int)), + this, TQT_SLOT(slotContentsMoving(int, int))); startDirLister(m_urlNavigator->url()); } @@ -910,10 +910,10 @@ KFileView* DolphinView::fileView() const static_cast<KFileView*>(m_iconsView); } -QScrollView* DolphinView::scrollView() const +TQScrollView* DolphinView::scrollView() const { - return (m_mode == DetailsView) ? static_cast<QScrollView*>(m_detailsView) : - static_cast<QScrollView*>(m_iconsView); + return (m_mode == DetailsView) ? static_cast<TQScrollView*>(m_detailsView) : + static_cast<TQScrollView*>(m_iconsView); } ItemEffectsManager* DolphinView::itemEffectsManager() const @@ -925,12 +925,12 @@ ItemEffectsManager* DolphinView::itemEffectsManager() const void DolphinView::startDirLister(const KURL& url, bool reload) { if (!url.isValid()) { - const QString location(url.prettyURL()); + const TQString location(url.prettyURL()); if (location.isEmpty()) { m_statusBar->setMessage(i18n("The location is empty."), DolphinStatusBar::Error); } else { - m_statusBar->setMessage(i18n("The location '%1' is invalid.").arg(location), + m_statusBar->setMessage(i18n("The location '%1' is invalid.").tqarg(location), DolphinStatusBar::Error); } return; @@ -939,7 +939,7 @@ void DolphinView::startDirLister(const KURL& url, bool reload) // Only show the directory loading progress if the status bar does // not contain another progress information. This means that // the directory loading progress information has the lowest priority. - const QString progressText(m_statusBar->progressText()); + const TQString progressText(m_statusBar->progressText()); m_showProgress = progressText.isEmpty() || (progressText == i18n("Loading directory...")); if (m_showProgress) { @@ -952,20 +952,20 @@ void DolphinView::startDirLister(const KURL& url, bool reload) m_dirLister->openURL(url, false, reload); } -QString DolphinView::defaultStatusBarText() const +TQString DolphinView::defaultStatusBarText() const { const int itemCount = m_folderCount + m_fileCount; - QString text = i18n( "1 Item", "%n Items", itemCount ); + TQString text = i18n( "1 Item", "%n Items", itemCount ); text += i18n(" (1 Folder, ", " (%n Folders, ", m_folderCount ); text += i18n("1 File)", "%n Files)", m_fileCount); return text; } -QString DolphinView::selectionStatusBarText() const +TQString DolphinView::selectionStatusBarText() const { - QString text; + TQString text; const KFileItemList* list = selectedItems(); assert((list != 0) && !list->isEmpty()); @@ -992,18 +992,18 @@ QString DolphinView::selectionStatusBarText() const } if (fileCount > 0) { - const QString sizeText(KIO::convertSize(byteSize)); - text += i18n("1 File selected (%1)", "%n Files selected (%1)", fileCount).arg(sizeText); + const TQString sizeText(KIO::convertSize(byteSize)); + text += i18n("1 File selected (%1)", "%n Files selected (%1)", fileCount).tqarg(sizeText); } return text; } -QString DolphinView::renameIndexPresentation(int index, int itemCount) const +TQString DolphinView::renameIndexPresentation(int index, int itemCount) const { // assure that the string reprentation for all indicess have the same // number of characters based on the given number of items - QString str(QString::number(index)); + TQString str(TQString::number(index)); int chrCount = 1; while (itemCount >= 10) { ++chrCount; @@ -1029,23 +1029,23 @@ void DolphinView::slotShowFilterBar(bool show) } } -void DolphinView::slotChangeNameFilter(const QString& nameFilter) +void DolphinView::slotChangeNameFilter(const TQString& nameFilter) { // The name filter of KDirLister does a 'hard' filtering, which // means that only the items are shown where the names match // exactly the filter. This is non-transparent for the user, which // just wants to have a 'soft' filtering: does the name contain // the filter string? - QString adjustedFilter(nameFilter); + TQString adjustedFilter(nameFilter); adjustedFilter.insert(0, '*'); adjustedFilter.append('*'); m_dirLister->setNameFilter(adjustedFilter); m_dirLister->emitChanges(); - // TODO: this is a workaround for QIconView: the item position + // TODO: this is a workaround for TQIconView: the item position // stay as they are by filtering, only an inserting of an item - // results to an automatic adjusting of the item position. In Qt4/KDE4 + // results to an automatic adjusting of the item position. In TQt4/KDE4 // this workaround should get obsolete due to Interview. KFileView* view = fileView(); if (view == m_iconsView) { diff --git a/src/dolphinview.h b/src/dolphinview.h index d0ad891..7a67bc0 100644 --- a/src/dolphinview.h +++ b/src/dolphinview.h @@ -22,21 +22,21 @@ #ifndef _DOLPHINVIEW_H_ #define _DOLPHINVIEW_H_ -#include <qwidget.h> +#include <tqwidget.h> #include <kparts/part.h> #include <kfileitem.h> #include <kfileiconview.h> #include <kio/job.h> #include <urlnavigator.h> -class QPainter; +class TQPainter; class KURL; -class QLineEdit; +class TQLineEdit; class URLNavigator; -class QTimer; -class QIconViewItem; -class QListViewItem; -class QVBoxLayout; +class TQTimer; +class TQIconViewItem; +class TQListViewItem; +class TQVBoxLayout; class KFileView; class Dolphin; class DolphinDirLister; @@ -44,7 +44,7 @@ class DolphinStatusBar; class DolphinIconsView; class DolphinDetailsView; class ViewProperties; -class QScrollView; +class TQScrollView; class KProgress; class ItemEffectsManager; class FilterBar; @@ -62,9 +62,10 @@ class FilterBar; * * @author Peter Penz <[email protected]> */ -class DolphinView : public QWidget +class DolphinView : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** @@ -102,7 +103,7 @@ public: SortByDate = 2 }; - DolphinView(QWidget* parent, + DolphinView(TQWidget* tqparent, const KURL& url, Mode mode = IconsView, bool showHiddenFiles = false); @@ -194,7 +195,7 @@ public: * @param index Output parameter which indicates the current * 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. @@ -228,14 +229,14 @@ public: * on the position \a pos. If 0 is passed for the file info, a context * 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. * If the new file name already exists, a dialog is opened which * 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. */ DolphinStatusBar* statusBar() const; @@ -284,11 +285,11 @@ public: /** Returns the sort order of the items inside a directory (see DolphinView::Sorting). */ Sorting sorting() const; - /** Sets the sort order (Qt::Ascending or Qt::Descending) for the items. */ - void setSortOrder(Qt::SortOrder order); + /** Sets the sort order (TQt::Ascending or TQt::Descending) for the items. */ + void setSortOrder(TQt::SortOrder order); - /** Returns the current used sort order (Qt::Ascending or Qt::Descending). */ - Qt::SortOrder sortOrder() const; + /** Returns the current used sort order (TQt::Ascending or TQt::Descending). */ + TQt::SortOrder sortOrder() const; /** Refreshs the view settings by reading out the stored settings. */ void refreshSettings(); @@ -321,7 +322,7 @@ public: public slots: void reload(); - void slotURLListDropped(QDropEvent* event, + void slotURLListDropped(TQDropEvent* event, const KURL::List& urls, const KURL& url); @@ -347,7 +348,7 @@ signals: void signalSortingChanged(DolphinView::Sorting sorting); /** 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. @@ -366,16 +367,16 @@ signals: void signalSelectionChanged(); protected: - /** @see QWidget::mouseReleaseEvent */ - virtual void mouseReleaseEvent(QMouseEvent* event); + /** @see TQWidget::mouseReleaseEvent */ + virtual void mouseReleaseEvent(TQMouseEvent* event); private slots: void slotURLChanged(const KURL& kurl); - void triggerIconsViewItem(QIconViewItem *item); - void triggerDetailsViewItem(QListViewItem* item, - const QPoint& pos, + void triggerIconsViewItem(TQIconViewItem *item); + void triggerDetailsViewItem(TQListViewItem* item, + const TQPoint& pos, int column); - void triggerDetailsViewItem(QListViewItem* item); + void triggerDetailsViewItem(TQListViewItem* item); void updateURL(); void slotPercent(int percent); @@ -383,8 +384,8 @@ private slots: void slotDeleteItem(KFileItem* item); void slotCompleted(); void slotDelayedUpdate(); - void slotInfoMessage(const QString& msg); - void slotErrorMessage(const QString& msg); + void slotInfoMessage(const TQString& msg); + void slotErrorMessage(const TQString& msg); void slotRefreshItems(const KFileItemList& list); void slotAddItems(const KFileItemList& list); @@ -402,12 +403,12 @@ private slots: * Filters the currently shown items by \a nameFilter. All items * which contain the given filter string will be shown. */ - void slotChangeNameFilter(const QString& nameFilter); + void slotChangeNameFilter(const TQString& nameFilter); private: void createView(); KFileView* fileView() const; - QScrollView* scrollView() const; + TQScrollView* scrollView() const; ItemEffectsManager* itemEffectsManager() const; 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 * selected. */ - QString defaultStatusBarText() const; + TQString defaultStatusBarText() const; /** * Returns the text for the status bar, if at least one item * is selected. */ - QString selectionStatusBarText() const; + TQString selectionStatusBarText() const; /** * Returns the string representation for the index \a index * for renaming \itemCount items. */ - QString renameIndexPresentation(int index, int itemCount) const; + TQString renameIndexPresentation(int index, int itemCount) const; bool m_refreshing; bool m_showProgress; Mode m_mode; - QVBoxLayout* m_topLayout; + TQVBoxLayout* m_topLayout; URLNavigator* m_urlNavigator; DolphinIconsView* m_iconsView; diff --git a/src/editbookmarkdialog.cpp b/src/editbookmarkdialog.cpp index 3d25ce3..3a3f5ca 100644 --- a/src/editbookmarkdialog.cpp +++ b/src/editbookmarkdialog.cpp @@ -19,26 +19,26 @@ ***************************************************************************/ #include "editbookmarkdialog.h" -#include <qgrid.h> +#include <tqgrid.h> #include <klocale.h> -#include <qlineedit.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqlineedit.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <kiconloader.h> -#include <qpushbutton.h> +#include <tqpushbutton.h> #include <kurl.h> #include <kfiledialog.h> #include <kicondialog.h> -#include <qhbox.h> +#include <tqhbox.h> EditBookmarkDialog::~EditBookmarkDialog() { } -KBookmark EditBookmarkDialog::getBookmark(const QString& title, - const QString& name, +KBookmark EditBookmarkDialog::getBookmark(const TQString& title, + const TQString& name, const KURL& url, - const QString& icon) + const TQString& icon) { EditBookmarkDialog dialog(title, name, url, icon); dialog.exec(); @@ -54,54 +54,54 @@ void EditBookmarkDialog::slotOk() KDialogBase::slotOk(); } -EditBookmarkDialog::EditBookmarkDialog(const QString& title, - const QString& name, +EditBookmarkDialog::EditBookmarkDialog(const TQString& title, + const TQString& name, const KURL& url, - const QString& icon) : + const TQString& icon) : KDialogBase(Plain, title, Ok|Cancel, Ok), m_iconButton(0), m_name(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()); // create icon widgets - new QLabel(i18n("Icon:"), grid); + new TQLabel(i18n("Icon:"), grid); m_iconName = icon; - m_iconButton = new QPushButton(SmallIcon(m_iconName), QString::null, grid); - m_iconButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - connect(m_iconButton, SIGNAL(clicked()), - this, SLOT(selectIcon())); + m_iconButton = new TQPushButton(SmallIcon(m_iconName), TQString(), grid); + m_iconButton->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + connect(m_iconButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(selectIcon())); // create name widgets - new QLabel(i18n("Name:"), grid); - m_name = new QLineEdit(name, grid); + new TQLabel(i18n("Name:"), grid); + m_name = new TQLineEdit(name, grid); m_name->selectAll(); m_name->setFocus(); // create location widgets - new QLabel(i18n("Location:"), grid); + new TQLabel(i18n("Location:"), grid); - QHBox* locationBox = new QHBox(grid); - locationBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + TQHBox* locationBox = new TQHBox(grid); + locationBox->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); locationBox->setSpacing(spacingHint()); - m_location = new QLineEdit(url.prettyURL(), locationBox); + m_location = new TQLineEdit(url.prettyURL(), locationBox); m_location->setMinimumWidth(320); - QPushButton* selectLocationButton = new QPushButton(SmallIcon("folder"), QString::null, locationBox); - selectLocationButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - connect(selectLocationButton, SIGNAL(clicked()), - this, SLOT(selectLocation())); + TQPushButton* selectLocationButton = new TQPushButton(SmallIcon("folder"), TQString(), locationBox); + selectLocationButton->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + connect(selectLocationButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(selectLocation())); topLayout->addWidget(grid); } void EditBookmarkDialog::selectIcon() { - const QString iconName(KIconDialog::getIcon(KIcon::Small, KIcon::FileSystem)); + const TQString iconName(KIconDialog::getIcon(KIcon::Small, KIcon::FileSystem)); if (!iconName.isEmpty()) { m_iconName = iconName; m_iconButton->setIconSet(SmallIcon(iconName)); @@ -110,7 +110,7 @@ void EditBookmarkDialog::selectIcon() void EditBookmarkDialog::selectLocation() { - const QString location(m_location->text()); + const TQString location(m_location->text()); KURL url(KFileDialog::getExistingURL(location)); if (!url.isEmpty()) { m_location->setText(url.prettyURL()); diff --git a/src/editbookmarkdialog.h b/src/editbookmarkdialog.h index 2156aae..20e74b2 100644 --- a/src/editbookmarkdialog.h +++ b/src/editbookmarkdialog.h @@ -24,8 +24,8 @@ #include <kdialogbase.h> class Bookmark; -class QLineEdit; -class QPushButton; +class TQLineEdit; +class TQPushButton; /** * @brief Allows to edit the icon, URL and name of a bookmark. @@ -44,6 +44,7 @@ class QPushButton; class EditBookmarkDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: virtual ~EditBookmarkDialog(); @@ -54,29 +55,29 @@ public: * @return A valid bookmark, if the user has pressed OK. Otherwise * a null bookmark is returned (see Bookmark::isNull()). */ - static KBookmark getBookmark(const QString& title, - const QString& name, + static KBookmark getBookmark(const TQString& title, + const TQString& name, const KURL& url, - const QString& icon); + const TQString& icon); protected slots: virtual void slotOk(); protected: - EditBookmarkDialog(const QString& title, - const QString& name, + EditBookmarkDialog(const TQString& title, + const TQString& name, const KURL& url, - const QString& icon); + const TQString& icon); private slots: void selectIcon(); void selectLocation(); private: - QString m_iconName; - QPushButton* m_iconButton; - QLineEdit* m_name; - QLineEdit* m_location; + TQString m_iconName; + TQPushButton* m_iconButton; + TQLineEdit* m_name; + TQLineEdit* m_location; KBookmark m_bookmark; }; #endif diff --git a/src/filterbar.cpp b/src/filterbar.cpp index 83cc784..e008aa0 100644 --- a/src/filterbar.cpp +++ b/src/filterbar.cpp @@ -19,8 +19,8 @@ ***************************************************************************/ #include "filterbar.h" -#include <qlabel.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <kdialog.h> #include <klocale.h> @@ -30,35 +30,35 @@ #include "dolphin.h" -FilterBar::FilterBar(QWidget *parent, const char *name) : - QWidget(parent, name) +FilterBar::FilterBar(TQWidget *tqparent, const char *name) : + TQWidget(tqparent, name) { const int gap = 3; - QVBoxLayout* foo = new QVBoxLayout(this); + TQVBoxLayout* foo = new TQVBoxLayout(this); foo->addSpacing(gap); - QHBoxLayout* layout = new QHBoxLayout(foo); - layout->addSpacing(gap); + TQHBoxLayout* tqlayout = new TQHBoxLayout(foo); + tqlayout->addSpacing(gap); - m_filter = new QLabel(i18n("Filter:"), this); - layout->addWidget(m_filter); - layout->addSpacing(KDialog::spacingHint()); + m_filter = new TQLabel(i18n("Filter:"), this); + tqlayout->addWidget(m_filter); + tqlayout->addSpacing(KDialog::spacingHint()); m_filterInput = new KLineEdit(this); - layout->addWidget(m_filterInput); + tqlayout->addWidget(m_filterInput); m_close = new KPushButton(this); m_close->setIconSet(SmallIcon("fileclose")); m_close->setFlat(true); - layout->addWidget(m_close); - layout->addSpacing(gap); + tqlayout->addWidget(m_close); + tqlayout->addSpacing(gap); - connect(m_filterInput, SIGNAL(textChanged(const QString&)), - this, SIGNAL(signalFilterChanged(const QString&))); - connect(m_close, SIGNAL(clicked()), this, SLOT(hide())); - connect(m_close, SIGNAL(clicked()), - &Dolphin::mainWin(), SLOT(slotShowFilterBarChanged())); + connect(m_filterInput, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SIGNAL(signalFilterChanged(const TQString&))); + connect(m_close, TQT_SIGNAL(clicked()), this, TQT_SLOT(hide())); + connect(m_close, TQT_SIGNAL(clicked()), + &Dolphin::mainWin(), TQT_SLOT(slotShowFilterBarChanged())); } FilterBar::~FilterBar() @@ -69,19 +69,19 @@ void FilterBar::hide() { m_filterInput->clear(); m_filterInput->clearFocus(); - QWidget::hide(); + TQWidget::hide(); } void FilterBar::show() { m_filterInput->setFocus(); - QWidget::show(); + TQWidget::show(); } -void FilterBar::keyReleaseEvent(QKeyEvent* event) +void FilterBar::keyReleaseEvent(TQKeyEvent* event) { - QWidget::keyReleaseEvent(event); - if ((event->key() == Qt::Key_Escape)) { + TQWidget::keyReleaseEvent(event); + if ((event->key() == TQt::Key_Escape)) { hide(); Dolphin::mainWin().slotShowFilterBarChanged(); } diff --git a/src/filterbar.h b/src/filterbar.h index 7f9c8b8..6904531 100644 --- a/src/filterbar.h +++ b/src/filterbar.h @@ -20,9 +20,9 @@ #ifndef FILTERBAR_H #define FILTERBAR_H -#include <qwidget.h> +#include <tqwidget.h> -class QLabel; +class TQLabel; class KLineEdit; class KPushButton; @@ -31,12 +31,13 @@ class KPushButton; * * @author Gregor Kališnik <[email protected]> */ -class FilterBar : public QWidget +class FilterBar : public TQWidget { Q_OBJECT + TQ_OBJECT public: - FilterBar(QWidget *parent = 0, const char *name = 0); + FilterBar(TQWidget *tqparent = 0, const char *name = 0); virtual ~FilterBar(); signals: @@ -44,20 +45,20 @@ signals: * Signal that reports the name filter has been * changed to \a nameFilter. */ - void signalFilterChanged(const QString& nameFilter); + void signalFilterChanged(const TQString& nameFilter); public slots: - /** @see QWidget::hide() */ + /** @see TQWidget::hide() */ virtual void hide(); - /** @see QWidget::show() */ + /** @see TQWidget::show() */ virtual void show(); protected: - virtual void keyReleaseEvent(QKeyEvent* event); + virtual void keyReleaseEvent(TQKeyEvent* event); private: - QLabel* m_filter; + TQLabel* m_filter; KLineEdit* m_filterInput; KPushButton* m_close; }; diff --git a/src/generalsettingspage.cpp b/src/generalsettingspage.cpp index 0a97574..0e4e6f1 100644 --- a/src/generalsettingspage.cpp +++ b/src/generalsettingspage.cpp @@ -20,78 +20,78 @@ #include "generalsettingspage.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kdialog.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qvbox.h> -#include <qgrid.h> -#include <qgroupbox.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqvbox.h> +#include <tqgrid.h> +#include <tqgroupbox.h> #include <klocale.h> -#include <qcheckbox.h> -#include <qbuttongroup.h> -#include <qpushbutton.h> +#include <tqcheckbox.h> +#include <tqbuttongroup.h> +#include <tqpushbutton.h> #include <kfiledialog.h> -#include <qradiobutton.h> +#include <tqradiobutton.h> #include "dolphinsettings.h" #include "dolphin.h" #include "dolphinview.h" -GeneralSettingsPage::GeneralSettingsPage(QWidget* parent) : - SettingsPageBase(parent), +GeneralSettingsPage::GeneralSettingsPage(TQWidget* tqparent) : + SettingsPageBase(tqparent), m_homeURL(0), m_startSplit(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 margin = KDialog::marginHint(); - const QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + const TQSizePolicy sizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); DolphinSettings& settings = DolphinSettings::instance(); - QVBox* vBox = new QVBox(parent); - vBox->setSizePolicy(sizePolicy); + TQVBox* vBox = new TQVBox(tqparent); + vBox->tqsetSizePolicy(sizePolicy); vBox->setSpacing(spacing); vBox->setMargin(margin); - vBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Ignored); + vBox->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Ignored); // create 'Home URL' editor - QGroupBox* homeGroup = new QGroupBox(1, Qt::Horizontal, i18n("Home URL"), vBox); - homeGroup->setSizePolicy(sizePolicy); + TQGroupBox* homeGroup = new TQGroupBox(1, Qt::Horizontal, i18n("Home URL"), vBox); + homeGroup->tqsetSizePolicy(sizePolicy); homeGroup->setMargin(margin); - QHBox* homeURLBox = new QHBox(homeGroup); - homeURLBox->setSizePolicy(sizePolicy); + TQHBox* homeURLBox = new TQHBox(homeGroup); + homeURLBox->tqsetSizePolicy(sizePolicy); homeURLBox->setSpacing(spacing); - new QLabel(i18n("Location:"), homeURLBox); - m_homeURL = new QLineEdit(settings.homeURL().prettyURL(), homeURLBox); + new TQLabel(i18n("Location:"), homeURLBox); + m_homeURL = new TQLineEdit(settings.homeURL().prettyURL(), homeURLBox); - QPushButton* selectHomeURLButton = new QPushButton(SmallIcon("folder"), QString::null, homeURLBox); - connect(selectHomeURLButton, SIGNAL(clicked()), - this, SLOT(selectHomeURL())); + TQPushButton* selectHomeURLButton = new TQPushButton(SmallIcon("folder"), TQString(), homeURLBox); + connect(selectHomeURLButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(selectHomeURL())); - QHBox* buttonBox = new QHBox(homeGroup); - buttonBox->setSizePolicy(sizePolicy); + TQHBox* buttonBox = new TQHBox(homeGroup); + buttonBox->tqsetSizePolicy(sizePolicy); buttonBox->setSpacing(spacing); - QPushButton* useCurrentButton = new QPushButton(i18n("Use current location"), buttonBox); - connect(useCurrentButton, SIGNAL(clicked()), - this, SLOT(useCurrentLocation())); - QPushButton* useDefaultButton = new QPushButton(i18n("Use default location"), buttonBox); - connect(useDefaultButton, SIGNAL(clicked()), - this, SLOT(useDefaulLocation())); + TQPushButton* useCurrentButton = new TQPushButton(i18n("Use current location"), buttonBox); + connect(useCurrentButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(useCurrentLocation())); + TQPushButton* useDefaultButton = new TQPushButton(i18n("Use default location"), buttonBox); + connect(useDefaultButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(useDefaulLocation())); // create 'Default View Mode' group - QButtonGroup* buttonGroup = new QButtonGroup(3, Qt::Vertical, i18n("Default View Mode"), vBox); - buttonGroup->setSizePolicy(sizePolicy); + TQButtonGroup* buttonGroup = new TQButtonGroup(3, Qt::Vertical, i18n("Default View Mode"), vBox); + buttonGroup->tqsetSizePolicy(sizePolicy); buttonGroup->setMargin(margin); - m_iconsView = new QRadioButton(i18n("Icons"), buttonGroup); - m_detailsView = new QRadioButton(i18n("Details"), buttonGroup); - m_previewsView = new QRadioButton(i18n("Previews"), buttonGroup); + m_iconsView = new TQRadioButton(i18n("Icons"), buttonGroup); + m_detailsView = new TQRadioButton(i18n("Details"), buttonGroup); + m_previewsView = new TQRadioButton(i18n("Previews"), buttonGroup); switch (settings.defaultViewMode()) { case DolphinView::IconsView: m_iconsView->setChecked(true); break; @@ -100,21 +100,21 @@ GeneralSettingsPage::GeneralSettingsPage(QWidget* parent) : } // 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()); // 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()); // 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()); // 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. - new QWidget(vBox); + new TQWidget(vBox); topLayout->addWidget(vBox); } @@ -150,7 +150,7 @@ void GeneralSettingsPage::applySettings() void GeneralSettingsPage::selectHomeURL() { - const QString homeURL(m_homeURL->text()); + const TQString homeURL(m_homeURL->text()); KURL url(KFileDialog::getExistingURL(homeURL)); if (!url.isEmpty()) { m_homeURL->setText(url.prettyURL()); @@ -165,7 +165,7 @@ void GeneralSettingsPage::useCurrentLocation() void GeneralSettingsPage::useDefaulLocation() { - m_homeURL->setText("file://" + QDir::homeDirPath()); + m_homeURL->setText("file://" + TQDir::homeDirPath()); } #include "generalsettingspage.moc" diff --git a/src/generalsettingspage.h b/src/generalsettingspage.h index 1d68fde..66c22da 100644 --- a/src/generalsettingspage.h +++ b/src/generalsettingspage.h @@ -21,9 +21,9 @@ #define GENERALSETTINGSPAGE_H #include <settingspagebase.h> -class QLineEdit; -class QRadioButton; -class QCheckBox; +class TQLineEdit; +class TQRadioButton; +class TQCheckBox; /** * @brief Page for the 'General' settings of the Dolphin settings dialog. @@ -36,9 +36,10 @@ class QCheckBox; class GeneralSettingsPage : public SettingsPageBase { Q_OBJECT + TQ_OBJECT public: - GeneralSettingsPage(QWidget* parent); + GeneralSettingsPage(TQWidget* tqparent); virtual ~GeneralSettingsPage(); @@ -51,13 +52,13 @@ private slots: void useDefaulLocation(); private: - QLineEdit* m_homeURL; - QRadioButton* m_iconsView; - QRadioButton* m_detailsView; - QRadioButton* m_previewsView; - QCheckBox* m_startSplit; - QCheckBox* m_startEditable; - QCheckBox* m_saveView; + TQLineEdit* m_homeURL; + TQRadioButton* m_iconsView; + TQRadioButton* m_detailsView; + TQRadioButton* m_previewsView; + TQCheckBox* m_startSplit; + TQCheckBox* m_startEditable; + TQCheckBox* m_saveView; }; #endif diff --git a/src/iconsviewsettingspage.cpp b/src/iconsviewsettingspage.cpp index f23e185..5050db7 100644 --- a/src/iconsviewsettingspage.cpp +++ b/src/iconsviewsettingspage.cpp @@ -20,11 +20,11 @@ #include "iconsviewsettingspage.h" -#include <qlabel.h> -#include <qslider.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qspinbox.h> +#include <tqlabel.h> +#include <tqslider.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqspinbox.h> #include <kiconloader.h> #include <kfontcombo.h> #include <kdialog.h> @@ -39,8 +39,8 @@ #define GRID_SPACING_INC 12 IconsViewSettingsPage::IconsViewSettingsPage(DolphinIconsView::LayoutMode mode, - QWidget* parent) : - QVBox(parent), + TQWidget* tqparent) : + TQVBox(tqparent), m_mode(mode), m_iconSizeSlider(0), m_previewSizeSlider(0), @@ -53,7 +53,7 @@ IconsViewSettingsPage::IconsViewSettingsPage(DolphinIconsView::LayoutMode mode, { const int spacing = KDialog::spacingHint(); const int margin = KDialog::marginHint(); - const QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + const TQSizePolicy sizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); setSpacing(spacing); setMargin(margin); @@ -61,26 +61,26 @@ IconsViewSettingsPage::IconsViewSettingsPage(DolphinIconsView::LayoutMode mode, DolphinIconsViewSettings* settings = DolphinSettings::instance().iconsView(m_mode); assert(settings != 0); - QHBox* sizesLayout = new QHBox(this); + TQHBox* sizesLayout = new TQHBox(this); sizesLayout->setSpacing(spacing); - sizesLayout->setSizePolicy(sizePolicy); + sizesLayout->tqsetSizePolicy(sizePolicy); // create 'Icon Size' group including slider and preview - QGroupBox* iconSizeGroup = new QGroupBox(2, Qt::Vertical, i18n("Icon Size"), sizesLayout); - iconSizeGroup->setSizePolicy(sizePolicy); + TQGroupBox* iconSizeGroup = new TQGroupBox(2, Qt::Vertical, i18n("Icon Size"), sizesLayout); + iconSizeGroup->tqsetSizePolicy(sizePolicy); 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); - new QLabel(i18n("Small"), iconSizeVBox); - m_iconSizeSlider = new QSlider(0, 5, 1, 0, Qt::Horizontal, iconSizeVBox); + new TQLabel(i18n("Small"), iconSizeVBox); + m_iconSizeSlider = new TQSlider(0, 5, 1, 0, Qt::Horizontal, iconSizeVBox); m_iconSizeSlider->setValue(sliderValue(settings->iconSize())); - m_iconSizeSlider->setTickmarks(QSlider::Below); - connect(m_iconSizeSlider, SIGNAL(valueChanged(int)), - this, SLOT(slotIconSizeChanged(int))); - new QLabel(i18n("Large"), iconSizeVBox); + m_iconSizeSlider->setTickmarks(TQSlider::Below); + connect(m_iconSizeSlider, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotIconSizeChanged(int))); + new TQLabel(i18n("Large"), iconSizeVBox); m_iconSizeViewer = new PixmapViewer(iconSizeGroup); m_iconSizeViewer->setMinimumWidth(KIcon::SizeEnormous); @@ -90,19 +90,19 @@ IconsViewSettingsPage::IconsViewSettingsPage(DolphinIconsView::LayoutMode mode, if (m_mode == DolphinIconsView::Previews) { // create 'Preview Size' group including slider and preview - QGroupBox* previewSizeGroup = new QGroupBox(2, Qt::Vertical, i18n("Preview Size"), sizesLayout); - previewSizeGroup->setSizePolicy(sizePolicy); + TQGroupBox* previewSizeGroup = new TQGroupBox(2, Qt::Vertical, i18n("Preview Size"), sizesLayout); + previewSizeGroup->tqsetSizePolicy(sizePolicy); previewSizeGroup->setMargin(margin); - QHBox* previewSizeVBox = new QHBox(previewSizeGroup); + TQHBox* previewSizeVBox = new TQHBox(previewSizeGroup); previewSizeVBox->setSpacing(spacing); - new QLabel(i18n("Small"), previewSizeVBox); - m_previewSizeSlider = new QSlider(0, 5, 1, 0, Qt::Horizontal, previewSizeVBox); + new TQLabel(i18n("Small"), previewSizeVBox); + m_previewSizeSlider = new TQSlider(0, 5, 1, 0, Qt::Horizontal, previewSizeVBox); m_previewSizeSlider->setValue(sliderValue(settings->previewSize())); - m_previewSizeSlider->setTickmarks(QSlider::Below); - connect(m_previewSizeSlider, SIGNAL(valueChanged(int)), - this, SLOT(slotPreviewSizeChanged(int))); - new QLabel(i18n("Large"), previewSizeVBox); + m_previewSizeSlider->setTickmarks(TQSlider::Below); + connect(m_previewSizeSlider, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotPreviewSizeChanged(int))); + new TQLabel(i18n("Large"), previewSizeVBox); m_previewSizeViewer = new PixmapViewer(previewSizeGroup); m_previewSizeViewer->setMinimumWidth(KIcon::SizeEnormous); @@ -112,50 +112,50 @@ IconsViewSettingsPage::IconsViewSettingsPage(DolphinIconsView::LayoutMode mode, slotPreviewSizeChanged(m_previewSizeSlider->value()); } - QGroupBox* textGroup = new QGroupBox(2, Qt::Horizontal, i18n("Text"), this); - textGroup->setSizePolicy(sizePolicy); + TQGroupBox* textGroup = new TQGroupBox(2, Qt::Horizontal, i18n("Text"), this); + textGroup->tqsetSizePolicy(sizePolicy); textGroup->setMargin(margin); - new QLabel(i18n("Font family:"), textGroup); + new TQLabel(i18n("Font family:"), textGroup); m_fontFamilyBox = new KFontCombo(textGroup); m_fontFamilyBox->setCurrentFont(settings->fontFamily()); - new QLabel(i18n("Font size:"), textGroup); - m_fontSizeBox = new QSpinBox(6, 99, 1, textGroup); + new TQLabel(i18n("Font size:"), textGroup); + m_fontSizeBox = new TQSpinBox(6, 99, 1, textGroup); m_fontSizeBox->setValue(settings->fontSize()); - new QLabel(i18n("Number of lines:"), textGroup); - m_textlinesCountBox = new QSpinBox(1, 5, 1, textGroup); + new TQLabel(i18n("Number of lines:"), textGroup); + m_textlinesCountBox = new TQSpinBox(1, 5, 1, textGroup); m_textlinesCountBox->setValue(settings->textlinesCount()); - new QLabel(i18n("Text width:"), textGroup); - m_textWidthBox = new QComboBox(textGroup); + new TQLabel(i18n("Text width:"), textGroup); + m_textWidthBox = new TQComboBox(textGroup); m_textWidthBox->insertItem(i18n("Small")); m_textWidthBox->insertItem(i18n("Medium")); m_textWidthBox->insertItem(i18n("Large")); - QGroupBox* gridGroup = new QGroupBox(2, Qt::Horizontal, i18n("Grid"), this); - gridGroup->setSizePolicy(sizePolicy); + TQGroupBox* gridGroup = new TQGroupBox(2, Qt::Horizontal, i18n("Grid"), this); + gridGroup->tqsetSizePolicy(sizePolicy); gridGroup->setMargin(margin); - const bool leftToRightArrangement = (settings->arrangement() == QIconView::LeftToRight); - new QLabel(i18n("Arrangement:"), gridGroup); - m_arrangementBox = new QComboBox(gridGroup); + const bool leftToRightArrangement = (settings->arrangement() == TQIconView::LeftToRight); + new TQLabel(i18n("Arrangement:"), gridGroup); + m_arrangementBox = new TQComboBox(gridGroup); m_arrangementBox->insertItem(i18n("Left to right")); m_arrangementBox->insertItem(i18n("Top to bottom")); m_arrangementBox->setCurrentItem(leftToRightArrangement ? 0 : 1); - new QLabel(i18n("Grid spacing:"), gridGroup); - m_gridSpacingBox = new QComboBox(gridGroup); + new TQLabel(i18n("Grid spacing:"), gridGroup); + m_gridSpacingBox = new TQComboBox(gridGroup); m_gridSpacingBox->insertItem(i18n("Small")); m_gridSpacingBox->insertItem(i18n("Medium")); m_gridSpacingBox->insertItem(i18n("Large")); m_gridSpacingBox->setCurrentItem((settings->gridSpacing() - GRID_SPACING_BASE) / GRID_SPACING_INC); // 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. - new QWidget(this); + new TQWidget(this); adjustTextWidthSelection(); } @@ -183,9 +183,9 @@ void IconsViewSettingsPage::applySettings() const int fontSize = m_fontSizeBox->value(); - QIconView::Arrangement arrangement = (m_arrangementBox->currentItem() == 0) ? - QIconView::LeftToRight : - QIconView::TopToBottom; + TQIconView::Arrangement arrangement = (m_arrangementBox->currentItem() == 0) ? + TQIconView::LeftToRight : + TQIconView::TopToBottom; settings->setArrangement(arrangement); settings->calculateGridSize(m_textWidthBox->currentItem()); diff --git a/src/iconsviewsettingspage.h b/src/iconsviewsettingspage.h index ce7ce55..f883092 100644 --- a/src/iconsviewsettingspage.h +++ b/src/iconsviewsettingspage.h @@ -21,14 +21,14 @@ #ifndef ICONSVIEWSETTINGSPAGE_H #define ICONSVIEWSETTINGSPAGE_H -#include <qvbox.h> +#include <tqvbox.h> #include <dolphiniconsview.h> -class QSlider; -class QComboBox; -class QCheckBox; -class QPushButton; -class QSpinBox; +class TQSlider; +class TQComboBox; +class TQCheckBox; +class TQPushButton; +class TQSpinBox; class KFontCombo; class PixmapViewer; @@ -49,13 +49,14 @@ class PixmapViewer; * @see DolphinIconsViewSettings * @author Peter Penz <[email protected]> */ -class IconsViewSettingsPage : public QVBox +class IconsViewSettingsPage : public TQVBox { Q_OBJECT + TQ_OBJECT public: IconsViewSettingsPage(DolphinIconsView::LayoutMode mode, - QWidget* parent); + TQWidget* tqparent); virtual ~IconsViewSettingsPage(); /** @@ -72,16 +73,16 @@ private slots: private: DolphinIconsView::LayoutMode m_mode; - QSlider* m_iconSizeSlider; + TQSlider* m_iconSizeSlider; PixmapViewer* m_iconSizeViewer; - QSlider* m_previewSizeSlider; + TQSlider* m_previewSizeSlider; PixmapViewer* m_previewSizeViewer; - QComboBox* m_textWidthBox; - QComboBox* m_gridSpacingBox; + TQComboBox* m_textWidthBox; + TQComboBox* m_gridSpacingBox; KFontCombo* m_fontFamilyBox; - QSpinBox* m_fontSizeBox; - QSpinBox* m_textlinesCountBox; - QComboBox* m_arrangementBox; + TQSpinBox* m_fontSizeBox; + TQSpinBox* m_textlinesCountBox; + TQComboBox* m_arrangementBox; /** Returns the icon size for the given slider value. */ int iconSize(int sliderValue) const; diff --git a/src/infosidebarpage.cpp b/src/infosidebarpage.cpp index 3143b03..b777ac1 100644 --- a/src/infosidebarpage.cpp +++ b/src/infosidebarpage.cpp @@ -20,18 +20,18 @@ #include "infosidebarpage.h" #include <assert.h> -#include <qlayout.h> -#include <qpixmap.h> -#include <qlabel.h> -#include <qtimer.h> -#include <qpushbutton.h> -#include <qvbox.h> -#include <qvgroupbox.h> -#include <qpopupmenu.h> -#include <qpainter.h> -#include <qfontmetrics.h> -#include <qgrid.h> -#include <qhgroupbox.h> +#include <tqlayout.h> +#include <tqpixmap.h> +#include <tqlabel.h> +#include <tqtimer.h> +#include <tqpushbutton.h> +#include <tqvbox.h> +#include <tqvgroupbox.h> +#include <tqpopupmenu.h> +#include <tqpainter.h> +#include <tqfontmetrics.h> +#include <tqgrid.h> +#include <tqhgroupbox.h> #include <kbookmarkmanager.h> #include <klocale.h> @@ -46,8 +46,8 @@ #include "pixmapviewer.h" #include "dolphinsettings.h" -InfoSidebarPage::InfoSidebarPage(QWidget* parent) : - SidebarPage(parent), +InfoSidebarPage::InfoSidebarPage(TQWidget* tqparent) : + SidebarPage(tqparent), m_multipleSelection(false), m_pendingPreview(false), m_timer(0), @@ -59,12 +59,12 @@ InfoSidebarPage::InfoSidebarPage(QWidget* parent) : { const int spacing = KDialog::spacingHint(); - m_timer = new QTimer(this); - connect(m_timer, SIGNAL(timeout()), - this, SLOT(slotTimeout())); + m_timer = new TQTimer(this); + connect(m_timer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotTimeout())); - QVBoxLayout* layout = new QVBoxLayout(this); - layout->setSpacing(spacing); + TQVBoxLayout* tqlayout = new TQVBoxLayout(this); + tqlayout->setSpacing(spacing); // preview m_preview = new PixmapViewer(this); @@ -72,42 +72,42 @@ InfoSidebarPage::InfoSidebarPage(QWidget* parent) : m_preview->setFixedHeight(KIcon::SizeEnormous); // name - m_name = new QLabel(this); - m_name->setTextFormat(Qt::RichText); - m_name->setAlignment(m_name->alignment() | Qt::AlignHCenter); - QFontMetrics fontMetrics(m_name->font()); + m_name = new TQLabel(this); + m_name->setTextFormat(TQt::RichText); + m_name->tqsetAlignment(m_name->tqalignment() | TQt::AlignHCenter); + TQFontMetrics fontMetrics(m_name->font()); 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); // general information - m_infoGrid = new QGrid(2, this); - m_infoGrid->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + m_infoGrid = new TQGrid(2, this); + 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); // actions - m_actionBox = new QVBox(this); - m_actionBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + m_actionBox = new TQVBox(this); + m_actionBox->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); // Add a dummy widget with no restriction regarding a vertical resizing. // 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)); - layout->addWidget(m_preview); - layout->addWidget(m_name); - layout->addWidget(sep1); - layout->addWidget(m_infoGrid); - layout->addWidget(sep2); - layout->addWidget(m_actionBox); - layout->addWidget(dummy); + tqlayout->addItem(new TQSpacerItem(spacing, spacing, TQSizePolicy::Preferred, TQSizePolicy::Fixed)); + tqlayout->addWidget(m_preview); + tqlayout->addWidget(m_name); + tqlayout->addWidget(sep1); + tqlayout->addWidget(m_infoGrid); + tqlayout->addWidget(sep2); + tqlayout->addWidget(m_actionBox); + tqlayout->addWidget(dummy); - connect(&Dolphin::mainWin(), SIGNAL(selectionChanged()), - this, SLOT(showItemInfo())); + connect(&Dolphin::mainWin(), TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(showItemInfo())); connectToActiveView(); } @@ -156,7 +156,7 @@ void InfoSidebarPage::showItemInfo() if (m_multipleSelection) { KIconLoader iconLoader; - QPixmap icon = iconLoader.loadIcon("exec", + TQPixmap icon = iconLoader.loadIcon("exec", KIcon::NoGroup, KIcon::SizeEnormous); m_preview->setPixmap(icon); @@ -168,17 +168,17 @@ void InfoSidebarPage::showItemInfo() list.append(m_shownURL); m_pendingPreview = true; - m_preview->setPixmap(QPixmap()); + m_preview->setPixmap(TQPixmap()); KIO::PreviewJob* job = KIO::filePreview(list, m_preview->width(), KIcon::SizeEnormous); - connect(job, SIGNAL(gotPreview(const KFileItem*, const QPixmap&)), - this, SLOT(gotPreview(const KFileItem*, const QPixmap&))); - connect(job, SIGNAL(failed(const KFileItem*)), - this, SLOT(slotPreviewFailed(const KFileItem*))); + connect(job, TQT_SIGNAL(gotPreview(const KFileItem*, const TQPixmap&)), + this, TQT_SLOT(gotPreview(const KFileItem*, const TQPixmap&))); + connect(job, TQT_SIGNAL(failed(const KFileItem*)), + this, TQT_SLOT(slotPreviewFailed(const KFileItem*))); - QString text("<b>"); + TQString text("<b>"); text.append(m_shownURL.fileName()); text.append("</b>"); m_name->setText(text); @@ -203,7 +203,7 @@ void InfoSidebarPage::slotPreviewFailed(const KFileItem* item) } void InfoSidebarPage::gotPreview(const KFileItem* /* item */, - const QPixmap& pixmap) + const TQPixmap& pixmap) { if (m_pendingPreview) { m_preview->setPixmap(pixmap); @@ -228,10 +228,10 @@ void InfoSidebarPage::connectToActiveView() cancelRequest(); DolphinView* view = Dolphin::mainWin().activeView(); - connect(view, SIGNAL(signalRequestItemInfo(const KURL&)), - this, SLOT(requestDelayedItemInfo(const KURL&))); - connect(view, SIGNAL(signalURLChanged(const KURL&)), - this, SLOT(requestItemInfo(const KURL&))); + connect(view, TQT_SIGNAL(signalRequestItemInfo(const KURL&)), + this, TQT_SLOT(requestDelayedItemInfo(const KURL&))); + connect(view, TQT_SIGNAL(signalURLChanged(const KURL&)), + this, TQT_SLOT(requestItemInfo(const KURL&))); m_shownURL = view->url(); showItemInfo(); @@ -243,13 +243,13 @@ bool InfoSidebarPage::applyBookmark() KBookmark bookmark = root.first(); while (!bookmark.isNull()) { if (m_shownURL.equals(bookmark.url(), true)) { - QString text("<b>"); + TQString text("<b>"); text.append(bookmark.text()); text.append("</b>"); m_name->setText(text); KIconLoader iconLoader; - QPixmap icon = iconLoader.loadIcon(bookmark.icon(), + TQPixmap icon = iconLoader.loadIcon(bookmark.icon(), KIcon::NoGroup, KIcon::SizeEnormous); m_preview->setPixmap(icon); @@ -285,14 +285,14 @@ void InfoSidebarPage::createMetaInfo() else { addInfoLine(i18n("Type:"), fileItem.mimeComment()); - QString sizeText(KIO::convertSize(fileItem.size())); + TQString sizeText(KIO::convertSize(fileItem.size())); addInfoLine(i18n("Size:"), sizeText); addInfoLine(i18n("Modified:"), fileItem.timeString()); const KFileMetaInfo& metaInfo = fileItem.metaInfo(); if (metaInfo.isValid()) { - QStringList keys = metaInfo.supportedKeys(); - for (QStringList::Iterator it = keys.begin(); it != keys.end(); ++it) { + TQStringList keys = metaInfo.supportedKeys(); + for (TQStringList::Iterator it = keys.begin(); it != keys.end(); ++it) { if (showMetaInfo(*it)) { KFileMetaInfoItem metaInfoItem = metaInfo.item(*it); addInfoLine(*it, metaInfoItem.string()); @@ -317,10 +317,10 @@ void InfoSidebarPage::endInfoLines() // remove labels which have not been used if (m_currInfoLineIdx < static_cast<int>(m_infoWidgets.count())) { - QPtrListIterator<QLabel> deleteIter(m_infoWidgets); + TQPtrListIterator<TQLabel> deleteIter(m_infoWidgets); deleteIter += m_currInfoLineIdx; - QWidget* widget = 0; + TQWidget* widget = 0; int removeCount = 0; while ((widget = deleteIter.current()) != 0) { 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 static const char* keys[] = { @@ -372,9 +372,9 @@ bool InfoSidebarPage::showMetaInfo(const QString& key) const 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("</b> "); @@ -386,16 +386,16 @@ void InfoSidebarPage::addInfoLine(const QString& labelText, const QString& infoT } else { // no labels are available anymore, hence create 2 new ones - QLabel* label = new QLabel(labelStr, m_infoGrid); - label->setTextFormat(Qt::RichText); - label->setAlignment(Qt::AlignRight | - Qt::AlignTop); + TQLabel* label = new TQLabel(labelStr, m_infoGrid); + label->setTextFormat(TQt::RichText); + label->tqsetAlignment(TQt::AlignRight | + TQt::AlignTop); label->show(); m_infoWidgets.append(label); - QLabel* info = new QLabel(infoText, m_infoGrid); - info->setTextFormat(Qt::RichText); - info->setAlignment(Qt::AlignTop | Qt::WordBreak); + TQLabel* info = new TQLabel(infoText, m_infoGrid); + info->setTextFormat(TQt::RichText); + info->tqsetAlignment(TQt::AlignTop | TQt::WordBreak); info->show(); m_infoWidgets.append(info); @@ -406,9 +406,9 @@ void InfoSidebarPage::addInfoLine(const QString& labelText, const QString& infoT void InfoSidebarPage::insertActions() { // delete all existing action widgets - // TODO: just use children() from QObject... - QPtrListIterator<QWidget> deleteIter(m_actionWidgets); - QWidget* widget = 0; + // TODO: just use tqchildren() from TQObject... + TQPtrListIterator<TQWidget> deleteIter(m_actionWidgets); + TQWidget* widget = 0; while ((widget = deleteIter.current()) != 0) { widget->close(); widget->deleteLater(); @@ -435,17 +435,17 @@ void InfoSidebarPage::insertActions() // 'itemList' contains now all KFileItems, where an item information should be shown. // 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. - QStringList dirs = KGlobal::dirs()->findDirs("data", "d3lphin/servicemenus/"); - for (QStringList::ConstIterator dirIt = dirs.begin(); dirIt != dirs.end(); ++dirIt) { - QDir dir(*dirIt); - QStringList entries = dir.entryList("*.desktop", QDir::Files); + TQStringList dirs = KGlobal::dirs()->findDirs("data", "d3lphin/servicemenus/"); + for (TQStringList::ConstIterator dirIt = dirs.begin(); dirIt != dirs.end(); ++dirIt) { + TQDir dir(*dirIt); + 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); cfg.setDesktopGroup(); if ((cfg.hasKey("Actions") || cfg.hasKey("X-KDE-GetActionMenu")) && cfg.hasKey("ServiceTypes")) { - const QStringList types = cfg.readListEntry("ServiceTypes"); - for (QStringList::ConstIterator it = types.begin(); it != types.end(); ++it) { + const TQStringList types = cfg.readListEntry("ServiceTypes"); + for (TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it) { // check whether the mime type is equal or whether the // mimegroup (e. g. image/*) is supported @@ -470,37 +470,37 @@ void InfoSidebarPage::insertActions() KFileItem* item = 0; insert = true; while (insert && ((item = mimeIt.current()) != 0)) { - const QString mimeType((*mimeIt)->mimetype()); - const QString mimeGroup(mimeType.left(mimeType.find('/'))); + const TQString mimeType((*mimeIt)->mimetype()); + const TQString mimeGroup(mimeType.left(mimeType.tqfind('/'))); insert = (*it == mimeType) || ((*it).right(1) == "*") && - ((*it).left((*it).find('/')) == mimeGroup); + ((*it).left((*it).tqfind('/')) == mimeGroup); ++mimeIt; } } if (insert) { - const QString submenuName = cfg.readEntry( "X-KDE-Submenu" ); - QPopupMenu* popup = 0; + const TQString submenuName = cfg.readEntry( "X-KDE-Submenu" ); + TQPopupMenu* popup = 0; if (!submenuName.isEmpty()) { // create a sub menu containing all actions - popup = new QPopupMenu(); - connect(popup, SIGNAL(activated(int)), - this, SLOT(startService(int))); + popup = new TQPopupMenu(); + connect(popup, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(startService(int))); - QPushButton* button = new QPushButton(submenuName, m_actionBox); + TQPushButton* button = new TQPushButton(submenuName, m_actionBox); button->setFlat(true); button->setPopup(popup); button->show(); m_actionWidgets.append(button); } - QValueList<KDEDesktopMimeType::Service> userServices = + TQValueList<KDEDesktopMimeType::Service> userServices = KDEDesktopMimeType::userDefinedServices(*dirIt + *entryIt, true); // 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) { KDEDesktopMimeType::Service service = (*serviceIt); if (popup == 0) { @@ -508,8 +508,8 @@ void InfoSidebarPage::insertActions() service.m_strName, m_actionBox, actionsIndex); - connect(button, SIGNAL(requestServiceStart(int)), - this, SLOT(startService(int))); + connect(button, TQT_SIGNAL(requestServiceStart(int)), + this, TQT_SLOT(startService(int))); m_actionWidgets.append(button); button->show(); } @@ -527,37 +527,37 @@ void InfoSidebarPage::insertActions() } } -ServiceButton::ServiceButton(const QIconSet& icon, - const QString& text, - QWidget* parent, +ServiceButton::ServiceButton(const TQIconSet& icon, + const TQString& text, + TQWidget* tqparent, int index) : - QPushButton(icon, text, parent), + TQPushButton(icon, text, tqparent), m_hover(false), m_index(index) { - setEraseColor(colorGroup().background()); - setFocusPolicy(QWidget::NoFocus); - connect(this, SIGNAL(released()), - this, SLOT(slotReleased())); + setEraseColor(tqcolorGroup().background()); + setFocusPolicy(TQ_NoFocus); + connect(this, TQT_SIGNAL(released()), + this, TQT_SLOT(slotReleased())); } ServiceButton::~ServiceButton() { } -void ServiceButton::drawButton(QPainter* painter) +void ServiceButton::drawButton(TQPainter* painter) { const int buttonWidth = width(); const int buttonHeight = height(); - QColor backgroundColor; - QColor foregroundColor; + TQColor backgroundColor; + TQColor foregroundColor; if (m_hover) { backgroundColor = KGlobalSettings::highlightColor(); foregroundColor = KGlobalSettings::highlightedTextColor(); } else { - backgroundColor = colorGroup().background(); + backgroundColor = tqcolorGroup().background(); foregroundColor = KGlobalSettings::buttonTextColor(); } @@ -571,9 +571,9 @@ void ServiceButton::drawButton(QPainter* painter) // draw icon int x = spacing; const int y = (buttonHeight - KIcon::SizeSmall) / 2; - const QIconSet* set = iconSet(); + const TQIconSet* set = iconSet(); 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; @@ -581,26 +581,26 @@ void ServiceButton::drawButton(QPainter* painter) painter->setPen(foregroundColor); const int textWidth = buttonWidth - x; - QFontMetrics fontMetrics(font()); + TQFontMetrics fontMetrics(font()); const bool clipped = fontMetrics.width(text()) >= textWidth; - //const int align = clipped ? Qt::AlignVCenter : Qt::AlignCenter; - painter->drawText(QRect(x, 0, textWidth, buttonHeight), Qt::AlignVCenter, text()); + //const int align = clipped ? TQt::AlignVCenter : TQt::AlignCenter; + painter->drawText(TQRect(x, 0, textWidth, buttonHeight), TQt::AlignVCenter, text()); if (clipped) { // Blend the right area of the text with the background, as the // text is clipped. - // TODO #1: use alpha blending in Qt4 instead of drawing the text that often + // TODO #1: use alpha blending in TQt4 instead of drawing the text that often // TODO #2: same code as in URLNavigatorButton::drawButton() -> provide helper class? const int blendSteps = 16; - QColor blendColor(backgroundColor); + TQColor blendColor(backgroundColor); const int redInc = (foregroundColor.red() - backgroundColor.red()) / blendSteps; const int greenInc = (foregroundColor.green() - backgroundColor.green()) / blendSteps; const int blueInc = (foregroundColor.blue() - backgroundColor.blue()) / blendSteps; 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->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.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; update(); } -void ServiceButton::leaveEvent(QEvent* event) +void ServiceButton::leaveEvent(TQEvent* event) { - QPushButton::leaveEvent(event); + TQPushButton::leaveEvent(event); m_hover = false; update(); } diff --git a/src/infosidebarpage.h b/src/infosidebarpage.h index 48e3dd4..47c7973 100644 --- a/src/infosidebarpage.h +++ b/src/infosidebarpage.h @@ -22,8 +22,8 @@ #include <sidebarpage.h> -#include <qvaluevector.h> -#include <qpushbutton.h> +#include <tqvaluevector.h> +#include <tqpushbutton.h> #include <kurl.h> #include <ksortablevaluelist.h> @@ -33,14 +33,14 @@ namespace KIO { class Job; }; -class QPixmap; -class QIconSet; -class QString; -class QPainter; +class TQPixmap; +class TQIconSet; +class TQString; +class TQPainter; class KFileItem; -class QLabel; -class QVBox; -class QGrid; +class TQLabel; +class TQVBox; +class TQGrid; class PixmapViewer; /** @@ -51,9 +51,10 @@ class PixmapViewer; class InfoSidebarPage : public SidebarPage { Q_OBJECT + TQ_OBJECT public: - InfoSidebarPage(QWidget* parent); + InfoSidebarPage(TQWidget* tqparent); virtual ~InfoSidebarPage(); protected: @@ -99,7 +100,7 @@ private slots: * Is invoked if a preview is available for the item. The preview * \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 @@ -127,8 +128,8 @@ private: // TODO: the following methods are just a prototypes for meta // info generation... void createMetaInfo(); - void addInfoLine(const QString& labelText, - const QString& infoText); + void addInfoLine(const TQString& labelText, + const TQString& infoText); void beginInfoLines(); void endInfoLines(); @@ -136,7 +137,7 @@ private: * Returns true, if the string \a key represents a meta information * 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. @@ -145,33 +146,34 @@ private: bool m_multipleSelection; bool m_pendingPreview; - QTimer* m_timer; + TQTimer* m_timer; KURL m_shownURL; KURL m_urlCandidate; PixmapViewer* m_preview; - QLabel* m_name; + TQLabel* m_name; int m_currInfoLineIdx; - QGrid* m_infoGrid; - QPtrList<QLabel> m_infoWidgets; // TODO: use children() from QObject instead + TQGrid* m_infoGrid; + TQPtrList<TQLabel> m_infoWidgets; // TODO: use tqchildren() from TQObject instead - QVBox* m_actionBox; - QPtrList<QWidget> m_actionWidgets; // TODO: use children() from QObject instead - QValueVector<KDEDesktopMimeType::Service> m_actionsVector; + TQVBox* m_actionBox; + TQPtrList<TQWidget> m_actionWidgets; // TODO: use tqchildren() from TQObject instead + TQValueVector<KDEDesktopMimeType::Service> m_actionsVector; }; // TODO #1: move to SidebarPage? // TODO #2: quite same button from the optical point of view as URLNavigatorButton // -> provide helper class or common base class -class ServiceButton : public QPushButton +class ServiceButton : public TQPushButton { Q_OBJECT + TQ_OBJECT public: - ServiceButton(const QIconSet& icon, - const QString& text, - QWidget* parent, + ServiceButton(const TQIconSet& icon, + const TQString& text, + TQWidget* tqparent, int index); virtual ~ServiceButton(); @@ -179,9 +181,9 @@ signals: void requestServiceStart(int index); protected: - virtual void drawButton(QPainter* painter); - virtual void enterEvent(QEvent* event); - virtual void leaveEvent(QEvent* event); + virtual void drawButton(TQPainter* painter); + virtual void enterEvent(TQEvent* event); + virtual void leaveEvent(TQEvent* event); private slots: void slotReleased(); diff --git a/src/itemeffectsmanager.cpp b/src/itemeffectsmanager.cpp index 1d1d199..f402f20 100644 --- a/src/itemeffectsmanager.cpp +++ b/src/itemeffectsmanager.cpp @@ -21,9 +21,9 @@ #include "itemeffectsmanager.h" #include <kiconeffect.h> #include <kapplication.h> -#include <qobjectlist.h> +#include <tqobjectlist.h> #include <kglobalsettings.h> -#include <qclipboard.h> +#include <tqclipboard.h> #include <kurldrag.h> #include <klocale.h> @@ -32,7 +32,7 @@ ItemEffectsManager::ItemEffectsManager() { - m_pixmapCopy = new QPixmap(); + m_pixmapCopy = new TQPixmap(); } ItemEffectsManager::~ItemEffectsManager() @@ -64,7 +64,7 @@ void ItemEffectsManager::activateItem(void* context) resetActivatedItem(); - const QPixmap* itemPixmap = contextPixmap(context); + const TQPixmap* itemPixmap = contextPixmap(context); if (itemPixmap != 0) { // remember the pixmap and item to be able to // 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 KIconEffect iconEffect; - QPixmap pixmap = iconEffect.apply(*itemPixmap, + TQPixmap pixmap = iconEffect.apply(*itemPixmap, KIcon::Desktop, KIcon::ActiveState); setContextPixmap(context, pixmap); @@ -96,14 +96,14 @@ void ItemEffectsManager::resetActivatedItem() if (itemURL == m_highlightedURL) { // the highlighted item has been found and is restored to the default state KIconEffect iconEffect; - QPixmap pixmap = iconEffect.apply(*m_pixmapCopy, + TQPixmap pixmap = iconEffect.apply(*m_pixmapCopy, KIcon::Desktop, KIcon::DefaultState); // 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 // non-preview pixmap. - const QPixmap* highlightedPixmap = contextPixmap(context); + const TQPixmap* highlightedPixmap = contextPixmap(context); const bool restore = (pixmap.width() == highlightedPixmap->width()) && (pixmap.height() == highlightedPixmap->height()); if (restore) { @@ -126,7 +126,7 @@ void ItemEffectsManager::updateDisabledItems() for (void* context = firstContext(); context != 0; context = nextContext(context)) { const KFileItem* fileInfo = contextFileInfo(context); const KURL& fileURL = fileInfo->url(); - QValueListIterator<DisabledItem> it = m_disabledItems.begin(); + TQValueListIterator<DisabledItem> it = m_disabledItems.begin(); while (it != m_disabledItems.end()) { if (fileURL == (*it).url) { setContextPixmap(context, (*it).pixmap); @@ -141,8 +141,8 @@ void ItemEffectsManager::updateDisabledItems() return; } - QClipboard* clipboard = QApplication::clipboard(); - QMimeSource* data = clipboard->data(); + TQClipboard* clipboard = TQApplication::tqclipboard(); + TQMimeSource* data = clipboard->data(); if (!KURLDrag::canDecode(data)) { return; } @@ -156,7 +156,7 @@ void ItemEffectsManager::updateDisabledItems() const KURL& fileURL = fileInfo->url(); for(KURL::List::ConstIterator it = urls.begin(); it != urls.end(); ++it) { if (fileURL == (*it)) { - const QPixmap* itemPixmap = contextPixmap(context); + const TQPixmap* itemPixmap = contextPixmap(context); if (itemPixmap != 0) { // remember old pixmap DisabledItem disabledItem; @@ -165,7 +165,7 @@ void ItemEffectsManager::updateDisabledItems() m_disabledItems.append(disabledItem); KIconEffect iconEffect; - QPixmap disabledPixmap = iconEffect.apply(*itemPixmap, + TQPixmap disabledPixmap = iconEffect.apply(*itemPixmap, KIcon::Desktop, KIcon::DisabledState); 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()) { // KFileItem::getStatusBar() returns "MyDocuments/ Folder" as // status bar text for a folder 'MyDocuments'. This is adjusted // to "MyDocuments (Folder)" in Dolphin. - return i18n("%1 (Folder)").arg(fileInfo->name()); + return i18n("%1 (Folder)").tqarg(fileInfo->name()); } return fileInfo->getStatusBarInfo(); diff --git a/src/itemeffectsmanager.h b/src/itemeffectsmanager.h index eb2921d..abfc009 100644 --- a/src/itemeffectsmanager.h +++ b/src/itemeffectsmanager.h @@ -21,10 +21,10 @@ #ifndef ITEMEFFECTSMANAGER_H #define ITEMEFFECTSMANAGER_H -#include <qobject.h> -#include <qpixmap.h> +#include <tqobject.h> +#include <tqpixmap.h> #include <kurl.h> -#include <qvaluelist.h> +#include <tqvaluelist.h> class KFileItem; /** @@ -42,10 +42,10 @@ class KFileItem; * which usually is represented by a KFileListViewItem or * 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 * 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 DolphinDetailsView @@ -91,8 +91,8 @@ public: protected: virtual void setContextPixmap(void* context, - const QPixmap& pixmap) = 0; - virtual const QPixmap* contextPixmap(void* context) = 0; + const TQPixmap& pixmap) = 0; + virtual const TQPixmap* contextPixmap(void* context) = 0; virtual void* firstContext() = 0; virtual void* nextContext(void* context) = 0; virtual KFileItem* contextFileInfo(void* context) = 0; @@ -104,17 +104,17 @@ protected: private: struct DisabledItem { KURL url; - QPixmap pixmap; + TQPixmap pixmap; }; - QPixmap* m_pixmapCopy; + TQPixmap* m_pixmapCopy; KURL m_highlightedURL; // 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. */ - QString statusBarText(KFileItem* fileInfo) const; + TQString statusBarText(KFileItem* fileInfo) const; }; #endif diff --git a/src/pixmapviewer.cpp b/src/pixmapviewer.cpp index 565b16c..2a2354b 100644 --- a/src/pixmapviewer.cpp +++ b/src/pixmapviewer.cpp @@ -22,10 +22,10 @@ #include <kglobalsettings.h> #include <kiconloader.h> -#include <qpainter.h> +#include <tqpainter.h> -PixmapViewer::PixmapViewer(QWidget* parent) : - QWidget(parent) +PixmapViewer::PixmapViewer(TQWidget* tqparent) : + TQWidget(tqparent) { 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; update(); } -void PixmapViewer::paintEvent(QPaintEvent* event) +void PixmapViewer::paintEvent(TQPaintEvent* event) { - QWidget::paintEvent(event); + TQWidget::paintEvent(event); - QPainter painter; + TQPainter painter; painter.begin(this); const int x = (width() - m_pixmap.width()) / 2; const int y = (height() - m_pixmap.height()) / 2; diff --git a/src/pixmapviewer.h b/src/pixmapviewer.h index 6c24974..7783b13 100644 --- a/src/pixmapviewer.h +++ b/src/pixmapviewer.h @@ -21,8 +21,8 @@ #ifndef PIXMAPVIEWER_H #define PIXMAPVIEWER_H -#include <qwidget.h> -#include <qpixmap.h> +#include <tqwidget.h> +#include <tqpixmap.h> /** * @brief Widget which shows a pixmap centered inside the boundaries. @@ -30,20 +30,21 @@ * @see IconsViewSettingsPage * @author Peter Penz <[email protected]> */ -class PixmapViewer : public QWidget +class PixmapViewer : public TQWidget { Q_OBJECT + TQ_OBJECT public: - PixmapViewer(QWidget* parent); + PixmapViewer(TQWidget* tqparent); virtual ~PixmapViewer(); - void setPixmap(const QPixmap& pixmap); - const QPixmap& pixmap() const { return m_pixmap; } + void setPixmap(const TQPixmap& pixmap); + const TQPixmap& pixmap() const { return m_pixmap; } protected: - virtual void paintEvent(QPaintEvent* event); + virtual void paintEvent(TQPaintEvent* event); private: - QPixmap m_pixmap; + TQPixmap m_pixmap; }; diff --git a/src/progressindicator.cpp b/src/progressindicator.cpp index 6509150..9936df5 100644 --- a/src/progressindicator.cpp +++ b/src/progressindicator.cpp @@ -22,13 +22,13 @@ #include "dolphin.h" #include "dolphinstatusbar.h" -ProgressIndicator::ProgressIndicator(const QString& progressText, - const QString& finishedText, +ProgressIndicator::ProgressIndicator(const TQString& progressText, + const TQString& finishedText, int operationsCount) : m_showProgress(false), m_operationsCount(operationsCount), m_operationsIndex(0), - m_startTime(QTime::currentTime()), + m_startTime(TQTime::currentTime()), m_finishedText(finishedText) { DolphinStatusBar* statusBar = Dolphin::mainWin().activeView()->statusBar(); @@ -41,7 +41,7 @@ ProgressIndicator::ProgressIndicator(const QString& progressText, ProgressIndicator::~ProgressIndicator() { DolphinStatusBar* statusBar = Dolphin::mainWin().activeView()->statusBar(); - statusBar->setProgressText(QString::null); + statusBar->setProgressText(TQString()); statusBar->setProgress(100); statusBar->setMessage(m_finishedText, DolphinStatusBar::OperationCompleted); @@ -55,7 +55,7 @@ void ProgressIndicator::execOperation() ++m_operationsIndex; if (!m_showProgress) { - const int elapsed = m_startTime.msecsTo(QTime::currentTime()); + const int elapsed = m_startTime.msecsTo(TQTime::currentTime()); if (elapsed > 500) { // the operations took already more than 500 milliseconds, // therefore show a progress indication @@ -65,14 +65,14 @@ void ProgressIndicator::execOperation() } if (m_showProgress) { - const QTime currentTime = QTime::currentTime(); + const TQTime currentTime = TQTime::currentTime(); if (m_startTime.msecsTo(currentTime) > 100) { m_startTime = currentTime; DolphinStatusBar* statusBar = Dolphin::mainWin().activeView()->statusBar(); statusBar->setProgress((m_operationsIndex * 100) / m_operationsCount); kapp->processEvents(); - statusBar->repaint(); + statusBar->tqrepaint(); } } } diff --git a/src/progressindicator.h b/src/progressindicator.h index 7889607..d4b2df1 100644 --- a/src/progressindicator.h +++ b/src/progressindicator.h @@ -20,7 +20,7 @@ #ifndef PROGRESSINDICATOR_H #define PROGRESSINDICATOR_H -#include <qdatetime.h> +#include <tqdatetime.h> /** * Allows to show a progress of synchronous operations. Sample code: @@ -51,8 +51,8 @@ public: * (e. g. "Loading finished."). * @param operationsCount Number of operations. */ - ProgressIndicator(const QString& progressText, - const QString& finishedText, + ProgressIndicator(const TQString& progressText, + const TQString& finishedText, int operationsCount); /** @@ -71,8 +71,8 @@ private: bool m_showProgress; int m_operationsCount; int m_operationsIndex; - QTime m_startTime; - QString m_finishedText; + TQTime m_startTime; + TQString m_finishedText; }; #endif diff --git a/src/renamedialog.cpp b/src/renamedialog.cpp index 7ec8681..5724112 100644 --- a/src/renamedialog.cpp +++ b/src/renamedialog.cpp @@ -20,9 +20,9 @@ #include "renamedialog.h" #include <klocale.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qvbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqvbox.h> #include <assert.h> #include <klineedit.h> @@ -32,24 +32,24 @@ RenameDialog::RenameDialog(const KURL::List& items) : { setButtonOK(KGuiItem(i18n("Rename"), "apply")); - QVBoxLayout* topLayout = new QVBoxLayout(plainPage(), 0, spacingHint()); + TQVBoxLayout* topLayout = new TQVBoxLayout(plainPage(), 0, spacingHint()); topLayout->setMargin(KDialog::marginHint()); 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()); m_lineEdit = new KLineEdit(plainPage()); m_newName = i18n("New name #"); assert(itemCount > 1); - QString postfix(items[0].prettyURL().section('.',1)); + TQString postfix(items[0].prettyURL().section('.',1)); if (postfix.length() > 0) { // 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 // case, add this postfix to the name suggestion. postfix.insert(0, '.'); 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 postfix.truncate(0); break; @@ -65,7 +65,7 @@ RenameDialog::RenameDialog(const KURL::List& items) : m_lineEdit->setSelection(0, selectionLength - 1); 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(m_lineEdit); @@ -79,7 +79,7 @@ RenameDialog::~RenameDialog() void RenameDialog::slotOk() { m_newName = m_lineEdit->text(); - if (m_newName.contains('#') != 1) { + if (m_newName.tqcontains('#') != 1) { m_newName.truncate(0); } diff --git a/src/renamedialog.h b/src/renamedialog.h index fb743db..0803b03 100644 --- a/src/renamedialog.h +++ b/src/renamedialog.h @@ -22,7 +22,7 @@ #include <kdialogbase.h> #include <kurl.h> -#include <qstring.h> +#include <tqstring.h> class KLineEdit; @@ -33,8 +33,8 @@ class KLineEdit; * must do this itself: * \code * RenameDialog dialog(...); - * if (dialog.exec() == QDialog::Accepted) { - * const QString& newName = dialog.newName(); + * if (dialog.exec() == TQDialog::Accepted) { + * const TQString& newName = dialog.newName(); * // ... rename items corresponding to the new name * } * \endcode @@ -43,6 +43,7 @@ class KLineEdit; class RenameDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: RenameDialog(const KURL::List& items); @@ -54,14 +55,14 @@ public: * which should be replaced by ascending numbers. An empty string indicates * that the user has removed the # character. */ - const QString& newName() const { return m_newName; } + const TQString& newName() const { return m_newName; } protected slots: virtual void slotOk(); private: KLineEdit* m_lineEdit; - QString m_newName; + TQString m_newName; }; #endif diff --git a/src/servicemenus/amarok_play_audiocd.desktop b/src/servicemenus/amarok_play_audiocd.desktop index 4bfa828..30bf358 100644 --- a/src/servicemenus/amarok_play_audiocd.desktop +++ b/src/servicemenus/amarok_play_audiocd.desktop @@ -31,11 +31,11 @@ Name[mk]=Свири аудиоцд со Амарок Name[nds]=Audio-CD mit Amarok afspelen Name[nl]=Audio-cd met Amarok afspelen 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_BR]=Reproduzir CD de Áudio com o Amarok 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@Latn]=Pusti audio CD pomoću Amarok-a Name[sv]=Spela ljud-cd med Amarok diff --git a/src/servicemenus/k3b_audiocd_rip.desktop b/src/servicemenus/k3b_audiocd_rip.desktop index 387d44a..0446cc3 100644 --- a/src/servicemenus/k3b_audiocd_rip.desktop +++ b/src/servicemenus/k3b_audiocd_rip.desktop @@ -10,7 +10,7 @@ Name[ar]= استعمل K3b لاستخراج الصوتي الرقمي. Name[bg]=Извличане на цифров звук с K3b Name[br]=Eztennañ klevet niverel gant 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[de]=Digital-Audio mit K3b auslesen Name[el]=Εξαγωγή ψηφιακού ήχου με το K3b @@ -30,10 +30,10 @@ Name[ms]=Ekstrak Audio Digital dengan K3b Name[nds]=Digitaal Audiodaten mit K3b ruttrecken Name[nl]=Digitale audio rippen met 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_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@Latn]=Izdvoj digitalni zvuk pomoću K3b-a Name[sv]=Lagra digitalljud med K3b diff --git a/src/servicemenus/k3b_cd_copy.desktop b/src/servicemenus/k3b_cd_copy.desktop index fc78f8a..9e37872 100644 --- a/src/servicemenus/k3b_cd_copy.desktop +++ b/src/servicemenus/k3b_cd_copy.desktop @@ -10,7 +10,7 @@ Name[ar]= انقل القرص المدمج بواسطة K3b . Name[bg]=Копиране на CD с K3b Name[br]=Eilañ ur CD gant 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[de]=CD mit K3b kopieren Name[el]=Αντιγραφή CD με το K3b @@ -31,11 +31,11 @@ Name[ms]=Salin CD dengan K3b Name[nds]=CD mit K3b koperen Name[nl]=CD kopiëren met K3b 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_BR]=Copiar CD com o K3b Name[ru]=Записать компакт-диск, используя K3b... -Name[sk]=Kopírovať CD pomocou K3b +Name[sk]=Kopírovať CD potqmocou K3b Name[sr]=Копирај CD помоћу K3b-а Name[sr@Latn]=Kopiraj CD pomoću K3b-a Name[sv]=Kopiera cd med K3b diff --git a/src/servicemenus/k3b_create_audio_cd.desktop b/src/servicemenus/k3b_create_audio_cd.desktop index efc1a79..2303bd6 100644 --- a/src/servicemenus/k3b_create_audio_cd.desktop +++ b/src/servicemenus/k3b_create_audio_cd.desktop @@ -105,7 +105,7 @@ Name[mk]=Креирајте аудио-CD со K3b... Name[nb]=Brenn lyd-CD-er med K3b... Name[nl]=Audio-cd aanmaken met K3b... 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_BR]=Criar CD de Áudio com K3b... Name[ru]=Записать аудио компакт-диск, используя K3b... diff --git a/src/servicemenus/k3b_create_video_cd.desktop b/src/servicemenus/k3b_create_video_cd.desktop index 45cca6a..2d3a8c1 100644 --- a/src/servicemenus/k3b_create_video_cd.desktop +++ b/src/servicemenus/k3b_create_video_cd.desktop @@ -106,7 +106,7 @@ Name[nb]=Brenn video-CD-er med K3b... Name[nl]=Video-cd aanmaken K3b... #SUSE-Overwrite 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_BR]=Criar CD de Vídeo com K3b... Name[ru]=Записать видео компакт-диск, используя K3b... diff --git a/src/servicemenus/k3b_dvd_copy.desktop b/src/servicemenus/k3b_dvd_copy.desktop index f85ffcb..e511bf8 100644 --- a/src/servicemenus/k3b_dvd_copy.desktop +++ b/src/servicemenus/k3b_dvd_copy.desktop @@ -10,7 +10,7 @@ Name[ar]= انسخ القرص الرقمي المرئي (DVD) بواسطة K3b Name[bg]=Копиране на DVD с K3b Name[br]=Eilañ un DVD gant 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[de]=DVD mit K3b kopieren Name[el]=Αντιγραφή DVD με το K3b @@ -31,11 +31,11 @@ Name[ms]=Salin DVD dengan K3b Name[nds]=DVD mit K3b koperen Name[nl]=DVD kopiëren met K3b 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_BR]=Copiar DVD com o K3b Name[ru]=Копировать DVD, используя K3b... -Name[sk]=Vytvoriť DVD pomocou K3b +Name[sk]=Vytvoriť DVD potqmocou K3b Name[sr]=Копирај DVD помоћу K3b-а Name[sr@Latn]=Kopiraj DVD pomoću K3b-a Name[sv]=Kopiera dvd med K3b diff --git a/src/servicemenus/k3b_handle_empty_cd.desktop b/src/servicemenus/k3b_handle_empty_cd.desktop index 63f9283..4aee153 100644 --- a/src/servicemenus/k3b_handle_empty_cd.desktop +++ b/src/servicemenus/k3b_handle_empty_cd.desktop @@ -39,11 +39,11 @@ Name[ne]=K3b... Name[nl]=Gegevens-cd aanmaken met K3b... Name[nn]=Lag data-CD med K3b … 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_BR]=Criar CD de Dados com o 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[sr]=Направи CD са подацима помоћу K3b-а... 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[nn]=Lag lyd-CD med K3b … 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_BR]=Criar CD de Áudio com o 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[sr]=Направи аудио CD помоћу K3b-а... Name[sr@Latn]=Napravi audio CD pomoću K3b-a... diff --git a/src/servicemenus/k3b_handle_empty_dvd.desktop b/src/servicemenus/k3b_handle_empty_dvd.desktop index 74f8780..b657b70 100644 --- a/src/servicemenus/k3b_handle_empty_dvd.desktop +++ b/src/servicemenus/k3b_handle_empty_dvd.desktop @@ -39,11 +39,11 @@ Name[ne]=K3b... Name[nl]=Gegevens-cd aanmaken met K3b... Name[nn]=Lag data-CD med K3b … 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_BR]=Criar CD de Dados com o 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[sr]=Направи CD са подацима помоћу K3b-а... 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[nl]=Gegevens-dvd aanmaken met K3b... 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_BR]=Criar DVD de Dados com o 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@Latn]=Napravi DVD sa podacima pomoću K3b-a... Name[sv]=Skapa data-dvd med K3b... diff --git a/src/servicemenus/k3b_videodvd_rip.desktop b/src/servicemenus/k3b_videodvd_rip.desktop index a915e67..b163ab1 100644 --- a/src/servicemenus/k3b_videodvd_rip.desktop +++ b/src/servicemenus/k3b_videodvd_rip.desktop @@ -9,7 +9,7 @@ Name[af]=Kopiëer Video DVD titels m.b.v. K3b Name[ar]= استخرج عناوين مرئيات من القرص المرئي الرقمي (DVD) بواسطة K3b Name[bg]=Извличане на DVD заглавия с 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[de]=DVD-Titel mit K3b auslesen 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[nl]=Video-dvd-titels rippen met K3b 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_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@Latn]=Isčupaj titlove sa video DVD-a pomoću K3b-a Name[sv]=Lagra dvd-titlar med K3b diff --git a/src/servicemenus/k3b_write_bin_image.desktop b/src/servicemenus/k3b_write_bin_image.desktop index aaf7967..92ad5cf 100644 --- a/src/servicemenus/k3b_write_bin_image.desktop +++ b/src/servicemenus/k3b_write_bin_image.desktop @@ -105,7 +105,7 @@ Name[mk]=Запишете CD-слика со K3b... Name[nb]=Brenn diskbilde på CD med K3b... Name[nl]=CD-image schrijven met K3b... 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_BR]=Gravar Imagem em CD com K3b... Name[ru]=Записать образ CD, используя K3b... diff --git a/src/servicemenus/k3b_write_iso_image.desktop b/src/servicemenus/k3b_write_iso_image.desktop index 8808f80..08560af 100644 --- a/src/servicemenus/k3b_write_iso_image.desktop +++ b/src/servicemenus/k3b_write_iso_image.desktop @@ -105,7 +105,7 @@ Name[mk]=Запишете CD-слика со K3b... Name[nb]=Brenn diskbilde på CD med K3b... Name[nl]=CD-image schrijven met K3b... 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_BR]=Gravar Imagem em CD com K3b... Name[ru]=Записать образ CD, используя K3b... diff --git a/src/servicemenus/konqgwenview.desktop b/src/servicemenus/konqgwenview.desktop index 1354948..319f68b 100644 --- a/src/servicemenus/konqgwenview.desktop +++ b/src/servicemenus/konqgwenview.desktop @@ -10,7 +10,7 @@ Name[bg]=Преглед с Gwenview Name[br]=Furchal gant Gwenview Name[bs]=Pregledaj sa 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[de]=Dateien mit Gwenview durchsehen Name[el]=Εξερεύνηση με το Gwenview @@ -31,7 +31,7 @@ Name[ka]=დათვალიერება Gwenview-ით Name[ms]= Lungsur dengan Gwenview Name[nl]=Bladeren met 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_BR]=Navegar com Gwenview Name[ru]=Просмотреть в Gwenview diff --git a/src/servicemenus/smb2rdc.desktop b/src/servicemenus/smb2rdc.desktop index 4b55dea..5399d17 100644 --- a/src/servicemenus/smb2rdc.desktop +++ b/src/servicemenus/smb2rdc.desktop @@ -11,7 +11,7 @@ Name[bn]=এই মেশিনে প্রত্যন্ত ডেস্ক� Name[bs]=Otvori Remote Desktop vezu na ovaj računar 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[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[el]=Δημιουργία σύνδεσης σε απομακρυσμένη επιφάνεια εργασίας σε αυτό το μηχάνημα Name[es]=Abrir conexión remota de escritorio a este sistema @@ -29,11 +29,11 @@ Name[ja]=このホストへリモートデスクトップ接続を開く Name[kk]=Осы компьютердегі үстелге қашық қосылымды ашу Name[km]=បើកការតភ្ជាបផ្ទៃតុពីចម្ងាយទៅម៉ាស៊ីននេះ 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[ne]=यो मेशिनमा टाढाको डेस्कटप जडान खोल्नुहोस् 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[pl]=Otwórz zdalne połączenie z pulpitem na tej maszynie Name[pt]=Abrir Ligação Remota a Ecrã para Este Computador diff --git a/src/settingspagebase.cpp b/src/settingspagebase.cpp index 244242c..3cec7db 100644 --- a/src/settingspagebase.cpp +++ b/src/settingspagebase.cpp @@ -20,8 +20,8 @@ #include "settingspagebase.h" -SettingsPageBase::SettingsPageBase(QWidget* parent) : - QWidget(parent) +SettingsPageBase::SettingsPageBase(TQWidget* tqparent) : + TQWidget(tqparent) { } diff --git a/src/settingspagebase.h b/src/settingspagebase.h index 0d4ec54..0d6e10e 100644 --- a/src/settingspagebase.h +++ b/src/settingspagebase.h @@ -21,19 +21,20 @@ #ifndef SETTINGSPAGEBASE_H #define SETTINGSPAGEBASE_H -#include <qwidget.h> +#include <tqwidget.h> /** * @brief Base class for the settings pages of the Dolphin settings dialog. * * @author Peter Penz <[email protected]> */ -class SettingsPageBase : public QWidget +class SettingsPageBase : public TQWidget { Q_OBJECT + TQ_OBJECT public: - SettingsPageBase(QWidget* parent); + SettingsPageBase(TQWidget* tqparent); virtual ~SettingsPageBase(); /** diff --git a/src/sidebarpage.cpp b/src/sidebarpage.cpp index e102b7d..e490be8 100644 --- a/src/sidebarpage.cpp +++ b/src/sidebarpage.cpp @@ -20,11 +20,11 @@ #include "sidebarpage.h" #include "dolphin.h" -SidebarPage::SidebarPage(QWidget* parent) : - QWidget(parent) +SidebarPage::SidebarPage(TQWidget* tqparent) : + TQWidget(tqparent) { - connect(&Dolphin::mainWin(), SIGNAL(activeViewChanged()), - this, SLOT(activeViewChanged())); + connect(&Dolphin::mainWin(), TQT_SIGNAL(activeViewChanged()), + this, TQT_SLOT(activeViewChanged())); } SidebarPage::~SidebarPage() diff --git a/src/sidebarpage.h b/src/sidebarpage.h index e136016..2346ce0 100644 --- a/src/sidebarpage.h +++ b/src/sidebarpage.h @@ -21,7 +21,7 @@ #ifndef _SIDEBARPAGE_H_ #define _SIDEBARPAGE_H_ -#include <qwidget.h> +#include <tqwidget.h> class Sidebar; @@ -30,12 +30,13 @@ class Sidebar; * * TODO */ -class SidebarPage : public QWidget +class SidebarPage : public TQWidget { Q_OBJECT + TQ_OBJECT public: - SidebarPage(QWidget* parent); + SidebarPage(TQWidget* tqparent); virtual ~SidebarPage(); protected slots: diff --git a/src/sidebars.cpp b/src/sidebars.cpp index b9f8ca6..551c4af 100644 --- a/src/sidebars.cpp +++ b/src/sidebars.cpp @@ -20,11 +20,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include <qlayout.h> -#include <qpixmap.h> +#include <tqlayout.h> +#include <tqpixmap.h> #include <kiconloader.h> #include <klocale.h> -#include <qcombobox.h> +#include <tqcombobox.h> #include "dolphinsettings.h" #include "sidebarssettings.h" @@ -36,46 +36,46 @@ /** * - * @param parent + * @param tqparent */ -leftSidebar::leftSidebar(QWidget* parent) : - QWidget(parent), +leftSidebar::leftSidebar(TQWidget* tqparent) : + TQWidget(tqparent), m_pagesSelector(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("Information")); // 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 // constructor (-> provide a shared height setting?) - //QFontMetrics fontMetrics(font()); - QFontMetrics fontMetrics(font()); + //TQFontMetrics fontMetrics(font()); + TQFontMetrics fontMetrics(font()); m_pagesSelector->setMinimumHeight(fontMetrics.height() + 8); leftSidebarSettings* settings = DolphinSettings::instance().leftsidebar(); const int selectedIndex = indexForName(settings->selectedPage()); m_pagesSelector->setCurrentItem(selectedIndex); - m_layout->addWidget(m_pagesSelector); + m_tqlayout->addWidget(m_pagesSelector); createPage(selectedIndex); - connect(m_pagesSelector, SIGNAL(activated(int)), - this, SLOT(createPage(int))); + connect(m_pagesSelector, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(createPage(int))); } leftSidebar::~leftSidebar() { } -QSize leftSidebar::sizeHint() const +TQSize leftSidebar::tqsizeHint() const { - QSize size(QWidget::sizeHint()); + TQSize size(TQWidget::tqsizeHint()); leftSidebarSettings* settings = DolphinSettings::instance().leftsidebar(); size.setWidth(settings->width()); @@ -95,14 +95,14 @@ void leftSidebar::createPage(int index) default: break; } - m_layout->addWidget(m_page); + m_tqlayout->addWidget(m_page); m_page->show(); leftSidebarSettings* settings = DolphinSettings::instance().leftsidebar(); 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(); for (int i = 0; i < count; ++i) { @@ -114,43 +114,43 @@ int leftSidebar::indexForName(const QString& name) const return 0; } -rightSidebar::rightSidebar(QWidget* parent) : - QWidget(parent), +rightSidebar::rightSidebar(TQWidget* tqparent) : + TQWidget(tqparent), m_pagesSelector(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("Information")); // 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 // constructor (-> provide a shared height setting?) - QFontMetrics fontMetrics(font()); + TQFontMetrics fontMetrics(font()); m_pagesSelector->setMinimumHeight(fontMetrics.height() + 8); rightSidebarSettings* settings = DolphinSettings::instance().rightsidebar(); const int selectedIndex = indexForName(settings->selectedPage()); m_pagesSelector->setCurrentItem(selectedIndex); - m_layout->addWidget(m_pagesSelector); + m_tqlayout->addWidget(m_pagesSelector); createPage(selectedIndex); - connect(m_pagesSelector, SIGNAL(activated(int)), - this, SLOT(createPage(int))); + connect(m_pagesSelector, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(createPage(int))); } rightSidebar::~rightSidebar() { } -QSize rightSidebar::sizeHint() const +TQSize rightSidebar::tqsizeHint() const { - QSize size(QWidget::sizeHint()); + TQSize size(TQWidget::tqsizeHint()); rightSidebarSettings* settings = DolphinSettings::instance().rightsidebar(); size.setWidth(settings->width()); @@ -170,14 +170,14 @@ void rightSidebar::createPage(int index) default: break; } - m_layout->addWidget(m_page); + m_tqlayout->addWidget(m_page); m_page->show(); rightSidebarSettings* settings = DolphinSettings::instance().rightsidebar(); 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(); for (int i = 0; i < count; ++i) { diff --git a/src/sidebars.h b/src/sidebars.h index d7eac77..afdaa13 100644 --- a/src/sidebars.h +++ b/src/sidebars.h @@ -23,28 +23,29 @@ #ifndef _SIDEBARS_H_ #define _SIDEBARS_H_ -#include <qwidget.h> +#include <tqwidget.h> class KURL; -class QComboBox; -class QVBoxLayout; +class TQComboBox; +class TQVBoxLayout; class SidebarPage; -class leftSidebar : public QWidget +class leftSidebar : public TQWidget { Q_OBJECT + TQ_OBJECT public: - leftSidebar(QWidget* parent); + leftSidebar(TQWidget* tqparent); virtual ~leftSidebar(); - virtual QSize sizeHint() const; + virtual TQSize tqsizeHint() const; signals: /** * 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); @@ -52,27 +53,28 @@ class leftSidebar : public QWidget void createPage(int index); private: - int indexForName(const QString& name) const; + int indexForName(const TQString& name) const; - QComboBox* m_pagesSelector; + TQComboBox* m_pagesSelector; SidebarPage* m_page; - QVBoxLayout* m_layout; + TQVBoxLayout* m_tqlayout; }; -class rightSidebar : public QWidget +class rightSidebar : public TQWidget { Q_OBJECT + TQ_OBJECT public: - rightSidebar(QWidget* parent); + rightSidebar(TQWidget* tqparent); virtual ~rightSidebar(); - virtual QSize sizeHint() const; + virtual TQSize tqsizeHint() const; signals: /** * The user selected an item on sidebar widget and item has - * URL property, so inform the parent togo to this URL; + * URL property, so inform the tqparent togo to this URL; */ void urlChanged(const KURL& url); @@ -80,11 +82,11 @@ class rightSidebar : public QWidget void createPage(int index); private: - int indexForName(const QString& name) const; + int indexForName(const TQString& name) const; - QComboBox* m_pagesSelector; + TQComboBox* m_pagesSelector; SidebarPage* m_page; - QVBoxLayout* m_layout; + TQVBoxLayout* m_tqlayout; }; #endif // _SIDEBARS_H_ diff --git a/src/sidebarssettings.h b/src/sidebarssettings.h index 7ef678d..3a857aa 100644 --- a/src/sidebarssettings.h +++ b/src/sidebarssettings.h @@ -21,7 +21,7 @@ #ifndef SIDEBARSETTINGS_H #define SIDEBARSETTINGS_H -#include <qstring.h> +#include <tqstring.h> #include <dolphinsettingsbase.h> @@ -36,15 +36,15 @@ public: void setWidth(int width); int width() const { return m_width; } - void setSelectedPage(const QString& pageName) { m_selectedPage = pageName; } - const QString& selectedPage() const { return m_selectedPage; } + void setSelectedPage(const TQString& pageName) { m_selectedPage = pageName; } + const TQString& selectedPage() const { return m_selectedPage; } virtual void save(); protected: bool m_visible; int m_width; - QString m_selectedPage; + TQString m_selectedPage; }; class rightSidebarSettings @@ -58,15 +58,15 @@ public: void setWidth(int width); int width() const { return m_width; } - void setSelectedPage(const QString& pageName) { m_selectedPage = pageName; } - const QString& selectedPage() const { return m_selectedPage; } + void setSelectedPage(const TQString& pageName) { m_selectedPage = pageName; } + const TQString& selectedPage() const { return m_selectedPage; } virtual void save(); protected: bool m_visible; int m_width; - QString m_selectedPage; + TQString m_selectedPage; }; #endif diff --git a/src/statusbarmessagelabel.cpp b/src/statusbarmessagelabel.cpp index 8998f98..5026795 100644 --- a/src/statusbarmessagelabel.cpp +++ b/src/statusbarmessagelabel.cpp @@ -19,14 +19,14 @@ ***************************************************************************/ #include "statusbarmessagelabel.h" -#include <qpainter.h> -#include <qtimer.h> -#include <qfontmetrics.h> +#include <tqpainter.h> +#include <tqtimer.h> +#include <tqfontmetrics.h> #include <kiconloader.h> #include <kglobalsettings.h> -StatusBarMessageLabel::StatusBarMessageLabel(QWidget* parent) : - QWidget(parent), +StatusBarMessageLabel::StatusBarMessageLabel(TQWidget* tqparent) : + TQWidget(tqparent), m_type(DolphinStatusBar::Default), m_state(Default), m_illumination(0), @@ -35,9 +35,9 @@ StatusBarMessageLabel::StatusBarMessageLabel(QWidget* parent) : { setMinimumHeight(KIcon::SizeSmall); - m_timer = new QTimer(this); - connect(m_timer, SIGNAL(timeout()), - this, SLOT(timerDone())); + m_timer = new TQTimer(this); + connect(m_timer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(timerDone())); } StatusBarMessageLabel::~StatusBarMessageLabel() @@ -54,7 +54,7 @@ void StatusBarMessageLabel::setType(DolphinStatusBar::Type type) m_state = Default; const char* iconName = 0; - QPixmap pixmap; + TQPixmap pixmap; switch (type) { case DolphinStatusBar::OperationCompleted: iconName = "ok"; @@ -74,13 +74,13 @@ void StatusBarMessageLabel::setType(DolphinStatusBar::Type type) default: break; } - m_pixmap = (iconName == 0) ? QPixmap() : SmallIcon(iconName); + m_pixmap = (iconName == 0) ? TQPixmap() : SmallIcon(iconName); assureVisibleText(); update(); } } -void StatusBarMessageLabel::setText(const QString& text) +void StatusBarMessageLabel::setText(const TQString& text) { if (text != m_text) { 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()); - QPainter painter(&buffer); + TQPixmap buffer(size()); + TQPainter painter(&buffer); // draw background - QColor backgroundColor(colorGroup().background()); - QColor foregroundColor(KGlobalSettings::textColor()); + TQColor backgroundColor(tqcolorGroup().background()); + TQColor foregroundColor(KGlobalSettings::textColor()); if (m_illumination > 0) { - backgroundColor = mixColors(backgroundColor, QColor(255, 255, 64), m_illumination); - foregroundColor = mixColors(foregroundColor, QColor(0, 0, 0), m_illumination); + backgroundColor = mixColors(backgroundColor, TQColor(255, 255, 64), m_illumination); + foregroundColor = mixColors(foregroundColor, TQColor(0, 0, 0), m_illumination); } painter.setBrush(backgroundColor); painter.setPen(backgroundColor); - painter.drawRect(QRect(0, 0, width(), height())); + painter.drawRect(TQRect(0, 0, width(), height())); // draw pixmap int x = pixmapGap(); @@ -129,16 +129,16 @@ void StatusBarMessageLabel::paintEvent(QPaintEvent* /* event */) // draw text 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(); bitBlt(this, 0, 0, &buffer); } -void StatusBarMessageLabel::resizeEvent(QResizeEvent* event) +void StatusBarMessageLabel::resizeEvent(TQResizeEvent* event) { - QWidget::resizeEvent(event); - QTimer::singleShot(0, this, SLOT(assureVisibleText())); + TQWidget::resizeEvent(event); + TQTimer::singleShot(0, this, TQT_SLOT(assureVisibleText())); } void StatusBarMessageLabel::timerDone() @@ -191,9 +191,9 @@ void StatusBarMessageLabel::assureVisibleText() int availableWidth = width() - m_pixmap.width() - pixmapGap() * 2; - QFontMetrics fontMetrics(font()); - QRect bounds(fontMetrics.boundingRect(0, 0, availableWidth, height(), - Qt::AlignVCenter | Qt::WordBreak, + TQFontMetrics fontMetrics(font()); + TQRect bounds(fontMetrics.boundingRect(0, 0, availableWidth, height(), + TQt::AlignVCenter | TQt::WordBreak, m_text)); int requiredHeight = bounds.height(); if (requiredHeight < m_minTextHeight) { @@ -203,15 +203,15 @@ void StatusBarMessageLabel::assureVisibleText() updateGeometry(); } -QColor StatusBarMessageLabel::mixColors(const QColor& c1, - const QColor& c2, +TQColor StatusBarMessageLabel::mixColors(const TQColor& c1, + const TQColor& c2, int percent) const { const int recip = 100 - percent; const int red = (c1.red() * recip + c2.red() * percent) / 100; const int green = (c1.green() * recip + c2.green() * 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" diff --git a/src/statusbarmessagelabel.h b/src/statusbarmessagelabel.h index c743f85..0c7c31f 100644 --- a/src/statusbarmessagelabel.h +++ b/src/statusbarmessagelabel.h @@ -21,11 +21,11 @@ #ifndef STATUSBARMESSAGELABEL_H #define STATUSBARMESSAGELABEL_H -#include <qwidget.h> -#include <qpixmap.h> -#include <qstring.h> +#include <tqwidget.h> +#include <tqpixmap.h> +#include <tqstring.h> #include <dolphinstatusbar.h> -class QTimer; +class TQTimer; /** * @brief Represents a message text label as part of the status bar. @@ -37,30 +37,31 @@ class QTimer; * * @author Peter Penz */ -class StatusBarMessageLabel : public QWidget +class StatusBarMessageLabel : public TQWidget { Q_OBJECT + TQ_OBJECT public: - StatusBarMessageLabel(QWidget* parent); + StatusBarMessageLabel(TQWidget* tqparent); virtual ~StatusBarMessageLabel(); void setType(DolphinStatusBar::Type type); DolphinStatusBar::Type type() const { return m_type; } - void setText(const QString& text); - const QString& text() const { return m_text; } + void setText(const TQString& text); + const TQString& text() const { return m_text; } // TODO: maybe a better approach is possible with the size hint void setMinimumTextHeight(int min); int minimumTextHeight() const { return m_minTextHeight; } protected: - /** @see QWidget::paintEvent */ - virtual void paintEvent(QPaintEvent* event); + /** @see TQWidget::paintEvent */ + virtual void paintEvent(TQPaintEvent* event); - /** @see QWidget::resizeEvent */ - virtual void resizeEvent(QResizeEvent* event); + /** @see TQWidget::resizeEvent */ + virtual void resizeEvent(TQResizeEvent* event); private slots: void timerDone(); @@ -78,12 +79,12 @@ private: State m_state; int m_illumination; int m_minTextHeight; - QTimer* m_timer; - QString m_text; - QPixmap m_pixmap; + TQTimer* m_timer; + TQString m_text; + TQPixmap m_pixmap; - QColor mixColors(const QColor& c1, - const QColor& c2, + TQColor mixColors(const TQColor& c1, + const TQColor& c2, int percent) const; int pixmapGap() const { return 3; } diff --git a/src/statusbarspaceinfo.cpp b/src/statusbarspaceinfo.cpp index 221a4f0..cf70190 100644 --- a/src/statusbarspaceinfo.cpp +++ b/src/statusbarspaceinfo.cpp @@ -20,15 +20,15 @@ #include "statusbarspaceinfo.h" -#include <qpainter.h> -#include <qtimer.h> +#include <tqpainter.h> +#include <tqtimer.h> #include <kglobalsettings.h> #include <kdiskfreesp.h> #include <klocale.h> #include <kio/job.h> -StatusBarSpaceInfo::StatusBarSpaceInfo(QWidget* parent) : - QWidget(parent), +StatusBarSpaceInfo::StatusBarSpaceInfo(TQWidget* tqparent) : + TQWidget(tqparent), m_gettingSize(false), m_kBSize(0), m_kBAvailable(0) @@ -37,8 +37,8 @@ StatusBarSpaceInfo::StatusBarSpaceInfo(QWidget* parent) : // Update the space information each 10 seconds. Polling is useful // here, as files can be deleted/added outside the scope of Dolphin. - QTimer* timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), this, SLOT(refresh())); + TQTimer* timer = new TQTimer(this); + connect(timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(refresh())); timer->start(10000); } @@ -53,32 +53,32 @@ void StatusBarSpaceInfo::setURL(const KURL& url) update(); } -void StatusBarSpaceInfo::paintEvent(QPaintEvent* /* event */) +void StatusBarSpaceInfo::paintEvent(TQPaintEvent* /* event */) { - QPainter painter(this); + TQPainter painter(this); const int barWidth = width(); const int barTop = 2; const int barHeight = height() - 4; - QString text; + TQString text; const int widthDec = 3; // visual decrement for the available width - const QColor c1 = colorGroup().background(); - const QColor c2 = KGlobalSettings::buttonTextColor(); - const QColor frameColor((c1.red() + c2.red()) / 2, + const TQColor c1 = tqcolorGroup().background(); + const TQColor c2 = KGlobalSettings::buttonTextColor(); + const TQColor frameColor((c1.red() + c2.red()) / 2, (c1.green() + c2.green()) / 2, (c1.blue() + c2.blue()) / 2); painter.setPen(frameColor); - const QColor backgrColor = KGlobalSettings::baseColor(); + const TQColor backgrColor = KGlobalSettings::baseColor(); 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)) { // draw 'used size' bar - painter.setPen(Qt::NoPen); + painter.setPen(TQt::NoPen); painter.setBrush(progressColor(backgrColor)); int usedWidth = barWidth - static_cast<int>((m_kBAvailable * static_cast<float>(barWidth)) / m_kBSize); @@ -87,10 +87,10 @@ void StatusBarSpaceInfo::paintEvent(QPaintEvent* /* event */) if (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") - .arg(KIO::convertSizeFromKB(m_kBAvailable)); + .tqarg(KIO::convertSizeFromKB(m_kBAvailable)); } else { if (m_gettingSize) { @@ -98,14 +98,14 @@ void StatusBarSpaceInfo::paintEvent(QPaintEvent* /* event */) } else { text = ""; - QTimer::singleShot(0, this, SLOT(hide())); + TQTimer::singleShot(0, this, TQT_SLOT(hide())); } } // draw text (usually 'Y GB free') painter.setPen(KGlobalSettings::textColor()); - painter.drawText(QRect(1, 1, barWidth - 2, barHeight + 4), - Qt::AlignHCenter | Qt::AlignVCenter | Qt::WordBreak, + painter.drawText(TQRect(1, 1, barWidth - 2, barHeight + 4), + TQt::AlignHCenter | TQt::AlignVCenter | TQt::WordBreak, text); } @@ -113,7 +113,7 @@ void StatusBarSpaceInfo::paintEvent(QPaintEvent* /* event */) void StatusBarSpaceInfo::slotFoundMountPoint(const unsigned long& kBSize, const unsigned long& /* kBUsed */, const unsigned long& kBAvailable, - const QString& /* mountPoint */) + const TQString& /* mountPoint */) { m_gettingSize = false; m_kBSize = kBSize; @@ -122,7 +122,7 @@ void StatusBarSpaceInfo::slotFoundMountPoint(const unsigned long& kBSize, // Bypass a the issue (?) of KDiskFreeSp that for protocols like // FTP, SMB the size of root partition is returned. // 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")) { m_kBSize = 0; m_kBAvailable = 0; @@ -147,26 +147,26 @@ void StatusBarSpaceInfo::refresh() m_kBSize = 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); - connect(job, SIGNAL(foundMountPoint(const unsigned long&, + KDiskFreeSp* job = new KDiskFreeSp(TQT_TQOBJECT(this)); + connect(job, TQT_SIGNAL(foundMountPoint(const unsigned long&, const unsigned long&, const unsigned long&, - const QString& )), - this, SLOT(slotFoundMountPoint(const unsigned long&, + const TQString& )), + this, TQT_SLOT(slotFoundMountPoint(const unsigned long&, const unsigned long&, const unsigned long&, - const QString& ))); - connect(job, SIGNAL(done()), - this, SLOT(slotDone())); + const TQString& ))); + connect(job, TQT_SIGNAL(done()), + this, TQT_SLOT(slotDone())); 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 // and the progressbar color @@ -174,8 +174,8 @@ QColor StatusBarSpaceInfo::progressColor(const QColor& bgColor) const int bgGreen = bgColor.green(); int bgBlue = bgColor.blue(); - const int backgrBrightness = qGray(bgRed, bgGreen, bgBlue); - const int progressBrightness = qGray(color.red(), color.green(), color.blue()); + const int backgrBrightness = tqGray(bgRed, bgGreen, bgBlue); + const int progressBrightness = tqGray(color.red(), color.green(), color.blue()); const int limit = 32; const int diff = backgrBrightness - progressBrightness; @@ -183,7 +183,7 @@ QColor StatusBarSpaceInfo::progressColor(const QColor& bgColor) const ((diff < 0) && (diff > -limit)); if (adjustColor) { 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; diff --git a/src/statusbarspaceinfo.h b/src/statusbarspaceinfo.h index 6409c45..cba7f60 100644 --- a/src/statusbarspaceinfo.h +++ b/src/statusbarspaceinfo.h @@ -20,10 +20,10 @@ #ifndef STATUSBARSPACEINFO_H #define STATUSBARSPACEINFO_H -#include <qwidget.h> -#include <qstring.h> +#include <tqwidget.h> +#include <tqstring.h> #include <kurl.h> -#include <qcolor.h> +#include <tqcolor.h> class KDiskFreeSp; @@ -31,20 +31,21 @@ class KDiskFreeSp; * @short Shows the available space for the current volume as part * of the status bar. */ -class StatusBarSpaceInfo : public QWidget +class StatusBarSpaceInfo : public TQWidget { Q_OBJECT + TQ_OBJECT public: - StatusBarSpaceInfo(QWidget* parent); + StatusBarSpaceInfo(TQWidget* tqparent); virtual ~StatusBarSpaceInfo(); void setURL(const KURL& url); const KURL& url() const { return m_url; } protected: - /** @see QWidget::paintEvent */ - virtual void paintEvent(QPaintEvent* event); + /** @see TQWidget::paintEvent */ + virtual void paintEvent(TQPaintEvent* event); private slots: /** @@ -55,7 +56,7 @@ private slots: void slotFoundMountPoint(const unsigned long& kBSize, const unsigned long& kBUsed, const unsigned long& kBAvailable, - const QString& mountPoint); + const TQString& mountPoint); void slotDone(); /** Refreshs the space information for the current set URL. */ @@ -67,7 +68,7 @@ private: * the given background color \a bgColor. It is assured * 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; bool m_gettingSize; diff --git a/src/undomanager.cpp b/src/undomanager.cpp index 5869e4b..21b3364 100644 --- a/src/undomanager.cpp +++ b/src/undomanager.cpp @@ -21,7 +21,7 @@ #include "undomanager.h" #include <klocale.h> #include <kio/netaccess.h> -#include <qtimer.h> +#include <tqtimer.h> #include <assert.h> #include "dolphin.h" @@ -32,8 +32,8 @@ DolphinCommand::DolphinCommand() : m_type(Copy), m_macroIndex(-1) { - // Implementation note: DolphinCommands are stored in a QValueList, whereas - // QValueList requires a default constructor of the added class. + // Implementation note: DolphinCommands are stored in a TQValueList, whereas + // TQValueList requires a default constructor of the added class. // 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 // a defined state. @@ -84,7 +84,7 @@ void UndoManager::addCommand(const DolphinCommand& command) } 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 if (m_historyIndex > 10000) { @@ -132,12 +132,12 @@ void UndoManager::undo() emit undoTextChanged(i18n("Undo")); } 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) { emit redoAvailable(true); - emit redoTextChanged(i18n("Redo: %1").arg(commandText(command))); + emit redoTextChanged(i18n("Redo: %1").tqarg(commandText(command))); } else { emit redoAvailable(false); @@ -147,7 +147,7 @@ void UndoManager::undo() KURL::List sourceURLs = command.source(); KURL::List::Iterator it = sourceURLs.begin(); 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; switch (command.type()) { @@ -185,7 +185,7 @@ void UndoManager::undo() while (it != end) { // TODO: use KIO::special for accessing the trash protocol. See // also Dolphin::slotJobResult() for further details. - const QString originalFileName((*it).filename().section('-', 1)); + const TQString originalFileName((*it).filename().section('-', 1)); KURL newDestURL(destURL + originalFileName); KIO::NetAccess::move(*it, newDestURL); ++it; @@ -205,8 +205,8 @@ void UndoManager::undo() if (job != 0) { // Execute the jobs in a synchronous manner and forward the progress // information to the Dolphin statusbar. - connect(job, SIGNAL(percent(KIO::Job*, unsigned long)), - this, SLOT(slotPercent(KIO::Job*, unsigned long))); + connect(job, TQT_SIGNAL(percent(KIO::Job*, unsigned long)), + this, TQT_SLOT(slotPercent(KIO::Job*, unsigned long))); KIO::NetAccess::synchronousRun(job, &Dolphin::mainWin()); } @@ -244,11 +244,11 @@ void UndoManager::redo() emit redoTextChanged(i18n("Redo")); } 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 undoTextChanged(i18n("Undo: %1").arg(commandText(command))); + emit undoTextChanged(i18n("Undo: %1").tqarg(commandText(command))); Dolphin& dolphin = Dolphin::mainWin(); @@ -275,11 +275,11 @@ void UndoManager::redo() } case DolphinCommand::Trash: { - const QString destURL(command.destination().prettyURL()); + const TQString destURL(command.destination().prettyURL()); while (it != end) { // TODO: use KIO::special for accessing the trash protocol. See // also Dolphin::slotJobResult() for further details. - const QString originalFileName((*it).filename().section('-', 1)); + const TQString originalFileName((*it).filename().section('-', 1)); KURL originalSourceURL(destURL + "/" + originalFileName); KIO::Job* moveToTrashJob = KIO::trash(originalSourceURL); KIO::NetAccess::synchronousRun(moveToTrashJob, &dolphin); @@ -309,8 +309,8 @@ void UndoManager::redo() if (job != 0) { // Execute the jobs in a synchronous manner and forward the progress // information to the Dolphin statusbar. - connect(job, SIGNAL(percent(KIO::Job*, unsigned long)), - this, SLOT(slotPercent(KIO::Job*, unsigned long))); + connect(job, TQT_SIGNAL(percent(KIO::Job*, unsigned long)), + this, TQT_SLOT(slotPercent(KIO::Job*, unsigned long))); KIO::NetAccess::synchronousRun(job, &dolphin); } @@ -338,9 +338,9 @@ UndoManager::~UndoManager() m_progressIndicator = 0; } -QString UndoManager::commandText(const DolphinCommand& command) const +TQString UndoManager::commandText(const DolphinCommand& command) const { - QString text; + TQString text; switch (command.type()) { case DolphinCommand::Copy: text = i18n("Copy"); 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 // of this slot, hence do an asynchronous triggering. - QTimer::singleShot(0, this, SLOT(updateProgress())); + TQTimer::singleShot(0, this, TQT_SLOT(updateProgress())); } void UndoManager::updateProgress() diff --git a/src/undomanager.h b/src/undomanager.h index fb6f14e..ed98ce5 100644 --- a/src/undomanager.h +++ b/src/undomanager.h @@ -21,8 +21,8 @@ #ifndef UNDOMANAGER_H #define UNDOMANAGER_H -#include <qobject.h> -#include <qvaluelist.h> +#include <tqobject.h> +#include <tqvaluelist.h> #include <kurl.h> #include <kio/jobclasses.h> @@ -80,9 +80,10 @@ private: * * @author Peter Penz <[email protected]> */ -class UndoManager : public QObject +class UndoManager : public TQObject { Q_OBJECT + TQ_OBJECT public: static UndoManager& instance(); @@ -139,7 +140,7 @@ signals: * undo operation changes * (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 @@ -152,12 +153,12 @@ signals: * redo operation changes * (e. g. from 'Redo: Delete' to 'Redo: Copy') */ - void redoTextChanged(const QString& text); + void redoTextChanged(const TQString& text); protected: UndoManager(); virtual ~UndoManager(); - QString commandText(const DolphinCommand& command) const; + TQString commandText(const DolphinCommand& command) const; private slots: /** @@ -177,7 +178,7 @@ private: bool m_recordMacro; int m_historyIndex; int m_macroCounter; - QValueList<DolphinCommand> m_history; + TQValueList<DolphinCommand> m_history; ProgressIndicator* m_progressIndicator; /** diff --git a/src/urlbutton.cpp b/src/urlbutton.cpp index b674e5a..73f098a 100644 --- a/src/urlbutton.cpp +++ b/src/urlbutton.cpp @@ -20,9 +20,9 @@ #include "urlnavigatorbutton.h" #include <kurl.h> -#include <qtooltip.h> -#include <qcursor.h> -#include <qfontmetrics.h> +#include <tqtooltip.h> +#include <tqcursor.h> +#include <tqfontmetrics.h> #include <kurldrag.h> #include <kpopupmenu.h> #include <kiconloader.h> @@ -32,18 +32,18 @@ #include "dolphin.h" -URLButton::URLButton(URLNavigator* parent) -: QPushButton(parent), +URLButton::URLButton(URLNavigator* tqparent) +: TQPushButton(tqparent), m_displayHint(0), - m_urlNavigator(parent) + m_urlNavigator(tqparent) { - setFocusPolicy(QWidget::NoFocus); - setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed); - setMinimumHeight(parent->minimumHeight()); + setFocusPolicy(TQ_NoFocus); + tqsetSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Fixed); + setMinimumHeight(tqparent->minimumHeight()); - connect(this, SIGNAL(clicked()), parent, SLOT(slotRequestActivation())); - connect(&Dolphin::mainWin(), SIGNAL(activeViewChanged()), - this, SLOT(update())); + connect(this, TQT_SIGNAL(clicked()), tqparent, TQT_SLOT(slotRequestActivation())); + connect(&Dolphin::mainWin(), TQT_SIGNAL(activeViewChanged()), + this, TQT_SLOT(update())); } URLButton::~URLButton() @@ -72,27 +72,27 @@ bool URLButton::isDisplayHintEnabled(DisplayHint hint) const return (m_displayHint & hint) > 0; } -void URLButton::enterEvent(QEvent* event) +void URLButton::enterEvent(TQEvent* event) { - QPushButton::enterEvent(event); + TQPushButton::enterEvent(event); setDisplayHintEnabled(EnteredHint, true); update(); } -void URLButton::leaveEvent(QEvent* event) +void URLButton::leaveEvent(TQEvent* event) { - QPushButton::leaveEvent(event); + TQPushButton::leaveEvent(event); setDisplayHintEnabled(EnteredHint, false); update(); } -QColor URLButton::mixColors(const QColor& c1, - const QColor& c2) const +TQColor URLButton::mixColors(const TQColor& c1, + const TQColor& c2) const { const int red = (c1.red() + c2.red()) / 2; const int green = (c1.green() + c2.green()) / 2; const int blue = (c1.blue() + c2.blue()) / 2; - return QColor(red, green, blue); + return TQColor(red, green, blue); } #include "urlbutton.moc" diff --git a/src/urlbutton.h b/src/urlbutton.h index 3ede7f8..0dc57a2 100644 --- a/src/urlbutton.h +++ b/src/urlbutton.h @@ -21,11 +21,11 @@ #ifndef URLBUTTON_H #define URLBUTTON_H -#include <qpushbutton.h> +#include <tqpushbutton.h> class KURL; class URLNavigator; -class QPainter; +class TQPainter; /** * @brief Base class for buttons of the URL navigator. @@ -35,12 +35,13 @@ class QPainter; * * @author Peter Penz */ -class URLButton : public QPushButton +class URLButton : public TQPushButton { Q_OBJECT + TQ_OBJECT public: - URLButton(URLNavigator* parent); + URLButton(URLNavigator* tqparent); virtual ~URLButton(); URLNavigator* urlNavigator() const; @@ -56,10 +57,10 @@ protected: void setDisplayHintEnabled(DisplayHint hint, bool enable); bool isDisplayHintEnabled(DisplayHint hint) const; - virtual void enterEvent(QEvent* event); - virtual void leaveEvent(QEvent* event); + virtual void enterEvent(TQEvent* 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: int m_displayHint; diff --git a/src/urlnavigator.cpp b/src/urlnavigator.cpp index 3f0d278..3f01e1b 100644 --- a/src/urlnavigator.cpp +++ b/src/urlnavigator.cpp @@ -23,17 +23,17 @@ #include <assert.h> #include <kurl.h> -#include <qobjectlist.h> -#include <qcombobox.h> +#include <tqobjectlist.h> +#include <tqcombobox.h> #include <klocale.h> #include <kiconloader.h> -#include <qpopupmenu.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qsizepolicy.h> -#include <qtooltip.h> -#include <qfont.h> -#include <qlistbox.h> +#include <tqpopupmenu.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqsizepolicy.h> +#include <tqtooltip.h> +#include <tqfont.h> +#include <tqlistbox.h> #include <kio/job.h> #include <kurlcombobox.h> @@ -69,29 +69,29 @@ URLNavigator::HistoryElem::~HistoryElem() URLNavigator::URLNavigator(const KURL& url, DolphinView* dolphinView) : - QHBox(dolphinView), + TQHBox(dolphinView), m_historyIndex(0), m_dolphinView(dolphinView) { m_history.prepend(HistoryElem(url)); - QFontMetrics fontMetrics(font()); + TQFontMetrics fontMetrics(font()); 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->setToggleButton(true); - m_toggleButton->setFocusPolicy(QWidget::NoFocus); + m_toggleButton->setFocusPolicy(TQ_NoFocus); m_toggleButton->setMinimumHeight(minimumHeight()); - connect(m_toggleButton, SIGNAL(clicked()), - this, SLOT(slotClicked())); + connect(m_toggleButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotClicked())); if (DolphinSettings::instance().isURLEditable()) { m_toggleButton->toggle(); } m_bookmarkSelector = new BookmarkSelector(this); - connect(m_bookmarkSelector, SIGNAL(bookmarkActivated(int)), - this, SLOT(slotBookmarkActivated(int))); + connect(m_bookmarkSelector, TQT_SIGNAL(bookmarkActivated(int)), + this, TQT_SLOT(slotBookmarkActivated(int))); m_pathBox = new KURLComboBox(KURLComboBox::Directories, true, this); @@ -99,13 +99,13 @@ URLNavigator::URLNavigator(const KURL& url, m_pathBox->setCompletionObject(kurlCompletion); m_pathBox->setAutoDeleteCompletionObject(true); - connect(m_pathBox, SIGNAL(returnPressed(const QString&)), - this, SLOT(slotReturnPressed(const QString&))); - connect(m_pathBox, SIGNAL(urlActivated(const KURL&)), - this, SLOT(slotURLActivated(const KURL&))); + connect(m_pathBox, TQT_SIGNAL(returnPressed(const TQString&)), + this, TQT_SLOT(slotReturnPressed(const TQString&))); + connect(m_pathBox, TQT_SIGNAL(urlActivated(const KURL&)), + this, TQT_SLOT(slotURLActivated(const KURL&))); - connect(dolphinView, SIGNAL(contentsMoved(int, int)), - this, SLOT(slotContentsMoved(int, int))); + connect(dolphinView, TQT_SIGNAL(contentsMoved(int, int)), + this, TQT_SLOT(slotContentsMoved(int, int))); updateContent(); } @@ -115,7 +115,7 @@ URLNavigator::~URLNavigator() void URLNavigator::setURL(const KURL& url) { - QString urlStr(url.prettyURL()); + TQString urlStr(url.prettyURL()); if (url.protocol() == "zip") { bool stillInside = false; @@ -179,9 +179,9 @@ void URLNavigator::setURL(const KURL& url) if (urlStr.at(0) == '~') { - // replace '~' by the home directory + // tqreplace '~' by the home directory urlStr.remove(0, 1); - urlStr.insert(0, QDir::home().path()); + urlStr.insert(0, TQDir::home().path()); } const KURL transformedURL(urlStr); @@ -205,7 +205,7 @@ void URLNavigator::setURL(const KURL& url) 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)); updateContent(); emit urlChanged(transformedURL); @@ -228,7 +228,7 @@ const KURL& URLNavigator::url() const KURL URLNavigator::url(int index) const { assert(index >= 0); - QString path(url().prettyURL()); + TQString path(url().prettyURL()); path = path.section('/', 0, index); if (path.at(path.length()) != '/') @@ -239,7 +239,7 @@ KURL URLNavigator::url(int index) const return path; } -const QValueList<URLNavigator::HistoryElem>& URLNavigator::history(int& index) const +const TQValueList<URLNavigator::HistoryElem>& URLNavigator::history(int& index) const { index = m_historyIndex; return m_history; @@ -288,7 +288,7 @@ void URLNavigator::setURLEditable(bool editable) bool URLNavigator::isURLEditable() const { - return m_toggleButton->state() == QButton::On; + return m_toggleButton->state() == TQButton::On; } void URLNavigator::editURL() @@ -302,15 +302,15 @@ DolphinView* URLNavigator::dolphinView() const return m_dolphinView; } -void URLNavigator::keyReleaseEvent(QKeyEvent* event) +void URLNavigator::keyReleaseEvent(TQKeyEvent* event) { - QHBox::keyReleaseEvent(event); - if (isURLEditable() && (event->key() == Qt::Key_Escape)) { + TQHBox::keyReleaseEvent(event); + if (isURLEditable() && (event->key() == TQt::Key_Escape)) { setURLEditable(false); } } -void URLNavigator::slotReturnPressed(const QString& text) +void URLNavigator::slotReturnPressed(const TQString& text) { // Parts of the following code have been taken // from the class KateFileSelector located in @@ -321,10 +321,10 @@ void URLNavigator::slotReturnPressed(const QString& text) KURL typedURL(text); 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.prepend(typedURL.url()); m_pathBox->setURLs(urls, KURLComboBox::RemoveBottom); @@ -384,14 +384,14 @@ void URLNavigator::updateHistoryElem() void URLNavigator::updateContent() { - const QObjectList* list = children(); - if (list == 0) { + const TQObjectList list = childrenListObject(); + if (list.isEmpty()) { return; } // set the iterator to the first URL navigator button - QObjectListIterator it(*list); - QObject* object = 0; + TQObjectListIterator it(list); + TQObject* object = 0; while ((object = it.current()) != 0) { if (object->inherits("URLNavigatorButton")) { break; @@ -400,20 +400,20 @@ void URLNavigator::updateContent() } // delete all existing URL navigator buttons - QPtrList<QWidget> deleteList; + TQPtrList<TQWidget> deleteList; while ((object = it.current()) != 0) { if (object->inherits("URLNavigatorButton")) { // Don't close and delete the navigator button immediatly, otherwise // the iterator won't work anymore and an object would get deleted more // than once (-> crash). - deleteList.append(static_cast<QWidget*>(object)); + deleteList.append(TQT_TQWIDGET(object)); } ++it; } // now close and delete all unused navigator buttons - QPtrListIterator<QWidget> deleteIter(deleteList); - QWidget* widget = 0; + TQPtrListIterator<TQWidget> deleteIter(deleteList); + TQWidget* widget = 0; while ((widget = deleteIter.current()) != 0) { widget->close(); widget->deleteLater(); @@ -422,37 +422,37 @@ void URLNavigator::updateContent() m_bookmarkSelector->updateSelection(url()); - QToolTip::remove(m_toggleButton); - QString path(url().prettyURL()); - if (m_toggleButton->state() == QButton::On) { + TQToolTip::remove(m_toggleButton); + TQString path(url().prettyURL()); + if (m_toggleButton->state() == TQButton::On) { // 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->setURL(url()); } else { // 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(); - QString dir_name; + TQString dir_name; // get the data from the currently selected bookmark KBookmark bookmark = m_bookmarkSelector->selectedBookmark(); //int bookmarkIndex = m_bookmarkSelector->selectedIndex(); - QString bookmarkPath; + TQString bookmarkPath; if (bookmark.isNull()) { // No bookmark is a part of the current URL. // The following code tries to guess the bookmark // path. E. g. "fish://[email protected]/var/lib" writes // "fish://[email protected]" to 'bookmarkPath', which leads to the // navigation indication 'Custom Path > var > lib". - int idx = path.find(QString("//")); - idx = path.find("/", (idx < 0) ? 0 : idx + 2); + int idx = path.tqfind(TQString("//")); + idx = path.tqfind("/", (idx < 0) ? 0 : idx + 2); bookmarkPath = (idx < 0) ? path : path.left(idx); } else { @@ -464,11 +464,11 @@ void URLNavigator::updateContent() // the slashs inside the bookmark URL int slashCount = 0; for (uint i = 0; i < len; ++i) { - if (bookmarkPath.at(i) == QChar('/')) { + if (bookmarkPath.at(i) == TQChar('/')) { ++slashCount; } } - if ((len > 0) && bookmarkPath.at(len - 1) == QChar('/')) { + if ((len > 0) && bookmarkPath.at(len - 1) == TQChar('/')) { assert(slashCount > 0); --slashCount; } @@ -485,7 +485,7 @@ void URLNavigator::updateContent() if (isFirstButton) { // the first URL navigator button should get the name of the bookmark // instead of the directory name - QString text = bookmark.text(); + TQString text = bookmark.text(); if (text.isEmpty()) { text = bookmarkPath; } diff --git a/src/urlnavigator.h b/src/urlnavigator.h index 706215a..ecd50b1 100644 --- a/src/urlnavigator.h +++ b/src/urlnavigator.h @@ -21,14 +21,14 @@ #ifndef URLNAVIGATOR_H #define URLNAVIGATOR_H -#include <qhbox.h> +#include <tqhbox.h> #include <kurl.h> -#include <qstring.h> +#include <tqstring.h> class DolphinView; -class QPopupMenu; -class QPushButton; -class QComboBox; +class TQPopupMenu; +class TQPushButton; +class TQComboBox; class BookmarkSelector; class KURLComboBox; class KFileItem; @@ -52,9 +52,10 @@ class KFileItem; * * @author Peter Penz */ -class URLNavigator : public QHBox +class URLNavigator : public TQHBox { Q_OBJECT + TQ_OBJECT public: /** @@ -72,8 +73,8 @@ public: const KURL& url() const { return m_url; } - void setCurrentFileName(const QString& name) { m_currentFileName = name; } - const QString& currentFileName() const { return m_currentFileName; } + void setCurrentFileName(const TQString& name) { m_currentFileName = name; } + const TQString& currentFileName() const { return m_currentFileName; } void setContentsX(int x) { m_contentsX = x; } int contentsX() const { return m_contentsX; } @@ -83,7 +84,7 @@ public: private: KURL m_url; - QString m_currentFileName; + TQString m_currentFileName; int m_contentsX; int m_contentsY; }; @@ -110,7 +111,7 @@ public: * @param index Output parameter which indicates the current * 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 @@ -168,10 +169,10 @@ signals: protected: /** If the Escape key is pressed, the navigation bar should switch to the browse mode. */ - virtual void keyReleaseEvent(QKeyEvent* event); + virtual void keyReleaseEvent(TQKeyEvent* event); private slots: - void slotReturnPressed(const QString& text); + void slotReturnPressed(const TQString& text); void slotURLActivated(const KURL& url); void slotRequestActivation(); @@ -194,8 +195,8 @@ private slots: private: int m_historyIndex; DolphinView* m_dolphinView; - QValueList<HistoryElem> m_history; - QPushButton* m_toggleButton; + TQValueList<HistoryElem> m_history; + TQPushButton* m_toggleButton; BookmarkSelector* m_bookmarkSelector; KURLComboBox* m_pathBox; diff --git a/src/urlnavigatorbutton.cpp b/src/urlnavigatorbutton.cpp index 6262210..165b275 100644 --- a/src/urlnavigatorbutton.cpp +++ b/src/urlnavigatorbutton.cpp @@ -19,11 +19,11 @@ ***************************************************************************/ #include "urlnavigatorbutton.h" -#include <qcursor.h> -#include <qfontmetrics.h> -#include <qpainter.h> -#include <qtimer.h> -#include <qtooltip.h> +#include <tqcursor.h> +#include <tqfontmetrics.h> +#include <tqpainter.h> +#include <tqtimer.h> +#include <tqtooltip.h> #include <kglobalsettings.h> #include <kiconloader.h> @@ -38,19 +38,19 @@ #include "dolphinview.h" #include "dolphin.h" -URLNavigatorButton::URLNavigatorButton(int index, URLNavigator* parent) : - URLButton(parent), +URLNavigatorButton::URLNavigatorButton(int index, URLNavigator* tqparent) : + URLButton(tqparent), m_index(-1), m_listJob(0) { setAcceptDrops(true); setMinimumWidth(arrowWidth()); setIndex(index); - connect(this, SIGNAL(clicked()), this, SLOT(updateNavigatorURL())); + connect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(updateNavigatorURL())); - m_popupDelay = new QTimer(this); - connect(m_popupDelay, SIGNAL(timeout()), this, SLOT(startListJob())); - connect(this, SIGNAL(pressed()), this, SLOT(startPopupDelay())); + m_popupDelay = new TQTimer(this); + connect(m_popupDelay, TQT_SIGNAL(timeout()), this, TQT_SLOT(startListJob())); + connect(this, TQT_SIGNAL(pressed()), this, TQT_SLOT(startPopupDelay())); } URLNavigatorButton::~URLNavigatorButton() @@ -64,13 +64,13 @@ void URLNavigatorButton::setIndex(int index) } m_index = index; - QString path(urlNavigator()->url().prettyURL()); + TQString path(urlNavigator()->url().prettyURL()); setText(path.section('/', index, index)); // Check whether the button indicates the full path of the URL. If // this is the case, the button is marked as 'active'. ++index; - QFont adjustedFont(font()); + TQFont adjustedFont(font()); if (path.section('/', index, index).isEmpty()) { setDisplayHintEnabled(ActivatedHint, true); adjustedFont.setBold(true); @@ -89,13 +89,13 @@ int URLNavigatorButton::index() const return m_index; } -void URLNavigatorButton::drawButton(QPainter* painter) +void URLNavigatorButton::drawButton(TQPainter* painter) { const int buttonWidth = width(); const int buttonHeight = height(); - QColor backgroundColor; - QColor foregroundColor; + TQColor backgroundColor; + TQColor foregroundColor; const bool isHighlighted = isDisplayHintEnabled(EnteredHint) || isDisplayHintEnabled(DraggedHint) || isDisplayHintEnabled(PopupActiveHint); @@ -104,17 +104,17 @@ void URLNavigatorButton::drawButton(QPainter* painter) foregroundColor = KGlobalSettings::highlightedTextColor(); } else { - backgroundColor = colorGroup().background(); + backgroundColor = tqcolorGroup().background(); foregroundColor = KGlobalSettings::buttonTextColor(); } - // dimm the colors if the parent view does not have the focus - const DolphinView* parentView = urlNavigator()->dolphinView(); + // dimm the colors if the tqparent view does not have the focus + const DolphinView* tqparentView = urlNavigator()->dolphinView(); const Dolphin& dolphin = Dolphin::mainWin(); - const bool isActive = (dolphin.activeView() == parentView); + const bool isActive = (dolphin.activeView() == tqparentView); if (!isActive) { - QColor dimmColor(colorGroup().background()); + TQColor dimmColor(tqcolorGroup().background()); foregroundColor = mixColors(foregroundColor, dimmColor); if (isHighlighted) { backgroundColor = mixColors(backgroundColor, dimmColor); @@ -153,23 +153,23 @@ void URLNavigatorButton::drawButton(QPainter* painter) } const bool clipped = isTextClipped(); - const int align = clipped ? Qt::AlignVCenter : Qt::AlignCenter; - painter->drawText(QRect(0, 0, textWidth, buttonHeight), align, text()); + const int align = clipped ? TQt::AlignVCenter : TQt::AlignCenter; + painter->drawText(TQRect(0, 0, textWidth, buttonHeight), align, text()); if (clipped) { // Blend the right area of the text with the background, as the // 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; - QColor blendColor(backgroundColor); + TQColor blendColor(backgroundColor); const int redInc = (foregroundColor.red() - backgroundColor.red()) / blendSteps; const int greenInc = (foregroundColor.green() - backgroundColor.green()) / blendSteps; const int blueInc = (foregroundColor.blue() - backgroundColor.blue()) / blendSteps; 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->drawText(QRect(0, 0, textWidth, buttonHeight), align, text()); + painter->drawText(TQRect(0, 0, textWidth, buttonHeight), align, text()); blendColor.setRgb(blendColor.red() + redInc, 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); // if the text is clipped due to a small window width, the text should // be shown as tooltip if (isTextClipped()) { - QToolTip::add(this, text()); + TQToolTip::add(this, text()); } } -void URLNavigatorButton::leaveEvent(QEvent* event) +void URLNavigatorButton::leaveEvent(TQEvent* event) { URLButton::leaveEvent(event); - QToolTip::remove(this); + TQToolTip::remove(this); } -void URLNavigatorButton::dropEvent(QDropEvent* event) +void URLNavigatorButton::dropEvent(TQDropEvent* event) { KURL::List urls; if (KURLDrag::decode(event, urls) && !urls.isEmpty()) { setDisplayHintEnabled(DraggedHint, true); - QString path(urlNavigator()->url().prettyURL()); + TQString path(urlNavigator()->url().prettyURL()); path = path.section('/', 0, m_index); 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)); @@ -219,7 +219,7 @@ void URLNavigatorButton::dragEnterEvent(QDragEnterEvent* event) update(); } -void URLNavigatorButton::dragLeaveEvent(QDragLeaveEvent* event) +void URLNavigatorButton::dragLeaveEvent(TQDragLeaveEvent* event) { URLButton::dragLeaveEvent(event); @@ -263,9 +263,9 @@ void URLNavigatorButton::startListJob() m_listJob = KIO::listDir(url, false, false); m_subdirs.clear(); // just to be ++safe - connect(m_listJob, SIGNAL(entries(KIO::Job*, const KIO::UDSEntryList &)), - this, SLOT(entriesList(KIO::Job*, const KIO::UDSEntryList&))); - connect(m_listJob, SIGNAL(result(KIO::Job*)), this, SLOT(listJobFinished(KIO::Job*))); + connect(m_listJob, TQT_SIGNAL(entries(KIO::Job*, const KIO::UDSEntryList &)), + this, TQT_SLOT(entriesList(KIO::Job*, const KIO::UDSEntryList&))); + connect(m_listJob, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(listJobFinished(KIO::Job*))); } 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 itEnd = entries.constEnd(); while (it != itEnd) { - QString name; + TQString name; bool isDir = false; KIO::UDSEntry entry = *it; KIO::UDSEntry::const_iterator atomIt = entry.constBegin(); @@ -320,10 +320,10 @@ void URLNavigatorButton::listJobFinished(KIO::Job* job) setDisplayHintEnabled(PopupActiveHint, true); update(); // ensure the button is drawn highlighted - QPopupMenu* dirsMenu = new QPopupMenu(this); + TQPopupMenu* dirsMenu = new TQPopupMenu(this); //setPopup(dirsMenu); - QStringList::const_iterator it = m_subdirs.constBegin(); - QStringList::const_iterator itEnd = m_subdirs.constEnd(); + TQStringList::const_iterator it = m_subdirs.constBegin(); + TQStringList::const_iterator itEnd = m_subdirs.constEnd(); int i = 0; while (it != itEnd) { dirsMenu->insertItem(*it, i); @@ -331,7 +331,7 @@ void URLNavigatorButton::listJobFinished(KIO::Job* job) ++it; } - int result = dirsMenu->exec(urlNavigator()->mapToGlobal(geometry().bottomLeft())); + int result = dirsMenu->exec(urlNavigator()->mapToGlobal(tqgeometry().bottomLeft())); if (result >= 0) { KURL url = urlNavigator()->url(m_index); @@ -361,23 +361,23 @@ bool URLNavigatorButton::isTextClipped() const availableWidth -= arrowWidth() + 1; } - QFontMetrics fontMetrics(font()); + TQFontMetrics fontMetrics(font()); 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(); 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(); - 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(); } URLButton::mouseMoveEvent(event); diff --git a/src/urlnavigatorbutton.h b/src/urlnavigatorbutton.h index de71fd6..82eb11f 100644 --- a/src/urlnavigatorbutton.h +++ b/src/urlnavigatorbutton.h @@ -20,7 +20,7 @@ #ifndef URLNAVIGATORBUTTON_H #define URLNAVIGATORBUTTON_H -#include <qstringlist.h> +#include <tqstringlist.h> #include <kio/global.h> @@ -28,7 +28,7 @@ class KURL; class URLNavigator; -class QPainter; +class TQPainter; namespace KIO { @@ -46,24 +46,25 @@ namespace KIO class URLNavigatorButton : public URLButton { Q_OBJECT + TQ_OBJECT public: - URLNavigatorButton(int index, URLNavigator* parent = 0); + URLNavigatorButton(int index, URLNavigator* tqparent = 0); virtual ~URLNavigatorButton(); void setIndex(int index); int index() const; protected: - virtual void drawButton(QPainter* painter); - virtual void enterEvent(QEvent* event); - virtual void leaveEvent(QEvent* event); + virtual void drawButton(TQPainter* painter); + virtual void enterEvent(TQEvent* event); + virtual void leaveEvent(TQEvent* event); //drag - void mousePressEvent( QMouseEvent *event ); - void mouseMoveEvent( QMouseEvent *event ); + void mousePressEvent( TQMouseEvent *event ); + void mouseMoveEvent( TQMouseEvent *event ); //drop - virtual void dropEvent(QDropEvent* event); - virtual void dragEnterEvent(QDragEnterEvent* event); - virtual void dragLeaveEvent(QDragLeaveEvent* event); + virtual void dropEvent(TQDropEvent* event); + virtual void dragEnterEvent(TQDragEnterEvent* event); + virtual void dragLeaveEvent(TQDragLeaveEvent* event); private slots: void updateNavigatorURL(); @@ -79,10 +80,10 @@ private: void startDrag(); int m_index; - QTimer* m_popupDelay; + TQTimer* m_popupDelay; KIO::Job* m_listJob; - QStringList m_subdirs; - QPoint dragPos; + TQStringList m_subdirs; + TQPoint dragPos; }; #endif diff --git a/src/viewproperties.cpp b/src/viewproperties.cpp index 66d5935..25f8af3 100644 --- a/src/viewproperties.cpp +++ b/src/viewproperties.cpp @@ -20,9 +20,9 @@ #include <assert.h> -#include <qdatetime.h> -#include <qdir.h> -#include <qfile.h> +#include <tqdatetime.h> +#include <tqdir.h> +#include <tqfile.h> #include <klocale.h> #include <kstandarddirs.h> @@ -41,7 +41,7 @@ ViewProperties::ViewProperties(KURL url) : url.cleanPath(true); 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; } @@ -50,41 +50,41 @@ ViewProperties::ViewProperties(KURL url) : // we store the properties information in a local file DolphinSettings& settings = DolphinSettings::instance(); 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()) { - QFileInfo info(m_filepath); + TQFileInfo info(m_filepath); if (!info.isWritable()) { - QString basePath = KGlobal::instance()->instanceName(); + TQString basePath = KGlobal::instance()->instanceName(); basePath.append("/view_properties/local"); rootDir = locateLocal("data", basePath); m_filepath = rootDir + m_filepath; } } else { - QString basePath = KGlobal::instance()->instanceName(); + TQString basePath = KGlobal::instance()->instanceName(); basePath.append("/view_properties/remote/").append(url.host()); rootDir = locateLocal("data", basePath); m_filepath = rootDir + m_filepath; } - QDir dir(m_filepath); - QFile file(m_filepath + FILE_NAME); + TQDir dir(m_filepath); + TQFile file(m_filepath + FILE_NAME); PropertiesNode node(&file); const bool isValidForSubDirs = !node.isEmpty() && node.isValidForSubDirs(); while ((dir.path() != rootDir) && dir.cdUp()) { - QFile file(dir.path() + FILE_NAME); - PropertiesNode parentNode(&file); - if (!parentNode.isEmpty()) { - const bool inheritProps = parentNode.isValidForSubDirs() && - (parentNode.subDirProperties().m_timeStamp > + TQFile file(dir.path() + FILE_NAME); + PropertiesNode tqparentNode(&file); + if (!tqparentNode.isEmpty()) { + const bool inheritProps = tqparentNode.isValidForSubDirs() && + (tqparentNode.subDirProperties().m_timeStamp > node.localProperties().m_timeStamp); if (inheritProps) { - node.setLocalProperties(parentNode.subDirProperties()); + node.setLocalProperties(tqparentNode.subDirProperties()); break; } } @@ -145,7 +145,7 @@ DolphinView::Sorting ViewProperties::sorting() const 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) { 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; } @@ -185,7 +185,7 @@ void ViewProperties::save() { DolphinSettings& settings = DolphinSettings::instance(); if (settings.isSaveView()) { - QFile file(m_filepath + FILE_NAME); + TQFile file(m_filepath + FILE_NAME); KStandardDirs::makeDir(m_filepath); if (!file.open(IO_WriteOnly)) { return; @@ -196,13 +196,13 @@ void ViewProperties::save() char sorting = static_cast<char>(props.m_sorting) + '0'; const bool isValidForSubDirs = m_node.isValidForSubDirs() || m_subDirValidityHidden; - QTextStream stream(&file); + TQTextStream stream(&file); stream << "V01" << viewMode << (props.m_showHiddenFiles ? '1' : '0') << props.m_timeStamp.toString("yyyyMMddhhmmss") << sorting - << ((props.m_sortOrder == Qt::Ascending) ? 'A' : 'D') + << ((props.m_sortOrder == TQt::Ascending) ? 'A' : 'D') << (isValidForSubDirs ? '1' : '0'); if (m_node.isValidForSubDirs()) { @@ -217,7 +217,7 @@ void ViewProperties::save() << (subDirProps.m_showHiddenFiles ? '1' : '0') << subDirProps.m_timeStamp.toString("yyyyMMddhhmmss") << sorting - << ((subDirProps.m_sortOrder == Qt::Ascending) ? 'A' : 'D'); + << ((subDirProps.m_sortOrder == TQt::Ascending) ? 'A' : 'D'); } file.flush(); file.close(); @@ -229,17 +229,17 @@ void ViewProperties::save() void ViewProperties::updateTimeStamp() { m_changedProps = true; - m_node.setTimeStamp(QDateTime::currentDateTime()); + m_node.setTimeStamp(TQDateTime::tqcurrentDateTime()); } ViewProperties::Properties::Properties() : m_showHiddenFiles(false), m_viewMode(DolphinView::IconsView), m_sorting(DolphinView::SortByName), - m_sortOrder(Qt::Ascending) + m_sortOrder(TQt::Ascending) { - m_timeStamp.setDate(QDate(1999, 12, 31)); - m_timeStamp.setTime(QTime(23, 59, 59)); + m_timeStamp.setDate(TQDate(1999, 12, 31)); + m_timeStamp.setTime(TQTime(23, 59, 59)); 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_isValidForSubDirs = false; @@ -332,18 +332,18 @@ int ViewProperties::PropertiesNode::readProperties(Properties& props, props.m_showHiddenFiles = (buffer[1] != '0'); // read date - QDateTime timeStamp; + TQDateTime timeStamp; const int year = toInt(&(buffer[2]), 4); const int month = toInt(&(buffer[6]), 2); const int day = toInt(&(buffer[8]), 2); - QDate date(year, month, day); + TQDate date(year, month, day); timeStamp.setDate(date); // read time const int hour = toInt(&(buffer[10]), 2); const int minute = toInt(&(buffer[12]), 2); const int second = toInt(&(buffer[14]), 2); - QTime time(hour, minute, second); + TQTime time(hour, minute, second); timeStamp.setTime(time); props.m_timeStamp = timeStamp; @@ -352,7 +352,7 @@ int ViewProperties::PropertiesNode::readProperties(Properties& props, if (version >= 1) { // read sorting type and sorting order 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; } diff --git a/src/viewproperties.h b/src/viewproperties.h index 77f0a05..46e97d9 100644 --- a/src/viewproperties.h +++ b/src/viewproperties.h @@ -23,8 +23,8 @@ #include <dolphinview.h> #include <kurl.h> -#include <qdatetime.h> -class QFile; +#include <tqdatetime.h> +class TQFile; /** * @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); DolphinView::Sorting sorting() const; - void setSortOrder(Qt::SortOrder sortOrder); - Qt::SortOrder sortOrder() const; + void setSortOrder(TQt::SortOrder sortOrder); + TQt::SortOrder sortOrder() const; void setValidForSubDirs(bool valid); bool isValidForSubDirs() const; @@ -80,15 +80,15 @@ private: bool m_showHiddenFiles; DolphinView::Mode m_viewMode; - QDateTime m_timeStamp; + TQDateTime m_timeStamp; DolphinView::Sorting m_sorting; - Qt::SortOrder m_sortOrder; + TQt::SortOrder m_sortOrder; }; class PropertiesNode { public: - PropertiesNode(QFile* file = 0); + PropertiesNode(TQFile* file = 0); ~PropertiesNode(); PropertiesNode& operator = (const PropertiesNode& node); bool isEmpty() const { return m_empty; } @@ -101,10 +101,10 @@ private: void setShowHiddenFilesEnabled(bool show) { m_props.m_showHiddenFiles = show; } void setViewMode(DolphinView::Mode mode) { m_props.m_viewMode = mode; } - void setTimeStamp(const QDateTime timeStamp) { m_props.m_timeStamp = timeStamp; } - const QDateTime& timeStamp() const { return m_props.m_timeStamp; } + void setTimeStamp(const TQDateTime timeStamp) { m_props.m_timeStamp = timeStamp; } + const TQDateTime& timeStamp() const { return m_props.m_timeStamp; } 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; } const Properties& subDirProperties() const { return m_subDirProps; } @@ -122,7 +122,7 @@ private: bool m_changedProps; bool m_autoSave; bool m_subDirValidityHidden; - QString m_filepath; + TQString m_filepath; PropertiesNode m_node; }; diff --git a/src/viewpropertiesdialog.cpp b/src/viewpropertiesdialog.cpp index 0739ad8..93f1c3e 100644 --- a/src/viewpropertiesdialog.cpp +++ b/src/viewpropertiesdialog.cpp @@ -20,16 +20,16 @@ #include "viewpropertiesdialog.h" #include <klocale.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qvbox.h> -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qradiobutton.h> -#include <qpushbutton.h> -#include <qsizepolicy.h> -#include <qgroupbox.h> -#include <qcombobox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqvbox.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> +#include <tqpushbutton.h> +#include <tqsizepolicy.h> +#include <tqgroupbox.h> +#include <tqcombobox.h> #include <kiconloader.h> #include <kmessagebox.h> #include <assert.h> @@ -46,29 +46,29 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : assert(dolphinView != 0); const int margin = KDialog::marginHint(); - const QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + const TQSizePolicy sizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); const KURL& url = dolphinView->url(); m_viewProps = new ViewProperties(url); 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 - QGroupBox* propsGroup = new QGroupBox(2, Qt::Horizontal, i18n("Properties"), plainPage()); - propsGroup->setSizePolicy(sizePolicy); + TQGroupBox* propsGroup = new TQGroupBox(2, Qt::Horizontal, i18n("Properties"), plainPage()); + propsGroup->tqsetSizePolicy(sizePolicy); propsGroup->setMargin(margin); - new QLabel(i18n("View mode:"), propsGroup); - m_viewMode = new QComboBox(propsGroup); + new TQLabel(i18n("View mode:"), propsGroup); + m_viewMode = new TQComboBox(propsGroup); m_viewMode->insertItem(SmallIcon("view_icon"), i18n("Icons")); m_viewMode->insertItem(SmallIcon("view_text"), i18n("Details")); m_viewMode->insertItem(SmallIcon("gvdirpart"), i18n("Previews")); const int index = static_cast<int>(m_viewProps->viewMode()); m_viewMode->setCurrentItem(index); - new QLabel(i18n("Sorting:"), propsGroup); - m_sorting = new QComboBox(propsGroup); + new TQLabel(i18n("Sorting:"), propsGroup); + m_sorting = new TQComboBox(propsGroup); m_sorting->insertItem("By Name"); m_sorting->insertItem("By Size"); m_sorting->insertItem("By Date"); @@ -81,31 +81,31 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : } m_sorting->setCurrentItem(sortingIdx); - new QLabel(i18n("Sort order:"), propsGroup); - m_sortOrder = new QComboBox(propsGroup); + new TQLabel(i18n("Sort order:"), propsGroup); + m_sortOrder = new TQComboBox(propsGroup); m_sortOrder->insertItem(i18n("Ascending")); 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_showHiddenFiles = new QCheckBox(i18n("Show hidden files"), propsGroup); + m_showHiddenFiles = new TQCheckBox(i18n("Show hidden files"), propsGroup); m_showHiddenFiles->setChecked(m_viewProps->isShowHiddenFilesEnabled()); // create 'Apply view properties to:' group - QButtonGroup* buttonGroup = new QButtonGroup(3, + TQButtonGroup* buttonGroup = new TQButtonGroup(3, Qt::Vertical, i18n("Apply view properties to:"), plainPage()); - buttonGroup->setSizePolicy(sizePolicy); + buttonGroup->tqsetSizePolicy(sizePolicy); buttonGroup->setMargin(margin); - m_applyToCurrentFolder = new QRadioButton(i18n("Current folder"), buttonGroup); + m_applyToCurrentFolder = new TQRadioButton(i18n("Current folder"), buttonGroup); 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); - m_applyToAllFolders = new QRadioButton(i18n("All folders"), buttonGroup); + m_applyToAllFolders = new TQRadioButton(i18n("All folders"), buttonGroup); buttonGroup->insert(m_applyToAllFolders); if (m_viewProps->isValidForSubDirs()) { @@ -118,20 +118,20 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : topLayout->addWidget(propsGroup); topLayout->addWidget(buttonGroup); - connect(m_viewMode, SIGNAL(activated(int)), - this, SLOT(slotViewModeChanged(int))); - connect(m_sorting, SIGNAL(activated(int)), - this, SLOT(slotSortingChanged(int))); - connect(m_sortOrder, SIGNAL(activated(int)), - this, SLOT(slotSortOrderChanged(int))); - connect(m_showHiddenFiles, SIGNAL(clicked()), - this, SLOT(slotShowHiddenFilesChanged())); - connect(m_applyToCurrentFolder, SIGNAL(clicked()), - this, SLOT(slotApplyToCurrentFolder())); - connect(m_applyToSubFolders, SIGNAL(clicked()), - this, SLOT(slotApplyToSubFolders())); - connect(m_applyToAllFolders, SIGNAL(clicked()), - this, SLOT(slotApplyToAllFolders())); + connect(m_viewMode, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotViewModeChanged(int))); + connect(m_sorting, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSortingChanged(int))); + connect(m_sortOrder, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSortOrderChanged(int))); + connect(m_showHiddenFiles, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotShowHiddenFilesChanged())); + connect(m_applyToCurrentFolder, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotApplyToCurrentFolder())); + connect(m_applyToSubFolders, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotApplyToSubFolders())); + connect(m_applyToAllFolders, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotApplyToAllFolders())); } ViewPropertiesDialog::~ViewPropertiesDialog() @@ -174,7 +174,7 @@ void ViewPropertiesDialog::slotSortingChanged(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_isDirty = true; } @@ -207,13 +207,13 @@ void ViewPropertiesDialog::applyViewProperties() { if (m_applyToAllFolders->isChecked()) { 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) { return; } } - ViewProperties props(QDir::homeDirPath()); + ViewProperties props(TQDir::homeDirPath()); props.setViewMode(m_viewProps->viewMode()); props.setSorting(m_viewProps->sorting()); props.setSortOrder(m_viewProps->sortOrder()); @@ -221,7 +221,7 @@ void ViewPropertiesDialog::applyViewProperties() props.setValidForSubDirs(true); } 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) { return; } diff --git a/src/viewpropertiesdialog.h b/src/viewpropertiesdialog.h index 0731a27..80cc38b 100644 --- a/src/viewpropertiesdialog.h +++ b/src/viewpropertiesdialog.h @@ -22,10 +22,10 @@ #include <kdialogbase.h> -class QCheckBox; -class QButtonGroup; -class QComboBox; -class QRadioButton; +class TQCheckBox; +class TQButtonGroup; +class TQComboBox; +class TQRadioButton; class ViewProperties; class DolphinView; @@ -41,6 +41,7 @@ class DolphinView; class ViewPropertiesDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: ViewPropertiesDialog(DolphinView* dolphinView); @@ -64,13 +65,13 @@ private: DolphinView* m_dolphinView; ViewProperties* m_viewProps; - QComboBox* m_viewMode; - QComboBox* m_sorting; - QComboBox* m_sortOrder; - QCheckBox* m_showHiddenFiles; - QRadioButton* m_applyToCurrentFolder; - QRadioButton* m_applyToSubFolders; - QRadioButton* m_applyToAllFolders; + TQComboBox* m_viewMode; + TQComboBox* m_sorting; + TQComboBox* m_sortOrder; + TQCheckBox* m_showHiddenFiles; + TQRadioButton* m_applyToCurrentFolder; + TQRadioButton* m_applyToSubFolders; + TQRadioButton* m_applyToAllFolders; void applyViewProperties(); }; diff --git a/src/viewsettingspage.cpp b/src/viewsettingspage.cpp index ccfa80e..789a882 100644 --- a/src/viewsettingspage.cpp +++ b/src/viewsettingspage.cpp @@ -19,23 +19,23 @@ ***************************************************************************/ #include "viewsettingspage.h" -#include <qtabwidget.h> -#include <qlayout.h> -#include <qlabel.h> +#include <tqtabwidget.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <kdialogbase.h> #include <klocale.h> #include "iconsviewsettingspage.h" #include "detailsviewsettingspage.h" -ViewSettingsPage::ViewSettingsPage(QWidget *parent) : - SettingsPageBase(parent), +ViewSettingsPage::ViewSettingsPage(TQWidget *tqparent) : + SettingsPageBase(tqparent), m_iconsPage(0), m_detailsPage(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 m_iconsPage = new IconsViewSettingsPage(DolphinIconsView::Icons, tabWidget); diff --git a/src/viewsettingspage.h b/src/viewsettingspage.h index 06017dd..81d00ae 100644 --- a/src/viewsettingspage.h +++ b/src/viewsettingspage.h @@ -20,7 +20,7 @@ #ifndef VIEWSETTINGSPAGE_H #define VIEWSETTINGSPAGE_H -#include <qwidget.h> +#include <tqwidget.h> #include <settingspagebase.h> class IconsViewSettingsPage; @@ -37,9 +37,10 @@ class DetailsViewSettingsPage; class ViewSettingsPage : public SettingsPageBase { Q_OBJECT + TQ_OBJECT public: - ViewSettingsPage(QWidget* parent); + ViewSettingsPage(TQWidget* tqparent); virtual ~ViewSettingsPage(); |