summaryrefslogtreecommitdiffstats
path: root/lib/kofficeui/tkaction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kofficeui/tkaction.cpp')
-rw-r--r--lib/kofficeui/tkaction.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/lib/kofficeui/tkaction.cpp b/lib/kofficeui/tkaction.cpp
index 7ab01d3f..56c626f8 100644
--- a/lib/kofficeui/tkaction.cpp
+++ b/lib/kofficeui/tkaction.cpp
@@ -30,8 +30,8 @@
#define SET_FOR_ALL_CONTAINER(WIDGET_TYPE,METHOD_NAME,VALUE) \
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 ( w->inherits("TDEToolBar") ) { \
+ TQWidget* r = static_cast<TDEToolBar*>(w)->getWidget(itemId(id)); \
if (qstrcmp(r->name(),"KTToolBarLayout")==0) \
r = (TQWidget*)r->child("widget"); \
if ( r && r->inherits(#WIDGET_TYPE) ) { \
@@ -41,21 +41,21 @@
} \
}
-TKAction::TKAction(TQObject* parent, const char* name)
-: KAction( "", 0, parent, name )
+TTDEAction::TTDEAction(TQObject* parent, const char* name)
+: TDEAction( "", 0, parent, name )
{
m_imode = TK::IconOnly;
}
-TKAction::~TKAction()
+TTDEAction::~TTDEAction()
{
}
-int TKAction::plug(TQWidget* widget, int index)
+int TTDEAction::plug(TQWidget* widget, int index)
{
- if ( widget->inherits("KToolBar") ) {
- KToolBar* bar = static_cast<KToolBar*>(widget);
- int id_ = KAction::getToolButtonID();
+ if ( widget->inherits("TDEToolBar") ) {
+ TDEToolBar* bar = static_cast<TDEToolBar*>(widget);
+ int id_ = TDEAction::getToolButtonID();
TDEInstance *instance;
if ( parentCollection() )
@@ -63,7 +63,7 @@ int TKAction::plug(TQWidget* widget, int index)
else
instance = TDEGlobal::instance();
- TKToolBarButton* b = new TKToolBarButton(icon(),plainText(),bar,name(),instance);
+ TTDEToolBarButton* b = new TTDEToolBarButton(icon(),plainText(),bar,name(),instance);
// we don't need clicked() and buttonClicked(), do we?
// connect(b,TQT_SIGNAL(clicked()),TQT_SLOT(slotActivated()));
b->setIconMode(m_imode);
@@ -75,44 +75,44 @@ int TKAction::plug(TQWidget* widget, int index)
return containerCount() - 1;
}
- return KAction::plug(widget,index);
+ return TDEAction::plug(widget,index);
}
-void TKAction::initToolBarButton(TKToolBarButton* button)
+void TTDEAction::initToolBarButton(TTDEToolBarButton* button)
{
connect(button,TQT_SIGNAL(buttonClicked()),TQT_SLOT(slotActivated()));
}
-TK::IconMode TKAction::iconMode()
+TK::IconMode TTDEAction::iconMode()
{
return m_imode;
}
-void TKAction::setIconMode(TK::IconMode mode)
+void TTDEAction::setIconMode(TK::IconMode mode)
{
m_imode = mode;
- SET_FOR_ALL_CONTAINER(TKToolBarButton,setIconMode,mode)
+ SET_FOR_ALL_CONTAINER(TTDEToolBarButton,setIconMode,mode)
}
-void TKAction::setText(const TQString& text)
+void TTDEAction::setText(const TQString& text)
{
- KAction::setText(text);
+ TDEAction::setText(text);
updateLayout();
}
-void TKAction::setIcon(const TQString& icon)
+void TTDEAction::setIcon(const TQString& icon)
{
- KAction::setIcon(icon);
+ TDEAction::setIcon(icon);
updateLayout();
}
-void TKAction::updateLayout()
+void TTDEAction::updateLayout()
{
int len = containerCount();
for( int id = 0; id < len; ++id ) {
TQWidget* w = container( id );
- if (w->inherits("KToolBar")) {
- TQWidget* r = static_cast<KToolBar*>(w)->getWidget(itemId(id));
+ if (w->inherits("TDEToolBar")) {
+ TQWidget* r = static_cast<TDEToolBar*>(w)->getWidget(itemId(id));
if (qstrcmp(r->name(),"KTToolBarLayout")==0) {
updateLayout(r);
}
@@ -120,7 +120,7 @@ void TKAction::updateLayout()
}
}
-TQWidget* TKAction::createLayout(TQWidget* parent, TQWidget* children)
+TQWidget* TTDEAction::createLayout(TQWidget* parent, TQWidget* children)
{
TQWidget* base = new TQWidget(parent,"KTToolBarLayout");
TQLabel* textLabel = new TQLabel(base,"text");
@@ -138,7 +138,7 @@ TQWidget* TKAction::createLayout(TQWidget* parent, TQWidget* children)
return base;
}
-void TKAction::updateLayout(TQWidget* base)
+void TTDEAction::updateLayout(TQWidget* base)
{
TQLabel* textLabel = (TQLabel*)base->child("text");
TQLabel* pixLabel = (TQLabel*)base->child("pixmap");
@@ -172,7 +172,7 @@ void TKAction::updateLayout(TQWidget* base)
}
/******************************************************************************/
TKBaseSelectAction::TKBaseSelectAction( TQObject* parent, const char* name )
-: TKAction(parent,name)
+: TTDEAction(parent,name)
{
m_current = 0;
m_editable = false;
@@ -184,10 +184,10 @@ TKBaseSelectAction::~TKBaseSelectAction()
int TKBaseSelectAction::plug(TQWidget* widget, int index)
{
- if ( widget->inherits("KToolBar") )
+ if ( widget->inherits("TDEToolBar") )
{
- KToolBar* bar = static_cast<KToolBar*>( widget );
- int id_ = KAction::getToolButtonID();
+ TDEToolBar* bar = static_cast<TDEToolBar*>( widget );
+ int id_ = TDEAction::getToolButtonID();
TKComboBox* cb = new TKComboBox(m_editable,bar);
initComboBox(cb);
@@ -248,28 +248,28 @@ void TKBaseSelectAction::activate(int id)
emit activated(id);
}
/******************************************************************************/
-TKSelectAction::TKSelectAction( TQObject* parent, const char* name )
+TTDESelectAction::TTDESelectAction( TQObject* parent, const char* name )
: TKBaseSelectAction(parent,name)
{
}
-TKSelectAction::~TKSelectAction()
+TTDESelectAction::~TTDESelectAction()
{
}
-void TKSelectAction::initComboBox(TKComboBox* cb)
+void TTDESelectAction::initComboBox(TKComboBox* cb)
{
TKBaseSelectAction::initComboBox(cb);
connect(cb,TQT_SIGNAL(activated(const TQString&)),TQT_SLOT(slotActivated(const TQString&)));
cb->insertStringList(items());
}
-void TKSelectAction::slotActivated(const TQString& text)
+void TTDESelectAction::slotActivated(const TQString& text)
{
emit activated(text);
}
-void TKSelectAction::setItems(const TQStringList& lst )
+void TTDESelectAction::setItems(const TQStringList& lst )
{
m_list = lst;
m_current = -1;
@@ -281,17 +281,17 @@ void TKSelectAction::setItems(const TQStringList& lst )
setEnabled ( lst.count() > 0 || m_editable );
}
-TQStringList TKSelectAction::items() const
+TQStringList TTDESelectAction::items() const
{
return m_list;
}
-void TKSelectAction::clear()
+void TTDESelectAction::clear()
{
SET_FOR_ALL_CONTAINER(TKComboBox,clear, )
}
-void TKSelectAction::setEditText(const TQString& text)
+void TTDESelectAction::setEditText(const TQString& text)
{
SET_FOR_ALL_CONTAINER(TKComboBox,setEditText,text)
}