diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-19 19:03:33 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-19 19:03:33 +0000 |
commit | e69e8b1d09fb579316595b4e6a850e717358a8b1 (patch) | |
tree | a24fc20865f65772f530d16177520190594ffdd2 /kpdf | |
parent | eecec9afb81fdebb0f22e9da22635874c403f854 (diff) | |
download | tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.tar.gz tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.zip |
TQt4 port kdegraphics
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpdf')
44 files changed, 610 insertions, 597 deletions
diff --git a/kpdf/conf/dlgaccessibility.ui b/kpdf/conf/dlgaccessibility.ui index a9f6495d..3aa7eb2f 100644 --- a/kpdf/conf/dlgaccessibility.ui +++ b/kpdf/conf/dlgaccessibility.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>DlgAccessibility</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>DlgAccessibility</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_HighlightImages</cstring> </property> @@ -27,7 +27,7 @@ <string>Draw border around &Images</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_HighlightLinks</cstring> </property> @@ -35,7 +35,7 @@ <string>Draw border around &Links</string> </property> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>kcfg_ChangeColors</cstring> </property> @@ -60,7 +60,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>warn</cstring> </property> @@ -86,7 +86,7 @@ <enum>PlainText</enum> </property> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>kcfg_RenderMode</cstring> </property> @@ -117,7 +117,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioInverted</cstring> </property> @@ -128,7 +128,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioNormal</cstring> </property> @@ -136,9 +136,9 @@ <string>Change &paper color</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> @@ -154,14 +154,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -196,7 +196,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>30</width> <height>20</height> @@ -205,7 +205,7 @@ </spacer> </hbox> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioRecolor</cstring> </property> @@ -213,9 +213,9 @@ <string>&Change dark and light colors</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <grid> <property name="name"> @@ -234,7 +234,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>48</width> <height>21</height> @@ -262,7 +262,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -290,14 +290,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>48</width> <height>21</height> </size> </property> </spacer> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>textLabel3_2</cstring> </property> @@ -318,14 +318,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -338,7 +338,7 @@ </widget> </grid> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioContrast</cstring> </property> @@ -346,15 +346,15 @@ <string>Convert to &black and white</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -375,7 +375,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>48</width> <height>21</height> @@ -392,7 +392,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -409,7 +409,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -426,14 +426,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>48</width> <height>21</height> </size> </property> </spacer> - <widget class="QSlider" row="1" column="2"> + <widget class="TQSlider" row="1" column="2"> <property name="name"> <cstring>kcfg_BWContrast</cstring> </property> @@ -455,7 +455,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QSlider" row="0" column="2"> + <widget class="TQSlider" row="0" column="2"> <property name="name"> <cstring>kcfg_BWThreshold</cstring> </property> @@ -477,7 +477,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -567,7 +567,7 @@ <includes> <include location="global" impldecl="in implementation">kdialog.h</include> </includes> -<layoutdefaults spacing="5" margin="11"/> +<tqlayoutdefaults spacing="5" margin="11"/> <includehints> <includehint>kcolorbutton.h</includehint> <includehint>kcolorbutton.h</includehint> diff --git a/kpdf/conf/dlggeneral.ui b/kpdf/conf/dlggeneral.ui index 0319d1b4..e577b81b 100644 --- a/kpdf/conf/dlggeneral.ui +++ b/kpdf/conf/dlggeneral.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>DlgGeneral</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>DlgGeneral</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -30,15 +30,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_ShowSearchBar</cstring> </property> @@ -49,7 +49,7 @@ <string>Show &search bar in thumbnails list</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_SyncThumbnailsViewport</cstring> </property> @@ -60,7 +60,7 @@ <string>Link the &thumbnails with the page</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_ShowScrollBars</cstring> </property> @@ -68,7 +68,7 @@ <string>Show scroll&bars</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_ShowOSD</cstring> </property> @@ -76,7 +76,7 @@ <string>Show &hints and info messages</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_ObeyDRM</cstring> </property> @@ -84,7 +84,7 @@ <string>&Obey DRM limitations</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_WatchFile</cstring> </property> @@ -94,15 +94,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3_2</cstring> + <cstring>tqlayout3_2</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>pixmapLabel1_2</cstring> </property> @@ -128,7 +128,7 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>1</height> @@ -149,7 +149,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -164,8 +164,8 @@ <include location="local" impldecl="in implementation">dlggeneral.ui.h</include> </includes> <functions> - <function access="protected" specifier="non virtual">showEvent( QShowEvent * )</function> + <function access="protected" specifier="non virtual">showEvent( TQShowEvent * )</function> </functions> <pixmapfunction>DesktopIcon</pixmapfunction> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kpdf/conf/dlggeneral.ui.h b/kpdf/conf/dlggeneral.ui.h index 316b009f..c7b9b6ec 100644 --- a/kpdf/conf/dlggeneral.ui.h +++ b/kpdf/conf/dlggeneral.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you want to add, delete, or rename functions or slots, use -** Qt Designer to update this file, preserving your code. +** TQt Designer to update this file, preserving your code. ** ** You should not define a constructor or destructor in this file. ** Instead, write your code in functions called init() and destroy(). diff --git a/kpdf/conf/dlgperformance.ui b/kpdf/conf/dlgperformance.ui index c0c90eb1..408075b0 100644 --- a/kpdf/conf/dlgperformance.ui +++ b/kpdf/conf/dlgperformance.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>DlgPerformance</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>DlgPerformance</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -38,15 +38,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_EnableCompositing</cstring> </property> @@ -54,7 +54,7 @@ <string>Enable &transparency effects</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_EnableThreading</cstring> </property> @@ -64,15 +64,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6_2</cstring> + <cstring>tqlayout6_2</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>pixmapLabel1_2</cstring> </property> @@ -98,7 +98,7 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>1</height> @@ -109,7 +109,7 @@ </widget> </hbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>kcfg_MemoryLevel</cstring> </property> @@ -128,7 +128,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>descLabel</cstring> </property> @@ -138,19 +138,19 @@ <property name="textFormat"> <enum>PlainText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>lowRadio</cstring> </property> @@ -158,7 +158,7 @@ <string>&Low</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>normalRadio</cstring> </property> @@ -166,7 +166,7 @@ <string>&Normal (default)</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>aggressiveRadio</cstring> </property> @@ -176,15 +176,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>pixmapLabel1</cstring> </property> @@ -210,7 +210,7 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>1</height> @@ -231,7 +231,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>16</height> @@ -265,14 +265,14 @@ <include location="global" impldecl="in implementation">kiconloader.h</include> <include location="local" impldecl="in implementation">dlgperformance.ui.h</include> </includes> -<slots> +<Q_SLOTS> <slot>lowRadio_toggled( bool on )</slot> <slot>normalRadio_toggled( bool on )</slot> <slot>aggressiveRadio_toggled( bool on )</slot> -</slots> +</Q_SLOTS> <functions> <function access="private">init()</function> </functions> <pixmapfunction>DesktopIcon</pixmapfunction> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kpdf/conf/dlgpresentation.ui b/kpdf/conf/dlgpresentation.ui index ba65f7b1..9df30f3d 100644 --- a/kpdf/conf/dlgpresentation.ui +++ b/kpdf/conf/dlgpresentation.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>DlgPresentation</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>DlgPresentation</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -30,15 +30,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSpinBox" row="0" column="1"> + <widget class="TQSpinBox" row="0" column="1"> <property name="name"> <cstring>kcfg_SlidesAdvanceTime</cstring> </property> @@ -52,7 +52,7 @@ <number>5</number> </property> </widget> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>kcfg_SlidesAdvance</cstring> </property> @@ -60,7 +60,7 @@ <string>Advance every:</string> </property> </widget> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>kcfg_SlidesLoop</cstring> </property> @@ -72,7 +72,7 @@ </widget> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -83,15 +83,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QComboBox" row="1" column="1"> + <widget class="TQComboBox" row="1" column="1"> <item> <property name="text"> - <string>Blinds Vertical</string> + <string>BlindsQt::Vertical</string> </property> </item> <item> <property name="text"> - <string>Blinds Horizontal</string> + <string>BlindsQt::Horizontal</string> </property> </item> <item> @@ -136,22 +136,22 @@ </item> <item> <property name="text"> - <string>Split Horizontal In</string> + <string>SplitQt::Horizontal In</string> </property> </item> <item> <property name="text"> - <string>Split Horizontal Out</string> + <string>SplitQt::Horizontal Out</string> </property> </item> <item> <property name="text"> - <string>Split Vertical In</string> + <string>SplitQt::Vertical In</string> </property> </item> <item> <property name="text"> - <string>Split Vertical Out</string> + <string>SplitQt::Vertical Out</string> </property> </item> <item> @@ -178,7 +178,7 @@ <cstring>kcfg_SlidesTransition</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -186,7 +186,7 @@ <string>Default transition:</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -194,7 +194,7 @@ <string>Mouse cursor:</string> </property> </widget> - <widget class="QComboBox" row="2" column="1"> + <widget class="TQComboBox" row="2" column="1"> <item> <property name="text"> <string>Hidden After Delay</string> @@ -214,7 +214,7 @@ <cstring>kcfg_SlidesCursor</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -230,7 +230,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="4" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_SlidesShowSummary</cstring> </property> @@ -238,7 +238,7 @@ <string>Show s&ummary page</string> </property> </widget> - <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_SlidesShowProgress</cstring> </property> @@ -258,7 +258,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>1</height> @@ -275,7 +275,7 @@ <slot>setEnabled(bool)</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcolorbutton.h</includehint> </includehints> diff --git a/kpdf/conf/preferencesdialog.cpp b/kpdf/conf/preferencesdialog.cpp index 61211008..418517a1 100644 --- a/kpdf/conf/preferencesdialog.cpp +++ b/kpdf/conf/preferencesdialog.cpp @@ -18,8 +18,8 @@ // reimplementing this #include "preferencesdialog.h" -PreferencesDialog::PreferencesDialog( TQWidget * parent, KConfigSkeleton * skeleton ) - : KConfigDialog( parent, "preferences", skeleton ) +PreferencesDialog::PreferencesDialog( TQWidget * tqparent, KConfigSkeleton * skeleton ) + : KConfigDialog( tqparent, "preferences", skeleton ) { m_general = new DlgGeneral(0); m_performance = new DlgPerformance(0); diff --git a/kpdf/conf/preferencesdialog.h b/kpdf/conf/preferencesdialog.h index 36aaa909..316aa05b 100644 --- a/kpdf/conf/preferencesdialog.h +++ b/kpdf/conf/preferencesdialog.h @@ -25,7 +25,7 @@ class PreferencesDialog : public KConfigDialog { public: - PreferencesDialog( TQWidget * parent, KConfigSkeleton * config ); + PreferencesDialog( TQWidget * tqparent, KConfigSkeleton * config ); protected: // void updateSettings(); // Called when OK/Apply is pressed. diff --git a/kpdf/configure.in.in b/kpdf/configure.in.in index db883adb..f8c6eac2 100644 --- a/kpdf/configure.in.in +++ b/kpdf/configure.in.in @@ -117,8 +117,11 @@ AC_ARG_ENABLE(force-kpdf-drm, , AC_DEFINE(KPDF_FORCE_DRM, 0, [Defines if force the use DRM in kpdf]) ) +kde_save_CXXFLAGS="$CXXFLAGS" +CXXFLAGS="$CXXFLAGS $qt_includes" KDE_CHECK_COMPILER_FLAG([fno-regmove], SUPPORTS_NOREGMOVE=true, SUPPORTS_NOREGMOVE=false) if test "x$SUPPORTS_NOREGMOVE" = xtrue; then NOREGMOVE="-fno-regmove" fi AC_SUBST(NOREGMOVE) +CXXFLAGS="$kde_save_CXXFLAGS" diff --git a/kpdf/core/document.cpp b/kpdf/core/document.cpp index 02395747..6c918a4d 100644 --- a/kpdf/core/document.cpp +++ b/kpdf/core/document.cpp @@ -118,7 +118,7 @@ KPDFDocument::KPDFDocument(TQWidget *widget) TQStringList::Iterator it = list.begin(); while( it != list.end() ) { - d->kimgioMimes << KMimeType::findByPath(TQString("foo.%1").arg(*it), 0, true)->name(); + d->kimgioMimes << KMimeType::findByPath(TQString("foo.%1").tqarg(*it), 0, true)->name(); ++it; } } @@ -139,13 +139,13 @@ bool KPDFDocument::openDocument( const TQString & docFile, const KURL & url, con TQFile fileReadTest( docFile ); if ( !fileReadTest.open( IO_ReadOnly ) ) { - d->docFileName = TQString::null; + d->docFileName = TQString(); return false; } // determine the related "xml document-info" filename d->url = url; d->docFileName = docFile; - TQString fn = docFile.contains('/') ? docFile.section('/', -1, -1) : docFile; + TQString fn = docFile.tqcontains('/') ? docFile.section('/', -1, -1) : docFile; fn = "kpdf/" + TQString::number(fileReadTest.size()) + "." + fn + ".xml"; fileReadTest.close(); d->xmlFileName = locateLocal( "data", fn ); @@ -298,7 +298,7 @@ void KPDFDocument::addObserver( DocumentObserver * pObserver ) void KPDFDocument::removeObserver( DocumentObserver * pObserver ) { // remove observer from the map. it won't receive notifications anymore - if ( d->observers.contains( pObserver->observerId() ) ) + if ( d->observers.tqcontains( pObserver->observerId() ) ) { // free observer's pixmap data int observerId = pObserver->observerId(); @@ -331,7 +331,7 @@ void KPDFDocument::reparseConfig() // reparse generator config and if something changed clear KPDFPages if ( generator && generator->reparseConfig() ) { - // invalidate pixmaps + // tqinvalidate pixmaps TQValueVector<KPDFPage*>::iterator it = pages_vector.begin(), end = pages_vector.end(); for ( ; it != end; ++it ) (*it)->deletePixmapsAndRects(); @@ -357,7 +357,7 @@ void KPDFDocument::reparseConfig() TQWidget *KPDFDocument::widget() const { - return static_cast<TQWidget*>(parent()); + return TQT_TQWIDGET(tqparent()); } bool KPDFDocument::isOpened() const @@ -633,7 +633,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta return false; // if searchID search not recorded, create new descriptor and init params - if ( !d->searches.contains( searchID ) ) + if ( !d->searches.tqcontains( searchID ) ) { RunningSearch * search = new RunningSearch(); search->continueOnPage = -1; @@ -707,12 +707,12 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta { foundAMatch = true; s->highlightedPages.append( pageNumber ); - if ( !pagesToNotify.contains( pageNumber ) ) + if ( !pagesToNotify.tqcontains( pageNumber ) ) pagesToNotify.append( pageNumber ); } } - // reset cursor to previous shape + // reset cursor to previous tqshape TQApplication::restoreOverrideCursor(); // send page lists if found anything new @@ -747,7 +747,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta { if ( currentPage >= pageCount ) { - if ( noDialogs || KMessageBox::questionYesNo(widget(), i18n("End of document reached.\nContinue from the beginning?"), TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel()) == KMessageBox::Yes ) + if ( noDialogs || KMessageBox::questionYesNo(widget(), i18n("End of document reached.\nContinue from the beginning?"), TQString(), KStdGuiItem::cont(), KStdGuiItem::cancel()) == KMessageBox::Yes ) currentPage = 0; else break; @@ -764,7 +764,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta } } - // reset cursor to previous shape + // reset cursor to previous tqshape TQApplication::restoreOverrideCursor(); // if a match has been found.. @@ -779,7 +779,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta pages_vector[ currentPage ]->setHighlight( searchID, match, color ); // ..queue page for notifying changes.. - if ( !pagesToNotify.contains( currentPage ) ) + if ( !pagesToNotify.tqcontains( currentPage ) ) pagesToNotify.append( currentPage ); // ..move the viewport to show the searched word centered @@ -793,7 +793,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta } } else if ( !noDialogs ) - KMessageBox::information( widget(), i18n("No matches found for '%1'.").arg( text ) ); + KMessageBox::information( widget(), i18n("No matches found for '%1'.").tqarg( text ) ); } // 3. PREVMATCH //TODO else if ( type == PrevMatch ) @@ -860,12 +860,12 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta { foundAMatch = true; s->highlightedPages.append( pageNumber ); - if ( !pagesToNotify.contains( pageNumber ) ) + if ( !pagesToNotify.tqcontains( pageNumber ) ) pagesToNotify.append( pageNumber ); } } - // reset cursor to previous shape + // reset cursor to previous tqshape TQApplication::restoreOverrideCursor(); // send page lists to update observers (since some filter on bookmarks) @@ -884,7 +884,7 @@ bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromSta bool KPDFDocument::continueSearch( int searchID ) { // check if searchID is present in runningSearches - if ( !d->searches.contains( searchID ) ) + if ( !d->searches.tqcontains( searchID ) ) return false; // start search with cached parameters from last search by searchID @@ -897,7 +897,7 @@ bool KPDFDocument::continueSearch( int searchID ) void KPDFDocument::resetSearch( int searchID ) { // check if searchID is present in runningSearches - if ( !d->searches.contains( searchID ) ) + if ( !d->searches.tqcontains( searchID ) ) return; // get previous parameters for search @@ -1016,7 +1016,7 @@ void KPDFDocument::processLink( const KPDFLink * link ) KRun::run( *ptr, lst ); } else - KMessageBox::information( widget(), i18n( "No application found for opening file of mimetype %1." ).arg( mime->name() ) ); + KMessageBox::information( widget(), i18n( "No application found for opening file of mimetype %1." ).tqarg( mime->name() ) ); } break; case KPDFLink::Action: { @@ -1067,14 +1067,14 @@ void KPDFDocument::processLink( const KPDFLink * link ) case KPDFLink::Browse: { const KPDFLinkBrowse * browse = static_cast< const KPDFLinkBrowse * >( link ); // if the url is a mailto one, invoke mailer - if ( browse->url().startsWith( "mailto:", false ) ) + if ( browse->url().tqstartsWith( "mailto:", false ) ) kapp->invokeMailer( browse->url() ); else { TQString url = browse->url(); // fix for #100366, documents with relative links that are the form of http:foo.pdf - if (url.find("http:") == 0 && url.find("http://") == -1 && url.right(4) == ".pdf") + if (url.tqfind("http:") == 0 && url.tqfind("http://") == -1 && url.right(4) == ".pdf") { openRelativeFile(url.mid(5)); return; @@ -1117,7 +1117,7 @@ void KPDFDocument::requestDone( PixmapRequest * req ) break; } - if ( d->observers.contains( req->id ) ) + if ( d->observers.tqcontains( req->id ) ) { // [MEM] 1.2 append memory allocation descriptor to the FIFO int memoryBytes = 4 * req->width * req->height; @@ -1381,7 +1381,7 @@ void KPDFDocument::loadDocumentInfo() TQString KPDFDocument::giveAbsolutePath( const TQString & fileName ) { if ( !d->url.isValid() ) - return TQString::null; + return TQString(); return d->url.upURL().url() + fileName; } diff --git a/kpdf/core/document.h b/kpdf/core/document.h index c1eb840a..ee5a8a88 100644 --- a/kpdf/core/document.h +++ b/kpdf/core/document.h @@ -47,9 +47,10 @@ class KURL; * For a better understanding of hieracies @see README.internals.png * @see DocumentObserver, KPDFPage */ -class KPDFDocument : public QObject +class KPDFDocument : public TQObject { Q_OBJECT + TQ_OBJECT public: KPDFDocument( TQWidget *widget ); ~KPDFDocument(); @@ -184,7 +185,7 @@ class DocumentViewport * The Info structure can be filled in by generators to display metadata * about the currently opened file. */ -class DocumentInfo : public QDomDocument +class DocumentInfo : public TQDomDocument { public: DocumentInfo(); @@ -216,7 +217,7 @@ class DocumentInfo : public QDomDocument * - ViewportName: A 'named reference' to the viewport that must be converted * using getMetaData( "NamedViewport", *viewport_name* ) */ -class DocumentSynopsis : public QDomDocument +class DocumentSynopsis : public TQDomDocument { public: DocumentSynopsis(); diff --git a/kpdf/core/generator.h b/kpdf/core/generator.h index 841915a2..a3c1f985 100644 --- a/kpdf/core/generator.h +++ b/kpdf/core/generator.h @@ -40,7 +40,7 @@ class PixmapRequest; * class stores the resulting data into 'KPDFPage's. The data will then be * displayed by the GUI components (pageView, thumbnailList, etc..). */ -class Generator : public QObject +class Generator : public TQObject { public: /** virtual methods to reimplement **/ diff --git a/kpdf/core/generator_pdf/generator_pdf.cpp b/kpdf/core/generator_pdf/generator_pdf.cpp index 9540d2fd..8ad34900 100644 --- a/kpdf/core/generator_pdf/generator_pdf.cpp +++ b/kpdf/core/generator_pdf/generator_pdf.cpp @@ -57,7 +57,7 @@ * internal: thread race prevention is done via the 'docLock' mutex. the * mutex is needed only because we have the asyncronous thread; else * the operations are all within the 'gui' thread, scheduled by the - * Qt scheduler and no mutex is needed. + * TQt scheduler and no mutex is needed. * external: dangerous operations are all locked via mutex internally, and the * only needed external thing is the 'canGeneratePixmap' method * that tells if the generator is free (since we don't want an @@ -152,7 +152,7 @@ bool PDFGenerator::loadDocument( const TQString & filePath, TQValueVector<KPDFPa } // 2. reopen the document using the password - GString * pwd2 = new GString( TQString::fromLocal8Bit(password.data()).latin1() ); + GString * pwd2 = new GString( TQString(TQString::fromLocal8Bit(password.data())).latin1() ); delete pdfdoc; pdfdoc = new PDFDoc( new GString( TQFile::encodeName( filePath ) ), pwd2, pwd2 ); delete pwd2; @@ -209,7 +209,7 @@ const DocumentInfo * PDFGenerator::generateDocumentInfo() if ( pdfdoc ) { docInfo.set( "format", i18n( "PDF v. <version>", "PDF v. %1" ) - .arg( TQString::number( pdfdoc->getPDFVersion() ) ), i18n( "Format" ) ); + .tqarg( TQString::number( pdfdoc->getPDFVersion() ) ), i18n( "Format" ) ); docInfo.set( "encryption", pdfdoc->isEncrypted() ? i18n( "Encrypted" ) : i18n( "Unencrypted" ), i18n("Security") ); docInfo.set( "optimization", pdfdoc->isLinearized() ? i18n( "Yes" ) : i18n( "No" ), @@ -423,18 +423,18 @@ bool PDFGenerator::print( KPrinter& printer ) marginBottom = (int)printer.option("kde-margin-bottom").toDouble(); bool forceRasterize = printer.option("kde-kpdf-forceRaster").toInt(); - if (ps.find(TQRegExp("w\\d+h\\d+")) == 0) + if (ps.tqfind(TQRegExp("w\\d+h\\d+")) == 0) { - // size not supported by Qt, CUPS gives us the size as wWIDTHhHEIGHT, at least on the printers i tester + // size not supported by TQt, CUPS gives us the size as wWIDTHhHEIGHT, at least on the printers i tester // remove the w ps = ps.mid(1); - int hPos = ps.find("h"); + int hPos = ps.tqfind("h"); paperWidth = ps.left(hPos).toInt(); paperHeight = ps.mid(hPos+1).toInt(); } else { - // size is supported by Qt, we get either the pageSize name or nothing because the CUPS driver + // size is supported by TQt, we get either the pageSize name or nothing because the CUPS driver // does not do any translation, then use KPrinter::pageSize to get the page size KPrinter::PageSize qtPageSize; if (!ps.isEmpty()) qtPageSize = pageNameToPageSize(ps); @@ -449,7 +449,7 @@ bool PDFGenerator::print( KPrinter& printer ) paperHeight = metrics.height(); } - KTempFile tf( TQString::null, ".ps" ); + KTempFile tf( TQString(), ".ps" ); globalParams->setPSPaperWidth(paperWidth); globalParams->setPSPaperHeight(paperHeight); TQString pstitle = getDocumentInfo("Title", true); @@ -457,7 +457,7 @@ bool PDFGenerator::print( KPrinter& printer ) { pstitle = m_document->currentDocument().fileName( false ); } - // this looks non-unicode-safe and it is. anything other than ASCII is not specified + // this looks non-tqunicode-safe and it is. anything other than ASCII is not specified // and some printers actually stop printing when they encounter non-ASCII characters in the // Postscript %%Title tag TQCString pstitle8Bit = pstitle.latin1(); @@ -524,18 +524,18 @@ bool PDFGenerator::print( KPrinter& printer ) } } -static GString *QStringToGString(const TQString &s) { +static GString *TQStringToGString(const TQString &s) { int len = s.length(); char *cstring = (char *)gmallocn(s.length(), sizeof(char)); for (int i = 0; i < len; ++i) - cstring[i] = s.at(i).unicode(); + cstring[i] = s.tqat(i).tqunicode(); return new GString(cstring, len); } -static TQString unicodeToQString(Unicode* u, int len) { +static TQString tqunicodeToTQString(Unicode* u, int len) { TQString ret; ret.setLength(len); - TQChar* qch = (TQChar*) ret.unicode(); + TQChar* qch = (TQChar*) ret.tqunicode(); for (;len;--len) *qch++ = (TQChar) *u++; return ret; @@ -568,7 +568,7 @@ static TQString UnicodeParsedString(GString *s1) { u = s1->getChar(i) & 0xff; ++i; } - result += unicodeToQString( &u, 1 ); + result += tqunicodeToTQString( &u, 1 ); } return result; } @@ -586,7 +586,7 @@ TQString PDFGenerator::getMetaData( const TQString & key, const TQString & optio // asking for the page related to a 'named link destination'. the // option is the link name. @see addSynopsisChildren. DocumentViewport viewport; - GString * namedDest = QStringToGString(option); + GString * namedDest = TQStringToGString(option); docLock.lock(); LinkDest * destination = pdfdoc->findDest( namedDest ); if ( destination ) @@ -610,7 +610,7 @@ bool PDFGenerator::reparseConfig() { // load paper color from Settings or use the white default color TQColor color = ( (KpdfSettings::renderMode() == KpdfSettings::EnumRenderMode::Paper ) && - KpdfSettings::changeColors() ) ? KpdfSettings::paperColor() : Qt::white; + KpdfSettings::changeColors() ) ? KpdfSettings::paperColor() : TQt::white; // if paper color is changed we have to rebuild every visible pixmap in addition // to the outputDevice. it's the 'heaviest' case, other effect are just recoloring // over the page rendered on 'standard' white background. @@ -789,11 +789,11 @@ TQString PDFGenerator::getDocumentInfo( const TQString & data, bool canReturnNul // [Albert] Code adapted from pdfinfo.cc on xpdf Object info; if ( !pdfdoc ) - return canReturnNull ? TQString::null : i18n( "Unknown" ); + return canReturnNull ? TQString() : i18n( "Unknown" ); pdfdoc->getDocInfo( &info ); if ( !info.isDict() ) - return canReturnNull ? TQString::null : i18n( "Unknown" ); + return canReturnNull ? TQString() : i18n( "Unknown" ); Object obj; Dict *infoDict = info.getDict(); @@ -807,7 +807,7 @@ TQString PDFGenerator::getDocumentInfo( const TQString & data, bool canReturnNul } obj.free(); info.free(); - return canReturnNull ? TQString::null : i18n( "Unknown" ); + return canReturnNull ? TQString() : i18n( "Unknown" ); } TQString PDFGenerator::getDocumentDate( const TQString & data ) const @@ -856,7 +856,7 @@ TQString PDFGenerator::getDocumentDate( const TQString & data ) const return result; } -void PDFGenerator::addSynopsisChildren( TQDomNode * parent, GList * items ) +void PDFGenerator::addSynopsisChildren( TQDomNode * tqparent, GList * items ) { int numItems = items->getLength(); for ( int i = 0; i < numItems; ++i ) @@ -868,11 +868,11 @@ void PDFGenerator::addSynopsisChildren( TQDomNode * parent, GList * items ) TQString name; Unicode * uniChar = outlineItem->getTitle(); int titleLength = outlineItem->getTitleLength(); - name = unicodeToQString(uniChar, titleLength); + name = tqunicodeToTQString(uniChar, titleLength); if ( name.isEmpty() ) continue; TQDomElement item = docSyn.createElement( name ); - parent->appendChild( item ); + tqparent->appendChild( item ); // 2. find the page the link refers to LinkAction * a = outlineItem->getAction(); @@ -888,7 +888,7 @@ void PDFGenerator::addSynopsisChildren( TQDomNode * parent, GList * items ) // so better storing the reference and provide the viewport as metadata // on demand GString *s = g->getNamedDest(); - TQChar *charArray = new QChar[s->getLength()]; + TQChar *charArray = new TQChar[s->getLength()]; for (int i = 0; i < s->getLength(); ++i) charArray[i] = TQChar(s->getCString()[i]); TQString option(charArray, s->getLength()); item.setAttribute( "ViewportName", option ); @@ -909,11 +909,11 @@ void PDFGenerator::addSynopsisChildren( TQDomNode * parent, GList * items ) item.setAttribute( "Open", TQVariant( (bool)outlineItem->isOpen() ).toString() ); - // 3. recursively descend over children + // 3. recursively descend over tqchildren outlineItem->open(); - GList * children = outlineItem->getKids(); - if ( children ) - addSynopsisChildren( &item, children ); + GList * tqchildren = outlineItem->getKids(); + if ( tqchildren ) + addSynopsisChildren( &item, tqchildren ); } } @@ -1017,10 +1017,10 @@ void PDFGenerator::addTransition( int pageNumber, KPDFPage * page ) switch ( pdfTransition->getAlignment() ) { case PageTransition::Horizontal: - transition->setAlignment( KPDFPageTransition::Horizontal ); + transition->tqsetAlignment( KPDFPageTransition::Horizontal ); break; case PageTransition::Vertical: - transition->setAlignment( KPDFPageTransition::Vertical ); + transition->tqsetAlignment( KPDFPageTransition::Vertical ); break; } diff --git a/kpdf/core/generator_pdf/generator_pdf.h b/kpdf/core/generator_pdf/generator_pdf.h index 662c19fd..b7d2deb2 100644 --- a/kpdf/core/generator_pdf/generator_pdf.h +++ b/kpdf/core/generator_pdf/generator_pdf.h @@ -95,7 +95,7 @@ class PDFGenerator : public Generator TQString getDocumentInfo( const TQString & data, bool canReturnNull = false ) const; TQString getDocumentDate( const TQString & data ) const; // private function for creating the document synopsis hieracy - void addSynopsisChildren( TQDomNode * parent, GList * items ); + void addSynopsisChildren( TQDomNode * tqparent, GList * items ); // private function for creating the transition information void addTransition( int pageNumber, KPDFPage * page ); // (async related) receive data from the generator thread @@ -124,7 +124,7 @@ class PDFGenerator : public Generator * @short A thread that builds contents for PDFGenerator in the background. * */ -class PDFPixmapGeneratorThread : public QThread +class PDFPixmapGeneratorThread : public TQThread { public: PDFPixmapGeneratorThread( PDFGenerator * generator ); diff --git a/kpdf/core/generator_pdf/gp_outputdev.cpp b/kpdf/core/generator_pdf/gp_outputdev.cpp index df3fd85b..b6c40520 100644 --- a/kpdf/core/generator_pdf/gp_outputdev.cpp +++ b/kpdf/core/generator_pdf/gp_outputdev.cpp @@ -109,7 +109,7 @@ void KPDFOutputDev::endPage() for (int j = 0; j < bh; j++) { getBitmap()->getPixel(i, j, pixel); - img->setPixel( i, j, qRgb( pixel[0], pixel[1], pixel[2] ) ); + img->setPixel( i, j, tqRgb( pixel[0], pixel[1], pixel[2] ) ); } } delete [] pixel; @@ -172,7 +172,7 @@ void KPDFOutputDev::processLink( Link * link, Catalog * catalog ) } void KPDFOutputDev::drawImage( GfxState *state, Object *ref, Stream *str, - int _width, int _height, GfxImageColorMap *colorMap, int *maskColors, GBool inlineImg ) + int _width, int _height, GfxImageColorMap *colorMap, int *tqmaskColors, GBool inlineImg ) { if ( m_generateImages ) { @@ -207,7 +207,7 @@ void KPDFOutputDev::drawImage( GfxState *state, Object *ref, Stream *str, m_rects.push_back( rect ); } } - SplashOutputDev::drawImage( state, ref, str, _width, _height, colorMap, maskColors, inlineImg ); + SplashOutputDev::drawImage( state, ref, str, _width, _height, colorMap, tqmaskColors, inlineImg ); } //END - OutputDev hooked calls @@ -246,7 +246,7 @@ KPDFLink * KPDFOutputDev::generateLink( LinkAction * a ) { LinkGoTo * g = (LinkGoTo *) a; // ceate link: no ext file, namedDest, object pointer - link = new KPDFLinkGoto( TQString::null, decodeViewport( g->getNamedDest(), g->getDest() ) ); + link = new KPDFLinkGoto( TQString(), decodeViewport( g->getNamedDest(), g->getDest() ) ); } break; diff --git a/kpdf/core/generator_pdf/gp_outputdev.h b/kpdf/core/generator_pdf/gp_outputdev.h index 7788b1db..a4d33b04 100644 --- a/kpdf/core/generator_pdf/gp_outputdev.h +++ b/kpdf/core/generator_pdf/gp_outputdev.h @@ -32,7 +32,7 @@ class DocumentViewport; * @short A SplashOutputDev renderer that grabs text and links. * * This output device: - * - renders the page using SplashOutputDev (its parent) + * - renders the page using SplashOutputDev (its tqparent) * - harvests text into a textPage (for searching text) * - harvests links and collects them * - collects images and collects them @@ -63,7 +63,7 @@ class KPDFOutputDev : public SplashOutputDev virtual void processLink(Link *link, Catalog *catalog); //----- image drawing virtual void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, - GfxImageColorMap *colorMap, int *maskColors, GBool inlineImg); + GfxImageColorMap *colorMap, int *tqmaskColors, GBool inlineImg); private: // delete all interal objects and data diff --git a/kpdf/core/link.cpp b/kpdf/core/link.cpp index 33d0fe98..a872ba60 100644 --- a/kpdf/core/link.cpp +++ b/kpdf/core/link.cpp @@ -18,12 +18,12 @@ KPDFLink::~KPDFLink() TQString KPDFLinkGoto::linkTip() const { - return m_extFileName.isEmpty() ? ( m_vp.pageNumber != -1 ? i18n( "Go to page %1" ).arg( m_vp.pageNumber + 1 ) : TQString::null ) : i18n("Open external file"); + return m_extFileName.isEmpty() ? ( m_vp.pageNumber != -1 ? i18n( "Go to page %1" ).tqarg( m_vp.pageNumber + 1 ) : TQString() ) : i18n("Open external file"); } TQString KPDFLinkExecute::linkTip() const { - return i18n( "Execute '%1'..." ).arg( m_fileName ); + return i18n( "Execute '%1'..." ).tqarg( m_fileName ); } TQString KPDFLinkBrowse::linkTip() const @@ -61,5 +61,5 @@ TQString KPDFLinkAction::linkTip() const default: ; } - return TQString::null; + return TQString(); } diff --git a/kpdf/core/link.h b/kpdf/core/link.h index eff3573e..839292fd 100644 --- a/kpdf/core/link.h +++ b/kpdf/core/link.h @@ -27,7 +27,7 @@ class KPDFLink // get link type (inherited classes mustreturn an unique identifier) enum LinkType { Goto, Execute, Browse, Action, Movie }; virtual LinkType linkType() const = 0; - virtual TQString linkTip() const { return TQString::null; } + virtual TQString linkTip() const { return TQString(); } // virtual destructor (remove warnings) virtual ~KPDFLink(); diff --git a/kpdf/core/page.cpp b/kpdf/core/page.cpp index 6b611360..630c9480 100644 --- a/kpdf/core/page.cpp +++ b/kpdf/core/page.cpp @@ -74,7 +74,7 @@ void KPDFPage::setRotation( int r ) bool KPDFPage::hasPixmap( int id, int width, int height ) const { - if ( !m_pixmaps.contains( id ) ) + if ( !m_pixmaps.tqcontains( id ) ) return false; if ( width == -1 || height == -1 ) return true; @@ -98,7 +98,7 @@ bool KPDFPage::hasObjectRect( double x, double y ) const return false; TQValueList< ObjectRect * >::const_iterator it = m_rects.begin(), end = m_rects.end(); for ( ; it != end; ++it ) - if ( (*it)->contains( x, y ) ) + if ( (*it)->tqcontains( x, y ) ) return true; return false; } @@ -131,11 +131,11 @@ NormalizedRect * KPDFPage::findText( const TQString & text, bool strictCase, Nor return 0; // create a xpf's Unicode (unsigned int) array for the given text - const TQChar * str = text.unicode(); + const TQChar * str = text.tqunicode(); int len = text.length(); TQMemArray<Unicode> u(len); for (int i = 0; i < len; ++i) - u[i] = str[i].unicode(); + u[i] = str[i].tqunicode(); // find out the direction of search enum SearchDir { FromTop, NextMatch, PrevMatch } dir = lastRect ? NextMatch : FromTop; @@ -175,7 +175,7 @@ NormalizedRect * KPDFPage::findText( const TQString & text, bool strictCase, Nor const TQString KPDFPage::getText( const NormalizedRect & rect ) const { if ( !m_text ) - return TQString::null; + return TQString(); int left = (int)( rect.left * m_width ), top = (int)( rect.top * m_height ), right = (int)( rect.right * m_width ), @@ -190,7 +190,7 @@ const ObjectRect * KPDFPage::hasObject( ObjectRect::ObjectType type, double x, d { TQValueList< ObjectRect * >::const_iterator it = m_rects.begin(), end = m_rects.end(); for ( ; it != end; ++it ) - if ( (*it)->contains( x, y ) ) + if ( (*it)->tqcontains( x, y ) ) if ((*it)->objectType() == type) return *it; return 0; } @@ -203,7 +203,7 @@ const KPDFPageTransition * KPDFPage::getTransition() const void KPDFPage::setPixmap( int id, TQPixmap * pixmap ) { - if ( m_pixmaps.contains( id ) ) + if ( m_pixmaps.tqcontains( id ) ) delete m_pixmaps[id]; m_pixmaps[id] = pixmap; } @@ -252,7 +252,7 @@ void KPDFPage::setTransition( KPDFPageTransition * transition ) void KPDFPage::deletePixmap( int id ) { - if ( m_pixmaps.contains( id ) ) + if ( m_pixmaps.tqcontains( id ) ) { delete m_pixmaps[ id ]; m_pixmaps.remove( id ); @@ -304,7 +304,7 @@ NormalizedRect::NormalizedRect( const TQRect & r, double xScale, double yScale ) : left( (double)r.left() / xScale ), top( (double)r.top() / yScale ), right( (double)r.right() / xScale ), bottom( (double)r.bottom() / yScale ) {} -bool NormalizedRect::contains( double x, double y ) const +bool NormalizedRect::tqcontains( double x, double y ) const { return x >= left && x <= right && y >= top && y <= bottom; } @@ -319,7 +319,7 @@ bool NormalizedRect::intersects( double l, double t, double r, double b ) const return (l < right) && (r > left) && (t < bottom) && (b > top); } -TQRect NormalizedRect::geometry( int xScale, int yScale ) const +TQRect NormalizedRect::tqgeometry( int xScale, int yScale ) const { int l = (int)( left * xScale ), t = (int)( top * yScale ), diff --git a/kpdf/core/page.h b/kpdf/core/page.h index 2de7aceb..51d7781c 100644 --- a/kpdf/core/page.h +++ b/kpdf/core/page.h @@ -32,11 +32,11 @@ class NormalizedRect NormalizedRect( double l, double t, double r, double b ); NormalizedRect( const TQRect & r, double xScale, double yScale ); - bool contains( double x, double y ) const; + bool tqcontains( double x, double y ) const; bool intersects( const NormalizedRect & normRect ) const; bool intersects( double l, double t, double r, double b ) const; - TQRect geometry( int xScale, int yScale ) const; + TQRect tqgeometry( int xScale, int yScale ) const; }; /** diff --git a/kpdf/core/pagetransition.cpp b/kpdf/core/pagetransition.cpp index cdf04a7f..41d743c6 100644 --- a/kpdf/core/pagetransition.cpp +++ b/kpdf/core/pagetransition.cpp @@ -15,7 +15,7 @@ KPDFPageTransition::KPDFPageTransition( Type type ) : m_type( type ), m_duration( 1 ), - m_alignment( Horizontal ), + m_tqalignment(Horizontal ), m_direction( Inward ), m_angle( 0 ), m_scale( 1.0 ), diff --git a/kpdf/core/pagetransition.h b/kpdf/core/pagetransition.h index 70792355..25280437 100644 --- a/kpdf/core/pagetransition.h +++ b/kpdf/core/pagetransition.h @@ -51,7 +51,7 @@ class KPDFPageTransition inline int duration() const { return m_duration; } // Get dimension in which the transition effect occurs. - inline Alignment alignment() const { return m_alignment; } + inline Alignment tqalignment() const { return m_tqalignment; } // Get direction of motion of the transition effect. inline Direction direction() const { return m_direction; } @@ -67,7 +67,7 @@ class KPDFPageTransition inline void setType( Type type ) { m_type = type; } inline void setDuration( int duration ) { m_duration = duration; } - inline void setAlignment( Alignment alignment ) { m_alignment = alignment; } + inline void tqsetAlignment( Alignment tqalignment ) { m_tqalignment = tqalignment; } inline void setDirection( Direction direction ) { m_direction = direction; } inline void setAngle( int angle ) { m_angle = angle; } inline void setScale( double scale ) { m_scale = scale; } @@ -76,7 +76,7 @@ class KPDFPageTransition private: Type m_type; int m_duration; - Alignment m_alignment; + Alignment m_tqalignment; Direction m_direction; int m_angle; double m_scale; diff --git a/kpdf/error.cpp b/kpdf/error.cpp index 00d3581e..ca62437f 100644 --- a/kpdf/error.cpp +++ b/kpdf/error.cpp @@ -32,7 +32,7 @@ void CDECL error(int pos, char *msg, ...) { return; } if (pos >= 0) { - emsg = TQString("Error (%1): ").arg(pos); + emsg = TQString("Error (%1): ").tqarg(pos); } else { emsg = "Error: "; } diff --git a/kpdf/part.cpp b/kpdf/part.cpp index b2775255..e1212817 100644 --- a/kpdf/part.cpp +++ b/kpdf/part.cpp @@ -80,12 +80,12 @@ class PDFOptionsPage : public KPrintDialogPage PDFOptionsPage() { setTitle( i18n( "PDF Options" ) ); - TQVBoxLayout *layout = new TQVBoxLayout(this); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this); m_forceRaster = new TQCheckBox(i18n("Force rasterization"), this); TQToolTip::add(m_forceRaster, i18n("Rasterize into an image before printing")); TQWhatsThis::add(m_forceRaster, i18n("Forces the rasterization of each page into an image before printing it. This usually gives somewhat worse results, but is useful when printing documents that appear to print incorrectly.")); - layout->addWidget(m_forceRaster); - layout->addStretch(1); + tqlayout->addWidget(m_forceRaster); + tqlayout->addStretch(1); } void getOptions( TQMap<TQString,TQString>& opts, bool incldef = false ) @@ -113,10 +113,10 @@ using namespace KPDF; unsigned int Part::m_count = 0; -Part::Part(TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, +Part::Part(TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, const TQStringList & /*args*/ ) - : DCOPObject("kpdf"), KParts::ReadOnlyPart(parent, name), m_showMenuBarAction(0), m_showFullScreenAction(0), + : DCOPObject("kpdf"), KParts::ReadOnlyPart(tqparent, name), m_showMenuBarAction(0), m_showFullScreenAction(0), m_actionsSearched(false), m_searchStarted(false) { // connect the started signal to tell the job the mimetypes we like @@ -151,13 +151,13 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, connect( m_document, TQT_SIGNAL( openURL(const KURL &) ), this, TQT_SLOT( openURLFromDocument(const KURL &) ) ); connect( m_document, TQT_SIGNAL( close() ), this, TQT_SLOT( close() ) ); - if (parent && parent->metaObject()->slotNames(true).contains("slotQuit()")) - connect( m_document, TQT_SIGNAL( quit() ), parent, TQT_SLOT( slotQuit() ) ); + if (tqparent && tqparent->tqmetaObject()->slotNames(true).tqcontains("slotQuit()")) + connect( m_document, TQT_SIGNAL( quit() ), tqparent, TQT_SLOT( slotQuit() ) ); else connect( m_document, TQT_SIGNAL( quit() ), this, TQT_SLOT( cannotQuit() ) ); // widgets: ^searchbar (toolbar containing label and SearchWidget) -// m_searchToolBar = new KToolBar( parentWidget, "searchBar" ); +// m_searchToolBar = new KToolBar( tqparentWidget, "searchBar" ); // m_searchToolBar->boxLayout()->setSpacing( KDialog::spacingHint() ); // TQLabel * sLabel = new TQLabel( i18n( "&Search:" ), m_searchToolBar, "kde toolbar widget" ); // m_searchWidget = new SearchWidget( m_searchToolBar, m_document ); @@ -165,7 +165,7 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, // m_searchToolBar->setStretchableWidget( m_searchWidget ); // widgets: [] splitter [] - m_splitter = new TQSplitter( parentWidget, widgetName ); + m_splitter = new TQSplitter( tqparentWidget, widgetName ); m_splitter->setOpaqueResize( true ); setWidget( m_splitter ); @@ -186,7 +186,7 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, int index; // [left toolbox: Table of Contents] | [] - // dummy wrapper with layout to enable horizontal scroll bars (bug: 147233) + // dummy wrapper with tqlayout to enable horizontal scroll bars (bug: 147233) TQWidget *tocWrapper = new TQWidget(m_toolBox); TQVBoxLayout *tocWrapperLayout = new TQVBoxLayout(tocWrapper); m_tocFrame = new TOC( tocWrapper, m_document ); @@ -278,8 +278,8 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, m_historyNext->setWhatsThis( i18n( "Go to the place you were after" ) ); // Find and other actions - m_find = KStdAction::find( this, TQT_SLOT( slotFind() ), ac, "find" ); - m_find->setEnabled( false ); + m_tqfind = KStdAction::find( this, TQT_SLOT( slotFind() ), ac, "tqfind" ); + m_tqfind->setEnabled( false ); m_findNext = KStdAction::findNext( this, TQT_SLOT( slotFindNext() ), ac, "find_next" ); m_findNext->setEnabled( false ); @@ -297,7 +297,7 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, m_showPresentation = new KAction( i18n("P&resentation"), "kpresenter_kpr", "Ctrl+Shift+P", this, TQT_SLOT(slotShowPresentation()), ac, "presentation"); m_showPresentation->setEnabled( false ); - // attach the actions of the children widgets too + // attach the actions of the tqchildren widgets too m_pageView->setupActions( ac ); // apply configuration (both internal settings and GUI configured items) @@ -310,7 +310,7 @@ Part::Part(TQWidget *parentWidget, const char *widgetName, } m_splitter->setSizes( splitterSizes ); // get notified about splitter size changes (HACK that will be removed - // by connecting to Qt4::QSplitter's sliderMoved()) + // by connecting to TQt4::TQSplitter's sliderMoved()) m_pageView->installEventFilter( this ); m_watcher = new KDirWatch( this ); connect( m_watcher, TQT_SIGNAL( dirty( const TQString& ) ), this, TQT_SLOT( slotFileDirty( const TQString& ) ) ); @@ -422,7 +422,7 @@ bool Part::openFile() { if ( TQFile::exists(m_file) ) { - KTempFile tf( TQString::null, ".pdf" ); + KTempFile tf( TQString(), ".pdf" ); if ( tf.status() == 0 ) { tf.close(); @@ -447,12 +447,12 @@ bool Part::openFile() } } - m_temporaryLocalFile = TQString::null; + m_temporaryLocalFile = TQString(); bool ok = m_document->openDocument( m_file, url(), mime ); // update one-time actions - m_find->setEnabled( ok && m_document-> supportsSearching()); + m_tqfind->setEnabled( ok && m_document-> supportsSearching()); m_findNext->setEnabled( ok && m_document-> supportsSearching()); m_saveAs->setEnabled( ok ); m_printPreview->setEnabled( ok ); @@ -482,7 +482,7 @@ bool Part::openFile() // if the 'StartFullScreen' flag is set, start presentation if ( m_document->getMetaData( "StartFullScreen" ) == "yes" ) { - KMessageBox::information(m_presentationWidget, i18n("The document is going to be launched on presentation mode because the file requested it."), TQString::null, "autoPresentationWarning"); + KMessageBox::information(m_presentationWidget, i18n("The document is going to be launched on presentation mode because the file requested it."), TQString(), "autoPresentationWarning"); slotShowPresentation(); } @@ -502,7 +502,7 @@ bool Part::openURL(const KURL &url) // if it matches then: download it (if not local) extract to a temp file using // KTar and proceed with the URL of the temporary file - m_jobMime = TQString::null; + m_jobMime = TQString(); // this calls the above 'openURL' method bool b = KParts::ReadOnlyPart::openURL(url); @@ -510,7 +510,7 @@ bool Part::openURL(const KURL &url) // these setWindowCaption calls only work for local files if ( !b ) { - KMessageBox::error( widget(), i18n("Could not open %1").arg( url.prettyURL() ) ); + KMessageBox::error( widget(), i18n("Could not open %1").tqarg( url.prettyURL() ) ); emit setWindowCaption(""); } else @@ -548,11 +548,11 @@ bool Part::closeURL() if (!m_temporaryLocalFile.isNull()) { TQFile::remove( m_temporaryLocalFile ); - m_temporaryLocalFile = TQString::null; + m_temporaryLocalFile = TQString(); } slotHidePresentation(); - m_find->setEnabled( false ); + m_tqfind->setEnabled( false ); m_findNext->setEnabled( false ); m_saveAs->setEnabled( false ); m_printPreview->setEnabled( false ); @@ -571,7 +571,7 @@ bool Part::closeURL() bool Part::eventFilter( TQObject * watched, TQEvent * e ) { // if pageView has been resized, save splitter sizes - if ( watched == m_pageView && e->type() == TQEvent::Resize ) + if ( TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(m_pageView) && e->type() == TQEvent::Resize ) m_saveSplitterSizeTimer->start(500, true); // only intercept events, don't block them @@ -634,11 +634,11 @@ void Part::slotDoFileDirty() void Part::close() { - if (parent() && strcmp(parent()->name(), "KPDF::Shell") == 0) + if (tqparent() && strcmp(tqparent()->name(), "KPDF::Shell") == 0) { closeURL(); } - else KMessageBox::information(widget(), i18n("This link points to a close document action that does not work when using the embedded viewer."), TQString::null, "warnNoCloseIfNotInKPDF"); + else KMessageBox::information(widget(), i18n("This link points to a close document action that does not work when using the embedded viewer."), TQString(), "warnNoCloseIfNotInKPDF"); } void Part::updateViewActions() @@ -686,7 +686,7 @@ void Part::psTransformEnded() void Part::cannotQuit() { - KMessageBox::information(widget(), i18n("This link points to a quit application action that does not work when using the embedded viewer."), TQString::null, "warnNoQuitIfNotInKPDF"); + KMessageBox::information(widget(), i18n("This link points to a quit application action that does not work when using the embedded viewer."), TQString(), "warnNoQuitIfNotInKPDF"); } void Part::saveSplitterSize() @@ -789,7 +789,7 @@ void Part::slotFind() m_searchStarted = true; m_document->resetSearch( PART_SEARCH_ID ); m_document->searchText( PART_SEARCH_ID, dlg.pattern(), false, savedCaseSensitive, - KPDFDocument::NextMatch, true, qRgb( 255, 255, 64 ) ); + KPDFDocument::NextMatch, true, tqRgb( 255, 255, 64 ) ); } } @@ -801,22 +801,22 @@ void Part::slotFindNext() void Part::slotSaveFileAs() { - KURL saveURL = KFileDialog::getSaveURL( url().isLocalFile() ? url().url() : url().fileName(), TQString::null, widget() ); + KURL saveURL = KFileDialog::getSaveURL( url().isLocalFile() ? url().url() : url().fileName(), TQString(), widget() ); if ( saveURL.isValid() && !saveURL.isEmpty() ) { if (saveURL == url()) { - KMessageBox::information( widget(), i18n("You are trying to overwrite \"%1\" with itself. This is not allowed. Please save it in another location.").arg(saveURL.filename()) ); + KMessageBox::information( widget(), i18n("You are trying to overwrite \"%1\" with itself. This is not allowed. Please save it in another location.").tqarg(saveURL.filename()) ); return; } if ( KIO::NetAccess::exists( saveURL, false, widget() ) ) { - if (KMessageBox::warningContinueCancel( widget(), i18n("A file named \"%1\" already exists. Are you sure you want to overwrite it?").arg(saveURL.filename()), TQString::null, i18n("Overwrite")) != KMessageBox::Continue) + if (KMessageBox::warningContinueCancel( widget(), i18n("A file named \"%1\" already exists. Are you sure you want to overwrite it?").tqarg(saveURL.filename()), TQString(), i18n("Overwrite")) != KMessageBox::Continue) return; } if ( !KIO::NetAccess::file_copy( m_file, saveURL, -1, true ) ) - KMessageBox::information( 0, i18n("File could not be saved in '%1'. Try to save it to another location.").arg( saveURL.prettyURL() ) ); + KMessageBox::information( 0, i18n("File could not be saved in '%1'. Try to save it to another location.").tqarg( saveURL.prettyURL() ) ); } } @@ -894,7 +894,7 @@ void Part::slotPrintPreview() page = m_document->page(i); width = page->width(); height = page->height(); - if (page->rotation() == 90 || page->rotation() == 270) qSwap(width, height); + if (page->rotation() == 90 || page->rotation() == 270) tqSwap(width, height); if (width > height) landscape++; else portrait++; } @@ -939,7 +939,7 @@ void Part::slotShowMenu(const KPDFPage *page, const TQPoint &point) KPopupMenu *popup = new KPopupMenu( widget(), "rmb popup" ); if (page) { - popup->insertTitle( i18n( "Page %1" ).arg( page->number() + 1 ) ); + popup->insertTitle( i18n( "Page %1" ).tqarg( page->number() + 1 ) ); if ( page->hasBookmark() ) popup->insertItem( SmallIcon("bookmark"), i18n("Remove Bookmark"), 1 ); else @@ -1041,7 +1041,7 @@ void Part::slotPrint() page = m_document->page(i); width = page->width(); height = page->height(); - if (page->rotation() == 90 || page->rotation() == 270) qSwap(width, height); + if (page->rotation() == 90 || page->rotation() == 270) tqSwap(width, height); if (width > height) landscape++; else portrait++; } @@ -1085,8 +1085,8 @@ void Part::saveDocumentRestoreInfo(KConfig* config) /* * BrowserExtension class */ -BrowserExtension::BrowserExtension(Part* parent) - : KParts::BrowserExtension( parent, "KPDF::BrowserExtension" ) +BrowserExtension::BrowserExtension(Part* tqparent) + : KParts::BrowserExtension( tqparent, "KPDF::BrowserExtension" ) { emit enableAction("print", true); setURLDropHandlingEnabled(true); @@ -1094,7 +1094,7 @@ BrowserExtension::BrowserExtension(Part* parent) void BrowserExtension::print() { - static_cast<Part*>(parent())->slotPrint(); + static_cast<Part*>(tqparent())->slotPrint(); } #include "part.moc" diff --git a/kpdf/part.h b/kpdf/part.h index 70a3119e..23a12271 100644 --- a/kpdf/part.h +++ b/kpdf/part.h @@ -59,11 +59,12 @@ class BrowserExtension; class Part : public KParts::ReadOnlyPart, public DocumentObserver, virtual public kpdf_dcop { Q_OBJECT + TQ_OBJECT public: // Default constructor - Part(TQWidget* parentWidget, const char* widgetName, - TQObject* parent, const char* name, const TQStringList& args); + Part(TQWidget* tqparentWidget, const char* widgetName, + TQObject* tqparent, const char* name, const TQStringList& args); // Destructor ~Part(); @@ -178,7 +179,7 @@ private: KAction *m_lastPage; KAction *m_historyBack; KAction *m_historyNext; - KAction *m_find; + KAction *m_tqfind; KAction *m_findNext; KAction *m_saveAs; KAction *m_printPreview; @@ -196,6 +197,7 @@ private: class BrowserExtension : public KParts::BrowserExtension { Q_OBJECT + TQ_OBJECT public: BrowserExtension(Part*); diff --git a/kpdf/shell/shell.cpp b/kpdf/shell/shell.cpp index 8b6d185a..9a2f99b1 100644 --- a/kpdf/shell/shell.cpp +++ b/kpdf/shell/shell.cpp @@ -66,7 +66,7 @@ void Shell::init() { // now that the Part is loaded, we cast it to a Part to get // our hands on it - m_part = (KParts::ReadOnlyPart*) factory->createPart(this, "kpdf_part", this, 0, "KParts::ReadOnlyPart"); + m_part = (KParts::ReadOnlyPart*) factory->createPart(this, "kpdf_part", TQT_TQOBJECT(this), 0, "KParts::ReadOnlyPart"); if (m_part) { // then, setup our actions @@ -146,19 +146,19 @@ void Shell::writeSettings() void Shell::setupActions() { - KAction * openAction = KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection()); - m_recent = KStdAction::openRecent( this, TQT_SLOT( openURL( const KURL& ) ), actionCollection() ); + KAction * openAction = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(fileOpen()), actionCollection()); + m_recent = KStdAction::openRecent( TQT_TQOBJECT(this), TQT_SLOT( openURL( const KURL& ) ), actionCollection() ); connect( m_recent, TQT_SIGNAL( activated() ), openAction, TQT_SLOT( activate() ) ); m_recent->setWhatsThis( i18n( "<b>Click</b> to open a file or <b>Click and hold</b> to select a recent file" ) ); m_printAction = KStdAction::print( m_part, TQT_SLOT( slotPrint() ), actionCollection() ); m_printAction->setEnabled( false ); - KStdAction::quit(this, TQT_SLOT(slotQuit()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotQuit()), actionCollection()); setStandardToolBarMenuEnabled(true); - m_showMenuBarAction = KStdAction::showMenubar( this, TQT_SLOT( slotShowMenubar() ), actionCollection()); - KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection()); - m_fullScreenAction = KStdAction::fullScreen( this, TQT_SLOT( slotUpdateFullScreen() ), actionCollection(), this ); + m_showMenuBarAction = KStdAction::showMenubar( TQT_TQOBJECT(this), TQT_SLOT( slotShowMenubar() ), actionCollection()); + KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection()); + m_fullScreenAction = KStdAction::fullScreen( TQT_TQOBJECT(this), TQT_SLOT( slotUpdateFullScreen() ), actionCollection(), this ); } void Shell::saveProperties(KConfig* config) @@ -187,7 +187,7 @@ Shell::fileOpen() // this slot is called whenever the File->Open menu is selected, // the Open shortcut is pressed (usually CTRL+O) or the Open toolbar // button is clicked - KURL url = KFileDialog::getOpenURL( TQString::null, "application/pdf application/postscript" );//getOpenFileName(); + KURL url = KFileDialog::getOpenURL( TQString(), "application/pdf application/postscript" );//getOpenFileName(); if (!url.isEmpty()) openURL(url); diff --git a/kpdf/shell/shell.h b/kpdf/shell/shell.h index f92df5ce..d14cfd05 100644 --- a/kpdf/shell/shell.h +++ b/kpdf/shell/shell.h @@ -36,6 +36,7 @@ namespace KPDF class Shell : public KParts::MainWindow { Q_OBJECT + TQ_OBJECT public: /** diff --git a/kpdf/ui/minibar.cpp b/kpdf/ui/minibar.cpp index be3c9383..df3ebfce 100644 --- a/kpdf/ui/minibar.cpp +++ b/kpdf/ui/minibar.cpp @@ -25,10 +25,10 @@ #include "minibar.h" // [private widget] show progress -class ProgressWidget : public QWidget +class ProgressWidget : public TQWidget { public: - ProgressWidget( MiniBar * parent ); + ProgressWidget( MiniBar * tqparent ); void setProgress( float percentage ); protected: @@ -43,10 +43,10 @@ class ProgressWidget : public QWidget }; // [private widget] lineEdit for entering/validating page numbers -class PagesEdit : public QLineEdit +class PagesEdit : public TQLineEdit { public: - PagesEdit( MiniBar * parent ); + PagesEdit( MiniBar * tqparent ); void setPagesNumber( int pages ); void setText( const TQString & ); @@ -64,10 +64,10 @@ class PagesEdit : public QLineEdit }; // [private widget] a flat qpushbutton that enlights on hover -class HoverButton : public QPushButton +class HoverButton : public TQPushButton { public: - HoverButton( TQWidget * parent ); + HoverButton( TQWidget * tqparent ); protected: void paintEvent( TQPaintEvent * e ); @@ -78,8 +78,8 @@ class HoverButton : public QPushButton /** MiniBar **/ -MiniBar::MiniBar( TQWidget * parent, KPDFDocument * document ) - : TQFrame( parent, "miniBar" ), m_document( document ), +MiniBar::MiniBar( TQWidget * tqparent, KPDFDocument * document ) + : TQFrame( tqparent, "miniBar" ), m_document( document ), m_currentPage( -1 ) { // left spacer @@ -87,7 +87,7 @@ MiniBar::MiniBar( TQWidget * parent, KPDFDocument * document ) TQSpacerItem * spacerL = new TQSpacerItem( 20, 10, TQSizePolicy::Expanding ); horLayout->addItem( spacerL ); - // central 2r by 3c grid layout that contains all components + // central 2r by 3c grid tqlayout that contains all components TQGridLayout * gridLayout = new TQGridLayout( 0, 3,5, 2,1 ); // top spacer 6x6 px // TQSpacerItem * spacerTop = new TQSpacerItem( 6, 6, TQSizePolicy::Fixed, TQSizePolicy::Fixed ); @@ -127,7 +127,7 @@ MiniBar::MiniBar( TQWidget * parent, KPDFDocument * document ) connect( m_nextButton, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( nextPage() ) ); // widget starts hidden (will be shown after opening a document) - parent->hide(); + tqparent->hide(); } MiniBar::~MiniBar() @@ -146,7 +146,7 @@ void MiniBar::notifySetup( const TQValueVector< KPDFPage * > & pageVector, bool if ( pages < 1 ) { m_currentPage = -1; - static_cast<TQWidget*>( parent() )->hide(); + TQT_TQWIDGET( tqparent() )->hide(); return; } @@ -171,7 +171,7 @@ void MiniBar::notifySetup( const TQValueVector< KPDFPage * > & pageVector, bool m_pagesButton->setText( TQString::number( pages ) ); m_prevButton->setEnabled( false ); m_nextButton->setEnabled( false ); - static_cast<TQWidget*>( parent() )->show(); + TQT_TQWIDGET( tqparent() )->show(); } void MiniBar::notifyViewportChanged( bool /*smoothMove*/ ) @@ -198,7 +198,7 @@ void MiniBar::notifyViewportChanged( bool /*smoothMove*/ ) void MiniBar::resizeEvent( TQResizeEvent * e ) { // auto-hide 'prev' and 'next' buttons if not enough space - const TQSize & myHint = minimumSizeHint(); + const TQSize & myHint = tqminimumSizeHint(); bool shown = m_prevButton->isVisible() && m_nextButton->isVisible(); if ( shown && e->size().width() < myHint.width() ) { @@ -208,7 +208,7 @@ void MiniBar::resizeEvent( TQResizeEvent * e ) } else if ( !shown ) { - int histeresis = m_prevButton->sizeHint().width() * 2 + 2; + int histeresis = m_prevButton->tqsizeHint().width() * 2 + 2; if ( e->size().width() > (myHint.width() + histeresis) ) { m_prevButton->show(); @@ -259,9 +259,9 @@ void MiniBar::slotEmitPrevPage() /** ProgressWidget **/ -ProgressWidget::ProgressWidget( MiniBar * parent ) - : TQWidget( parent, "progress", WNoAutoErase ), - m_miniBar( parent ), m_progressPercentage( -1 ) +ProgressWidget::ProgressWidget( MiniBar * tqparent ) + : TQWidget( tqparent, "progress", WNoAutoErase ), + m_miniBar( tqparent ), m_progressPercentage( -1 ) { setFixedHeight( 4 ); setMouseTracking( true ); @@ -308,36 +308,36 @@ void ProgressWidget::paintEvent( TQPaintEvent * e ) // paint rects and a separator line TQPainter p( this ); if ( cRect.isValid() ) - p.fillRect( cRect, palette().active().highlightedText() ); + p.fillRect( cRect, tqpalette().active().highlightedText() ); if ( fRect.isValid() ) - p.fillRect( fRect, palette().active().highlight() ); + p.fillRect( fRect, tqpalette().active().highlight() ); if ( l && l != w ) { - p.setPen( palette().active().highlight().dark( 120 ) ); + p.setPen( tqpalette().active().highlight().dark( 120 ) ); int delta = TQApplication::reverseLayout() ? w - l : l; p.drawLine( delta, 0, delta, h ); } // draw a frame-like outline - //p.setPen( palette().active().mid() ); + //p.setPen( tqpalette().active().mid() ); //p.drawRect( 0,0, w, h ); } /** PagesEdit **/ -PagesEdit::PagesEdit( MiniBar * parent ) - : TQLineEdit( parent ), m_miniBar( parent ), m_eatClick( false ) +PagesEdit::PagesEdit( MiniBar * tqparent ) + : TQLineEdit( tqparent ), m_miniBar( tqparent ), m_eatClick( false ) { // customize look setFrameShadow( TQFrame::Raised ); focusOutEvent( 0 ); // use an integer validator - m_validator = new TQIntValidator( 1, 1, this ); + m_validator = new TQIntValidator( 1, 1, TQT_TQOBJECT(this) ); setValidator( m_validator ); // customize text properties - setAlignment( Qt::AlignCenter ); + tqsetAlignment( TQt::AlignCenter ); setMaxLength( 4 ); } @@ -363,7 +363,7 @@ void PagesEdit::focusInEvent( TQFocusEvent * e ) m_eatClick = true; // change background color to the default 'edit' color setLineWidth( 2 ); - setPaletteBackgroundColor( Qt::white ); + setPaletteBackgroundColor( TQt::white ); // call default handler TQLineEdit::focusInEvent( e ); } @@ -372,7 +372,7 @@ void PagesEdit::focusOutEvent( TQFocusEvent * e ) { // change background color to a dark tone setLineWidth( 1 ); - setPaletteBackgroundColor( palette().active().background().light( 105 ) ); + setPaletteBackgroundColor( tqpalette().active().background().light( 105 ) ); // restore text TQLineEdit::setText( backString ); // call default handler @@ -398,8 +398,8 @@ void PagesEdit::wheelEvent( TQWheelEvent * e ) /** HoverButton **/ -HoverButton::HoverButton( TQWidget * parent ) - : TQPushButton( parent ) +HoverButton::HoverButton( TQWidget * tqparent ) + : TQPushButton( tqparent ) { setMouseTracking( true ); #if KDE_IS_VERSION(3,3,90) @@ -428,7 +428,7 @@ void HoverButton::paintEvent( TQPaintEvent * e ) else { TQPainter p( this ); - p.fillRect(e->rect(), parentWidget() ? parentWidget()->palette().brush(TQPalette::Active, TQColorGroup::Background) : paletteBackgroundColor()); + p.fillRect(e->rect(), tqparentWidget() ? tqparentWidget()->tqpalette().brush(TQPalette::Active, TQColorGroup::Background) : paletteBackgroundColor()); drawButtonLabel( &p ); } } diff --git a/kpdf/ui/minibar.h b/kpdf/ui/minibar.h index f532999c..99bc13aa 100644 --- a/kpdf/ui/minibar.h +++ b/kpdf/ui/minibar.h @@ -25,8 +25,9 @@ class ProgressWidget; class MiniBar : public TQFrame, public DocumentObserver { Q_OBJECT + TQ_OBJECT public: - MiniBar( TQWidget *parent, KPDFDocument * document ); + MiniBar( TQWidget *tqparent, KPDFDocument * document ); ~MiniBar(); // [INHERITED] from DocumentObserver diff --git a/kpdf/ui/pagepainter.cpp b/kpdf/ui/pagepainter.cpp index 899be054..96fb1edf 100644 --- a/kpdf/ui/pagepainter.cpp +++ b/kpdf/ui/pagepainter.cpp @@ -26,7 +26,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, TQPixmap * pixmap = 0; // if a pixmap is present for given id, use it - if ( page->m_pixmaps.contains( id ) ) + if ( page->m_pixmaps.tqcontains( id ) ) pixmap = page->m_pixmaps[ id ]; // else find the closest match using pixmaps of other IDs (great optim!) @@ -49,13 +49,13 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, // if have no pixmap, draw blank page with gray cross and exit if ( !pixmap ) { - TQColor color = Qt::white; + TQColor color = TQt::white; if ( KpdfSettings::changeColors() ) { switch ( KpdfSettings::renderMode() ) { case KpdfSettings::EnumRenderMode::Inverted: - color = Qt::black; + color = TQt::black; break; case KpdfSettings::EnumRenderMode::Paper: color = KpdfSettings::paperColor(); @@ -70,7 +70,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, // draw a cross (to that the pixmap as not yet been loaded) // helps a lot on pages that take much to render - destPainter->setPen( Qt::gray ); + destPainter->setPen( TQt::gray ); destPainter->drawLine( 0, 0, width-1, height-1 ); destPainter->drawLine( 0, height-1, width-1, 0 ); // idea here: draw a hourglass (or kpdf icon :-) on top-left corner @@ -122,7 +122,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, else { p->save(); - // TODO paint only the needed part (note: hope that Qt4 transforms are faster) + // TODO paint only the needed part (note: hope that TQt4 transforms are faster) p->scale( width / (double)pixmap->width(), height / (double)pixmap->height() ); p->drawPixmap( 0,0, *pixmap, 0,0, pixmap->width(), pixmap->height() ); p->restore(); @@ -139,7 +139,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, { case KpdfSettings::EnumRenderMode::Inverted: // Invert image pixels using TQImage internal function - backImage.invertPixels(false); + backImage.tqinvertPixels(false); break; case KpdfSettings::EnumRenderMode::Recolor: // Recolor image using KImageEffect::flatten with dither:0 @@ -152,7 +152,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, con = KpdfSettings::bWContrast(), thr = 255 - KpdfSettings::bWThreshold(); for( int i = 0; i < pixels; ++i ) { - val = qGray( data[i] ); + val = tqGray( data[i] ); if ( val > thr ) val = 128 + (127 * (val - thr)) / (255 - thr); else if ( val < thr ) @@ -165,7 +165,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, else if ( val < 0 ) val = 0; } - data[i] = qRgba( val, val, val, 255 ); + data[i] = tqRgba( val, val, val, 255 ); } break; } @@ -178,7 +178,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, for ( ; hIt != hEnd; ++hIt ) { HighlightRect * r = *hIt; - TQRect highlightRect = r->geometry( width, height ); + TQRect highlightRect = r->tqgeometry( width, height ); if ( highlightRect.isValid() && highlightRect.intersects( limits ) ) { // find out the rect to highlight on pixmap @@ -197,10 +197,10 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, for( int x = highlightRect.left(); x <= highlightRect.right(); ++x ) { val = data[ x + offset ]; - newR = (qRed(val) * rh) / 255; - newG = (qGreen(val) * gh) / 255; - newB = (qBlue(val) * bh) / 255; - data[ x + offset ] = qRgba( newR, newG, newB, 255 ); + newR = (tqRed(val) * rh) / 255; + newG = (tqGreen(val) * gh) / 255; + newB = (tqBlue(val) * bh) / 255; + data[ x + offset ] = tqRgba( newR, newG, newB, 255 ); } offset += backImage.width(); } @@ -213,7 +213,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, // 3. visually enchance links and images if requested if ( enhanceLinks || enhanceImages ) { - TQColor normalColor = TQApplication::palette().active().highlight(); + TQColor normalColor = TQApplication::tqpalette().active().highlight(); TQColor lightColor = normalColor.light( 140 ); // enlarging limits for intersection is like growing the 'rectGeometry' below TQRect limitsEnlarged = limits; @@ -226,7 +226,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags, if ( (enhanceLinks && rect->objectType() == ObjectRect::Link) || (enhanceImages && rect->objectType() == ObjectRect::Image) ) { - TQRect rectGeometry = rect->geometry( width, height ); + TQRect rectGeometry = rect->tqgeometry( width, height ); if ( rectGeometry.intersects( limitsEnlarged ) ) { // expand rect and draw inner border diff --git a/kpdf/ui/pageview.cpp b/kpdf/ui/pageview.cpp index 3b0baecd..7172c6d3 100644 --- a/kpdf/ui/pageview.cpp +++ b/kpdf/ui/pageview.cpp @@ -68,7 +68,7 @@ public: TQValueVector< PageViewItem * > items; TQValueList< PageViewItem * > visibleItems; - // view layout (columns and continuous in Settings), zoom and mouse + // view tqlayout (columns and continuous in Settings), zoom and mouse PageView::ZoomMode zoomMode; float zoomFactor; int rotation; @@ -80,7 +80,7 @@ public: TQRect mouseSelectionRect; TQColor selectionRectColor; - // type ahead find + // type ahead tqfind bool typeAheadActive; TQString typeAheadString; TQTimer * findTimeoutTimer; @@ -119,7 +119,7 @@ public: -class PageViewTip : public QToolTip +class PageViewTip : public TQToolTip { public: PageViewTip( PageView * view ) @@ -146,8 +146,8 @@ void PageViewTip::maybeTip( const TQPoint &_p ) PageViewItem * pageItem = m_view->pickItemOnPoint( p.x(), p.y() ); if ( pageItem && m_view->d->mouseMode == PageView::MouseNormal ) { - double nX = (double)(p.x() - pageItem->geometry().left()) / (double)pageItem->width(), - nY = (double)(p.y() - pageItem->geometry().top()) / (double)pageItem->height(); + double nX = (double)(p.x() - pageItem->tqgeometry().left()) / (double)pageItem->width(), + nY = (double)(p.y() - pageItem->tqgeometry().top()) / (double)pageItem->height(); // if over a ObjectRect (of type Link) change cursor to hand const ObjectRect * object = pageItem->page()->hasObject( ObjectRect::Link, nX, nY ); @@ -158,8 +158,8 @@ void PageViewTip::maybeTip( const TQPoint &_p ) TQString strtip = link->linkTip(); if ( !strtip.isEmpty() ) { - TQRect linkRect = object->geometry( pageItem->width(), pageItem->height() ); - linkRect.moveBy( - m_view->contentsX() + pageItem->geometry().left(), - m_view->contentsY() + pageItem->geometry().top() ); + TQRect linkRect = object->tqgeometry( pageItem->width(), pageItem->height() ); + linkRect.moveBy( - m_view->contentsX() + pageItem->tqgeometry().left(), - m_view->contentsY() + pageItem->tqgeometry().top() ); tip( linkRect, strtip ); } } @@ -173,13 +173,13 @@ void PageViewTip::maybeTip( const TQPoint &_p ) * 160 - constructor and creating actions plus their connected slots (empty stuff) * 70 - DocumentObserver inherited methodes (important) * 550 - events: mouse, keyboard, drag/drop - * 170 - slotRelayoutPages: set contents of the scrollview on continuous/single modes + * 170 - slotRetqlayoutPages: set contents of the scrollview on continuous/single modes * 100 - zoom: zooming pages in different ways, keeping update the toolbar actions, etc.. * other misc functions: only slotRequestVisiblePixmaps and pickItemOnPoint noticeable, * and many insignificant stuff like this comment :-) */ -PageView::PageView( TQWidget *parent, KPDFDocument *document ) - : TQScrollView( parent, "KPDF::pageView", WStaticContents | WNoAutoErase ) +PageView::PageView( TQWidget *tqparent, KPDFDocument *document ) + : TQScrollView( tqparent, "KPDF::pageView", WStaticContents | WNoAutoErase ) { // create and initialize private storage structure d = new PageViewPrivate(); @@ -206,9 +206,9 @@ PageView::PageView( TQWidget *parent, KPDFDocument *document ) // widget setup: setup focus, accept drops and track mouse viewport()->setFocusProxy( this ); - viewport()->setFocusPolicy( StrongFocus ); - //viewport()->setPaletteBackgroundColor( Qt::white ); - viewport()->setBackgroundMode( Qt::NoBackground ); + viewport()->setFocusPolicy( TQ_StrongFocus ); + //viewport()->setPaletteBackgroundColor( TQt::white ); + viewport()->setBackgroundMode( TQt::NoBackground ); setResizePolicy( Manual ); setAcceptDrops( true ); setDragAutoScroll( false ); @@ -245,16 +245,16 @@ PageView::~PageView() void PageView::setupActions( KActionCollection * ac ) { // Zoom actions ( higher scales takes lots of memory! ) - d->aZoom = new KSelectAction( i18n( "Zoom" ), "viewmag", 0, this, TQT_SLOT( slotZoom() ), ac, "zoom_to" ); + d->aZoom = new KSelectAction( i18n( "Zoom" ), "viewmag", 0, TQT_TQOBJECT(this), TQT_SLOT( slotZoom() ), ac, "zoom_to" ); d->aZoom->setEditable( true ); #if KDE_IS_VERSION(3,4,89) d->aZoom->setMaxComboViewCount( 13 ); #endif updateZoomText(); - KStdAction::zoomIn( this, TQT_SLOT( slotZoomIn() ), ac, "zoom_in" ); + KStdAction::zoomIn( TQT_TQOBJECT(this), TQT_SLOT( slotZoomIn() ), ac, "zoom_in" ); - KStdAction::zoomOut( this, TQT_SLOT( slotZoomOut() ), ac, "zoom_out" ); + KStdAction::zoomOut( TQT_TQOBJECT(this), TQT_SLOT( slotZoomOut() ), ac, "zoom_out" ); d->aZoomFitWidth = new KToggleAction( i18n("Fit to Page &Width"), "view_fit_width", 0, ac, "zoom_fit_width" ); connect( d->aZoomFitWidth, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotFitToWidthToggled( bool ) ) ); @@ -268,10 +268,10 @@ void PageView::setupActions( KActionCollection * ac ) // rotate actions KAction *action; action = new KAction( i18n("Rotate Right"), "rotate_cw", KShortcut( "Ctrl+Shift++" ), - this, TQT_SLOT( slotRotateRight() ), ac, "rotate_right" ); + TQT_TQOBJECT(this), TQT_SLOT( slotRotateRight() ), ac, "rotate_right" ); action = new KAction( i18n("Rotate Left"), "rotate_ccw", KShortcut( "Ctrl+Shift+-" ), - this, TQT_SLOT( slotRotateLeft() ), ac, "rotate_left" ); + TQT_TQOBJECT(this), TQT_SLOT( slotRotateLeft() ), ac, "rotate_left" ); // View-Layout actions d->aViewTwoPages = new KToggleAction( i18n("&Two Pages"), "view_left_right", 0, ac, "view_twopages" ); @@ -283,25 +283,25 @@ void PageView::setupActions( KActionCollection * ac ) d->aViewContinuous->setChecked( KpdfSettings::viewContinuous() ); // Mouse-Mode actions - d->aMouseNormal = new KRadioAction( i18n("&Browse Tool"), "mouse", 0, this, TQT_SLOT( slotSetMouseNormal() ), ac, "mouse_drag" ); + d->aMouseNormal = new KRadioAction( i18n("&Browse Tool"), "mouse", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetMouseNormal() ), ac, "mouse_drag" ); d->aMouseNormal->setExclusiveGroup( "MouseType" ); d->aMouseNormal->setChecked( true ); - KToggleAction * mz = new KRadioAction( i18n("&Zoom Tool"), "viewmag", 0, this, TQT_SLOT( slotSetMouseZoom() ), ac, "mouse_zoom" ); + KToggleAction * mz = new KRadioAction( i18n("&Zoom Tool"), "viewmag", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetMouseZoom() ), ac, "mouse_zoom" ); mz->setExclusiveGroup( "MouseType" ); - d->aMouseSelect = new KRadioAction( i18n("&Select Tool"), "frame_edit", 0, this, TQT_SLOT( slotSetMouseSelect() ), ac, "mouse_select" ); + d->aMouseSelect = new KRadioAction( i18n("&Select Tool"), "frame_edit", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetMouseSelect() ), ac, "mouse_select" ); d->aMouseSelect->setExclusiveGroup( "MouseType" ); -/* d->aMouseEdit = new KRadioAction( i18n("Draw"), "edit", 0, this, TQT_SLOT( slotSetMouseDraw() ), ac, "mouse_draw" ); +/* d->aMouseEdit = new KRadioAction( i18n("Draw"), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT( slotSetMouseDraw() ), ac, "mouse_draw" ); d->aMouseEdit->setExclusiveGroup("MouseType"); d->aMouseEdit->setEnabled( false ); // implement feature before removing this line*/ // Other actions - KAction * su = new KAction( i18n("Scroll Up"), 0, this, TQT_SLOT( slotScrollUp() ), ac, "view_scroll_up" ); + KAction * su = new KAction( i18n("Scroll Up"), 0, TQT_TQOBJECT(this), TQT_SLOT( slotScrollUp() ), ac, "view_scroll_up" ); su->setShortcut( "Shift+Up" ); - KAction * sd = new KAction( i18n("Scroll Down"), 0, this, TQT_SLOT( slotScrollDown() ), ac, "view_scroll_down" ); + KAction * sd = new KAction( i18n("Scroll Down"), 0, TQT_TQOBJECT(this), TQT_SLOT( slotScrollDown() ), ac, "view_scroll_down" ); sd->setShortcut( "Shift+Down" ); } @@ -337,18 +337,18 @@ void PageView::notifySetup( const TQValueVector< KPDFPage * > & pageSet, bool do d->items.clear(); d->visibleItems.clear(); - // create children widgets + // create tqchildren widgets TQValueVector< KPDFPage * >::const_iterator setIt = pageSet.begin(), setEnd = pageSet.end(); for ( ; setIt != setEnd; ++setIt ) d->items.push_back( new PageViewItem( *setIt ) ); if ( pageSet.count() > 0 ) - // TODO for Enrico: Check if doing always the slotRelayoutPages() is not + // TODO for Enrico: Check if doing always the slotRetqlayoutPages() is not // suboptimal in some cases, i'd say it is not but a recheck will not hurt - // Need slotRelayoutPages() here instead of d->dirtyLayout = true + // Need slotRetqlayoutPages() here instead of d->dirtyLayout = true // because opening a pdf from another pdf will not trigger a viewportchange - // so pages are never relayouted - TQTimer::singleShot(0, this, TQT_SLOT(slotRelayoutPages())); + // so pages are never retqlayouted + TQTimer::singleShot(0, this, TQT_SLOT(slotRetqlayoutPages())); else { // update the mouse cursor when closing because we may have close through a link and @@ -392,13 +392,13 @@ void PageView::notifyViewportChanged( bool smoothMove ) return; } - // relayout in "Single Pages" mode or if a relayout is pending + // retqlayout in "Single Pages" mode or if a retqlayout is pending d->blockPixmapsRequest = true; if ( !KpdfSettings::viewContinuous() || d->dirtyLayout ) - slotRelayoutPages(); + slotRetqlayoutPages(); - // restore viewport center or use default {x-center,v-top} alignment - const TQRect & r = item->geometry(); + // restore viewport center or use default {x-center,v-top} tqalignment + const TQRect & r = item->tqgeometry(); int newCenterX = r.left(), newCenterY = r.top(); if ( vp.rePos.enabled ) @@ -462,18 +462,18 @@ void PageView::notifyPageChanged( int pageNumber, int changedFlags ) if ( changedFlags & DocumentObserver::Bookmark ) return; - // iterate over visible items: if page(pageNumber) is one of them, repaint it + // iterate over visible items: if page(pageNumber) is one of them, tqrepaint it TQValueList< PageViewItem * >::iterator iIt = d->visibleItems.begin(), iEnd = d->visibleItems.end(); for ( ; iIt != iEnd; ++iIt ) if ( (*iIt)->pageNumber() == pageNumber ) { // update item's rectangle plus the little outline - TQRect expandedRect = (*iIt)->geometry(); + TQRect expandedRect = (*iIt)->tqgeometry(); expandedRect.addCoords( -1, -1, 3, 3 ); updateContents( expandedRect ); // if we were "zoom-dragging" do not overwrite the "zoom-drag" cursor - if ( cursor().shape() != Qt::SizeVerCursor ) + if ( cursor().shape() != TQt::SizeVerCursor ) { // since the page has been regenerated below cursor, update it updateCursor( viewportToContents( mapFromGlobal( TQCursor::pos() ) ) ); @@ -532,10 +532,10 @@ void PageView::viewportPaintEvent( TQPaintEvent * pe ) selectionRectInternal.addCoords( 1, 1, -1, -1 ); // color for blending TQColor selBlendColor = (selectionRect.width() > 8 || selectionRect.height() > 8) ? - d->selectionRectColor : Qt::red; + d->selectionRectColor : TQt::red; // subdivide region into rects - TQMemArray<TQRect> allRects = pe->region().rects(); + TQMemArray<TQRect> allRects = TQRegion(pe->region()).tqrects(); uint numRects = allRects.count(); // preprocess rects area to see if it worths or not using subdivision @@ -577,7 +577,7 @@ void PageView::viewportPaintEvent( TQPaintEvent * pe ) // 2) Layer 1: pixmap manipulated areas // 3) Layer 2: paint (blend) transparent selection if ( !selectionRect.isNull() && selectionRect.intersects( contentsRect ) && - !selectionRectInternal.contains( contentsRect ) ) + !selectionRectInternal.tqcontains( contentsRect ) ) { TQRect blendRect = selectionRectInternal.intersect( contentsRect ); // skip rectangles covered by the selection's border @@ -592,7 +592,7 @@ void PageView::viewportPaintEvent( TQPaintEvent * pe ) TQImage blendedImage = blendedPixmap.convertToImage(); KImageEffect::blend( selBlendColor.dark(140), blendedImage, 0.2 ); // copy the blended pixmap back to its place - pixmapPainter.drawPixmap( blendRect.left(), blendRect.top(), blendedImage ); + pixmapPainter.tqdrawPixmap( blendRect.left(), blendRect.top(), blendedImage ); } // draw border (red if the selection is too small) pixmapPainter.setPen( selBlendColor ); @@ -601,7 +601,7 @@ void PageView::viewportPaintEvent( TQPaintEvent * pe ) // 4) Layer 3: overlays if ( KpdfSettings::debugDrawBoundaries() ) { - pixmapPainter.setPen( Qt::blue ); + pixmapPainter.setPen( TQt::blue ); pixmapPainter.drawRect( contentsRect ); } @@ -616,15 +616,15 @@ void PageView::viewportPaintEvent( TQPaintEvent * pe ) // 2) Layer 1: opaque manipulated ares (filled / contours) // 3) Layer 2: paint opaque selection if ( !selectionRect.isNull() && selectionRect.intersects( contentsRect ) && - !selectionRectInternal.contains( contentsRect ) ) + !selectionRectInternal.tqcontains( contentsRect ) ) { - screenPainter.setPen( palette().active().highlight().dark(110) ); + screenPainter.setPen( tqpalette().active().highlight().dark(110) ); screenPainter.drawRect( selectionRect ); } // 4) Layer 3: overlays if ( KpdfSettings::debugDrawBoundaries() ) { - screenPainter.setPen( Qt::red ); + screenPainter.setPen( TQt::red ); screenPainter.drawRect( contentsRect ); } } @@ -637,7 +637,7 @@ void PageView::viewportResizeEvent( TQResizeEvent * ) if ( !d->delayResizeTimer ) { d->delayResizeTimer = new TQTimer( this ); - connect( d->delayResizeTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotRelayoutPages() ) ); + connect( d->delayResizeTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotRetqlayoutPages() ) ); } d->delayResizeTimer->start( 333, true ); } @@ -647,7 +647,7 @@ void PageView::keyPressEvent( TQKeyEvent * e ) e->accept(); // if performing a selection or dyn zooming, disable keys handling - if ( ( !d->mouseSelectionRect.isNull() && e->key() != Qt::Key_Escape ) || d->mouseMidStartY != -1 ) + if ( ( !d->mouseSelectionRect.isNull() && e->key() != TQt::Key_Escape ) || d->mouseMidStartY != -1 ) return; // handle 'find as you type' (based on khtml/khtmlview.cpp) @@ -660,9 +660,9 @@ void PageView::keyPressEvent( TQKeyEvent * e ) { d->typeAheadString = d->typeAheadString.left( d->typeAheadString.length() - 1 ); bool found = d->document->searchText( PAGEVIEW_SEARCH_ID, d->typeAheadString, true, false, - KPDFDocument::NextMatch, true, qRgb( 128, 255, 128 ), true ); + KPDFDocument::NextMatch, true, tqRgb( 128, 255, 128 ), true ); TQString status = found ? i18n("Text found: \"%1\".") : i18n("Text not found: \"%1\"."); - d->messageWindow->display( status.arg(d->typeAheadString.lower()), + d->messageWindow->display( status.tqarg(d->typeAheadString.lower()), found ? PageViewMessage::Find : PageViewMessage::Warning, 4000 ); d->findTimeoutTimer->start( 3000, true ); } @@ -682,7 +682,7 @@ void PageView::keyPressEvent( TQKeyEvent * e ) // because it activates the accel releaseKeyboard(); if ( d->document->continueSearch( PAGEVIEW_SEARCH_ID ) ) - d->messageWindow->display( i18n("Text found: \"%1\".").arg(d->typeAheadString.lower()), + d->messageWindow->display( i18n("Text found: \"%1\".").tqarg(d->typeAheadString.lower()), PageViewMessage::Find, 3000 ); d->findTimeoutTimer->start( 3000, true ); // it is needed to grab the keyboard becase people may have Space assigned to a @@ -784,7 +784,7 @@ void PageView::keyPressEvent( TQKeyEvent * e ) case Key_Right: horizontalScrollBar()->addLine(); break; - case Qt::Key_Escape: + case TQt::Key_Escape: selectionClear(); d->mousePressPos = TQPoint(); if ( d->aPrevAction ) @@ -840,19 +840,19 @@ void PageView::contentsMouseMoveEvent( TQMouseEvent * e ) return; // if holding mouse mid button, perform zoom - if ( (e->state() & MidButton) && d->mouseMidStartY >= 0 ) + if ( (e->state() & Qt::MidButton) && d->mouseMidStartY >= 0 ) { int deltaY = d->mouseMidStartY - e->globalPos().y(); d->mouseMidStartY = e->globalPos().y(); d->zoomFactor *= ( 1.0 + ( (double)deltaY / 500.0 ) ); updateZoom( ZoomRefreshCurrent ); // uncomment following line to force a complete redraw - viewport()->repaint( false ); + viewport()->tqrepaint( false ); return; } - bool leftButton = e->state() & LeftButton, - rightButton = e->state() & RightButton; + bool leftButton = e->state() & Qt::LeftButton, + rightButton = e->state() & Qt::RightButton; switch ( d->mouseMode ) { case MouseNormal: @@ -876,7 +876,7 @@ void PageView::contentsMouseMoveEvent( TQMouseEvent * e ) { d->aPrevAction = d->aMouseNormal; d->aMouseSelect->activate(); - TQColor selColor = palette().active().highlight().light( 120 ); + TQColor selColor = tqpalette().active().highlight().light( 120 ); selectionStart( e->x() + deltaX, e->y() + deltaY, selColor, false ); selectionEndPoint( e->x(), e->y() ); break; @@ -920,7 +920,7 @@ void PageView::contentsMousePressEvent( TQMouseEvent * e ) } // if pressing mid mouse button while not doing other things, begin 'comtinous zoom' mode - if ( e->button() & MidButton ) + if ( e->button() & Qt::MidButton ) { d->mouseMidStartY = e->globalPos().y(); setCursor( KCursor::sizeVerCursor() ); @@ -931,8 +931,8 @@ void PageView::contentsMousePressEvent( TQMouseEvent * e ) d->mousePressPos = e->globalPos(); // handle mode dependant mouse press actions - bool leftButton = e->button() & LeftButton, - rightButton = e->button() & RightButton; + bool leftButton = e->button() & Qt::LeftButton, + rightButton = e->button() & Qt::RightButton; switch ( d->mouseMode ) { case MouseNormal: // drag start / click / link following @@ -946,7 +946,7 @@ void PageView::contentsMousePressEvent( TQMouseEvent * e ) case MouseZoom: // set first corner of the zoom rect if ( leftButton ) - selectionStart( e->x(), e->y(), palette().active().highlight(), false ); + selectionStart( e->x(), e->y(), tqpalette().active().highlight(), false ); else if ( rightButton ) updateZoom( ZoomOut ); break; @@ -954,7 +954,7 @@ void PageView::contentsMousePressEvent( TQMouseEvent * e ) case MouseSelect: // set first corner of the selection rect if ( leftButton ) { - TQColor selColor = palette().active().highlight().light( 120 ); + TQColor selColor = tqpalette().active().highlight().light( 120 ); selectionStart( e->x(), e->y(), selColor, false ); } break; @@ -973,7 +973,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) if ( d->items.isEmpty() ) { // ..except for right Clicks (emitted even it viewport is empty) - if ( e->button() == RightButton ) + if ( e->button() == Qt::RightButton ) emit rightClick( 0, e->globalPos() ); return; } @@ -983,7 +983,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) return; // handle mode indepent mid buttom zoom - bool midButton = e->button() & MidButton; + bool midButton = e->button() & Qt::MidButton; if ( midButton && d->mouseMidStartY > 0 ) { d->mouseMidStartY = -1; @@ -992,13 +992,13 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) return; } - bool leftButton = e->button() & LeftButton, - rightButton = e->button() & RightButton; + bool leftButton = e->button() & Qt::LeftButton, + rightButton = e->button() & Qt::RightButton; switch ( d->mouseMode ) { case MouseNormal:{ // return the cursor to its normal state after dragging - if ( cursor().shape() == Qt::SizeAllCursor ) + if ( cursor().shape() == TQt::SizeAllCursor ) updateCursor( e->pos() ); PageViewItem * pageItem = pickItemOnPoint( e->x(), e->y() ); @@ -1006,8 +1006,8 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) // if the mouse has not moved since the press, that's a -click- if ( leftButton && pageItem && d->mousePressPos == e->globalPos()) { - double nX = (double)(e->x() - pageItem->geometry().left()) / (double)pageItem->width(), - nY = (double)(e->y() - pageItem->geometry().top()) / (double)pageItem->height(); + double nX = (double)(e->x() - pageItem->tqgeometry().left()) / (double)pageItem->width(), + nY = (double)(e->y() - pageItem->tqgeometry().top()) / (double)pageItem->height(); const ObjectRect * linkRect, * imageRect; linkRect = pageItem->page()->hasObject( ObjectRect::Link, nX, nY ); if ( linkRect ) @@ -1052,7 +1052,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) } // find out new zoom ratio and normalized view center (relative to the contentsRect) - double zoom = QMIN( (double)visibleWidth() / (double)selRect.width(), (double)visibleHeight() / (double)selRect.height() ); + double zoom = TQMIN( (double)visibleWidth() / (double)selRect.width(), (double)visibleHeight() / (double)selRect.height() ); double nX = (double)(selRect.left() + selRect.right()) / (2.0 * (double)contentsWidth()); double nY = (double)(selRect.top() + selRect.bottom()) / (2.0 * (double)contentsHeight()); @@ -1105,16 +1105,16 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) for ( ; iIt != iEnd; ++iIt ) { PageViewItem * item = *iIt; - const TQRect & itemRect = item->geometry(); - if ( selectionRect.intersects( itemRect ) ) + const TQRect & tqitemRect = item->tqgeometry(); + if ( selectionRect.intersects( tqitemRect ) ) { // request the textpage if there isn't one const KPDFPage * kpdfPage = item->page(); if ( !kpdfPage->hasSearchPage() ) d->document->requestTextPage( kpdfPage->number() ); - // grab text in the rect that intersects itemRect - TQRect relativeRect = selectionRect.intersect( itemRect ); - relativeRect.moveBy( -itemRect.left(), -itemRect.top() ); + // grab text in the rect that intersects tqitemRect + TQRect relativeRect = selectionRect.intersect( tqitemRect ); + relativeRect.moveBy( -tqitemRect.left(), -tqitemRect.top() ); NormalizedRect normRect( relativeRect, item->width(), item->height() ); selectedText += kpdfPage->getText( normRect ); } @@ -1131,7 +1131,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) if ( KpdfSettings::useKTTSD() ) menu.insertItem( SmallIcon("kttsd"), i18n( "Speak Text" ), 2 ); } - menu.insertTitle( i18n( "Image (%1 by %2 pixels)" ).arg( selectionRect.width() ).arg( selectionRect.height() ) ); + menu.insertTitle( i18n( "Image (%1 by %2 pixels)" ).tqarg( selectionRect.width() ).tqarg( selectionRect.height() ) ); menu.insertItem( SmallIcon("image"), i18n( "Copy to Clipboard" ), 3 ); menu.insertItem( SmallIcon("filesave"), i18n( "Save to File..." ), 4 ); int choice = menu.exec( e->globalPos() ); @@ -1147,16 +1147,16 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) if ( choice == 3 ) { // [2] copy pixmap to clipboard - QClipboard *cb = TQApplication::clipboard(); - cb->setPixmap( copyPix, QClipboard::Clipboard ); + TQClipboard *cb = TQApplication::tqclipboard(); + cb->setPixmap( copyPix, TQClipboard::Clipboard ); if ( cb->supportsSelection() ) - cb->setPixmap( copyPix, QClipboard::Selection ); - d->messageWindow->display( i18n( "Image [%1x%2] copied to clipboard." ).arg( copyPix.width() ).arg( copyPix.height() ) ); + cb->setPixmap( copyPix, TQClipboard::Selection ); + d->messageWindow->display( i18n( "Image [%1x%2] copied to clipboard." ).tqarg( copyPix.width() ).tqarg( copyPix.height() ) ); } else if ( choice == 4 ) { // [3] save pixmap to file - TQString fileName = KFileDialog::getSaveFileName( TQString::null, "image/png image/jpeg", this ); + TQString fileName = KFileDialog::getSaveFileName( TQString(), "image/png image/jpeg", this ); if ( fileName.isNull() ) d->messageWindow->display( i18n( "File not saved." ), PageViewMessage::Warning ); else @@ -1165,7 +1165,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) if ( type.isNull() ) type = "PNG"; copyPix.save( fileName, type.latin1() ); - d->messageWindow->display( i18n( "Image [%1x%2] saved to %3 file." ).arg( copyPix.width() ).arg( copyPix.height() ).arg( type ) ); + d->messageWindow->display( i18n( "Image [%1x%2] saved to %3 file." ).tqarg( copyPix.width() ).tqarg( copyPix.height() ).tqarg( type ) ); } } } @@ -1175,10 +1175,10 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) if ( choice == 1 ) { // [1] copy text to clipboard - QClipboard *cb = TQApplication::clipboard(); - cb->setText( selectedText, QClipboard::Clipboard ); + TQClipboard *cb = TQApplication::tqclipboard(); + cb->setText( selectedText, TQClipboard::Clipboard ); if ( cb->supportsSelection() ) - cb->setText( selectedText, QClipboard::Selection ); + cb->setText( selectedText, TQClipboard::Selection ); } else if ( choice == 2 ) { @@ -1194,7 +1194,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) TQString error; if (KApplication::startServiceByDesktopName("kttsd", TQStringList(), &error)) { - d->messageWindow->display( i18n("Starting KTTSD Failed: %1").arg(error) ); + d->messageWindow->display( i18n("Starting KTTSD Failed: %1").tqarg(error) ); KpdfSettings::setUseKTTSD(false); KpdfSettings::writeConfig(); } @@ -1221,7 +1221,7 @@ void PageView::contentsMouseReleaseEvent( TQMouseEvent * e ) } } - // clear widget selection and invalidate rect + // clear widget selection and tqinvalidate rect selectionClear(); // restore previous action if came from it using right button @@ -1323,39 +1323,39 @@ void PageView::paintItems( TQPainter * p, const TQRect & contentsRect ) for ( ; iIt != iEnd; ++iIt ) { // check if a piece of the page intersects the contents rect - if ( !(*iIt)->geometry().intersects( checkRect ) ) + if ( !(*iIt)->tqgeometry().intersects( checkRect ) ) continue; PageViewItem * item = *iIt; - TQRect pixmapGeometry = item->geometry(); + TQRect pixmapGeometry = item->tqgeometry(); // translate the painter so we draw top-left pixmap corner in 0,0 p->save(); p->translate( pixmapGeometry.left(), pixmapGeometry.top() ); - // item pixmap and outline geometry + // item pixmap and outline tqgeometry TQRect outlineGeometry = pixmapGeometry; outlineGeometry.addCoords( -1, -1, 3, 3 ); // draw the page outline (little black border and 2px shadow) - if ( !pixmapGeometry.contains( contentsRect ) ) + if ( !pixmapGeometry.tqcontains( contentsRect ) ) { int pixmapWidth = pixmapGeometry.width(), pixmapHeight = pixmapGeometry.height(); // draw simple outline - p->setPen( Qt::black ); + p->setPen( TQt::black ); p->drawRect( -1, -1, pixmapWidth + 2, pixmapHeight + 2 ); // draw bottom/right gradient int levels = 2; - int r = Qt::gray.red() / (levels + 2), - g = Qt::gray.green() / (levels + 2), - b = Qt::gray.blue() / (levels + 2); + int r = TQt::gray.red() / (levels + 2), + g = TQt::gray.green() / (levels + 2), + b = TQt::gray.blue() / (levels + 2); for ( int i = 0; i < levels; i++ ) { p->setPen( TQColor( r * (i+2), g * (i+2), b * (i+2) ) ); p->drawLine( i, i + pixmapHeight + 1, i + pixmapWidth + 1, i + pixmapHeight + 1 ); p->drawLine( i + pixmapWidth + 1, i, i + pixmapWidth + 1, i + pixmapHeight ); - p->setPen( Qt::gray ); + p->setPen( TQt::gray ); p->drawLine( -1, i + pixmapHeight + 1, i - 1, i + pixmapHeight + 1 ); p->drawLine( i + pixmapWidth + 1, -1, i + pixmapWidth + 1, i - 1 ); } @@ -1378,10 +1378,10 @@ void PageView::paintItems( TQPainter * p, const TQRect & contentsRect ) } // paint with background color the unpainted area - TQMemArray<TQRect> backRects = remainingArea.rects(); + TQMemArray<TQRect> backRects = remainingArea.tqrects(); uint backRectsNumber = backRects.count(); for ( uint jr = 0; jr < backRectsNumber; jr++ ) - p->fillRect( backRects[ jr ], Qt::gray ); + p->fillRect( backRects[ jr ], TQt::gray ); } void PageView::updateItemSize( PageViewItem * item, int colWidth, int rowHeight ) @@ -1407,7 +1407,7 @@ void PageView::updateItemSize( PageViewItem * item, int colWidth, int rowHeight { double scaleW = (double)colWidth / (double)width; double scaleH = (double)rowHeight / (double)height; - zoom = QMIN( scaleW, scaleH ); + zoom = TQMIN( scaleW, scaleH ); item->setWHZ( (int)(zoom * width), (int)(zoom * height), zoom ); d->zoomFactor = zoom; } @@ -1424,7 +1424,7 @@ PageViewItem * PageView::pickItemOnPoint( int x, int y ) for ( ; iIt != iEnd; ++iIt ) { PageViewItem * i = *iIt; - const TQRect & r = i->geometry(); + const TQRect & r = i->tqgeometry(); if ( x < r.right() && x > r.left() && y < r.bottom() ) { if ( y > r.top() ) @@ -1465,8 +1465,8 @@ void PageView::selectionEndPoint( int x, int y ) // clip selection to the viewport TQRect viewportRect( contentsX(), contentsY(), visibleWidth(), visibleHeight() ); - x = QMAX( QMIN( x, viewportRect.right() ), viewportRect.left() ); - y = QMAX( QMIN( y, viewportRect.bottom() ), viewportRect.top() ); + x = TQMAX( TQMIN( x, viewportRect.right() ), viewportRect.left() ); + y = TQMAX( TQMIN( y, viewportRect.bottom() ), viewportRect.top() ); // if selection changed update rect if ( d->mouseSelectionRect.right() != x || d->mouseSelectionRect.bottom() != y ) { @@ -1485,7 +1485,7 @@ void PageView::selectionEndPoint( int x, int y ) compoundRegion -= intersection; } // tassellate region with rects and enqueue paint events - TQMemArray<TQRect> rects = compoundRegion.rects(); + TQMemArray<TQRect> rects = compoundRegion.tqrects(); for ( uint i = 0; i < rects.count(); i++ ) updateContents( rects[i] ); } @@ -1513,7 +1513,7 @@ void PageView::updateZoom( ZoomMode newZoomMode ) { case ZoomFixed:{ //ZoomFixed case TQString z = d->aZoom->currentText(); - newFactor = KGlobal::locale()->readNumber( z.remove( z.find( '%' ), 1 ) ) / 100.0; + newFactor = KGlobal::locale()->readNumber( z.remove( z.tqfind( '%' ), 1 ) ) / 100.0; }break; case ZoomIn: newFactor += (newFactor > 0.99) ? ( newFactor > 1.99 ? 0.5 : 0.2 ) : 0.1; @@ -1544,13 +1544,13 @@ void PageView::updateZoom( ZoomMode newZoomMode ) if ( newZoomMode != d->zoomMode || (newZoomMode == ZoomFixed && newFactor != d->zoomFactor ) ) { - // rebuild layout and update the whole viewport + // rebuild tqlayout and update the whole viewport d->zoomMode = newZoomMode; d->zoomFactor = newFactor; // be sure to block updates to document's viewport bool prevState = d->blockViewport; d->blockViewport = true; - slotRelayoutPages(); + slotRetqlayoutPages(); d->blockViewport = prevState; // request pixmaps slotRequestVisiblePixmaps(); @@ -1572,7 +1572,7 @@ void PageView::updateZoomText() { // use current page zoom as zoomFactor if in ZoomFit/* mode if ( d->zoomMode != ZoomFixed && d->items.count() > 0 ) - d->zoomFactor = d->items[ QMAX( 0, (int)d->document->currentPage() ) ]->zoomFactor(); + d->zoomFactor = d->items[ TQMAX( 0, (int)d->document->currentPage() ) ]->zoomFactor(); float newFactor = d->zoomFactor; d->aZoom->clear(); @@ -1599,7 +1599,7 @@ void PageView::updateZoomText() selIdx++; TQString localValue( KGlobal::locale()->formatNumber( value * 100.0, 2 ) ); localValue.remove( KGlobal::locale()->decimalSymbol() + double_oh ); - translated << TQString( "%1%" ).arg( localValue ); + translated << TQString( "%1%" ).tqarg( localValue ); } d->aZoom->setItems( translated ); @@ -1619,8 +1619,8 @@ void PageView::updateCursor( const TQPoint &p ) PageViewItem * pageItem = pickItemOnPoint( p.x(), p.y() ); if ( pageItem && d->mouseMode == MouseNormal ) { - double nX = (double)(p.x() - pageItem->geometry().left()) / (double)pageItem->width(), - nY = (double)(p.y() - pageItem->geometry().top()) / (double)pageItem->height(); + double nX = (double)(p.x() - pageItem->tqgeometry().left()) / (double)pageItem->width(), + nY = (double)(p.y() - pageItem->tqgeometry().top()) / (double)pageItem->height(); // if over a ObjectRect (of type Link) change cursor to hand d->mouseOnRect = pageItem->page()->hasObject( ObjectRect::Link, nX, nY ); @@ -1641,15 +1641,15 @@ void PageView::updateCursor( const TQPoint &p ) void PageView::doTypeAheadSearch() { bool found = d->document->searchText( PAGEVIEW_SEARCH_ID, d->typeAheadString, false, false, - KPDFDocument::NextMatch, true, qRgb( 128, 255, 128 ), true ); + KPDFDocument::NextMatch, true, tqRgb( 128, 255, 128 ), true ); TQString status = found ? i18n("Text found: \"%1\".") : i18n("Text not found: \"%1\"."); - d->messageWindow->display( status.arg(d->typeAheadString.lower()), + d->messageWindow->display( status.tqarg(d->typeAheadString.lower()), found ? PageViewMessage::Find : PageViewMessage::Warning, 4000 ); d->findTimeoutTimer->start( 3000, true ); } //BEGIN private SLOTS -void PageView::slotRelayoutPages() +void PageView::slotRetqlayoutPages() // called by: notifySetup, viewportResizeEvent, slotTwoPagesToggled, slotContinuousToggled, updateZoom { // set an empty container if we have no pages @@ -1677,7 +1677,7 @@ void PageView::slotRelayoutPages() fullHeight = 0; TQRect viewportRect( contentsX(), contentsY(), viewportWidth, viewportHeight ); - // set all items geometry and resize contents. handle 'continuous' and 'single' modes separately + // set all items tqgeometry and resize contents. handle 'continuous' and 'single' modes separately if ( KpdfSettings::viewContinuous() ) { // Here we find out column's width and row's height to compute a table @@ -1746,7 +1746,7 @@ void PageView::slotRelayoutPages() } else // viewContinuous is FALSE { - PageViewItem * currentItem = d->items[ QMAX( 0, (int)d->document->currentPage() ) ]; + PageViewItem * currentItem = d->items[ TQMAX( 0, (int)d->document->currentPage() ) ]; // setup varialbles for a 1(row) x N(columns) grid int nCols = KpdfSettings::viewColumns(), @@ -1816,11 +1816,11 @@ void PageView::slotRelayoutPages() { int prevX = contentsX(), prevY = contentsY(); - const TQRect & geometry = d->items[ vp.pageNumber ]->geometry(); + const TQRect & tqgeometry = d->items[ vp.pageNumber ]->tqgeometry(); double nX = vp.rePos.enabled ? vp.rePos.normalizedX : 0.5, nY = vp.rePos.enabled ? vp.rePos.normalizedY : 0.0; - center( geometry.left() + ROUND( nX * (double)geometry.width() ), - geometry.top() + ROUND( nY * (double)geometry.height() ) ); + center( tqgeometry.left() + ROUND( nX * (double)tqgeometry.width() ), + tqgeometry.top() + ROUND( nY * (double)tqgeometry.height() ) ); // center() usually moves the viewport, that requests pixmaps too. // if that doesn't happen we have to request them by hand if ( prevX == contentsX() && prevY == contentsY() ) @@ -1867,7 +1867,7 @@ void PageView::slotRequestVisiblePixmaps( int newLeft, int newTop ) PageViewItem * i = *iIt; // if the item doesn't intersect the viewport, skip it - if ( !viewportRect.intersects( i->geometry() ) ) + if ( !viewportRect.intersects( i->tqgeometry() ) ) continue; // add the item to the 'visible list' @@ -1885,18 +1885,18 @@ void PageView::slotRequestVisiblePixmaps( int newLeft, int newTop ) // position between the item and the viewport center if ( isEvent ) { - const TQRect & geometry = i->geometry(); + const TQRect & tqgeometry = i->tqgeometry(); // compute distance between item center and viewport center - double distance = hypot( (geometry.left() + geometry.right()) / 2 - viewportCenterX, - (geometry.top() + geometry.bottom()) / 2 - viewportCenterY ); + double distance = hypot( (tqgeometry.left() + tqgeometry.right()) / 2 - viewportCenterX, + (tqgeometry.top() + tqgeometry.bottom()) / 2 - viewportCenterY ); if ( distance >= minDistance && nearPageNumber != -1 ) continue; nearPageNumber = i->pageNumber(); minDistance = distance; - if ( geometry.height() > 0 && geometry.width() > 0 ) + if ( tqgeometry.height() > 0 && tqgeometry.width() > 0 ) { - focusedX = ( viewportCenterX - (double)geometry.left() ) / (double)geometry.width(); - focusedY = ( viewportCenterY - (double)geometry.top() ) / (double)geometry.height(); + focusedX = ( viewportCenterX - (double)tqgeometry.left() ) / (double)tqgeometry.width(); + focusedY = ( viewportCenterY - (double)tqgeometry.top() ) / (double)tqgeometry.height(); } } } @@ -2070,7 +2070,7 @@ void PageView::slotRotateRight() // be sure to block updates to document's viewport bool prevState = d->blockViewport; d->blockViewport = true; - slotRelayoutPages(); + slotRetqlayoutPages(); d->blockViewport = prevState; // request pixmaps slotRequestVisiblePixmaps(); @@ -2094,7 +2094,7 @@ void PageView::slotRotateLeft() // be sure to block updates to document's viewport bool prevState = d->blockViewport; d->blockViewport = true; - slotRelayoutPages(); + slotRetqlayoutPages(); d->blockViewport = prevState; // request pixmaps slotRequestVisiblePixmaps(); @@ -2108,7 +2108,7 @@ void PageView::slotTwoPagesToggled( bool on ) KpdfSettings::setViewColumns( newColumns ); KpdfSettings::writeConfig(); if ( d->document->pages() > 0 ) - slotRelayoutPages(); + slotRetqlayoutPages(); } } @@ -2119,7 +2119,7 @@ void PageView::slotContinuousToggled( bool on ) KpdfSettings::setViewContinuous( on ); KpdfSettings::writeConfig(); if ( d->document->pages() > 0 ) - slotRelayoutPages(); + slotRetqlayoutPages(); } } diff --git a/kpdf/ui/pageview.h b/kpdf/ui/pageview.h index 3742e804..97114dcc 100644 --- a/kpdf/ui/pageview.h +++ b/kpdf/ui/pageview.h @@ -39,11 +39,12 @@ class PageViewTip; class PageView : public TQScrollView, public DocumentObserver { Q_OBJECT + TQ_OBJECT friend class PageViewTip; public: - PageView( TQWidget *parent, KPDFDocument *document ); + PageView( TQWidget *tqparent, KPDFDocument *document ); ~PageView(); // Zoom mode ( last 4 are internally used only! ) @@ -100,7 +101,7 @@ class PageView : public TQScrollView, public DocumentObserver void selectionStart( int x, int y, const TQColor & color, bool aboveAll = false ); void selectionEndPoint( int x, int y ); void selectionClear(); - // update internal zoom values and end in a slotRelayoutPages(); + // update internal zoom values and end in a slotRetqlayoutPages(); void updateZoom( ZoomMode newZm ); // update the text on the label using global zoom value or current page's one void updateZoomText(); @@ -114,7 +115,7 @@ class PageView : public TQScrollView, public DocumentObserver private slots: // activated either directly or via TQTimer on the viewportResizeEvent - void slotRelayoutPages(); + void slotRetqlayoutPages(); // activated either directly or via the contentsMoving(int,int) signal void slotRequestVisiblePixmaps( int left = -1, int top = -1 ); // activated by the viewport move timer diff --git a/kpdf/ui/pageviewutils.cpp b/kpdf/ui/pageviewutils.cpp index eaf5fc95..ed5c637a 100644 --- a/kpdf/ui/pageviewutils.cpp +++ b/kpdf/ui/pageviewutils.cpp @@ -21,13 +21,13 @@ #include "core/page.h" #include "conf/settings.h" -PageViewMessage::PageViewMessage( TQWidget * parent ) - : TQWidget( parent, "pageViewMessage" ), m_timer( 0 ) +PageViewMessage::PageViewMessage( TQWidget * tqparent ) + : TQWidget( tqparent, "pageViewMessage" ), m_timer( 0 ) { - setFocusPolicy( NoFocus ); + setFocusPolicy( TQ_NoFocus ); setBackgroundMode( NoBackground ); setPaletteBackgroundColor(kapp->palette().color(TQPalette::Active, TQColorGroup::Background)); - // if the layout is LtR, we can safely place it in the right position + // if the tqlayout is LtR, we can safely place it in the right position if ( !TQApplication::reverseLayout() ) move( 10, 10 ); resize( 0, 0 ); @@ -54,7 +54,7 @@ void PageViewMessage::display( const TQString & message, Icon icon, int duration iconXOffset = 0, shadowOffset = 1; - // load icon (if set) and update geometry + // load icon (if set) and update tqgeometry TQPixmap symbol; if ( icon != None ) { @@ -82,46 +82,46 @@ void PageViewMessage::display( const TQString & message, Icon icon, int duration textXOffset = 2 + symbol.width(); } width += 2 + symbol.width(); - height = QMAX( height, symbol.height() ); + height = TQMAX( height, symbol.height() ); } - TQRect geometry( 0, 0, width + 10, height + 8 ); + TQRect tqgeometry( 0, 0, width + 10, height + 8 ); - // resize pixmap, mask and widget - static TQBitmap mask; - mask.resize( geometry.size() ); - m_pixmap.resize( geometry.size() ); - resize( geometry.size() ); + // resize pixmap, tqmask and widget + static TQBitmap tqmask; + tqmask.resize( tqgeometry.size() ); + m_pixmap.resize( tqgeometry.size() ); + resize( tqgeometry.size() ); - // create and set transparency mask - TQPainter maskPainter( &mask); - mask.fill( Qt::black ); - maskPainter.setBrush( Qt::white ); - maskPainter.drawRoundRect( geometry, 1600 / geometry.width(), 1600 / geometry.height() ); - setMask( mask ); + // create and set transparency tqmask + TQPainter tqmaskPainter( &tqmask); + tqmask.fill( TQt::black ); + tqmaskPainter.setBrush( TQt::white ); + tqmaskPainter.drawRoundRect( tqgeometry, 1600 / tqgeometry.width(), 1600 / tqgeometry.height() ); + setMask( tqmask ); // draw background TQPainter bufferPainter( &m_pixmap ); - bufferPainter.setPen( Qt::black ); + bufferPainter.setPen( TQt::black ); bufferPainter.setBrush( paletteBackgroundColor() ); - bufferPainter.drawRoundRect( geometry, 1600 / geometry.width(), 1600 / geometry.height() ); + bufferPainter.drawRoundRect( tqgeometry, 1600 / tqgeometry.width(), 1600 / tqgeometry.height() ); // draw icon if present if ( !symbol.isNull() ) bufferPainter.drawPixmap( 5 + iconXOffset, 4, symbol, 0, 0, symbol.width(), symbol.height() ); // draw shadow and text - int yText = geometry.height() - height / 2; + int yText = tqgeometry.height() - height / 2; bufferPainter.setPen( paletteBackgroundColor().dark( 115 ) ); bufferPainter.drawText( 5 + textXOffset + shadowOffset, yText + 1, message ); bufferPainter.setPen( foregroundColor() ); bufferPainter.drawText( 5 + textXOffset, yText, message ); - // if the layout is RtL, we can move it to the right place only after we + // if the tqlayout is RtL, we can move it to the right place only after we // know how much size it will take if ( TQApplication::reverseLayout() ) - move( parentWidget()->width() - geometry.width() - 10, 10 ); + move( tqparentWidget()->width() - tqgeometry.width() - 10, 10 ); - // show widget and schedule a repaint + // show widget and schedule a tqrepaint show(); update(); @@ -168,19 +168,19 @@ int PageViewItem::pageNumber() const return m_page->number(); } -const TQRect& PageViewItem::geometry() const +const TQRect& PageViewItem::tqgeometry() const { - return m_geometry; + return m_tqgeometry; } int PageViewItem::width() const { - return m_geometry.width(); + return m_tqgeometry.width(); } int PageViewItem::height() const { - return m_geometry.height(); + return m_tqgeometry.height(); } double PageViewItem::zoomFactor() const @@ -190,18 +190,18 @@ double PageViewItem::zoomFactor() const void PageViewItem::setGeometry( int x, int y, int width, int height ) { - m_geometry.setRect( x, y, width, height ); + m_tqgeometry.setRect( x, y, width, height ); } void PageViewItem::setWHZ( int w, int h, double z ) { - m_geometry.setWidth( w ); - m_geometry.setHeight( h ); + m_tqgeometry.setWidth( w ); + m_tqgeometry.setHeight( h ); m_zoomFactor = z; } void PageViewItem::moveTo( int x, int y ) { - m_geometry.moveLeft( x ); - m_geometry.moveTop( y ); + m_tqgeometry.moveLeft( x ); + m_tqgeometry.moveTop( y ); } diff --git a/kpdf/ui/pageviewutils.h b/kpdf/ui/pageviewutils.h index d1e5cecf..0bd6bd32 100644 --- a/kpdf/ui/pageviewutils.h +++ b/kpdf/ui/pageviewutils.h @@ -23,7 +23,7 @@ class KPDFPage; /** * @short PageViewItem represents graphically a kpdfpage into the PageView. * - * It has methods for settings Item's geometry and other visual properties such + * It has methods for settings Item's tqgeometry and other visual properties such * as the individual zoom factor. */ class PageViewItem @@ -33,7 +33,7 @@ class PageViewItem const KPDFPage * page() const; int pageNumber() const; - const TQRect& geometry() const; + const TQRect& tqgeometry() const; int width() const; int height() const; double zoomFactor() const; @@ -45,17 +45,17 @@ class PageViewItem private: const KPDFPage * m_page; double m_zoomFactor; - TQRect m_geometry; + TQRect m_tqgeometry; }; /** * @short A widget that displays messages in the top-left corner. */ -class PageViewMessage : public QWidget +class PageViewMessage : public TQWidget { public: - PageViewMessage( TQWidget * parent ); + PageViewMessage( TQWidget * tqparent ); enum Icon { None, Info, Warning, Error, Find }; void display( const TQString & message, Icon icon = Info, int durationMs = 4000 ); diff --git a/kpdf/ui/presentationwidget.cpp b/kpdf/ui/presentationwidget.cpp index 450f25df..6767db2c 100644 --- a/kpdf/ui/presentationwidget.cpp +++ b/kpdf/ui/presentationwidget.cpp @@ -43,25 +43,25 @@ #define ENABLE_PROGRESS_OVERLAY -// a frame contains a pointer to the page object, its geometry and the +// a frame contains a pointer to the page object, its tqgeometry and the // transition effect to the next frame struct PresentationFrame { const KPDFPage * page; - TQRect geometry; + TQRect tqgeometry; }; -PresentationWidget::PresentationWidget( TQWidget * parent, KPDFDocument * doc ) - : TQDialog( parent, "presentationWidget", true, WDestructiveClose | WStyle_NoBorder), +PresentationWidget::PresentationWidget( TQWidget * tqparent, KPDFDocument * doc ) + : TQDialog( tqparent, "presentationWidget", true, WDestructiveClose | WStyle_NoBorder), m_pressedLink( 0 ), m_handCursor( false ), m_document( doc ), m_frameIndex( -1 ) { - // set look and geometry - setBackgroundMode( Qt::NoBackground ); + // set look and tqgeometry + setBackgroundMode( TQt::NoBackground ); m_width = -1; - m_accel = new KAccel( this, this, "presentationmode-accel" ); + m_accel = new KAccel( this, TQT_TQOBJECT(this), "presentationmode-accel" ); // show widget and take control showFullScreen(); @@ -100,11 +100,11 @@ PresentationWidget::~PresentationWidget() void PresentationWidget::setupActions( KActionCollection * ac ) { - m_accel->insert( "previous_page", ac->action( "previous_page" )->shortcut(), this, TQT_SLOT( slotPrevPage() ), false, true ); - m_accel->insert( "next_page", ac->action( "next_page" )->shortcut(), this, TQT_SLOT( slotNextPage() ), false, true ); - m_accel->insert( "first_page", ac->action( "first_page" )->shortcut(), this, TQT_SLOT( slotFirstPage() ), false, true ); - m_accel->insert( "last_page", ac->action( "last_page" )->shortcut(), this, TQT_SLOT( slotLastPage() ), false, true ); - m_accel->insert( "presentation", ac->action( "presentation" )->shortcut(), this, TQT_SLOT( close() ), false, true ); + m_accel->insert( "previous_page", ac->action( "previous_page" )->shortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotPrevPage() ), false, true ); + m_accel->insert( "next_page", ac->action( "next_page" )->shortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotNextPage() ), false, true ); + m_accel->insert( "first_page", ac->action( "first_page" )->shortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotFirstPage() ), false, true ); + m_accel->insert( "last_page", ac->action( "last_page" )->shortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotLastPage() ), false, true ); + m_accel->insert( "presentation", ac->action( "presentation" )->shortcut(), TQT_TQOBJECT(this), TQT_SLOT( close() ), false, true ); } void PresentationWidget::notifySetup( const TQValueVector< KPDFPage * > & pageSet, bool /*documentChanged*/ ) @@ -124,7 +124,7 @@ void PresentationWidget::notifySetup( const TQValueVector< KPDFPage * > & pageSe { PresentationFrame * frame = new PresentationFrame(); frame->page = *setIt; - // calculate frame geometry keeping constant aspect ratio + // calculate frame tqgeometry keeping constant aspect ratio float pageRatio = frame->page->ratio(); int pageWidth = m_width, pageHeight = m_height; @@ -132,7 +132,7 @@ void PresentationWidget::notifySetup( const TQValueVector< KPDFPage * > & pageSe pageWidth = (int)( (float)pageHeight / pageRatio ); else pageHeight = (int)( (float)pageWidth * pageRatio ); - frame->geometry.setRect( (m_width - pageWidth) / 2, + frame->tqgeometry.setRect( (m_width - pageWidth) / 2, (m_height - pageHeight) / 2, pageWidth, pageHeight ); // add the frame to the vector @@ -145,11 +145,11 @@ void PresentationWidget::notifySetup( const TQValueVector< KPDFPage * > & pageSe if ( info ) { if ( !info->get( "title" ).isNull() ) - m_metaStrings += i18n( "Title: %1" ).arg( info->get( "title" ) ); + m_metaStrings += i18n( "Title: %1" ).tqarg( info->get( "title" ) ); if ( !info->get( "author" ).isNull() ) - m_metaStrings += i18n( "Author: %1" ).arg( info->get( "author" ) ); + m_metaStrings += i18n( "Author: %1" ).tqarg( info->get( "author" ) ); } - m_metaStrings += i18n( "Pages: %1" ).arg( m_document->pages() ); + m_metaStrings += i18n( "Pages: %1" ).tqarg( m_document->pages() ); m_metaStrings += i18n( "Click to begin" ); } @@ -242,7 +242,7 @@ void PresentationWidget::mousePressEvent( TQMouseEvent * e ) return; // handle clicking on top-right overlay - if ( m_overlayGeometry.contains( e->pos() ) ) + if ( m_overlayGeometry.tqcontains( e->pos() ) ) { overlayClick( e->pos() ); return; @@ -287,10 +287,10 @@ void PresentationWidget::mouseMoveEvent( TQMouseEvent * e ) else { // show the bar if reaching top 2 pixels - if ( e->y() <= (geometry().top() + 1) ) + if ( e->y() <= (tqgeometry().top() + 1) ) m_topBar->show(); - // handle "dragging the wheel" if clicking on its geometry - else if ( e->state() == Qt::LeftButton && m_overlayGeometry.contains( e->pos() ) ) + // handle "dragging the wheel" if clicking on its tqgeometry + else if ( e->state() == Qt::LeftButton && m_overlayGeometry.tqcontains( e->pos() ) ) overlayClick( e->pos() ); } } @@ -307,16 +307,16 @@ void PresentationWidget::paintEvent( TQPaintEvent * pe ) m_topBar = new KToolBar( this, "presentationBar" ); m_topBar->setIconSize( 32 ); m_topBar->setMovingEnabled( false ); - m_topBar->insertButton( TQApplication::reverseLayout() ? "1rightarrow" : "1leftarrow", 2, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotPrevPage() ) ); - m_topBar->insertButton( TQApplication::reverseLayout() ? "1leftarrow" : "1rightarrow", 3, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotNextPage() ) ); - m_topBar->insertButton( "exit", 1, TQT_SIGNAL( clicked() ), this, TQT_SLOT( close() ) ); + m_topBar->insertButton( TQApplication::reverseLayout() ? "1rightarrow" : "1leftarrow", 2, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( slotPrevPage() ) ); + m_topBar->insertButton( TQApplication::reverseLayout() ? "1leftarrow" : "1rightarrow", 3, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( slotNextPage() ) ); + m_topBar->insertButton( "exit", 1, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( close() ) ); m_topBar->setGeometry( 0, 0, m_width, 32 + 10 ); m_topBar->alignItemRight( 1 ); m_topBar->hide(); // change topbar background color - TQPalette p = m_topBar->palette(); - p.setColor( TQPalette::Active, TQColorGroup::Button, Qt::gray ); - p.setColor( TQPalette::Active, TQColorGroup::Background, Qt::darkGray ); + TQPalette p = m_topBar->tqpalette(); + p.setColor( TQPalette::Active, TQColorGroup::Button, TQt::gray ); + p.setColor( TQPalette::Active, TQColorGroup::Background, TQt::darkGray ); m_topBar->setPalette( p ); // register this observer in document. events will come immediately @@ -326,16 +326,16 @@ void PresentationWidget::paintEvent( TQPaintEvent * pe ) if ( KpdfSettings::slidesShowSummary() ) generatePage(); - KMessageBox::information(this, i18n("There are two ways of exiting presentation mode, you can press either ESC key or click with the quit button that appears when placing the mouse in the top-right corner. Of course you can cycle windows (Alt+TAB by default)"), TQString::null, "presentationInfo"); + KMessageBox::information(this, i18n("There are two ways of exiting presentation mode, you can press either ESC key or click with the quit button that appears when placing the mouse in the top-right corner. Of course you can cycle windows (Alt+TAB by default)"), TQString(), "presentationInfo"); } // check painting rect consistancy - TQRect r = pe->rect().intersect( geometry() ); + TQRect r = pe->rect().intersect( tqgeometry() ); if ( r.isNull() || m_lastRenderedPixmap.isNull() ) return; // blit the pixmap to the screen - TQMemArray<TQRect> allRects = pe->region().rects(); + TQMemArray<TQRect> allRects = TQRegion(pe->region()).tqrects(); uint numRects = allRects.count(); for ( uint i = 0; i < numRects; i++ ) { @@ -370,18 +370,18 @@ void PresentationWidget::paintEvent( TQPaintEvent * pe ) // </widget events> -const KPDFLink * PresentationWidget::getLink( int x, int y, TQRect * geometry ) const +const KPDFLink * PresentationWidget::getLink( int x, int y, TQRect * tqgeometry ) const { // no links on invalid pages - if ( geometry && !geometry->isNull() ) - geometry->setRect( 0, 0, -1, -1 ); + if ( tqgeometry && !tqgeometry->isNull() ) + tqgeometry->setRect( 0, 0, -1, -1 ); if ( m_frameIndex < 0 || m_frameIndex >= (int)m_frames.size() ) return 0; - // get frame, page and geometry + // get frame, page and tqgeometry const PresentationFrame * frame = m_frames[ m_frameIndex ]; const KPDFPage * page = frame->page; - const TQRect & frameGeometry = frame->geometry; + const TQRect & frameGeometry = frame->tqgeometry; // compute normalized x and y double nx = (double)(x - frameGeometry.left()) / (double)frameGeometry.width(); @@ -396,11 +396,11 @@ const KPDFLink * PresentationWidget::getLink( int x, int y, TQRect * geometry ) if ( !object ) return 0; - // compute link geometry if destination rect present - if ( geometry ) + // compute link tqgeometry if destination rect present + if ( tqgeometry ) { - *geometry = object->geometry( frameGeometry.width(), frameGeometry.height() ); - geometry->moveBy( frameGeometry.left(), frameGeometry.top() ); + *tqgeometry = object->tqgeometry( frameGeometry.width(), frameGeometry.height() ); + tqgeometry->moveBy( frameGeometry.left(), frameGeometry.top() ); } // return the link pointer @@ -416,12 +416,12 @@ void PresentationWidget::testCursorOnLink( int x, int y ) // only react on changes (in/out from a link) if ( (link && !m_handCursor) || (!link && m_handCursor) ) { - // change cursor shape + // change cursor tqshape m_handCursor = link != 0; setCursor( m_handCursor ? KCursor::handCursor() : KCursor::arrowCursor()); // set tooltip over link's rect - TQString tip = link ? link->linkTip() : TQString::null; + TQString tip = link ? link->linkTip() : TQString(); if ( m_handCursor && !tip.isEmpty() ) TQToolTip::add( this, linkRect, tip ); } @@ -451,8 +451,8 @@ void PresentationWidget::changePage( int newPage ) // check if pixmap exists or else request it m_frameIndex = newPage; PresentationFrame * frame = m_frames[ m_frameIndex ]; - int pixW = frame->geometry.width(); - int pixH = frame->geometry.height(); + int pixW = frame->tqgeometry.width(); + int pixH = frame->tqgeometry.height(); // if pixmap not inside the KPDFPage we request it and wait for // notifyPixmapChanged call or else we can proceed to pixmap generation @@ -470,16 +470,16 @@ void PresentationWidget::changePage( int newPage ) if (newPage + 1 < (int)m_document->pages()) { PresentationFrame *nextFrame = m_frames[ newPage + 1 ]; - pixW = nextFrame->geometry.width(); - pixH = nextFrame->geometry.height(); + pixW = nextFrame->tqgeometry.width(); + pixH = nextFrame->tqgeometry.height(); if ( !nextFrame->page->hasPixmap( PRESENTATION_ID, pixW, pixH ) ) requests.push_back( new PixmapRequest( PRESENTATION_ID, newPage + 1, pixW, pixH, PRESENTATION_PRELOAD_PRIO, true ) ); } if (newPage - 1 >= 0) { PresentationFrame *prevFrame = m_frames[ newPage - 1 ]; - pixW = prevFrame->geometry.width(); - pixH = prevFrame->geometry.height(); + pixW = prevFrame->tqgeometry.width(); + pixH = prevFrame->tqgeometry.height(); if ( !prevFrame->page->hasPixmap( PRESENTATION_ID, pixW, pixH ) ) requests.push_back( new PixmapRequest( PRESENTATION_ID, newPage - 1, pixW, pixH, PRESENTATION_PRELOAD_PRIO, true ) ); } @@ -542,7 +542,7 @@ void PresentationWidget::generateIntroPage( TQPainter & p ) // use a vertical gray gradient background int blend1 = m_height / 10, blend2 = 9 * m_height / 10; - int baseTint = Qt::gray.red(); + int baseTint = TQt::gray.red(); for ( int i = 0; i < m_height; i++ ) { int k = baseTint; @@ -580,7 +580,7 @@ void PresentationWidget::generateIntroPage( TQPainter & p ) p.setFont( f ); // text shadow - p.setPen( Qt::darkGray ); + p.setPen( TQt::darkGray ); p.drawText( 2, m_height / 4 + strHeight * i + 2, m_width, strHeight, AlignHCenter | AlignVCenter, m_metaStrings[i] ); // text body @@ -595,7 +595,7 @@ void PresentationWidget::generateContentsPage( int pageNum, TQPainter & p ) PresentationFrame * frame = m_frames[ pageNum ]; // translate painter and contents rect - TQRect geom( frame->geometry ); + TQRect geom( frame->tqgeometry ); p.translate( geom.left(), geom.top() ); geom.moveBy( -geom.left(), -geom.top() ); @@ -605,11 +605,11 @@ void PresentationWidget::generateContentsPage( int pageNum, TQPainter & p ) &p, geom, geom.width(), geom.height() ); // restore painter - p.translate( -frame->geometry.left(), -frame->geometry.top() ); + p.translate( -frame->tqgeometry.left(), -frame->tqgeometry.top() ); // fill unpainted areas with background color TQRegion unpainted( TQRect( 0, 0, m_width, m_height ) ); - TQMemArray<TQRect> rects = unpainted.subtract( frame->geometry ).rects(); + TQMemArray<TQRect> rects = TQRegion(unpainted.subtract( frame->tqgeometry )).tqrects(); for ( uint i = 0; i < rects.count(); i++ ) { const TQRect & r = rects[i]; @@ -617,12 +617,12 @@ void PresentationWidget::generateContentsPage( int pageNum, TQPainter & p ) } } -// from Arthur - Qt4 - (is defined elsewhere as 'qt_div_255' to not break final compilation) +// from Arthur - TQt4 - (is defined elsewhere as 'qt_div_255' to not break final compilation) inline int qt_div255(int x) { return (x + (x>>8) + 0x80) >> 8; } void PresentationWidget::generateOverlay() { #ifdef ENABLE_PROGRESS_OVERLAY - // calculate overlay geometry and resize pixmap if needed + // calculate overlay tqgeometry and resize pixmap if needed int side = m_width / 16; m_overlayGeometry.setRect( m_width - side - 4, 4, side, side ); if ( m_lastRenderedOverlay.width() != side ) @@ -633,7 +633,7 @@ void PresentationWidget::generateOverlay() // painter on the double sized pixmap. side *= 2; TQPixmap doublePixmap( side, side ); - doublePixmap.fill( Qt::black ); + doublePixmap.fill( TQt::black ); TQPainter pixmapPainter( &doublePixmap ); // draw PIE SLICES in blue levels (the levels will then be the alpha component) @@ -642,10 +642,10 @@ void PresentationWidget::generateOverlay() { // draw continuous slices int degrees = (int)( 360 * (float)(m_frameIndex + 1) / (float)pages ); pixmapPainter.setPen( 0x05 ); - pixmapPainter.setBrush( 0x40 ); + pixmapPainter.setBrush( TQBrush(0x40) ); pixmapPainter.drawPie( 2, 2, side - 4, side - 4, 90*16, (360-degrees)*16 ); pixmapPainter.setPen( 0x40 ); - pixmapPainter.setBrush( 0xF0 ); + pixmapPainter.setBrush( TQBrush(0xF0) ); pixmapPainter.drawPie( 2, 2, side - 4, side - 4, 90*16, -degrees*16 ); } else @@ -655,15 +655,15 @@ void PresentationWidget::generateOverlay() { float newCoord = -90 + 360 * (float)(i + 1) / (float)pages; pixmapPainter.setPen( i <= m_frameIndex ? 0x40 : 0x05 ); - pixmapPainter.setBrush( i <= m_frameIndex ? 0xF0 : 0x40 ); + pixmapPainter.setBrush( TQBrush(i <= m_frameIndex ? 0xF0 : 0x40) ); pixmapPainter.drawPie( 2, 2, side - 4, side - 4, (int)( -16*(oldCoord + 1) ), (int)( -16*(newCoord - (oldCoord + 2)) ) ); oldCoord = newCoord; } } int circleOut = side / 4; - pixmapPainter.setPen( Qt::black ); - pixmapPainter.setBrush( Qt::black ); + pixmapPainter.setPen( TQt::black ); + pixmapPainter.setBrush( TQBrush(TQt::black) ); pixmapPainter.drawEllipse( circleOut, circleOut, side - 2*circleOut, side - 2*circleOut ); // draw TEXT using maximum opacity @@ -672,7 +672,7 @@ void PresentationWidget::generateOverlay() pixmapPainter.setFont( f ); pixmapPainter.setPen( 0xFF ); // use a little offset to prettify output - pixmapPainter.drawText( 2, 2, side, side, Qt::AlignCenter, TQString::number( m_frameIndex + 1 ) ); + pixmapPainter.drawText( 2, 2, side, side, TQt::AlignCenter, TQString::number( m_frameIndex + 1 ) ); // end drawing pixmap and halve image pixmapPainter.end(); @@ -680,19 +680,19 @@ void PresentationWidget::generateOverlay() image.setAlphaBuffer( true ); // draw circular shadow using the same technique - doublePixmap.fill( Qt::black ); + doublePixmap.fill( TQt::black ); pixmapPainter.begin( &doublePixmap ); pixmapPainter.setPen( 0x40 ); - pixmapPainter.setBrush( 0x80 ); + pixmapPainter.setBrush( TQBrush(0x80) ); pixmapPainter.drawEllipse( 0, 0, side, side ); pixmapPainter.end(); TQImage shadow( doublePixmap.convertToImage().smoothScale( side / 2, side / 2 ) ); // generate a 2 colors pixmap using mixing shadow (made with highlight color) // and image (made with highlightedText color) - TQColor color = palette().active().highlightedText(); + TQColor color = tqpalette().active().highlightedText(); int red = color.red(), green = color.green(), blue = color.blue(); - color = palette().active().highlight(); + color = tqpalette().active().highlight(); int sRed = color.red(), sGreen = color.green(), sBlue = color.blue(); // pointers unsigned int * data = (unsigned int *)image.bits(), @@ -712,7 +712,7 @@ void PresentationWidget::generateOverlay() c1 = srcAlpha; c2 = shadowAlpha; // fuse color components and alpha value of image over shadow - data[i] = qRgba( + data[i] = tqRgba( cR = qt_div255( srcAlpha * red + (255 - srcAlpha) * sRed ), cG = qt_div255( srcAlpha * green + (255 - srcAlpha) * sGreen ), cB = qt_div255( srcAlpha * blue + (255 - srcAlpha) * sBlue ), @@ -720,12 +720,12 @@ void PresentationWidget::generateOverlay() ); } else - data[i] = qRgba( cR, cG, cB, cA ); + data[i] = tqRgba( cR, cG, cB, cA ); } m_lastRenderedOverlay.convertFromImage( image ); // start the autohide timer - repaint( m_overlayGeometry, false /*clear*/ ); // toggle with next line + tqrepaint( m_overlayGeometry, false /*clear*/ ); // toggle with next line //update( m_overlayGeometry ); m_overlayHideTimer->start( 2500, true ); #endif @@ -837,14 +837,14 @@ const KPDFPageTransition PresentationWidget::defaultTransition( int type ) const case KpdfSettings::EnumSlidesTransition::BlindsHorizontal: { KPDFPageTransition transition( KPDFPageTransition::Blinds ); - transition.setAlignment( KPDFPageTransition::Horizontal ); + transition.tqsetAlignment( KPDFPageTransition::Horizontal ); return transition; break; } case KpdfSettings::EnumSlidesTransition::BlindsVertical: { KPDFPageTransition transition( KPDFPageTransition::Blinds ); - transition.setAlignment( KPDFPageTransition::Vertical ); + transition.tqsetAlignment( KPDFPageTransition::Vertical ); return transition; break; } @@ -896,7 +896,7 @@ const KPDFPageTransition PresentationWidget::defaultTransition( int type ) const case KpdfSettings::EnumSlidesTransition::SplitHorizontalIn: { KPDFPageTransition transition( KPDFPageTransition::Split ); - transition.setAlignment( KPDFPageTransition::Horizontal ); + transition.tqsetAlignment( KPDFPageTransition::Horizontal ); transition.setDirection( KPDFPageTransition::Inward ); return transition; break; @@ -904,7 +904,7 @@ const KPDFPageTransition PresentationWidget::defaultTransition( int type ) const case KpdfSettings::EnumSlidesTransition::SplitHorizontalOut: { KPDFPageTransition transition( KPDFPageTransition::Split ); - transition.setAlignment( KPDFPageTransition::Horizontal ); + transition.tqsetAlignment( KPDFPageTransition::Horizontal ); transition.setDirection( KPDFPageTransition::Outward ); return transition; break; @@ -912,7 +912,7 @@ const KPDFPageTransition PresentationWidget::defaultTransition( int type ) const case KpdfSettings::EnumSlidesTransition::SplitVerticalIn: { KPDFPageTransition transition( KPDFPageTransition::Split ); - transition.setAlignment( KPDFPageTransition::Vertical ); + transition.tqsetAlignment( KPDFPageTransition::Vertical ); transition.setDirection( KPDFPageTransition::Inward ); return transition; break; @@ -920,7 +920,7 @@ const KPDFPageTransition PresentationWidget::defaultTransition( int type ) const case KpdfSettings::EnumSlidesTransition::SplitVerticalOut: { KPDFPageTransition transition( KPDFPageTransition::Split ); - transition.setAlignment( KPDFPageTransition::Vertical ); + transition.tqsetAlignment( KPDFPageTransition::Vertical ); transition.setDirection( KPDFPageTransition::Outward ); return transition; break; @@ -963,7 +963,7 @@ const KPDFPageTransition PresentationWidget::defaultTransition( int type ) const /** ONLY the TRANSITIONS GENERATION function from here on **/ void PresentationWidget::initTransition( const KPDFPageTransition *transition ) { - // if it's just a 'replace' transition, repaint the screen + // if it's just a 'tqreplace' transition, tqrepaint the screen if ( transition->type() == KPDFPageTransition::Replace ) { update(); @@ -971,7 +971,7 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition ) } const bool isInward = transition->direction() == KPDFPageTransition::Inward; - const bool isHorizontal = transition->alignment() == KPDFPageTransition::Horizontal; + const bool isHorizontal = transition->tqalignment() == KPDFPageTransition::Horizontal; const float totalTime = transition->duration(); m_transitionRects.clear(); @@ -1175,7 +1175,7 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition ) m_transitionDelay = (int)( (totalTime * 1000) / steps ); } break; - // dissolve: replace 'random' rects + // dissolve: tqreplace 'random' rects case KPDFPageTransition::Dissolve: { const int gridXsteps = 50; @@ -1183,7 +1183,7 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition ) const int steps = gridXsteps * gridYsteps; int oldX = 0; int oldY = 0; - // create a grid of gridXstep by gridYstep QRects + // create a grid of gridXstep by gridYstep TQRects for ( int y = 0; y < gridYsteps; y++ ) { int newY = (int)( m_height * ((float)(y+1) / (float)gridYsteps) ); diff --git a/kpdf/ui/presentationwidget.h b/kpdf/ui/presentationwidget.h index 00ff5b35..00ae2bfb 100644 --- a/kpdf/ui/presentationwidget.h +++ b/kpdf/ui/presentationwidget.h @@ -35,8 +35,9 @@ class PresentationFrame; class PresentationWidget : public TQDialog, public DocumentObserver { Q_OBJECT + TQ_OBJECT public: - PresentationWidget( TQWidget * parent, KPDFDocument * doc ); + PresentationWidget( TQWidget * tqparent, KPDFDocument * doc ); ~PresentationWidget(); void setupActions( KActionCollection * ac ); @@ -59,7 +60,7 @@ class PresentationWidget : public TQDialog, public DocumentObserver void paintEvent( TQPaintEvent * e ); private: - const KPDFLink * getLink( int x, int y, TQRect * geometry = 0 ) const; + const KPDFLink * getLink( int x, int y, TQRect * tqgeometry = 0 ) const; void testCursorOnLink( int x, int y ); void overlayClick( const TQPoint & position ); void changePage( int newPage ); diff --git a/kpdf/ui/propertiesdialog.cpp b/kpdf/ui/propertiesdialog.cpp index df03422e..02743ccb 100644 --- a/kpdf/ui/propertiesdialog.cpp +++ b/kpdf/ui/propertiesdialog.cpp @@ -19,23 +19,23 @@ #include "propertiesdialog.h" #include "core/document.h" -PropertiesDialog::PropertiesDialog(TQWidget *parent, KPDFDocument *doc) - : KDialogBase( Tabbed, i18n( "Unknown File" ), Ok, Ok, parent, 0, true, true ) +PropertiesDialog::PropertiesDialog(TQWidget *tqparent, KPDFDocument *doc) + : KDialogBase( Tabbed, i18n( "Unknown File" ), Ok, Ok, tqparent, 0, true, true ) { // Properties TQFrame *page = addPage(i18n("Properties")); - TQGridLayout *layout = new TQGridLayout( page, 2, 2, marginHint(), spacingHint() ); + TQGridLayout *tqlayout = new TQGridLayout( page, 2, 2, marginHint(), spacingHint() ); // get document info, if not present display blank data and a warning const DocumentInfo * info = doc->documentInfo(); if ( !info ) { - layout->addWidget( new TQLabel( i18n( "No document opened." ), page ), 0, 0 ); + tqlayout->addWidget( new TQLabel( i18n( "No document opened." ), page ), 0, 0 ); return; } // mime name based on mimetype id TQString mimeName = info->get( "mimeType" ).section( '/', -1 ).upper(); - setCaption( i18n("%1 Properties").arg( mimeName ) ); + setCaption( i18n("%1 Properties").tqarg( mimeName ) ); TQDomElement docElement = info->documentElement(); @@ -49,15 +49,15 @@ PropertiesDialog::PropertiesDialog(TQWidget *parent, KPDFDocument *doc) if ( titleString.isEmpty() || valueString.isEmpty() ) continue; - // create labels and layout them - TQLabel *key = new TQLabel( i18n( "%1:" ).arg( titleString ), page ); + // create labels and tqlayout them + TQLabel *key = new TQLabel( i18n( "%1:" ).tqarg( titleString ), page ); TQLabel *value = new KSqueezedTextLabel( valueString, page ); - layout->addWidget( key, row, 0, AlignRight ); - layout->addWidget( value, row, 1 ); + tqlayout->addWidget( key, row, 0, AlignRight ); + tqlayout->addWidget( value, row, 1 ); row++; // refine maximum width of 'value' labels - valMaxWidth = QMAX( valMaxWidth, fontMetrics().width( valueString ) ); + valMaxWidth = TQMAX( valMaxWidth, fontMetrics().width( valueString ) ); } // add the number of pages if the generator hasn't done it already @@ -66,8 +66,8 @@ PropertiesDialog::PropertiesDialog(TQWidget *parent, KPDFDocument *doc) TQLabel *key = new TQLabel( i18n( "Pages:" ), page ); TQLabel *value = new TQLabel( TQString::number( doc->pages() ), page ); - layout->addWidget( key, row, 0 ); - layout->addWidget( value, row, 1 ); + tqlayout->addWidget( key, row, 0 ); + tqlayout->addWidget( value, row, 1 ); } // Fonts @@ -82,13 +82,13 @@ PropertiesDialog::PropertiesDialog(TQWidget *parent, KPDFDocument *doc) } // current width: left column + right column + dialog borders - int width = layout->minimumSize().width() + valMaxWidth + marginHint() + spacingHint() + marginHint() + 30; + int width = tqlayout->tqminimumSize().width() + valMaxWidth + marginHint() + spacingHint() + marginHint() + 30; if (page2Layout) { - width = QMAX( width, page2Layout->sizeHint().width() + marginHint() + spacingHint() + 31 ); + width = TQMAX( width, page2Layout->tqsizeHint().width() + marginHint() + spacingHint() + 31 ); } // stay inside the 2/3 of the screen width TQRect screenContainer = KGlobalSettings::desktopGeometry( this ); - width = QMIN( width, 2*screenContainer.width()/3 ); + width = TQMIN( width, 2*screenContainer.width()/3 ); resize(width, 1); } diff --git a/kpdf/ui/propertiesdialog.h b/kpdf/ui/propertiesdialog.h index d5e3229a..f5541e34 100644 --- a/kpdf/ui/propertiesdialog.h +++ b/kpdf/ui/propertiesdialog.h @@ -17,7 +17,7 @@ class KPDFDocument; class PropertiesDialog : public KDialogBase { public: - PropertiesDialog( TQWidget *parent, KPDFDocument *doc ); + PropertiesDialog( TQWidget *tqparent, KPDFDocument *doc ); }; #endif diff --git a/kpdf/ui/searchwidget.cpp b/kpdf/ui/searchwidget.cpp index 36b8dd19..116df031 100644 --- a/kpdf/ui/searchwidget.cpp +++ b/kpdf/ui/searchwidget.cpp @@ -28,8 +28,8 @@ #define LEDIT_ID 2 #define FIND_ID 3 -SearchWidget::SearchWidget( TQWidget * parent, KPDFDocument * document ) - : KToolBar( parent, "iSearchBar" ), m_document( document ), +SearchWidget::SearchWidget( TQWidget * tqparent, KPDFDocument * document ) + : KToolBar( tqparent, "iSearchBar" ), m_document( document ), m_searchType( 0 ), m_caseSensitive( false ) { // change toolbar appearance @@ -44,14 +44,14 @@ SearchWidget::SearchWidget( TQWidget * parent, KPDFDocument * document ) this, TQT_SLOT( startSearch() ) ); // 1. text line - insertLined( TQString::null, LEDIT_ID, TQT_SIGNAL( textChanged(const TQString &) ), - this, TQT_SLOT( slotTextChanged(const TQString &) ), true, + insertLined( TQString(), LEDIT_ID, TQT_SIGNAL( textChanged(const TQString &) ), + TQT_TQOBJECT(this), TQT_SLOT( slotTextChanged(const TQString &) ), true, i18n( "Enter at least 3 letters to filter pages" ), 0/*size*/, 1 ); // 2. clear button (uses a lineEdit slot, so it must be created after) insertButton( TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase", CLEAR_ID, TQT_SIGNAL( clicked() ), - getLined( LEDIT_ID ), TQT_SLOT( clear() ), true, + TQT_TQOBJECT(getLined( LEDIT_ID )), TQT_SLOT( clear() ), true, i18n( "Clear filter" ), 0/*index*/ ); // 3.1. create the popup menu for changing filtering features @@ -79,10 +79,10 @@ void SearchWidget::clearText() void SearchWidget::slotTextChanged( const TQString & text ) { // if 0<length<3 set 'red' text and send a blank string to document - TQColor color = text.length() > 0 && text.length() < 3 ? Qt::darkRed : palette().active().text(); + TQColor color = text.length() > 0 && text.length() < 3 ? TQt::darkRed : tqpalette().active().text(); KLineEdit * lineEdit = getLined( LEDIT_ID ); lineEdit->setPaletteForegroundColor( color ); - lineEdit->setPaletteBackgroundColor( palette().active().base() ); + lineEdit->setPaletteBackgroundColor( tqpalette().active().base() ); m_inputDelayTimer->stop(); m_inputDelayTimer->start(333, true); } @@ -119,7 +119,7 @@ void SearchWidget::startSearch() ( (m_searchType > 1) ? KPDFDocument::GoogleAny : KPDFDocument::GoogleAll ); ok = m_document->searchText( SW_SEARCH_ID, text, true, m_caseSensitive, - type, false, qRgb( 0, 183, 255 ) ); + type, false, tqRgb( 0, 183, 255 ) ); } else m_document->resetSearch( SW_SEARCH_ID ); @@ -127,8 +127,8 @@ void SearchWidget::startSearch() if ( !ok ) { KLineEdit * lineEdit = getLined( LEDIT_ID ); - lineEdit->setPaletteForegroundColor( Qt::white ); - lineEdit->setPaletteBackgroundColor( Qt::red ); + lineEdit->setPaletteForegroundColor( TQt::white ); + lineEdit->setPaletteBackgroundColor( TQt::red ); } } diff --git a/kpdf/ui/searchwidget.h b/kpdf/ui/searchwidget.h index 33fb1459..45ecae99 100644 --- a/kpdf/ui/searchwidget.h +++ b/kpdf/ui/searchwidget.h @@ -20,7 +20,7 @@ class m_inputDelayTimer; #define SW_SEARCH_ID 3 /** - * @short A widget for find-as-you-type search. Outputs to the Document. + * @short A widget for tqfind-as-you-type search. Outputs to the Document. * * This widget accepts keyboard input and performs a call to findTextAll(..) * in the KPDFDocument class when there are 3 or more chars to search for. @@ -30,8 +30,9 @@ class m_inputDelayTimer; class SearchWidget : public KToolBar { Q_OBJECT + TQ_OBJECT public: - SearchWidget( TQWidget *parent, KPDFDocument *document ); + SearchWidget( TQWidget *tqparent, KPDFDocument *document ); void clearText(); private: diff --git a/kpdf/ui/thumbnaillist.cpp b/kpdf/ui/thumbnaillist.cpp index 49d22ee3..8c6ab951 100644 --- a/kpdf/ui/thumbnaillist.cpp +++ b/kpdf/ui/thumbnaillist.cpp @@ -27,10 +27,10 @@ #include "conf/settings.h" // ThumbnailWidget represents a single thumbnail in the ThumbnailList -class ThumbnailWidget : public QWidget +class ThumbnailWidget : public TQWidget { public: - ThumbnailWidget( TQWidget * parent, const KPDFPage * page, ThumbnailList * tl ); + ThumbnailWidget( TQWidget * tqparent, const KPDFPage * page, ThumbnailList * tl ); // set internal parameters to fit the page in the given width void resizeFitWidth( int width ); @@ -63,8 +63,8 @@ class ThumbnailWidget : public QWidget /** ThumbnailList implementation **/ -ThumbnailList::ThumbnailList( TQWidget *parent, KPDFDocument *document ) - : TQScrollView( parent, "KPDF::Thumbnails", WNoAutoErase | WStaticContents ), +ThumbnailList::ThumbnailList( TQWidget *tqparent, KPDFDocument *document ) + : TQScrollView( tqparent, "KPDF::Thumbnails", WNoAutoErase | WStaticContents ), m_document( document ), m_selected( 0 ), m_delayTimer( 0 ), m_bookmarkOverlay( 0 ) { // set scrollbars @@ -76,13 +76,13 @@ ThumbnailList::ThumbnailList( TQWidget *parent, KPDFDocument *document ) // widget setup: can be focused by tab and mouse click (not wheel) viewport()->setFocusProxy( this ); - viewport()->setFocusPolicy( StrongFocus ); + viewport()->setFocusPolicy( TQ_StrongFocus ); setResizePolicy( Manual ); setAcceptDrops( true ); setDragAutoScroll( false ); // set contents background to the 'base' color - viewport()->setPaletteBackgroundColor( palette().active().base() ); + viewport()->setPaletteBackgroundColor( tqpalette().active().base() ); setFrameStyle( StyledPanel | Raised ); connect( this, TQT_SIGNAL(contentsMoving(int, int)), this, TQT_SLOT(slotRequestVisiblePixmaps(int, int)) ); @@ -184,7 +184,7 @@ void ThumbnailList::notifyViewportChanged( bool /*smoothMove*/ ) m_selected->setSelected( true ); if ( KpdfSettings::syncThumbnailsViewport() ) { - int yOffset = QMAX( visibleHeight() / 4, m_selected->height() / 2 ); + int yOffset = TQMAX( visibleHeight() / 4, m_selected->height() / 2 ); ensureVisible( 0, childY( m_selected ) + m_selected->height()/2, 0, yOffset ); } break; @@ -199,7 +199,7 @@ void ThumbnailList::notifyPageChanged( int pageNumber, int /*changedFlags*/ ) //if ( !(changedFlags & DocumentObserver::Pixmap) ) // return; - // iterate over visible items: if page(pageNumber) is one of them, repaint it + // iterate over visible items: if page(pageNumber) is one of them, tqrepaint it TQValueList<ThumbnailWidget *>::iterator vIt = m_visibleThumbnails.begin(), vEnd = m_visibleThumbnails.end(); for ( ; vIt != vEnd; ++vIt ) if ( (*vIt)->pageNumber() == pageNumber ) @@ -362,7 +362,7 @@ void ThumbnailList::viewportResizeEvent( TQResizeEvent * e ) else if ( e->size().height() <= e->oldSize().height() ) return; - // invalidate the bookmark overlay + // tqinvalidate the bookmark overlay if ( m_bookmarkOverlay ) { delete m_bookmarkOverlay; @@ -452,8 +452,8 @@ void ThumbnailList::delayedRequestVisiblePixmaps( int delayMs ) /** ThumbnailWidget implementation **/ -ThumbnailWidget::ThumbnailWidget( TQWidget * parent, const KPDFPage * kp, ThumbnailList * tl ) - : TQWidget( parent, 0, WNoAutoErase ), m_tl( tl ), m_page( kp ), +ThumbnailWidget::ThumbnailWidget( TQWidget * tqparent, const KPDFPage * kp, ThumbnailList * tl ) + : TQWidget( tqparent, 0, WNoAutoErase ), m_tl( tl ), m_page( kp ), m_selected( false ), m_pixmapWidth( 10 ), m_pixmapHeight( 10 ) { m_labelNumber = m_page->number() + 1; @@ -495,10 +495,10 @@ void ThumbnailWidget::paintEvent( TQPaintEvent * e ) TQPainter p( this ); // draw the bottom label + highlight mark - TQColor fillColor = m_selected ? palette().active().highlight() : palette().active().base(); + TQColor fillColor = m_selected ? tqpalette().active().highlight() : tqpalette().active().base(); p.fillRect( 0, 0, width, height, fillColor ); - p.setPen( m_selected ? palette().active().highlightedText() : palette().active().text() ); - p.drawText( 0, m_pixmapHeight + m_margin, width, m_labelHeight, Qt::AlignCenter, TQString::number( m_labelNumber ) ); + p.setPen( m_selected ? tqpalette().active().highlightedText() : tqpalette().active().text() ); + p.drawText( 0, m_pixmapHeight + m_margin, width, m_labelHeight, TQt::AlignCenter, TQString::number( m_labelNumber ) ); // draw page outline and pixmap if ( clipRect.top() < m_pixmapHeight + m_margin ) @@ -506,10 +506,10 @@ void ThumbnailWidget::paintEvent( TQPaintEvent * e ) // if page is bookmarked draw a colored border bool isBookmarked = m_page->hasBookmark(); // draw the inner rect - p.setPen( isBookmarked ? TQColor( 0xFF8000 ) : Qt::black ); + p.setPen( isBookmarked ? TQColor( 0xFF8000 ) : TQt::black ); p.drawRect( m_margin/2 - 1, m_margin/2 - 1, m_pixmapWidth + 2, m_pixmapHeight + 2 ); // draw the clear rect - p.setPen( isBookmarked ? TQColor( 0x804000 ) : palette().active().base() ); + p.setPen( isBookmarked ? TQColor( 0x804000 ) : tqpalette().active().base() ); // draw the bottom and right shadow edges if ( !isBookmarked ) { @@ -518,7 +518,7 @@ void ThumbnailWidget::paintEvent( TQPaintEvent * e ) right = m_margin/2 + m_pixmapWidth + 1; bottom = m_pixmapHeight + m_margin/2 + 1; top = m_margin/2 + 1; - p.setPen( Qt::gray ); + p.setPen( TQt::gray ); p.drawLine( left, bottom, right, bottom ); p.drawLine( right, top, right, bottom ); } @@ -552,8 +552,8 @@ void ThumbnailWidget::paintEvent( TQPaintEvent * e ) #define FILTERB_ID 1 -ThumbnailController::ThumbnailController( TQWidget * parent, ThumbnailList * list ) - : KToolBar( parent, "ThumbsControlBar" ) +ThumbnailController::ThumbnailController( TQWidget * tqparent, ThumbnailList * list ) + : KToolBar( tqparent, "ThumbsControlBar" ) { // change toolbar appearance setMargin( 3 ); @@ -564,7 +564,7 @@ ThumbnailController::ThumbnailController( TQWidget * parent, ThumbnailList * lis // insert a togglebutton [show only bookmarked pages] //insertSeparator(); insertButton( "bookmark", FILTERB_ID, TQT_SIGNAL( toggled( bool ) ), - list, TQT_SLOT( slotFilterBookmarks( bool ) ), + TQT_TQOBJECT(list), TQT_SLOT( slotFilterBookmarks( bool ) ), true, i18n( "Show bookmarked pages only" ) ); setToggle( FILTERB_ID ); setButton( FILTERB_ID, KpdfSettings::filterBookmarks() ); diff --git a/kpdf/ui/thumbnaillist.h b/kpdf/ui/thumbnaillist.h index a3f81b11..b28bd741 100644 --- a/kpdf/ui/thumbnaillist.h +++ b/kpdf/ui/thumbnaillist.h @@ -30,8 +30,9 @@ class ThumbnailWidget; class ThumbnailList : public TQScrollView, public DocumentObserver { Q_OBJECT + TQ_OBJECT public: - ThumbnailList(TQWidget *parent, KPDFDocument *document); + ThumbnailList(TQWidget *tqparent, KPDFDocument *document); ~ThumbnailList(); // inherited: return thumbnails observer id @@ -97,11 +98,11 @@ Q_OBJECT /** * @short A vertical boxed container with zero size hint (for insertion on left toolbox) */ -class ThumbnailsBox : public QVBox +class ThumbnailsBox : public TQVBox { public: - ThumbnailsBox( TQWidget * parent ) : TQVBox( parent ) {}; - TQSize sizeHint() const { return TQSize(); } + ThumbnailsBox( TQWidget * tqparent ) : TQVBox( tqparent ) {}; + TQSize tqsizeHint() const { return TQSize(); } }; /** @@ -115,7 +116,7 @@ class ThumbnailsBox : public QVBox class ThumbnailController : public KToolBar { public: - ThumbnailController( TQWidget * parent, ThumbnailList * thumbnailList ); + ThumbnailController( TQWidget * tqparent, ThumbnailList * thumbnailList ); }; #endif diff --git a/kpdf/ui/toc.cpp b/kpdf/ui/toc.cpp index 015ba313..a453f20d 100644 --- a/kpdf/ui/toc.cpp +++ b/kpdf/ui/toc.cpp @@ -25,8 +25,8 @@ class TOCItem : public KListViewItem { public: - TOCItem( KListView *parent, TOCItem *after, const TQDomElement & e ) - : KListViewItem( parent, after, e.tagName() ), m_element( e ) + TOCItem( KListView *tqparent, TOCItem *after, const TQDomElement & e ) + : KListViewItem( tqparent, after, e.tagName() ), m_element( e ) { #ifdef TOC_ENABLE_PAGE_COLUMN if ( e.hasAttribute( "Page" ) ) @@ -35,8 +35,8 @@ class TOCItem : public KListViewItem setMultiLinesEnabled(true); } - TOCItem( KListViewItem *parent, TOCItem *after, const TQDomElement & e ) - : KListViewItem( parent, after, e.tagName() ), m_element( e ) + TOCItem( KListViewItem *tqparent, TOCItem *after, const TQDomElement & e ) + : KListViewItem( tqparent, after, e.tagName() ), m_element( e ) { #ifdef TOC_ENABLE_PAGE_COLUMN if ( e.hasAttribute( "Page" ) ) @@ -54,7 +54,7 @@ class TOCItem : public KListViewItem TQDomElement m_element; }; -TOC::TOC(TQWidget *parent, KPDFDocument *document) : KListView(parent), m_document(document) +TOC::TOC(TQWidget *tqparent, KPDFDocument *document) : KListView(tqparent), m_document(document) { addColumn( i18n("Topic") ); #ifdef TOC_ENABLE_PAGE_COLUMN @@ -104,21 +104,21 @@ void TOC::notifySetup( const TQValueVector< KPDFPage * > & /*pages*/, bool docum emit hasTOC( true ); } -void TOC::addChildren( const TQDomNode & parentNode, KListViewItem * parentItem ) +void TOC::addChildren( const TQDomNode & tqparentNode, KListViewItem * tqparentItem ) { // keep track of the current listViewItem TOCItem * currentItem = 0; - TQDomNode n = parentNode.firstChild(); + TQDomNode n = tqparentNode.firstChild(); while( !n.isNull() ) { // convert the node to an element (sure it is) TQDomElement e = n.toElement(); - // insert the entry as top level (listview parented) or 2nd+ level - if ( !parentItem ) + // insert the entry as top level (listview tqparented) or 2nd+ level + if ( !tqparentItem ) currentItem = new TOCItem( this, currentItem, e ); else - currentItem = new TOCItem( parentItem, currentItem, e ); + currentItem = new TOCItem( tqparentItem, currentItem, e ); // descend recursively and advance to the next node if ( e.hasChildNodes() ) diff --git a/kpdf/ui/toc.h b/kpdf/ui/toc.h index 0f2915fd..2d0c76d7 100644 --- a/kpdf/ui/toc.h +++ b/kpdf/ui/toc.h @@ -20,8 +20,9 @@ class KPDFDocument; class TOC : public KListView, public DocumentObserver { Q_OBJECT + TQ_OBJECT public: - TOC(TQWidget *parent, KPDFDocument *document); + TOC(TQWidget *tqparent, KPDFDocument *document); ~TOC(); // inherited from DocumentObserver @@ -35,7 +36,7 @@ Q_OBJECT void slotExecuted(TQListViewItem *i); private: - void addChildren( const TQDomNode & parentNode, KListViewItem * parentItem = 0 ); + void addChildren( const TQDomNode & tqparentNode, KListViewItem * tqparentItem = 0 ); DocumentViewport getViewport( const TQDomElement &e ) const; KPDFDocument *m_document; }; diff --git a/kpdf/xpdf/xpdf/GlobalParams.cc b/kpdf/xpdf/xpdf/GlobalParams.cc index 519e81a4..24552664 100644 --- a/kpdf/xpdf/xpdf/GlobalParams.cc +++ b/kpdf/xpdf/xpdf/GlobalParams.cc @@ -2057,7 +2057,7 @@ FILE *GlobalParams::findToUnicodeFile(GString *name) { void parseStyle(TQString& name, int& weight, int& slant, int& width) { - if (name.find("MS-") == 0) name = "MS " + name.remove(0,3); + if (name.tqfind("MS-") == 0) name = "MS " + name.remove(0,3); if (!name.contains('-') && !name.contains(',')) return; TQString type = name.section(TQRegExp("[-,]"),-1); |