summaryrefslogtreecommitdiffstats
path: root/lib/kofficeui/tktoolbarbutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kofficeui/tktoolbarbutton.cpp')
-rw-r--r--lib/kofficeui/tktoolbarbutton.cpp88
1 files changed, 44 insertions, 44 deletions
diff --git a/lib/kofficeui/tktoolbarbutton.cpp b/lib/kofficeui/tktoolbarbutton.cpp
index 92c42c10..c4c8e27b 100644
--- a/lib/kofficeui/tktoolbarbutton.cpp
+++ b/lib/kofficeui/tktoolbarbutton.cpp
@@ -36,10 +36,10 @@
// Delay in ms before delayed popup pops up
#define POPUP_DELAY 500
-class TKToolBarButton::TKToolBarButtonPrivate
+class TTDEToolBarButton::TTDEToolBarButtonPrivate
{
public:
- TKToolBarButtonPrivate()
+ TTDEToolBarButtonPrivate()
{
m_iconMode = TK::IconOnly;
m_isPopup = false;
@@ -61,7 +61,7 @@ public:
m_instance = TDEGlobal::instance();
}
- ~TKToolBarButtonPrivate()
+ ~TTDEToolBarButtonPrivate()
{
delete m_delayTimer;
m_delayTimer = 0;
@@ -88,12 +88,12 @@ public:
TDEInstance *m_instance;
};
-TKToolBarButton::TKToolBarButton( const TQString& icon, const TQString& txt,
+TTDEToolBarButton::TTDEToolBarButton( const TQString& icon, const TQString& txt,
TQWidget* parent, const char* name,
TDEInstance *instance )
: TQToolButton(parent,name)
{
- d = new TKToolBarButtonPrivate;
+ d = new TTDEToolBarButtonPrivate;
d->m_text = txt;
d->m_instance = instance;
@@ -109,10 +109,10 @@ TKToolBarButton::TKToolBarButton( const TQString& icon, const TQString& txt,
modeChange();
}
-TKToolBarButton::TKToolBarButton( const TQPixmap& pixmap, const TQString& txt, TQWidget* parent, const char* name )
+TTDEToolBarButton::TTDEToolBarButton( const TQPixmap& pixmap, const TQString& txt, TQWidget* parent, const char* name )
: TQToolButton(parent,name )
{
- d = new TKToolBarButtonPrivate;
+ d = new TTDEToolBarButtonPrivate;
d->m_text = txt;
setFocusPolicy( TQ_NoFocus );
@@ -127,17 +127,17 @@ TKToolBarButton::TKToolBarButton( const TQPixmap& pixmap, const TQString& txt, T
modeChange();
}
-TKToolBarButton::~TKToolBarButton()
+TTDEToolBarButton::~TTDEToolBarButton()
{
delete d;
}
-TQString TKToolBarButton::text()
+TQString TTDEToolBarButton::text()
{
return d->m_text;
}
-void TKToolBarButton::modeChange()
+void TTDEToolBarButton::modeChange()
{
TQToolTip::add(this,d->m_text);
@@ -170,7 +170,7 @@ void TKToolBarButton::modeChange()
updateGeometry();
}
-void TKToolBarButton::setEnabled( bool enabled )
+void TTDEToolBarButton::setEnabled( bool enabled )
{
if (isEnabled()==enabled)
return;
@@ -179,13 +179,13 @@ void TKToolBarButton::setEnabled( bool enabled )
TQToolButton::setEnabled( enabled );
}
-void TKToolBarButton::setText( const TQString& text)
+void TTDEToolBarButton::setText( const TQString& text)
{
d->m_text = text;
repaint(false);
}
-void TKToolBarButton::setIcon( const TQString& icon )
+void TTDEToolBarButton::setIcon( const TQString& icon )
{
d->m_iconName = icon;
int iconSize = 16;
@@ -195,31 +195,31 @@ void TKToolBarButton::setIcon( const TQString& icon )
setDefaultPixmap( BarIcon(icon, iconSize, KIcon::DefaultState, d->m_instance) );
}
-void TKToolBarButton::setDisabledIcon( const TQString &icon )
+void TTDEToolBarButton::setDisabledIcon( const TQString &icon )
{
d->m_disabledIconName = icon;
int iconSize = 16;
setDisabledPixmap( BarIcon(icon, iconSize, KIcon::DisabledState, d->m_instance) );
}
-void TKToolBarButton::setDefaultIcon( const TQString &icon )
+void TTDEToolBarButton::setDefaultIcon( const TQString &icon )
{
d->m_defaultIconName = icon;
int iconSize = 16;
setDefaultPixmap( BarIcon(icon, iconSize, KIcon::DefaultState, d->m_instance) );
}
-TQPixmap TKToolBarButton::getActivePixmap() const
+TQPixmap TTDEToolBarButton::getActivePixmap() const
{
return activePixmap;
}
-void TKToolBarButton::setPixmap( const TQPixmap &pixmap )
+void TTDEToolBarButton::setPixmap( const TQPixmap &pixmap )
{
setPixmap( pixmap, true );
}
-void TKToolBarButton::setPixmap( const TQPixmap &pixmap, bool generate )
+void TTDEToolBarButton::setPixmap( const TQPixmap &pixmap, bool generate )
{
activePixmap = pixmap;
@@ -239,19 +239,19 @@ void TKToolBarButton::setPixmap( const TQPixmap &pixmap, bool generate )
TQToolButton::setPixmap( isEnabled() ? defaultPixmap : disabledPixmap );
}
-void TKToolBarButton::setDefaultPixmap( const TQPixmap &pixmap )
+void TTDEToolBarButton::setDefaultPixmap( const TQPixmap &pixmap )
{
defaultPixmap = pixmap;
TQToolButton::setPixmap( isEnabled() ? defaultPixmap : disabledPixmap );
}
-void TKToolBarButton::setDisabledPixmap( const TQPixmap &pixmap )
+void TTDEToolBarButton::setDisabledPixmap( const TQPixmap &pixmap )
{
disabledPixmap = pixmap;
TQToolButton::setPixmap( isEnabled() ? defaultPixmap : disabledPixmap );
}
-void TKToolBarButton::setPopup(TQPopupMenu *p)
+void TTDEToolBarButton::setPopup(TQPopupMenu *p)
{
d->m_popup = p;
d->m_popup->setFont(TDEGlobalSettings::toolBarFont());
@@ -260,12 +260,12 @@ void TKToolBarButton::setPopup(TQPopupMenu *p)
modeChange();
}
-TQPopupMenu *TKToolBarButton::popup()
+TQPopupMenu *TTDEToolBarButton::popup()
{
return d->m_popup;
}
-void TKToolBarButton::setDelayedPopup (TQPopupMenu *p, bool toggle )
+void TTDEToolBarButton::setDelayedPopup (TQPopupMenu *p, bool toggle )
{
d->m_isPopup = true;
setToggle(toggle);
@@ -278,18 +278,18 @@ void TKToolBarButton::setDelayedPopup (TQPopupMenu *p, bool toggle )
setPopup(p);
}
-void TKToolBarButton::setRaised(bool f)
+void TTDEToolBarButton::setRaised(bool f)
{
d->m_isRaised = f;
repaint(false);
}
-void TKToolBarButton::setAutoRaised(bool f)
+void TTDEToolBarButton::setAutoRaised(bool f)
{
d->m_autoRaised = f;
}
-void TKToolBarButton::leaveEvent(TQEvent *)
+void TTDEToolBarButton::leaveEvent(TQEvent *)
{
if (!d->m_isToggle && !(d->m_popup && d->m_popup->isVisible()) ) {
TQToolButton::setPixmap(isEnabled() ? defaultPixmap : disabledPixmap);
@@ -298,7 +298,7 @@ void TKToolBarButton::leaveEvent(TQEvent *)
}
}
-void TKToolBarButton::enterEvent(TQEvent *)
+void TTDEToolBarButton::enterEvent(TQEvent *)
{
if (!d->m_isToggle) {
if (isEnabled()) {
@@ -312,7 +312,7 @@ void TKToolBarButton::enterEvent(TQEvent *)
}
}
-bool TKToolBarButton::eventFilter(TQObject *o, TQEvent *ev)
+bool TTDEToolBarButton::eventFilter(TQObject *o, TQEvent *ev)
{
if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) )
if (ev->type() == TQEvent::MouseButtonPress && d->m_popup && d->m_isPopup ) {
@@ -348,7 +348,7 @@ bool TKToolBarButton::eventFilter(TQObject *o, TQEvent *ev)
return false;
}
-void TKToolBarButton::drawButton( TQPainter* p )
+void TTDEToolBarButton::drawButton( TQPainter* p )
{
#define DRAW_PIXMAP_AND_TEXT \
int x = 3;\
@@ -402,7 +402,7 @@ void TKToolBarButton::drawButton( TQPainter* p )
}
}
-void TKToolBarButton::paletteChange(const TQPalette &)
+void TTDEToolBarButton::paletteChange(const TQPalette &)
{
makeDisabledPixmap();
if ( !isEnabled() )
@@ -412,7 +412,7 @@ void TKToolBarButton::paletteChange(const TQPalette &)
repaint(false);
}
-void TKToolBarButton::makeDefaultPixmap()
+void TTDEToolBarButton::makeDefaultPixmap()
{
if (activePixmap.isNull())
return;
@@ -421,7 +421,7 @@ void TKToolBarButton::makeDefaultPixmap()
defaultPixmap = effect.apply(activePixmap, KIcon::Toolbar, KIcon::DefaultState);
}
-void TKToolBarButton::makeDisabledPixmap()
+void TTDEToolBarButton::makeDisabledPixmap()
{
if (activePixmap.isNull())
return;
@@ -430,17 +430,17 @@ void TKToolBarButton::makeDisabledPixmap()
disabledPixmap = effect.apply(activePixmap, KIcon::Toolbar, KIcon::DisabledState);
}
-TQSize TKToolBarButton::sizeHint() const
+TQSize TTDEToolBarButton::sizeHint() const
{
return minimumSize();
}
-TQSize TKToolBarButton::minimumSizeHint() const
+TQSize TTDEToolBarButton::minimumSizeHint() const
{
return minimumSize();
}
-void TKToolBarButton::showMenu()
+void TTDEToolBarButton::showMenu()
{
TQPoint p ( mapToGlobal( TQPoint( 0, 0 ) ) );
const int deskHeight = TDEGlobalSettings::desktopGeometry(this).height();
@@ -452,13 +452,13 @@ void TKToolBarButton::showMenu()
d->m_popup->popup(p);
}
-void TKToolBarButton::slotDelayTimeout()
+void TTDEToolBarButton::slotDelayTimeout()
{
d->m_delayTimer->stop();
showMenu();
}
-void TKToolBarButton::slotClicked()
+void TTDEToolBarButton::slotClicked()
{
if ( d->ignoreNextMousePress ) {
d->ignoreNextMousePress=false;
@@ -471,7 +471,7 @@ void TKToolBarButton::slotClicked()
emit buttonClicked();
}
-void TKToolBarButton::slotPressed()
+void TTDEToolBarButton::slotPressed()
{
if ( d->ignoreNextMousePress )
return;
@@ -486,7 +486,7 @@ void TKToolBarButton::slotPressed()
d->ignoreNextMousePress = false;
}
-void TKToolBarButton::slotReleased()
+void TTDEToolBarButton::slotReleased()
{
if (d->m_popup && d->m_isPopup)
d->m_delayTimer->stop();
@@ -494,23 +494,23 @@ void TKToolBarButton::slotReleased()
emit buttonReleased();
}
-void TKToolBarButton::slotToggled()
+void TTDEToolBarButton::slotToggled()
{
emit buttonToggled();
}
-void TKToolBarButton::on(bool flag)
+void TTDEToolBarButton::on(bool flag)
{
d->m_isOn = flag;
repaint();
}
-void TKToolBarButton::toggle()
+void TTDEToolBarButton::toggle()
{
on(!d->m_isOn);
}
-void TKToolBarButton::setToggle(bool flag)
+void TTDEToolBarButton::setToggle(bool flag)
{
d->m_isToggle = flag;
if (flag == true)
@@ -522,7 +522,7 @@ void TKToolBarButton::setToggle(bool flag)
repaint();
}
-void TKToolBarButton::setIconMode( TK::IconMode m )
+void TTDEToolBarButton::setIconMode( TK::IconMode m )
{
d->m_iconMode = m;
modeChange();