summaryrefslogtreecommitdiffstats
path: root/src/app/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/mainwindow.cpp')
-rw-r--r--src/app/mainwindow.cpp360
1 files changed, 180 insertions, 180 deletions
diff --git a/src/app/mainwindow.cpp b/src/app/mainwindow.cpp
index bf598ec..d608dfe 100644
--- a/src/app/mainwindow.cpp
+++ b/src/app/mainwindow.cpp
@@ -1,5 +1,5 @@
// vim: set tabstop=4 shiftwidth=4 noexpandtab:
-// kate: indent-mode csands; indent-width 4; replace-tabs-save off; replace-tabs off; replace-trailing-space-save off; space-indent off; tabs-indents on; tab-width 4;
+// kate: indent-mode csands; indent-width 4; tqreplace-tabs-save off; tqreplace-tabs off; tqreplace-trailing-space-save off; space-indent off; tabs-indents on; tab-width 4;
/*
Gwenview - A simple image viewer for KDE
Copyright 2000-2004 Aur�ien G�eau
@@ -21,10 +21,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "mainwindow.moc"
-// Qt
-#include <qdir.h>
-#include <qdockarea.h>
-#include <qwidgetstack.h>
+// TQt
+#include <tqdir.h>
+#include <tqdockarea.h>
+#include <tqwidgetstack.h>
// KDE
#include <kaboutdata.h>
@@ -139,18 +139,18 @@ const int HISTORY_MAX_COUNT=20;
enum { StackIDBrowse, StackIDView };
-static bool urlIsDirectory(QWidget* parent, const KURL& url) {
+static bool urlIsDirectory(TQWidget* tqparent, const KURL& url) {
if( url.filename( false ).isEmpty()) return true; // file:/somewhere/<nothing here>
// Do direct stat instead of using KIO if the file is local (faster)
if( url.isLocalFile()
&& !KIO::probably_slow_mounted( url.path())) {
KDE_struct_stat buff;
- if ( KDE_stat( QFile::encodeName(url.path()), &buff ) == 0 ) {
+ if ( KDE_stat( TQFile::encodeName(url.path()), &buff ) == 0 ) {
return S_ISDIR( buff.st_mode );
}
}
KIO::UDSEntry entry;
- if( KIO::NetAccess::stat( url, entry, parent)) {
+ if( KIO::NetAccess::stat( url, entry, tqparent)) {
KIO::UDSEntry::ConstIterator it;
for(it=entry.begin();it!=entry.end();++it) {
if ((*it).m_uds==KIO::UDS_FILE_TYPE) {
@@ -169,7 +169,7 @@ MainWindow::MainWindow()
#endif
{
// Backend
- mDocument=new Document(this);
+ mDocument=new Document(TQT_TQOBJECT(this));
mHistory=new History(actionCollection());
// GUI
createActions();
@@ -199,16 +199,16 @@ bool MainWindow::queryClose() {
KConfig* config=KGlobal::config();
- // Don't store dock layout if only the image dock is visible. This avoid
- // saving layout when in "fullscreen" or "image only" mode.
+ // Don't store dock tqlayout if only the image dock is visible. This avoid
+ // saving tqlayout when in "fullscreen" or "image only" mode.
if (mFileViewController->isVisible() || mDirViewController->widget()->isVisible()) {
mDockArea->writeDockConfig(config,CONFIG_DOCK_GROUP);
}
if (FileViewConfig::deleteCacheOnExit()) {
- QString dir=ThumbnailLoadJob::thumbnailBaseDir();
+ TQString dir=ThumbnailLoadJob::thumbnailBaseDir();
- if (QFile::exists(dir)) {
+ if (TQFile::exists(dir)) {
KURL url;
url.setPath(dir);
KIO::NetAccess::del(url, this);
@@ -256,7 +256,7 @@ void MainWindow::openURL(const KURL& url) {
}
}
-void MainWindow::slotRenamed(const QString& fileName) {
+void MainWindow::slotRenamed(const TQString& fileName) {
KURL url = mDocument->url();
url.setFileName(fileName);
mDocument->setURL(url);
@@ -307,7 +307,7 @@ void MainWindow::updateFullScreenLabel() {
formatter.mIso=mDocument->iso();
formatter.mFocalLength=mDocument->focalLength();
- QString txt=formatter.format( FullScreenConfig::osdFormat() );
+ TQString txt=formatter.format( FullScreenConfig::osdFormat() );
mFullScreenLabelAction->label()->setText(txt);
}
@@ -326,7 +326,7 @@ void MainWindow::goUpTo(int id) {
}
void MainWindow::fillGoUpMenu() {
- QPopupMenu* menu = mGoUp->popupMenu();
+ TQPopupMenu* menu = mGoUp->popupMenu();
menu->clear();
int pos = 0;
KURL url = mFileViewController->dirURL().upURL();
@@ -344,7 +344,7 @@ void MainWindow::fillGoUpMenu() {
//-----------------------------------------------------------------------
void MainWindow::goHome() {
KURL url;
- url.setPath( QDir::homeDirPath() );
+ url.setPath( TQDir::homeDirPath() );
mFileViewController->setDirURL(url);
}
@@ -359,7 +359,7 @@ void MainWindow::renameFile() {
} else {
url = mDocument->url();
}
- FileOperation::rename(url, this, this, SLOT(slotRenamed(const QString &)));
+ FileOperation::rename(url, this, TQT_TQOBJECT(this), TQT_SLOT(slotRenamed(const TQString &)));
}
@@ -454,14 +454,14 @@ void MainWindow::printFile() {
printer.setDocName(mDocument->filename());
const KAboutData* pAbout = KApplication::kApplication()->aboutData();
- QString nm = pAbout->appName();
+ TQString nm = pAbout->appName();
nm += "-";
nm += pAbout->version();
printer.setCreator( nm );
KPrinter::addDialogPage( new PrintDialogPage( mDocument, this, " page"));
- if (printer.setup(this, QString::null, true)) {
+ if (printer.setup(this, TQString(), true)) {
mDocument->print(&printer);
}
}
@@ -472,7 +472,7 @@ void MainWindow::printFile() {
// Private slots
//
//-----------------------------------------------------------------------
-void MainWindow::openFileViewControllerContextMenu(const QPoint& pos, bool onItem) {
+void MainWindow::openFileViewControllerContextMenu(const TQPoint& pos, bool onItem) {
int selectionSize;
ExternalToolContext* externalToolContext;
@@ -480,14 +480,14 @@ void MainWindow::openFileViewControllerContextMenu(const QPoint& pos, bool onIte
const KFileItemList* items = mFileViewController->currentFileView()->selectedItems();
selectionSize = items->count();
externalToolContext =
- ExternalToolManager::instance()->createContext(this, items);
+ ExternalToolManager::instance()->createContext(TQT_TQOBJECT(this), items);
} else {
selectionSize = 0;
externalToolContext =
- ExternalToolManager::instance()->createContext(this, mFileViewController->dirURL());
+ ExternalToolManager::instance()->createContext(TQT_TQOBJECT(this), mFileViewController->dirURL());
}
- QPopupMenu menu(this);
+ TQPopupMenu menu(this);
menu.insertItem(
i18n("External Tools"), externalToolContext->popupMenu());
@@ -495,7 +495,7 @@ void MainWindow::openFileViewControllerContextMenu(const QPoint& pos, bool onIte
actionCollection()->action("view_sort")->plug(&menu);
mGoUp->plug(&menu);
- menu.insertItem(SmallIcon("folder_new"), i18n("New Folder..."), this, SLOT(makeDir()));
+ menu.insertItem(SmallIcon("folder_new"), i18n("New Folder..."), TQT_TQOBJECT(this), TQT_SLOT(makeDir()));
menu.insertSeparator();
@@ -518,7 +518,7 @@ void MainWindow::openFileViewControllerContextMenu(const QPoint& pos, bool onIte
void MainWindow::slotImageLoading() {
if (FullScreenConfig::showBusyPtr() || !mToggleFullScreen->isChecked()) {
- kapp->setOverrideCursor(KCursor::workingCursor(), true /* replace */);
+ kapp->setOverrideCursor(KCursor::workingCursor(), true /* tqreplace */);
}
}
@@ -538,7 +538,7 @@ void MainWindow::slotImageLoaded() {
void MainWindow::hideToolBars() {
- QPtrListIterator<KToolBar> it=toolBarIterator();
+ TQPtrListIterator<KToolBar> it=toolBarIterator();
KToolBar* bar;
for(;it.current()!=0L; ++it) {
@@ -553,7 +553,7 @@ void MainWindow::hideToolBars() {
void MainWindow::showToolBars() {
- QPtrListIterator<KToolBar> it=toolBarIterator();
+ TQPtrListIterator<KToolBar> it=toolBarIterator();
KToolBar* bar;
@@ -591,7 +591,7 @@ void MainWindow::toggleFullScreen() {
if (bottomDock()->isEmpty()) bottomDock()->hide();
if (mSwitchToBrowseMode->isChecked()) {
- mImageViewController->widget()->reparent(mViewModeWidget, QPoint(0,0));
+ mImageViewController->widget()->reparent(mViewModeWidget, TQPoint(0,0));
mCentralStack->raiseWidget(StackIDView);
}
updateFullScreenLabel();
@@ -666,12 +666,12 @@ void MainWindow::showConfigDialog() {
#else
ConfigDialog dialog(this, 0);
#endif
- connect(&dialog, SIGNAL(settingsChanged()),
- mSlideShow, SLOT(slotSettingsChanged()) );
- connect(&dialog, SIGNAL(settingsChanged()),
- mImageViewController, SLOT(updateFromSettings()) );
- connect(&dialog, SIGNAL(settingsChanged()),
- mFileViewController, SLOT(updateFromSettings()) );
+ connect(&dialog, TQT_SIGNAL(settingsChanged()),
+ mSlideShow, TQT_SLOT(slotSettingsChanged()) );
+ connect(&dialog, TQT_SIGNAL(settingsChanged()),
+ mImageViewController, TQT_SLOT(updateFromSettings()) );
+ connect(&dialog, TQT_SIGNAL(settingsChanged()),
+ mFileViewController, TQT_SLOT(updateFromSettings()) );
dialog.exec();
}
@@ -692,7 +692,7 @@ void MainWindow::showKeyDialog() {
void MainWindow::showToolBarDialog() {
saveMainWindowSettings(KGlobal::config(), "MainWindow");
KEditToolbar dlg(actionCollection());
- connect(&dlg,SIGNAL(newToolbarConfig()),this,SLOT(applyMainWindowSettings()));
+ connect(&dlg,TQT_SIGNAL(newToolbarConfig()),TQT_TQOBJECT(this),TQT_SLOT(applyMainWindowSettings()));
dlg.exec();
}
@@ -715,13 +715,13 @@ void MainWindow::slotDirRenamed(const KURL& oldURL, const KURL& newURL) {
KURL url(mFileViewController->dirURL());
if (!oldURL.isParentOf(url) ) {
- LOG(oldURL.prettyURL() << " is not a parent of " << url.prettyURL());
+ LOG(oldURL.prettyURL() << " is not a tqparent of " << url.prettyURL());
return;
}
- QString oldPath=oldURL.path();
+ TQString oldPath=oldURL.path();
LOG("current path: " << url.path() );
- QString path=newURL.path() + url.path().mid(oldPath.length());
+ TQString path=newURL.path() + url.path().mid(oldPath.length());
LOG("new path: " << path);
url.setPath(path);
mFileViewController->setDirURL(url);
@@ -750,14 +750,14 @@ void MainWindow::slotToggleCentralStack() {
// force re-reading the directory to show the error
if( mFileViewController->lastURLError()) mFileViewController->retryURL();
} else {
- mImageViewController->widget()->reparent(mViewModeWidget, QPoint(0,0));
+ mImageViewController->widget()->reparent(mViewModeWidget, TQPoint(0,0));
mCentralStack->raiseWidget(StackIDView);
mFileViewController->setSilentMode( true );
}
// Make sure the window list actions are disabled if we are in view mode,
// otherwise weird things happens when we go back to browse mode
- QPtrListIterator<KAction> it(mWindowListActions);
+ TQPtrListIterator<KAction> it(mWindowListActions);
for (;it.current(); ++it) {
it.current()->setEnabled(mSwitchToBrowseMode->isChecked());
}
@@ -769,7 +769,7 @@ void MainWindow::slotToggleCentralStack() {
void MainWindow::resetDockWidgets() {
int answer=KMessageBox::warningContinueCancel(this,
i18n("You are about to revert the window setup to factory defaults, are you sure?"),
- QString::null /* caption */,
+ TQString() /* caption */,
i18n("Reset"));
if (answer==KMessageBox::Cancel) return;
@@ -786,7 +786,7 @@ void MainWindow::resetDockWidgets() {
/**
* Display a hint as a temporary message in the status bar
*/
-void MainWindow::showHint(const QString& hint) {
+void MainWindow::showHint(const TQString& hint) {
mSBHintLabel->setText(hint);
mSBHintLabel->show();
@@ -800,23 +800,23 @@ void MainWindow::showHint(const QString& hint) {
//
//-----------------------------------------------------------------------
void MainWindow::updateStatusInfo() {
- QStringList tokens;
+ TQStringList tokens;
if ( KProtocolInfo::supportsListing(mFileViewController->url()) ) {
int pos = mFileViewController->shownFilePosition();
uint count = mFileViewController->fileCount();
if (count > 0) {
- tokens << i18n("%1/%2").arg(pos+1).arg(count);
+ tokens << i18n("%1/%2").tqarg(pos+1).tqarg(count);
} else {
tokens << i18n("No images");
}
}
- QString filename = mDocument->filename();
+ TQString filename = mDocument->filename();
- QSize size = mDocument->image().size();
+ TQSize size = mDocument->image().size();
if (!size.isEmpty()) {
- tokens << i18n("%1 x %2 pixels").arg(size.width()).arg(size.height());
+ tokens << i18n("%1 x %2 pixels").tqarg(size.width()).tqarg(size.height());
}
mSBDetailLabel->setText(tokens.join(" - "));
@@ -858,7 +858,7 @@ void MainWindow::updateImageActions() {
void MainWindow::createWidgets() {
KConfig* config=KGlobal::config();
- mCentralStack=new QWidgetStack(this);
+ mCentralStack=new TQWidgetStack(this);
setCentralWidget(mCentralStack);
mDockArea=new KDockArea(mCentralStack);
@@ -866,31 +866,31 @@ void MainWindow::createWidgets() {
mDockArea->manager()->setSplitterHighResolution(true);
mDockArea->manager()->setSplitterOpaqueResize(true);
- mViewModeWidget=new QWidget(mCentralStack);
- QVBoxLayout* layout=new QVBoxLayout(mViewModeWidget);
- layout->setAutoAdd(true);
+ mViewModeWidget=new TQWidget(mCentralStack);
+ TQVBoxLayout* tqlayout=new TQVBoxLayout(mViewModeWidget);
+ tqlayout->setAutoAdd(true);
mCentralStack->addWidget(mViewModeWidget);
- // Status bar
- mSBDetailLabel=new QLabel("", statusBar());
+ // tqStatus bar
+ mSBDetailLabel=new TQLabel("", statusBar());
mSBHintLabel=new TruncatedTextLabel(statusBar());
- QFont font=mSBHintLabel->font();
+ TQFont font=mSBHintLabel->font();
font.setItalic(true);
mSBHintLabel->setFont(font);
statusBar()->addWidget(mSBDetailLabel, 0);
statusBar()->addWidget(mSBHintLabel, 1);
- mHintTimer=new QTimer(this);
- connect(mHintTimer, SIGNAL(timeout()),
- mSBHintLabel, SLOT(clear()) );
+ mHintTimer=new TQTimer(this);
+ connect(mHintTimer, TQT_SIGNAL(timeout()),
+ mSBHintLabel, TQT_SLOT(clear()) );
// Pixmap widget
mImageDock = mDockArea->createDockWidget("Image",SmallIcon("gwenview"),NULL,i18n("Image"));
mImageViewController=new ImageViewController(mImageDock, mDocument, actionCollection());
mImageDock->setWidget(mImageViewController->widget());
- connect(mImageViewController, SIGNAL(requestHintDisplay(const QString&)),
- this, SLOT(showHint(const QString&)) );
+ connect(mImageViewController, TQT_SIGNAL(requestHintDisplay(const TQString&)),
+ TQT_TQOBJECT(this), TQT_SLOT(showHint(const TQString&)) );
// Folder widget
mFolderDock = mDockArea->createDockWidget("Folders",SmallIcon("folder_open"),NULL,i18n("Folders"));
@@ -923,7 +923,7 @@ void MainWindow::createWidgets() {
setGeometry(20,20,720,520);
// Default dock config
- // (The "magic numbers" were found by adjusting the layout from within the
+ // (The "magic numbers" were found by adjusting the tqlayout from within the
// app and looking at the result in the configuration file)
mFolderDock->manualDock(mFileDock, KDockWidget::DockLeft, 4000);
mImageDock->manualDock(mFolderDock, KDockWidget::DockBottom, 3734);
@@ -964,55 +964,55 @@ void MainWindow::createWidgets() {
*/
void MainWindow::createActions() {
// Stack
- mSwitchToBrowseMode=new KRadioAction(i18n("Browse"), "folder_image", CTRL + Key_Return, this, SLOT(slotToggleCentralStack()), actionCollection(), "switch_to_browse_mode");
+ mSwitchToBrowseMode=new KRadioAction(i18n("Browse"), "folder_image", CTRL + Key_Return, TQT_TQOBJECT(this), TQT_SLOT(slotToggleCentralStack()), actionCollection(), "switch_to_browse_mode");
mSwitchToBrowseMode->setExclusiveGroup("centralStackMode");
mSwitchToBrowseMode->setChecked(true);
- mSwitchToViewMode=new KRadioAction(i18n("View Image"), "image", 0, this, SLOT(slotToggleCentralStack()), actionCollection(), "switch_to_view_mode");
+ mSwitchToViewMode=new KRadioAction(i18n("View Image"), "image", 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleCentralStack()), actionCollection(), "switch_to_view_mode");
mSwitchToViewMode->setExclusiveGroup("centralStackMode");
// File
- KStdAction::open(this,SLOT(showFileDialog()),actionCollection() );
- mSaveFile=KStdAction::save(mDocument,SLOT(save()),actionCollection() );
- mSaveFileAs=KStdAction::saveAs(mDocument,SLOT(saveAs()),actionCollection() );
- mFilePrint = KStdAction::print(this, SLOT(printFile()), actionCollection());
- mRenameFile=new KAction(i18n("&Rename..."),Key_F2,this,SLOT(renameFile()),actionCollection(),"file_rename");
- mCopyFiles=new KAction(i18n("&Copy To..."),Key_F7,this,SLOT(copyFiles()),actionCollection(),"file_copy");
- mMoveFiles=new KAction(i18n("&Move To..."),Key_F8,this,SLOT(moveFiles()),actionCollection(),"file_move");
- mLinkFiles=new KAction(i18n("&Link To..."),Key_F9,this,SLOT(linkFiles()),actionCollection(),"file_link");
- mDeleteFiles=new KAction(i18n("&Delete"),"editdelete",Key_Delete,this,SLOT(deleteFiles()),actionCollection(),"file_delete");
- mShowFileProperties=new KAction(i18n("Properties"),0,this,SLOT(showFileProperties()),actionCollection(),"file_properties");
- KStdAction::quit( kapp, SLOT (closeAllWindows()), actionCollection() );
+ KStdAction::open(TQT_TQOBJECT(this),TQT_SLOT(showFileDialog()),actionCollection() );
+ mSaveFile=KStdAction::save(mDocument,TQT_SLOT(save()),actionCollection() );
+ mSaveFileAs=KStdAction::saveAs(mDocument,TQT_SLOT(saveAs()),actionCollection() );
+ mFilePrint = KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(printFile()), actionCollection());
+ mRenameFile=new KAction(i18n("&Rename..."),Key_F2,TQT_TQOBJECT(this),TQT_SLOT(renameFile()),actionCollection(),"file_rename");
+ mCopyFiles=new KAction(i18n("&Copy To..."),Key_F7,TQT_TQOBJECT(this),TQT_SLOT(copyFiles()),actionCollection(),"file_copy");
+ mMoveFiles=new KAction(i18n("&Move To..."),Key_F8,TQT_TQOBJECT(this),TQT_SLOT(moveFiles()),actionCollection(),"file_move");
+ mLinkFiles=new KAction(i18n("&Link To..."),Key_F9,TQT_TQOBJECT(this),TQT_SLOT(linkFiles()),actionCollection(),"file_link");
+ mDeleteFiles=new KAction(i18n("&Delete"),"editdelete",Key_Delete,TQT_TQOBJECT(this),TQT_SLOT(deleteFiles()),actionCollection(),"file_delete");
+ mShowFileProperties=new KAction(i18n("Properties"),0,TQT_TQOBJECT(this),TQT_SLOT(showFileProperties()),actionCollection(),"file_properties");
+ KStdAction::quit( TQT_TQOBJECT(kapp), TQT_SLOT (closeAllWindows()), actionCollection() );
// Edit
- mRotateLeft=new KAction(i18n("Rotate &Left"),"rotate_left",CTRL + Key_L, this, SLOT(rotateLeft()),actionCollection(),"rotate_left");
- mRotateRight=new KAction(i18n("Rotate &Right"),"rotate_right",CTRL + Key_R, this, SLOT(rotateRight()),actionCollection(),"rotate_right");
- mMirror=new KAction(i18n("&Mirror"),"mirror",0, this, SLOT(mirror()),actionCollection(),"mirror");
- mFlip=new KAction(i18n("&Flip"),"flip",0, this, SLOT(flip()),actionCollection(),"flip");
+ mRotateLeft=new KAction(i18n("Rotate &Left"),"rotate_left",CTRL + Key_L, TQT_TQOBJECT(this), TQT_SLOT(rotateLeft()),actionCollection(),"rotate_left");
+ mRotateRight=new KAction(i18n("Rotate &Right"),"rotate_right",CTRL + Key_R, TQT_TQOBJECT(this), TQT_SLOT(rotateRight()),actionCollection(),"rotate_right");
+ mMirror=new KAction(i18n("&Mirror"),"mirror",0, TQT_TQOBJECT(this), TQT_SLOT(mirror()),actionCollection(),"mirror");
+ mFlip=new KAction(i18n("&Flip"),"flip",0, TQT_TQOBJECT(this), TQT_SLOT(flip()),actionCollection(),"flip");
// View
- mReload=new KAction(i18n("Reload"), "reload", Key_F5, mDocument, SLOT(reload()), actionCollection(), "reload");
+ mReload=new KAction(i18n("Reload"), "reload", Key_F5, mDocument, TQT_SLOT(reload()), actionCollection(), "reload");
mReload->setEnabled(false);
- mToggleFullScreen= KStdAction::fullScreen(this,SLOT(toggleFullScreen()),actionCollection(),0);
- mToggleSlideShow=new KAction(i18n("Slide Show"),"slideshow_play",0,this,SLOT(toggleSlideShow()),actionCollection(),"slideshow");
+ mToggleFullScreen= KStdAction::fullScreen(TQT_TQOBJECT(this),TQT_SLOT(toggleFullScreen()),actionCollection(),0);
+ mToggleSlideShow=new KAction(i18n("Slide Show"),"slideshow_play",0,TQT_TQOBJECT(this),TQT_SLOT(toggleSlideShow()),actionCollection(),"slideshow");
mFullScreenLabelAction=new KToolBarLabelAction("", 0, 0, 0, actionCollection(), "fullscreen_label");
// Go
- mGoUp=new KToolBarPopupAction(i18n("Up"), "up", ALT + Key_Up, this, SLOT(goUp()), actionCollection(), "go_up");
- new KAction( i18n( "Home" ), "gohome", KStdAccel::shortcut(KStdAccel::Home), this, SLOT(goHome()), actionCollection(), "go_home");
+ mGoUp=new KToolBarPopupAction(i18n("Up"), "up", ALT + Key_Up, TQT_TQOBJECT(this), TQT_SLOT(goUp()), actionCollection(), "go_up");
+ new KAction( i18n( "Home" ), "gohome", KStdAccel::shortcut(KStdAccel::Home), TQT_TQOBJECT(this), TQT_SLOT(goHome()), actionCollection(), "go_home");
// Window
- mResetDockWidgets = new KAction(i18n("Reset"), 0, this, SLOT(resetDockWidgets()), actionCollection(), "reset_dock_widgets");
+ mResetDockWidgets = new KAction(i18n("Reset"), 0, TQT_TQOBJECT(this), TQT_SLOT(resetDockWidgets()), actionCollection(), "reset_dock_widgets");
// Settings
mShowConfigDialog=
- KStdAction::preferences(this, SLOT(showConfigDialog()), actionCollection() );
+ KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(showConfigDialog()), actionCollection() );
mShowKeyDialog=
- KStdAction::keyBindings(this, SLOT(showKeyDialog()), actionCollection() );
+ KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(showKeyDialog()), actionCollection() );
(void)new KAction(i18n("Configure External Tools..."), "configure", 0,
- this, SLOT(showExternalToolDialog()), actionCollection(), "configure_tools");
+ TQT_TQOBJECT(this), TQT_SLOT(showExternalToolDialog()), actionCollection(), "configure_tools");
(void)KStdAction::configureToolbars(
- this, SLOT(showToolBarDialog()), actionCollection() );
+ TQT_TQOBJECT(this), TQT_SLOT(showToolBarDialog()), actionCollection() );
actionCollection()->readShortcutSettings();
}
@@ -1061,14 +1061,14 @@ void MainWindow::createObjectInteractions() {
}
// Make sure file actions are correctly updated
- connect(mFileViewController, SIGNAL(selectionChanged()),
- this, SLOT(updateImageActions()) );
+ connect(mFileViewController, TQT_SIGNAL(selectionChanged()),
+ TQT_TQOBJECT(this), TQT_SLOT(updateImageActions()) );
- connect(mFileViewController, SIGNAL(requestContextMenu(const QPoint&, bool)),
- this, SLOT(openFileViewControllerContextMenu(const QPoint&, bool)) );
+ connect(mFileViewController, TQT_SIGNAL(requestContextMenu(const TQPoint&, bool)),
+ TQT_TQOBJECT(this), TQT_SLOT(openFileViewControllerContextMenu(const TQPoint&, bool)) );
// Bookmarks
- QString file = locate( "data", "kfile/bookmarks.xml" );
+ TQString file = locate( "data", "kfile/bookmarks.xml" );
if (file.isEmpty()) {
file = locateLocal( "data", "kfile/bookmarks.xml" );
}
@@ -1083,25 +1083,25 @@ void MainWindow::createObjectInteractions() {
KActionMenu* bookmark=new KActionMenu(i18n( "&Bookmarks" ), "bookmark", actionCollection(), "bookmarks" );
new KBookmarkMenu(manager, bookmarkOwner, bookmark->popupMenu(), 0, true);
- connect(bookmarkOwner,SIGNAL(openURL(const KURL&)),
- mFileViewController,SLOT(setDirURL(const KURL&)) );
+ connect(bookmarkOwner,TQT_SIGNAL(openURL(const KURL&)),
+ mFileViewController,TQT_SLOT(setDirURL(const KURL&)) );
- connect(mFileViewController,SIGNAL(directoryChanged(const KURL&)),
- bookmarkOwner,SLOT(setURL(const KURL&)) );
+ connect(mFileViewController,TQT_SIGNAL(directoryChanged(const KURL&)),
+ bookmarkOwner,TQT_SLOT(setURL(const KURL&)) );
}
void MainWindow::createHideShowAction(KDockWidget* dock) {
- QString caption;
+ TQString caption;
if (dock->mayBeHide()) {
- caption=i18n("Hide %1").arg(dock->caption());
+ caption=i18n("Hide %1").tqarg(dock->caption());
} else {
- caption=i18n("Show %1").arg(dock->caption());
+ caption=i18n("Show %1").tqarg(dock->caption());
}
- KAction* action=new KAction(caption, 0, dock, SLOT(changeHideShowState()), (QObject*)0 );
+ KAction* action=new KAction(caption, 0, TQT_TQOBJECT(dock), TQT_SLOT(changeHideShowState()), (TQObject*)0 );
if (dock->icon()) {
- action->setIconSet( QIconSet(*dock->icon()) );
+ action->setIconSet( TQIconSet(*dock->icon()) );
}
mWindowListActions.append(action);
}
@@ -1118,91 +1118,91 @@ void MainWindow::updateWindowActions() {
void MainWindow::createConnections() {
- connect(mGoUp->popupMenu(), SIGNAL(aboutToShow()),
- this,SLOT(fillGoUpMenu()));
+ connect(mGoUp->popupMenu(), TQT_SIGNAL(aboutToShow()),
+ this,TQT_SLOT(fillGoUpMenu()));
- connect(mGoUp->popupMenu(), SIGNAL(activated(int)),
- this,SLOT(goUpTo(int)));
+ connect(mGoUp->popupMenu(), TQT_SIGNAL(activated(int)),
+ this,TQT_SLOT(goUpTo(int)));
// Slideshow connections
- connect( mSlideShow, SIGNAL(nextURL(const KURL&)),
- SLOT( openURL(const KURL&)) );
- connect( mSlideShow, SIGNAL( stateChanged(bool)),
- SLOT( slotSlideShowChanged(bool)) );
+ connect( mSlideShow, TQT_SIGNAL(nextURL(const KURL&)),
+ TQT_SLOT( openURL(const KURL&)) );
+ connect( mSlideShow, TQT_SIGNAL( stateChanged(bool)),
+ TQT_SLOT( slotSlideShowChanged(bool)) );
// Dir view connections
- connect(mDirViewController, SIGNAL(urlChanged(const KURL&)),
- mFileViewController, SLOT(setDirURL(const KURL&)) );
- connect(mDirViewController, SIGNAL(urlRenamed(const KURL&, const KURL&)),
- this, SLOT(slotDirRenamed(const KURL&, const KURL&)) );
+ connect(mDirViewController, TQT_SIGNAL(urlChanged(const KURL&)),
+ mFileViewController, TQT_SLOT(setDirURL(const KURL&)) );
+ connect(mDirViewController, TQT_SIGNAL(urlRenamed(const KURL&, const KURL&)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotDirRenamed(const KURL&, const KURL&)) );
// Bookmark view connections
- connect(mBookmarkViewController, SIGNAL(openURL(const KURL&)),
- mFileViewController,SLOT(setDirURL(const KURL&)) );
- connect(mFileViewController, SIGNAL(directoryChanged(const KURL&)),
- mBookmarkViewController, SLOT(setURL(const KURL&)) );
+ connect(mBookmarkViewController, TQT_SIGNAL(openURL(const KURL&)),
+ mFileViewController,TQT_SLOT(setDirURL(const KURL&)) );
+ connect(mFileViewController, TQT_SIGNAL(directoryChanged(const KURL&)),
+ mBookmarkViewController, TQT_SLOT(setURL(const KURL&)) );
// Pixmap view connections
- connect(mImageViewController, SIGNAL(selectPrevious()),
- mFileViewController, SLOT(slotSelectPrevious()) );
- connect(mImageViewController, SIGNAL(selectNext()),
- mFileViewController, SLOT(slotSelectNext()) );
- connect(mImageViewController, SIGNAL(doubleClicked()),
- mToggleFullScreen, SLOT(activate()) );
+ connect(mImageViewController, TQT_SIGNAL(selectPrevious()),
+ mFileViewController, TQT_SLOT(slotSelectPrevious()) );
+ connect(mImageViewController, TQT_SIGNAL(selectNext()),
+ mFileViewController, TQT_SLOT(slotSelectNext()) );
+ connect(mImageViewController, TQT_SIGNAL(doubleClicked()),
+ mToggleFullScreen, TQT_SLOT(activate()) );
// File view connections
- connect(mFileViewController,SIGNAL(urlChanged(const KURL&)),
- mDocument,SLOT(setURL(const KURL&)) );
- connect(mFileViewController,SIGNAL(directoryChanged(const KURL&)),
- this,SLOT(slotDirURLChanged(const KURL&)) );
- connect(mFileViewController,SIGNAL(directoryChanged(const KURL&)),
- mDirViewController,SLOT(setURL(const KURL&)) );
- connect(mFileViewController,SIGNAL(directoryChanged(const KURL&)),
- mHistory,SLOT(addURLToHistory(const KURL&)) );
-
- connect(mFileViewController,SIGNAL(completed()),
- this,SLOT(updateStatusInfo()) );
- connect(mFileViewController,SIGNAL(canceled()),
- this,SLOT(updateStatusInfo()) );
- connect(mFileViewController,SIGNAL(imageDoubleClicked()),
- mToggleFullScreen,SLOT(activate()) );
- connect(mFileViewController,SIGNAL(shownFileItemRefreshed(const KFileItem*)),
- this,SLOT(slotShownFileItemRefreshed(const KFileItem*)) );
- connect(mFileViewController,SIGNAL(sortingChanged()),
- this, SLOT(updateStatusInfo()) );
+ connect(mFileViewController,TQT_SIGNAL(urlChanged(const KURL&)),
+ mDocument,TQT_SLOT(setURL(const KURL&)) );
+ connect(mFileViewController,TQT_SIGNAL(directoryChanged(const KURL&)),
+ this,TQT_SLOT(slotDirURLChanged(const KURL&)) );
+ connect(mFileViewController,TQT_SIGNAL(directoryChanged(const KURL&)),
+ mDirViewController,TQT_SLOT(setURL(const KURL&)) );
+ connect(mFileViewController,TQT_SIGNAL(directoryChanged(const KURL&)),
+ mHistory,TQT_SLOT(addURLToHistory(const KURL&)) );
+
+ connect(mFileViewController,TQT_SIGNAL(completed()),
+ this,TQT_SLOT(updateStatusInfo()) );
+ connect(mFileViewController,TQT_SIGNAL(canceled()),
+ this,TQT_SLOT(updateStatusInfo()) );
+ connect(mFileViewController,TQT_SIGNAL(imageDoubleClicked()),
+ mToggleFullScreen,TQT_SLOT(activate()) );
+ connect(mFileViewController,TQT_SIGNAL(shownFileItemRefreshed(const KFileItem*)),
+ this,TQT_SLOT(slotShownFileItemRefreshed(const KFileItem*)) );
+ connect(mFileViewController,TQT_SIGNAL(sortingChanged()),
+ TQT_TQOBJECT(this), TQT_SLOT(updateStatusInfo()) );
// History connections
- connect(mHistory, SIGNAL(urlChanged(const KURL&)),
- mFileViewController, SLOT(setDirURL(const KURL&)) );
+ connect(mHistory, TQT_SIGNAL(urlChanged(const KURL&)),
+ mFileViewController, TQT_SLOT(setDirURL(const KURL&)) );
// Document connections
- connect(mDocument,SIGNAL(loading()),
- this,SLOT(slotImageLoading()) );
- connect(mDocument,SIGNAL(loaded(const KURL&)),
- this,SLOT(slotImageLoaded()) );
- connect(mDocument,SIGNAL(saved(const KURL&)),
- mFileViewController,SLOT(updateThumbnail(const KURL&)) );
- connect(mDocument,SIGNAL(reloaded(const KURL&)),
- mFileViewController,SLOT(updateThumbnail(const KURL&)) );
+ connect(mDocument,TQT_SIGNAL(loading()),
+ this,TQT_SLOT(slotImageLoading()) );
+ connect(mDocument,TQT_SIGNAL(loaded(const KURL&)),
+ this,TQT_SLOT(slotImageLoaded()) );
+ connect(mDocument,TQT_SIGNAL(saved(const KURL&)),
+ mFileViewController,TQT_SLOT(updateThumbnail(const KURL&)) );
+ connect(mDocument,TQT_SIGNAL(reloaded(const KURL&)),
+ mFileViewController,TQT_SLOT(updateThumbnail(const KURL&)) );
// Location bar
- connect(mURLEdit, SIGNAL(activated(const QString &)),
- this,SLOT(slotGo()) );
- connect(mURLEdit, SIGNAL(returnPressed()),
- this,SLOT(slotGo()) );
+ connect(mURLEdit, TQT_SIGNAL(activated(const TQString &)),
+ this,TQT_SLOT(slotGo()) );
+ connect(mURLEdit, TQT_SIGNAL(returnPressed()),
+ this,TQT_SLOT(slotGo()) );
// Non configurable stop-fullscreen accel
- QAccel* accel=new QAccel(this);
- accel->connectItem(accel->insertItem(Key_Escape),this,SLOT(escapePressed()));
+ TQAccel* accel=new TQAccel(this);
+ accel->connectItem(accel->insertItem(Key_Escape),TQT_TQOBJECT(this),TQT_SLOT(escapePressed()));
// Dock related
- connect(mDockArea->manager(), SIGNAL(change()),
- this, SLOT(updateWindowActions()) );
+ connect(mDockArea->manager(), TQT_SIGNAL(change()),
+ TQT_TQOBJECT(this), TQT_SLOT(updateWindowActions()) );
// Plugin menu
- QPopupMenu *popup = static_cast<QPopupMenu*>(
+ TQPopupMenu *popup = static_cast<TQPopupMenu*>(
factory()->container( "plugins", this));
- connect(popup, SIGNAL(aboutToShow()), this, SLOT(loadPlugins()) );
+ connect(popup, TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(loadPlugins()) );
}
@@ -1216,10 +1216,10 @@ void MainWindow::createLocationToolBar() {
// Do not let the combobox get wider than available space, as this would
// hide the toolbuttons after it
- mURLEdit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
+ mURLEdit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed);
// Avoid stealing focus
- mURLEdit->setFocusPolicy(ClickFocus);
+ mURLEdit->setFocusPolicy(TQ_ClickFocus);
mURLEditCompletion=new KURLCompletion();
@@ -1233,16 +1233,16 @@ void MainWindow::createLocationToolBar() {
// Clear button
(void)new KAction( i18n("Clear Location Bar"),
- QApplication::reverseLayout()?"clear_left" : "locationbar_erase",
- 0, this, SLOT(clearLocationLabel()), actionCollection(), "clear_location");
+ TQApplication::reverseLayout()?"clear_left" : "locationbar_erase",
+ 0, TQT_TQOBJECT(this), TQT_SLOT(clearLocationLabel()), actionCollection(), "clear_location");
// URL Label
KToolBarLabelAction* locationAction = new KToolBarLabelAction(i18n("L&ocation:"),
- Key_F6, this, SLOT( activateLocationLabel()), actionCollection(), "location_label");
+ Key_F6, TQT_TQOBJECT(this), TQT_SLOT( activateLocationLabel()), actionCollection(), "location_label");
locationAction->setBuddy(mURLEdit);
// Go button
- (void)new KAction(i18n("Go"), "key_enter", 0, this, SLOT(slotGo()), actionCollection(), "location_go");
+ (void)new KAction(i18n("Go"), "key_enter", 0, TQT_TQOBJECT(this), TQT_SLOT(slotGo()), actionCollection(), "location_go");
}
@@ -1267,8 +1267,8 @@ void MainWindow::loadPlugins() {
LOG("Load plugins");
// Sets up the plugin interface, and load the plugins
KIPIInterface* interface = new KIPIInterface(this, mFileViewController);
- mPluginLoader = new KIPI::PluginLoader(QStringList(), interface );
- connect( mPluginLoader, SIGNAL( replug() ), this, SLOT( slotReplug() ) );
+ mPluginLoader = new KIPI::PluginLoader(TQStringList(), interface );
+ connect( mPluginLoader, TQT_SIGNAL( replug() ), TQT_TQOBJECT(this), TQT_SLOT( slotReplug() ) );
mPluginLoader->loadPlugins();
}
@@ -1276,14 +1276,14 @@ void MainWindow::loadPlugins() {
// Helper class for slotReplug(), gcc does not want to instantiate templates
// with local classes, so this is declared outside of slotReplug()
struct MenuInfo {
- QString mName;
- QPtrList<KAction> mActions;
+ TQString mName;
+ TQPtrList<KAction> mActions;
MenuInfo() {}
- MenuInfo(const QString& name) : mName(name) {}
+ MenuInfo(const TQString& name) : mName(name) {}
};
void MainWindow::slotReplug() {
- typedef QMap<KIPI::Category, MenuInfo> CategoryMap;
+ typedef TQMap<KIPI::Category, MenuInfo> CategoryMap;
CategoryMap categoryMap;
categoryMap[KIPI::IMAGESPLUGIN]=MenuInfo("image_actions");
categoryMap[KIPI::EFFECTSPLUGIN]=MenuInfo("effect_actions");
@@ -1309,7 +1309,7 @@ void MainWindow::slotReplug() {
for (; actionIt!=end; ++actionIt) {
KIPI::Category category = plugin->category(*actionIt);
- if (!categoryMap.contains(category)) {
+ if (!categoryMap.tqcontains(category)) {
kdWarning() << "Unknown category '" << category << "'\n";
continue;
}
@@ -1323,7 +1323,7 @@ void MainWindow::slotReplug() {
KAction* noPlugin=new KAction(i18n("No Plugin"), 0, 0, 0, actionCollection(), "no_plugin");
noPlugin->setShortcutConfigurable(false);
noPlugin->setEnabled(false);
- QPtrList<KAction> noPluginList;
+ TQPtrList<KAction> noPluginList;
noPluginList.append(noPlugin);
// Fill the menu
@@ -1344,10 +1344,10 @@ void MainWindow::loadPlugins() {
KAction* noPlugin=new KAction(i18n("No KIPI support"), 0, 0, 0, actionCollection(), "no_plugin");
noPlugin->setShortcutConfigurable(false);
noPlugin->setEnabled(false);
- QPtrList<KAction> noPluginList;
+ TQPtrList<KAction> noPluginList;
noPluginList.append(noPlugin);
- QStringList lst;
+ TQStringList lst;
lst << "image_actions"
<< "effect_actions"
<< "tool_actions"
@@ -1357,7 +1357,7 @@ void MainWindow::loadPlugins() {
<< "collection_actions";
// Fill the menu
- QStringList::ConstIterator catIt=lst.begin(), catItEnd=lst.end();
+ TQStringList::ConstIterator catIt=lst.begin(), catItEnd=lst.end();
for (; catIt!=catItEnd; ++catIt) {
plugActionList(*catIt, noPluginList);
}