summaryrefslogtreecommitdiffstats
path: root/klipper
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /klipper
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz
tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'klipper')
-rw-r--r--klipper/applet.cpp18
-rw-r--r--klipper/applet.h8
-rw-r--r--klipper/clipboardpoll.cpp12
-rw-r--r--klipper/clipboardpoll.h8
-rw-r--r--klipper/configdialog.cpp168
-rw-r--r--klipper/configdialog.h64
-rw-r--r--klipper/history.cpp6
-rw-r--r--klipper/history.h10
-rw-r--r--klipper/historyimageitem.cpp12
-rw-r--r--klipper/historyimageitem.h18
-rw-r--r--klipper/historyitem.cpp38
-rw-r--r--klipper/historyitem.h22
-rw-r--r--klipper/historystringitem.cpp6
-rw-r--r--klipper/historystringitem.h16
-rw-r--r--klipper/historyurlitem.cpp16
-rw-r--r--klipper/historyurlitem.h12
-rw-r--r--klipper/klipperbindings.cpp4
-rw-r--r--klipper/klipperpopup.cpp40
-rw-r--r--klipper/klipperpopup.h16
-rw-r--r--klipper/popupproxy.cpp38
-rw-r--r--klipper/popupproxy.h12
-rw-r--r--klipper/toplevel.cpp188
-rw-r--r--klipper/toplevel.h50
-rw-r--r--klipper/urlgrabber.cpp76
-rw-r--r--klipper/urlgrabber.h70
25 files changed, 464 insertions, 464 deletions
diff --git a/klipper/applet.cpp b/klipper/applet.cpp
index 298a00b3d..97eee6eec 100644
--- a/klipper/applet.cpp
+++ b/klipper/applet.cpp
@@ -32,7 +32,7 @@
extern "C"
{
- KDE_EXPORT KPanelApplet* init(QWidget *parent, const QString& configFile)
+ KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile)
{
KGlobal::locale()->insertCatalogue("klipper");
int actions = KPanelApplet::Preferences | KPanelApplet::About | KPanelApplet::Help;
@@ -40,13 +40,13 @@ extern "C"
}
}
-KlipperApplet::KlipperApplet(const QString& configFile, Type t, int actions,
- QWidget *parent, const char *name)
+KlipperApplet::KlipperApplet(const TQString& configFile, Type t, int actions,
+ TQWidget *parent, const char *name)
: KPanelApplet(configFile, t, actions, parent, name)
{
KlipperWidget::createAboutData();
move( 0, 0 );
- setBackgroundMode(QWidget::X11ParentRelative);
+ setBackgroundMode(TQWidget::X11ParentRelative);
widget = new KlipperAppletWidget( this );
setCustomMenu(widget->history()->popup());
centerWidget();
@@ -70,7 +70,7 @@ int KlipperApplet::heightForWidth(int) const
return widget->height();
}
-void KlipperApplet::resizeEvent( QResizeEvent* ev )
+void KlipperApplet::resizeEvent( TQResizeEvent* ev )
{
widget->adjustSize();
KPanelApplet::resizeEvent( ev );
@@ -91,7 +91,7 @@ void KlipperApplet::preferences()
void KlipperApplet::help()
{
- kapp->invokeHelp(QString::null, QString::fromLatin1("klipper"));
+ kapp->invokeHelp(TQString::null, TQString::fromLatin1("klipper"));
}
void KlipperApplet::about()
@@ -100,7 +100,7 @@ void KlipperApplet::about()
about.exec();
}
-KlipperAppletWidget::KlipperAppletWidget( QWidget* parent )
+KlipperAppletWidget::KlipperAppletWidget( TQWidget* parent )
// init() is called first, before KlipperWidget is called with ( parent, kconfig )
: KlipperWidget( ( init(), parent ), new KConfig( "klipperrc" ))
{
@@ -112,8 +112,8 @@ KlipperAppletWidget::KlipperAppletWidget( QWidget* parent )
void KlipperAppletWidget::init()
{
// if there's klipper process running, quit it
- QByteArray arg1, arg2;
- QCString str;
+ TQByteArray arg1, arg2;
+ TQCString str;
// call() - wait for finishing
kapp->dcopClient()->call("klipper", "klipper", "quitProcess()", arg1, str, arg2 );
// register ourselves, so if klipper process is started,
diff --git a/klipper/applet.h b/klipper/applet.h
index c1a4bafcf..3f1ee3361 100644
--- a/klipper/applet.h
+++ b/klipper/applet.h
@@ -31,14 +31,14 @@ class KlipperApplet : public KPanelApplet
{
Q_OBJECT
public:
- KlipperApplet(const QString& configFile, Type t = Normal, int actions = 0,
- QWidget *parent = 0, const char *name = 0);
+ KlipperApplet(const TQString& configFile, Type t = Normal, int actions = 0,
+ TQWidget *parent = 0, const char *name = 0);
~KlipperApplet();
int widthForHeight(int h) const;
int heightForWidth(int w) const;
protected:
- void resizeEvent( QResizeEvent* );
+ void resizeEvent( TQResizeEvent* );
void preferences();
void help();
void about();
@@ -55,7 +55,7 @@ class KlipperAppletWidget : public KlipperWidget
k_dcop:
int newInstance();
public:
- KlipperAppletWidget( QWidget* parent = NULL );
+ KlipperAppletWidget( TQWidget* parent = NULL );
virtual ~KlipperAppletWidget();
private:
void init();
diff --git a/klipper/clipboardpoll.cpp b/klipper/clipboardpoll.cpp
index 20157a1a2..d87e59985 100644
--- a/klipper/clipboardpoll.cpp
+++ b/klipper/clipboardpoll.cpp
@@ -23,7 +23,7 @@
#include "clipboardpoll.h"
#include <kapplication.h>
-#include <qclipboard.h>
+#include <tqclipboard.h>
#include <kdebug.h>
#include <X11/Xatom.h>
#include <time.h>
@@ -60,8 +60,8 @@
extern Time qt_x_time;
-ClipboardPoll::ClipboardPoll( QWidget* parent )
- : QWidget( parent )
+ClipboardPoll::ClipboardPoll( TQWidget* parent )
+ : TQWidget( parent )
, xfixes_event_base( -1 )
{
hide();
@@ -111,9 +111,9 @@ ClipboardPoll::ClipboardPoll( QWidget* parent )
void ClipboardPoll::initPolling()
{
- connect( kapp->clipboard(), SIGNAL( selectionChanged() ), SLOT(qtSelectionChanged()));
- connect( kapp->clipboard(), SIGNAL( dataChanged() ), SLOT( qtClipboardChanged() ));
- connect( &timer, SIGNAL( timeout()), SLOT( timeout()));
+ connect( kapp->clipboard(), TQT_SIGNAL( selectionChanged() ), TQT_SLOT(qtSelectionChanged()));
+ connect( kapp->clipboard(), TQT_SIGNAL( dataChanged() ), TQT_SLOT( qtClipboardChanged() ));
+ connect( &timer, TQT_SIGNAL( timeout()), TQT_SLOT( timeout()));
timer.start( 1000, false );
selection.atom = XA_PRIMARY;
clipboard.atom = xa_clipboard;
diff --git a/klipper/clipboardpoll.h b/klipper/clipboardpoll.h
index c7b3b266d..462ad8097 100644
--- a/klipper/clipboardpoll.h
+++ b/klipper/clipboardpoll.h
@@ -20,8 +20,8 @@
#ifndef _CLIPBOARDPOLL_H_
#define _CLIPBOARDPOLL_H_
-#include <qwidget.h>
-#include <qtimer.h>
+#include <tqwidget.h>
+#include <tqtimer.h>
#include <X11/Xlib.h>
#include <fixx11h.h>
@@ -30,7 +30,7 @@ class ClipboardPoll
{
Q_OBJECT
public:
- ClipboardPoll( QWidget* parent );
+ ClipboardPoll( TQWidget* parent );
signals:
void clipboardChanged( bool selectionMode );
protected:
@@ -55,7 +55,7 @@ class ClipboardPoll
bool checkTimestamp( SelectionData& data );
bool changedTimestamp( SelectionData& data, const XEvent& e );
void initPolling();
- QTimer timer;
+ TQTimer timer;
SelectionData selection;
SelectionData clipboard;
Atom xa_clipboard;
diff --git a/klipper/configdialog.cpp b/klipper/configdialog.cpp
index a195a2332..3f325d40e 100644
--- a/klipper/configdialog.cpp
+++ b/klipper/configdialog.cpp
@@ -17,13 +17,13 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qvbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqvbuttongroup.h>
#include <assert.h>
#include <kiconloader.h>
@@ -42,9 +42,9 @@ ConfigDialog::ConfigDialog( const ActionList *list, KGlobalAccel *accel,
Ok, 0L, "config dialog" )
{
if ( isApplet )
- setHelp( QString::null, "klipper" );
+ setHelp( TQString::null, "klipper" );
- QFrame *w = 0L; // the parent for the widgets
+ TQFrame *w = 0L; // the parent for the widgets
w = addVBoxPage( i18n("&General") );
generalWidget = new GeneralWidget( w, "general widget" );
@@ -66,8 +66,8 @@ void ConfigDialog::show()
{
if ( !isVisible() ) {
KWinModule module(0, KWinModule::INFO_DESKTOP);
- QSize s1 = sizeHint();
- QSize s2 = module.workArea().size();
+ TQSize s1 = sizeHint();
+ TQSize s2 = module.workArea().size();
int w = s1.width();
int h = s1.height();
@@ -91,39 +91,39 @@ void ConfigDialog::commitShortcuts()
////
-GeneralWidget::GeneralWidget( QWidget *parent, const char *name )
- : QVBox( parent, name )
+GeneralWidget::GeneralWidget( TQWidget *parent, const char *name )
+ : TQVBox( parent, name )
{
setSpacing(KDialog::spacingHint());
- cbMousePos = new QCheckBox( i18n("&Popup menu at mouse-cursor position"),
+ cbMousePos = new TQCheckBox( i18n("&Popup menu at mouse-cursor position"),
this );
- cbSaveContents = new QCheckBox( i18n("Save clipboard contents on e&xit"),
+ cbSaveContents = new TQCheckBox( i18n("Save clipboard contents on e&xit"),
this );
- cbStripWhitespace = new QCheckBox( i18n("Remove whitespace when executing actions"), this );
- QWhatsThis::add( cbStripWhitespace,
+ cbStripWhitespace = new TQCheckBox( i18n("Remove whitespace when executing actions"), this );
+ TQWhatsThis::add( cbStripWhitespace,
i18n("Sometimes, the selected text has some whitespace at the end, which, if loaded as URL in a browser would cause an error. Enabling this option removes any whitespace at the beginning or end of the selected string (the original clipboard contents will not be modified).") );
- cbReplayAIH = new QCheckBox( i18n("&Replay actions on an item selected from history"),
+ cbReplayAIH = new TQCheckBox( i18n("&Replay actions on an item selected from history"),
this );
- cbNoNull = new QCheckBox( i18n("Pre&vent empty clipboard"), this );
- QWhatsThis::add( cbNoNull,
+ cbNoNull = new TQCheckBox( i18n("Pre&vent empty clipboard"), this );
+ TQWhatsThis::add( cbNoNull,
i18n("Selecting this option has the effect, that the "
"clipboard can never be emptied. E.g. when an "
"application exits, the clipboard would usually be "
"emptied.") );
- cbIgnoreSelection = new QCheckBox( i18n("&Ignore selection"), this );
- QWhatsThis::add( cbIgnoreSelection,
+ cbIgnoreSelection = new TQCheckBox( i18n("&Ignore selection"), this );
+ TQWhatsThis::add( cbIgnoreSelection,
i18n("This option prevents the selection being recorded "
"in the clipboard history. Only explicit clipboard "
"changes are recorded.") );
- QVButtonGroup *group = new QVButtonGroup( i18n("Clipboard/Selection Behavior"), this );
+ TQVButtonGroup *group = new TQVButtonGroup( i18n("Clipboard/Selection Behavior"), this );
group->setExclusive( true );
- QWhatsThis::add( group,
+ TQWhatsThis::add( group,
i18n("<qt>There are two different clipboard buffers available:<br><br>"
"<b>Clipboard</b> is filled by selecting something "
"and pressing Ctrl+C, or by clicking \"Copy\" in a toolbar or "
@@ -134,16 +134,16 @@ GeneralWidget::GeneralWidget( QWidget *parent, const char *name )
"You can configure the relationship between Clipboard and Selection."
"</qt>" ));
- cbSynchronize = new QRadioButton(
+ cbSynchronize = new TQRadioButton(
i18n("Sy&nchronize contents of the clipboard and the selection"),
group );
- QWhatsThis::add( cbSynchronize,
+ TQWhatsThis::add( cbSynchronize,
i18n("Selecting this option synchronizes these two buffers, so they "
"work the same way as in KDE 1.x and 2.x.") );
- cbSeparate = new QRadioButton(
+ cbSeparate = new TQRadioButton(
i18n("Separate clipboard and selection"), group );
- QWhatsThis::add(
+ TQWhatsThis::add(
cbSeparate,
i18n("Using this option will only set the selection when highlighting "
"something and the clipboard when choosing e.g. \"Copy\" "
@@ -155,20 +155,20 @@ GeneralWidget::GeneralWidget( QWidget *parent, const char *name )
popupTimeout->setLabel( i18n( "Tim&eout for action popups:" ) );
popupTimeout->setRange( 0, 200, 1, true );
popupTimeout->setSuffix( i18n( " sec" ) );
- QToolTip::add( popupTimeout, i18n("A value of 0 disables the timeout") );
+ TQToolTip::add( popupTimeout, i18n("A value of 0 disables the timeout") );
maxItems = new KIntNumInput( this );
maxItems->setLabel( i18n( "C&lipboard history size:" ) );
maxItems->setRange( 2, 2048, 1, true );
- connect( maxItems, SIGNAL( valueChanged( int )),
- SLOT( historySizeChanged( int ) ));
+ connect( maxItems, TQT_SIGNAL( valueChanged( int )),
+ TQT_SLOT( historySizeChanged( int ) ));
- connect( group, SIGNAL( clicked( int )),
- SLOT( slotClipConfigChanged() ));
+ connect( group, TQT_SIGNAL( clicked( int )),
+ TQT_SLOT( slotClipConfigChanged() ));
slotClipConfigChanged();
// Add some spacing at the end
- QWidget *dummy = new QWidget( this );
+ TQWidget *dummy = new TQWidget( this );
setStretchFactor( dummy, 1 );
}
@@ -191,7 +191,7 @@ void GeneralWidget::slotClipConfigChanged()
/////////////////////////////////////////
////
-void ListView::rename( QListViewItem* item, int c )
+void ListView::rename( TQListViewItem* item, int c )
{
bool gui = false;
if ( item->childCount() != 0 && c == 0) {
@@ -203,7 +203,7 @@ void ListView::rename( QListViewItem* item, int c )
if ( gui ) {
if ( ! _regExpEditor )
- _regExpEditor = KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor", QString::null, this );
+ _regExpEditor = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor", TQString::null, this );
KRegExpEditorInterface *iface = static_cast<KRegExpEditorInterface *>( _regExpEditor->qt_cast( "KRegExpEditorInterface" ) );
assert( iface );
iface->setRegExp( item->text( 0 ) );
@@ -218,19 +218,19 @@ void ListView::rename( QListViewItem* item, int c )
}
-ActionWidget::ActionWidget( const ActionList *list, ConfigDialog* configWidget, QWidget *parent,
+ActionWidget::ActionWidget( const ActionList *list, ConfigDialog* configWidget, TQWidget *parent,
const char *name )
- : QVBox( parent, name ),
+ : TQVBox( parent, name ),
advancedWidget( 0L )
{
Q_ASSERT( list != 0L );
- QLabel *lblAction = new QLabel(
+ TQLabel *lblAction = new TQLabel(
i18n("Action &list (right click to add/remove commands):"), this );
listView = new ListView( configWidget, this, "list view" );
lblAction->setBuddy( listView );
- listView->addColumn( i18n("Regular Expression (see http://doc.trolltech.com/qregexp.html#details)") );
+ listView->addColumn( i18n("Regular Expression (see http://doc.trolltech.com/tqregexp.html#details)") );
listView->addColumn( i18n("Description") );
listView->setRenameable(0);
@@ -244,33 +244,33 @@ ActionWidget::ActionWidget( const ActionList *list, ConfigDialog* configWidget,
listView->setRootIsDecorated( true );
listView->setMultiSelection( false );
listView->setAllColumnsShowFocus( true );
- listView->setSelectionMode( QListView::Single );
- connect( listView, SIGNAL(executed( QListViewItem*, const QPoint&, int )),
- SLOT( slotItemChanged( QListViewItem*, const QPoint& , int ) ));
- connect( listView, SIGNAL( selectionChanged ( QListViewItem * )),
- SLOT(selectionChanged ( QListViewItem * )));
+ listView->setSelectionMode( TQListView::Single );
+ connect( listView, TQT_SIGNAL(executed( TQListViewItem*, const TQPoint&, int )),
+ TQT_SLOT( slotItemChanged( TQListViewItem*, const TQPoint& , int ) ));
+ connect( listView, TQT_SIGNAL( selectionChanged ( TQListViewItem * )),
+ TQT_SLOT(selectionChanged ( TQListViewItem * )));
connect(listView,
- SIGNAL(contextMenu(KListView *, QListViewItem *, const QPoint&)),
- SLOT( slotContextMenu(KListView*, QListViewItem*, const QPoint&)));
+ TQT_SIGNAL(contextMenu(KListView *, TQListViewItem *, const TQPoint&)),
+ TQT_SLOT( slotContextMenu(KListView*, TQListViewItem*, const TQPoint&)));
ClipAction *action = 0L;
ClipCommand *command = 0L;
- QListViewItem *item = 0L;
- QListViewItem *child = 0L;
- QListViewItem *after = 0L; // QListView's default inserting really sucks
+ TQListViewItem *item = 0L;
+ TQListViewItem *child = 0L;
+ TQListViewItem *after = 0L; // QListView's default inserting really sucks
ActionListIterator it( *list );
- const QPixmap& doc = SmallIcon( "misc" );
- const QPixmap& exec = SmallIcon( "exec" );
+ const TQPixmap& doc = SmallIcon( "misc" );
+ const TQPixmap& exec = SmallIcon( "exec" );
for ( action = it.current(); action; action = ++it ) {
- item = new QListViewItem( listView, after,
+ item = new TQListViewItem( listView, after,
action->regExp(), action->description() );
item->setPixmap( 0, doc );
- QPtrListIterator<ClipCommand> it2( action->commands() );
+ TQPtrListIterator<ClipCommand> it2( action->commands() );
for ( command = it2.current(); command; command = ++it2 ) {
- child = new QListViewItem( item, after,
+ child = new TQListViewItem( item, after,
command->command, command->description);
if ( command->pixmap.isEmpty() )
child->setPixmap( 0, exec );
@@ -283,31 +283,31 @@ ActionWidget::ActionWidget( const ActionList *list, ConfigDialog* configWidget,
listView->setSorting( -1 ); // newly inserted items just append unsorted
- cbUseGUIRegExpEditor = new QCheckBox( i18n("&Use graphical editor for editing regular expressions" ), this );
+ cbUseGUIRegExpEditor = new TQCheckBox( i18n("&Use graphical editor for editing regular expressions" ), this );
if ( KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty() )
{
cbUseGUIRegExpEditor->hide();
cbUseGUIRegExpEditor->setChecked( false );
}
- QHBox *box = new QHBox( this );
+ TQHBox *box = new TQHBox( this );
box->setSpacing( KDialog::spacingHint() );
- QPushButton *button = new QPushButton( i18n("&Add Action"), box );
- connect( button, SIGNAL( clicked() ), SLOT( slotAddAction() ));
+ TQPushButton *button = new TQPushButton( i18n("&Add Action"), box );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAddAction() ));
- delActionButton = new QPushButton( i18n("&Delete Action"), box );
- connect( delActionButton, SIGNAL( clicked() ), SLOT( slotDeleteAction() ));
+ delActionButton = new TQPushButton( i18n("&Delete Action"), box );
+ connect( delActionButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotDeleteAction() ));
- QLabel *label = new QLabel(i18n("Click on a highlighted item's column to change it. \"%s\" in a command will be replaced with the clipboard contents."), box);
+ TQLabel *label = new TQLabel(i18n("Click on a highlighted item's column to change it. \"%s\" in a command will be replaced with the clipboard contents."), box);
label->setAlignment( WordBreak | AlignLeft | AlignVCenter );
box->setStretchFactor( label, 5 );
- box = new QHBox( this );
- QPushButton *advanced = new QPushButton( i18n("Advanced..."), box );
+ box = new TQHBox( this );
+ TQPushButton *advanced = new TQPushButton( i18n("Advanced..."), box );
advanced->setFixedSize( advanced->sizeHint() );
- connect( advanced, SIGNAL( clicked() ), SLOT( slotAdvanced() ));
- (void) new QWidget( box ); // spacer
+ connect( advanced, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAdvanced() ));
+ (void) new TQWidget( box ); // spacer
delActionButton->setEnabled(listView->currentItem () !=0);
}
@@ -316,13 +316,13 @@ ActionWidget::~ActionWidget()
{
}
-void ActionWidget::selectionChanged ( QListViewItem * item)
+void ActionWidget::selectionChanged ( TQListViewItem * item)
{
delActionButton->setEnabled(item!=0);
}
-void ActionWidget::slotContextMenu( KListView *, QListViewItem *item,
- const QPoint& pos )
+void ActionWidget::slotContextMenu( KListView *, TQListViewItem *item,
+ const TQPoint& pos )
{
if ( !item )
return;
@@ -338,8 +338,8 @@ void ActionWidget::slotContextMenu( KListView *, QListViewItem *item,
int id = menu->exec( pos );
if ( id == addCmd ) {
- QListViewItem *p = item->parent() ? item->parent() : item;
- QListViewItem *cmdItem = new QListViewItem( p, item,
+ TQListViewItem *p = item->parent() ? item->parent() : item;
+ TQListViewItem *cmdItem = new TQListViewItem( p, item,
i18n("Click here to set the command to be executed"),
i18n("<new command>") );
cmdItem->setPixmap( 0, SmallIcon( "exec" ) );
@@ -350,7 +350,7 @@ void ActionWidget::slotContextMenu( KListView *, QListViewItem *item,
delete menu;
}
-void ActionWidget::slotItemChanged( QListViewItem *item, const QPoint&, int col )
+void ActionWidget::slotItemChanged( TQListViewItem *item, const TQPoint&, int col )
{
if ( !item->parent() || col != 0 )
return;
@@ -361,7 +361,7 @@ void ActionWidget::slotItemChanged( QListViewItem *item, const QPoint&, int col
void ActionWidget::slotAddAction()
{
- QListViewItem *item = new QListViewItem( listView );
+ TQListViewItem *item = new TQListViewItem( listView );
item->setPixmap( 0, SmallIcon( "misc" ));
item->setText( 0, i18n("Click here to set the regexp"));
item->setText( 1, i18n("<new action>"));
@@ -370,7 +370,7 @@ void ActionWidget::slotAddAction()
void ActionWidget::slotDeleteAction()
{
- QListViewItem *item = listView->currentItem();
+ TQListViewItem *item = listView->currentItem();
if ( item && item->parent() )
item = item->parent();
delete item;
@@ -379,8 +379,8 @@ void ActionWidget::slotDeleteAction()
ActionList * ActionWidget::actionList()
{
- QListViewItem *item = listView->firstChild();
- QListViewItem *child = 0L;
+ TQListViewItem *item = listView->firstChild();
+ TQListViewItem *child = 0L;
ClipAction *action = 0L;
ActionList *list = new ActionList;
list->setAutoDelete( true );
@@ -406,24 +406,24 @@ void ActionWidget::slotAdvanced()
KDialogBase dlg( 0L, "advanced dlg", true,
i18n("Advanced Settings"),
KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok );
- QVBox *box = dlg.makeVBoxMainWidget();
+ TQVBox *box = dlg.makeVBoxMainWidget();
AdvancedWidget *widget = new AdvancedWidget( box );
widget->setWMClasses( m_wmClasses );
dlg.resize( dlg.sizeHint().width(),
dlg.sizeHint().height() +40); // or we get an ugly scrollbar :(
- if ( dlg.exec() == QDialog::Accepted ) {
+ if ( dlg.exec() == TQDialog::Accepted ) {
m_wmClasses = widget->wmClasses();
}
}
-AdvancedWidget::AdvancedWidget( QWidget *parent, const char *name )
- : QVBox( parent, name )
+AdvancedWidget::AdvancedWidget( TQWidget *parent, const char *name )
+ : TQVBox( parent, name )
{
editListBox = new KEditListBox( i18n("D&isable Actions for Windows of Type WM_CLASS"), this, "editlistbox", true, KEditListBox::Add | KEditListBox::Remove );
- QWhatsThis::add( editListBox,
+ TQWhatsThis::add( editListBox,
i18n("<qt>This lets you specify windows in which Klipper should "
"not invoke \"actions\". Use<br><br>"
"<center><b>xprop | grep WM_CLASS</b></center><br>"
@@ -439,7 +439,7 @@ AdvancedWidget::~AdvancedWidget()
{
}
-void AdvancedWidget::setWMClasses( const QStringList& items )
+void AdvancedWidget::setWMClasses( const TQStringList& items )
{
editListBox->clear();
editListBox->insertStringList( items );
@@ -451,8 +451,8 @@ void AdvancedWidget::setWMClasses( const QStringList& items )
//////////
/*
-KeysWidget::KeysWidget( KAccelActions &keyMap, QWidget *parent, const char *name)
- : QVBox( parent, name )
+KeysWidget::KeysWidget( KAccelActions &keyMap, TQWidget *parent, const char *name)
+ : TQVBox( parent, name )
{
keyChooser = new KKeyChooser( keyMap, this );
}
diff --git a/klipper/configdialog.h b/klipper/configdialog.h
index be64b8335..49b994ecf 100644
--- a/klipper/configdialog.h
+++ b/klipper/configdialog.h
@@ -20,12 +20,12 @@
#ifndef CONFIGDIALOG_H
#define CONFIGDIALOG_H
-#include <qcheckbox.h>
-#include <qevent.h>
-#include <qgroupbox.h>
-#include <qheader.h>
-#include <qradiobutton.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqevent.h>
+#include <tqgroupbox.h>
+#include <tqheader.h>
+#include <tqradiobutton.h>
+#include <tqvbox.h>
#include <kdialogbase.h>
#include <keditlistbox.h>
@@ -49,7 +49,7 @@ class GeneralWidget : public QVBox
friend class ConfigDialog;
public:
- GeneralWidget( QWidget *parent, const char *name );
+ GeneralWidget( TQWidget *parent, const char *name );
~GeneralWidget();
private slots:
@@ -57,9 +57,9 @@ private slots:
void slotClipConfigChanged();
private:
- QCheckBox *cbMousePos, *cbSaveContents, *cbReplayAIH, *cbNoNull;
- QCheckBox *cbIgnoreSelection, *cbStripWhitespace;
- QRadioButton *cbSynchronize, *cbImplicitSelection, *cbSeparate;
+ TQCheckBox *cbMousePos, *cbSaveContents, *cbReplayAIH, *cbNoNull;
+ TQCheckBox *cbIgnoreSelection, *cbStripWhitespace;
+ TQRadioButton *cbSynchronize, *cbImplicitSelection, *cbSeparate;
KIntNumInput *popupTimeout, *maxItems;
};
@@ -71,11 +71,11 @@ class AdvancedWidget : public QVBox
Q_OBJECT
public:
- AdvancedWidget( QWidget *parent = 0L, const char *name = 0L );
+ AdvancedWidget( TQWidget *parent = 0L, const char *name = 0L );
~AdvancedWidget();
- void setWMClasses( const QStringList& items );
- QStringList wmClasses() const { return editListBox->items(); }
+ void setWMClasses( const TQStringList& items );
+ TQStringList wmClasses() const { return editListBox->items(); }
private:
KEditListBox *editListBox;
@@ -88,7 +88,7 @@ class ActionWidget : public QVBox
friend class ConfigDialog;
public:
- ActionWidget( const ActionList *list, ConfigDialog* configWidget, QWidget *parent, const char *name );
+ ActionWidget( const ActionList *list, ConfigDialog* configWidget, TQWidget *parent, const char *name );
~ActionWidget();
/**
@@ -98,23 +98,23 @@ public:
*/
ActionList * actionList();
- void setWMClasses( const QStringList& items ) { m_wmClasses = items; }
- QStringList wmClasses() const { return m_wmClasses; }
+ void setWMClasses( const TQStringList& items ) { m_wmClasses = items; }
+ TQStringList wmClasses() const { return m_wmClasses; }
private slots:
void slotAddAction();
void slotDeleteAction();
- void slotItemChanged( QListViewItem *, const QPoint& , int );
+ void slotItemChanged( TQListViewItem *, const TQPoint& , int );
void slotAdvanced();
- void slotContextMenu( KListView *, QListViewItem *, const QPoint& );
- void selectionChanged ( QListViewItem *);
+ void slotContextMenu( KListView *, TQListViewItem *, const TQPoint& );
+ void selectionChanged ( TQListViewItem *);
private:
KListView *listView;
- QStringList m_wmClasses;
+ TQStringList m_wmClasses;
AdvancedWidget *advancedWidget;
- QPushButton *delActionButton;
- QCheckBox *cbUseGUIRegExpEditor;
+ TQPushButton *delActionButton;
+ TQCheckBox *cbUseGUIRegExpEditor;
};
/*class KeysWidget : public QVBox
@@ -124,7 +124,7 @@ private:
friend class ConfigDialog;
public:
- KeysWidget( KAccelActions &keyMap, QWidget *parent, const char *name );
+ KeysWidget( KAccelActions &keyMap, TQWidget *parent, const char *name );
~KeysWidget();
private:
@@ -168,7 +168,7 @@ public:
{
return generalWidget->cbIgnoreSelection->isChecked();
}
- QStringList noActionsFor() const {
+ TQStringList noActionsFor() const {
return actionWidget->wmClasses();
}
bool useGUIRegExpEditor() const
@@ -210,7 +210,7 @@ public:
void setSynchronize( bool synchronize ) {
generalWidget->cbSynchronize->setChecked( synchronize );
}
- void setNoActionsFor( const QStringList& items ) {
+ void setNoActionsFor( const TQStringList& items ) {
actionWidget->setWMClasses( items );
}
void setUseGUIRegExpEditor( bool enabled )
@@ -234,30 +234,30 @@ private:
class ListView : public KListView
{
public:
- ListView( ConfigDialog* configWidget, QWidget *parent, const char *name )
+ ListView( ConfigDialog* configWidget, TQWidget *parent, const char *name )
: KListView( parent, name ), _configWidget( configWidget ),
_regExpEditor(0L) {}
- // QListView has a weird idea of a sizeHint...
- virtual QSize sizeHint () const {
+ // TQListView has a weird idea of a sizeHint...
+ virtual TQSize sizeHint () const {
int w = minimumSizeHint().width();
int h = header()->height();
h += viewport()->sizeHint().height();
h += horizontalScrollBar()->height();
- QListViewItem *item = firstChild();
+ TQListViewItem *item = firstChild();
while ( item ) {
h += item->totalHeight();
item = item->nextSibling();
}
- return QSize( w, h );
+ return TQSize( w, h );
}
protected:
- virtual void rename( QListViewItem* item, int c );
+ virtual void rename( TQListViewItem* item, int c );
private:
ConfigDialog* _configWidget;
- QDialog* _regExpEditor;
+ TQDialog* _regExpEditor;
};
#endif // CONFIGDIALOG_H
diff --git a/klipper/history.cpp b/klipper/history.cpp
index 068475214..a02b37156 100644
--- a/klipper/history.cpp
+++ b/klipper/history.cpp
@@ -25,12 +25,12 @@
#include "historystringitem.h"
#include "klipperpopup.h"
-History::History( QWidget* parent, const char* name )
- : QObject( parent, name ),
+History::History( TQWidget* parent, const char* name )
+ : TQObject( parent, name ),
m_popup( new KlipperPopup( this, parent, "main_widget" ) ),
m_topIsUserSelected( false )
{
- connect( this, SIGNAL( changed() ), m_popup, SLOT( slotHistoryChanged() ) );
+ connect( this, TQT_SIGNAL( changed() ), m_popup, TQT_SLOT( slotHistoryChanged() ) );
itemList.setAutoDelete( true );
}
diff --git a/klipper/history.h b/klipper/history.h
index 9c54cb387..f00a80a1a 100644
--- a/klipper/history.h
+++ b/klipper/history.h
@@ -21,8 +21,8 @@
#ifndef _HISTORY_H_
#define _HISTORY_H_
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include "historyitem.h"
class KlipperPopup;
@@ -34,12 +34,12 @@ class History : public QObject
{
Q_OBJECT
public:
- History( QWidget* parent, const char* name );
+ History( TQWidget* parent, const char* name );
~History();
/**
* Iterator for history
*/
- typedef QPtrListIterator<HistoryItem> iterator;
+ typedef TQPtrListIterator<HistoryItem> iterator;
/**
* Return (toplevel) popup menu (or default view, of you like)
@@ -135,7 +135,7 @@ private:
/**
* The history
*/
- QPtrList<HistoryItem> itemList;
+ TQPtrList<HistoryItem> itemList;
/**
* ensure that the number of items does not exceed max_size()
diff --git a/klipper/historyimageitem.cpp b/klipper/historyimageitem.cpp
index f95a76429..38767b42c 100644
--- a/klipper/historyimageitem.cpp
+++ b/klipper/historyimageitem.cpp
@@ -18,20 +18,20 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
#include "historyimageitem.h"
-HistoryImageItem::HistoryImageItem( const QPixmap& data )
+HistoryImageItem::HistoryImageItem( const TQPixmap& data )
: HistoryItem(), m_data( data )
{
}
-QString HistoryImageItem::text() const {
+TQString HistoryImageItem::text() const {
if ( m_text.isNull() ) {
- m_text = QString( "%1x%2x%3 %4" )
+ m_text = TQString( "%1x%2x%3 %4" )
.arg( m_data.width() )
.arg( m_data.height() )
.arg( m_data.depth() );
@@ -41,6 +41,6 @@ QString HistoryImageItem::text() const {
}
/* virtual */
-void HistoryImageItem::write( QDataStream& stream ) const {
- stream << QString( "image" ) << m_data;
+void HistoryImageItem::write( TQDataStream& stream ) const {
+ stream << TQString( "image" ) << m_data;
}
diff --git a/klipper/historyimageitem.h b/klipper/historyimageitem.h
index 2518e0a4c..f9a79d89c 100644
--- a/klipper/historyimageitem.h
+++ b/klipper/historyimageitem.h
@@ -22,8 +22,8 @@
#define _HISTORYIMAGEITEM_H_
#include "historyitem.h"
-#include <qpixmap.h>
-#include <qdragobject.h>
+#include <tqpixmap.h>
+#include <tqdragobject.h>
/**
* A image entry in the clipboard history.
@@ -31,29 +31,29 @@
class HistoryImageItem : public HistoryItem
{
public:
- HistoryImageItem( const QPixmap& data );
+ HistoryImageItem( const TQPixmap& data );
virtual ~HistoryImageItem() {}
- virtual QString text() const;
+ virtual TQString text() const;
virtual bool operator==( const HistoryItem& rhs) const {
if ( const HistoryImageItem* casted_rhs = dynamic_cast<const HistoryImageItem*>( &rhs ) ) {
return &casted_rhs->m_data == &m_data; // Not perfect, but better than nothing.
}
return false;
}
- virtual const QPixmap& image() const { return m_data; }
- virtual QMimeSource* mimeSource() const { return new QImageDrag( m_data.convertToImage()) ; }
+ virtual const TQPixmap& image() const { return m_data; }
+ virtual TQMimeSource* mimeSource() const { return new TQImageDrag( m_data.convertToImage()) ; }
- virtual void write( QDataStream& stream ) const;
+ virtual void write( TQDataStream& stream ) const;
private:
/**
*
*/
- const QPixmap m_data;
+ const TQPixmap m_data;
/**
* Cache for m_data's string representation
*/
- mutable QString m_text;
+ mutable TQString m_text;
};
diff --git a/klipper/historyitem.cpp b/klipper/historyitem.cpp
index 680e6b700..481339b30 100644
--- a/klipper/historyitem.cpp
+++ b/klipper/historyitem.cpp
@@ -17,11 +17,11 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
-#include <qmime.h>
-#include <qdragobject.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qpixmap.h>
+#include <tqmime.h>
+#include <tqdragobject.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
#include <kurldrag.h>
#include <kdebug.h>
@@ -39,7 +39,7 @@ HistoryItem::~HistoryItem() {
}
-HistoryItem* HistoryItem::create( const QMimeSource& aSource )
+HistoryItem* HistoryItem::create( const TQMimeSource& aSource )
{
#if 0
int i=0;
@@ -49,36 +49,36 @@ HistoryItem* HistoryItem::create( const QMimeSource& aSource )
#endif
if( KURLDrag::canDecode( &aSource )) {
KURL::List urls;
- QMap<QString,QString> metaData;
+ TQMap<TQString,TQString> metaData;
if( KURLDrag::decode( &aSource, urls, metaData )) {
// this is from KonqDrag (libkonq)
- QByteArray a = aSource.encodedData( "application/x-kde-cutselection" );
+ TQByteArray a = aSource.encodedData( "application/x-kde-cutselection" );
bool cut = !a.isEmpty() && (a.at(0) == '1'); // true if 1
return new HistoryURLItem( urls, metaData, cut );
}
}
- if ( QTextDrag::canDecode( &aSource ) ) {
- QString text;
- if( QTextDrag::decode( &aSource, text ))
+ if ( TQTextDrag::canDecode( &aSource ) ) {
+ TQString text;
+ if( TQTextDrag::decode( &aSource, text ))
return text.isNull() ? 0 : new HistoryStringItem( text );
}
- if ( QImageDrag::canDecode( &aSource ) ) {
- QPixmap image;
- if( QImageDrag::decode( &aSource, image ))
+ if ( TQImageDrag::canDecode( &aSource ) ) {
+ TQPixmap image;
+ if( TQImageDrag::decode( &aSource, image ))
return image.isNull() ? 0 : new HistoryImageItem( image );
}
return 0; // Failed.
}
-HistoryItem* HistoryItem::create( QDataStream& aSource ) {
+HistoryItem* HistoryItem::create( TQDataStream& aSource ) {
if ( aSource.atEnd() ) {
return 0;
}
- QString type;
+ TQString type;
aSource >> type;
if ( type == "url" ) {
KURL::List urls;
- QMap< QString, QString > metaData;
+ TQMap< TQString, TQString > metaData;
int cut;
aSource >> urls;
aSource >> metaData;
@@ -86,12 +86,12 @@ HistoryItem* HistoryItem::create( QDataStream& aSource ) {
return new HistoryURLItem( urls, metaData, cut );
}
if ( type == "string" ) {
- QString text;
+ TQString text;
aSource >> text;
return new HistoryStringItem( text );
}
if ( type == "image" ) {
- QPixmap image;
+ TQPixmap image;
aSource >> image;
return new HistoryImageItem( image );
}
diff --git a/klipper/historyitem.h b/klipper/historyitem.h
index 04ab542ed..05b2de641 100644
--- a/klipper/historyitem.h
+++ b/klipper/historyitem.h
@@ -19,7 +19,7 @@
*/
#ifndef _HISTORYITEM_H_
#define _HISTORYITEM_H_
-#include <qpixmap.h>
+#include <tqpixmap.h>
class QString;
class QMimeSource;
@@ -39,24 +39,24 @@ public:
* An image would be returned as a descriptive
* text, such as 32x43 image.
*/
- virtual QString text() const = 0;
+ virtual TQString text() const = 0;
/**
* Return the current item as text
* A text would be returned as a null pixmap,
* which is also the default implementation
*/
- inline virtual const QPixmap& image() const;
+ inline virtual const TQPixmap& image() const;
/**
- * Returns QMimeSource suitable for QClipboard::setData().
+ * Returns TQMimeSource suitable for QClipboard::setData().
*/
- virtual QMimeSource* mimeSource() const = 0;
+ virtual TQMimeSource* mimeSource() const = 0;
/**
* Write object on datastream
*/
- virtual void write( QDataStream& stream ) const = 0;
+ virtual void write( TQDataStream& stream ) const = 0;
/**
* Equality.
@@ -67,24 +67,24 @@ public:
* Create an HistoryItem from MimeSources (i.e., clipboard data)
* returns null if create fails (e.g, unsupported mimetype)
*/
- static HistoryItem* create( const QMimeSource& aSource );
+ static HistoryItem* create( const TQMimeSource& aSource );
/**
* Create an HistoryItem from MimeSources (i.e., clipboard data)
* returns null if creation fails. In this case, the datastream
* is left in an undefined state.
*/
- static HistoryItem* create( QDataStream& aSource );
+ static HistoryItem* create( TQDataStream& aSource );
};
inline
-const QPixmap& HistoryItem::image() const {
- static QPixmap nullPixmap;
+const TQPixmap& HistoryItem::image() const {
+ static TQPixmap nullPixmap;
return nullPixmap;
}
inline
-QDataStream& operator<<( QDataStream& lhs, HistoryItem const * const rhs ) {
+TQDataStream& operator<<( TQDataStream& lhs, HistoryItem const * const rhs ) {
if ( rhs ) {
rhs->write( lhs );
}
diff --git a/klipper/historystringitem.cpp b/klipper/historystringitem.cpp
index dcb7b8da9..85a4ede4d 100644
--- a/klipper/historystringitem.cpp
+++ b/klipper/historystringitem.cpp
@@ -19,13 +19,13 @@
*/
#include "historystringitem.h"
-HistoryStringItem::HistoryStringItem( const QString& data )
+HistoryStringItem::HistoryStringItem( const TQString& data )
: HistoryItem(), m_data( data )
{
}
/* virtual */
-void HistoryStringItem::write( QDataStream& stream ) const {
- stream << QString( "string" ) << m_data;
+void HistoryStringItem::write( TQDataStream& stream ) const {
+ stream << TQString( "string" ) << m_data;
}
diff --git a/klipper/historystringitem.h b/klipper/historystringitem.h
index ccbaa2e63..a142fbe2e 100644
--- a/klipper/historystringitem.h
+++ b/klipper/historystringitem.h
@@ -20,8 +20,8 @@
#ifndef _HISTORYSTRINGITEM_H_
#define _HISTORYSTRINGITEM_H_
-#include <qstring.h>
-#include <qdragobject.h>
+#include <tqstring.h>
+#include <tqdragobject.h>
#include "historyitem.h"
@@ -31,27 +31,27 @@
class HistoryStringItem : public HistoryItem
{
public:
- HistoryStringItem( const QString& data );
+ HistoryStringItem( const TQString& data );
virtual ~HistoryStringItem() {}
- virtual QString text() const;
+ virtual TQString text() const;
virtual bool operator==( const HistoryItem& rhs) const {
if ( const HistoryStringItem* casted_rhs = dynamic_cast<const HistoryStringItem*>( &rhs ) ) {
return casted_rhs->m_data == m_data;
}
return false;
}
- virtual QMimeSource* mimeSource() const { return new QTextDrag( m_data ) ; }
+ virtual TQMimeSource* mimeSource() const { return new TQTextDrag( m_data ) ; }
/**
* Write object on datastream
*/
- virtual void write( QDataStream& stream ) const;
+ virtual void write( TQDataStream& stream ) const;
private:
- QString m_data;
+ TQString m_data;
};
-inline QString HistoryStringItem::text() const { return m_data; }
+inline TQString HistoryStringItem::text() const { return m_data; }
#endif
diff --git a/klipper/historyurlitem.cpp b/klipper/historyurlitem.cpp
index 3e85a17c3..863a93fb8 100644
--- a/klipper/historyurlitem.cpp
+++ b/klipper/historyurlitem.cpp
@@ -22,28 +22,28 @@
#include <kmultipledrag.h>
#include <kurldrag.h>
-HistoryURLItem::HistoryURLItem( const KURL::List &_urls, QMap<QString, QString> _metaData, bool _cut )
+HistoryURLItem::HistoryURLItem( const KURL::List &_urls, TQMap<TQString, TQString> _metaData, bool _cut )
: urls( _urls ), metaData( _metaData ), cut( _cut )
{
}
/* virtual */
-void HistoryURLItem::write( QDataStream& stream ) const
+void HistoryURLItem::write( TQDataStream& stream ) const
{
- stream << QString( "url" ) << urls << metaData << (int)cut;
+ stream << TQString( "url" ) << urls << metaData << (int)cut;
}
-QString HistoryURLItem::text() const {
+TQString HistoryURLItem::text() const {
return urls.toStringList().join( " " );
}
-QMimeSource* HistoryURLItem::mimeSource() const {
+TQMimeSource* HistoryURLItem::mimeSource() const {
KMultipleDrag* drag = new KMultipleDrag;
drag->addDragObject( new KURLDrag( urls, metaData ));
// from KonqDrag (libkonq)
- QStoredDrag* cutdrag = new QStoredDrag( "application/x-kde-cutselection" );
- QByteArray a;
- QCString s ( cut ? "1" : "0" );
+ TQStoredDrag* cutdrag = new TQStoredDrag( "application/x-kde-cutselection" );
+ TQByteArray a;
+ TQCString s ( cut ? "1" : "0" );
a.resize( s.length() + 1 ); // trailing zero
memcpy( a.data(), s.data(), s.length() + 1 );
cutdrag->setEncodedData( a );
diff --git a/klipper/historyurlitem.h b/klipper/historyurlitem.h
index 5619b6037..7908721c8 100644
--- a/klipper/historyurlitem.h
+++ b/klipper/historyurlitem.h
@@ -22,7 +22,7 @@
#include "historyitem.h"
-#include <qmap.h>
+#include <tqmap.h>
#include <kurl.h>
/**
@@ -31,18 +31,18 @@
class HistoryURLItem : public HistoryItem
{
public:
- HistoryURLItem( const KURL::List &urls, QMap<QString, QString> metaData, bool cut );
- virtual QString text() const;
+ HistoryURLItem( const KURL::List &urls, TQMap<TQString, TQString> metaData, bool cut );
+ virtual TQString text() const;
virtual bool operator==( const HistoryItem& rhs) const;
- virtual QMimeSource* mimeSource() const;
+ virtual TQMimeSource* mimeSource() const;
/**
* Write object on datastream
*/
- virtual void write( QDataStream& stream ) const;
+ virtual void write( TQDataStream& stream ) const;
private:
KURL::List urls;
- QMap<QString, QString> metaData;
+ TQMap<TQString, TQString> metaData;
bool cut;
};
diff --git a/klipper/klipperbindings.cpp b/klipper/klipperbindings.cpp
index b32c90410..31bb25049 100644
--- a/klipper/klipperbindings.cpp
+++ b/klipper/klipperbindings.cpp
@@ -19,10 +19,10 @@
*/
#ifndef NOSLOTS
# define DEF( name, key3, key4, fnSlot ) \
- keys->insert( name, i18n(name), QString::null, key3, key4, this, SLOT(fnSlot) )
+ keys->insert( name, i18n(name), TQString::null, key3, key4, this, TQT_SLOT(fnSlot) )
#else
# define DEF( name, key3, key4, fnSlot ) \
- keys->insert( name, i18n(name), QString::null, key3, key4 )
+ keys->insert( name, i18n(name), TQString::null, key3, key4 )
#endif
#define WIN KKey::QtWIN
diff --git a/klipper/klipperpopup.cpp b/klipper/klipperpopup.cpp
index 7dfc0a3fd..954768fc5 100644
--- a/klipper/klipperpopup.cpp
+++ b/klipper/klipperpopup.cpp
@@ -44,8 +44,8 @@ namespace {
// #define DEBUG_EVENTS__
#ifdef DEBUG_EVENTS__
-kdbgstream& operator<<( kdbgstream& stream, const QKeyEvent& e ) {
- stream << "(QKeyEvent(text=" << e.text() << ",key=" << e.key() << ( e.isAccepted()?",accepted":",ignored)" ) << ",count=" << e.count();
+kdbgstream& operator<<( kdbgstream& stream, const TQKeyEvent& e ) {
+ stream << "(TQKeyEvent(text=" << e.text() << ",key=" << e.key() << ( e.isAccepted()?",accepted":",ignored)" ) << ",count=" << e.count();
if ( e.state() & Qt::AltButton ) {
stream << ",ALT";
}
@@ -74,18 +74,18 @@ kdbgstream& operator<<( kdbgstream& stream, const QKeyEvent& e ) {
*/
class KLineEditBlackKey : public KLineEdit {
public:
- KLineEditBlackKey(const QString& string, QWidget* parent, const char* name )
+ KLineEditBlackKey(const TQString& string, TQWidget* parent, const char* name )
: KLineEdit( string, parent, name )
{}
- KLineEditBlackKey( QWidget* parent, const char* name )
+ KLineEditBlackKey( TQWidget* parent, const char* name )
: KLineEdit( parent, name )
{}
~KLineEditBlackKey() {
}
protected:
- virtual void keyPressEvent( QKeyEvent* e ) {
+ virtual void keyPressEvent( TQKeyEvent* e ) {
KLineEdit::keyPressEvent( e );
e->accept();
@@ -93,7 +93,7 @@ protected:
};
-KlipperPopup::KlipperPopup( History* history, QWidget* parent, const char* name )
+KlipperPopup::KlipperPopup( History* history, TQWidget* parent, const char* name )
: KPopupMenu( parent, name ),
m_dirty( true ),
QSempty( i18n( "<empty clipboard>" ) ),
@@ -106,14 +106,14 @@ KlipperPopup::KlipperPopup( History* history, QWidget* parent, const char* name
n_history_items( 0 )
{
KWin::WindowInfo i = KWin::windowInfo( winId(), NET::WMGeometry );
- QRect g = i.geometry();
- QRect screen = KGlobalSettings::desktopGeometry(g.center());
+ TQRect g = i.geometry();
+ TQRect screen = KGlobalSettings::desktopGeometry(g.center());
int menu_height = ( screen.height() ) * 3/4;
int menu_width = ( screen.width() ) * 1/3;
m_popupProxy = new PopupProxy( this, "popup_proxy", menu_height, menu_width );
- connect( this, SIGNAL( aboutToShow() ), SLOT( slotAboutToShow() ) );
+ connect( this, TQT_SIGNAL( aboutToShow() ), TQT_SLOT( slotAboutToShow() ) );
}
KlipperPopup::~KlipperPopup() {
@@ -146,15 +146,15 @@ void KlipperPopup::buildFromScratch() {
m_filterWidget = new KLineEditBlackKey( this, "Klipper filter widget" );
insertTitle( SmallIcon( "klipper" ), i18n("Klipper - Clipboard Tool"));
m_filterWidgetId = insertItem( m_filterWidget, m_filterWidgetId, 1 );
- m_filterWidget->setFocusPolicy( QWidget::NoFocus );
+ m_filterWidget->setFocusPolicy( TQWidget::NoFocus );
setItemVisible( m_filterWidgetId, false );
m_filterWidget->hide();
- QString lastGroup;
+ TQString lastGroup;
// Bit of a hack here. It would be better of KHelpMenu could be an action.
// Insert Help-menu at the butttom of the "default" group.
- QString group;
- QString defaultGroup( "default" );
+ TQString group;
+ TQString defaultGroup( "default" );
for ( KAction* action = m_actions.first(); action; action = m_actions.next() ) {
group = action->group();
if ( group != lastGroup ) {
@@ -173,7 +173,7 @@ void KlipperPopup::buildFromScratch() {
}
-void KlipperPopup::rebuild( const QString& filter ) {
+void KlipperPopup::rebuild( const TQString& filter ) {
bool from_scratch = ( count() == 0 );
if ( from_scratch ) {
@@ -184,11 +184,11 @@ void KlipperPopup::rebuild( const QString& filter ) {
}
}
- QRegExp filterexp( filter );
+ TQRegExp filterexp( filter );
if ( filterexp.isValid() ) {
m_filterWidget->setPaletteForegroundColor( paletteForegroundColor() );
} else {
- m_filterWidget->setPaletteForegroundColor( QColor( "red" ) );
+ m_filterWidget->setPaletteForegroundColor( TQColor( "red" ) );
}
n_history_items = m_popupProxy->buildParent( TOP_HISTORY_ITEM_INDEX, filterexp );
@@ -221,12 +221,12 @@ void KlipperPopup::plugAction( KAction* action ) {
/* virtual */
-void KlipperPopup::keyPressEvent( QKeyEvent* e ) {
+void KlipperPopup::keyPressEvent( TQKeyEvent* e ) {
// If alt-something is pressed, select a shortcut
// from the menu. Do this by sending a keyPress
// without the alt-modifier to the superobject.
if ( e->state() & Qt::AltButton ) {
- QKeyEvent ke( QEvent::KeyPress,
+ TQKeyEvent ke( TQEvent::KeyPress,
e->key(),
e->ascii(),
e->state() ^ Qt::AltButton,
@@ -273,8 +273,8 @@ void KlipperPopup::keyPressEvent( QKeyEvent* e ) {
#ifdef DEBUG_EVENTS__
kdDebug() << "Passing this event down to child (KLineEdit): " << e << endl;
#endif
- QString lastString = m_filterWidget->text();
- QApplication::sendEvent( m_filterWidget, e );
+ TQString lastString = m_filterWidget->text();
+ TQApplication::sendEvent( m_filterWidget, e );
if ( m_filterWidget->text().isEmpty() ) {
if ( isItemVisible( m_filterWidgetId ) )
{
diff --git a/klipper/klipperpopup.h b/klipper/klipperpopup.h
index f77b87954..50ca55938 100644
--- a/klipper/klipperpopup.h
+++ b/klipper/klipperpopup.h
@@ -21,8 +21,8 @@
#define _KLIPPERPOPUP_H_
#include <kpopupmenu.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
class History;
class KlipperWidget;
@@ -40,7 +40,7 @@ class KlipperPopup : public KPopupMenu
Q_OBJECT
public:
- KlipperPopup( History* history, QWidget* parent=0, const char* name=0 );
+ KlipperPopup( History* history, TQWidget* parent=0, const char* name=0 );
~KlipperPopup();
void plugAction( KAction* action );
@@ -59,14 +59,14 @@ public slots:
void slotAboutToShow();
private:
- void rebuild( const QString& filter = QString::null );
+ void rebuild( const TQString& filter = TQString::null );
void buildFromScratch();
void insertSearchFilter();
void removeSearchFilter();
protected:
- virtual void keyPressEvent( QKeyEvent* e );
+ virtual void keyPressEvent( TQKeyEvent* e );
private:
bool m_dirty : 1; // true if menu contents needs to be rebuild.
@@ -74,13 +74,13 @@ private:
/**
* Contains the string shown if the menu is empty.
*/
- QString QSempty;
+ TQString QSempty;
/**
* Contains the string shown if the search string has no
* matches and the menu is not empty.
*/
- QString QSnomatch;
+ TQString QSnomatch;
/**
* The "document" (clipboard history)
@@ -95,7 +95,7 @@ private:
/**
* (unowned) actions to plug into the primary popup menu
*/
- QPtrList<KAction> m_actions;
+ TQPtrList<KAction> m_actions;
/**
* Proxy helper object used to track history items
diff --git a/klipper/popupproxy.cpp b/klipper/popupproxy.cpp
index 84a9e4ae6..196a4259c 100644
--- a/klipper/popupproxy.cpp
+++ b/klipper/popupproxy.cpp
@@ -17,10 +17,10 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
-#include <qregexp.h>
-#include <qstyle.h>
-#include <qpixmap.h>
-#include <qimage.h>
+#include <tqregexp.h>
+#include <tqstyle.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
#include <kstringhandler.h>
#include <klocale.h>
@@ -33,14 +33,14 @@
PopupProxy::PopupProxy( KlipperPopup* parent, const char* name, int menu_height, int menu_width )
- : QObject( parent, name ),
+ : TQObject( parent, name ),
proxy_for_menu( parent ),
spillPointer( parent->history()->youngest() ),
m_menu_height( menu_height ),
m_menu_width( menu_width ),
nextItemNumber( 0 )
{
- connect( parent->history(), SIGNAL( changed() ), SLOT( slotHistoryChanged() ) );
+ connect( parent->history(), TQT_SIGNAL( changed() ), TQT_SLOT( slotHistoryChanged() ) );
}
void PopupProxy::slotHistoryChanged() {
@@ -61,7 +61,7 @@ void PopupProxy::deleteMoreMenus() {
}
}
-int PopupProxy::buildParent( int index, const QRegExp& filter ) {
+int PopupProxy::buildParent( int index, const TQRegExp& filter ) {
deleteMoreMenus();
// Start from top of history (again)
spillPointer = parent()->history()->youngest();
@@ -75,7 +75,7 @@ int PopupProxy::buildParent( int index, const QRegExp& filter ) {
}
KlipperPopup* PopupProxy::parent() {
- return static_cast<KlipperPopup*>( QObject::parent() );
+ return static_cast<KlipperPopup*>( TQObject::parent() );
}
void PopupProxy::slotAboutToShow() {
@@ -89,17 +89,17 @@ void PopupProxy::tryInsertItem( HistoryItem const * const item,
// Insert item
int id = -1;
- QPixmap image( item->image() );
+ TQPixmap image( item->image() );
if ( image.isNull() ) {
// Squeeze text strings so that do not take up the entire screen (or more)
- QString text( KStringHandler::cPixelSqueeze(item->text().simplifyWhiteSpace(),
+ TQString text( KStringHandler::cPixelSqueeze(item->text().simplifyWhiteSpace(),
proxy_for_menu->fontMetrics(),
m_menu_width).replace( "&", "&&" ) );
id = proxy_for_menu->insertItem( text, -1, index );
} else {
- const QSize max_size( m_menu_width,m_menu_height/4 );
+ const TQSize max_size( m_menu_width,m_menu_height/4 );
if ( image.height() > max_size.height() || image.width() > max_size.width() ) {
- image.convertFromImage( image.convertToImage().smoothScale( max_size, QImage::ScaleMin ) );
+ image.convertFromImage( image.convertToImage().smoothScale( max_size, TQImage::ScaleMin ) );
}
id = proxy_for_menu->insertItem( image, -1, index );
}
@@ -107,18 +107,18 @@ void PopupProxy::tryInsertItem( HistoryItem const * const item,
// Determine height of a menu item.
Q_ASSERT( id != -1 ); // Be sure that the item was inserted.
- QMenuItem* mi = proxy_for_menu->findItem( id );
- int fontheight = QFontMetrics( proxy_for_menu->fontMetrics() ).height();
- int itemheight = proxy_for_menu->style().sizeFromContents(QStyle::CT_PopupMenuItem,
+ TQMenuItem* mi = proxy_for_menu->findItem( id );
+ int fontheight = TQFontMetrics( proxy_for_menu->fontMetrics() ).height();
+ int itemheight = proxy_for_menu->style().sizeFromContents(TQStyle::CT_PopupMenuItem,
proxy_for_menu,
- QSize( 0, fontheight ),
- QStyleOption(mi,10,0) ).height();
+ TQSize( 0, fontheight ),
+ TQStyleOption(mi,10,0) ).height();
// Test if there was enough space
remainingHeight -= itemheight;
History* history = parent()->history();
proxy_for_menu->connectItem( id,
history,
- SLOT( slotMoveToTop( int ) ) );
+ TQT_SLOT( slotMoveToTop( int ) ) );
proxy_for_menu->setItemParameter( id, nextItemNumber );
}
@@ -152,7 +152,7 @@ int PopupProxy::insertFromSpill( int index ) {
if ( spillPointer.current() ) {
KPopupMenu* moreMenu = new KPopupMenu( proxy_for_menu, "a more menu" );
proxy_for_menu->insertItem( i18n( "&More" ), moreMenu, -1, index );
- connect( moreMenu, SIGNAL( aboutToShow() ), SLOT( slotAboutToShow() ) );
+ connect( moreMenu, TQT_SIGNAL( aboutToShow() ), TQT_SLOT( slotAboutToShow() ) );
proxy_for_menu = moreMenu;
}
diff --git a/klipper/popupproxy.h b/klipper/popupproxy.h
index 689e97f2a..88436cc93 100644
--- a/klipper/popupproxy.h
+++ b/klipper/popupproxy.h
@@ -20,10 +20,10 @@
#ifndef _POPUPPROXY_H_
#define _POPUPPROXY_H_
-#include <qptrlist.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qregexp.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqregexp.h>
#include <kpopupmenu.h>
#include <history.h>
@@ -55,7 +55,7 @@ public:
* @param filter If non-empty, only insert items that match filter as a regex
* @return number of items inserted.
*/
- int buildParent( int index, const QRegExp& filter = QRegExp() );
+ int buildParent( int index, const TQRegExp& filter = TQRegExp() );
public slots:
void slotAboutToShow();
@@ -83,7 +83,7 @@ private:
private:
KPopupMenu* proxy_for_menu;
History::iterator spillPointer;
- QRegExp m_filter;
+ TQRegExp m_filter;
int m_menu_height;
int m_menu_width;
int nextItemNumber;
diff --git a/klipper/toplevel.cpp b/klipper/toplevel.cpp
index 748d4a78f..039e56dfe 100644
--- a/klipper/toplevel.cpp
+++ b/klipper/toplevel.cpp
@@ -21,15 +21,15 @@
Boston, MA 02110-1301, USA.
*/
-#include <qclipboard.h>
-#include <qcursor.h>
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qintdict.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qmime.h>
-#include <qdragobject.h>
+#include <tqclipboard.h>
+#include <tqcursor.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqintdict.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqmime.h>
+#include <tqdragobject.h>
#include <kaboutdata.h>
#include <kaction.h>
@@ -126,8 +126,8 @@ extern bool qt_qclipboard_bailout_hack;
static void ensureGlobalSyncOff(KConfig* config);
// config == kapp->config for process, otherwise applet
-KlipperWidget::KlipperWidget( QWidget *parent, KConfig* config )
- : QWidget( parent )
+KlipperWidget::KlipperWidget( TQWidget *parent, KConfig* config )
+ : TQWidget( parent )
, DCOPObject( "klipper" )
, m_overflowCounter( 0 )
, locklevel( 0 )
@@ -144,14 +144,14 @@ KlipperWidget::KlipperWidget( QWidget *parent, KConfig* config )
setBackgroundMode( X11ParentRelative );
clip = kapp->clipboard();
- connect( &m_overflowClearTimer, SIGNAL( timeout()), SLOT( slotClearOverflow()));
+ connect( &m_overflowClearTimer, TQT_SIGNAL( timeout()), TQT_SLOT( slotClearOverflow()));
m_overflowClearTimer.start( 1000 );
- connect( &m_pendingCheckTimer, SIGNAL( timeout()), SLOT( slotCheckPending()));
+ connect( &m_pendingCheckTimer, TQT_SIGNAL( timeout()), TQT_SLOT( slotCheckPending()));
m_history = new History( this, "main_history" );
// we need that collection, otherwise KToggleAction is not happy :}
- QString defaultGroup( "default" );
+ TQString defaultGroup( "default" );
KActionCollection *collection = new KActionCollection( this, "my collection" );
toggleURLGrabAction = new KToggleAction( collection, "toggleUrlGrabAction" );
toggleURLGrabAction->setEnabled( true );
@@ -160,16 +160,16 @@ KlipperWidget::KlipperWidget( QWidget *parent, KConfig* config )
"history_clear",
0,
history(),
- SLOT( slotClear() ),
+ TQT_SLOT( slotClear() ),
collection,
"clearHistoryAction" );
- connect( clearHistoryAction, SIGNAL( activated() ), SLOT( slotClearClipboard() ) );
+ connect( clearHistoryAction, TQT_SIGNAL( activated() ), TQT_SLOT( slotClearClipboard() ) );
clearHistoryAction->setGroup( defaultGroup );
configureAction = new KAction( i18n("&Configure Klipper..."),
"configure",
0,
this,
- SLOT( slotConfigure() ),
+ TQT_SLOT( slotConfigure() ),
collection,
"configureAction" );
configureAction->setGroup( defaultGroup );
@@ -177,7 +177,7 @@ KlipperWidget::KlipperWidget( QWidget *parent, KConfig* config )
"exit",
0,
this,
- SLOT( slotQuit() ),
+ TQT_SLOT( slotQuit() ),
collection,
"quitAction" );
quitAction->setGroup( "exit" );
@@ -186,15 +186,15 @@ KlipperWidget::KlipperWidget( QWidget *parent, KConfig* config )
readConfiguration( kc );
setURLGrabberEnabled( bURLGrabber );
- hideTimer = new QTime();
- showTimer = new QTime();
+ hideTimer = new TQTime();
+ showTimer = new TQTime();
readProperties(m_config);
- connect(kapp, SIGNAL(settingsChanged(int)), SLOT(slotSettingsChanged(int)));
+ connect(kapp, TQT_SIGNAL(settingsChanged(int)), TQT_SLOT(slotSettingsChanged(int)));
poll = new ClipboardPoll( this );
- connect( poll, SIGNAL( clipboardChanged( bool ) ),
- this, SLOT( newClipData( bool ) ) );
+ connect( poll, TQT_SIGNAL( clipboardChanged( bool ) ),
+ this, TQT_SLOT( newClipData( bool ) ) );
m_pixmap = KSystemTray::loadSizedIcon( "klipper", width() );
m_iconOrigWidth = width();
@@ -209,13 +209,13 @@ KlipperWidget::KlipperWidget( QWidget *parent, KConfig* config )
globalKeys->updateConnections();
toggleURLGrabAction->setShortcut(globalKeys->shortcut("Enable/Disable Clipboard Actions"));
- connect( toggleURLGrabAction, SIGNAL( toggled( bool )),
- this, SLOT( setURLGrabberEnabled( bool )));
+ connect( toggleURLGrabAction, TQT_SIGNAL( toggled( bool )),
+ this, TQT_SLOT( setURLGrabberEnabled( bool )));
KlipperPopup* popup = history()->popup();
- connect ( history(), SIGNAL( topChanged() ), SLOT( slotHistoryTopChanged() ) );
- connect( popup, SIGNAL( aboutToHide() ), SLOT( slotStartHideTimer() ) );
- connect( popup, SIGNAL( aboutToShow() ), SLOT( slotStartShowTimer() ) );
+ connect ( history(), TQT_SIGNAL( topChanged() ), TQT_SLOT( slotHistoryTopChanged() ) );
+ connect( popup, TQT_SIGNAL( aboutToHide() ), TQT_SLOT( slotStartHideTimer() ) );
+ connect( popup, TQT_SIGNAL( aboutToShow() ), TQT_SLOT( slotStartShowTimer() ) );
popup->plugAction( toggleURLGrabAction );
popup->plugAction( clearHistoryAction );
@@ -224,7 +224,7 @@ KlipperWidget::KlipperWidget( QWidget *parent, KConfig* config )
popup->plugAction( quitAction );
}
- QToolTip::add( this, i18n("Klipper - clipboard tool") );
+ TQToolTip::add( this, i18n("Klipper - clipboard tool") );
}
KlipperWidget::~KlipperWidget()
@@ -244,13 +244,13 @@ void KlipperWidget::adjustSize()
}
// DCOP
-QString KlipperWidget::getClipboardContents()
+TQString KlipperWidget::getClipboardContents()
{
return getClipboardHistoryItem(0);
}
// DCOP - don't call from Klipper itself
-void KlipperWidget::setClipboardContents(QString s)
+void KlipperWidget::setClipboardContents(TQString s)
{
Ignore lock( locklevel );
updateTimestamp();
@@ -276,7 +276,7 @@ void KlipperWidget::clearClipboardHistory()
}
-void KlipperWidget::mousePressEvent(QMouseEvent *e)
+void KlipperWidget::mousePressEvent(TQMouseEvent *e)
{
if ( e->button() != LeftButton && e->button() != RightButton )
return;
@@ -289,12 +289,12 @@ void KlipperWidget::mousePressEvent(QMouseEvent *e)
}
}
-void KlipperWidget::paintEvent(QPaintEvent *)
+void KlipperWidget::paintEvent(TQPaintEvent *)
{
- QPainter p(this);
+ TQPainter p(this);
// Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
if ((m_iconOrigWidth != width()) || (m_iconOrigHeight != height())) {
- QImage newIcon;
+ TQImage newIcon;
m_pixmap = KSystemTray::loadSizedIcon( "klipper", width() );
newIcon = m_pixmap;
newIcon = newIcon.smoothScale(width(), height());
@@ -318,29 +318,29 @@ void KlipperWidget::slotStartShowTimer()
showTimer->start();
}
-void KlipperWidget::showPopupMenu( QPopupMenu *menu )
+void KlipperWidget::showPopupMenu( TQPopupMenu *menu )
{
Q_ASSERT( menu != 0L );
- QSize size = menu->sizeHint(); // geometry is not valid until it's shown
+ TQSize size = menu->sizeHint(); // geometry is not valid until it's shown
if (bPopupAtMouse) {
- QPoint g = QCursor::pos();
+ TQPoint g = TQCursor::pos();
if ( size.height() < g.y() )
- menu->popup(QPoint( g.x(), g.y() - size.height()));
+ menu->popup(TQPoint( g.x(), g.y() - size.height()));
else
- menu->popup(QPoint(g.x(), g.y()));
+ menu->popup(TQPoint(g.x(), g.y()));
} else {
KWin::WindowInfo i = KWin::windowInfo( winId(), NET::WMGeometry );
- QRect g = i.geometry();
- QRect screen = KGlobalSettings::desktopGeometry(g.center());
+ TQRect g = i.geometry();
+ TQRect screen = KGlobalSettings::desktopGeometry(g.center());
if ( g.x()-screen.x() > screen.width()/2 &&
g.y()-screen.y() + size.height() > screen.height() )
- menu->popup(QPoint( g.x(), g.y() - size.height()));
+ menu->popup(TQPoint( g.x(), g.y() - size.height()));
else
- menu->popup(QPoint( g.x() + width(), g.y() + height()));
+ menu->popup(TQPoint( g.x() + width(), g.y() + height()));
- // menu->exec(mapToGlobal(QPoint( width()/2, height()/2 )));
+ // menu->exec(mapToGlobal(TQPoint( width()/2, height()/2 )));
}
}
@@ -348,8 +348,8 @@ bool KlipperWidget::loadHistory() {
static const char* const failed_load_warning =
"Failed to load history resource. Clipboard history cannot be read.";
// don't use "appdata", klipper is also a kicker applet
- QString history_file_name = ::locateLocal( "data", "klipper/history2.lst" );
- QFile history_file( history_file_name );
+ TQString history_file_name = ::locateLocal( "data", "klipper/history2.lst" );
+ TQFile history_file( history_file_name );
bool oldfile = false;
if ( !history_file.exists() ) { // backwards compatibility
oldfile = true;
@@ -367,13 +367,13 @@ bool KlipperWidget::loadHistory() {
kdWarning() << failed_load_warning << ": " << history_file.errorString() << endl;
return false;
}
- QDataStream file_stream( &history_file );
+ TQDataStream file_stream( &history_file );
if( file_stream.atEnd()) {
kdWarning() << failed_load_warning << endl;
return false;
}
- QDataStream* history_stream = &file_stream;
- QByteArray data;
+ TQDataStream* history_stream = &file_stream;
+ TQByteArray data;
if( !oldfile ) {
Q_UINT32 crc;
file_stream >> crc >> data;
@@ -382,7 +382,7 @@ bool KlipperWidget::loadHistory() {
return false;
}
- history_stream = new QDataStream( data, IO_ReadOnly );
+ history_stream = new TQDataStream( data, IO_ReadOnly );
}
char* version;
*history_stream >> version;
@@ -392,7 +392,7 @@ bool KlipperWidget::loadHistory() {
// youngest-first to keep the most important clipboard
// items at the top, but the history is created oldest
// first.
- QPtrList<HistoryItem> reverseList;
+ TQPtrList<HistoryItem> reverseList;
for ( HistoryItem* item = HistoryItem::create( *history_stream );
item;
item = HistoryItem::create( *history_stream ) )
@@ -423,7 +423,7 @@ void KlipperWidget::saveHistory() {
static const char* const failed_save_warning =
"Failed to save history. Clipboard history cannot be saved.";
// don't use "appdata", klipper is also a kicker applet
- QString history_file_name( ::locateLocal( "data", "klipper/history2.lst" ) );
+ TQString history_file_name( ::locateLocal( "data", "klipper/history2.lst" ) );
if ( history_file_name.isNull() || history_file_name.isEmpty() ) {
kdWarning() << failed_save_warning << endl;
return;
@@ -433,8 +433,8 @@ void KlipperWidget::saveHistory() {
kdWarning() << failed_save_warning << endl;
return;
}
- QByteArray data;
- QDataStream history_stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream history_stream( data, IO_WriteOnly );
history_stream << klipper_version; // const char*
for ( const HistoryItem* item = history()->first(); item; item = history()->next() ) {
history_stream << item;
@@ -445,7 +445,7 @@ void KlipperWidget::saveHistory() {
void KlipperWidget::readProperties(KConfig *kc)
{
- QStringList dataList;
+ TQStringList dataList;
history()->slotClear();
@@ -456,7 +456,7 @@ void KlipperWidget::readProperties(KConfig *kc)
KConfigGroupSaver groupSaver(kc, "General");
dataList = kc->readListEntry("ClipboardData");
- for (QStringList::ConstIterator it = dataList.end();
+ for (TQStringList::ConstIterator it = dataList.end();
it != dataList.begin();
)
{
@@ -560,7 +560,7 @@ void KlipperWidget::slotConfigure()
dlg->setSynchronize( bSynchronize );
dlg->setNoActionsFor( myURLGrabber->avoidWindows() );
- if ( dlg->exec() == QDialog::Accepted ) {
+ if ( dlg->exec() == TQDialog::Accepted ) {
bKeepContents = dlg->keepContents();
bPopupAtMouse = dlg->popupAtMousePos();
bReplayActionInHistory = dlg->replayActionInHistory();
@@ -626,10 +626,10 @@ void KlipperWidget::slotRepeatAction()
{
if ( !myURLGrabber ) {
myURLGrabber = new URLGrabber( m_config );
- connect( myURLGrabber, SIGNAL( sigPopup( QPopupMenu * )),
- SLOT( showPopupMenu( QPopupMenu * )) );
- connect( myURLGrabber, SIGNAL( sigDisablePopup() ),
- this, SLOT( disableURLGrabber() ) );
+ connect( myURLGrabber, TQT_SIGNAL( sigPopup( TQPopupMenu * )),
+ TQT_SLOT( showPopupMenu( TQPopupMenu * )) );
+ connect( myURLGrabber, TQT_SIGNAL( sigDisablePopup() ),
+ this, TQT_SLOT( disableURLGrabber() ) );
}
const HistoryStringItem* top = dynamic_cast<const HistoryStringItem*>( history()->first() );
@@ -645,8 +645,8 @@ void KlipperWidget::setURLGrabberEnabled( bool enable )
KConfig *kc = m_config;
kc->setGroup("General");
kc->writeEntry("URLGrabberEnabled", bURLGrabber);
- m_lastURLGrabberTextSelection = QString();
- m_lastURLGrabberTextClipboard = QString();
+ m_lastURLGrabberTextSelection = TQString();
+ m_lastURLGrabberTextClipboard = TQString();
}
toggleURLGrabAction->setChecked( enable );
@@ -661,10 +661,10 @@ void KlipperWidget::setURLGrabberEnabled( bool enable )
toggleURLGrabAction->setText(i18n("&Actions Enabled"));
if ( !myURLGrabber ) {
myURLGrabber = new URLGrabber( m_config );
- connect( myURLGrabber, SIGNAL( sigPopup( QPopupMenu * )),
- SLOT( showPopupMenu( QPopupMenu * )) );
- connect( myURLGrabber, SIGNAL( sigDisablePopup() ),
- this, SLOT( disableURLGrabber() ) );
+ connect( myURLGrabber, TQT_SIGNAL( sigPopup( TQPopupMenu * )),
+ TQT_SLOT( showPopupMenu( TQPopupMenu * )) );
+ connect( myURLGrabber, TQT_SIGNAL( sigDisablePopup() ),
+ this, TQT_SLOT( disableURLGrabber() ) );
}
}
}
@@ -701,17 +701,17 @@ void KlipperWidget::slotClearClipboard()
//XXX: Should die, and the DCOP signal handled sensible.
-QString KlipperWidget::clipboardContents( bool * /*isSelection*/ )
+TQString KlipperWidget::clipboardContents( bool * /*isSelection*/ )
{
kdWarning() << "Obsolete function called. Please fix" << endl;
#if 0
bool selection = true;
- QMimeSource* data = clip->data(QClipboard::Selection);
+ TQMimeSource* data = clip->data(QClipboard::Selection);
if ( data->serialNumber() == m_lastSelection )
{
- QString clipContents = clip->text(QClipboard::Clipboard);
+ TQString clipContents = clip->text(QClipboard::Clipboard);
if ( clipContents != m_lastClipboard )
{
contents = clipContents;
@@ -729,7 +729,7 @@ QString KlipperWidget::clipboardContents( bool * /*isSelection*/ )
return 0;
}
-void KlipperWidget::applyClipChanges( const QMimeSource& clipData )
+void KlipperWidget::applyClipChanges( const TQMimeSource& clipData )
{
if ( locklevel )
return;
@@ -804,7 +804,7 @@ void KlipperWidget::slotCheckPending()
void KlipperWidget::checkClipData( bool selectionMode )
{
- if ( ignoreClipboardChanges() ) // internal to klipper, ignoring QSpinBox selections
+ if ( ignoreClipboardChanges() ) // internal to klipper, ignoring TQSpinBox selections
{
// keep our old clipboard, thanks
// This won't quite work, but it's close enough for now.
@@ -851,7 +851,7 @@ void KlipperWidget::checkClipData( bool selectionMode )
qDebug( " format: %s", format);
}
#endif
- QMimeSource* data = clip->data( selectionMode ? QClipboard::Selection : QClipboard::Clipboard );
+ TQMimeSource* data = clip->data( selectionMode ? QClipboard::Selection : QClipboard::Clipboard );
if ( !data ) {
kdWarning("No data in clipboard. This not not supposed to happen." );
return;
@@ -879,14 +879,14 @@ void KlipperWidget::checkClipData( bool selectionMode )
if ( selectionMode && bIgnoreSelection )
return;
- if( selectionMode && bSelectionTextOnly && !QTextDrag::canDecode( data ))
+ if( selectionMode && bSelectionTextOnly && !TQTextDrag::canDecode( data ))
return;
if( KURLDrag::canDecode( data ))
; // ok
- else if( QTextDrag::canDecode( data ))
+ else if( TQTextDrag::canDecode( data ))
; // ok
- else if( QImageDrag::canDecode( data ))
+ else if( TQImageDrag::canDecode( data ))
{
// Limit mimetypes that are tracked by Klipper (this is basically a workaround
// for #109032). Can't add UI in 3.5 because of string freeze, and I'm not sure
@@ -906,14 +906,14 @@ void KlipperWidget::checkClipData( bool selectionMode )
else
m_lastClipboard = data->serialNumber();
- QString& lastURLGrabberText = selectionMode
+ TQString& lastURLGrabberText = selectionMode
? m_lastURLGrabberTextSelection : m_lastURLGrabberTextClipboard;
- if( QTextDrag::canDecode( data ))
+ if( TQTextDrag::canDecode( data ))
{
if ( bURLGrabber && myURLGrabber )
{
- QString text;
- QTextDrag::decode( data, text );
+ TQString text;
+ TQTextDrag::decode( data, text );
// Make sure URLGrabber doesn't repeat all the time if klipper reads the same
// text all the time (e.g. because XFixes is not available and the application
// has broken TIMESTAMP target). Using most recent history item may not always
@@ -928,10 +928,10 @@ void KlipperWidget::checkClipData( bool selectionMode )
}
}
else
- lastURLGrabberText = QString();
+ lastURLGrabberText = TQString();
}
else
- lastURLGrabberText = QString();
+ lastURLGrabberText = TQString();
if (changed) {
applyClipChanges( *data );
@@ -981,23 +981,23 @@ void KlipperWidget::slotClearOverflow()
m_overflowCounter = 0;
}
-QStringList KlipperWidget::getClipboardHistoryMenu()
+TQStringList KlipperWidget::getClipboardHistoryMenu()
{
- QStringList menu;
+ TQStringList menu;
for ( const HistoryItem* item = history()->first(); item; item = history()->next() ) {
menu << item->text();
}
return menu;
}
-QString KlipperWidget::getClipboardHistoryItem(int i)
+TQString KlipperWidget::getClipboardHistoryItem(int i)
{
for ( const HistoryItem* item = history()->first(); item; item = history()->next() , i-- ) {
if ( i == 0 ) {
return item->text();
}
}
- return QString::null;
+ return TQString::null;
}
@@ -1008,13 +1008,13 @@ QString KlipperWidget::getClipboardHistoryItem(int i)
//
bool KlipperWidget::ignoreClipboardChanges() const
{
- QWidget *focusWidget = qApp->focusWidget();
+ TQWidget *focusWidget = qApp->focusWidget();
if ( focusWidget )
{
- if ( focusWidget->inherits( "QSpinBox" ) ||
+ if ( focusWidget->inherits( "TQSpinBox" ) ||
(focusWidget->parentWidget() &&
- focusWidget->inherits("QLineEdit") &&
- focusWidget->parentWidget()->inherits("QSpinWidget")) )
+ focusWidget->inherits("TQLineEdit") &&
+ focusWidget->parentWidget()->inherits("TQSpinWidget")) )
{
return true;
}
@@ -1030,7 +1030,7 @@ bool KlipperWidget::ignoreClipboardChanges() const
// Therefore, qt_x_time needs to be updated to current X server timestamp.
// Call KApplication::updateUserTime() only from functions that are
-// called from outside (DCOP), or from QTimer timeout !
+// called from outside (DCOP), or from TQTimer timeout !
extern Time qt_x_time;
extern Time qt_x_user_time;
@@ -1076,7 +1076,7 @@ void KlipperWidget::updateTimestamp()
Time& time = ( strcmp( qVersion(), "3.3.1" ) == 0
|| strcmp( qVersion(), "3.3.0" ) == 0 )
? qt_x_user_time : qt_x_time;
- static QWidget* w = 0;
+ static TQWidget* w = 0;
if ( !w )
w = new QWidget;
unsigned char data[ 1 ];
@@ -1140,7 +1140,7 @@ KAboutData* KlipperWidget::aboutData()
return about_data;
}
-Klipper::Klipper( QWidget* parent )
+Klipper::Klipper( TQWidget* parent )
: KlipperWidget( parent, kapp->config())
{
}
diff --git a/klipper/toplevel.h b/klipper/toplevel.h
index 20a6a3027..6f90b4ad8 100644
--- a/klipper/toplevel.h
+++ b/klipper/toplevel.h
@@ -24,10 +24,10 @@
#include <kapplication.h>
#include <kglobalaccel.h>
#include <kpopupmenu.h>
-#include <qmap.h>
-#include <qpixmap.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
#include <dcopobject.h>
-#include <qtimer.h>
+#include <tqtimer.h>
class QClipboard;
class KToggleAction;
@@ -41,21 +41,21 @@ class QMimeSource;
class HistoryItem;
class KlipperSessionManaged;
-class KlipperWidget : public QWidget, public DCOPObject
+class KlipperWidget : public TQWidget, public DCOPObject
{
Q_OBJECT
K_DCOP
k_dcop:
- QString getClipboardContents();
- void setClipboardContents(QString s);
+ TQString getClipboardContents();
+ void setClipboardContents(TQString s);
void clearClipboardContents();
void clearClipboardHistory();
- QStringList getClipboardHistoryMenu();
- QString getClipboardHistoryItem(int i);
+ TQStringList getClipboardHistoryMenu();
+ TQString getClipboardHistoryItem(int i);
public:
- KlipperWidget( QWidget *parent, KConfig* config );
+ KlipperWidget( TQWidget *parent, KConfig* config );
~KlipperWidget();
virtual void adjustSize();
@@ -86,8 +86,8 @@ protected:
*/
enum SelectionMode { Clipboard = 2, Selection = 4 };
- void paintEvent(QPaintEvent *);
- void mousePressEvent(QMouseEvent *);
+ void paintEvent(TQPaintEvent *);
+ void mousePressEvent(TQMouseEvent *);
void readProperties(KConfig *);
void readConfiguration(KConfig *);
@@ -106,9 +106,9 @@ protected:
* @returns the contents of the selection or, if empty, the contents of
* the clipboard.
*/
- QString clipboardContents( bool *isSelection = 0L );
+ TQString clipboardContents( bool *isSelection = 0L );
- void removeFromHistory( const QString& text );
+ void removeFromHistory( const TQString& text );
void setEmptyClipboard();
void clipboardSignalArrived( bool selectionMode );
@@ -122,7 +122,7 @@ protected:
/**
* Enter clipboard data in the history.
*/
- void applyClipChanges( const QMimeSource& data );
+ void applyClipChanges( const TQMimeSource& data );
void setClipboard( const HistoryItem& item, int mode );
bool ignoreClipboardChanges() const;
@@ -132,7 +132,7 @@ protected:
protected slots:
void slotPopupMenu();
- void showPopupMenu( QPopupMenu * );
+ void showPopupMenu( TQPopupMenu * );
void slotRepeatAction();
void setURLGrabberEnabled( bool );
void toggleURLGrabber();
@@ -160,10 +160,10 @@ private:
QClipboard *clip;
- QTime *hideTimer;
- QTime *showTimer;
+ TQTime *hideTimer;
+ TQTime *showTimer;
- QMimeSource* m_lastClipdata;
+ TQMimeSource* m_lastClipdata;
int m_lastClipboard;
int m_lastSelection;
History* m_history;
@@ -172,8 +172,8 @@ private:
KAction* clearHistoryAction;
KAction* configureAction;
KAction* quitAction;
- QPixmap m_pixmap;
- QPixmap m_scaledpixmap;
+ TQPixmap m_pixmap;
+ TQPixmap m_scaledpixmap;
int m_iconOrigWidth;
int m_iconOrigHeight;
bool bPopupAtMouse :1;
@@ -197,11 +197,11 @@ private:
int locklevel;
URLGrabber *myURLGrabber;
- QString m_lastURLGrabberTextSelection;
- QString m_lastURLGrabberTextClipboard;
+ TQString m_lastURLGrabberTextSelection;
+ TQString m_lastURLGrabberTextClipboard;
KConfig* m_config;
- QTimer m_overflowClearTimer;
- QTimer m_pendingCheckTimer;
+ TQTimer m_overflowClearTimer;
+ TQTimer m_pendingCheckTimer;
bool m_pendingContentsCheck;
ClipboardPoll* poll;
static KAboutData* about_data;
@@ -218,7 +218,7 @@ k_dcop:
int newInstance();
void quitProcess(); // not ASYNC
public:
- Klipper( QWidget* parent = NULL );
+ Klipper( TQWidget* parent = NULL );
};
#endif
diff --git a/klipper/urlgrabber.cpp b/klipper/urlgrabber.cpp
index 45d5f5e4b..c814508c1 100644
--- a/klipper/urlgrabber.cpp
+++ b/klipper/urlgrabber.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcursor.h>
-#include <qtimer.h>
+#include <tqcursor.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -61,9 +61,9 @@ URLGrabber::URLGrabber( KConfig* config )
readConfiguration( m_config );
- myPopupKillTimer = new QTimer( this );
- connect( myPopupKillTimer, SIGNAL( timeout() ),
- SLOT( slotKillPopupMenu() ));
+ myPopupKillTimer = new TQTimer( this );
+ connect( myPopupKillTimer, TQT_SIGNAL( timeout() ),
+ TQT_SLOT( slotKillPopupMenu() ));
// testing
/*
@@ -94,7 +94,7 @@ URLGrabber::~URLGrabber()
// Called from Klipper::slotRepeatAction, i.e. by pressing Ctrl-Alt-R
// shortcut. I.e. never from clipboard monitoring
//
-void URLGrabber::invokeAction( const QString& clip )
+void URLGrabber::invokeAction( const TQString& clip )
{
if ( !clip.isEmpty() )
myClipData = clip;
@@ -112,7 +112,7 @@ void URLGrabber::setActionList( ActionList *list )
}
-const ActionList& URLGrabber::matchingActions( const QString& clipData )
+const ActionList& URLGrabber::matchingActions( const TQString& clipData )
{
myMatches.clear();
ClipAction *action = 0L;
@@ -126,7 +126,7 @@ const ActionList& URLGrabber::matchingActions( const QString& clipData )
}
-bool URLGrabber::checkNewData( const QString& clipData )
+bool URLGrabber::checkNewData( const TQString& clipData )
{
// kdDebug() << "** checking new data: " << clipData << endl;
myClipData = clipData;
@@ -157,18 +157,18 @@ void URLGrabber::actionMenu( bool wm_class_check )
if ( wm_class_check && isAvoidedWindow() )
return;
- QString item;
+ TQString item;
myCommandMapper.clear();
myGroupingMapper.clear();
myPopupKillTimer->stop();
delete myMenu;
myMenu = new KPopupMenu;
- connect( myMenu, SIGNAL( activated( int )),
- SLOT( slotItemSelected( int )));
+ connect( myMenu, TQT_SIGNAL( activated( int )),
+ TQT_SLOT( slotItemSelected( int )));
for ( action = it.current(); action; action = ++it ) {
- QPtrListIterator<ClipCommand> it2( action->commands() );
+ TQPtrListIterator<ClipCommand> it2( action->commands() );
if ( it2.count() > 0 )
myMenu->insertTitle( SmallIcon( "klipper" ), action->description() +
i18n(" - Actions For: ") +
@@ -225,7 +225,7 @@ void URLGrabber::slotItemSelected( int id )
break;
default:
ClipCommand *command = myCommandMapper.find( id );
- QStringList *backrefs = myGroupingMapper.find( id );
+ TQStringList *backrefs = myGroupingMapper.find( id );
if ( !command || !backrefs )
qWarning("Klipper: can't find associated action");
else
@@ -235,18 +235,18 @@ void URLGrabber::slotItemSelected( int id )
void URLGrabber::execute( const struct ClipCommand *command,
- QStringList *backrefs) const
+ TQStringList *backrefs) const
{
if ( command->isEnabled ) {
- QMap<QChar,QString> map;
+ TQMap<TQChar,TQString> map;
map.insert( 's', myClipData );
int brCounter = -1;
- QStringList::Iterator it = backrefs->begin();
+ TQStringList::Iterator it = backrefs->begin();
while( it != backrefs->end() ) {
map.insert( char(++brCounter + '0') , *it );
++it;
}
- QString cmdLine = KMacroExpander::expandMacrosShellQuote( command->command, map );
+ TQString cmdLine = KMacroExpander::expandMacrosShellQuote( command->command, map );
if ( cmdLine.isEmpty() )
return;
@@ -277,10 +277,10 @@ void URLGrabber::editData()
dlg->setMainWidget( edit );
dlg->adjustSize();
- if ( dlg->exec() == QDialog::Accepted ) {
+ if ( dlg->exec() == TQDialog::Accepted ) {
myClipData = edit->text();
delete dlg;
- QTimer::singleShot( 0, this, SLOT( slotActionMenu() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotActionMenu() ) );
}
else
{
@@ -299,9 +299,9 @@ void URLGrabber::readConfiguration( KConfig *kc )
myAvoidWindows = kc->readListEntry("No Actions for WM_CLASS");
myPopupKillTimeout = kc->readNumEntry( "Timeout for Action popups (seconds)", 8 );
m_stripWhiteSpace = kc->readBoolEntry("Strip Whitespace before exec", true);
- QString group;
+ TQString group;
for ( int i = 0; i < num; i++ ) {
- group = QString("Action_%1").arg( i );
+ group = TQString("Action_%1").arg( i );
kc->setGroup( group );
myActions->append( new ClipAction( kc ) );
}
@@ -320,9 +320,9 @@ void URLGrabber::writeConfiguration( KConfig *kc )
ClipAction *action;
int i = 0;
- QString group;
+ TQString group;
while ( (action = it.current()) ) {
- group = QString("Action_%1").arg( i );
+ group = TQString("Action_%1").arg( i );
kc->setGroup( group );
action->save( kc );
++i;
@@ -344,7 +344,7 @@ bool URLGrabber::isAvoidedWindow() const
long BUFSIZE = 2048;
bool ret = false;
Window active = 0L;
- QString wmClass;
+ TQString wmClass;
// get the active window
if (XGetWindowProperty(d, DefaultRootWindow( d ), active_window, 0l, 1l,
@@ -364,7 +364,7 @@ bool URLGrabber::isAvoidedWindow() const
&type_ret, &format_ret, &nitems_ret,
&unused, &data_ret ) == Success) {
if ( type_ret == XA_STRING && format_ret == 8 && nitems_ret > 0 ) {
- wmClass = QString::fromUtf8( (const char *) data_ret );
+ wmClass = TQString::fromUtf8( (const char *) data_ret );
ret = (myAvoidWindows.find( wmClass ) != myAvoidWindows.end());
}
@@ -379,7 +379,7 @@ void URLGrabber::slotKillPopupMenu()
{
if ( myMenu && myMenu->isVisible() )
{
- if ( myMenu->geometry().contains( QCursor::pos() ) &&
+ if ( myMenu->geometry().contains( TQCursor::pos() ) &&
myPopupKillTimeout > 0 )
{
myPopupKillTimer->start( 1000 * myPopupKillTimeout, true );
@@ -394,8 +394,8 @@ void URLGrabber::slotKillPopupMenu()
///////////////////////////////////////////////////////////////////////////
////////
-ClipCommand::ClipCommand(const QString &_command, const QString &_description,
- bool _isEnabled, const QString &_icon)
+ClipCommand::ClipCommand(const TQString &_command, const TQString &_description,
+ bool _isEnabled, const TQString &_icon)
: command(_command),
description(_description),
isEnabled(_isEnabled)
@@ -412,12 +412,12 @@ ClipCommand::ClipCommand(const QString &_command, const QString &_description,
if (service)
pixmap = service->icon();
else
- pixmap = QString::null;
+ pixmap = TQString::null;
}
}
-ClipAction::ClipAction( const QString& regExp, const QString& description )
+ClipAction::ClipAction( const TQString& regExp, const TQString& description )
: myRegExp( regExp ), myDescription( description )
{
myCommands.setAutoDelete( true );
@@ -431,7 +431,7 @@ ClipAction::ClipAction( const ClipAction& action )
myDescription = action.myDescription;
ClipCommand *command = 0L;
- QPtrListIterator<ClipCommand> it( myCommands );
+ TQPtrListIterator<ClipCommand> it( myCommands );
for ( ; it.current(); ++it ) {
command = it.current();
addCommand(command->command, command->description, command->isEnabled);
@@ -447,9 +447,9 @@ ClipAction::ClipAction( KConfig *kc )
int num = kc->readNumEntry( "Number of commands" );
// read the commands
- QString actionGroup = kc->group();
+ TQString actionGroup = kc->group();
for ( int i = 0; i < num; i++ ) {
- QString group = actionGroup + "/Command_%1";
+ TQString group = actionGroup + "/Command_%1";
kc->setGroup( group.arg( i ) );
addCommand( kc->readPathEntry( "Commandline" ),
@@ -465,8 +465,8 @@ ClipAction::~ClipAction()
}
-void ClipAction::addCommand( const QString& command,
- const QString& description, bool enabled, const QString& icon )
+void ClipAction::addCommand( const TQString& command,
+ const TQString& description, bool enabled, const TQString& icon )
{
if ( command.isEmpty() )
return;
@@ -484,14 +484,14 @@ void ClipAction::save( KConfig *kc ) const
kc->writeEntry( "Regexp", regExp() );
kc->writeEntry( "Number of commands", myCommands.count() );
- QString actionGroup = kc->group();
+ TQString actionGroup = kc->group();
struct ClipCommand *cmd;
- QPtrListIterator<struct ClipCommand> it( myCommands );
+ TQPtrListIterator<struct ClipCommand> it( myCommands );
// now iterate over all commands of this action
int i = 0;
while ( (cmd = it.current()) ) {
- QString group = actionGroup + "/Command_%1";
+ TQString group = actionGroup + "/Command_%1";
kc->setGroup( group.arg( i ) );
kc->writePathEntry( "Commandline", cmd->command );
diff --git a/klipper/urlgrabber.h b/klipper/urlgrabber.h
index 232455fa0..7841e940a 100644
--- a/klipper/urlgrabber.h
+++ b/klipper/urlgrabber.h
@@ -20,11 +20,11 @@
#ifndef URLGRABBER_H
#define URLGRABBER_H
-#include <qptrlist.h>
-#include <qintdict.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqptrlist.h>
+#include <tqintdict.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kprocess.h>
@@ -36,8 +36,8 @@ class KPopupMenu;
class ClipAction;
struct ClipCommand;
-typedef QPtrList<ClipAction> ActionList;
-typedef QPtrListIterator<ClipAction> ActionListIterator;
+typedef TQPtrList<ClipAction> ActionList;
+typedef TQPtrListIterator<ClipAction> ActionListIterator;
class URLGrabber : public QObject
{
@@ -53,8 +53,8 @@ public:
* @returns false if the string should be put into the popupmenu or not,
* otherwise true.
*/
- bool checkNewData( const QString& clipData );
- void invokeAction( const QString& clip = QString::null );
+ bool checkNewData( const TQString& clipData );
+ void invokeAction( const TQString& clip = TQString::null );
const ActionList * actionList() const { return myActions; }
void setActionList( ActionList * );
@@ -64,29 +64,29 @@ public:
int popupTimeout() const { return myPopupKillTimeout; }
void setPopupTimeout( int timeout ) { myPopupKillTimeout = timeout; }
- const QStringList& avoidWindows() const { return myAvoidWindows; }
- void setAvoidWindows( const QStringList& list ) { myAvoidWindows = list; }
+ const TQStringList& avoidWindows() const { return myAvoidWindows; }
+ void setAvoidWindows( const TQStringList& list ) { myAvoidWindows = list; }
bool stripWhiteSpace() const { return m_stripWhiteSpace; }
void setStripWhiteSpace( bool enable ) { m_stripWhiteSpace = enable; }
private:
- const ActionList& matchingActions( const QString& );
+ const ActionList& matchingActions( const TQString& );
void execute( const struct ClipCommand *command,
- QStringList *backrefs ) const;
+ TQStringList *backrefs ) const;
void editData();
bool isAvoidedWindow() const;
void actionMenu( bool wm_class_check );
ActionList *myActions;
ActionList myMatches;
- QStringList myAvoidWindows;
- QString myClipData;
+ TQStringList myAvoidWindows;
+ TQString myClipData;
ClipAction *myCurrentAction;
- QIntDict<ClipCommand> myCommandMapper;
- QIntDict<QStringList> myGroupingMapper;
+ TQIntDict<ClipCommand> myCommandMapper;
+ TQIntDict<TQStringList> myGroupingMapper;
KPopupMenu *myMenu;
- QTimer *myPopupKillTimer;
+ TQTimer *myPopupKillTimer;
int myPopupKillTimeout;
bool m_stripWhiteSpace;
KConfig* m_config;
@@ -98,7 +98,7 @@ private slots:
signals:
- void sigPopup( QPopupMenu * );
+ void sigPopup( TQPopupMenu * );
void sigDisablePopup();
};
@@ -106,11 +106,11 @@ signals:
struct ClipCommand
{
- ClipCommand( const QString &, const QString &, bool = true, const QString & = "" );
- QString command;
- QString description;
+ ClipCommand( const TQString &, const TQString &, bool = true, const TQString & = "" );
+ TQString command;
+ TQString description;
bool isEnabled;
- QString pixmap;
+ TQString pixmap;
// int id; // the index reflecting the position in the list of commands
};
@@ -122,14 +122,14 @@ struct ClipCommand
class ClipAction
{
public:
- ClipAction( const QString& regExp, const QString& description );
+ ClipAction( const TQString& regExp, const TQString& description );
ClipAction( const ClipAction& );
ClipAction( KConfig *kc );
~ClipAction();
- void setRegExp( const QString& r) { myRegExp = QRegExp( r ); }
- QString regExp() const { return myRegExp.pattern(); }
- inline bool matches( const QString& string ) {
+ void setRegExp( const TQString& r) { myRegExp = TQRegExp( r ); }
+ TQString regExp() const { return myRegExp.pattern(); }
+ inline bool matches( const TQString& string ) {
int res = myRegExp.search( string ) ;
if ( res != -1 ) {
myCapturedTexts = myRegExp.capturedTexts();
@@ -138,16 +138,16 @@ public:
return false;
}
- void setDescription( const QString& d) { myDescription = d; }
- const QString& description() const { return myDescription; }
+ void setDescription( const TQString& d) { myDescription = d; }
+ const TQString& description() const { return myDescription; }
/**
* Removes all ClipCommands associated with this ClipAction.
*/
void clearCommands() { myCommands.clear(); }
- void addCommand( const QString& command, const QString& description, bool, const QString& icon = "" );
- const QPtrList<ClipCommand>& commands() const { return myCommands; }
+ void addCommand( const TQString& command, const TQString& description, bool, const TQString& icon = "" );
+ const TQPtrList<ClipCommand>& commands() const { return myCommands; }
/**
* Saves this action to a a given KConfig object
@@ -158,13 +158,13 @@ public:
* Returns the most recent list of matched group backreferences.
* Note: you probably need to call matches() first.
*/
- inline const QStringList* capturedTexts() const { return &myCapturedTexts; }
+ inline const TQStringList* capturedTexts() const { return &myCapturedTexts; }
private:
- QRegExp myRegExp;
+ TQRegExp myRegExp;
QStringList myCapturedTexts;
- QString myDescription;
- QPtrList<ClipCommand> myCommands;
+ TQString myDescription;
+ TQPtrList<ClipCommand> myCommands;
};