summaryrefslogtreecommitdiffstats
path: root/lib/kofficeui/tkcoloractions.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2013-02-01 15:02:43 -0600
committerTimothy Pearson <[email protected]>2013-02-01 15:02:43 -0600
commitaea627236e4de24599c3e30617cf264c3c1b7d40 (patch)
tree467e13ca5a7eb0ab292259289ecc3572f53c5eae /lib/kofficeui/tkcoloractions.cpp
parent786304c6211f35ddc4cdd54b7aa7985fef4a2e70 (diff)
downloadkoffice-aea627236e4de24599c3e30617cf264c3c1b7d40.tar.gz
koffice-aea627236e4de24599c3e30617cf264c3c1b7d40.zip
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'lib/kofficeui/tkcoloractions.cpp')
-rw-r--r--lib/kofficeui/tkcoloractions.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/lib/kofficeui/tkcoloractions.cpp b/lib/kofficeui/tkcoloractions.cpp
index 11ddbc7f..3e7d6480 100644
--- a/lib/kofficeui/tkcoloractions.cpp
+++ b/lib/kofficeui/tkcoloractions.cpp
@@ -33,7 +33,7 @@
#include <tqapplication.h>
TKColorPopupMenu::TKColorPopupMenu( TQWidget* parent, const char* name )
-: KPopupMenu(parent,name)
+: TDEPopupMenu(parent,name)
{
}
@@ -46,10 +46,10 @@ void TKColorPopupMenu::updateItemSize()
styleChange(style());
}
/****************************************************************************************/
-class TKSelectColorActionPrivate
+class TTDESelectColorActionPrivate
{
public:
- TKSelectColorActionPrivate()
+ TTDESelectColorActionPrivate()
{
}
bool defaultColorMenu;
@@ -57,10 +57,10 @@ public:
};
-TKSelectColorAction::TKSelectColorAction( const TQString& text, Type type, TQObject* parent, const char* name, bool menuDefaultColor )
-: TKAction(parent,name)
+TTDESelectColorAction::TTDESelectColorAction( const TQString& text, Type type, TQObject* parent, const char* name, bool menuDefaultColor )
+: TTDEAction(parent,name)
{
- d=new TKSelectColorActionPrivate();
+ d=new TTDESelectColorActionPrivate();
d->defaultColorMenu=menuDefaultColor;
d->defaultColor=TQColor();
setText(text);
@@ -68,12 +68,12 @@ TKSelectColorAction::TKSelectColorAction( const TQString& text, Type type, TQObj
init();
}
-TKSelectColorAction::TKSelectColorAction( const TQString& text, Type type,
+TTDESelectColorAction::TTDESelectColorAction( const TQString& text, Type type,
TQObject* receiver, const char* slot,
TQObject* parent, const char* name, bool menuDefaultColor)
-: TKAction(parent,name)
+: TTDEAction(parent,name)
{
- d=new TKSelectColorActionPrivate();
+ d=new TTDESelectColorActionPrivate();
d->defaultColorMenu=menuDefaultColor;
d->defaultColor=TQColor();
setText(text);
@@ -82,7 +82,7 @@ TKSelectColorAction::TKSelectColorAction( const TQString& text, Type type,
init();
}
-void TKSelectColorAction::init()
+void TTDESelectColorAction::init()
{
m_pStandardColor = new TKColorPanel();
m_pRecentColor = new TKColorPanel();
@@ -129,40 +129,40 @@ void TKSelectColorAction::init()
connect(m_pRecentColor,TQT_SIGNAL(sizeChanged()),m_pMenu,TQT_SLOT(updateItemSize()));
}
-TKSelectColorAction::~TKSelectColorAction()
+TTDESelectColorAction::~TTDESelectColorAction()
{
delete m_pMenu;
delete d;
}
-void TKSelectColorAction::initToolBarButton(TKToolBarButton* b)
+void TTDESelectColorAction::initToolBarButton(TTDEToolBarButton* b)
{
TQWhatsThis::add( b, whatsThis() );
- TKAction::initToolBarButton(b);
+ TTDEAction::initToolBarButton(b);
b->setDelayedPopup( popupMenu() );
updatePixmap(b);
updatePixmap();
}
-void TKSelectColorAction::defaultColor()
+void TTDESelectColorAction::defaultColor()
{
m_pCurrentColor = d->defaultColor;
emit activated();
}
-void TKSelectColorAction::setDefaultColor(const TQColor &_col)
+void TTDESelectColorAction::setDefaultColor(const TQColor &_col)
{
d->defaultColor=_col;
}
-void TKSelectColorAction::updatePixmap()
+void TTDESelectColorAction::updatePixmap()
{
for( int id = 0; id < containerCount(); ++id ) {
TQWidget* w = container(id);
- if ( w->inherits("KToolBar") ) {
- TQWidget* r = static_cast<KToolBar*>(w)->getWidget(itemId(id));
- if ( r->inherits("TKToolBarButton") ) {
- updatePixmap(static_cast<TKToolBarButton*>(r));
+ if ( w->inherits("TDEToolBar") ) {
+ TQWidget* r = static_cast<TDEToolBar*>(w)->getWidget(itemId(id));
+ if ( r->inherits("TTDEToolBarButton") ) {
+ updatePixmap(static_cast<TTDEToolBarButton*>(r));
}
}
else if(w->inherits(TQPOPUPMENU_OBJECT_NAME_STRING) ) {
@@ -191,7 +191,7 @@ void TKSelectColorAction::updatePixmap()
}
}
-void TKSelectColorAction::updatePixmap(TKToolBarButton* b)
+void TTDESelectColorAction::updatePixmap(TTDEToolBarButton* b)
{
if (!b)
return;
@@ -219,7 +219,7 @@ void TKSelectColorAction::updatePixmap(TKToolBarButton* b)
b->setPixmap(pix);
}
-void TKSelectColorAction::setCurrentColor( const TQColor& color )
+void TTDESelectColorAction::setCurrentColor( const TQColor& color )
{
if ( color == m_pCurrentColor )
return;
@@ -229,12 +229,12 @@ void TKSelectColorAction::setCurrentColor( const TQColor& color )
updatePixmap();
}
-void TKSelectColorAction::setActiveColor( const TQColor& color )
+void TTDESelectColorAction::setActiveColor( const TQColor& color )
{
m_pStandardColor->setActiveColor(color);
}
-void TKSelectColorAction::selectColorDialog()
+void TTDESelectColorAction::selectColorDialog()
{
TQColor c = color();
@@ -260,19 +260,19 @@ void TKSelectColorAction::selectColorDialog()
}
// Called when activating the menu item
-void TKSelectColorAction::slotActivated()
+void TTDESelectColorAction::slotActivated()
{
- //kdDebug() << "TKSelectColorAction::slotActivated" << endl;
+ //kdDebug() << "TTDESelectColorAction::slotActivated" << endl;
selectColorDialog();
}
-void TKSelectColorAction::activate()
+void TTDESelectColorAction::activate()
{
emit colorSelected(m_pCurrentColor);
emit activated();
}
-void TKSelectColorAction::panelColorSelected( const TQColor& color )
+void TTDESelectColorAction::panelColorSelected( const TQColor& color )
{
m_pMenu->hide();
setCurrentColor(color);
@@ -280,7 +280,7 @@ void TKSelectColorAction::panelColorSelected( const TQColor& color )
activate();
}
-void TKSelectColorAction::panelReject()
+void TTDESelectColorAction::panelReject()
{
m_pMenu->hide();
}