summaryrefslogtreecommitdiffstats
path: root/kghostview
diff options
context:
space:
mode:
Diffstat (limited to 'kghostview')
-rw-r--r--kghostview/displayoptions.cpp14
-rw-r--r--kghostview/displayoptions.h20
-rw-r--r--kghostview/dscparse_adapter.cpp28
-rw-r--r--kghostview/dscparse_adapter.h22
-rw-r--r--kghostview/fullscreenfilter.cpp8
-rw-r--r--kghostview/fullscreenfilter.h6
-rw-r--r--kghostview/gssettingswidget.ui.h2
-rw-r--r--kghostview/infodialog.cpp48
-rw-r--r--kghostview/infodialog.h14
-rw-r--r--kghostview/kdscerrordialog.cpp30
-rw-r--r--kghostview/kdscerrordialog.h22
-rw-r--r--kghostview/kgv.h4
-rw-r--r--kghostview/kgv_miniwidget.cpp92
-rw-r--r--kghostview/kgv_miniwidget.h18
-rw-r--r--kghostview/kgv_view.cpp272
-rw-r--r--kghostview/kgv_view.h44
-rw-r--r--kghostview/kgvconfigdialog.cpp38
-rw-r--r--kghostview/kgvdocument.cpp132
-rw-r--r--kghostview/kgvdocument.h46
-rw-r--r--kghostview/kgvfactory.cpp10
-rw-r--r--kghostview/kgvfactory.h6
-rw-r--r--kghostview/kgvmainwidget.cpp10
-rw-r--r--kghostview/kgvmainwidget.h10
-rw-r--r--kghostview/kgvpagedecorator.cpp48
-rw-r--r--kghostview/kgvpagedecorator.h22
-rw-r--r--kghostview/kgvpageview.cpp42
-rw-r--r--kghostview/kgvpageview.h34
-rw-r--r--kghostview/kgvshell.cpp48
-rw-r--r--kghostview/kgvshell.h6
-rw-r--r--kghostview/kpswidget.cpp50
-rw-r--r--kghostview/kpswidget.h30
-rw-r--r--kghostview/logwindow.cpp28
-rw-r--r--kghostview/logwindow.h16
-rw-r--r--kghostview/main.cpp4
-rw-r--r--kghostview/marklist.cpp52
-rw-r--r--kghostview/marklist.h28
-rw-r--r--kghostview/scrollbox.cpp34
-rw-r--r--kghostview/scrollbox.h32
-rw-r--r--kghostview/thumbnailservice.cpp22
-rw-r--r--kghostview/thumbnailservice.h28
-rw-r--r--kghostview/viewcontrol.cpp60
-rw-r--r--kghostview/viewcontrol.h16
42 files changed, 748 insertions, 748 deletions
diff --git a/kghostview/displayoptions.cpp b/kghostview/displayoptions.cpp
index 48d45e7e..ab33e384 100644
--- a/kghostview/displayoptions.cpp
+++ b/kghostview/displayoptions.cpp
@@ -17,7 +17,7 @@
*/
#include "displayoptions.h"
#include <kdebug.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kcmdlineargs.h>
#include <kconfig.h>
@@ -65,18 +65,18 @@ namespace {
const char* const qformat = ".page: %1; .magnification: %2; .orientation = %3; .media = %4;";
}
-QString DisplayOptions::toString( const DisplayOptions& options )
+TQString DisplayOptions::toString( const DisplayOptions& options )
{
- return QString( qformat )
+ return TQString( qformat )
.arg( options.page() )
.arg( options.magnification() )
.arg( options.overrideOrientation() )
.arg( options.overridePageMedia().utf8() );
}
-bool DisplayOptions::fromString( DisplayOptions& out, const QString& in )
+bool DisplayOptions::fromString( DisplayOptions& out, const TQString& in )
{
- QRegExp regex( QString::fromLatin1( rformat ) );
+ TQRegExp regex( TQString::fromLatin1( rformat ) );
if ( regex.search( in ) < 0 ) return false;
out.reset();
@@ -138,8 +138,8 @@ unsigned DisplayOptions::closestIndex() const {
return res;
}
-QValueList<double> DisplayOptions::normalMagnificationValues() {
- QValueList<double> res;
+TQValueList<double> DisplayOptions::normalMagnificationValues() {
+ TQValueList<double> res;
for ( const double *first = allowedMagnifications, *last = allowedMagnifications + numberOfMagnifications;
first != last;
++first ) {
diff --git a/kghostview/displayoptions.h b/kghostview/displayoptions.h
index e929d8b7..8a19a812 100644
--- a/kghostview/displayoptions.h
+++ b/kghostview/displayoptions.h
@@ -17,8 +17,8 @@
*/
#ifndef DISPLAYOPTIONS_H
#define DISPLAYOPTIONS_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include "dscparse_adapter.h"
#include <kdemacros.h>
class KCmdLineArgs;
@@ -39,9 +39,9 @@ class KDE_EXPORT DisplayOptions
void setOverrideOrientation(CDSC_ORIENTATION_ENUM e) { _overrideOrientation = e; }
CDSC_ORIENTATION_ENUM overrideOrientation() const { return _overrideOrientation; }
- void restoreOverridePageMedia() { _overridePageMedia = QString::null; }
- void setOverridePageMedia(const QString& newMedia) { _overridePageMedia = newMedia; }
- const QString& overridePageMedia() const { return _overridePageMedia; }
+ void restoreOverridePageMedia() { _overridePageMedia = TQString::null; }
+ void setOverridePageMedia(const TQString& newMedia) { _overridePageMedia = newMedia; }
+ const TQString& overridePageMedia() const { return _overridePageMedia; }
/**
* The current page.
@@ -76,26 +76,26 @@ class KDE_EXPORT DisplayOptions
*
* \sa fromString
*/
- static QString toString( const DisplayOptions& );
+ static TQString toString( const DisplayOptions& );
/**
* Reads the display options from a string formatted by toString.
*
* \return true if the convertion succeeded.
*/
- static bool fromString( DisplayOptions&, const QString& );
+ static bool fromString( DisplayOptions&, const TQString& );
/**
* Returns a list of values that normally we can get through
* zoomIn() & zoomOut()
*/
- static QValueList<double> normalMagnificationValues();
+ static TQValueList<double> normalMagnificationValues();
private:
unsigned closestIndex() const;
CDSC_ORIENTATION_ENUM _overrideOrientation;
- QString _overridePageMedia;
+ TQString _overridePageMedia;
int _page;
double _magnification;
};
@@ -103,7 +103,7 @@ class KDE_EXPORT DisplayOptions
inline
DisplayOptions::DisplayOptions()
:_overrideOrientation( CDSC_ORIENT_UNKNOWN ),
- _overridePageMedia ( QString::null ),
+ _overridePageMedia ( TQString::null ),
_page( 0 )
{
setMagnification( 1.0 );
diff --git a/kghostview/dscparse_adapter.cpp b/kghostview/dscparse_adapter.cpp
index 4db450bb..b04e89bc 100644
--- a/kghostview/dscparse_adapter.cpp
+++ b/kghostview/dscparse_adapter.cpp
@@ -67,7 +67,7 @@ int KDSCBBOX::ury() const { return _ury; }
int KDSCBBOX::width() const { return _urx - _llx; }
int KDSCBBOX::height() const { return _ury - _lly; }
-QSize KDSCBBOX::size() const { return QSize( width(), height() ); }
+TQSize KDSCBBOX::size() const { return TQSize( width(), height() ); }
ostream& operator << ( ostream& os, const KDSCBBOX& source )
{
@@ -78,7 +78,7 @@ ostream& operator << ( ostream& os, const KDSCBBOX& source )
/*-- KDSCError implementation ----------------------------------------------*/
-KDSCError::KDSCError( Type type, Severity severity, const QCString& line,
+KDSCError::KDSCError( Type type, Severity severity, const TQCString& line,
unsigned int lineNumber ) :
_type( type ),
_severity( severity ),
@@ -96,7 +96,7 @@ KDSCError::Severity KDSCError::severity() const
return _severity;
}
-QCString KDSCError::line() const
+TQCString KDSCError::line() const
{
return _line;
}
@@ -132,9 +132,9 @@ KDSC::~KDSC()
delete _scanHandler;
}
-QString KDSC::dsc_version() const
+TQString KDSC::dsc_version() const
{
- return QString( _cdsc->dsc_version );
+ return TQString( _cdsc->dsc_version );
}
bool KDSC::dsc() const
@@ -298,24 +298,24 @@ auto_ptr<KDSCBBOX> KDSC::page_bbox() const
return auto_ptr<KDSCBBOX>( new KDSCBBOX( *_cdsc->page_bbox ) );
}
-QString KDSC::dsc_title() const
+TQString KDSC::dsc_title() const
{
- return QString( _cdsc->dsc_title );
+ return TQString( _cdsc->dsc_title );
}
-QString KDSC::dsc_creator() const
+TQString KDSC::dsc_creator() const
{
- return QString( _cdsc->dsc_creator );
+ return TQString( _cdsc->dsc_creator );
}
-QString KDSC::dsc_date() const
+TQString KDSC::dsc_date() const
{
- return QString( _cdsc->dsc_date );
+ return TQString( _cdsc->dsc_date );
}
-QString KDSC::dsc_for() const
+TQString KDSC::dsc_for() const
{
- return QString( _cdsc->dsc_for );
+ return TQString( _cdsc->dsc_for );
}
bool KDSC::scanData( char* buffer, unsigned int count )
@@ -378,7 +378,7 @@ int KDSC::errorFunction( void* caller_data, CDSC* dsc,
KDSCError error(
static_cast< KDSCError::Type >( explanation ),
static_cast< KDSCError::Severity >( dsc->severity[explanation] ),
- QCString( line, line_len + 1 ),
+ TQCString( line, line_len + 1 ),
dsc->line_count
);
diff --git a/kghostview/dscparse_adapter.h b/kghostview/dscparse_adapter.h
index 9e41f3c2..c5c1cbf9 100644
--- a/kghostview/dscparse_adapter.h
+++ b/kghostview/dscparse_adapter.h
@@ -23,8 +23,8 @@
#include <map>
#include <memory>
-#include <qsize.h>
-#include <qstring.h>
+#include <tqsize.h>
+#include <tqstring.h>
#include "dscparse.h"
@@ -94,7 +94,7 @@ public:
int width() const;
int height() const;
- QSize size() const;
+ TQSize size() const;
private:
int _llx, _lly, _urx, _ury;
@@ -133,18 +133,18 @@ public:
Error = CDSC_ERROR_ERROR
};
- KDSCError( Type, Severity, const QCString& line,
+ KDSCError( Type, Severity, const TQCString& line,
unsigned int lineNumber );
Type type() const;
Severity severity() const;
- QCString line() const;
+ TQCString line() const;
unsigned int lineNumber() const;
private:
Type _type;
Severity _severity;
- QCString _line;
+ TQCString _line;
unsigned int _lineNumber;
};
@@ -266,7 +266,7 @@ public:
~KDSC();
/*--- Adapter for CDSC ------------------------------------------------*/
- QString dsc_version() const;
+ TQString dsc_version() const;
bool dsc() const;
bool ctrld() const;
@@ -314,10 +314,10 @@ public:
// CDSCDOSEPS *doseps;
- QString dsc_title() const;
- QString dsc_creator() const;
- QString dsc_date() const;
- QString dsc_for() const;
+ TQString dsc_title() const;
+ TQString dsc_creator() const;
+ TQString dsc_date() const;
+ TQString dsc_for() const;
// unsigned int max_error
diff --git a/kghostview/fullscreenfilter.cpp b/kghostview/fullscreenfilter.cpp
index ec208169..724031f4 100644
--- a/kghostview/fullscreenfilter.cpp
+++ b/kghostview/fullscreenfilter.cpp
@@ -23,20 +23,20 @@
#include "kgvpageview.h"
FullScreenFilter::FullScreenFilter( KGVShell& parent )
- :QObject( &parent, "full-screen-filter" ),
+ :TQObject( &parent, "full-screen-filter" ),
parent( parent )
{
}
-bool FullScreenFilter::eventFilter( QObject* /*object*/, QEvent* ev) {
- if ( QKeyEvent* keyevent = dynamic_cast<QKeyEvent*>( ev ) ) {
+bool FullScreenFilter::eventFilter( TQObject* /*object*/, TQEvent* ev) {
+ if ( TQKeyEvent* keyevent = dynamic_cast<TQKeyEvent*>( ev ) ) {
if ( keyevent->key() == Key_Escape ) {
parent.setFullScreen( false );
keyevent->accept();
return true;
}
}
- if ( QMouseEvent* mouseevent = dynamic_cast<QMouseEvent*>( ev ) ) {
+ if ( TQMouseEvent* mouseevent = dynamic_cast<TQMouseEvent*>( ev ) ) {
if ( mouseevent->stateAfter() & mouseevent->button() & LeftButton ) {
// if ( The whole image is visible at once )
if ( parent.m_gvpart->pageView()->contentsHeight() <= parent.m_gvpart->widget()->height() &&
diff --git a/kghostview/fullscreenfilter.h b/kghostview/fullscreenfilter.h
index e60090a1..7d5fa489 100644
--- a/kghostview/fullscreenfilter.h
+++ b/kghostview/fullscreenfilter.h
@@ -18,7 +18,7 @@
#ifndef DB_FULLSCREENFILTER_H1055977622_INCLUDE_GUARD_
#define DB_FULLSCREENFILTER_H1055977622_INCLUDE_GUARD_
-#include <qobject.h>
+#include <tqobject.h>
class KGVShell;
/* @class FullScreenFilter
@@ -26,7 +26,7 @@ class KGVShell;
* @short This class is to have in one place the special event all the special
* key/mouse handling related to full-screen mode without bloating further KGVPart
*/
-class FullScreenFilter : public QObject {
+class FullScreenFilter : public TQObject {
Q_OBJECT
public:
FullScreenFilter( KGVShell& parent );
@@ -34,7 +34,7 @@ class FullScreenFilter : public QObject {
/**
* @reimplemented
*/
- virtual bool eventFilter( QObject*, QEvent* );
+ virtual bool eventFilter( TQObject*, TQEvent* );
private:
KGVShell& parent;
};
diff --git a/kghostview/gssettingswidget.ui.h b/kghostview/gssettingswidget.ui.h
index 87937c76..fb2209c7 100644
--- a/kghostview/gssettingswidget.ui.h
+++ b/kghostview/gssettingswidget.ui.h
@@ -7,7 +7,7 @@
** place of a destructor.
*****************************************************************************/
-void GSSettingsWidget::setDetectedVersion( QString v)
+void GSSettingsWidget::setDetectedVersion( TQString v)
{
mDetectedVersion->setText(mDetectedVersion->text().arg( v ));
}
diff --git a/kghostview/infodialog.cpp b/kghostview/infodialog.cpp
index b9cc8a91..e429d712 100644
--- a/kghostview/infodialog.cpp
+++ b/kghostview/infodialog.cpp
@@ -17,11 +17,11 @@
*
*/
-#include <qframe.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qdatetime.h>
-#include <qregexp.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <klocale.h>
@@ -32,28 +32,28 @@
//
// Using KDialogBase in message box mode (gives centered action button)
//
-InfoDialog::InfoDialog( QWidget *parent, const char *name, bool modal )
+InfoDialog::InfoDialog( TQWidget *parent, const char *name, bool modal )
:KDialogBase( i18n("Document Information"), Yes, Yes, Yes, parent,
name, modal, true, KStdGuiItem::ok() )
{
- QFrame *page = makeMainWidget();
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
- QGridLayout *glay = new QGridLayout( topLayout, 3, 2 );
+ TQFrame *page = makeMainWidget();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
+ TQGridLayout *glay = new TQGridLayout( topLayout, 3, 2 );
glay->setColStretch(1,1);
- QLabel *label = new QLabel( i18n("File name:" ), page );
+ TQLabel *label = new TQLabel( i18n("File name:" ), page );
glay->addWidget( label, 0, 0, AlignRight|AlignVCenter );
- mFileLabel = new QLabel( page );
+ mFileLabel = new TQLabel( page );
glay->addWidget( mFileLabel, 0, 1 );
- label = new QLabel( i18n("Document title:" ), page );
+ label = new TQLabel( i18n("Document title:" ), page );
glay->addWidget( label, 1, 0, AlignRight|AlignVCenter );
- mTitleLabel = new QLabel( page );
+ mTitleLabel = new TQLabel( page );
glay->addWidget( mTitleLabel, 1, 1 );
- label = new QLabel( i18n("Publication date:" ), page );
+ label = new TQLabel( i18n("Publication date:" ), page );
glay->addWidget( label, 2, 0, AlignRight|AlignVCenter );
- mDateLabel = new QLabel( page );
+ mDateLabel = new TQLabel( page );
glay->addWidget( mDateLabel, 2, 1 );
topLayout->addStretch(1);
@@ -81,17 +81,17 @@ namespace {
* For PS files, there is no such standard and dates appear
* in any format they desire.
*/
- QString parseDate( const QString& dateStr ) {
+ TQString parseDate( const TQString& dateStr ) {
kdDebug( 4500 ) << "parseDate( \"" << dateStr << "\" )" << endl;
- QRegExp exp( "\\((?:D:)?"
+ TQRegExp exp( "\\((?:D:)?"
"(\\d\\d\\d\\d)"
"(\\d\\d)?(\\d\\d)?(\\d\\d)?.*"
"(\\d\\d)?(\\d\\d)?.*"
"(?:(\\+|\\-)(\\d\\d)\'?(\\d\\d)\'?)?"
"\\)" );
if ( exp.exactMatch( dateStr ) ) {
- QStringList list = exp.capturedTexts();
- QStringList::iterator iter = list.begin();
+ TQStringList list = exp.capturedTexts();
+ TQStringList::iterator iter = list.begin();
++iter; // whole string!
#undef GET
#define GET( variable, def ) \
@@ -108,18 +108,18 @@ namespace {
GET( sec, 0 )
#undef GET
// FIXME: this ignores the timezone
- QDate date( year, month, day );
- QTime time( hour, min, sec );
+ TQDate date( year, month, day );
+ TQTime time( hour, min, sec );
KLocale locale( "kghostview" );
- return locale.formatDateTime( QDateTime( date, time ) );
+ return locale.formatDateTime( TQDateTime( date, time ) );
}
kdDebug( 4500 ) << "parseDate failed." << endl;
return dateStr;
}
}
-void InfoDialog::setup( const QString &fileName, const QString &documentTitle,
- const QString &publicationDate )
+void InfoDialog::setup( const TQString &fileName, const TQString &documentTitle,
+ const TQString &publicationDate )
{
mFileLabel->setText( fileName );
mTitleLabel->setText( documentTitle );
diff --git a/kghostview/infodialog.h b/kghostview/infodialog.h
index 1c857fc1..689790d0 100644
--- a/kghostview/infodialog.h
+++ b/kghostview/infodialog.h
@@ -20,7 +20,7 @@
#ifndef _INFO_DIALOG_H_
#define _INFO_DIALOG_H_
-class QLabel;
+class TQLabel;
#include <kdialogbase.h>
@@ -29,14 +29,14 @@ class InfoDialog : public KDialogBase
Q_OBJECT
public:
- InfoDialog( QWidget *parent=0, const char *name=0, bool modal=true );
- void setup( const QString &fileName, const QString &documentTitle,
- const QString &publicationDate );
+ InfoDialog( TQWidget *parent=0, const char *name=0, bool modal=true );
+ void setup( const TQString &fileName, const TQString &documentTitle,
+ const TQString &publicationDate );
private:
- QLabel *mFileLabel;
- QLabel *mTitleLabel;
- QLabel *mDateLabel;
+ TQLabel *mFileLabel;
+ TQLabel *mTitleLabel;
+ TQLabel *mDateLabel;
};
#endif
diff --git a/kghostview/kdscerrordialog.cpp b/kghostview/kdscerrordialog.cpp
index 601f5fc5..61245ed5 100644
--- a/kghostview/kdscerrordialog.cpp
+++ b/kghostview/kdscerrordialog.cpp
@@ -16,9 +16,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtextedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtextedit.h>
#include <kdebug.h>
#include <klocale.h>
@@ -46,26 +46,26 @@ KDSCErrorHandler::Response KDSCErrorThreshold::error( const KDSCError& err )
return Cancel;
}
-KDSCErrorDialog::KDSCErrorDialog( QWidget* parent ) :
+KDSCErrorDialog::KDSCErrorDialog( TQWidget* parent ) :
KDialog( parent, "dscerrordialog", true ),
_response( Ok )
{
- QVBoxLayout* vbox = new QVBoxLayout( this, marginHint(), spacingHint() );
+ TQVBoxLayout* vbox = new TQVBoxLayout( this, marginHint(), spacingHint() );
- _lineNumberLabel = new QLabel( this );
+ _lineNumberLabel = new TQLabel( this );
vbox->addWidget( _lineNumberLabel );
- _lineLabel = new QTextEdit( this );
+ _lineLabel = new TQTextEdit( this );
_lineLabel->setReadOnly( true );
vbox->addWidget( _lineLabel );
- _descriptionLabel = new QLabel( this );
+ _descriptionLabel = new TQLabel( this );
vbox->addWidget( _descriptionLabel );
KSeparator* sep = new KSeparator( KSeparator::HLine, this );
vbox->addWidget( sep );
- QHBoxLayout* hbox = new QHBoxLayout( vbox );
+ TQHBoxLayout* hbox = new TQHBoxLayout( vbox );
hbox->addStretch();
@@ -73,13 +73,13 @@ KDSCErrorDialog::KDSCErrorDialog( QWidget* parent ) :
hbox->addWidget( _okButton );
_cancelButton = new KPushButton( KStdGuiItem::cancel(), this );
hbox->addWidget( _cancelButton );
- _ignoreAllButton = new QPushButton( i18n("Ignore All"), this );
+ _ignoreAllButton = new TQPushButton( i18n("Ignore All"), this );
hbox->addWidget( _ignoreAllButton );
- connect( _okButton, SIGNAL( clicked() ), this, SLOT( slotOk() ) );
- connect( _cancelButton, SIGNAL( clicked() ), this, SLOT( slotCancel() ) );
- connect( _ignoreAllButton, SIGNAL( clicked() ),
- this, SLOT( slotIgnoreAll() ) );
+ connect( _okButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOk() ) );
+ connect( _cancelButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotCancel() ) );
+ connect( _ignoreAllButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotIgnoreAll() ) );
}
KDSCErrorHandler::Response KDSCErrorDialog::error( const KDSCError& err )
@@ -108,7 +108,7 @@ KDSCErrorHandler::Response KDSCErrorDialog::error( const KDSCError& err )
return _response;
}
-QString KDSCErrorDialog::description( KDSCError::Type type ) const
+TQString KDSCErrorDialog::description( KDSCError::Type type ) const
{
switch( type )
{
diff --git a/kghostview/kdscerrordialog.h b/kghostview/kdscerrordialog.h
index 0aee24d2..67d3dd4a 100644
--- a/kghostview/kdscerrordialog.h
+++ b/kghostview/kdscerrordialog.h
@@ -23,9 +23,9 @@
#include "dscparse_adapter.h"
-class QLabel;
-class QPushButton;
-class QTextEdit;
+class TQLabel;
+class TQPushButton;
+class TQTextEdit;
class KDSCErrorThreshold : public KDSCErrorHandler
{
@@ -44,12 +44,12 @@ class KDSCErrorDialog : public KDialog, public KDSCErrorHandler
Q_OBJECT
public:
- KDSCErrorDialog( QWidget* parent = 0 );
+ KDSCErrorDialog( TQWidget* parent = 0 );
Response error( const KDSCError& );
protected:
- QString description( KDSCError::Type ) const;
+ TQString description( KDSCError::Type ) const;
protected slots:
void slotOk();
@@ -57,13 +57,13 @@ protected slots:
void slotIgnoreAll();
private:
- QLabel* _lineNumberLabel;
- QTextEdit* _lineLabel;
- QLabel* _descriptionLabel;
+ TQLabel* _lineNumberLabel;
+ TQTextEdit* _lineLabel;
+ TQLabel* _descriptionLabel;
- QPushButton* _okButton;
- QPushButton* _cancelButton;
- QPushButton* _ignoreAllButton;
+ TQPushButton* _okButton;
+ TQPushButton* _cancelButton;
+ TQPushButton* _ignoreAllButton;
Response _response;
};
diff --git a/kghostview/kgv.h b/kghostview/kgv.h
index db7a1679..669d94f1 100644
--- a/kghostview/kgv.h
+++ b/kghostview/kgv.h
@@ -1,12 +1,12 @@
#ifndef KGV_H
#define KGV_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
namespace KGV
{
-typedef QValueList<int> PageList;
+typedef TQValueList<int> PageList;
}
diff --git a/kghostview/kgv_miniwidget.cpp b/kghostview/kgv_miniwidget.cpp
index 33045b17..a6acdd53 100644
--- a/kghostview/kgv_miniwidget.cpp
+++ b/kghostview/kgv_miniwidget.cpp
@@ -18,7 +18,7 @@
#include <math.h>
-#include <qlistbox.h>
+#include <tqlistbox.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -32,8 +32,8 @@
#if KDE_VERSION >= KDE_MAKE_VERSION(3,1,90)
#include <kinputdialog.h>
#else
- #include <qvalidator.h>
- #include <qwidget.h>
+ #include <tqvalidator.h>
+ #include <tqwidget.h>
#include <klineeditdlg.h>
#endif
@@ -54,7 +54,7 @@
using namespace KGV;
KGVMiniWidget::KGVMiniWidget( KGVPart* part, const char* name ) :
- QObject( part, name ),
+ TQObject( part, name ),
_document( 0 ),
_part( part ),
_psWidget( 0 ),
@@ -63,32 +63,32 @@ KGVMiniWidget::KGVMiniWidget( KGVPart* part, const char* name ) :
{
KLocale locale( "kghostview" );
_fallBackPageMedia = pageSizeToString(
- static_cast< QPrinter::PageSize >( locale.pageSize() ) );
+ static_cast< TQPrinter::PageSize >( locale.pageSize() ) );
_thumbnailService = new ThumbnailService( this );
- connect( this, SIGNAL( newPageShown( int ) ),
- SLOT( updateStatusBarText( int ) ) );
+ connect( this, TQT_SIGNAL( newPageShown( int ) ),
+ TQT_SLOT( updateStatusBarText( int ) ) );
}
void KGVMiniWidget::setDocument( KGVDocument* document )
{
_document = document;
if( _document )
- connect( _document, SIGNAL( completed() ),
- SLOT( slotDocumentOpened() ) );
+ connect( _document, TQT_SIGNAL( completed() ),
+ TQT_SLOT( slotDocumentOpened() ) );
}
-QString KGVMiniWidget::pageSizeToString( QPrinter::PageSize pageSize )
+TQString KGVMiniWidget::pageSizeToString( TQPrinter::PageSize pageSize )
{
switch( pageSize )
{
- case QPrinter::A3: return "A3";
- case QPrinter::A4: return "A4";
- case QPrinter::A5: return "A5";
- case QPrinter::B4: return "B4";
- case QPrinter::Ledger: return "Ledger";
- case QPrinter::Legal: return "Legal";
- case QPrinter::Letter: return "Letter";
+ case TQPrinter::A3: return "A3";
+ case TQPrinter::A4: return "A4";
+ case TQPrinter::A5: return "A5";
+ case TQPrinter::B4: return "B4";
+ case TQPrinter::Ledger: return "Ledger";
+ case TQPrinter::Legal: return "Legal";
+ case TQPrinter::Letter: return "Letter";
default: return "Unknown";
}
}
@@ -109,8 +109,8 @@ void KGVMiniWidget::setPSWidget( KPSWidget* psWidget )
{
_psWidget = psWidget;
// setMagnification( _magnification );
- connect( _psWidget, SIGNAL( newPageImage( QPixmap ) ),
- this, SLOT( sendPage() ) );
+ connect( _psWidget, TQT_SIGNAL( newPageImage( TQPixmap ) ),
+ this, TQT_SLOT( sendPage() ) );
}
void KGVMiniWidget::goToPage()
@@ -122,9 +122,9 @@ void KGVMiniWidget::goToPage()
1, dsc()->page_count(), 1, 10, &ok, _part->widget());
if (ok) goToPage( num-1 );
#else
- QString num;
+ TQString num;
bool b = false;
- num = KLineEditDlg::getText(i18n("Go to Page"), i18n("Page:"), QString::null, &b, _part->widget(), new QIntValidator(1, dsc()->page_count(), this));
+ num = KLineEditDlg::getText(i18n("Go to Page"), i18n("Page:"), TQString::null, &b, _part->widget(), new TQIntValidator(1, dsc()->page_count(), this));
if (b) goToPage( num.toInt() - 1 );
#endif
}
@@ -172,29 +172,29 @@ bool KGVMiniWidget::atMinZoom() const
void KGVMiniWidget::fitWidth( unsigned int width )
{
if ( (orientation() == CDSC_LANDSCAPE) || (orientation() == CDSC_SEASCAPE) )
- setMagnification( ( (double)width / QPaintDevice::x11AppDpiY()) /
+ setMagnification( ( (double)width / TQPaintDevice::x11AppDpiY()) /
( (double)boundingBox().height() / 72) );
else // default
- setMagnification( ( (double)width / QPaintDevice::x11AppDpiX() ) /
+ setMagnification( ( (double)width / TQPaintDevice::x11AppDpiX() ) /
( (double)boundingBox().width() / 72) );
}
void KGVMiniWidget::fitHeight( unsigned int height )
{
if ( (orientation() == CDSC_LANDSCAPE) || (orientation() == CDSC_SEASCAPE) )
- setMagnification( ( (double)height / QPaintDevice::x11AppDpiY()) /
+ setMagnification( ( (double)height / TQPaintDevice::x11AppDpiY()) /
( (double)boundingBox().width() / 72) );
else //default
- setMagnification( ( (double)height / QPaintDevice::x11AppDpiY()) /
+ setMagnification( ( (double)height / TQPaintDevice::x11AppDpiY()) /
( (double)boundingBox().height() / 72) );
}
void KGVMiniWidget::fitWidthHeight( unsigned int w, unsigned int h )
{
double magnification = std::min<double>(
- ( ( double )h / QPaintDevice::x11AppDpiY() ) /
+ ( ( double )h / TQPaintDevice::x11AppDpiY() ) /
( ( double )boundingBox().height() / 72.0 ),
- ( ( double )w / QPaintDevice::x11AppDpiX() ) /
+ ( ( double )w / TQPaintDevice::x11AppDpiX() ) /
( ( double )boundingBox().width() / 72.0 ) );
setMagnification( magnification );
}
@@ -310,25 +310,25 @@ void KGVMiniWidget::restoreOverridePageMedia()
showPage( _options.page() );
}
-void KGVMiniWidget::setOverridePageMedia( const QString& mediaName )
+void KGVMiniWidget::setOverridePageMedia( const TQString& mediaName )
{
_options.setOverridePageMedia( mediaName );
showPage( _options.page() );
}
-QString KGVMiniWidget::pageMedia() const
+TQString KGVMiniWidget::pageMedia() const
{
if( !_options.overridePageMedia().isNull() )
return _options.overridePageMedia();
else if( dsc()->page_media() != 0 )
- return QString( dsc()->page_media()->name );
+ return TQString( dsc()->page_media()->name );
else if( dsc()->bbox().get() != 0 )
- return QString( "BoundingBox" );
+ return TQString( "BoundingBox" );
else
return _fallBackPageMedia;
}
-QString KGVMiniWidget::pageMedia( int pagenumber ) const
+TQString KGVMiniWidget::pageMedia( int pagenumber ) const
{
kdDebug( 4500 ) << "KGVMiniWidget::pageMedia( " << pagenumber << " )" << endl;
if ( !dsc() ) return pageMedia();
@@ -336,33 +336,33 @@ QString KGVMiniWidget::pageMedia( int pagenumber ) const
if( !_options.overridePageMedia().isNull() )
return _options.overridePageMedia();
else if( dsc()->page()[ pagenumber ].media != 0 )
- return QString( dsc()->page()[ pagenumber ].media->name );
+ return TQString( dsc()->page()[ pagenumber ].media->name );
else if( dsc()->page_media() != 0 )
- return QString( dsc()->page_media()->name );
+ return TQString( dsc()->page_media()->name );
else if( dsc()->bbox().get() != 0 )
- return QString( "BoundingBox" );
+ return TQString( "BoundingBox" );
else
return _fallBackPageMedia;
}
KDSCBBOX KGVMiniWidget::boundingBox() const
{
- QString currentMedia = pageMedia();
+ TQString currentMedia = pageMedia();
if( currentMedia == "BoundingBox" )
return KDSCBBOX( *dsc()->bbox().get() );
else {
- QSize size = document()->computePageSize( currentMedia );
+ TQSize size = document()->computePageSize( currentMedia );
return KDSCBBOX( 0, 0, size.width(), size.height() );
}
}
KDSCBBOX KGVMiniWidget::boundingBox( int pageNo ) const
{
- QString currentMedia = pageMedia( pageNo );
+ TQString currentMedia = pageMedia( pageNo );
if( currentMedia == "BoundingBox" )
return KDSCBBOX( *dsc()->bbox().get() );
else {
- QSize size = document()->computePageSize( currentMedia );
+ TQSize size = document()->computePageSize( currentMedia );
return KDSCBBOX( 0, 0, size.width(), size.height() );
}
}
@@ -384,7 +384,7 @@ void KGVMiniWidget::showPage( int pagenumber )
kdDebug(4500) << "KGVMiniWidget::showPage( " << pagenumber << " )" << endl;
- static_cast< QWidget* >( _psWidget->parent() )->show();
+ static_cast< TQWidget* >( _psWidget->parent() )->show();
_psWidget->setFileName(_document->fileName(), dsc()->isStructured() );
_psWidget->clear();
@@ -452,8 +452,8 @@ void KGVMiniWidget::showPage( int pagenumber )
}
}
// Do this after ajusting pagenumber above
- _thumbnailService->cancelRequests( -1 , _part->scrollBox(), SLOT( setThumbnail( QPixmap ) ) );
- _thumbnailService->delayedGetThumbnail( pagenumber, _part->scrollBox(), SLOT( setThumbnail( QPixmap ) ), true );
+ _thumbnailService->cancelRequests( -1 , _part->scrollBox(), TQT_SLOT( setThumbnail( TQPixmap ) ) );
+ _thumbnailService->delayedGetThumbnail( pagenumber, _part->scrollBox(), TQT_SLOT( setThumbnail( TQPixmap ) ), true );
emit newPageShown( pagenumber );
}
@@ -479,7 +479,7 @@ void KGVMiniWidget::updateStatusBarText( int pageNumber )
if( dsc()->isStructured() )
{
- QString text;
+ TQString text;
if( pageNumber == -1 )
text = i18n( "Page 1" );
@@ -520,10 +520,10 @@ void KGVMiniWidget::buildTOC()
}
// finally set marked list
- QString s;
+ TQString s;
for( unsigned i = 0; i < dsc()->page_count(); ++i ) {
const char * label = dsc()->page()[ i ].label;
- QString tip = QString::fromLocal8Bit( label ? label : "" );
+ TQString tip = TQString::fromLocal8Bit( label ? label : "" );
if( !_usePageLabels )
s.setNum( i + 1 );
@@ -534,7 +534,7 @@ void KGVMiniWidget::buildTOC()
}
}
else {
- marklist->insertItem( QString::fromLatin1( "1" ), 0 );
+ marklist->insertItem( TQString::fromLatin1( "1" ), 0 );
}
}
diff --git a/kghostview/kgv_miniwidget.h b/kghostview/kgv_miniwidget.h
index 3c445d14..a518657b 100644
--- a/kghostview/kgv_miniwidget.h
+++ b/kghostview/kgv_miniwidget.h
@@ -19,7 +19,7 @@
#ifndef __KGV_MINIWIDGET_H
#define __KGV_MINIWIDGET_H
-#include <qprinter.h>
+#include <tqprinter.h>
#include "dscparse_adapter.h"
#include "kgv.h"
@@ -28,7 +28,7 @@
#include "thumbnailservice.h"
-#include <qobject.h>
+#include <tqobject.h>
class InfoDialog;
class KGVPart;
@@ -44,7 +44,7 @@ public:
void setDocument( KGVDocument* document );
- static QString pageSizeToString( QPrinter::PageSize );
+ static TQString pageSizeToString( TQPrinter::PageSize );
void setPSWidget( KPSWidget* psWidget );
@@ -55,7 +55,7 @@ public:
void setOverrideOrientation( CDSC_ORIENTATION_ENUM );
void restoreOverridePageMedia();
- void setOverridePageMedia( const QString& mediaName );
+ void setOverridePageMedia( const TQString& mediaName );
ThumbnailService* getThumbnailService() { return _thumbnailService; }
@@ -113,9 +113,9 @@ signals:
*/
void newPageShown( int pageNumber ); // Should this one be under DOCUMENT?
- void newPageImage( QPixmap image );
+ void newPageImage( TQPixmap image );
- void setStatusBarText( const QString& );
+ void setStatusBarText( const TQString& );
protected:
void showPage( int pageNumber );
@@ -133,8 +133,8 @@ private:
CDSC_ORIENTATION_ENUM orientation() const;
CDSC_ORIENTATION_ENUM orientation( int pageNo ) const;
- QString pageMedia() const;
- QString pageMedia( int pageNo ) const;
+ TQString pageMedia() const;
+ TQString pageMedia( int pageNo ) const;
KDSCBBOX boundingBox() const;
KDSCBBOX boundingBox( int pageNo ) const;
@@ -165,7 +165,7 @@ private:
int _visiblePage;
DisplayOptions _options;
- QString _fallBackPageMedia;
+ TQString _fallBackPageMedia;
};
#endif
diff --git a/kghostview/kgv_view.cpp b/kghostview/kgv_view.cpp
index 3c25ef41..ed08e8e4 100644
--- a/kghostview/kgv_view.cpp
+++ b/kghostview/kgv_view.cpp
@@ -16,12 +16,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qframe.h>
-#include <qtable.h>
-#include <qlayout.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqframe.h>
+#include <tqtable.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
#include <kaction.h>
#include <kapplication.h>
@@ -74,14 +74,14 @@ namespace KGV {
}
}
-KGVPart::KGVPart( QWidget* parentWidget, const char*,
- QObject* parent, const char* name,
- const QStringList &args ) :
+KGVPart::KGVPart( TQWidget* parentWidget, const char*,
+ TQObject* parent, const char* name,
+ const TQStringList &args ) :
KParts::ReadOnlyPart( parent, name ),
- _fitTimer( new QTimer( this ) ),
+ _fitTimer( new TQTimer( this ) ),
_job( 0 ),
_mimetypeScanner( 0 ),
- _dirtyHandler( new QTimer( this ) ),
+ _dirtyHandler( new TQTimer( this ) ),
_isGuiInitialized( false ),
_isFileDirty( false ),
_stickyOptions( false ),
@@ -94,31 +94,31 @@ KGVPart::KGVPart( QWidget* parentWidget, const char*,
setProgressInfoEnabled( !args.contains( "Browser/View") );
_document = new KGVDocument( this );
- connect( _document, SIGNAL( fileChangeFailed() ),
- this, SLOT( slotCancelWatch() ) );
- connect( _document, SIGNAL( completed() ),
- this, SLOT( slotOpenFileCompleted() ) );
- connect( _document, SIGNAL( canceled( const QString& ) ),
- this, SIGNAL( canceled( const QString& ) ) );
+ connect( _document, TQT_SIGNAL( fileChangeFailed() ),
+ this, TQT_SLOT( slotCancelWatch() ) );
+ connect( _document, TQT_SIGNAL( completed() ),
+ this, TQT_SLOT( slotOpenFileCompleted() ) );
+ connect( _document, TQT_SIGNAL( canceled( const TQString& ) ),
+ this, TQT_SIGNAL( canceled( const TQString& ) ) );
_fileWatcher = new KDirWatch( this );
- connect( _fileWatcher, SIGNAL( dirty( const QString& ) ),
- this, SLOT( slotFileDirty( const QString& ) ) );
- connect( _dirtyHandler, SIGNAL( timeout() ),
- this, SLOT( slotDoFileDirty() ) );
+ connect( _fileWatcher, TQT_SIGNAL( dirty( const TQString& ) ),
+ this, TQT_SLOT( slotFileDirty( const TQString& ) ) );
+ connect( _dirtyHandler, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotDoFileDirty() ) );
// Setup main widget
_mainWidget = new KGVMainWidget( parentWidget );
- _mainWidget->setFocusPolicy( QWidget::StrongFocus );
+ _mainWidget->setFocusPolicy( TQWidget::StrongFocus );
_mainWidget->installEventFilter( this );
_mainWidget->setAcceptDrops( true );
- connect( _mainWidget, SIGNAL( spacePressed() ),
- this, SLOT( slotReadDown() ) );
- connect( _mainWidget, SIGNAL( urlDropped( const KURL& ) ),
- this, SLOT( openURL( const KURL& ) ) );
+ connect( _mainWidget, TQT_SIGNAL( spacePressed() ),
+ this, TQT_SLOT( slotReadDown() ) );
+ connect( _mainWidget, TQT_SIGNAL( urlDropped( const KURL& ) ),
+ this, TQT_SLOT( openURL( const KURL& ) ) );
- QHBoxLayout* hlay = new QHBoxLayout( _mainWidget, 0, 0 );
- QVBoxLayout* vlay = new QVBoxLayout( hlay );
+ TQHBoxLayout* hlay = new TQHBoxLayout( _mainWidget, 0, 0 );
+ TQVBoxLayout* vlay = new TQVBoxLayout( hlay );
const int PAGELIST_WIDTH = 75;
@@ -127,14 +127,14 @@ KGVPart::KGVPart( QWidget* parentWidget, const char*,
_scrollBox->setMinimumHeight( PAGELIST_WIDTH );
vlay->addWidget( _scrollBox );
- _divider = new QFrame( _mainWidget, "divider" );
- _divider->setFrameStyle( QFrame::Panel | QFrame::Raised );
+ _divider = new TQFrame( _mainWidget, "divider" );
+ _divider->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
_divider->setLineWidth( 1 );
_divider->setMinimumWidth( 3 );
hlay->addWidget( _divider );
_pageView = new KGVPageView( _mainWidget, "pageview" );
- _pageView->viewport()->setBackgroundMode( QWidget::PaletteMid );
+ _pageView->viewport()->setBackgroundMode( TQWidget::PaletteMid );
hlay->addWidget( _pageView, 1 );
_mainWidget->setFocusProxy( _pageView );
setWidget( _mainWidget );
@@ -146,17 +146,17 @@ KGVPart::KGVPart( QWidget* parentWidget, const char*,
_psWidget = new KPSWidget( _pageDecorator );
_psWidget->readSettings();
_pageView->setPage( _pageDecorator );
- connect( _psWidget, SIGNAL( output( char*, int ) ),
- this, SLOT( slotGhostscriptOutput( char*, int ) ) );
+ connect( _psWidget, TQT_SIGNAL( output( char*, int ) ),
+ this, TQT_SLOT( slotGhostscriptOutput( char*, int ) ) );
- connect( _psWidget, SIGNAL( ghostscriptError( const QString& ) ),
- this, SLOT( slotGhostscriptError( const QString& ) ) );
+ connect( _psWidget, TQT_SIGNAL( ghostscriptError( const TQString& ) ),
+ this, TQT_SLOT( slotGhostscriptError( const TQString& ) ) );
_logWindow = new LogWindow( i18n( "Ghostscript Messages" ), _mainWidget, "logwindow" );
_showLogWindow = false;
- connect( _logWindow, SIGNAL( configureGS() ), SLOT( slotConfigure() ) );
+ connect( _logWindow, TQT_SIGNAL( configureGS() ), TQT_SLOT( slotConfigure() ) );
_docManager = new KGVMiniWidget( this );
_docManager->setPSWidget( _psWidget );
@@ -165,57 +165,57 @@ KGVPart::KGVPart( QWidget* parentWidget, const char*,
_markList = new MarkList( _mainWidget, "marklist", _docManager );
_markList->setFixedWidth( PAGELIST_WIDTH );
vlay->addWidget( _markList, 1 );
- connect( _markList, SIGNAL( contextMenuRequested ( int, int, const QPoint& ) ),
- this, SLOT( showPopup( int, int, const QPoint& ) ) );
-
-
- connect( _markList, SIGNAL( selected( int ) ),
- _docManager, SLOT( goToPage( int ) ) );
- connect( _docManager, SIGNAL( newPageShown( int ) ),
- _markList, SLOT( select( int ) ) );
- connect( _docManager, SIGNAL( setStatusBarText( const QString& ) ),
- this, SIGNAL( setStatusBarText( const QString& ) ) );
- connect( _scrollBox, SIGNAL( valueChangedRelative( int, int ) ),
- _pageView, SLOT( scrollBy( int, int ) ) );
- connect( _pageView, SIGNAL( pageSizeChanged( const QSize& ) ),
- _scrollBox, SLOT( setPageSize( const QSize& ) ) );
- connect( _pageView, SIGNAL( viewSizeChanged( const QSize& ) ),
- _scrollBox, SLOT( setViewSize( const QSize& ) ) );
- connect( _pageView, SIGNAL( contentsMoving( int, int ) ),
- _scrollBox, SLOT( setViewPos( int, int ) ) );
+ connect( _markList, TQT_SIGNAL( contextMenuRequested ( int, int, const TQPoint& ) ),
+ this, TQT_SLOT( showPopup( int, int, const TQPoint& ) ) );
+
+
+ connect( _markList, TQT_SIGNAL( selected( int ) ),
+ _docManager, TQT_SLOT( goToPage( int ) ) );
+ connect( _docManager, TQT_SIGNAL( newPageShown( int ) ),
+ _markList, TQT_SLOT( select( int ) ) );
+ connect( _docManager, TQT_SIGNAL( setStatusBarText( const TQString& ) ),
+ this, TQT_SIGNAL( setStatusBarText( const TQString& ) ) );
+ connect( _scrollBox, TQT_SIGNAL( valueChangedRelative( int, int ) ),
+ _pageView, TQT_SLOT( scrollBy( int, int ) ) );
+ connect( _pageView, TQT_SIGNAL( pageSizeChanged( const TQSize& ) ),
+ _scrollBox, TQT_SLOT( setPageSize( const TQSize& ) ) );
+ connect( _pageView, TQT_SIGNAL( viewSizeChanged( const TQSize& ) ),
+ _scrollBox, TQT_SLOT( setViewSize( const TQSize& ) ) );
+ connect( _pageView, TQT_SIGNAL( contentsMoving( int, int ) ),
+ _scrollBox, TQT_SLOT( setViewPos( int, int ) ) );
//-- File Menu ----------------------------------------------------------
- KStdAction::saveAs( document(), SLOT( saveAs() ),
+ KStdAction::saveAs( document(), TQT_SLOT( saveAs() ),
actionCollection() );
new KAction( i18n( "Document &Info" ), 0,
- miniWidget(), SLOT( info() ),
+ miniWidget(), TQT_SLOT( info() ),
actionCollection(), "info" );
//-- Edit Menu -----------------------------------------------------
_popup = new KPopupMenu( _markList, "marklist_menu" );
KAction *act = new KAction( i18n( "Mark Current Page" ), "flag", CTRL+SHIFT+Key_M,
- _markList, SLOT( markCurrent() ),
+ _markList, TQT_SLOT( markCurrent() ),
actionCollection(), "mark_current" );
act->plug( _popup );
act = new KAction( i18n( "Mark &All Pages" ), 0,
- _markList, SLOT( markAll() ),
+ _markList, TQT_SLOT( markAll() ),
actionCollection(), "mark_all" );
act->plug( _popup );
act = new KAction( i18n( "Mark &Even Pages" ), 0,
- _markList, SLOT( markEven() ),
+ _markList, TQT_SLOT( markEven() ),
actionCollection(), "mark_even" );
act->plug( _popup );
act = new KAction( i18n( "Mark &Odd Pages" ), 0,
- _markList, SLOT( markOdd() ),
+ _markList, TQT_SLOT( markOdd() ),
actionCollection(), "mark_odd" );
act->plug( _popup );
act = new KAction( i18n( "&Toggle Page Marks" ), 0,
- _markList, SLOT( toggleMarks() ),
+ _markList, TQT_SLOT( toggleMarks() ),
actionCollection(), "toggle" );
act->plug( _popup );
act = new KAction( i18n("&Remove Page Marks"), 0,
- _markList, SLOT( removeMarks() ),
+ _markList, TQT_SLOT( removeMarks() ),
actionCollection(), "remove" );
act->plug( _popup );
@@ -228,10 +228,10 @@ KGVPart::KGVPart( QWidget* parentWidget, const char*,
actionCollection(), "media_menu" );
_flick = new KToggleAction( i18n( "No &Flicker" ), 0,
- this, SLOT( slotFlicker() ),
+ this, TQT_SLOT( slotFlicker() ),
actionCollection(), "no_flicker" );
- QStringList orientations;
+ TQStringList orientations;
orientations.append( i18n( "Auto" ) );
orientations.append( i18n( "Portrait" ) );
orientations.append( i18n( "Landscape" ) );
@@ -239,32 +239,32 @@ KGVPart::KGVPart( QWidget* parentWidget, const char*,
orientations.append( i18n( "Seascape" ) );
_selectOrientation->setItems( orientations );
- connect( _selectOrientation, SIGNAL( activated( int ) ),
- this, SLOT( slotOrientation( int ) ) );
- connect( _selectMedia, SIGNAL( activated( int ) ),
- this, SLOT( slotMedia( int ) ) );
+ connect( _selectOrientation, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotOrientation( int ) ) );
+ connect( _selectMedia, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotMedia( int ) ) );
{
KShortcut zoomInShort = KStdAccel::zoomIn();
zoomInShort.append( KKey( CTRL+Key_Equal ) );
- _zoomIn = KStdAction::zoomIn( this, SLOT( slotZoomIn() ),
+ _zoomIn = KStdAction::zoomIn( this, TQT_SLOT( slotZoomIn() ),
actionCollection(), "zoomIn" );
_zoomIn->setShortcut( zoomInShort );
}
- _zoomOut = KStdAction::zoomOut( this, SLOT( slotZoomOut() ),
+ _zoomOut = KStdAction::zoomOut( this, TQT_SLOT( slotZoomOut() ),
actionCollection(), "zoomOut" );
_zoomTo = new KSelectAction( i18n( "Zoom" ), "viewmag", 0, actionCollection(), "zoomTo" );
- connect( _zoomTo, SIGNAL( activated( const QString & ) ), this, SLOT( slotZoom( const QString& ) ) );
+ connect( _zoomTo, TQT_SIGNAL( activated( const TQString & ) ), this, TQT_SLOT( slotZoom( const TQString& ) ) );
_zoomTo->setEditable( true );
_zoomTo->clear();
- QValueList<double> mags = DisplayOptions::normalMagnificationValues();
- QStringList zooms;
+ TQValueList<double> mags = DisplayOptions::normalMagnificationValues();
+ TQStringList zooms;
int idx = 0;
int cur = 0;
- for ( QValueList<double>::iterator first = mags.begin(), last = mags.end();
+ for ( TQValueList<double>::iterator first = mags.begin(), last = mags.end();
first != last;
++first ) {
- QString str = QString( "%1%" ).arg( KGlobal::locale()->formatNumber( *first * 100.0, 2 ));
+ TQString str = TQString( "%1%" ).arg( KGlobal::locale()->formatNumber( *first * 100.0, 2 ));
str.remove( KGlobal::locale()->decimalSymbol() + "00" );
zooms << str;
if ( *first == 1.0 ) idx = cur;
@@ -274,41 +274,41 @@ KGVPart::KGVPart( QWidget* parentWidget, const char*,
_zoomTo->setCurrentItem( idx );
_fitWidth = new KAction( i18n( "&Fit to Page Width" ), 0, this,
- SLOT( slotFitToPage() ), actionCollection(),
+ TQT_SLOT( slotFitToPage() ), actionCollection(),
"fit_to_page");
_fitScreen = new KAction( i18n( "&Fit to Screen" ), Key_S, this,
- SLOT( slotFitToScreen() ), actionCollection(),
+ TQT_SLOT( slotFitToScreen() ), actionCollection(),
"fit_to_screen");
- _prevPage = new KAction( i18n( "Previous Page" ), CTRL+Key_PageUp, this, SLOT( slotPrevPage() ),
+ _prevPage = new KAction( i18n( "Previous Page" ), CTRL+Key_PageUp, this, TQT_SLOT( slotPrevPage() ),
actionCollection(), "prevPage" );
_prevPage->setWhatsThis( i18n( "Moves to the previous page of the document" ) );
- _nextPage = new KAction( i18n( "Next Page" ), CTRL + Key_PageDown, this, SLOT( slotNextPage() ),
+ _nextPage = new KAction( i18n( "Next Page" ), CTRL + Key_PageDown, this, TQT_SLOT( slotNextPage() ),
actionCollection(), "nextPage" );
_nextPage->setWhatsThis( i18n( "Moves to the next page of the document" ) );
- _firstPage = KStdAction::firstPage( this, SLOT( slotGotoStart() ),
+ _firstPage = KStdAction::firstPage( this, TQT_SLOT( slotGotoStart() ),
actionCollection(), "goToStart" );
_firstPage->setWhatsThis( i18n( "Moves to the first page of the document" ) );
- _lastPage = KStdAction::lastPage( this, SLOT( slotGotoEnd() ),
+ _lastPage = KStdAction::lastPage( this, TQT_SLOT( slotGotoEnd() ),
actionCollection(), "goToEnd" );
_lastPage->setWhatsThis( i18n( "Moves to the last page of the document" ) );
KShortcut readUpShort = KStdAccel::shortcut( KStdAccel::Prior );
readUpShort.append( KKey( SHIFT+Key_Space ) );
_readUp = new KAction( i18n( "Read Up" ), "up",
- readUpShort, this, SLOT( slotReadUp() ),
+ readUpShort, this, TQT_SLOT( slotReadUp() ),
actionCollection(), "readUp" );
KShortcut readDownShort = KStdAccel::shortcut( KStdAccel::Next );
readDownShort.append( KKey( Key_Space ) );
_readDown = new KAction( i18n( "Read Down" ), "down",
- readDownShort, this, SLOT( slotReadDown() ),
+ readDownShort, this, TQT_SLOT( slotReadDown() ),
actionCollection(), "readDown" );
- _gotoPage = KStdAction::gotoPage( _docManager, SLOT( goToPage() ),
+ _gotoPage = KStdAction::gotoPage( _docManager, TQT_SLOT( goToPage() ),
actionCollection(), "goToPage" );
//-- Settings Menu ------------------------------------------------------
@@ -316,7 +316,7 @@ KGVPart::KGVPart( QWidget* parentWidget, const char*,
actionCollection(), "show_scrollbars" );
_showScrollBars->setCheckedState(i18n("Hide &Scrollbars"));
_watchFile = new KToggleAction( i18n( "&Watch File" ), 0,
- this, SLOT( slotWatchFile() ),
+ this, TQT_SLOT( slotWatchFile() ),
actionCollection(), "watch_file" );
_showPageList = new KToggleAction( i18n( "Show &Page List" ), 0,
actionCollection(), "show_page_list" );
@@ -324,31 +324,31 @@ KGVPart::KGVPart( QWidget* parentWidget, const char*,
_showPageLabels = new KToggleAction( i18n("Show Page &Labels"), 0,
actionCollection(), "show_page_labels" );
_showPageLabels->setCheckedState(i18n("Hide Page &Labels"));
- KStdAction::preferences( this, SLOT( slotConfigure() ), actionCollection() );
- connect( _showScrollBars, SIGNAL( toggled( bool ) ),
- SLOT( showScrollBars( bool ) ) );
- connect( _showPageList, SIGNAL( toggled( bool ) ),
- SLOT( showMarkList( bool ) ) );
- connect( _showPageLabels, SIGNAL( toggled( bool ) ),
- SLOT( showPageLabels( bool ) ) );
+ KStdAction::preferences( this, TQT_SLOT( slotConfigure() ), actionCollection() );
+ connect( _showScrollBars, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( showScrollBars( bool ) ) );
+ connect( _showPageList, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( showMarkList( bool ) ) );
+ connect( _showPageLabels, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( showPageLabels( bool ) ) );
_extension = new KGVBrowserExtension( this );
setXMLFile( "kgv_part.rc" );
- connect( miniWidget(), SIGNAL( newPageShown( int ) ),
- this, SLOT( slotNewPage( int ) ) );
- connect( _pageView, SIGNAL( contentsMoving( int, int ) ),
- this, SLOT( slotPageMoved( int, int ) ) );
+ connect( miniWidget(), TQT_SIGNAL( newPageShown( int ) ),
+ this, TQT_SLOT( slotNewPage( int ) ) );
+ connect( _pageView, TQT_SIGNAL( contentsMoving( int, int ) ),
+ this, TQT_SLOT( slotPageMoved( int, int ) ) );
- connect( _pageView, SIGNAL( nextPage() ), SLOT( slotNextPage() ));
- connect( _pageView, SIGNAL( prevPage() ), SLOT( slotPrevPage() ));
- connect( _pageView, SIGNAL( zoomIn() ), SLOT( slotZoomIn() ));
- connect( _pageView, SIGNAL( zoomOut() ), SLOT( slotZoomOut() ));
- connect( _pageView, SIGNAL( ReadUp() ), SLOT( slotReadUp() ));
- connect( _pageView, SIGNAL( ReadDown() ), SLOT( slotReadDown() ));
+ connect( _pageView, TQT_SIGNAL( nextPage() ), TQT_SLOT( slotNextPage() ));
+ connect( _pageView, TQT_SIGNAL( prevPage() ), TQT_SLOT( slotPrevPage() ));
+ connect( _pageView, TQT_SIGNAL( zoomIn() ), TQT_SLOT( slotZoomIn() ));
+ connect( _pageView, TQT_SIGNAL( zoomOut() ), TQT_SLOT( slotZoomOut() ));
+ connect( _pageView, TQT_SIGNAL( ReadUp() ), TQT_SLOT( slotReadUp() ));
+ connect( _pageView, TQT_SIGNAL( ReadDown() ), TQT_SLOT( slotReadDown() ));
- QStringList items = document()->mediaNames();
+ TQStringList items = document()->mediaNames();
items.prepend( i18n( "Auto ") );
_selectMedia->setItems( items );
@@ -426,7 +426,7 @@ bool KGVPart::closeURL()
_mimetypeScanner->abort();
if( !m_file.isEmpty() )
_fileWatcher->removeFile( m_file );
- _mimetype = QString::null;
+ _mimetype = TQString::null;
updatePageDepActions();
stateChanged( "initState" );
return KParts::ReadOnlyPart::closeURL();
@@ -568,7 +568,7 @@ void KGVPart::updateZoomActions()
_zoomIn->setEnabled(!_docManager->atMaxZoom());
_zoomOut->setEnabled(!_docManager->atMinZoom());
_zoomTo->setEnabled( true );
- QStringList items = _zoomTo->items();
+ TQStringList items = _zoomTo->items();
bool updateItems = false;
if (_customZoomIndex != -1)
{
@@ -578,10 +578,10 @@ void KGVPart::updateZoomActions()
}
double zoom = floor(miniWidget()->displayOptions().magnification()*1000.0) / 10.0;
unsigned idx = 0;
- for ( QStringList::iterator first = items.begin(), last = items.end();
+ for ( TQStringList::iterator first = items.begin(), last = items.end();
first != last;
++first ) {
- QString cur = *first;
+ TQString cur = *first;
cur.remove( cur.find( '%' ), 1 );
cur = cur.simplifyWhiteSpace();
bool ok = false;
@@ -600,7 +600,7 @@ void KGVPart::updateZoomActions()
}
// Show percentage that isn't predefined
- QString str = QString( "%1%" ).arg( KGlobal::locale()->formatNumber( zoom, 2 ));
+ TQString str = TQString( "%1%" ).arg( KGlobal::locale()->formatNumber( zoom, 2 ));
str.remove( KGlobal::locale()->decimalSymbol() + "00" );
items.insert( items.at(idx), 1, str );
_zoomTo->setItems( items );
@@ -658,10 +658,10 @@ bool KGVPart::openURL( const KURL& url )
emit setWindowCaption( m_url.prettyURL() );
_mimetypeScanner = new KGVRun( m_url, 0, m_url.isLocalFile(), false );
- connect( _mimetypeScanner, SIGNAL( finished( const QString& ) ),
- SLOT( slotMimetypeFinished( const QString& ) ) );
- connect( _mimetypeScanner, SIGNAL( error() ),
- SLOT( slotMimetypeError() ) );
+ connect( _mimetypeScanner, TQT_SIGNAL( finished( const TQString& ) ),
+ TQT_SLOT( slotMimetypeFinished( const TQString& ) ) );
+ connect( _mimetypeScanner, TQT_SIGNAL( error() ),
+ TQT_SLOT( slotMimetypeError() ) );
return true;
}
@@ -680,12 +680,12 @@ void KGVPart::openURLContinue()
m_bTemp = true;
// Use same extension as remote file. This is important for
// mimetype-determination (e.g. koffice)
- QString extension;
- QString fileName = m_url.fileName();
+ TQString extension;
+ TQString fileName = m_url.fileName();
int extensionPos = fileName.findRev( '.' );
if( extensionPos != -1 )
extension = fileName.mid( extensionPos ); // keep the '.'
- KTempFile tempFile( QString::null, extension );
+ KTempFile tempFile( TQString::null, extension );
m_file = tempFile.name();
_tmpFile.setName( m_file );
_tmpFile.open( IO_ReadWrite );
@@ -693,15 +693,15 @@ void KGVPart::openURLContinue()
/*
d->m_job = KIO::file_copy( m_url, m_file, 0600, true, false, d->m_showProgressInfo );
emit started( d->m_job );
- connect( d->m_job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotJobFinished ( KIO::Job * ) ) );
+ connect( d->m_job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotJobFinished ( KIO::Job * ) ) );
*/
_job = KIO::get( m_url, false, isProgressInfoEnabled() );
- connect( _job, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- SLOT( slotData( KIO::Job*, const QByteArray& ) ) );
- connect( _job, SIGNAL( result( KIO::Job* ) ),
- SLOT( slotJobFinished( KIO::Job* ) ) );
+ connect( _job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) );
+ connect( _job, TQT_SIGNAL( result( KIO::Job* ) ),
+ TQT_SLOT( slotJobFinished( KIO::Job* ) ) );
emit started( _job );
}
@@ -736,13 +736,13 @@ void KGVPart::slotOpenFileCompleted()
void KGVPart::slotGhostscriptOutput( char* data, int len )
{
- _logWindow->append( QString::fromLocal8Bit( data, len ) );
+ _logWindow->append( TQString::fromLocal8Bit( data, len ) );
if( _showLogWindow )
_logWindow->show();
}
-void KGVPart::slotGhostscriptError( const QString& error )
+void KGVPart::slotGhostscriptError( const TQString& error )
{
_logWindow->setLabel( i18n( "<qt>An error occurred in rendering.<br>"
"<strong>%1</strong><br>"
@@ -770,7 +770,7 @@ void KGVPart::guiActivateEvent( KParts::GUIActivateEvent* event )
KParts::ReadOnlyPart::guiActivateEvent( event );
}
-void KGVPart::slotData( KIO::Job* job, const QByteArray& data )
+void KGVPart::slotData( KIO::Job* job, const TQByteArray& data )
{
Q_ASSERT( _job == job );
@@ -779,12 +779,12 @@ void KGVPart::slotData( KIO::Job* job, const QByteArray& data )
_tmpFile.writeBlock( data );
}
-void KGVPart::slotMimetypeFinished( const QString& type )
+void KGVPart::slotMimetypeFinished( const TQString& type )
{
kdDebug(4500) << "KGVPart::slotMimetypeFinished( " << type << " )" << endl;
_mimetype = type;
if( !_mimetypeScanner || _mimetypeScanner->hasError() )
- emit canceled( QString::null );
+ emit canceled( TQString::null );
else
openURLContinue();
_mimetypeScanner = 0;
@@ -796,7 +796,7 @@ void KGVPart::slotMimetypeError()
_mimetypeScanner = 0;
emit started( 0 );
//kapp->processEvents();
- emit canceled( QString::null );
+ emit canceled( TQString::null );
}
void KGVPart::slotJobFinished( KIO::Job* job )
@@ -815,7 +815,7 @@ void KGVPart::slotJobFinished( KIO::Job* job )
document()->openFile( m_file, _mimetype );
}
-void KGVPart::slotFileDirty( const QString& fileName )
+void KGVPart::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
@@ -897,9 +897,9 @@ void KGVPart::slotZoomOut()
updateZoomActions();
}
-void KGVPart::slotZoom( const QString& nz )
+void KGVPart::slotZoom( const TQString& nz )
{
- QString z = nz;
+ TQString z = nz;
double zoom;
z.remove( z.find( '%' ), 1 );
zoom = KGlobal::locale()->readNumber( z ) / 100;
@@ -926,8 +926,8 @@ void KGVPart::slotFitToScreen()
{
kdDebug(4500) << "KGVPart::slotFitToScreen()" << endl;
if ( _fitTimer->isActive() ) {
- disconnect( _fitTimer, SIGNAL( timeout() ), this, 0 );
- connect( _fitTimer, SIGNAL( timeout() ), SLOT( slotDoFitToScreen() ) );
+ disconnect( _fitTimer, TQT_SIGNAL( timeout() ), this, 0 );
+ connect( _fitTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotDoFitToScreen() ) );
}
else slotDoFitToScreen();
}
@@ -967,8 +967,8 @@ void KGVPart::setDisplayOptions( const DisplayOptions& options )
_markList->select( options.page() );
_docManager->setDisplayOptions( options );
_selectOrientation->setCurrentItem( options.overrideOrientation() );
- QStringList medias = document()->mediaNames();
- QStringList::Iterator now = medias.find( options.overridePageMedia() );
+ TQStringList medias = document()->mediaNames();
+ TQStringList::Iterator now = medias.find( options.overridePageMedia() );
if ( now != medias.end() ){
// The options are displayed in inverted order.
// Therefore, size() - index gets you the display index
@@ -996,13 +996,13 @@ KGVRun::KGVRun( const KURL& url, mode_t mode, bool isLocalFile,
bool showProgressInfo ) :
KRun( url, mode, isLocalFile, showProgressInfo )
{
- connect( this, SIGNAL( finished() ), SLOT( emitFinishedWithMimetype() ) );
+ connect( this, TQT_SIGNAL( finished() ), TQT_SLOT( emitFinishedWithMimetype() ) );
}
KGVRun::~KGVRun()
{}
-void KGVRun::foundMimeType( const QString& mimetype )
+void KGVRun::foundMimeType( const TQString& mimetype )
{
kdDebug(4500) << "KGVRun::foundMimeType( " << mimetype << " )" << endl;
@@ -1026,7 +1026,7 @@ void KGVPart::updateFullScreen( bool fs )
else showMarkList( _showPageList->isChecked() );
}
-void KGVPart::showPopup( int, int, const QPoint& pos )
+void KGVPart::showPopup( int, int, const TQPoint& pos )
{
_popup->exec( pos );
}
diff --git a/kghostview/kgv_view.h b/kghostview/kgv_view.h
index 3a426f58..634704fe 100644
--- a/kghostview/kgv_view.h
+++ b/kghostview/kgv_view.h
@@ -19,8 +19,8 @@
#ifndef __KGV_VIEW_H
#define __KGV_VIEW_H
-#include <qcstring.h> // QByteArray
-#include <qfile.h>
+#include <tqcstring.h> // QByteArray
+#include <tqfile.h>
#include <kio/job.h>
#include <kparts/browserextension.h>
@@ -28,8 +28,8 @@
#include "displayoptions.h"
-class QFrame;
-class QWidget;
+class TQFrame;
+class TQWidget;
class KAboutData;
class KAction;
@@ -56,9 +56,9 @@ class KGVPart: public KParts::ReadOnlyPart
{
Q_OBJECT
public:
- KGVPart( QWidget* parentWidget, const char* widgetName,
- QObject* parent, const char* name,
- const QStringList& args = QStringList() );
+ KGVPart( TQWidget* parentWidget, const char* widgetName,
+ TQObject* parent, const char* name,
+ const TQStringList& args = TQStringList() );
virtual ~KGVPart();
@@ -94,7 +94,7 @@ public slots:
void updateFullScreen( bool );
- void showPopup( int, int, const QPoint &pos );
+ void showPopup( int, int, const TQPoint &pos );
void slotScrollLeft();
void slotScrollRight();
@@ -120,7 +120,7 @@ public slots:
void slotZoomIn();
void slotZoomOut();
- void slotZoom( const QString& );
+ void slotZoom( const TQString& );
void slotConfigure();
void slotConfigurationChanged();
@@ -134,13 +134,13 @@ public slots:
void setDisplayOptions( const DisplayOptions& opts );
protected slots:
- void slotData( KIO::Job*, const QByteArray& );
+ void slotData( KIO::Job*, const TQByteArray& );
void slotJobFinished( KIO::Job* );
- void slotMimetypeFinished( const QString& );
+ void slotMimetypeFinished( const TQString& );
void slotMimetypeError();
- void slotFileDirty( const QString& );
+ void slotFileDirty( const TQString& );
void slotDoFileDirty();
void slotOrientation (int);
@@ -166,25 +166,25 @@ protected:
private slots:
void slotGhostscriptOutput( char* data, int len );
- void slotGhostscriptError( const QString& );
+ void slotGhostscriptError( const TQString& );
private:
KGVBrowserExtension* _extension;
KGVDocument* _document;
- QWidget* _mainWidget;
+ TQWidget* _mainWidget;
KGVPageView* _pageView;
KGVPageDecorator* _pageDecorator;
KPSWidget* _psWidget;
ScrollBox* _scrollBox;
- QFrame* _divider;
+ TQFrame* _divider;
MarkList* _markList;
KGVMiniWidget* _docManager;
LogWindow* _logWindow;
- QTimer* _fitTimer;
+ TQTimer* _fitTimer;
KSelectAction* _selectOrientation;
KSelectAction* _selectMedia;
@@ -207,13 +207,13 @@ private:
KToggleAction* _showPageLabels;
KPopupMenu* _popup;
- QFile _tmpFile;
+ TQFile _tmpFile;
KIO::TransferJob* _job;
KDirWatch* _fileWatcher;
KGVRun* _mimetypeScanner;
- QTimer* _dirtyHandler;
+ TQTimer* _dirtyHandler;
- QString _mimetype;
+ TQString _mimetype;
bool _isGuiInitialized : 1;
bool _isFileDirty : 1;
@@ -251,16 +251,16 @@ public:
virtual ~KGVRun();
signals:
- void finished( const QString& mimetype );
+ void finished( const TQString& mimetype );
protected:
- void foundMimeType( const QString& mimetype );
+ void foundMimeType( const TQString& mimetype );
protected slots:
void emitFinishedWithMimetype() { emit finished( _mimetype ); }
private:
- QString _mimetype;
+ TQString _mimetype;
};
#endif
diff --git a/kghostview/kgvconfigdialog.cpp b/kghostview/kgvconfigdialog.cpp
index a9952008..ed55df1e 100644
--- a/kghostview/kgvconfigdialog.cpp
+++ b/kghostview/kgvconfigdialog.cpp
@@ -19,7 +19,7 @@
// Add header files alphabetically
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -43,14 +43,14 @@
namespace {
- QString getGSVersion( QString fullPathToExec )
+ TQString getGSVersion( TQString fullPathToExec )
{
- QString res;
- QString chkVersion = KProcess::quote(fullPathToExec) + " --version";
- FILE* p = popen( QFile::encodeName(chkVersion), "r" );
+ TQString res;
+ TQString chkVersion = KProcess::quote(fullPathToExec) + " --version";
+ FILE* p = popen( TQFile::encodeName(chkVersion), "r" );
if( p ) {
// FIXME: a badly configured interpreter can hang us
- QFile qp;
+ TQFile qp;
qp.open( IO_ReadOnly, p );
qp.readLine( res, 80 );
qp.close();
@@ -96,18 +96,18 @@ namespace {
*
*/
- QString recommendSetSafe( QString version )
+ TQString recommendSetSafe( TQString version )
{
- if ( version < QString::number( 6.53 ) ) return QString::number( 6.53 );
- if ( version[ 0 ] == '7' && version < QString::number( 7.04 ) ) return QString::number( 7.05 );
- return QString::null;
+ if ( version < TQString::number( 6.53 ) ) return TQString::number( 6.53 );
+ if ( version[ 0 ] == '7' && version < TQString::number( 7.04 ) ) return TQString::number( 7.05 );
+ return TQString::null;
}
// This function should contain all the gs version specific workarounds.
void redoGSDetection()
{
kdDebug(4500) << "kgvconfigdialog.cpp::{unnamed}::redoGSDetection()" << endl;
- QString version = getGSVersion( Configuration::interpreter() );
- QString recommended = recommendSetSafe( version );
+ TQString version = getGSVersion( Configuration::interpreter() );
+ TQString recommended = recommendSetSafe( version );
if ( !recommended.isNull() ) {
KMessageBox::sorry( 0,
i18n( "Your version of gs (version %1) is too old, since it has security issues "
@@ -117,11 +117,11 @@ namespace {
.arg( version )
.arg( recommended ) );
}
- if ( version < QString::number( 7.00 ) )
+ if ( version < TQString::number( 7.00 ) )
{
- QStringList arguments = QStringList::split( ' ', Configuration::antialiasingArguments() );
- arguments.remove( QString::fromLatin1( "-dMaxBitmap=10000000" ) );
- QString antiAliasArgs = arguments.join( " " );
+ TQStringList arguments = TQStringList::split( ' ', Configuration::antialiasingArguments() );
+ arguments.remove( TQString::fromLatin1( "-dMaxBitmap=10000000" ) );
+ TQString antiAliasArgs = arguments.join( " " );
Configuration::setAntialiasingArguments( antiAliasArgs );
}
@@ -140,13 +140,13 @@ void ConfigDialog::showSettings( KGVPart* main ) {
KConfigDialog* dialog = new KConfigDialog( 0, name,
Configuration::self(), KDialogBase::IconList );
dialog->addPage( new GeneralSettingsWidget( 0, "general-settings" ),
- i18n( "General" ), QString::fromLatin1( "kghostview" ) );
+ i18n( "General" ), TQString::fromLatin1( "kghostview" ) );
GSSettingsWidget *gssw = new GSSettingsWidget( 0, "gs-settings" );
- dialog->addPage( gssw, i18n( "Ghostscript\nConfiguration" ), QString::fromLatin1( "pdf" ) );
+ dialog->addPage( gssw, i18n( "Ghostscript\nConfiguration" ), TQString::fromLatin1( "pdf" ) );
gssw->setDetectedVersion(Configuration::version());
- QObject::connect( dialog, SIGNAL( settingsChanged() ), main, SLOT( slotConfigurationChanged() ) );
+ TQObject::connect( dialog, TQT_SIGNAL( settingsChanged() ), main, TQT_SLOT( slotConfigurationChanged() ) );
dialog->show();
}
diff --git a/kghostview/kgvdocument.cpp b/kghostview/kgvdocument.cpp
index d5b7df41..8b522f5d 100644
--- a/kghostview/kgvdocument.cpp
+++ b/kghostview/kgvdocument.cpp
@@ -19,7 +19,7 @@
#include <algorithm>
#include <memory>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include <kconfig.h>
#include <kfiledialog.h>
@@ -50,7 +50,7 @@ using namespace std;
using namespace KGV;
KGVDocument::KGVDocument( KGVPart* part, const char* name ) :
- QObject( part, name ),
+ TQObject( part, name ),
_psFile( 0 ),
_part( part ),
_tmpUnzipped( 0 ),
@@ -63,8 +63,8 @@ KGVDocument::KGVDocument( KGVPart* part, const char* name ) :
readSettings();
_pdf2dsc = new Pdf2dsc( _interpreterPath, this );
- connect( _pdf2dsc, SIGNAL( finished( bool ) ),
- SLOT( openPDFFileContinue( bool ) ) );
+ connect( _pdf2dsc, TQT_SIGNAL( finished( bool ) ),
+ TQT_SLOT( openPDFFileContinue( bool ) ) );
}
KGVDocument::~KGVDocument()
@@ -79,7 +79,7 @@ void KGVDocument::readSettings()
/*- OPENING and READING ---------------------------------------------------*/
-void KGVDocument::openFile( const QString& name, const QString& mimetype )
+void KGVDocument::openFile( const TQString& name, const TQString& mimetype )
{
kdDebug(4500) << "KGVDocument::openFile" << endl;
@@ -87,19 +87,19 @@ void KGVDocument::openFile( const QString& name, const QString& mimetype )
_fileName = name;
_mimetype = mimetype;
- QTimer::singleShot( 0, this, SLOT( doOpenFile() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( doOpenFile() ) );
}
void KGVDocument::doOpenFile()
{
- QFileInfo fileInfo( _fileName );
+ TQFileInfo fileInfo( _fileName );
if( !fileInfo.exists() )
{
KMessageBox::sorry( _part->widget(),
i18n( "<qt>Could not open <nobr><strong>%1</strong></nobr>: "
"File does not exist.</qt>" )
.arg( _fileName ) );
- emit canceled( QString() );
+ emit canceled( TQString() );
return;
}
if( !fileInfo.isReadable() )
@@ -108,7 +108,7 @@ void KGVDocument::doOpenFile()
i18n( "<qt>Could not open <nobr><strong>%1</strong></nobr>: "
"Permission denied.</qt>" )
.arg( _fileName ) );
- emit canceled( QString() );
+ emit canceled( TQString() );
return;
}
@@ -127,13 +127,13 @@ void KGVDocument::doOpenFile()
if( _mimetype == "application/pdf"
|| _mimetype == "application/x-pdf" ) // see bug:67474
{
- _tmpDSC = new KTempFile( QString::null, ".ps" );
+ _tmpDSC = new KTempFile( TQString::null, ".ps" );
Q_CHECK_PTR( _tmpDSC );
if( _tmpDSC->status() != 0 ) {
KMessageBox::error( _part->widget(),
i18n( "Could not create temporary file: %1" )
.arg( strerror( _tmpDSC->status() ) ) );
- emit canceled( QString() );
+ emit canceled( TQString() );
return;
}
@@ -161,7 +161,7 @@ void KGVDocument::doOpenFile()
"Document Format (.pdf) files.</qt>" )
.arg( _fileName )
.arg( _mimetype ) );
- emit canceled( QString() );
+ emit canceled( TQString() );
return;
}
}
@@ -171,7 +171,7 @@ bool KGVDocument::uncompressFile()
// If the file is gzipped, gunzip it to the temporary file _tmpUnzipped.
kdDebug(4500) << "KGVDocument::uncompressFile()" << endl;
- auto_ptr<QIODevice> filterDev( KFilterDev::deviceForFile( _fileName, _mimetype, true ) );
+ auto_ptr<TQIODevice> filterDev( KFilterDev::deviceForFile( _fileName, _mimetype, true ) );
if ( !filterDev.get() ) {
KMimeType::Ptr mt = KMimeType::mimeType(_mimetype);
if ( (_fileName.right( 3 ) == ".gz") || mt->is("application/x-gzip") ) {
@@ -191,7 +191,7 @@ bool KGVDocument::uncompressFile()
KMessageBox::error( _part->widget(),
i18n( "<qt>Could not uncompress <nobr><strong>%1</strong></nobr>.</qt>" )
.arg( _fileName ) );
- emit canceled( QString() );
+ emit canceled( TQString() );
return false;
}
@@ -202,12 +202,12 @@ bool KGVDocument::uncompressFile()
KMessageBox::error( _part->widget(),
i18n( "Could not create temporary file: %2" )
.arg( strerror( _tmpUnzipped->status() ) ) );
- emit canceled( QString() );
+ emit canceled( TQString() );
return false;
}
- QByteArray buf( 8192 );
+ TQByteArray buf( 8192 );
int read = 0, wrtn = 0;
while( ( read = filterDev->readBlock( buf.data(), buf.size() ) )
> 0 )
@@ -222,7 +222,7 @@ bool KGVDocument::uncompressFile()
KMessageBox::error( _part->widget(),
i18n( "<qt>Could not uncompress <nobr><strong>%1</strong></nobr>.</qt>" )
.arg( _fileName ) );
- emit canceled( QString() );
+ emit canceled( TQString() );
return false;
}
@@ -240,7 +240,7 @@ void KGVDocument::openPDFFileContinue( bool pdf2dscResult )
KMessageBox::error( _part->widget(),
i18n( "<qt>Could not open file <nobr><strong>%1</strong></nobr>.</qt>" )
.arg( _part->url().url() ) );
- emit canceled( QString() );
+ emit canceled( TQString() );
return;
}
@@ -250,12 +250,12 @@ void KGVDocument::openPDFFileContinue( bool pdf2dscResult )
openPSFile(_tmpDSC->name());
}
-void KGVDocument::openPSFile(const QString &file)
+void KGVDocument::openPSFile(const TQString &file)
{
- QString fileName = file.isEmpty() ? _fileName : file;
+ TQString fileName = file.isEmpty() ? _fileName : file;
kdDebug(4500) << "KGVDocument::openPSFile (" << fileName << ")" << endl;
- FILE* fp = fopen( QFile::encodeName( fileName ), "r");
+ FILE* fp = fopen( TQFile::encodeName( fileName ), "r");
if( fp == 0 )
{
KMessageBox::error( _part->widget(),
@@ -274,7 +274,7 @@ void KGVDocument::openPSFile(const QString &file)
}
}
-void KGVDocument::fileChanged( const QString& name )
+void KGVDocument::fileChanged( const TQString& name )
{
kdDebug(4500) << "KGVDocument: fileChanged " << name << endl;
@@ -304,7 +304,7 @@ void KGVDocument::scanDSC()
char buf[4096];
int count;
/*
- QTime clock;
+ TQTime clock;
clock.start();
*/
while( ( count = fread( buf, sizeof(char), sizeof( buf ), _psFile ) ) != 0 )
@@ -339,7 +339,7 @@ void KGVDocument::close()
clearTemporaryFiles();
}
-bool KGVDocument::convertFromPDF( const QString& saveFileName,
+bool KGVDocument::convertFromPDF( const TQString& saveFileName,
unsigned int firstPage,
unsigned int lastPage )
{
@@ -353,17 +353,17 @@ bool KGVDocument::convertFromPDF( const QString& saveFileName,
<< "-dSAFER"
<< "-dPARANOIDSAFER"
<< "-sDEVICE=pswrite"
- << ( QCString("-sOutputFile=")+QFile::encodeName(saveFileName) )
- << ( QString("-dFirstPage=")+QString::number( firstPage ) )
- << ( QString("-dLastPage=")+QString::number( lastPage ) )
+ << ( TQCString("-sOutputFile=")+TQFile::encodeName(saveFileName) )
+ << ( TQString("-dFirstPage=")+TQString::number( firstPage ) )
+ << ( TQString("-dLastPage=")+TQString::number( lastPage ) )
<< "-c"
<< "save"
<< "pop"
<< "-f"
- << QFile::encodeName(_fileName);
+ << TQFile::encodeName(_fileName);
- /*QValueList<QCString> args = process.args();
- QValueList<QCString>::Iterator it = args.begin();
+ /*TQValueList<TQCString> args = process.args();
+ TQValueList<TQCString>::Iterator it = args.begin();
for ( ; it != args.end() ; ++it )
kdDebug(4500) << ( *it ) << endl;*/
@@ -405,9 +405,9 @@ void KGVDocument::clearTemporaryFiles()
/*- DOCUMENT --------------------------------------------------------------*/
-QStringList KGVDocument::mediaNames() const
+TQStringList KGVDocument::mediaNames() const
{
- QStringList names;
+ TQStringList names;
const CDSCMEDIA* m = dsc_known_media;
while( m->name ) {
@@ -425,7 +425,7 @@ QStringList KGVDocument::mediaNames() const
return names;
}
-const CDSCMEDIA* KGVDocument::findMediaByName( const QString& mediaName ) const
+const CDSCMEDIA* KGVDocument::findMediaByName( const TQString& mediaName ) const
{
if( !isOpen() )
return 0;
@@ -452,7 +452,7 @@ const CDSCMEDIA* KGVDocument::findMediaByName( const QString& mediaName ) const
return 0;
}
-QSize KGVDocument::computePageSize( const QString& mediaName ) const
+TQSize KGVDocument::computePageSize( const TQString& mediaName ) const
{
kdDebug(4500) << "KGVDocument::computePageSize( " << mediaName << " )" << endl;
@@ -460,20 +460,20 @@ QSize KGVDocument::computePageSize( const QString& mediaName ) const
if( dsc()->bbox().get() != 0 )
return dsc()->bbox()->size();
else
- return QSize( 0, 0 );
+ return TQSize( 0, 0 );
}
const CDSCMEDIA* m = findMediaByName( mediaName );
Q_ASSERT( m );
- return QSize( static_cast<int>( m->width ), static_cast<int>( m->height ) );
+ return TQSize( static_cast<int>( m->width ), static_cast<int>( m->height ) );
}
/*- PRINTING and SAVING ---------------------------------------------------*/
-QString KGVDocument::pageListToRange( const PageList& pageList )
+TQString KGVDocument::pageListToRange( const PageList& pageList )
{
- QString range;
+ TQString range;
// Iterators marking the begin and end of a successive sequence
// of pages.
@@ -495,9 +495,9 @@ QString KGVDocument::pageListToRange( const PageList& pageList )
range += ",";
if( bss == ess )
- range += QString::number( *ess );
+ range += TQString::number( *ess );
else
- range += QString( "%1-%2" ).arg( *bss ).arg( *ess );
+ range += TQString( "%1-%2" ).arg( *bss ).arg( *ess );
bss = it;
}
@@ -523,7 +523,7 @@ void KGVDocument::print()
if( printer.setup( _part->widget(), i18n("Print %1").arg(_part->url().fileName()) ) )
{
- KTempFile tf( QString::null, ".ps" );
+ KTempFile tf( TQString::null, ".ps" );
if( tf.status() == 0 )
{
if ( printer.pageList().empty() ) {
@@ -532,7 +532,7 @@ void KGVDocument::print()
"pages to be printed was empty." ),
i18n( "Error Printing" ) );
} else if ( savePages( tf.name(), printer.pageList() ) ) {
- printer.printFiles( QStringList( tf.name() ), true );
+ printer.printFiles( TQStringList( tf.name() ), true );
} else {
KMessageBox::error( 0, i18n( "<qt><strong>Printing failure:</strong><br>Could not convert to PostScript</qt>" ) );
}
@@ -562,17 +562,17 @@ void KGVDocument::saveAs()
_part->url().isLocalFile()
? _part->url().url()
: _part->url().fileName(),
- QString::null,
+ TQString::null,
_part->widget(),
- QString::null );
+ TQString::null );
if( !KIO::NetAccess::upload( _fileName,
saveURL,
- static_cast<QWidget*>( 0 ) ) ) {
+ static_cast<TQWidget*>( 0 ) ) ) {
// TODO: Proper error dialog
}
}
-bool KGVDocument::savePages( const QString& saveFileName,
+bool KGVDocument::savePages( const TQString& saveFileName,
const PageList& pageList )
{
if( pageList.empty() )
@@ -580,7 +580,7 @@ bool KGVDocument::savePages( const QString& saveFileName,
if( _format == PDF )
{
- KTempFile psSaveFile( QString::null, ".ps" );
+ KTempFile psSaveFile( TQString::null, ".ps" );
psSaveFile.setAutoDelete( true );
if( psSaveFile.status() != 0 )
return false;
@@ -639,8 +639,8 @@ bool KGVDocument::savePages( const QString& saveFileName,
// Copy the headers, marked pages, and trailer to fp
-bool KGVDocument::psCopyDoc( const QString& inputFile,
- const QString& outputFile, const PageList& pageList )
+bool KGVDocument::psCopyDoc( const TQString& inputFile,
+ const TQString& outputFile, const PageList& pageList )
{
FILE* from;
FILE* to;
@@ -665,8 +665,8 @@ bool KGVDocument::psCopyDoc( const QString& inputFile,
return false;
}
- from = fopen( QFile::encodeName( inputFile ), "r" );
- to = fopen( QFile::encodeName( outputFile ), "w" );
+ from = fopen( TQFile::encodeName( inputFile ), "r" );
+ to = fopen( TQFile::encodeName( outputFile ), "w" );
// Hack in order to make printing of PDF files work. FIXME
CDSC* dsc;
@@ -674,7 +674,7 @@ bool KGVDocument::psCopyDoc( const QString& inputFile,
if( _format == PS )
dsc = _dsc->cdsc();
else {
- FILE* fp = fopen( QFile::encodeName( inputFile ), "r");
+ FILE* fp = fopen( TQFile::encodeName( inputFile ), "r");
char buf[256];
int count;
dsc = dsc_init( 0 );
@@ -768,17 +768,17 @@ bool KGVDocument::psCopyDoc( const QString& inputFile,
/*- Conversion stuff ------------------------------------------------------*/
/*
-void KGVDocument::runPdf2ps( const QString& pdfName,
- const QString& dscName )
+void KGVDocument::runPdf2ps( const TQString& pdfName,
+ const TQString& dscName )
{
KProcess process;
process << _interpreterPath
<< "-dNODISPLAY"
<< "-dQUIET"
- << QString( "-sPDFname=%1" ).arg( pdfName )
- << QString( "-sDSCnamale locale( "kghostview" );
+ << TQString( "-sPDFname=%1" ).arg( pdfName )
+ << TQString( "-sDSCnamale locale( "kghostview" );
_fallBackPageMedia = pageSizeToString(
- static_cast< QPrinter::PageSize >( locale.pageSize() ) );
+ static_cast< TQPrinter::PageSize >( locale.pageSize() ) );
_usePageLabels = false;
e=%1" ).arg( dscName )
@@ -786,8 +786,8 @@ e=%1" ).arg( dscName )
<< "-c"
<< "quit";
- connect( &process, SIGNAL( processExited( KProcess* ) ),
- this, SLOT( pdf2psExited( KProcess* ) ) );
+ connect( &process, TQT_SIGNAL( processExited( KProcess* ) ),
+ this, TQT_SLOT( pdf2psExited( KProcess* ) ) );
kdDebug(4500) << "KGVDocument: pdf2ps started" << endl;
process.start( KProcess::NotifyOnExit );
@@ -801,8 +801,8 @@ void KGVDocument::pdf2psExited( KProcess* process )
}
*/
-Pdf2dsc::Pdf2dsc( const QString& ghostscriptPath, QObject* parent, const char* name ) :
- QObject( parent, name ),
+Pdf2dsc::Pdf2dsc( const TQString& ghostscriptPath, TQObject* parent, const char* name ) :
+ TQObject( parent, name ),
_process( 0 ),
_ghostscriptPath( ghostscriptPath )
{}
@@ -812,7 +812,7 @@ Pdf2dsc::~Pdf2dsc()
kill();
}
-void Pdf2dsc::run( const QString& pdfName, const QString& dscName )
+void Pdf2dsc::run( const TQString& pdfName, const TQString& dscName )
{
kill();
@@ -823,8 +823,8 @@ void Pdf2dsc::run( const QString& pdfName, const QString& dscName )
<< "-dDELAYSAFER"
<< "-dNODISPLAY"
<< "-dQUIET"
- << QString( "-sPDFname=%1" ).arg( pdfName )
- << QString( "-sDSCname=%1" ).arg( dscName )
+ << TQString( "-sPDFname=%1" ).arg( pdfName )
+ << TQString( "-sDSCname=%1" ).arg( dscName )
<< "-c"
<< "<< /PermitFileReading [ PDFname ] /PermitFileWriting [ DSCname ] /PermitFileControl [] >> setuserparams .locksafe"
<< "-f"
@@ -832,8 +832,8 @@ void Pdf2dsc::run( const QString& pdfName, const QString& dscName )
<< "-c"
<< "quit";
- connect( _process, SIGNAL( processExited( KProcess* ) ),
- this, SLOT( processExited() ) );
+ connect( _process, TQT_SIGNAL( processExited( KProcess* ) ),
+ this, TQT_SLOT( processExited() ) );
kdDebug(4500) << "Pdf2dsc: started" << endl;
_process->start( KProcess::NotifyOnExit );
diff --git a/kghostview/kgvdocument.h b/kghostview/kgvdocument.h
index 960843f8..581e5ba8 100644
--- a/kghostview/kgvdocument.h
+++ b/kghostview/kgvdocument.h
@@ -19,9 +19,9 @@
#ifndef __KGV_DOCUMENT_H__
#define __KGV_DOCUMENT_H__
-#include <qprinter.h>
-#include <qsize.h>
-#include <qstring.h>
+#include <tqprinter.h>
+#include <tqsize.h>
+#include <tqstring.h>
#include "kgv.h"
#include "dscparse_adapter.h"
@@ -51,14 +51,14 @@ public:
/**
* Open the @em local file @p filename asynchronously.
*/
- void openFile( const QString& filename, const QString& mimetype );
+ void openFile( const TQString& filename, const TQString& mimetype );
/**
* Close the document.
*/
void close();
- const QString& fileName() const { return _fileName; }
+ const TQString& fileName() const { return _fileName; }
FILE* psFile() { return _psFile; }
Format format() const { return _format; }
@@ -72,24 +72,24 @@ public:
/**
* A list of page media (sizes).
*/
- QStringList mediaNames() const;
+ TQStringList mediaNames() const;
- const CDSCMEDIA* findMediaByName( const QString& mediaName ) const;
+ const CDSCMEDIA* findMediaByName( const TQString& mediaName ) const;
- QSize computePageSize( const QString& pageMedia ) const;
+ TQSize computePageSize( const TQString& pageMedia ) const;
- static QString pageSizeToString( QPrinter::PageSize );
+ static TQString pageSizeToString( TQPrinter::PageSize );
/**
- * Returns a QString which contains a range representation of @p pageList.
+ * Returns a TQString which contains a range representation of @p pageList.
* Examples: [1,3] -> "1,3"
* [1,2,3] -> "1-3"
* [1,3,4,5,8] -> "1,3-5,8"
*/
- static QString pageListToRange( const KGV::PageList& );
+ static TQString pageListToRange( const KGV::PageList& );
public slots:
- void fileChanged( const QString& );
+ void fileChanged( const TQString& );
void saveAs();
void print();
@@ -101,7 +101,7 @@ signals:
void fileChangeFailed();
void completed();
- void canceled( const QString& );
+ void canceled( const TQString& );
protected:
void scanDSC();
@@ -116,16 +116,16 @@ protected:
* kdelibs installed. Generally it will work for .gz and .bz2
*/
bool uncompressFile();
- void openPSFile(const QString &file=QString::null);
+ void openPSFile(const TQString &file=TQString::null);
protected:
- bool savePages( const QString& saveFileName,
+ bool savePages( const TQString& saveFileName,
const KGV::PageList& pageList );
- bool psCopyDoc( const QString& inputFile, const QString& outputFile,
+ bool psCopyDoc( const TQString& inputFile, const TQString& outputFile,
const KGV::PageList& pageList );
- bool convertFromPDF( const QString& saveFileName,
+ bool convertFromPDF( const TQString& saveFileName,
unsigned int firstPage, unsigned int lastPage );
protected slots:
@@ -135,8 +135,8 @@ protected slots:
private:
FILE* _psFile;
- QString _fileName;
- QString _mimetype;
+ TQString _fileName;
+ TQString _mimetype;
KGVPart* _part;
@@ -148,7 +148,7 @@ private:
Pdf2dsc* _pdf2dsc;
- QString _interpreterPath;
+ TQString _interpreterPath;
bool _isFileOpen;
@@ -161,10 +161,10 @@ class Pdf2dsc : public QObject
Q_OBJECT
public:
- Pdf2dsc( const QString& ghostscriptPath, QObject* parent = 0, const char* name = 0 );
+ Pdf2dsc( const TQString& ghostscriptPath, TQObject* parent = 0, const char* name = 0 );
~Pdf2dsc();
- void run( const QString& pdfName, const QString& dscName );
+ void run( const TQString& pdfName, const TQString& dscName );
void kill();
signals:
@@ -175,7 +175,7 @@ protected slots:
private:
KProcess* _process;
- QString _ghostscriptPath;
+ TQString _ghostscriptPath;
};
diff --git a/kghostview/kgvfactory.cpp b/kghostview/kgvfactory.cpp
index edf20144..d7a082b0 100644
--- a/kghostview/kgvfactory.cpp
+++ b/kghostview/kgvfactory.cpp
@@ -52,19 +52,19 @@ KGVFactory *KGVFactory::s_self;
KInstance *KGVFactory::s_instance;
KAboutData *KGVFactory::s_aboutData;
-KParts::Part *KGVFactory::createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
+KParts::Part *KGVFactory::createPartObject( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
const char *className,
- const QStringList &args_ )
+ const TQStringList &args_ )
{
- QStringList args = args_;
+ TQStringList args = args_;
/* Below is the reason why we must
* have our own factory instead of
* typedef KParts::GenericFactory<KGVPart> KGVFactory
*
* as we did before.
*/
- args << QString::fromLatin1( className );
+ args << TQString::fromLatin1( className );
if ( !strcmp( className, "Browser/View" ) ) {
className = "KParts::ReadOnlyPart";
}
diff --git a/kghostview/kgvfactory.h b/kghostview/kgvfactory.h
index 238e3557..9a5d507f 100644
--- a/kghostview/kgvfactory.h
+++ b/kghostview/kgvfactory.h
@@ -33,10 +33,10 @@ class KDE_EXPORT KGVFactory : public KParts::Factory
static KInstance *instance();
static KAboutData *aboutData();
- virtual KParts::Part *createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
+ virtual KParts::Part *createPartObject( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
const char *className,
- const QStringList &args );
+ const TQStringList &args );
protected:
virtual KInstance *createInstance();
diff --git a/kghostview/kgvmainwidget.cpp b/kghostview/kgvmainwidget.cpp
index 2bad7f84..5e9bd40b 100644
--- a/kghostview/kgvmainwidget.cpp
+++ b/kghostview/kgvmainwidget.cpp
@@ -20,10 +20,10 @@
#include <kurl.h>
#include <kurldrag.h>
-KGVMainWidget::KGVMainWidget( QWidget* parent, const char* name )
- : QWidget( parent, name ) {}
+KGVMainWidget::KGVMainWidget( TQWidget* parent, const char* name )
+ : TQWidget( parent, name ) {}
-void KGVMainWidget::keyPressEvent( QKeyEvent* event )
+void KGVMainWidget::keyPressEvent( TQKeyEvent* event )
{
if( event->key() == Key_Space && event->state() != ShiftButton ) {
event->accept();
@@ -31,7 +31,7 @@ void KGVMainWidget::keyPressEvent( QKeyEvent* event )
}
}
-void KGVMainWidget::dropEvent( QDropEvent* ev )
+void KGVMainWidget::dropEvent( TQDropEvent* ev )
{
KURL::List lst;
if ( KURLDrag::decode( ev, lst ) ) {
@@ -40,7 +40,7 @@ void KGVMainWidget::dropEvent( QDropEvent* ev )
}
-void KGVMainWidget::dragEnterEvent( QDragEnterEvent * ev )
+void KGVMainWidget::dragEnterEvent( TQDragEnterEvent * ev )
{
ev->accept();
}
diff --git a/kghostview/kgvmainwidget.h b/kghostview/kgvmainwidget.h
index 0e79fbd6..99b9dc9b 100644
--- a/kghostview/kgvmainwidget.h
+++ b/kghostview/kgvmainwidget.h
@@ -19,7 +19,7 @@
#ifndef KGVMAINWIDGET_H
#define KGVMAINWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
class KURL;
@@ -28,16 +28,16 @@ class KGVMainWidget : public QWidget
Q_OBJECT
public:
- KGVMainWidget( QWidget* parent = 0, const char* name = 0 );
+ KGVMainWidget( TQWidget* parent = 0, const char* name = 0 );
signals:
void spacePressed();
void urlDropped( const KURL& );
protected:
- virtual void keyPressEvent( QKeyEvent* );
- virtual void dragEnterEvent( QDragEnterEvent* );
- virtual void dropEvent( QDropEvent* );
+ virtual void keyPressEvent( TQKeyEvent* );
+ virtual void dragEnterEvent( TQDragEnterEvent* );
+ virtual void dropEvent( TQDropEvent* );
};
#endif
diff --git a/kghostview/kgvpagedecorator.cpp b/kghostview/kgvpagedecorator.cpp
index e1eccfc7..b6304c1d 100644
--- a/kghostview/kgvpagedecorator.cpp
+++ b/kghostview/kgvpagedecorator.cpp
@@ -16,15 +16,15 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qbitmap.h>
-#include <qdrawutil.h>
-#include <qpainter.h>
-#include <qregion.h>
+#include <tqbitmap.h>
+#include <tqdrawutil.h>
+#include <tqpainter.h>
+#include <tqregion.h>
#include "kgvpagedecorator.h"
-KGVPageDecorator::KGVPageDecorator( QWidget* parent, const char* name ) :
- QHBox( parent, name ),
+KGVPageDecorator::KGVPageDecorator( TQWidget* parent, const char* name ) :
+ TQHBox( parent, name ),
_margin( 5 ),
_borderWidth( 1 ),
_shadowOffset( 2, 2 )
@@ -35,35 +35,35 @@ KGVPageDecorator::KGVPageDecorator( QWidget* parent, const char* name ) :
setAutoMask( true );
}
-bool KGVPageDecorator::eventFilter( QObject* o, QEvent* e )
+bool KGVPageDecorator::eventFilter( TQObject* o, TQEvent* e )
{
switch( e->type() ) {
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- case QEvent::MouseButtonDblClick:
- case QEvent::MouseMove:
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonDblClick:
+ case TQEvent::MouseMove:
return event( e );
default:
;
}
- return QHBox::eventFilter( o, e );
+ return TQHBox::eventFilter( o, e );
}
-void KGVPageDecorator::childEvent( QChildEvent* e )
+void KGVPageDecorator::childEvent( TQChildEvent* e )
{
if( e->child()->isWidgetType() && e->inserted() )
e->child()->installEventFilter( this );
}
-void KGVPageDecorator::drawFrame( QPainter* p )
+void KGVPageDecorator::drawFrame( TQPainter* p )
{
- QRect r( frameRect().topLeft() + QPoint(_margin,_margin),
- frameRect().bottomRight() - QPoint(_margin,_margin) );
+ TQRect r( frameRect().topLeft() + TQPoint(_margin,_margin),
+ frameRect().bottomRight() - TQPoint(_margin,_margin) );
if( !r.isValid() )
return;
- const QColorGroup& cg = colorGroup();
+ const TQColorGroup& cg = colorGroup();
r.moveCenter( r.center() + _shadowOffset );
qDrawPlainRect( p, r, cg.shadow(), _shadowOffset.manhattanLength() );
@@ -72,17 +72,17 @@ void KGVPageDecorator::drawFrame( QPainter* p )
qDrawPlainRect( p, r, cg.foreground(), _borderWidth );
}
-void KGVPageDecorator::drawMask( QPainter* p )
+void KGVPageDecorator::drawMask( TQPainter* p )
{
- QRect r( frameRect().topLeft() + QPoint(_margin,_margin),
- frameRect().bottomRight() - QPoint(_margin,_margin) );
+ TQRect r( frameRect().topLeft() + TQPoint(_margin,_margin),
+ frameRect().bottomRight() - TQPoint(_margin,_margin) );
if( !r.isValid() )
return;
- QColorGroup cg( color1, color1, color1, color1, color1, color1, color1,
+ TQColorGroup cg( color1, color1, color1, color1, color1, color1, color1,
color1, color0 );
- QBrush brush( cg.foreground() );
+ TQBrush brush( cg.foreground() );
r.moveCenter( r.center() + _shadowOffset );
qDrawPlainRect( p, r, cg.foreground(), _shadowOffset.manhattanLength() );
@@ -93,9 +93,9 @@ void KGVPageDecorator::drawMask( QPainter* p )
void KGVPageDecorator::updateMask()
{
- QBitmap bm( size() );
+ TQBitmap bm( size() );
bm.fill( color0 );
- QPainter p( &bm, this );
+ TQPainter p( &bm, this );
p.setPen( color1 );
p.setBrush( color1 );
drawMask( &p );
diff --git a/kghostview/kgvpagedecorator.h b/kghostview/kgvpagedecorator.h
index 72ceb956..40839fdc 100644
--- a/kghostview/kgvpagedecorator.h
+++ b/kghostview/kgvpagedecorator.h
@@ -19,43 +19,43 @@
#ifndef KGVPAGEDECORATOR_H
#define KGVPAGEDECORATOR_H
-#include <qhbox.h>
+#include <tqhbox.h>
class KGVPageDecorator : public QHBox
{
public:
- KGVPageDecorator( QWidget* parent = 0, const char* name = 0 );
+ KGVPageDecorator( TQWidget* parent = 0, const char* name = 0 );
~KGVPageDecorator() { ; }
unsigned int margin() const;
unsigned int borderWidth() const;
/**
- * Reimplemented from QObject to let mouse events from child widgets
+ * Reimplemented from TQObject to let mouse events from child widgets
* appear to come from this widget.
*/
- bool eventFilter( QObject*, QEvent* );
+ bool eventFilter( TQObject*, TQEvent* );
protected:
/**
- * Reimplemented from QObject to automatically insert an event filter
+ * Reimplemented from TQObject to automatically insert an event filter
* on child widgets.
*/
- virtual void childEvent( QChildEvent* );
+ virtual void childEvent( TQChildEvent* );
/**
- * Reimplemented from QFrame to draw a pageshadow like frame.
+ * Reimplemented from TQFrame to draw a pageshadow like frame.
*/
- virtual void drawFrame( QPainter* );
+ virtual void drawFrame( TQPainter* );
/**
* Draw the mask of both the frame and the contents in order to create a
* partially transparent frame.
*/
- virtual void drawMask( QPainter* );
+ virtual void drawMask( TQPainter* );
/**
- * Reimplemented from QWidget. It uses @ref drawMask() to draw the mask
+ * Reimplemented from TQWidget. It uses @ref drawMask() to draw the mask
* of the frame when transparency is required.
*/
virtual void updateMask();
@@ -63,7 +63,7 @@ protected:
private:
unsigned int _margin;
unsigned int _borderWidth;
- QPoint _shadowOffset;
+ TQPoint _shadowOffset;
};
inline unsigned int KGVPageDecorator::margin() const
diff --git a/kghostview/kgvpageview.cpp b/kghostview/kgvpageview.cpp
index 8a8af585..2cc5f7e6 100644
--- a/kghostview/kgvpageview.cpp
+++ b/kghostview/kgvpageview.cpp
@@ -16,22 +16,22 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kdebug.h>
#include "kgvpageview.h"
-KGVPageView::KGVPageView( QWidget* parent, const char* name )
- : QScrollView( parent, name )
+KGVPageView::KGVPageView( TQWidget* parent, const char* name )
+ : TQScrollView( parent, name )
{
_page = 0;
- setFocusPolicy( QWidget::StrongFocus );
- viewport()->setFocusPolicy( QWidget::WheelFocus );
+ setFocusPolicy( TQWidget::StrongFocus );
+ viewport()->setFocusPolicy( TQWidget::WheelFocus );
}
-void KGVPageView::setPage( QWidget* page )
+void KGVPageView::setPage( TQWidget* page )
{
if( page != 0 ) {
addChild( page );
@@ -50,21 +50,21 @@ bool KGVPageView::atBottom() const
return verticalScrollBar()->value() == verticalScrollBar()->maxValue();
}
-bool KGVPageView::eventFilter( QObject* o, QEvent* e )
+bool KGVPageView::eventFilter( TQObject* o, TQEvent* e )
{
- if ( o == _page && e->type() == QEvent::Resize ) {
- // We need to call QScrollView::eventFilter before centerContents,
+ if ( o == _page && e->type() == TQEvent::Resize ) {
+ // We need to call TQScrollView::eventFilter before centerContents,
// otherwise a loop will be introduced.
- bool result = QScrollView::eventFilter( o, e );
+ bool result = TQScrollView::eventFilter( o, e );
centerContents();
emit pageSizeChanged( _page->size() );
return result;
}
- return QScrollView::eventFilter( o, e );
+ return TQScrollView::eventFilter( o, e );
}
-void KGVPageView::wheelEvent( QWheelEvent *e )
+void KGVPageView::wheelEvent( TQWheelEvent *e )
{
int delta = e->delta();
e->accept();
@@ -84,9 +84,9 @@ void KGVPageView::wheelEvent( QWheelEvent *e )
}
else
- QScrollView::wheelEvent( e );
+ TQScrollView::wheelEvent( e );
}
-void KGVPageView::mousePressEvent( QMouseEvent * e )
+void KGVPageView::mousePressEvent( TQMouseEvent * e )
{
if ( e->button() & LeftButton )
{
@@ -103,7 +103,7 @@ void KGVPageView::mousePressEvent( QMouseEvent * e )
}
}
-void KGVPageView::mouseReleaseEvent( QMouseEvent *e )
+void KGVPageView::mouseReleaseEvent( TQMouseEvent *e )
{
if ( e -> button() & LeftButton )
{
@@ -111,11 +111,11 @@ void KGVPageView::mouseReleaseEvent( QMouseEvent *e )
}
}
-void KGVPageView::mouseMoveEvent( QMouseEvent * e )
+void KGVPageView::mouseMoveEvent( TQMouseEvent * e )
{
if ( e->state() & LeftButton )
{
- QPoint delta = _dragGrabPos - e->globalPos();
+ TQPoint delta = _dragGrabPos - e->globalPos();
scrollBy( delta.x(), delta.y() );
_dragGrabPos = e->globalPos();
}
@@ -201,7 +201,7 @@ void KGVPageView::enableScrollBars( bool b )
setVScrollBarMode( b ? Auto : AlwaysOff );
}
-void KGVPageView::keyPressEvent( QKeyEvent* e )
+void KGVPageView::keyPressEvent( TQKeyEvent* e )
{
switch ( e->key() ) {
case Key_Up:
@@ -223,9 +223,9 @@ void KGVPageView::keyPressEvent( QKeyEvent* e )
e->accept();
}
-void KGVPageView::viewportResizeEvent( QResizeEvent* e )
+void KGVPageView::viewportResizeEvent( TQResizeEvent* e )
{
- QScrollView::viewportResizeEvent( e );
+ TQScrollView::viewportResizeEvent( e );
emit viewSizeChanged( viewport()->size() );
centerContents();
}
@@ -238,7 +238,7 @@ void KGVPageView::centerContents()
int newX = 0;
int newY = 0;
- QSize newViewportSize = viewportSize( _page->width(),
+ TQSize newViewportSize = viewportSize( _page->width(),
_page->height() );
if( newViewportSize.width() > _page->width() )
diff --git a/kghostview/kgvpageview.h b/kghostview/kgvpageview.h
index 9a1abac3..6f76f458 100644
--- a/kghostview/kgvpageview.h
+++ b/kghostview/kgvpageview.h
@@ -20,10 +20,10 @@
#ifndef KGVPAGEVIEW_H
#define KGVPAGEVIEW_H
-#include <qscrollview.h>
+#include <tqscrollview.h>
/**
- * KGVPageView is a customized QScrollView, which can hold one page. This page
+ * KGVPageView is a customized TQScrollView, which can hold one page. This page
* will be centered on the viewport. Furthermore it adds the ability to scroll
* the page by dragging it using the mouse.
*/
@@ -32,11 +32,11 @@ class KGVPageView : public QScrollView
Q_OBJECT
public:
- KGVPageView( QWidget* parent = 0, const char* name = 0 );
+ KGVPageView( TQWidget* parent = 0, const char* name = 0 );
~KGVPageView() { ; }
- void setPage( QWidget* );
- QWidget* page() const { return _page; }
+ void setPage( TQWidget* );
+ TQWidget* page() const { return _page; }
/**
* Return true if the top resp. bottom of the page is visible.
@@ -52,7 +52,7 @@ public:
/**
* @reimplemented
*/
- bool eventFilter( QObject*, QEvent* );
+ bool eventFilter( TQObject*, TQEvent* );
public slots:
bool readUp();
@@ -65,8 +65,8 @@ public slots:
void scrollTop();
signals:
- void viewSizeChanged( const QSize& );
- void pageSizeChanged( const QSize& );
+ void viewSizeChanged( const TQSize& );
+ void pageSizeChanged( const TQSize& );
void nextPage();
void zoomOut();
void zoomIn();
@@ -76,18 +76,18 @@ signals:
void ReadDown();
protected:
- virtual void keyPressEvent( QKeyEvent* );
+ virtual void keyPressEvent( TQKeyEvent* );
/**
- * Reimplemented to from QScrollView to make sure that the page is centered
+ * Reimplemented to from TQScrollView to make sure that the page is centered
* when it fits in the viewport.
*/
- virtual void viewportResizeEvent( QResizeEvent* );
+ virtual void viewportResizeEvent( TQResizeEvent* );
- virtual void mousePressEvent( QMouseEvent *e );
- virtual void mouseReleaseEvent( QMouseEvent *e );
- virtual void mouseMoveEvent( QMouseEvent *e );
- virtual void wheelEvent( QWheelEvent * );
+ virtual void mousePressEvent( TQMouseEvent *e );
+ virtual void mouseReleaseEvent( TQMouseEvent *e );
+ virtual void mouseMoveEvent( TQMouseEvent *e );
+ virtual void wheelEvent( TQWheelEvent * );
/**
* If the viewport is larger than the page, center the page on the
@@ -96,8 +96,8 @@ protected:
void centerContents();
private:
- QPoint _dragGrabPos;
- QWidget* _page;
+ TQPoint _dragGrabPos;
+ TQWidget* _page;
};
#endif
diff --git a/kghostview/kgvshell.cpp b/kghostview/kgvshell.cpp
index 1dc546d5..708921ab 100644
--- a/kghostview/kgvshell.cpp
+++ b/kghostview/kgvshell.cpp
@@ -42,7 +42,7 @@
#include <kwin.h>
-#include <qcursor.h>
+#include <tqcursor.h>
#include "kgv_miniwidget.h"
#include "kgv_view.h"
@@ -64,25 +64,25 @@ KGVShell::KGVShell() :
/*---- File -----------------------------------------------------------*/
openact =
- KStdAction::open( this, SLOT( slotFileOpen() ),
+ KStdAction::open( this, TQT_SLOT( slotFileOpen() ),
actionCollection() );
recent =
- KStdAction::openRecent( this, SLOT( openURL( const KURL& ) ),
+ KStdAction::openRecent( this, TQT_SLOT( openURL( const KURL& ) ),
actionCollection() );
- KStdAction::print( m_gvpart->document(), SLOT( print() ),
+ KStdAction::print( m_gvpart->document(), TQT_SLOT( print() ),
actionCollection() );
(void)
- KStdAction::quit( this, SLOT( slotQuit() ), actionCollection() );
+ KStdAction::quit( this, TQT_SLOT( slotQuit() ), actionCollection() );
/*---- View -----------------------------------------------------------*/
new KAction( i18n( "&Reload" ), "reload",
KStdAccel::shortcut( KStdAccel::Reload ),
- m_gvpart, SLOT( reloadFile() ),
+ m_gvpart, TQT_SLOT( reloadFile() ),
actionCollection(), "reload" );
new KAction( i18n( "&Maximize" ), Key_M, this,
- SLOT( slotMaximize() ), actionCollection(),
+ TQT_SLOT( slotMaximize() ), actionCollection(),
"maximize");
- _showMenuBarAction = KStdAction::showMenubar( this, SLOT( slotShowMenubar() ), actionCollection() );
+ _showMenuBarAction = KStdAction::showMenubar( this, TQT_SLOT( slotShowMenubar() ), actionCollection() );
/*---- Settings -------------------------------------------------------*/
#if KDE_VERSION >= KDE_MAKE_VERSION(3,1,90)
@@ -91,12 +91,12 @@ KGVShell::KGVShell() :
setAutoSaveSettings();
setStandardToolBarMenuEnabled(true);
#if KDE_VERSION >= KDE_MAKE_VERSION(3,1,90)
- m_fullScreenAction = KStdAction::fullScreen( this, SLOT( slotUpdateFullScreen() ), actionCollection(), this );
+ m_fullScreenAction = KStdAction::fullScreen( this, TQT_SLOT( slotUpdateFullScreen() ), actionCollection(), this );
#else
- m_fullScreenAction = new KToggleAction( this, SLOT( slotUpdateFullScreen() ) );
+ m_fullScreenAction = new KToggleAction( this, TQT_SLOT( slotUpdateFullScreen() ) );
#endif
- KStdAction::configureToolbars( this, SLOT( slotConfigureToolbars() ), actionCollection() );
- KStdAction::keyBindings(guiFactory(), SLOT(configureShortcuts()),
+ KStdAction::configureToolbars( this, TQT_SLOT( slotConfigureToolbars() ), actionCollection() );
+ KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()),
actionCollection());
//_popup = new KPopupMenu( i18n( "Full Screen Options" ), this, "rmb popup" );
@@ -108,21 +108,21 @@ actionCollection());
m_fsFilter = new FullScreenFilter( *this );
// Just save them automatically is destructor. (TODO: of kgv_view!)
- //KStdAction::saveOptions ( this, SLOT (slotWriteSettings()), actionCollection());
+ //KStdAction::saveOptions ( this, TQT_SLOT (slotWriteSettings()), actionCollection());
setXMLFile( "kghostviewui.rc" );
// We could, at the user's option, make this connection and kghostview
// will always resize to fit the width of the page. But, for now,
// let's not.
- // connect ( m_gvpart->widget(), SIGNAL (sizeHintChanged()), this, SLOT (slotResize ()) );
+ // connect ( m_gvpart->widget(), TQT_SIGNAL (sizeHintChanged()), this, TQT_SLOT (slotResize ()) );
setCentralWidget( m_gvpart->widget() );
createGUI( m_gvpart );
- connect( m_gvpart->pageView(), SIGNAL( rightClick() ),SLOT( slotRMBClick() ) );
- connect( m_gvpart, SIGNAL( canceled(const QString&) ),SLOT( slotReset() ) );
- connect( m_gvpart, SIGNAL( completed() ), SLOT( slotDocumentState() ) );
+ connect( m_gvpart->pageView(), TQT_SIGNAL( rightClick() ),TQT_SLOT( slotRMBClick() ) );
+ connect( m_gvpart, TQT_SIGNAL( canceled(const TQString&) ),TQT_SLOT( slotReset() ) );
+ connect( m_gvpart, TQT_SIGNAL( completed() ), TQT_SLOT( slotDocumentState() ) );
if (!initialGeometrySet())
resize(640,400);
@@ -194,17 +194,17 @@ void
KGVShell::readSettings()
{
recent->loadEntries( KGlobal::config() );
- QStringList items = recent->items();
+ TQStringList items = recent->items();
// Code copied from kviewshell.cpp:
// Constant source of annoyance in KDVI < 1.0: the 'recent-files'
// menu contains lots of files which don't exist (any longer). Thus,
// we'll sort out the non-existent files here.
- for ( QStringList::Iterator it = items.begin(); it != items.end(); ++it ) {
+ for ( TQStringList::Iterator it = items.begin(); it != items.end(); ++it ) {
KURL url(*it);
if (url.isLocalFile()) {
- QFileInfo info(url.path());
+ TQFileInfo info(url.path());
if (!info.exists())
recent->removeURL(url);
}
@@ -256,7 +256,7 @@ KGVShell::openStdin()
return;
}
- QByteArray buf( BUFSIZ );
+ TQByteArray buf( BUFSIZ );
int read = 0, wrtn = 0;
while( ( read = fread( buf.data(), sizeof(char), buf.size(), stdin ) )
> 0 ) {
@@ -304,7 +304,7 @@ void KGVShell::slotMaximize()
KWin::setState( winId(), NET::MaxHoriz | NET::MaxVert );
// If we do it now, it comes to nothing since it would work
// on the current (non-maximized) size
- QTimer::singleShot( 800, m_gvpart, SLOT( slotFitToPage() ) );
+ TQTimer::singleShot( 800, m_gvpart, TQT_SLOT( slotFitToPage() ) );
}
void KGVShell::slotResize()
@@ -352,7 +352,7 @@ void KGVShell::slotConfigureToolbars()
{
saveMainWindowSettings( KGlobal::config(), "MainWindow" );
KEditToolbar dlg( factory() );
- connect(&dlg,SIGNAL(newToolbarConfig()),this,SLOT(slotNewToolbarConfig()));
+ connect(&dlg,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig()));
dlg.exec();
}
@@ -363,7 +363,7 @@ void KGVShell::slotNewToolbarConfig()
void KGVShell::slotRMBClick()
{
- _popup->exec( QCursor::pos() );
+ _popup->exec( TQCursor::pos() );
}
diff --git a/kghostview/kgvshell.h b/kghostview/kgvshell.h
index 872430c1..73b7f128 100644
--- a/kghostview/kgvshell.h
+++ b/kghostview/kgvshell.h
@@ -19,11 +19,11 @@
#ifndef __KGVSHELL_H__
#define __KGVSHELL_H__
-#include <qstring.h>
+#include <tqstring.h>
#include <kparts/mainwindow.h>
-class QTimer;
+class TQTimer;
class KRecentFilesAction;
class ScrollBox;
@@ -76,7 +76,7 @@ private:
friend class FullScreenFilter;
KGVPart* m_gvpart;
- QString cwd;
+ TQString cwd;
KAction* openact;
KToggleAction* _showMenuBarAction;
diff --git a/kghostview/kpswidget.cpp b/kghostview/kpswidget.cpp
index b51cda5e..85f22827 100644
--- a/kghostview/kpswidget.cpp
+++ b/kghostview/kpswidget.cpp
@@ -21,7 +21,7 @@
#include <stdlib.h>
#include <math.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -63,9 +63,9 @@ int orientation2angle( CDSC_ORIENTATION_ENUM orientation )
return angle;
}
-QCString palette2String( Configuration::EnumPalette::type palette )
+TQCString palette2String( Configuration::EnumPalette::type palette )
{
- QCString str;
+ TQCString str;
switch( palette )
{
@@ -80,8 +80,8 @@ QCString palette2String( Configuration::EnumPalette::type palette )
}
-KPSWidget::KPSWidget( QWidget* parent, const char* name ) :
- QWidget ( parent, name ),
+KPSWidget::KPSWidget( TQWidget* parent, const char* name ) :
+ TQWidget ( parent, name ),
_gsWindow ( None ),
_usePipe ( false ),
_doubleBuffer ( false ),
@@ -178,7 +178,7 @@ bool KPSWidget::sendPS( FILE* fp, unsigned int begin, unsigned int end )
return true;
}
-void KPSWidget::setGhostscriptPath( const QString& path )
+void KPSWidget::setGhostscriptPath( const TQString& path )
{
kdDebug() << "KPSWidget::setGhostscriptPath( " << path << " )" << endl;
if( _ghostscriptPath != path )
@@ -189,7 +189,7 @@ void KPSWidget::setGhostscriptPath( const QString& path )
}
}
-void KPSWidget::setGhostscriptArguments( const QStringList& arguments )
+void KPSWidget::setGhostscriptArguments( const TQStringList& arguments )
{
if( _ghostscriptArguments != arguments )
{
@@ -199,7 +199,7 @@ void KPSWidget::setGhostscriptArguments( const QStringList& arguments )
}
}
-void KPSWidget::setFileName( const QString& fileName, bool usePipe )
+void KPSWidget::setFileName( const TQString& fileName, bool usePipe )
{
if(( _fileName != fileName ) || (_usePipe != usePipe))
{
@@ -304,7 +304,7 @@ void KPSWidget::setupWidget()
_backgroundPixmap.fill( white );
// The line below is needed to work around certain "features" of styles such as liquid
// see bug:61711 for more info (LPC, 20 Aug '03)
- setBackgroundOrigin( QWidget::WidgetOrigin );
+ setBackgroundOrigin( TQWidget::WidgetOrigin );
setErasePixmap( _backgroundPixmap );
}
@@ -343,8 +343,8 @@ bool KPSWidget::startInterpreter()
setupWidget();
_process = new KProcess;
- if ( _doubleBuffer ) _process->setEnvironment( "GHOSTVIEW", QString( "%1 %2" ).arg( winId() ).arg( _backgroundPixmap.handle() ) );
- else _process->setEnvironment( "GHOSTVIEW", QString::number( winId() ) );
+ if ( _doubleBuffer ) _process->setEnvironment( "GHOSTVIEW", TQString( "%1 %2" ).arg( winId() ).arg( _backgroundPixmap.handle() ) );
+ else _process->setEnvironment( "GHOSTVIEW", TQString::number( winId() ) );
*_process << _ghostscriptPath.local8Bit();
*_process << _ghostscriptArguments;
@@ -358,14 +358,14 @@ bool KPSWidget::startInterpreter()
else
*_process << _fileName << "-c" << "quit";
- connect( _process, SIGNAL( processExited( KProcess* ) ),
- this, SLOT( slotProcessExited( KProcess* ) ) );
- connect( _process, SIGNAL( receivedStdout( KProcess*, char*, int ) ),
- this, SLOT( gs_output( KProcess*, char*, int ) ) );
- connect( _process, SIGNAL( receivedStderr( KProcess*, char*, int ) ),
- this, SLOT( gs_output( KProcess*, char*, int ) ) );
- connect( _process, SIGNAL( wroteStdin( KProcess*) ),
- this, SLOT( gs_input( KProcess* ) ) );
+ connect( _process, TQT_SIGNAL( processExited( KProcess* ) ),
+ this, TQT_SLOT( slotProcessExited( KProcess* ) ) );
+ connect( _process, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ),
+ this, TQT_SLOT( gs_output( KProcess*, char*, int ) ) );
+ connect( _process, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ),
+ this, TQT_SLOT( gs_output( KProcess*, char*, int ) ) );
+ connect( _process, TQT_SIGNAL( wroteStdin( KProcess*) ),
+ this, TQT_SLOT( gs_input( KProcess* ) ) );
kapp->flushX();
@@ -420,9 +420,9 @@ void KPSWidget::slotProcessExited( KProcess* process )
{
kdDebug( 4500 ) << "KPSWidget::slotProcessExited(): looks like it was not a clean exit." << endl;
if ( process->normalExit() ) {
- emit ghostscriptError( QString( i18n( "Exited with error code %1." ).arg( process->exitStatus() ) ) );
+ emit ghostscriptError( TQString( i18n( "Exited with error code %1." ).arg( process->exitStatus() ) ) );
} else {
- emit ghostscriptError( QString( i18n( "Process killed or crashed." ) ) );
+ emit ghostscriptError( TQString( i18n( "Process killed or crashed." ) ) );
}
_process = 0;
stopInterpreter();
@@ -483,12 +483,12 @@ void KPSWidget::readSettings()
{
setGhostscriptPath( Configuration::interpreter() );
- QStringList arguments;
+ TQStringList arguments;
if( Configuration::antialiasing() )
- arguments = QStringList::split( " ", Configuration::antialiasingArguments() );
+ arguments = TQStringList::split( " ", Configuration::antialiasingArguments() );
else
- arguments = QStringList::split( " ", Configuration::nonAntialiasingArguments() );
+ arguments = TQStringList::split( " ", Configuration::nonAntialiasingArguments() );
if( !Configuration::platformFonts() )
arguments << "-dNOPLATFONTS";
@@ -522,7 +522,7 @@ bool KPSWidget::x11Event( XEvent* e )
return true;
}
}
- return QWidget::x11Event( e );
+ return TQWidget::x11Event( e );
}
#include "kpswidget.moc"
diff --git a/kghostview/kpswidget.h b/kghostview/kpswidget.h
index 66ef0b14..c2ca49cb 100644
--- a/kghostview/kpswidget.h
+++ b/kghostview/kpswidget.h
@@ -20,10 +20,10 @@
#define __KPSWIDGET_H__
#include <queue>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qwidget.h>
-#include <qpixmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
#include "dscparse_adapter.h"
#include "configuration.h"
@@ -48,7 +48,7 @@ class KPSWidget : public QWidget
Q_OBJECT
public:
- KPSWidget( QWidget* parent = 0, const char* name = 0 );
+ KPSWidget( TQWidget* parent = 0, const char* name = 0 );
~KPSWidget();
/**
@@ -100,7 +100,7 @@ public:
* @p usePipe indicates whether we use a pipe for
* communication or let ghoscript read the file itself.
*/
- void setFileName( const QString&, bool usePipe );
+ void setFileName( const TQString&, bool usePipe );
/**
* Set the bounding box of the drawable. See my comment in the source
@@ -154,7 +154,7 @@ signals:
*
* Don't change the pixmap or bad things will happen. This is the backing pixmap of the display.
*/
- void newPageImage( QPixmap image );
+ void newPageImage( TQPixmap image );
/**
* This signal is emitted whenever the ghostscript process has
@@ -167,7 +167,7 @@ signals:
*
* @param msg a <strong>translated</strong> error message to display the user which may be null if we cannot tell anything important
*/
- void ghostscriptError( const QString& mgs );
+ void ghostscriptError( const TQString& mgs );
protected:
struct Record
@@ -180,7 +180,7 @@ protected:
unsigned int len;
};
- // void resizeEvent( QResizeEvent* );
+ // void resizeEvent( TQResizeEvent* );
bool x11Event( XEvent* );
/**
@@ -195,8 +195,8 @@ protected:
*/
void setupWidget();
- void setGhostscriptPath( const QString& );
- void setGhostscriptArguments( const QStringList& );
+ void setGhostscriptPath( const TQString& );
+ void setGhostscriptArguments( const TQStringList& );
void setPalette( Configuration::EnumPalette::type );
protected slots:
@@ -211,15 +211,15 @@ private:
enum AtomName { GHOSTVIEW = 0, GHOSTVIEW_COLORS, NEXT, PAGE, DONE };
Atom _atoms[5];
- QPixmap _backgroundPixmap;
+ TQPixmap _backgroundPixmap;
/**
* The following properties determine how Ghostscript is started.
* If any of these is changed, Ghostscript needs to be restarted.
*/
- QString _ghostscriptPath;
- QStringList _ghostscriptArguments;
- QString _fileName;
+ TQString _ghostscriptPath;
+ TQStringList _ghostscriptArguments;
+ TQString _fileName;
bool _usePipe;
bool _doubleBuffer;
diff --git a/kghostview/logwindow.cpp b/kghostview/logwindow.cpp
index df2e5765..69c61ac3 100644
--- a/kghostview/logwindow.cpp
+++ b/kghostview/logwindow.cpp
@@ -16,9 +16,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qtextedit.h>
-#include <qlabel.h>
-#include <qvbox.h>
+#include <tqtextedit.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
#include <kglobalsettings.h>
#include <kurllabel.h>
@@ -26,35 +26,35 @@
#include "logwindow.h"
-LogWindow::LogWindow( const QString& caption,
- QWidget* parent, const char* name) :
+LogWindow::LogWindow( const TQString& caption,
+ TQWidget* parent, const char* name) :
KDialogBase( parent, name, false, caption, User1|Close, Close, false,
KStdGuiItem::clear() )
{
- QVBox * display = makeVBoxMainWidget();
+ TQVBox * display = makeVBoxMainWidget();
- _errorIndication = new QLabel( "", display, "logview-label" );
+ _errorIndication = new TQLabel( "", display, "logview-label" );
_errorIndication->hide();
- _configureGS = new KURLLabel( i18n( "Configure Ghostscript" ), QString::null, display );
+ _configureGS = new KURLLabel( i18n( "Configure Ghostscript" ), TQString::null, display );
_configureGS->hide();
- _logView = new QTextEdit( display, "logview" );
+ _logView = new TQTextEdit( display, "logview" );
_logView->setTextFormat( Qt::PlainText );
_logView->setReadOnly( true );
- _logView->setWordWrap( QTextEdit::NoWrap );
+ _logView->setWordWrap( TQTextEdit::NoWrap );
_logView->setFont( KGlobalSettings::fixedFont() );
_logView->setMinimumWidth( 80 * fontMetrics().width( " " ) );
- connect( this, SIGNAL( user1Clicked() ), SLOT( clear() ) );
- connect( _configureGS, SIGNAL( leftClickedURL() ), SLOT( emitConfigureGS() ) );
+ connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( clear() ) );
+ connect( _configureGS, TQT_SIGNAL( leftClickedURL() ), TQT_SLOT( emitConfigureGS() ) );
}
void LogWindow::emitConfigureGS() {
emit configureGS();
}
-void LogWindow::append( const QString& message )
+void LogWindow::append( const TQString& message )
{
_logView->append( message );
}
@@ -65,7 +65,7 @@ void LogWindow::clear()
_errorIndication->clear();
}
-void LogWindow::setLabel( const QString& text, bool showConfigureGS )
+void LogWindow::setLabel( const TQString& text, bool showConfigureGS )
{
_errorIndication->setText( text );
_errorIndication->show();
diff --git a/kghostview/logwindow.h b/kghostview/logwindow.h
index 4eb099e0..7be4bf98 100644
--- a/kghostview/logwindow.h
+++ b/kghostview/logwindow.h
@@ -21,8 +21,8 @@
#include <kdialogbase.h>
-class QLabel;
-class QTextEdit;
+class TQLabel;
+class TQTextEdit;
class KURLLabel;
class LogWindow : public KDialogBase
@@ -30,13 +30,13 @@ class LogWindow : public KDialogBase
Q_OBJECT
public:
- LogWindow( const QString& caption,
- QWidget* parent = 0, const char* name = 0 );
+ LogWindow( const TQString& caption,
+ TQWidget* parent = 0, const char* name = 0 );
public slots:
- void append( const QString& message );
+ void append( const TQString& message );
void clear();
- void setLabel( const QString&, bool showConfigureGSLink );
+ void setLabel( const TQString&, bool showConfigureGSLink );
private slots:
void emitConfigureGS();
@@ -45,8 +45,8 @@ signals:
void configureGS();
private:
- QLabel* _errorIndication;
- QTextEdit* _logView;
+ TQLabel* _errorIndication;
+ TQTextEdit* _logView;
KURLLabel* _configureGS;
};
diff --git a/kghostview/main.cpp b/kghostview/main.cpp
index 26574ddf..327a5be5 100644
--- a/kghostview/main.cpp
+++ b/kghostview/main.cpp
@@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
+#include <tqdir.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -55,7 +55,7 @@ int main( int argc, char** argv )
else {
KGVShell* shell = new KGVShell;
if( args->count() == 1 ) {
- if( QString( args->arg(0) ) == "-" ) {
+ if( TQString( args->arg(0) ) == "-" ) {
shell->openStdin();
} else {
shell->openURL( args->url(0) );
diff --git a/kghostview/marklist.cpp b/kghostview/marklist.cpp
index 674630ed..df06bd9d 100644
--- a/kghostview/marklist.cpp
+++ b/kghostview/marklist.cpp
@@ -20,11 +20,11 @@
#include <cassert>
-#include <qimage.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qlabel.h>
-#include <qwhatsthis.h>
+#include <tqimage.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqlabel.h>
+#include <tqwhatsthis.h>
#include <kglobalsettings.h>
#include <klocale.h>
@@ -32,23 +32,23 @@
#include "kgv_miniwidget.h"
-MarkListItem::MarkListItem(QWidget *parent, const QString &text, const QString &tip, const QColor &color, KGVMiniWidget* miniW, int pageNum)
- : QWidget( parent ),
+MarkListItem::MarkListItem(TQWidget *parent, const TQString &text, const TQString &tip, const TQColor &color, KGVMiniWidget* miniW, int pageNum)
+ : TQWidget( parent ),
_miniWidget( miniW ),
_pageNum( pageNum ),
_requested( false )
{
//kdDebug( 4500 ) << "MarkListItem::MarkListItem( _ , " << text <<" , " << tip << " , " << color << ", _ ," << pageNum << " )" << endl;
- QBoxLayout *l = new QVBoxLayout( this, 5, 0 );
- _thumbnailW = new QWidget( this );
- _checkBox = new QCheckBox( text, this );
+ TQBoxLayout *l = new TQVBoxLayout( this, 5, 0 );
+ _thumbnailW = new TQWidget( this );
+ _checkBox = new TQCheckBox( text, this );
l->addWidget( _thumbnailW, 1 );
l->addWidget( _checkBox, 0, Qt::AlignHCenter );
- QWhatsThis::add( _checkBox, i18n( "Using this checkbox you can select pages for printing." ) );
+ TQWhatsThis::add( _checkBox, i18n( "Using this checkbox you can select pages for printing." ) );
setFixedHeight( 100 );
_backgroundColor = color;
setPaletteBackgroundColor( _backgroundColor );
- QToolTip::add(this, tip);
+ TQToolTip::add(this, tip);
// TODO: Put a little page number or other place-holder when there is no thumbnail to display.
}
@@ -67,11 +67,11 @@ void MarkListItem::setChecked( bool checked )
_checkBox->setChecked(checked);
}
-void MarkListItem::setPixmap( QPixmap thumbnail )
+void MarkListItem::setPixmap( TQPixmap thumbnail )
{
// The line below is needed to work around certain "features" of styles such as liquid
// see bug:61711 for more info (LPC, 20 Aug '03)
- _thumbnailW->setBackgroundOrigin( QWidget::WidgetOrigin );
+ _thumbnailW->setBackgroundOrigin( TQWidget::WidgetOrigin );
_thumbnailW->setPaletteBackgroundPixmap( thumbnail.convertToImage().smoothScale( _thumbnailW->size() ) );
_requested = false;
}
@@ -79,18 +79,18 @@ void MarkListItem::setPixmap( QPixmap thumbnail )
void MarkListItem::setSelected( bool selected )
{
if (selected)
- setPaletteBackgroundColor( QApplication::palette().active().highlight() );
+ setPaletteBackgroundColor( TQApplication::palette().active().highlight() );
else
setPaletteBackgroundColor( _backgroundColor );
}
-void MarkListItem::resizeEvent( QResizeEvent * )
+void MarkListItem::resizeEvent( TQResizeEvent * )
{
if ( _thumbnailW->paletteBackgroundPixmap() )
_thumbnailW->setPaletteBackgroundPixmap( _thumbnailW->paletteBackgroundPixmap()->convertToImage().smoothScale( _thumbnailW->size() ) );
}
-void MarkListItem::paintEvent( QPaintEvent* )
+void MarkListItem::paintEvent( TQPaintEvent* )
{
/* TODO:
* We should cancel things which flipped into view and then flipped out.
@@ -100,7 +100,7 @@ void MarkListItem::paintEvent( QPaintEvent* )
*/
if ( _requested ) return;
if ( !_thumbnailW->paletteBackgroundPixmap() || _thumbnailW->paletteBackgroundPixmap()->isNull() ) {
- _miniWidget->getThumbnailService()->delayedGetThumbnail( _pageNum, this, SLOT( setPixmap( QPixmap ) ) );
+ _miniWidget->getThumbnailService()->delayedGetThumbnail( _pageNum, this, TQT_SLOT( setPixmap( TQPixmap ) ) );
_requested = true;
}
}
@@ -108,8 +108,8 @@ void MarkListItem::paintEvent( QPaintEvent* )
/* MarkList */
-MarkList::MarkList( QWidget* parent, const char* name, KGVMiniWidget* mini)
- : QTable( parent, name ),
+MarkList::MarkList( TQWidget* parent, const char* name, KGVMiniWidget* mini)
+ : TQTable( parent, name ),
_selected ( -1 ),
_miniWidget( mini )
{
@@ -117,13 +117,13 @@ _miniWidget( mini )
setLeftMargin( 0 ); // we don't want the vertical header
horizontalHeader()->setLabel( 0, i18n("Page") );
- connect( this, SIGNAL( currentChanged( int, int ) ),
- this, SIGNAL( selected( int ) ) );
+ connect( this, TQT_SIGNAL( currentChanged( int, int ) ),
+ this, TQT_SIGNAL( selected( int ) ) );
}
-QValueList<int> MarkList::markList() const
+TQValueList<int> MarkList::markList() const
{
- QValueList<int> list;
+ TQValueList<int> list;
MarkListItem *_item;
for(int i = 0; i < numRows(); i++)
{
@@ -134,7 +134,7 @@ QValueList<int> MarkList::markList() const
return list;
}
-void MarkList::insertItem( const QString& text, int index, const QString& tip)
+void MarkList::insertItem( const TQString& text, int index, const TQString& tip)
{
MarkListItem *_item;
_item = new MarkListItem( this, text, tip, viewport()->paletteBackgroundColor(), _miniWidget, index );
@@ -224,7 +224,7 @@ void MarkList::removeMarks()
}
}
-void MarkList::viewportResizeEvent ( QResizeEvent * )
+void MarkList::viewportResizeEvent ( TQResizeEvent * )
{
MarkListItem *_item;
if( visibleWidth() != columnWidth( 0 ) )
diff --git a/kghostview/marklist.h b/kghostview/marklist.h
index 18589af3..4405f877 100644
--- a/kghostview/marklist.h
+++ b/kghostview/marklist.h
@@ -19,8 +19,8 @@
#ifndef MARKLIST_H
#define MARKLIST_H
-#include <qcheckbox.h>
-#include <qtable.h>
+#include <tqcheckbox.h>
+#include <tqtable.h>
class KGVMiniWidget;
@@ -28,24 +28,24 @@ class MarkListItem : public QWidget
{
Q_OBJECT
public:
- MarkListItem( QWidget *parent, const QString &text, const QString &tip, const QColor &color, KGVMiniWidget*, int );
+ MarkListItem( TQWidget *parent, const TQString &text, const TQString &tip, const TQColor &color, KGVMiniWidget*, int );
bool isChecked() const;
public slots:
void toggle();
void setChecked( bool checked );
- void setPixmap( QPixmap thumbnail );
+ void setPixmap( TQPixmap thumbnail );
void setSelected( bool selected );
private:
- void resizeEvent( QResizeEvent * );
- void paintEvent( QPaintEvent* );
+ void resizeEvent( TQResizeEvent * );
+ void paintEvent( TQPaintEvent* );
private:
- QWidget *_thumbnailW;
- QCheckBox *_checkBox;
- QColor _backgroundColor;
+ TQWidget *_thumbnailW;
+ TQCheckBox *_checkBox;
+ TQColor _backgroundColor;
KGVMiniWidget* _miniWidget;
const int _pageNum;
bool _requested;
@@ -56,11 +56,11 @@ class MarkList: public QTable
Q_OBJECT
public:
- MarkList( QWidget* parent = 0, const char* name = 0, KGVMiniWidget* = 0 );
+ MarkList( TQWidget* parent = 0, const char* name = 0, KGVMiniWidget* = 0 );
- QValueList<int> markList() const;
- void insertItem( const QString& text, int index = -1,
- const QString& tip = QString::null );
+ TQValueList<int> markList() const;
+ void insertItem( const TQString& text, int index = -1,
+ const TQString& tip = TQString::null );
public slots:
void select( int index );
@@ -73,7 +73,7 @@ public slots:
void clear();
protected:
- virtual void viewportResizeEvent ( QResizeEvent * );
+ virtual void viewportResizeEvent ( TQResizeEvent * );
signals:
void selected( int );
diff --git a/kghostview/scrollbox.cpp b/kghostview/scrollbox.cpp
index 8be3ab61..d318ec31 100644
--- a/kghostview/scrollbox.cpp
+++ b/kghostview/scrollbox.cpp
@@ -16,19 +16,19 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qdrawutil.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqdrawutil.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include "scrollbox.h"
-ScrollBox::ScrollBox( QWidget* parent, const char* name )
- : QFrame( parent, name )
+ScrollBox::ScrollBox( TQWidget* parent, const char* name )
+ : TQFrame( parent, name )
{
setFrameStyle( Panel | Sunken );
}
-void ScrollBox::mousePressEvent( QMouseEvent* e )
+void ScrollBox::mousePressEvent( TQMouseEvent* e )
{
mouse = e->pos();
if( e->button() == RightButton )
@@ -37,7 +37,7 @@ void ScrollBox::mousePressEvent( QMouseEvent* e )
emit button2Pressed();
}
-void ScrollBox::mouseMoveEvent( QMouseEvent* e )
+void ScrollBox::mouseMoveEvent( TQMouseEvent* e )
{
if( e->state() != LeftButton )
return;
@@ -47,21 +47,21 @@ void ScrollBox::mouseMoveEvent( QMouseEvent* e )
// Notify the word what the view position has changed
// The word in turn will notify as that view position has changed
- // Even if coordinates are out of range QScrollView handles
+ // Even if coordinates are out of range TQScrollView handles
// this properly
- emit valueChanged( QPoint( viewpos.x() + dx, viewpos.y() + dy ) );
+ emit valueChanged( TQPoint( viewpos.x() + dx, viewpos.y() + dy ) );
emit valueChangedRelative( dx, dy );
mouse = e->pos();
}
-void ScrollBox::resizeEvent( QResizeEvent * )
+void ScrollBox::resizeEvent( TQResizeEvent * )
{
if ( paletteBackgroundPixmap() )
setPaletteBackgroundPixmap( paletteBackgroundPixmap()->convertToImage().smoothScale( size() ) );
}
-void ScrollBox::drawContents( QPainter* paint )
+void ScrollBox::drawContents( TQPainter* paint )
{
if ( pagesize.isEmpty() )
return;
@@ -75,7 +75,7 @@ void ScrollBox::drawContents( QPainter* paint )
*
*/
- QRect c( contentsRect() );
+ TQRect c( contentsRect() );
paint -> setPen( Qt::red );
@@ -92,30 +92,30 @@ void ScrollBox::drawContents( QPainter* paint )
paint->drawRect( x, y, w, h );
}
-void ScrollBox::setPageSize( const QSize& s )
+void ScrollBox::setPageSize( const TQSize& s )
{
pagesize = s;
setFixedHeight( s.height() * width() / s.width() );
repaint();
}
-void ScrollBox::setViewSize( const QSize& s )
+void ScrollBox::setViewSize( const TQSize& s )
{
viewsize = s;
repaint();
}
-void ScrollBox::setViewPos( const QPoint& pos )
+void ScrollBox::setViewPos( const TQPoint& pos )
{
viewpos = pos;
repaint();
}
-void ScrollBox::setThumbnail( QPixmap img )
+void ScrollBox::setThumbnail( TQPixmap img )
{
// The line below is needed to work around certain "features" of styles such as liquid
// see bug:61711 for more info (LPC, 20 Aug '03)
- setBackgroundOrigin( QWidget::WidgetOrigin );
+ setBackgroundOrigin( TQWidget::WidgetOrigin );
setPaletteBackgroundPixmap( img.convertToImage().smoothScale( size() ) );
}
diff --git a/kghostview/scrollbox.h b/kghostview/scrollbox.h
index a815c655..487e2c7e 100644
--- a/kghostview/scrollbox.h
+++ b/kghostview/scrollbox.h
@@ -19,40 +19,40 @@
#ifndef __SCROLLBOX_H__
#define __SCROLLBOX_H__
-#include <qframe.h>
-#include <qimage.h>
+#include <tqframe.h>
+#include <tqimage.h>
class ScrollBox: public QFrame
{
Q_OBJECT
public:
- ScrollBox( QWidget* parent = 0, const char* name = 0 );
+ ScrollBox( TQWidget* parent = 0, const char* name = 0 );
public slots:
- void setPageSize( const QSize& );
- void setViewSize( const QSize& );
- void setViewPos( const QPoint& );
- void setViewPos( int x, int y ) { setViewPos( QPoint( x, y ) ); }
- void setThumbnail( QPixmap img );
+ void setPageSize( const TQSize& );
+ void setViewSize( const TQSize& );
+ void setViewPos( const TQPoint& );
+ void setViewPos( int x, int y ) { setViewPos( TQPoint( x, y ) ); }
+ void setThumbnail( TQPixmap img );
void clear();
signals:
- void valueChanged( const QPoint& );
+ void valueChanged( const TQPoint& );
void valueChangedRelative( int dx, int dy );
void button2Pressed();
void button3Pressed();
protected:
- void mousePressEvent( QMouseEvent *);
- void mouseMoveEvent( QMouseEvent *);
- void drawContents( QPainter *);
- void resizeEvent( QResizeEvent * );
+ void mousePressEvent( TQMouseEvent *);
+ void mouseMoveEvent( TQMouseEvent *);
+ void drawContents( TQPainter *);
+ void resizeEvent( TQResizeEvent * );
private:
- QPoint viewpos, mouse;
- QSize pagesize;
- QSize viewsize;
+ TQPoint viewpos, mouse;
+ TQSize pagesize;
+ TQSize viewsize;
};
#endif
diff --git a/kghostview/thumbnailservice.cpp b/kghostview/thumbnailservice.cpp
index 4d653cfa..817d1c03 100644
--- a/kghostview/thumbnailservice.cpp
+++ b/kghostview/thumbnailservice.cpp
@@ -23,22 +23,22 @@
#include "kgv_view.h"
#include <kdebug.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <algorithm>
#include <cassert>
#include <cstring>
ThumbnailService::ThumbnailService( KGVMiniWidget* parent, const char* name ) :
- QObject( parent, name ),
+ TQObject( parent, name ),
_mini( parent ),
- timer_( new QTimer( this ) ),
+ timer_( new TQTimer( this ) ),
_busy( false ),
_enabled( false )
{
_thumbnailDrawer = new KPSWidget( parent->_part->widget(), "thumbnail-drawer" );
_thumbnailDrawer->readSettings();
- connect( _thumbnailDrawer, SIGNAL( newPageImage( QPixmap ) ), SLOT( slotDone( QPixmap ) ) );
- connect( timer_, SIGNAL( timeout() ), SLOT( processOne() ) );
+ connect( _thumbnailDrawer, TQT_SIGNAL( newPageImage( TQPixmap ) ), TQT_SLOT( slotDone( TQPixmap ) ) );
+ connect( timer_, TQT_SIGNAL( timeout() ), TQT_SLOT( processOne() ) );
_thumbnailDrawer->hide();
}
@@ -51,12 +51,12 @@ bool ThumbnailService::Request::operator < ( ThumbnailService::Request b ) const
if ( urgent != b.urgent ) return urgent;
if ( page != b.page ) return page < b.page;
// below is just so that == can be in terms of "<"
- if ( receiver != b.receiver ) return std::less<QObject*>()( receiver, b.receiver );
+ if ( receiver != b.receiver ) return std::less<TQObject*>()( receiver, b.receiver );
if ( slot != b.slot ) return std::strcmp( slot, b.slot ) < 0;
return false;
}
-void ThumbnailService::delayedGetThumbnail( const int page, QObject* rec, const char* slot, bool urgent )
+void ThumbnailService::delayedGetThumbnail( const int page, TQObject* rec, const char* slot, bool urgent )
{
kdDebug( 4500 ) << "ThumbnailService::delayedGetThumbnail: request for page " << page << endl;
pending.insert( Request( page, rec, slot, urgent ) );
@@ -71,7 +71,7 @@ void ThumbnailService::delayedGetThumbnail( const int page, QObject* rec, const
}
}
-void ThumbnailService::cancelRequests( const int page, QObject* rec, const char* slot )
+void ThumbnailService::cancelRequests( const int page, TQObject* rec, const char* slot )
{
std::set<Request>::iterator first = pending.begin(), last = pending.end();
while ( first != last ) {
@@ -106,7 +106,7 @@ void ThumbnailService::setEnabled( const bool e )
if ( _enabled && _busy ) processOne();
}
-void ThumbnailService::slotDone( QPixmap pix )
+void ThumbnailService::slotDone( TQPixmap pix )
{
kdDebug( 4500 ) << "ThumbnailService::slotDone(): got page" << endl;
pix.detach();
@@ -133,10 +133,10 @@ void ThumbnailService::processOne()
FILE* file = _mini->psFile();
Request req = *pending.begin();
kdDebug( 4500 ) << "ThumbnailService::processOne(): processing " << req.page << "(of " << pending.size() << " requests)" << endl;
- disconnect( SIGNAL( relayPixmap( QPixmap ) ) );
+ disconnect( TQT_SIGNAL( relayPixmap( TQPixmap ) ) );
while ( !pending.empty() && req.page == pending.begin()->page ) {
req = *pending.begin();
- connect( this, SIGNAL( relayPixmap( QPixmap ) ), req.receiver, req.slot );
+ connect( this, TQT_SIGNAL( relayPixmap( TQPixmap ) ), req.receiver, req.slot );
pending.erase( pending.begin() );
}
_thumbnailDrawer->setOrientation( _mini->orientation( req.page ) );
diff --git a/kghostview/thumbnailservice.h b/kghostview/thumbnailservice.h
index d1981242..50bc2d6d 100644
--- a/kghostview/thumbnailservice.h
+++ b/kghostview/thumbnailservice.h
@@ -19,23 +19,23 @@
*/
#include <set>
-#include <qobject.h>
-#include <qpixmap.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqpixmap.h>
+#include <tqguardedptr.h>
#include <stdio.h>
class KPSWidget;
class KGVMiniWidget;
-class QTimer;
+class TQTimer;
-class ThumbnailService : public QObject {
+class ThumbnailService : public TQObject {
Q_OBJECT
public:
ThumbnailService( KGVMiniWidget* parent, const char* name = 0 );
~ThumbnailService();
public slots:
- void delayedGetThumbnail( int page, QObject* receiver, const char* slot, bool urgent = false );
+ void delayedGetThumbnail( int page, TQObject* receiver, const char* slot, bool urgent = false );
/**
* Cancels the request matching the signature below.
*
@@ -43,7 +43,7 @@ class ThumbnailService : public QObject {
* @param receiver the receiver. Use null for wildcard
* @param slot Use null for wildcard
*/
- void cancelRequests( int page, QObject* receiver, const char* slot);
+ void cancelRequests( int page, TQObject* receiver, const char* slot);
void reset();
/**
@@ -58,31 +58,31 @@ class ThumbnailService : public QObject {
/**
* Don't connect to this directly
*/
- void relayPixmap( QPixmap );
+ void relayPixmap( TQPixmap );
private slots:
- void slotDone( QPixmap );
+ void slotDone( TQPixmap );
void processOne();
private:
struct Request {
- Request( int p, QObject* r, const char* s ) :
+ Request( int p, TQObject* r, const char* s ) :
page( p ), receiver( r ), slot( s ), urgent( false ) { }
- Request( int p, QObject* r, const char* s, bool u ) :
+ Request( int p, TQObject* r, const char* s, bool u ) :
page( p ), receiver( r ), slot( s ), urgent( u ) { }
int page;
- QObject* receiver;
+ TQObject* receiver;
const char* slot;
bool urgent;
bool operator < ( Request ) const;
};
static bool pageCmp( Request, Request );
std::set<Request> pending;
- QGuardedPtr<KPSWidget> _thumbnailDrawer;
+ TQGuardedPtr<KPSWidget> _thumbnailDrawer;
KGVMiniWidget* _mini;
- QTimer* timer_;
+ TQTimer* timer_;
bool _busy;
bool _enabled;
};
diff --git a/kghostview/viewcontrol.cpp b/kghostview/viewcontrol.cpp
index cc66d598..1740bf4d 100644
--- a/kghostview/viewcontrol.cpp
+++ b/kghostview/viewcontrol.cpp
@@ -9,12 +9,12 @@
**
*****************************************************************************/
-#include <qcombobox.h>
-#include <qframe.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
+#include <tqcombobox.h>
+#include <tqframe.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
#include "viewcontrol.h"
@@ -25,22 +25,22 @@
#include <kbuttonbox.h>
#include <kseparator.h>
-ViewControl::ViewControl( QWidget *parent, const char *name )
- : QDialog( parent, name )
+ViewControl::ViewControl( TQWidget *parent, const char *name )
+ : TQDialog( parent, name )
{
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQWidget::StrongFocus);
- QBoxLayout *topLayout = new QVBoxLayout( this, 10 );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this, 10 );
- QGroupBox* vcGroupBox;
- vcGroupBox = new QGroupBox( this );
- vcGroupBox->setFrameStyle( QFrame::NoFrame );
+ TQGroupBox* vcGroupBox;
+ vcGroupBox = new TQGroupBox( this );
+ vcGroupBox->setFrameStyle( TQFrame::NoFrame );
//vcGroupBox->setTitle( i18n("Force Changes To") );
//vcGroupBox->setAlignment( 1 );
topLayout->addWidget( vcGroupBox, 10 );
- QGridLayout *grid = new QGridLayout( vcGroupBox, 3, 2, 10 );
+ TQGridLayout *grid = new TQGridLayout( vcGroupBox, 3, 2, 10 );
grid->setRowStretch(0,0);
grid->setRowStretch(1,10);
@@ -50,41 +50,41 @@ ViewControl::ViewControl( QWidget *parent, const char *name )
grid->setColStretch(1,10);
- magComboBox = new QComboBox( FALSE, vcGroupBox );
+ magComboBox = new TQComboBox( FALSE, vcGroupBox );
magComboBox->setFixedHeight( magComboBox->sizeHint().height() );
//magComboBox->hide();
- connect ( magComboBox, SIGNAL (activated (int)),
- this, SLOT (slotMagSelection (int)) );
+ connect ( magComboBox, TQT_SIGNAL (activated (int)),
+ this, TQT_SLOT (slotMagSelection (int)) );
grid->addWidget( magComboBox, 0, 1 );
- mediaComboBox = new QComboBox( FALSE, vcGroupBox );
+ mediaComboBox = new TQComboBox( FALSE, vcGroupBox );
mediaComboBox->setFixedHeight( magComboBox->sizeHint().height() );
- connect ( mediaComboBox, SIGNAL (activated (int)),
- this, SLOT (slotMediaSelection (int)) );
+ connect ( mediaComboBox, TQT_SIGNAL (activated (int)),
+ this, TQT_SLOT (slotMediaSelection (int)) );
grid->addWidget( mediaComboBox, 1, 1 );
- orientComboBox = new QComboBox( FALSE, vcGroupBox );
+ orientComboBox = new TQComboBox( FALSE, vcGroupBox );
orientComboBox->insertItem(i18n("Portrait"));
orientComboBox->insertItem(i18n("Landscape"));
orientComboBox->insertItem(i18n("Seascape"));
orientComboBox->insertItem(i18n("Upside Down"));
orientComboBox->setFixedHeight( magComboBox->sizeHint().height() );
- connect ( orientComboBox, SIGNAL (activated (int)),
- this, SLOT (slotOrientSelection (int)) );
+ connect ( orientComboBox, TQT_SIGNAL (activated (int)),
+ this, TQT_SLOT (slotOrientSelection (int)) );
grid->addWidget( orientComboBox, 2, 1 );
int labelWidth = 0;
- QLabel* vcLabel;
- vcLabel = new QLabel( magComboBox, i18n("&Magnification"), vcGroupBox );
+ TQLabel* vcLabel;
+ vcLabel = new TQLabel( magComboBox, i18n("&Magnification"), vcGroupBox );
vcLabel->setAlignment( AlignRight | AlignVCenter | ShowPrefix );
if ( vcLabel->sizeHint().width() > labelWidth )
labelWidth = vcLabel->sizeHint().width();
@@ -95,7 +95,7 @@ ViewControl::ViewControl( QWidget *parent, const char *name )
grid->addWidget( vcLabel, 0, 0 );
- vcLabel = new QLabel( mediaComboBox, i18n("M&edia"), vcGroupBox );
+ vcLabel = new TQLabel( mediaComboBox, i18n("M&edia"), vcGroupBox );
vcLabel->setAlignment( AlignRight | AlignVCenter | ShowPrefix );
if ( vcLabel->sizeHint().width() > labelWidth )
labelWidth = vcLabel->sizeHint().width();
@@ -103,7 +103,7 @@ ViewControl::ViewControl( QWidget *parent, const char *name )
grid->addWidget( vcLabel, 1, 0 );
- vcLabel = new QLabel( orientComboBox, i18n("&Orientation"), vcGroupBox );
+ vcLabel = new TQLabel( orientComboBox, i18n("&Orientation"), vcGroupBox );
vcLabel->setAlignment( AlignRight | AlignVCenter | ShowPrefix );
if ( vcLabel->sizeHint().width() > labelWidth )
labelWidth = vcLabel->sizeHint().width();
@@ -124,10 +124,10 @@ ViewControl::ViewControl( QWidget *parent, const char *name )
bbox->addStretch( 10 );
apply = bbox->addButton( KStdGuiItem::apply() );
- connect( apply, SIGNAL(clicked()), SLOT(slotApplyClicked()) );
+ connect( apply, TQT_SIGNAL(clicked()), TQT_SLOT(slotApplyClicked()) );
- QPushButton *closebtn = bbox->addButton( KStdGuiItem::close() );
- connect( closebtn, SIGNAL(clicked()), SLOT(reject()) );
+ TQPushButton *closebtn = bbox->addButton( KStdGuiItem::close() );
+ connect( closebtn, TQT_SIGNAL(clicked()), TQT_SLOT(reject()) );
bbox->layout();
diff --git a/kghostview/viewcontrol.h b/kghostview/viewcontrol.h
index 3e8bcd70..de766247 100644
--- a/kghostview/viewcontrol.h
+++ b/kghostview/viewcontrol.h
@@ -1,20 +1,20 @@
#ifndef VIEWCONTROL_H
#define VIEWCONTROL_H
-#include <qdialog.h>
-class QComboBox;
-class QPushButton;
+#include <tqdialog.h>
+class TQComboBox;
+class TQPushButton;
class ViewControl : public QDialog
{
Q_OBJECT
public:
- ViewControl( QWidget *parent, const char *name );
- QComboBox* magComboBox;
- QComboBox* mediaComboBox;
- QComboBox* orientComboBox;
- QPushButton *apply;
+ ViewControl( TQWidget *parent, const char *name );
+ TQComboBox* magComboBox;
+ TQComboBox* mediaComboBox;
+ TQComboBox* orientComboBox;
+ TQPushButton *apply;
/**
* Update the mag combo box.