summaryrefslogtreecommitdiffstats
path: root/kpdf/part.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-02 19:23:46 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-02 19:23:46 +0000
commiteba47f8f0637f451e21348187591e1f1fd58ac74 (patch)
tree448f10b95c656604acc331a3236c1e59bde5c1ad /kpdf/part.cpp
parentc7e8736c69373f48b0401319757c742e8607431a (diff)
downloadtdegraphics-eba47f8f0637f451e21348187591e1f1fd58ac74.tar.gz
tdegraphics-eba47f8f0637f451e21348187591e1f1fd58ac74.zip
TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1158446 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpdf/part.cpp')
-rw-r--r--kpdf/part.cpp220
1 files changed, 110 insertions, 110 deletions
diff --git a/kpdf/part.cpp b/kpdf/part.cpp
index 69ad7f00..b2775255 100644
--- a/kpdf/part.cpp
+++ b/kpdf/part.cpp
@@ -22,16 +22,16 @@
***************************************************************************/
// qt/kde includes
-#include <qcheckbox.h>
-#include <qsplitter.h>
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qtoolbox.h>
-#include <qtooltip.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqsplitter.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqtoolbox.h>
+#include <tqtooltip.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
#include <dcopobject.h>
#include <dcopclient.h>
#include <kapplication.h>
@@ -80,27 +80,27 @@ class PDFOptionsPage : public KPrintDialogPage
PDFOptionsPage()
{
setTitle( i18n( "PDF Options" ) );
- QVBoxLayout *layout = new QVBoxLayout(this);
- m_forceRaster = new QCheckBox(i18n("Force rasterization"), this);
- QToolTip::add(m_forceRaster, i18n("Rasterize into an image before printing"));
- QWhatsThis::add(m_forceRaster, i18n("Forces the rasterization of each page into an image before printing it. This usually gives somewhat worse results, but is useful when printing documents that appear to print incorrectly."));
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
+ m_forceRaster = new TQCheckBox(i18n("Force rasterization"), this);
+ TQToolTip::add(m_forceRaster, i18n("Rasterize into an image before printing"));
+ TQWhatsThis::add(m_forceRaster, i18n("Forces the rasterization of each page into an image before printing it. This usually gives somewhat worse results, but is useful when printing documents that appear to print incorrectly."));
layout->addWidget(m_forceRaster);
layout->addStretch(1);
}
- void getOptions( QMap<QString,QString>& opts, bool incldef = false )
+ void getOptions( TQMap<TQString,TQString>& opts, bool incldef = false )
{
Q_UNUSED(incldef);
- opts[ "kde-kpdf-forceRaster" ] = QString::number( m_forceRaster->isChecked() );
+ opts[ "kde-kpdf-forceRaster" ] = TQString::number( m_forceRaster->isChecked() );
}
- void setOptions( const QMap<QString,QString>& opts )
+ void setOptions( const TQMap<TQString,TQString>& opts )
{
m_forceRaster->setChecked( opts[ "kde-kpdf-forceRaster" ].toInt() );
}
private:
- QCheckBox *m_forceRaster;
+ TQCheckBox *m_forceRaster;
};
// definition of searchID for this class
@@ -113,18 +113,18 @@ using namespace KPDF;
unsigned int Part::m_count = 0;
-Part::Part(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const QStringList & /*args*/ )
+Part::Part(TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const TQStringList & /*args*/ )
: DCOPObject("kpdf"), KParts::ReadOnlyPart(parent, name), m_showMenuBarAction(0), m_showFullScreenAction(0),
m_actionsSearched(false), m_searchStarted(false)
{
// connect the started signal to tell the job the mimetypes we like
- connect(this, SIGNAL(started(KIO::Job *)), this, SLOT(setMimeTypes(KIO::Job *)));
+ connect(this, TQT_SIGNAL(started(KIO::Job *)), this, TQT_SLOT(setMimeTypes(KIO::Job *)));
// connect the completed signal so we can put the window caption when loading remote files
- connect(this, SIGNAL(completed()), this, SLOT(emitWindowCaption()));
- connect(this, SIGNAL(canceled(const QString &)), this, SLOT(emitWindowCaption()));
+ connect(this, TQT_SIGNAL(completed()), this, TQT_SLOT(emitWindowCaption()));
+ connect(this, TQT_SIGNAL(canceled(const TQString &)), this, TQT_SLOT(emitWindowCaption()));
// load catalog for translation
KGlobal::locale()->insertCatalogue("kpdf");
@@ -144,86 +144,86 @@ Part::Part(QWidget *parentWidget, const char *widgetName,
// build the document
m_document = new KPDFDocument(widget());
- connect( m_document, SIGNAL( linkFind() ), this, SLOT( slotFind() ) );
- connect( m_document, SIGNAL( linkGoToPage() ), this, SLOT( slotGoToPage() ) );
- connect( m_document, SIGNAL( linkPresentation() ), this, SLOT( slotShowPresentation() ) );
- connect( m_document, SIGNAL( linkEndPresentation() ), this, SLOT( slotHidePresentation() ) );
- connect( m_document, SIGNAL( openURL(const KURL &) ), this, SLOT( openURLFromDocument(const KURL &) ) );
- connect( m_document, SIGNAL( close() ), this, SLOT( close() ) );
+ connect( m_document, TQT_SIGNAL( linkFind() ), this, TQT_SLOT( slotFind() ) );
+ connect( m_document, TQT_SIGNAL( linkGoToPage() ), this, TQT_SLOT( slotGoToPage() ) );
+ connect( m_document, TQT_SIGNAL( linkPresentation() ), this, TQT_SLOT( slotShowPresentation() ) );
+ connect( m_document, TQT_SIGNAL( linkEndPresentation() ), this, TQT_SLOT( slotHidePresentation() ) );
+ connect( m_document, TQT_SIGNAL( openURL(const KURL &) ), this, TQT_SLOT( openURLFromDocument(const KURL &) ) );
+ connect( m_document, TQT_SIGNAL( close() ), this, TQT_SLOT( close() ) );
if (parent && parent->metaObject()->slotNames(true).contains("slotQuit()"))
- connect( m_document, SIGNAL( quit() ), parent, SLOT( slotQuit() ) );
+ connect( m_document, TQT_SIGNAL( quit() ), parent, TQT_SLOT( slotQuit() ) );
else
- connect( m_document, SIGNAL( quit() ), this, SLOT( cannotQuit() ) );
+ connect( m_document, TQT_SIGNAL( quit() ), this, TQT_SLOT( cannotQuit() ) );
// widgets: ^searchbar (toolbar containing label and SearchWidget)
// m_searchToolBar = new KToolBar( parentWidget, "searchBar" );
// m_searchToolBar->boxLayout()->setSpacing( KDialog::spacingHint() );
-// QLabel * sLabel = new QLabel( i18n( "&Search:" ), m_searchToolBar, "kde toolbar widget" );
+// TQLabel * sLabel = new TQLabel( i18n( "&Search:" ), m_searchToolBar, "kde toolbar widget" );
// m_searchWidget = new SearchWidget( m_searchToolBar, m_document );
// sLabel->setBuddy( m_searchWidget );
// m_searchToolBar->setStretchableWidget( m_searchWidget );
// widgets: [] splitter []
- m_splitter = new QSplitter( parentWidget, widgetName );
+ m_splitter = new TQSplitter( parentWidget, widgetName );
m_splitter->setOpaqueResize( true );
setWidget( m_splitter );
- m_showLeftPanel = new KToggleAction( i18n( "Show &Navigation Panel"), "show_side_panel", 0, this, SLOT( slotShowLeftPanel() ), actionCollection(), "show_leftpanel" );
+ m_showLeftPanel = new KToggleAction( i18n( "Show &Navigation Panel"), "show_side_panel", 0, this, TQT_SLOT( slotShowLeftPanel() ), actionCollection(), "show_leftpanel" );
m_showLeftPanel->setCheckedState( i18n( "Hide &Navigation Panel") );
m_showLeftPanel->setShortcut( "CTRL+L" );
m_showLeftPanel->setChecked( KpdfSettings::showLeftPanel() );
// widgets: [left panel] | []
- m_leftPanel = new QWidget( m_splitter );
+ m_leftPanel = new TQWidget( m_splitter );
m_leftPanel->setMinimumWidth( 90 );
m_leftPanel->setMaximumWidth( 300 );
- QVBoxLayout * leftPanelLayout = new QVBoxLayout( m_leftPanel );
+ TQVBoxLayout * leftPanelLayout = new TQVBoxLayout( m_leftPanel );
// widgets: [left toolbox/..] | []
- m_toolBox = new QToolBox( m_leftPanel );
+ m_toolBox = new TQToolBox( m_leftPanel );
leftPanelLayout->addWidget( m_toolBox );
int index;
// [left toolbox: Table of Contents] | []
// dummy wrapper with layout to enable horizontal scroll bars (bug: 147233)
- QWidget *tocWrapper = new QWidget(m_toolBox);
- QVBoxLayout *tocWrapperLayout = new QVBoxLayout(tocWrapper);
+ TQWidget *tocWrapper = new TQWidget(m_toolBox);
+ TQVBoxLayout *tocWrapperLayout = new TQVBoxLayout(tocWrapper);
m_tocFrame = new TOC( tocWrapper, m_document );
tocWrapperLayout->add(m_tocFrame);
- connect(m_tocFrame, SIGNAL(hasTOC(bool)), this, SLOT(enableTOC(bool)));
- index = m_toolBox->addItem( tocWrapper, QIconSet(SmallIcon("text_left")), i18n("Contents") );
+ connect(m_tocFrame, TQT_SIGNAL(hasTOC(bool)), this, TQT_SLOT(enableTOC(bool)));
+ index = m_toolBox->addItem( tocWrapper, TQIconSet(SmallIcon("text_left")), i18n("Contents") );
m_toolBox->setItemToolTip(index, i18n("Contents"));
enableTOC( false );
// [left toolbox: Thumbnails and Bookmarks] | []
- QVBox * thumbsBox = new ThumbnailsBox( m_toolBox );
+ TQVBox * thumbsBox = new ThumbnailsBox( m_toolBox );
m_searchWidget = new SearchWidget( thumbsBox, m_document );
m_thumbnailList = new ThumbnailList( thumbsBox, m_document );
// ThumbnailController * m_tc = new ThumbnailController( thumbsBox, m_thumbnailList );
- connect( m_thumbnailList, SIGNAL( urlDropped( const KURL& ) ), SLOT( openURLFromDocument( const KURL & )) );
- connect( m_thumbnailList, SIGNAL( rightClick(const KPDFPage *, const QPoint &) ), this, SLOT( slotShowMenu(const KPDFPage *, const QPoint &) ) );
+ connect( m_thumbnailList, TQT_SIGNAL( urlDropped( const KURL& ) ), TQT_SLOT( openURLFromDocument( const KURL & )) );
+ connect( m_thumbnailList, TQT_SIGNAL( rightClick(const KPDFPage *, const TQPoint &) ), this, TQT_SLOT( slotShowMenu(const KPDFPage *, const TQPoint &) ) );
// shrink the bottom controller toolbar (too hackish..)
thumbsBox->setStretchFactor( m_searchWidget, 100 );
thumbsBox->setStretchFactor( m_thumbnailList, 100 );
// thumbsBox->setStretchFactor( m_tc, 1 );
- index = m_toolBox->addItem( thumbsBox, QIconSet(SmallIcon("thumbnail")), i18n("Thumbnails") );
+ index = m_toolBox->addItem( thumbsBox, TQIconSet(SmallIcon("thumbnail")), i18n("Thumbnails") );
m_toolBox->setItemToolTip(index, i18n("Thumbnails"));
m_toolBox->setCurrentItem( thumbsBox );
slotShowLeftPanel();
/* // [left toolbox: Annotations] | []
- QFrame * editFrame = new QFrame( m_toolBox );
- int iIdx = m_toolBox->addItem( editFrame, QIconSet(SmallIcon("pencil")), i18n("Annotations") );
+ TQFrame * editFrame = new TQFrame( m_toolBox );
+ int iIdx = m_toolBox->addItem( editFrame, TQIconSet(SmallIcon("pencil")), i18n("Annotations") );
m_toolBox->setItemEnabled( iIdx, false );*/
// widgets: [../miniBarContainer] | []
- QWidget * miniBarContainer = new QWidget( m_leftPanel );
+ TQWidget * miniBarContainer = new TQWidget( m_leftPanel );
leftPanelLayout->addWidget( miniBarContainer );
- QVBoxLayout * miniBarLayout = new QVBoxLayout( miniBarContainer );
+ TQVBoxLayout * miniBarLayout = new TQVBoxLayout( miniBarContainer );
// widgets: [../[spacer/..]] | []
- QWidget * miniSpacer = new QWidget( miniBarContainer );
+ TQWidget * miniSpacer = new TQWidget( miniBarContainer );
miniSpacer->setFixedHeight( 6 );
miniBarLayout->addWidget( miniSpacer );
// widgets: [../[../MiniBar]] | []
@@ -234,8 +234,8 @@ Part::Part(QWidget *parentWidget, const char *widgetName,
m_pageView = new PageView( m_splitter, m_document );
m_pageView->setFocus(); //usability setting
m_splitter->setFocusProxy(m_pageView);
- connect( m_pageView, SIGNAL( urlDropped( const KURL& ) ), SLOT( openURLFromDocument( const KURL & )));
- connect( m_pageView, SIGNAL( rightClick(const KPDFPage *, const QPoint &) ), this, SLOT( slotShowMenu(const KPDFPage *, const QPoint &) ) );
+ connect( m_pageView, TQT_SIGNAL( urlDropped( const KURL& ) ), TQT_SLOT( openURLFromDocument( const KURL & )));
+ connect( m_pageView, TQT_SIGNAL( rightClick(const KPDFPage *, const TQPoint &) ), this, TQT_SLOT( slotShowMenu(const KPDFPage *, const TQPoint &) ) );
// add document observers
m_document->addObserver( this );
@@ -248,60 +248,60 @@ Part::Part(QWidget *parentWidget, const char *widgetName,
KActionCollection * ac = actionCollection();
// Page Traversal actions
- m_gotoPage = KStdAction::gotoPage( this, SLOT( slotGoToPage() ), ac, "goto_page" );
+ m_gotoPage = KStdAction::gotoPage( this, TQT_SLOT( slotGoToPage() ), ac, "goto_page" );
m_gotoPage->setShortcut( "CTRL+G" );
// dirty way to activate gotopage when pressing miniBar's button
- connect( m_miniBar, SIGNAL( gotoPage() ), m_gotoPage, SLOT( activate() ) );
+ connect( m_miniBar, TQT_SIGNAL( gotoPage() ), m_gotoPage, TQT_SLOT( activate() ) );
- m_prevPage = KStdAction::prior(this, SLOT(slotPreviousPage()), ac, "previous_page");
+ m_prevPage = KStdAction::prior(this, TQT_SLOT(slotPreviousPage()), ac, "previous_page");
m_prevPage->setWhatsThis( i18n( "Moves to the previous page of the document" ) );
m_prevPage->setShortcut( 0 );
// dirty way to activate prev page when pressing miniBar's button
- connect( m_miniBar, SIGNAL( prevPage() ), m_prevPage, SLOT( activate() ) );
+ connect( m_miniBar, TQT_SIGNAL( prevPage() ), m_prevPage, TQT_SLOT( activate() ) );
- m_nextPage = KStdAction::next(this, SLOT(slotNextPage()), ac, "next_page" );
+ m_nextPage = KStdAction::next(this, TQT_SLOT(slotNextPage()), ac, "next_page" );
m_nextPage->setWhatsThis( i18n( "Moves to the next page of the document" ) );
m_nextPage->setShortcut( 0 );
// dirty way to activate next page when pressing miniBar's button
- connect( m_miniBar, SIGNAL( nextPage() ), m_nextPage, SLOT( activate() ) );
+ connect( m_miniBar, TQT_SIGNAL( nextPage() ), m_nextPage, TQT_SLOT( activate() ) );
- m_firstPage = KStdAction::firstPage( this, SLOT( slotGotoFirst() ), ac, "first_page" );
+ m_firstPage = KStdAction::firstPage( this, TQT_SLOT( slotGotoFirst() ), ac, "first_page" );
m_firstPage->setWhatsThis( i18n( "Moves to the first page of the document" ) );
- m_lastPage = KStdAction::lastPage( this, SLOT( slotGotoLast() ), ac, "last_page" );
+ m_lastPage = KStdAction::lastPage( this, TQT_SLOT( slotGotoLast() ), ac, "last_page" );
m_lastPage->setWhatsThis( i18n( "Moves to the last page of the document" ) );
- m_historyBack = KStdAction::back( this, SLOT( slotHistoryBack() ), ac, "history_back" );
+ m_historyBack = KStdAction::back( this, TQT_SLOT( slotHistoryBack() ), ac, "history_back" );
m_historyBack->setWhatsThis( i18n( "Go to the place you were before" ) );
- m_historyNext = KStdAction::forward( this, SLOT( slotHistoryNext() ), ac, "history_forward" );
+ m_historyNext = KStdAction::forward( this, TQT_SLOT( slotHistoryNext() ), ac, "history_forward" );
m_historyNext->setWhatsThis( i18n( "Go to the place you were after" ) );
// Find and other actions
- m_find = KStdAction::find( this, SLOT( slotFind() ), ac, "find" );
+ m_find = KStdAction::find( this, TQT_SLOT( slotFind() ), ac, "find" );
m_find->setEnabled( false );
- m_findNext = KStdAction::findNext( this, SLOT( slotFindNext() ), ac, "find_next" );
+ m_findNext = KStdAction::findNext( this, TQT_SLOT( slotFindNext() ), ac, "find_next" );
m_findNext->setEnabled( false );
- m_saveAs = KStdAction::saveAs( this, SLOT( slotSaveFileAs() ), ac, "save" );
+ m_saveAs = KStdAction::saveAs( this, TQT_SLOT( slotSaveFileAs() ), ac, "save" );
m_saveAs->setEnabled( false );
- KAction * prefs = KStdAction::preferences( this, SLOT( slotPreferences() ), ac, "preferences" );
+ KAction * prefs = KStdAction::preferences( this, TQT_SLOT( slotPreferences() ), ac, "preferences" );
prefs->setText( i18n( "Configure KPDF..." ) );
- m_printPreview = KStdAction::printPreview( this, SLOT( slotPrintPreview() ), ac );
+ m_printPreview = KStdAction::printPreview( this, TQT_SLOT( slotPrintPreview() ), ac );
m_printPreview->setEnabled( false );
- m_showProperties = new KAction(i18n("&Properties"), "info", 0, this, SLOT(slotShowProperties()), ac, "properties");
+ m_showProperties = new KAction(i18n("&Properties"), "info", 0, this, TQT_SLOT(slotShowProperties()), ac, "properties");
m_showProperties->setEnabled( false );
- m_showPresentation = new KAction( i18n("P&resentation"), "kpresenter_kpr", "Ctrl+Shift+P", this, SLOT(slotShowPresentation()), ac, "presentation");
+ m_showPresentation = new KAction( i18n("P&resentation"), "kpresenter_kpr", "Ctrl+Shift+P", this, TQT_SLOT(slotShowPresentation()), ac, "presentation");
m_showPresentation->setEnabled( false );
// attach the actions of the children widgets too
m_pageView->setupActions( ac );
// apply configuration (both internal settings and GUI configured items)
- QValueList<int> splitterSizes = KpdfSettings::splitterSizes();
+ TQValueList<int> splitterSizes = KpdfSettings::splitterSizes();
if ( !splitterSizes.count() )
{
// the first time use 1/10 for the panel and 9/10 for the pageView
@@ -313,11 +313,11 @@ Part::Part(QWidget *parentWidget, const char *widgetName,
// by connecting to Qt4::QSplitter's sliderMoved())
m_pageView->installEventFilter( this );
m_watcher = new KDirWatch( this );
- connect( m_watcher, SIGNAL( dirty( const QString& ) ), this, SLOT( slotFileDirty( const QString& ) ) );
- m_dirtyHandler = new QTimer( this );
- connect( m_dirtyHandler, SIGNAL( timeout() ),this, SLOT( slotDoFileDirty() ) );
- m_saveSplitterSizeTimer = new QTimer( this );
- connect( m_saveSplitterSizeTimer, SIGNAL( timeout() ),this, SLOT( saveSplitterSize() ) );
+ connect( m_watcher, TQT_SIGNAL( dirty( const TQString& ) ), this, TQT_SLOT( slotFileDirty( const TQString& ) ) );
+ m_dirtyHandler = new TQTimer( this );
+ connect( m_dirtyHandler, TQT_SIGNAL( timeout() ),this, TQT_SLOT( slotDoFileDirty() ) );
+ m_saveSplitterSizeTimer = new TQTimer( this );
+ connect( m_saveSplitterSizeTimer, TQT_SIGNAL( timeout() ),this, TQT_SLOT( saveSplitterSize() ) );
slotNewConfig();
@@ -417,12 +417,12 @@ bool Part::openFile()
}
if ( (*mime).is( "application/postscript" ) )
{
- QString app = KStandardDirs::findExe( "ps2pdf" );
+ TQString app = KStandardDirs::findExe( "ps2pdf" );
if ( !app.isNull() )
{
- if ( QFile::exists(m_file) )
+ if ( TQFile::exists(m_file) )
{
- KTempFile tf( QString::null, ".pdf" );
+ KTempFile tf( TQString::null, ".pdf" );
if ( tf.status() == 0 )
{
tf.close();
@@ -432,7 +432,7 @@ bool Part::openFile()
*p << app;
*p << m_file << m_temporaryLocalFile;
m_pageView->showText(i18n("Converting from ps to pdf..."), 0);
- connect(p, SIGNAL(processExited(KProcess *)), this, SLOT(psTransformEnded()));
+ connect(p, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(psTransformEnded()));
p -> start();
return true;
}
@@ -447,7 +447,7 @@ bool Part::openFile()
}
}
- m_temporaryLocalFile = QString::null;
+ m_temporaryLocalFile = TQString::null;
bool ok = m_document->openDocument( m_file, url(), mime );
@@ -482,7 +482,7 @@ bool Part::openFile()
// if the 'StartFullScreen' flag is set, start presentation
if ( m_document->getMetaData( "StartFullScreen" ) == "yes" )
{
- KMessageBox::information(m_presentationWidget, i18n("The document is going to be launched on presentation mode because the file requested it."), QString::null, "autoPresentationWarning");
+ KMessageBox::information(m_presentationWidget, i18n("The document is going to be launched on presentation mode because the file requested it."), TQString::null, "autoPresentationWarning");
slotShowPresentation();
}
@@ -502,7 +502,7 @@ bool Part::openURL(const KURL &url)
// if it matches then: download it (if not local) extract to a temp file using
// KTar and proceed with the URL of the temporary file
- m_jobMime = QString::null;
+ m_jobMime = TQString::null;
// this calls the above 'openURL' method
bool b = KParts::ReadOnlyPart::openURL(url);
@@ -527,11 +527,11 @@ void Part::setMimeTypes(KIO::Job *job)
if (job)
{
job->addMetaData("accept", "application/pdf, */*;q=0.5");
- connect(job, SIGNAL(mimetype(KIO::Job*,const QString&)), this, SLOT(readMimeType(KIO::Job*,const QString&)));
+ connect(job, TQT_SIGNAL(mimetype(KIO::Job*,const TQString&)), this, TQT_SLOT(readMimeType(KIO::Job*,const TQString&)));
}
}
-void Part::readMimeType(KIO::Job *, const QString &mime)
+void Part::readMimeType(KIO::Job *, const TQString &mime)
{
m_jobMime = mime;
}
@@ -547,8 +547,8 @@ bool Part::closeURL()
{
if (!m_temporaryLocalFile.isNull())
{
- QFile::remove( m_temporaryLocalFile );
- m_temporaryLocalFile = QString::null;
+ TQFile::remove( m_temporaryLocalFile );
+ m_temporaryLocalFile = TQString::null;
}
slotHidePresentation();
@@ -568,10 +568,10 @@ bool Part::closeURL()
return KParts::ReadOnlyPart::closeURL();
}
-bool Part::eventFilter( QObject * watched, QEvent * e )
+bool Part::eventFilter( TQObject * watched, TQEvent * e )
{
// if pageView has been resized, save splitter sizes
- if ( watched == m_pageView && e->type() == QEvent::Resize )
+ if ( watched == m_pageView && e->type() == TQEvent::Resize )
m_saveSplitterSizeTimer->start(500, true);
// only intercept events, don't block them
@@ -589,7 +589,7 @@ void Part::slotShowLeftPanel()
m_thumbnailList->setShown( showLeft );
}
-void Part::slotFileDirty( const QString& fileName )
+void Part::slotFileDirty( const TQString& fileName )
{
// The beauty of this is that each start cancels the previous one.
// This means that timeout() is only fired when there have
@@ -638,7 +638,7 @@ void Part::close()
{
closeURL();
}
- else KMessageBox::information(widget(), i18n("This link points to a close document action that does not work when using the embedded viewer."), QString::null, "warnNoCloseIfNotInKPDF");
+ else KMessageBox::information(widget(), i18n("This link points to a close document action that does not work when using the embedded viewer."), TQString::null, "warnNoCloseIfNotInKPDF");
}
void Part::updateViewActions()
@@ -675,7 +675,7 @@ void Part::enableTOC(bool enable)
void Part::psTransformEnded()
{
- QString aux = m_file;
+ TQString aux = m_file;
m_file = m_temporaryLocalFile;
openFile();
m_file = aux; // so watching works, we have to watch the ps file not the autogenerated pdf
@@ -686,7 +686,7 @@ void Part::psTransformEnded()
void Part::cannotQuit()
{
- KMessageBox::information(widget(), i18n("This link points to a quit application action that does not work when using the embedded viewer."), QString::null, "warnNoQuitIfNotInKPDF");
+ KMessageBox::information(widget(), i18n("This link points to a quit application action that does not work when using the embedded viewer."), TQString::null, "warnNoQuitIfNotInKPDF");
}
void Part::saveSplitterSize()
@@ -699,16 +699,16 @@ void Part::saveSplitterSize()
class KPDFGotoPageDialog : public KDialogBase
{
public:
- KPDFGotoPageDialog(QWidget *p, int current, int max) : KDialogBase(p, 0L, true, i18n("Go to Page"), Ok | Cancel, Ok) {
- QWidget *w = new QWidget(this);
+ KPDFGotoPageDialog(TQWidget *p, int current, int max) : KDialogBase(p, 0L, true, i18n("Go to Page"), Ok | Cancel, Ok) {
+ TQWidget *w = new TQWidget(this);
setMainWidget(w);
- QVBoxLayout *topLayout = new QVBoxLayout( w, 0, spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( w, 0, spacingHint() );
e1 = new KIntNumInput(current, w);
e1->setRange(1, max);
e1->setEditFocus(true);
- QLabel *label = new QLabel( e1,i18n("&Page:"), w );
+ TQLabel *label = new TQLabel( e1,i18n("&Page:"), w );
topLayout->addWidget(label);
topLayout->addWidget(e1);
topLayout->addSpacing(spacingHint()); // A little bit extra space
@@ -728,7 +728,7 @@ public:
void Part::slotGoToPage()
{
KPDFGotoPageDialog pageDialog( m_pageView, m_document->currentPage() + 1, m_document->pages() );
- if ( pageDialog.exec() == QDialog::Accepted )
+ if ( pageDialog.exec() == TQDialog::Accepted )
m_document->setViewportPage( pageDialog.getPage() - 1 );
}
@@ -782,7 +782,7 @@ void Part::slotFind()
{
dlg.setOptions( dlg.options() | KFindDialog::CaseSensitive );
}
- if ( dlg.exec() == QDialog::Accepted )
+ if ( dlg.exec() == TQDialog::Accepted )
{
savedCaseSensitive = dlg.options() & KFindDialog::CaseSensitive;
m_searchHistory = dlg.findHistory();
@@ -801,7 +801,7 @@ void Part::slotFindNext()
void Part::slotSaveFileAs()
{
- KURL saveURL = KFileDialog::getSaveURL( url().isLocalFile() ? url().url() : url().fileName(), QString::null, widget() );
+ KURL saveURL = KFileDialog::getSaveURL( url().isLocalFile() ? url().url() : url().fileName(), TQString::null, widget() );
if ( saveURL.isValid() && !saveURL.isEmpty() )
{
if (saveURL == url())
@@ -811,7 +811,7 @@ void Part::slotSaveFileAs()
}
if ( KIO::NetAccess::exists( saveURL, false, widget() ) )
{
- if (KMessageBox::warningContinueCancel( widget(), i18n("A file named \"%1\" already exists. Are you sure you want to overwrite it?").arg(saveURL.filename()), QString::null, i18n("Overwrite")) != KMessageBox::Continue)
+ if (KMessageBox::warningContinueCancel( widget(), i18n("A file named \"%1\" already exists. Are you sure you want to overwrite it?").arg(saveURL.filename()), TQString::null, i18n("Overwrite")) != KMessageBox::Continue)
return;
}
@@ -830,7 +830,7 @@ void Part::slotPreferences()
// we didn't find an instance of this dialog, so lets create it
PreferencesDialog * dialog = new PreferencesDialog( m_pageView, KpdfSettings::self() );
// keep us informed when the user changes settings
- connect( dialog, SIGNAL( settingsChanged() ), this, SLOT( slotNewConfig() ) );
+ connect( dialog, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT( slotNewConfig() ) );
dialog->show();
}
@@ -855,8 +855,8 @@ void Part::slotNewConfig()
m_searchWidget->setShown( showSearch );
// Main View (pageView)
- QScrollView::ScrollBarMode scrollBarMode = KpdfSettings::showScrollBars() ?
- QScrollView::AlwaysOn : QScrollView::AlwaysOff;
+ TQScrollView::ScrollBarMode scrollBarMode = KpdfSettings::showScrollBars() ?
+ TQScrollView::AlwaysOn : TQScrollView::AlwaysOff;
if ( m_pageView->hScrollBarMode() != scrollBarMode )
{
m_pageView->setHScrollBarMode( scrollBarMode );
@@ -903,7 +903,7 @@ void Part::slotPrintPreview()
doPrint(printer);
}
-void Part::slotShowMenu(const KPDFPage *page, const QPoint &point)
+void Part::slotShowMenu(const KPDFPage *page, const TQPoint &point)
{
bool reallyShow = false;
if (!m_actionsSearched)
@@ -916,8 +916,8 @@ void Part::slotShowMenu(const KPDFPage *page, const QPoint &point)
if (factory())
{
- QPtrList<KXMLGUIClient> clients(factory()->clients());
- QPtrListIterator<KXMLGUIClient> clientsIt( clients );
+ TQPtrList<KXMLGUIClient> clients(factory()->clients());
+ TQPtrListIterator<KXMLGUIClient> clientsIt( clients );
for( ; (!m_showMenuBarAction || !m_showFullScreenAction) && clientsIt.current(); ++clientsIt)
{
client = clientsIt.current();
@@ -927,8 +927,8 @@ void Part::slotShowMenu(const KPDFPage *page, const QPoint &point)
begin = actions.begin();
for ( it = begin; it != end; ++it )
{
- if (QString((*it)->name()) == "options_show_menubar") m_showMenuBarAction = (KToggleAction*)(*it);
- if (QString((*it)->name()) == "fullscreen") m_showFullScreenAction = (KToggleAction*)(*it);
+ if (TQString((*it)->name()) == "options_show_menubar") m_showMenuBarAction = (KToggleAction*)(*it);
+ if (TQString((*it)->name()) == "fullscreen") m_showFullScreenAction = (KToggleAction*)(*it);
}
}
}
@@ -1070,7 +1070,7 @@ void Part::restoreDocument(KConfig* config)
KURL url ( config->readPathEntry( "URL" ) );
if ( url.isValid() )
{
- QString viewport = config->readEntry( "Viewport" );
+ TQString viewport = config->readEntry( "Viewport" );
if (!viewport.isEmpty()) m_document->setNextDocumentViewport( DocumentViewport( viewport ) );
openURL( url );
}