summaryrefslogtreecommitdiffstats
path: root/lib/kofficeui/KoZoomAction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kofficeui/KoZoomAction.cpp')
-rw-r--r--lib/kofficeui/KoZoomAction.cpp80
1 files changed, 40 insertions, 40 deletions
diff --git a/lib/kofficeui/KoZoomAction.cpp b/lib/kofficeui/KoZoomAction.cpp
index 5f53f007..5455a159 100644
--- a/lib/kofficeui/KoZoomAction.cpp
+++ b/lib/kofficeui/KoZoomAction.cpp
@@ -18,70 +18,70 @@
#include <KoZoomAction.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
+#include <tqvaluelist.h>
#include <klocale.h>
-KoZoomAction::KoZoomAction( const QString& text, const QIconSet& pix,
- const KShortcut& cut, QObject* parent, const char* name ):
- KSelectAction( text, pix, cut, parent, name )
+KoZoomAction::KoZoomAction( const TQString& text, const TQIconSet& pix,
+ const KShortcut& cut, TQObject* tqparent, const char* name ):
+ KSelectAction( text, pix, cut, tqparent, name )
{
init();
}
-KoZoomAction::KoZoomAction( const QString& text, const QString& pix,
- const KShortcut& cut, QObject* parent, const char* name ):
- KSelectAction( text, pix, cut, parent, name )
+KoZoomAction::KoZoomAction( const TQString& text, const TQString& pix,
+ const KShortcut& cut, TQObject* tqparent, const char* name ):
+ KSelectAction( text, pix, cut, tqparent, name )
{
init();
}
-void KoZoomAction::setZoom( const QString& text )
+void KoZoomAction::setZoom( const TQString& text )
{
bool ok = false;
- QString t = text;
+ TQString t = text;
int zoom = t.remove( '%' ).toInt( &ok );
// where we'll store sorted new zoom values
- QValueList<int> list;
+ TQValueList<int> list;
if( zoom > 10 ) list.append( zoom );
// "Captured" non-empty sequence of digits
- QRegExp regexp("(\\d+)");
+ TQRegExp regexp("(\\d+)");
- const QStringList itemsList( items() );
- for( QStringList::ConstIterator it = itemsList.begin(); it != itemsList.end(); ++it )
+ const TQStringList itemsList( items() );
+ for( TQStringList::ConstIterator it = itemsList.begin(); it != itemsList.end(); ++it )
{
regexp.search( *it );
const int val=regexp.cap(1).toInt( &ok );
//zoom : limit inferior=10
- if( ok && val>9 && list.contains( val )==0 )
+ if( ok && val>9 && list.tqcontains( val )==0 )
list.append( val );
}
qHeapSort( list );
// update items with new sorted zoom values
- QStringList values;
- for (QValueList<int>::Iterator it = list.begin(); it != list.end(); ++it )
- values.append( i18n("%1%").arg(*it) );
+ TQStringList values;
+ for (TQValueList<int>::Iterator it = list.begin(); it != list.end(); ++it )
+ values.append( i18n("%1%").tqarg(*it) );
setItems( values );
- QString zoomStr = i18n("%1%").arg( zoom );
- setCurrentItem( values.findIndex( zoomStr ) );
+ TQString zoomStr = i18n("%1%").tqarg( zoom );
+ setCurrentItem( values.tqfindIndex( zoomStr ) );
}
void KoZoomAction::setZoom( int zoom )
{
- setZoom( QString::number( zoom ) );
+ setZoom( TQString::number( zoom ) );
}
-void KoZoomAction::activated( const QString& text )
+void KoZoomAction::activated( const TQString& text )
{
setZoom( text );
emit zoomChanged( text );
@@ -91,25 +91,25 @@ void KoZoomAction::init()
{
setEditable( true );
- QStringList values;
- values << i18n("%1%").arg("33");
- values << i18n("%1%").arg("50");
- values << i18n("%1%").arg("75");
- values << i18n("%1%").arg("100");
- values << i18n("%1%").arg("125");
- values << i18n("%1%").arg("150");
- values << i18n("%1%").arg("200");
- values << i18n("%1%").arg("250");
- values << i18n("%1%").arg("350");
- values << i18n("%1%").arg("400");
- values << i18n("%1%").arg("450");
- values << i18n("%1%").arg("500");
+ TQStringList values;
+ values << i18n("%1%").tqarg("33");
+ values << i18n("%1%").tqarg("50");
+ values << i18n("%1%").tqarg("75");
+ values << i18n("%1%").tqarg("100");
+ values << i18n("%1%").tqarg("125");
+ values << i18n("%1%").tqarg("150");
+ values << i18n("%1%").tqarg("200");
+ values << i18n("%1%").tqarg("250");
+ values << i18n("%1%").tqarg("350");
+ values << i18n("%1%").tqarg("400");
+ values << i18n("%1%").tqarg("450");
+ values << i18n("%1%").tqarg("500");
setItems( values );
- setCurrentItem( values.findIndex( i18n("%1%").arg( 100 ) ) );
+ setCurrentItem( values.tqfindIndex( i18n("%1%").tqarg( 100 ) ) );
- connect( this, SIGNAL( activated( const QString& ) ),
- SLOT( activated( const QString& ) ) );
+ connect( this, TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SLOT( activated( const TQString& ) ) );
}
#include "KoZoomAction.moc"