summaryrefslogtreecommitdiffstats
path: root/kbarcode/kactionmap.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-29 00:55:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-29 00:55:34 +0000
commitc4189d200e71c7ef82e9a6e34935ad225154d658 (patch)
treef7f29a1159e0402472ff2ab22617a8113f66263c /kbarcode/kactionmap.cpp
parent2f888b1578e65ec1bc514996eb509fcaf34462d6 (diff)
downloadkbarcode-c4189d200e71c7ef82e9a6e34935ad225154d658.tar.gz
kbarcode-c4189d200e71c7ef82e9a6e34935ad225154d658.zip
TQt4 port kbarcode
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kbarcode@1233956 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbarcode/kactionmap.cpp')
-rw-r--r--kbarcode/kactionmap.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/kbarcode/kactionmap.cpp b/kbarcode/kactionmap.cpp
index 7ef48ce..eb92ade 100644
--- a/kbarcode/kactionmap.cpp
+++ b/kbarcode/kactionmap.cpp
@@ -17,15 +17,15 @@
#include "kactionmap.h"
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qmenubar.h>
-#include <qmenudata.h>
-#include <qpixmap.h>
-#include <qpopupmenu.h>
-#include <qregexp.h>
-#include <qvbox.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqmenubar.h>
+#include <tqmenudata.h>
+#include <tqpixmap.h>
+#include <tqpopupmenu.h>
+#include <tqregexp.h>
+#include <tqvbox.h>
#include <kaction.h>
#include <kapplication.h>
@@ -37,15 +37,15 @@
class KListViewActionItem : public KListViewItem {
public:
- KListViewActionItem( KListView* parent, KAction* action )
- : KListViewItem( parent ), m_action( action )
+ KListViewActionItem( KListView* tqparent, KAction* action )
+ : KListViewItem( tqparent ), m_action( action )
{
- QPixmap pix;
- QSize size = QIconSet::iconSize( QIconSet::Large );
- QIconSet iconset = m_action->iconSet( KIcon::Panel, KIcon::SizeLarge );
- QRegExp regtag( "<[^>]*>" );
+ TQPixmap pix;
+ TQSize size = TQIconSet::iconSize( TQIconSet::Large );
+ TQIconSet iconset = m_action->iconSet( KIcon::Panel, KIcon::SizeLarge );
+ TQRegExp regtag( "<[^>]*>" );
- pix = iconset.pixmap( QIconSet::Large, QIconSet::Normal ); // m_action->isEnabled() ? QIconSet::Normal : QIconSet::Disabled );
+ pix = iconset.pixmap( TQIconSet::Large, TQIconSet::Normal ); // m_action->isEnabled() ? TQIconSet::Normal : TQIconSet::Disabled );
if( pix.isNull() )
{
pix.resize( size );
@@ -62,20 +62,20 @@ public:
setText( 0, m_action->plainText() );
setText( 1, m_action->shortcutText() );
// replace HTML tags in What's this help
- setText( 2, m_action->whatsThis().replace( regtag, "" ) );
+ setText( 2, m_action->whatsThis().tqreplace( regtag, "" ) );
setPixmap( 0, pix );
}
- void paintCell( QPainter *p, const QColorGroup &cg,
- int column, int width, int alignment )
+ void paintCell( TQPainter *p, const TQColorGroup &cg,
+ int column, int width, int tqalignment )
{
- QColorGroup _cg( cg );
- QColor c = _cg.text();
+ TQColorGroup _cg( cg );
+ TQColor c = _cg.text();
if( m_action && !m_action->isEnabled() )
- _cg.setColor( QColorGroup::Text, Qt::gray );
+ _cg.setColor( TQColorGroup::Text, TQt::gray );
- KListViewItem::paintCell( p, _cg, column, width, alignment );
- _cg.setColor( QColorGroup::Text, c );
+ KListViewItem::paintCell( p, _cg, column, width, tqalignment );
+ _cg.setColor( TQColorGroup::Text, c );
}
inline KAction* action() const
@@ -87,12 +87,12 @@ private:
KAction* m_action;
};
-KActionMapDlg::KActionMapDlg( KActionCollection* actions, QWidget* parent, const char* name )
- : KDialogBase( parent, name, false, i18n("Action Map"), KDialogBase::Close, KDialogBase::Close )
+KActionMapDlg::KActionMapDlg( KActionCollection* actions, TQWidget* tqparent, const char* name )
+ : KDialogBase( tqparent, name, false, i18n("Action Map"), KDialogBase::Close, KDialogBase::Close )
{
- QVBox *page = makeVBoxMainWidget();
+ TQVBox *page = makeVBoxMainWidget();
- new QLabel( i18n("Find and execute actions."), page );
+ new TQLabel( i18n("Find and execute actions."), page );
m_map = new KActionMap( actions, page );
show();
@@ -103,10 +103,10 @@ void KActionMapDlg::updateEnabledState()
m_map->updateEnabledState();
}
-KActionMap::KActionMap( KActionCollection* actions, QWidget* parent, const char* name )
- : QWidget( parent, name ), m_actions( actions ), m_showMenuTree( true ), m_grayOutItems( false )
+KActionMap::KActionMap( KActionCollection* actions, TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name ), m_actions( actions ), m_showMenuTree( true ), m_grayOutItems( false )
{
- QVBoxLayout* layout = new QVBoxLayout( this );
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this );
m_listView = new KListView( this );
#if KDE_VERSION >= 0x030500
@@ -116,20 +116,20 @@ KActionMap::KActionMap( KActionCollection* actions, QWidget* parent, const char*
m_listView->addColumn( i18n("Action") );
m_listView->addColumn( i18n("Shortcut") );
m_listView->addColumn( i18n("Description") );
- m_listView->setColumnWidthMode( 0, QListView::Maximum );
- m_listView->setColumnWidthMode( 1, QListView::Maximum );
- m_listView->setColumnWidthMode( 2, QListView::Manual );
+ m_listView->setColumnWidthMode( 0, TQListView::Maximum );
+ m_listView->setColumnWidthMode( 1, TQListView::Maximum );
+ m_listView->setColumnWidthMode( 2, TQListView::Manual );
m_listView->setSorting( 0 );
m_listView->setAllColumnsShowFocus( true );
#if KDE_VERSION >= 0x030500
- layout->addWidget( m_searchLine );
+ tqlayout->addWidget( m_searchLine );
#endif
- layout->addWidget( m_listView );
+ tqlayout->addWidget( m_listView );
- connect( m_listView, SIGNAL( executed( QListViewItem* ) ), this, SLOT( slotExecuteAction( QListViewItem* ) ) );
- connect( actions, SIGNAL( inserted( KAction* ) ), this, SLOT( slotActionCollectionChanged() ) );
- connect( actions, SIGNAL( removed( KAction* ) ), this, SLOT( slotActionCollectionChanged() ) );
+ connect( m_listView, TQT_SIGNAL( executed( TQListViewItem* ) ), this, TQT_SLOT( slotExecuteAction( TQListViewItem* ) ) );
+ connect( actions, TQT_SIGNAL( inserted( KAction* ) ), this, TQT_SLOT( slotActionCollectionChanged() ) );
+ connect( actions, TQT_SIGNAL( removed( KAction* ) ), this, TQT_SLOT( slotActionCollectionChanged() ) );
slotActionCollectionChanged();
}
@@ -161,14 +161,14 @@ void KActionMap::slotActionCollectionChanged()
new KListViewActionItem( m_listView, (*it) );
- connect( *it, SIGNAL( enabled(bool) ), this, SLOT( updateEnabledState() ) );
+ connect( *it, TQT_SIGNAL( enabled(bool) ), this, TQT_SLOT( updateEnabledState() ) );
++it;
}
}
-void KActionMap::slotExecuteAction( QListViewItem* item )
+void KActionMap::slotExecuteAction( TQListViewItem* item )
{
KListViewActionItem* action = dynamic_cast<KListViewActionItem*>(item);
if( !action )
@@ -182,7 +182,7 @@ void KActionMap::slotExecuteAction( QListViewItem* item )
void KActionMap::updateEnabledState()
{
- m_listView->repaintContents();
+ m_listView->tqrepaintContents();
}
#include "kactionmap.moc"