summaryrefslogtreecommitdiffstats
path: root/lib/kofficeui/kcoloractions.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/kofficeui/kcoloractions.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/kofficeui/kcoloractions.cpp')
-rw-r--r--lib/kofficeui/kcoloractions.cpp104
1 files changed, 52 insertions, 52 deletions
diff --git a/lib/kofficeui/kcoloractions.cpp b/lib/kofficeui/kcoloractions.cpp
index a2d707d4..a0f514e2 100644
--- a/lib/kofficeui/kcoloractions.cpp
+++ b/lib/kofficeui/kcoloractions.cpp
@@ -19,57 +19,57 @@
#include <kcoloractions.h>
-#include <qpopupmenu.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
+#include <tqpopupmenu.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
#include <kapplication.h>
#include <ktoolbar.h>
#include <ktoolbarbutton.h>
#include <kdebug.h>
-KColorAction::KColorAction( const QString& text, int accel,
- QObject* parent, const char* name )
- : KAction( text, accel, parent, name )
+KColorAction::KColorAction( const TQString& text, int accel,
+ TQObject* tqparent, const char* name )
+ : KAction( text, accel, tqparent, name )
{
typ = TextColor;
init();
}
-KColorAction::KColorAction( const QString& text, int accel,
- QObject* receiver, const char* slot, QObject* parent,
+KColorAction::KColorAction( const TQString& text, int accel,
+ TQObject* receiver, const char* slot, TQObject* tqparent,
const char* name )
- : KAction( text, accel, receiver, slot, parent, name )
+ : KAction( text, accel, receiver, slot, tqparent, name )
{
typ = TextColor;
init();
}
-KColorAction::KColorAction( const QString& text, Type type, int accel,
- QObject* parent, const char* name )
- : KAction( text, accel, parent, name )
+KColorAction::KColorAction( const TQString& text, Type type, int accel,
+ TQObject* tqparent, const char* name )
+ : KAction( text, accel, tqparent, name )
{
typ = type;
init();
}
-KColorAction::KColorAction( const QString& text, Type type, int accel,
- QObject* receiver, const char* slot, QObject* parent,
+KColorAction::KColorAction( const TQString& text, Type type, int accel,
+ TQObject* receiver, const char* slot, TQObject* tqparent,
const char* name )
- : KAction( text, accel, receiver, slot, parent, name )
+ : KAction( text, accel, receiver, slot, tqparent, name )
{
typ = type;
init();
}
-KColorAction::KColorAction( QObject* parent, const char* name )
- : KAction( parent, name )
+KColorAction::KColorAction( TQObject* tqparent, const char* name )
+ : KAction( tqparent, name )
{
typ = TextColor;
init();
}
-void KColorAction::setColor( const QColor &c )
+void KColorAction::setColor( const TQColor &c )
{
if ( c == col )
return;
@@ -78,7 +78,7 @@ void KColorAction::setColor( const QColor &c )
createPixmap();
}
-QColor KColorAction::color() const
+TQColor KColorAction::color() const
{
return col;
}
@@ -99,15 +99,15 @@ KColorAction::Type KColorAction::type() const
void KColorAction::init()
{
- col = Qt::black;
+ col = TQt::black;
createPixmap();
}
void KColorAction::createPixmap()
{
int r, g, b;
- QCString pix;
- QCString line;
+ TQCString pix;
+ TQCString line;
col.rgb( &r, &g, &b );
@@ -211,16 +211,16 @@ void KColorAction::createPixmap()
} break;
}
- QPixmap pixmap( pix );
- setIconSet( QIconSet( pixmap ) );
+ TQPixmap pixmap( pix );
+ setIconSet( TQIconSet( pixmap ) );
}
-KSelectColorAction::KSelectColorAction( const QString& text, Type type,
- const QObject* receiver, const char* slot,
- KActionCollection* parent, const char* name ) :
- KAction( text, KShortcut(), receiver, slot, parent, name ), m_type( type ),
- m_color( Qt::black )
+KSelectColorAction::KSelectColorAction( const TQString& text, Type type,
+ const TQObject* receiver, const char* slot,
+ KActionCollection* tqparent, const char* name ) :
+ KAction( text, KShortcut(), receiver, slot, tqparent, name ), m_type( type ),
+ m_color( TQt::black )
{
}
@@ -228,7 +228,7 @@ KSelectColorAction::~KSelectColorAction()
{
}
-int KSelectColorAction::plug( QWidget* w, int index )
+int KSelectColorAction::plug( TQWidget* w, int index )
{
if (w == 0) {
kdWarning() << "KSelectColorAction::plug called with 0 argument\n";
@@ -237,25 +237,25 @@ int KSelectColorAction::plug( QWidget* w, int index )
if (kapp && !kapp->authorizeKAction(name()))
return -1;
- if ( w->inherits("QPopupMenu") )
+ if ( w->inherits(TQPOPUPMENU_OBJECT_NAME_STRING) )
{
- QPopupMenu* menu = static_cast<QPopupMenu*>( w );
+ TQPopupMenu* menu = static_cast<TQPopupMenu*>( w );
int id;
if ( hasIcon() )
{
/* ###### CHECK: We're not allowed to specify the instance in iconSet()
KInstance *instance;
- if ( parentCollection() )
- instance = parentCollection()->instance();
+ if ( tqparentCollection() )
+ instance = tqparentCollection()->instance();
else
instance = KGlobal::instance();
*/
id = menu->insertItem( iconSet( KIcon::Small, 0 ), text(), this,//dsweet
- SLOT( slotActivated() ), 0, -1, index );
+ TQT_SLOT( slotActivated() ), 0, -1, index );
}
else
- id = menu->insertItem( text(), this, SLOT( slotActivated() ), //dsweet
+ id = menu->insertItem( text(), this, TQT_SLOT( slotActivated() ), //dsweet
0, -1, index );
updateShortcut( menu, id );
@@ -266,10 +266,10 @@ int KSelectColorAction::plug( QWidget* w, int index )
menu->setItemEnabled( id, false );
if ( !whatsThis().isEmpty() )
- menu->setWhatsThis( id, whatsThisWithIcon() );
+ menu->tqsetWhatsThis( id, whatsThisWithIcon() );
addContainer( menu, id );
- connect( menu, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( menu, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
if ( parentCollection() )
parentCollection()->connectHighlight( menu, this );
@@ -287,28 +287,28 @@ int KSelectColorAction::plug( QWidget* w, int index )
else
instance = KGlobal::instance();
- if ( icon().isEmpty() ) // old code using QIconSet directly
+ if ( icon().isEmpty() ) // old code using TQIconSet directly
{
- bar->insertButton( iconSet( KIcon::Small ).pixmap(), id_, SIGNAL( clicked() ), this,
- SLOT( slotActivated() ),
+ bar->insertButton( iconSet( KIcon::Small ).pixmap(), id_, TQT_SIGNAL( clicked() ), this,
+ TQT_SLOT( slotActivated() ),
isEnabled(), plainText(), index );
}
else
- bar->insertButton( icon(), id_, SIGNAL( clicked() ), this,
- SLOT( slotActivated() ),
+ bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this,
+ TQT_SLOT( slotActivated() ),
isEnabled(), plainText(), index, instance );
- bar->getButton( id_ )->setName( QCString("toolbutton_")+name() );
+ bar->getButton( id_ )->setName( TQCString("toolbutton_")+name() );
if ( !whatsThis().isEmpty() )
- QWhatsThis::add( bar->getButton(id_), whatsThisWithIcon() );
+ TQWhatsThis::add( bar->getButton(id_), whatsThisWithIcon() );
if ( !toolTip().isEmpty() )
- QToolTip::add( bar->getButton(id_), toolTip() );
+ TQToolTip::add( bar->getButton(id_), toolTip() );
addContainer( bar, id_ );
- connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) );
+ connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) );
if ( parentCollection() )
parentCollection()->connectHighlight( bar, this );
@@ -319,7 +319,7 @@ int KSelectColorAction::plug( QWidget* w, int index )
return -1;
}
-QColor KSelectColorAction::color() const
+TQColor KSelectColorAction::color() const
{
return m_color;
}
@@ -329,7 +329,7 @@ KSelectColorAction::Type KSelectColorAction::type() const
return m_type;
}
-void KSelectColorAction::setColor( const QColor &/*c*/ )
+void KSelectColorAction::setColor( const TQColor &/*c*/ )
{
}
@@ -337,11 +337,11 @@ void KSelectColorAction::setType( Type /*t*/ )
{
}
-QString KSelectColorAction::whatsThisWithIcon() const
+TQString KSelectColorAction::whatsThisWithIcon() const
{
- QString text = whatsThis();
+ TQString text = whatsThis();
if (!icon().isEmpty())
- return QString::fromLatin1("<img source=\"small|%1\"> %2").arg(icon()).arg(text);
+ return TQString::tqfromLatin1("<img source=\"small|%1\"> %2").tqarg(icon()).tqarg(text);
return text;
}