summaryrefslogtreecommitdiffstats
path: root/kwin-styles/glow
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:27:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:27:15 +0000
commitb5d38fd2e94066885d4620b0c35c48a2faa5aa44 (patch)
tree7e7e611e0e3ef23dc2efd327a7455bcf4d7c9b7f /kwin-styles/glow
parent019ebb9a949a97c898e5d563f0699a3ff49e6588 (diff)
downloadtdeartwork-b5d38fd2e94066885d4620b0c35c48a2faa5aa44.tar.gz
tdeartwork-b5d38fd2e94066885d4620b0c35c48a2faa5aa44.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeartwork@1157637 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kwin-styles/glow')
-rw-r--r--kwin-styles/glow/config/glowconfigdialog.cpp160
-rw-r--r--kwin-styles/glow/config/glowconfigdialog.h38
-rw-r--r--kwin-styles/glow/glowbutton.cpp118
-rw-r--r--kwin-styles/glow/glowbutton.h52
-rw-r--r--kwin-styles/glow/glowclient.cpp230
-rw-r--r--kwin-styles/glow/glowclient.h86
6 files changed, 342 insertions, 342 deletions
diff --git a/kwin-styles/glow/config/glowconfigdialog.cpp b/kwin-styles/glow/config/glowconfigdialog.cpp
index 41144c8a..ab0cd40d 100644
--- a/kwin-styles/glow/config/glowconfigdialog.cpp
+++ b/kwin-styles/glow/config/glowconfigdialog.cpp
@@ -15,19 +15,19 @@
* *
***************************************************************************/
-#include <qbitmap.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qsignalmapper.h>
-#include <qstringlist.h>
+#include <tqbitmap.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqsignalmapper.h>
+#include <tqstringlist.h>
#include <kconfig.h>
#include <kcolorbutton.h>
#include <kdebug.h>
@@ -45,129 +45,129 @@
extern "C"
{
- KDE_EXPORT QObject* allocate_config( KConfig* conf, QWidget* parent )
+ KDE_EXPORT TQObject* allocate_config( KConfig* conf, TQWidget* parent )
{
return(new GlowConfigDialog(conf, parent));
}
}
-GlowConfigDialog::GlowConfigDialog( KConfig * conf, QWidget * parent )
- : QObject(parent)
+GlowConfigDialog::GlowConfigDialog( KConfig * conf, TQWidget * parent )
+ : TQObject(parent)
{
_glowConfig = new KConfig("kwinglowrc");
KGlobal::locale()->insertCatalogue("kwin_glow_config");
- _main_group_box = new QWidget(parent);
- QVBoxLayout *main_group_boxLayout = new QVBoxLayout(_main_group_box);
+ _main_group_box = new TQWidget(parent);
+ TQVBoxLayout *main_group_boxLayout = new TQVBoxLayout(_main_group_box);
main_group_boxLayout->setAlignment(Qt::AlignTop | Qt::AlignLeft);
main_group_boxLayout->setSpacing(6);
//-------------------------------------------------------------------------
// themes
- _theme_list_view = new QListView (_main_group_box, "theme_list_view");
+ _theme_list_view = new TQListView (_main_group_box, "theme_list_view");
_theme_list_view->addColumn (i18n("Theme"));
_theme_list_view->addColumn (i18n("Button Size"));
_theme_list_view->setAllColumnsShowFocus(true);
- _theme_list_view->setResizeMode(QListView::AllColumns);
+ _theme_list_view->setResizeMode(TQListView::AllColumns);
main_group_boxLayout->addWidget (_theme_list_view);
- QObject::connect (_theme_list_view, SIGNAL(selectionChanged()),
- this, SLOT(slotThemeListViewSelectionChanged()));
+ TQObject::connect (_theme_list_view, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(slotThemeListViewSelectionChanged()));
slotLoadThemeList();
- _button_glow_color_group_box = new QGroupBox(
+ _button_glow_color_group_box = new TQGroupBox(
0, Qt::Horizontal, i18n("Button Glow Colors"), _main_group_box);
- QHBoxLayout *colorHBoxLayout =
- new QHBoxLayout(_button_glow_color_group_box->layout());
+ TQHBoxLayout *colorHBoxLayout =
+ new TQHBoxLayout(_button_glow_color_group_box->layout());
// create buttons
- QSize buttonSize(BITMAP_SIZE, BITMAP_SIZE);
- QPixmap pm(buttonSize);
+ TQSize buttonSize(BITMAP_SIZE, BITMAP_SIZE);
+ TQPixmap pm(buttonSize);
pm.fill(Qt::black);
- _stickyButton = new QPushButton(_button_glow_color_group_box);
- pm.setMask(QBitmap(buttonSize, stickyoff_bits, true));
+ _stickyButton = new TQPushButton(_button_glow_color_group_box);
+ pm.setMask(TQBitmap(buttonSize, stickyoff_bits, true));
_stickyButton->setPixmap(pm);
colorHBoxLayout->addWidget(_stickyButton);
_titleButtonList.push_back(_stickyButton);
- _helpButton = new QPushButton(_button_glow_color_group_box);
- pm.setMask(QBitmap(buttonSize, help_bits, true));
+ _helpButton = new TQPushButton(_button_glow_color_group_box);
+ pm.setMask(TQBitmap(buttonSize, help_bits, true));
_helpButton->setPixmap(pm);
colorHBoxLayout->addWidget(_helpButton);
_titleButtonList.push_back(_helpButton);
- _iconifyButton = new QPushButton(_button_glow_color_group_box);
- pm.setMask(QBitmap(buttonSize, minimize_bits, true));
+ _iconifyButton = new TQPushButton(_button_glow_color_group_box);
+ pm.setMask(TQBitmap(buttonSize, minimize_bits, true));
_iconifyButton->setPixmap(pm);
colorHBoxLayout->addWidget(_iconifyButton);
_titleButtonList.push_back(_iconifyButton);
- _maximizeButton = new QPushButton(_button_glow_color_group_box);
- pm.setMask(QBitmap(buttonSize, maximizeoff_bits, true));
+ _maximizeButton = new TQPushButton(_button_glow_color_group_box);
+ pm.setMask(TQBitmap(buttonSize, maximizeoff_bits, true));
_maximizeButton->setPixmap(pm);
colorHBoxLayout->addWidget(_maximizeButton);
_titleButtonList.push_back(_maximizeButton);
- _closeButton = new QPushButton(_button_glow_color_group_box);
- pm.setMask(QBitmap(buttonSize, close_bits, true));
+ _closeButton = new TQPushButton(_button_glow_color_group_box);
+ pm.setMask(TQBitmap(buttonSize, close_bits, true));
_closeButton->setPixmap(pm);
colorHBoxLayout->addWidget(_closeButton);
_titleButtonList.push_back(_closeButton);
// create signal mapper
- _titleButtonMapper = new QSignalMapper(this);
+ _titleButtonMapper = new TQSignalMapper(this);
for( uint i=0; i<_titleButtonList.size(); i++ ) {
_titleButtonMapper->setMapping(_titleButtonList[i], i);
- connect(_titleButtonList[i], SIGNAL(clicked()),_titleButtonMapper, SLOT(map()));
+ connect(_titleButtonList[i], TQT_SIGNAL(clicked()),_titleButtonMapper, TQT_SLOT(map()));
}
- connect(_titleButtonMapper, SIGNAL(mapped(int)),this, SLOT(slotTitleButtonClicked(int)));
+ connect(_titleButtonMapper, TQT_SIGNAL(mapped(int)),this, TQT_SLOT(slotTitleButtonClicked(int)));
_colorButton = new KColorButton(_button_glow_color_group_box);
_colorButton->setEnabled(false);
- connect(_colorButton, SIGNAL(changed(const QColor&)),
- this, SLOT(slotColorButtonChanged(const QColor&)));
+ connect(_colorButton, TQT_SIGNAL(changed(const TQColor&)),
+ this, TQT_SLOT(slotColorButtonChanged(const TQColor&)));
- colorHBoxLayout->addItem(new QSpacerItem(
- 200, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
+ colorHBoxLayout->addItem(new TQSpacerItem(
+ 200, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
colorHBoxLayout->addWidget(_colorButton);
main_group_boxLayout->addWidget(_button_glow_color_group_box);
- QHBoxLayout *titlebarGradientTypeLayout = new QHBoxLayout();
- _titlebarGradientTypeComboBox = new QComboBox(_main_group_box);
+ TQHBoxLayout *titlebarGradientTypeLayout = new TQHBoxLayout();
+ _titlebarGradientTypeComboBox = new TQComboBox(_main_group_box);
KConfig *c = KGlobal::config();
- KConfigGroupSaver cgs( c, QString::fromLatin1("WM") );
- QColor activeBackground = c->readColorEntry("activeBackground");
- QColor activeBlend = c->readColorEntry("activeBlend");
+ KConfigGroupSaver cgs( c, TQString::fromLatin1("WM") );
+ TQColor activeBackground = c->readColorEntry("activeBackground");
+ TQColor activeBlend = c->readColorEntry("activeBlend");
// If the colors are equal, change one to get a gradient effect
if (activeBackground==activeBlend) {
activeBackground = activeBackground.dark();
}
for (int i=0; i< KPixmapEffect::EllipticGradient; i++ ) {
- KPixmap gradPixmap(QSize(196,20));
+ KPixmap gradPixmap(TQSize(196,20));
KPixmapEffect::gradient(gradPixmap, activeBackground,
activeBlend, (KPixmapEffect::GradientType) i);
_titlebarGradientTypeComboBox->insertItem(gradPixmap, i);
}
- connect(_titlebarGradientTypeComboBox, SIGNAL(activated(int)),
- this, SLOT(slotTitlebarGradientTypeChanged(int)));
+ connect(_titlebarGradientTypeComboBox, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotTitlebarGradientTypeChanged(int)));
titlebarGradientTypeLayout->addWidget(
- new QLabel(i18n("Titlebar gradient:"), _main_group_box));
+ new TQLabel(i18n("Titlebar gradient:"), _main_group_box));
titlebarGradientTypeLayout->addWidget(_titlebarGradientTypeComboBox, 0, Qt::AlignLeft);
titlebarGradientTypeLayout->addStretch(10);
main_group_boxLayout->addLayout(titlebarGradientTypeLayout);
- _showResizeHandleCheckBox = new QCheckBox(
+ _showResizeHandleCheckBox = new TQCheckBox(
i18n("Show resize handle"), _main_group_box);
- connect(_showResizeHandleCheckBox, SIGNAL(clicked()),
- this, SLOT(slotResizeHandleCheckBoxChanged()));
+ connect(_showResizeHandleCheckBox, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotResizeHandleCheckBoxChanged()));
main_group_boxLayout->addWidget(_showResizeHandleCheckBox);
// load config and update user interface
@@ -185,12 +185,12 @@ GlowConfigDialog::~GlowConfigDialog()
void GlowConfigDialog::load( KConfig* /* conf */ )
{
- QColor color;
- const QColor defaultCloseButtonColor(DEFAULT_CLOSE_BUTTON_COLOR);
- const QColor defaultMaximizeButtonColor(DEFAULT_MAXIMIZE_BUTTON_COLOR);
- const QColor defaultIconifyButtonColor(DEFAULT_ICONIFY_BUTTON_COLOR);
- const QColor defaultHelpButtonColor(DEFAULT_HELP_BUTTON_COLOR);
- const QColor defaultStickyButtonColor(DEFAULT_STICKY_BUTTON_COLOR);
+ TQColor color;
+ const TQColor defaultCloseButtonColor(DEFAULT_CLOSE_BUTTON_COLOR);
+ const TQColor defaultMaximizeButtonColor(DEFAULT_MAXIMIZE_BUTTON_COLOR);
+ const TQColor defaultIconifyButtonColor(DEFAULT_ICONIFY_BUTTON_COLOR);
+ const TQColor defaultHelpButtonColor(DEFAULT_HELP_BUTTON_COLOR);
+ const TQColor defaultStickyButtonColor(DEFAULT_STICKY_BUTTON_COLOR);
_glowConfig->setGroup("General");
@@ -249,11 +249,11 @@ void GlowConfigDialog::save( KConfig* /* conf */ )
void GlowConfigDialog::defaults()
{
- const QColor defaultCloseButtonColor = DEFAULT_CLOSE_BUTTON_COLOR;
- const QColor defaultMaximizeButtonColor(DEFAULT_MAXIMIZE_BUTTON_COLOR);
- const QColor defaultIconifyButtonColor(DEFAULT_ICONIFY_BUTTON_COLOR);
- const QColor defaultHelpButtonColor(DEFAULT_HELP_BUTTON_COLOR);
- const QColor defaultStickyButtonColor(DEFAULT_STICKY_BUTTON_COLOR);
+ const TQColor defaultCloseButtonColor = DEFAULT_CLOSE_BUTTON_COLOR;
+ const TQColor defaultMaximizeButtonColor(DEFAULT_MAXIMIZE_BUTTON_COLOR);
+ const TQColor defaultIconifyButtonColor(DEFAULT_ICONIFY_BUTTON_COLOR);
+ const TQColor defaultHelpButtonColor(DEFAULT_HELP_BUTTON_COLOR);
+ const TQColor defaultStickyButtonColor(DEFAULT_STICKY_BUTTON_COLOR);
_buttonConfigMap[stickyButton] = defaultStickyButtonColor;
_buttonConfigMap[helpButton] = defaultHelpButtonColor;
@@ -273,21 +273,21 @@ void GlowConfigDialog::defaults()
void GlowConfigDialog::slotLoadThemeList ()
{
- QStringList dir_list=KGlobal::dirs()->findDirs("data", "kwin/glow-themes");
+ TQStringList dir_list=KGlobal::dirs()->findDirs("data", "kwin/glow-themes");
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
_theme_list_view->clear();
- new QListViewItem (_theme_list_view, "default", "17x17");
+ new TQListViewItem (_theme_list_view, "default", "17x17");
for (it=dir_list.begin(); it!=dir_list.end(); ++it)
{
- QDir dir (*it, QString("*"), QDir::Unsorted,
- QDir::Dirs | QDir::Readable);
+ TQDir dir (*it, TQString("*"), TQDir::Unsorted,
+ TQDir::Dirs | TQDir::Readable);
if (dir.exists())
{
QFileInfoListIterator it2(*dir.entryInfoList());
- QFileInfo * finfo;
+ TQFileInfo * finfo;
while ((finfo=it2.current()))
{
@@ -300,17 +300,17 @@ void GlowConfigDialog::slotLoadThemeList ()
{
KConfig conf (dir.path() + "/" + finfo->fileName() + "/" +
finfo->fileName() + ".theme");
- QSize button_size = conf.readSizeEntry (
- "buttonSize", new QSize (-1, -1));
+ TQSize button_size = conf.readSizeEntry (
+ "buttonSize", new TQSize (-1, -1));
if (button_size.width() == -1)
{
++it2;
continue;
}
- QString size_string = QString("") +
- QString::number(button_size.width()) +
- "x" + QString::number(button_size.height());
- new QListViewItem (_theme_list_view,
+ TQString size_string = TQString("") +
+ TQString::number(button_size.width()) +
+ "x" + TQString::number(button_size.height());
+ new TQListViewItem (_theme_list_view,
finfo->fileName(), size_string);
}
@@ -341,7 +341,7 @@ void GlowConfigDialog::slotTitleButtonClicked(int index)
_colorButton->setColor(_buttonConfigMap[index]);
}
-void GlowConfigDialog::slotColorButtonChanged(const QColor& glowColor)
+void GlowConfigDialog::slotColorButtonChanged(const TQColor& glowColor)
{
if( _stickyButton->isDown() ) {
_buttonConfigMap[stickyButton] = glowColor;
diff --git a/kwin-styles/glow/config/glowconfigdialog.h b/kwin-styles/glow/config/glowconfigdialog.h
index 2190b3ce..033954b6 100644
--- a/kwin-styles/glow/config/glowconfigdialog.h
+++ b/kwin-styles/glow/config/glowconfigdialog.h
@@ -18,8 +18,8 @@
#ifndef GLOW_CONFIG_DIALOG_H
#define GLOW_CONFIG_DIALOG_H
-#include <qvaluevector.h>
-#include <qobject.h>
+#include <tqvaluevector.h>
+#include <tqobject.h>
class QListView;
class QPushButton;
@@ -34,7 +34,7 @@ class GlowConfigDialog : public QObject
Q_OBJECT
public:
- GlowConfigDialog( KConfig* conf, QWidget* parent );
+ GlowConfigDialog( KConfig* conf, TQWidget* parent );
~GlowConfigDialog();
signals:
@@ -47,7 +47,7 @@ public slots:
protected slots:
void slotTitleButtonClicked(int);
- void slotColorButtonChanged(const QColor&);
+ void slotColorButtonChanged(const TQColor&);
void slotTitlebarGradientTypeChanged(int);
void slotResizeHandleCheckBoxChanged();
void slotThemeListViewSelectionChanged ();
@@ -63,26 +63,26 @@ private:
bool _showResizeHandle;
KPixmapEffect::GradientType _titlebarGradientType;
- QString _theme_name;
+ TQString _theme_name;
- QWidget *_main_group_box;
- QGroupBox *_button_glow_color_group_box;
- QGroupBox *_theme_group_box;
+ TQWidget *_main_group_box;
+ TQGroupBox *_button_glow_color_group_box;
+ TQGroupBox *_theme_group_box;
- QListView * _theme_list_view;
+ TQListView * _theme_list_view;
- QCheckBox *_showResizeHandleCheckBox;
- QComboBox *_titlebarGradientTypeComboBox;
+ TQCheckBox *_showResizeHandleCheckBox;
+ TQComboBox *_titlebarGradientTypeComboBox;
- QPushButton *_stickyButton;
- QPushButton *_helpButton;
- QPushButton *_iconifyButton;
- QPushButton *_maximizeButton;
- QPushButton *_closeButton;
- QSignalMapper *_titleButtonMapper;
+ TQPushButton *_stickyButton;
+ TQPushButton *_helpButton;
+ TQPushButton *_iconifyButton;
+ TQPushButton *_maximizeButton;
+ TQPushButton *_closeButton;
+ TQSignalMapper *_titleButtonMapper;
- QColor* _buttonConfigMap;
- QValueVector<QPushButton*> _titleButtonList;
+ TQColor* _buttonConfigMap;
+ TQValueVector<TQPushButton*> _titleButtonList;
KColorButton *_colorButton;
};
diff --git a/kwin-styles/glow/glowbutton.cpp b/kwin-styles/glow/glowbutton.cpp
index 41f53386..25bae19c 100644
--- a/kwin-styles/glow/glowbutton.cpp
+++ b/kwin-styles/glow/glowbutton.cpp
@@ -18,14 +18,14 @@
#include <math.h>
#include <iostream>
#include <vector>
-#include <qmap.h>
-#include <qpixmap.h>
-#include <qpixmapcache.h>
-#include <qbitmap.h>
-#include <qpainter.h>
-#include <qimage.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
+#include <tqpixmapcache.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <kdecoration.h>
#include <kiconeffect.h>
#include "glowbutton.h"
@@ -37,11 +37,11 @@ namespace Glow
// PixmapCache
//-----------------------------------------------------------------------------
-QMap<QString, const QPixmap*> PixmapCache::m_pixmapMap;
+TQMap<TQString, const TQPixmap*> PixmapCache::m_pixmapMap;
-const QPixmap* PixmapCache::find(const QString& key)
+const TQPixmap* PixmapCache::find(const TQString& key)
{
- QMap<QString, const QPixmap*>::const_iterator it =
+ TQMap<TQString, const TQPixmap*>::const_iterator it =
m_pixmapMap.find(key);
if( it != m_pixmapMap.end() )
return *it;
@@ -49,14 +49,14 @@ const QPixmap* PixmapCache::find(const QString& key)
return 0;
}
-void PixmapCache::insert(const QString& key, const QPixmap *pixmap)
+void PixmapCache::insert(const TQString& key, const TQPixmap *pixmap)
{
m_pixmapMap[key] = pixmap;
}
-void PixmapCache::erase(const QString& key)
+void PixmapCache::erase(const TQString& key)
{
- QMap<QString, const QPixmap*>::iterator it =
+ TQMap<TQString, const TQPixmap*>::iterator it =
m_pixmapMap.find(key);
if (it != m_pixmapMap.end())
{
@@ -68,7 +68,7 @@ void PixmapCache::erase(const QString& key)
void PixmapCache::clear()
{
// delete all pixmaps in the cache
- QMap<QString, const QPixmap*>::const_iterator it
+ TQMap<TQString, const TQPixmap*>::const_iterator it
= m_pixmapMap.begin();
for(; it != m_pixmapMap.end(); ++it)
delete *it;
@@ -79,18 +79,18 @@ void PixmapCache::clear()
// GlowButton
//-----------------------------------------------------------------------------
-GlowButton::GlowButton(QWidget *parent, const char *name,
- const QString& tip, const int realizeBtns)
- : QButton(parent, name)
+GlowButton::GlowButton(TQWidget *parent, const char *name,
+ const TQString& tip, const int realizeBtns)
+ : TQButton(parent, name)
{
m_realizeButtons = realizeBtns;
_steps = 0;
m_updateTime = 50;
- m_pixmapName = QString::null;
+ m_pixmapName = TQString::null;
- m_timer = new QTimer(this);
- connect(m_timer, SIGNAL(timeout()), this, SLOT(slotTimeout()));
+ m_timer = new TQTimer(this);
+ connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout()));
m_pos = 0;
m_timerStatus = Stop;
@@ -102,16 +102,16 @@ GlowButton::~GlowButton()
{
}
-void GlowButton::setTipText( const QString& tip )
+void GlowButton::setTipText( const TQString& tip )
{
if (KDecoration::options()->showTooltips())
{
- QToolTip::remove( this );
- QToolTip::add( this, tip );
+ TQToolTip::remove( this );
+ TQToolTip::add( this, tip );
}
}
-QString GlowButton::getPixmapName() const
+TQString GlowButton::getPixmapName() const
{
return m_pixmapName;
}
@@ -121,11 +121,11 @@ Qt::ButtonState GlowButton::lastButton() const
return _last_button;
}
-void GlowButton::setPixmapName(const QString& pixmapName)
+void GlowButton::setPixmapName(const TQString& pixmapName)
{
m_pixmapName = pixmapName;
- const QPixmap *pixmap = PixmapCache::find(pixmapName);
+ const TQPixmap *pixmap = PixmapCache::find(pixmapName);
if( ! pixmap )
return;
@@ -135,18 +135,18 @@ void GlowButton::setPixmapName(const QString& pixmapName)
repaint(false);
}
-void GlowButton::paintEvent( QPaintEvent *e )
+void GlowButton::paintEvent( TQPaintEvent *e )
{
- QWidget::paintEvent(e);
- const QPixmap *pixmap = PixmapCache::find(m_pixmapName);
+ TQWidget::paintEvent(e);
+ const TQPixmap *pixmap = PixmapCache::find(m_pixmapName);
if( pixmap != 0 )
{
int pos = m_pos>=0?m_pos:-m_pos;
- QPainter p;
- QPixmap pm (pixmap->size());
+ TQPainter p;
+ TQPixmap pm (pixmap->size());
p.begin(&pm);
- const QPixmap * bg_pixmap = PixmapCache::find(
- QString::number(parentWidget()->winId()));
+ const TQPixmap * bg_pixmap = PixmapCache::find(
+ TQString::number(parentWidget()->winId()));
p.drawPixmap (0, 0, *bg_pixmap, x(), y(), width(), height());
p.drawPixmap (0, 0, *pixmap, 0, pos*height(), width(), height());
p.end();
@@ -156,25 +156,25 @@ void GlowButton::paintEvent( QPaintEvent *e )
}
}
-void GlowButton::enterEvent( QEvent *e )
+void GlowButton::enterEvent( TQEvent *e )
{
if( m_pos<0 )
m_pos=-m_pos;
m_timerStatus = Run;
if( ! m_timer->isActive() )
m_timer->start(m_updateTime);
- QButton::enterEvent(e);
+ TQButton::enterEvent(e);
}
-void GlowButton::leaveEvent( QEvent *e )
+void GlowButton::leaveEvent( TQEvent *e )
{
m_timerStatus = Stop;
if( ! m_timer->isActive() )
m_timer->start(m_updateTime);
- QButton::leaveEvent(e);
+ TQButton::leaveEvent(e);
}
-void GlowButton::mousePressEvent( QMouseEvent *e )
+void GlowButton::mousePressEvent( TQMouseEvent *e )
{
_last_button = e->button();
if( m_timer->isActive() )
@@ -183,24 +183,24 @@ void GlowButton::mousePressEvent( QMouseEvent *e )
repaint(false);
// without pretending LeftButton, clicking on the button with MidButton
// or RightButton would cause unwanted titlebar action
- QMouseEvent me (e->type(), e->pos(), e->globalPos(),
+ TQMouseEvent me (e->type(), e->pos(), e->globalPos(),
(e->button()&m_realizeButtons)?LeftButton:NoButton, e->state());
- QButton::mousePressEvent(&me);
+ TQButton::mousePressEvent(&me);
}
-void GlowButton::mouseReleaseEvent( QMouseEvent *e )
+void GlowButton::mouseReleaseEvent( TQMouseEvent *e )
{
_last_button = e->button();
- QPoint p = mapToParent(mapFromGlobal(e->globalPos()));
+ TQPoint p = mapToParent(mapFromGlobal(e->globalPos()));
if( ! m_timer->isActive() ) {
m_timer->start(m_updateTime);
}
if( ! geometry().contains(p) ) {
m_timerStatus = Stop;
}
- QMouseEvent me (e->type(), e->pos(), e->globalPos(),
+ TQMouseEvent me (e->type(), e->pos(), e->globalPos(),
(e->button()&m_realizeButtons)?LeftButton:NoButton, e->state());
- QButton::mouseReleaseEvent(&me);
+ TQButton::mouseReleaseEvent(&me);
}
void GlowButton::slotTimeout()
@@ -241,26 +241,26 @@ void GlowButtonFactory::setSteps(int steps)
_steps = steps;
}
-QPixmap * GlowButtonFactory::createGlowButtonPixmap(
- const QImage & bg_image,
- const QImage & fg_image,
- const QImage & glow_image,
- const QColor & color,
- const QColor & glow_color)
+TQPixmap * GlowButtonFactory::createGlowButtonPixmap(
+ const TQImage & bg_image,
+ const TQImage & fg_image,
+ const TQImage & glow_image,
+ const TQColor & color,
+ const TQColor & glow_color)
{
if (bg_image.size() != fg_image.size()
|| fg_image.size() != glow_image.size()) {
std::cerr << "Image size error" << std::endl;
- return new QPixmap();
+ return new TQPixmap();
}
- QImage colorized_bg_image = bg_image.copy();
+ TQImage colorized_bg_image = bg_image.copy();
KIconEffect::colorize (colorized_bg_image, color, 1.0);
int w = colorized_bg_image.width();
int h = colorized_bg_image.height();
- QImage image (w, (_steps+1)*h, 32);
+ TQImage image (w, (_steps+1)*h, 32);
image.setAlphaBuffer (true);
for (int i=0; i<_steps+1; ++i) {
for (int y=0; y<h; ++y) {
@@ -276,11 +276,11 @@ QPixmap * GlowButtonFactory::createGlowButtonPixmap(
}
}
}
- QPixmap * pixmap = new QPixmap (image);
- QPainter painter (pixmap);
+ TQPixmap * pixmap = new TQPixmap (image);
+ TQPainter painter (pixmap);
bool dark = (qGray(color.rgb()) <= 127);
- QImage fg_img (w, h, 32);
+ TQImage fg_img (w, h, 32);
fg_img.setAlphaBuffer (true);
for (int y=0; y<h; ++y) {
uint * src_line = (uint*) fg_image.scanLine (y);
@@ -297,7 +297,7 @@ QPixmap * GlowButtonFactory::createGlowButtonPixmap(
int r = glow_color.red();
int g = glow_color.green();
int b = glow_color.blue();
- QImage glow_img (w, h, 32);
+ TQImage glow_img (w, h, 32);
glow_img.setAlphaBuffer (true);
for (int i=0; i<_steps; ++i) {
painter.drawImage (0, i*h, fg_img);
@@ -327,7 +327,7 @@ QPixmap * GlowButtonFactory::createGlowButtonPixmap(
}
GlowButton* GlowButtonFactory::createGlowButton(
- QWidget *parent, const char* name, const QString& tip, const int realizeBtns)
+ TQWidget *parent, const char* name, const TQString& tip, const int realizeBtns)
{
GlowButton *glowButton = new GlowButton(parent, name, tip, realizeBtns);
return glowButton;
diff --git a/kwin-styles/glow/glowbutton.h b/kwin-styles/glow/glowbutton.h
index 3d4f5e1d..e7cc3605 100644
--- a/kwin-styles/glow/glowbutton.h
+++ b/kwin-styles/glow/glowbutton.h
@@ -19,8 +19,8 @@
#define GLOW_BUTTON_H
#include <vector>
-#include <qmap.h>
-#include <qbutton.h>
+#include <tqmap.h>
+#include <tqbutton.h>
class QPixmap;
class QBitmap;
@@ -33,12 +33,12 @@ namespace Glow
class PixmapCache
{
public:
- static const QPixmap* find(const QString& key);
- static void insert(const QString& key, const QPixmap *pixmap);
- static void erase(const QString& key);
+ static const TQPixmap* find(const TQString& key);
+ static void insert(const TQString& key, const TQPixmap *pixmap);
+ static void erase(const TQString& key);
static void clear();
private:
- static QMap<QString, const QPixmap*> m_pixmapMap;
+ static TQMap<TQString, const TQPixmap*> m_pixmapMap;
};
@@ -49,24 +49,24 @@ class GlowButton : public QButton
Q_OBJECT
public:
- GlowButton(QWidget *parent, const char* name, const QString& tip, const int realizeBtns);
+ GlowButton(TQWidget *parent, const char* name, const TQString& tip, const int realizeBtns);
~GlowButton();
- void setTipText( const QString& tip );
+ void setTipText( const TQString& tip );
- QString getPixmapName() const;
+ TQString getPixmapName() const;
ButtonState lastButton() const;
/** Sets the name of the pixmap in the pixmap cache.
- * If no background pixmap is wanted use QString::null as name. */
- void setPixmapName(const QString& pixmapName);
+ * If no background pixmap is wanted use TQString::null as name. */
+ void setPixmapName(const TQString& pixmapName);
protected:
- virtual void paintEvent( QPaintEvent * );
- virtual void enterEvent( QEvent * );
- virtual void leaveEvent( QEvent * );
- virtual void mousePressEvent( QMouseEvent * );
- virtual void mouseReleaseEvent( QMouseEvent * );
+ virtual void paintEvent( TQPaintEvent * );
+ virtual void enterEvent( TQEvent * );
+ virtual void leaveEvent( TQEvent * );
+ virtual void mousePressEvent( TQMouseEvent * );
+ virtual void mouseReleaseEvent( TQMouseEvent * );
protected slots:
void slotTimeout();
@@ -76,9 +76,9 @@ private:
int m_updateTime;
int _steps;
- QString m_pixmapName;
+ TQString m_pixmapName;
- QTimer *m_timer;
+ TQTimer *m_timer;
int m_pos;
TimerStatus m_timerStatus;
@@ -108,16 +108,16 @@ public:
* in succession to create the glow effect. The last sub pixmap is used
* when the button is pressed.
*/
- QPixmap * createGlowButtonPixmap(
- const QImage & bg_image,
-// const QImage & bg_alpha_image,
- const QImage & fg_image,
- const QImage & glow_image,
- const QColor & color,
- const QColor & glow_color);
+ TQPixmap * createGlowButtonPixmap(
+ const TQImage & bg_image,
+// const TQImage & bg_alpha_image,
+ const TQImage & fg_image,
+ const TQImage & glow_image,
+ const TQColor & color,
+ const TQColor & glow_color);
GlowButton* createGlowButton(
- QWidget *parent, const char* name, const QString& tip, const int realizeBtns = Qt::LeftButton);
+ TQWidget *parent, const char* name, const TQString& tip, const int realizeBtns = Qt::LeftButton);
private:
int _steps;
diff --git a/kwin-styles/glow/glowclient.cpp b/kwin-styles/glow/glowclient.cpp
index ed13f480..53d52b79 100644
--- a/kwin-styles/glow/glowclient.cpp
+++ b/kwin-styles/glow/glowclient.cpp
@@ -15,19 +15,19 @@
* *
***************************************************************************/
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qimage.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqimage.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include <kconfig.h>
#include <kdebug.h>
#include <klocale.h>
#include <kpixmapeffect.h>
#include <kpixmap.h>
#include <kstandarddirs.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include "resources.h"
#include "glowclient.h"
#include "glowbutton.h"
@@ -54,11 +54,11 @@ void GlowClientConfig::load(KDecorationFactory *factory)
KConfig conf("kwinglowrc");
conf.setGroup("General");
- const QColor defaultCloseButtonColor(DEFAULT_CLOSE_BUTTON_COLOR);
- const QColor defaultMaximizeButtonColor(DEFAULT_MAXIMIZE_BUTTON_COLOR);
- const QColor defaultIconifyButtonColor(DEFAULT_ICONIFY_BUTTON_COLOR);
- const QColor defaultHelpButtonColor(DEFAULT_HELP_BUTTON_COLOR);
- const QColor defaultStickyButtonColor(DEFAULT_STICKY_BUTTON_COLOR);
+ const TQColor defaultCloseButtonColor(DEFAULT_CLOSE_BUTTON_COLOR);
+ const TQColor defaultMaximizeButtonColor(DEFAULT_MAXIMIZE_BUTTON_COLOR);
+ const TQColor defaultIconifyButtonColor(DEFAULT_ICONIFY_BUTTON_COLOR);
+ const TQColor defaultHelpButtonColor(DEFAULT_HELP_BUTTON_COLOR);
+ const TQColor defaultStickyButtonColor(DEFAULT_STICKY_BUTTON_COLOR);
stickyButtonGlowColor = conf.readColorEntry(
"stickyButtonGlowColor", &defaultStickyButtonColor);
@@ -123,9 +123,9 @@ GlowClientGlobals::~GlowClientGlobals()
m_instance = 0;
}
-QString GlowClientGlobals::getPixmapName(PixmapType type, bool isActive)
+TQString GlowClientGlobals::getPixmapName(PixmapType type, bool isActive)
{
- QString s = getPixmapTypeName(static_cast<PixmapType>(type));
+ TQString s = getPixmapTypeName(static_cast<PixmapType>(type));
s += "|";
s += isActive ? "Active" : "NotActive";
return s;
@@ -153,19 +153,19 @@ void GlowClientGlobals::readConfig()
_config->load(this);
}
-QValueList< GlowClientGlobals::BorderSize >
+TQValueList< GlowClientGlobals::BorderSize >
GlowClientGlobals::borderSizes() const
{
// the list must be sorted
- return QValueList< BorderSize >() << BorderNormal <<
+ return TQValueList< BorderSize >() << BorderNormal <<
BorderLarge << BorderVeryLarge << BorderHuge <<
BorderVeryHuge << BorderOversized;
}
void GlowClientGlobals::readTheme()
{
- QString theme_config_file = KGlobal::dirs()->findResource ("data",
- QString("kwin/glow-themes/") + config()->themeName + "/" +
+ TQString theme_config_file = KGlobal::dirs()->findResource ("data",
+ TQString("kwin/glow-themes/") + config()->themeName + "/" +
config()->themeName + ".theme");
if (theme_config_file.isNull())
{
@@ -207,7 +207,7 @@ void GlowClientGlobals::readTheme()
_theme->iconifyGlowPixmap = conf.readEntry ("iconifyGlowPixmap",
_theme->iconifyGlowPixmap);
- titleHeight = QFontMetrics(KDecoration::options()->font(true)).height();
+ titleHeight = TQFontMetrics(KDecoration::options()->font(true)).height();
if (titleHeight < SIDE_MARGIN)
titleHeight = SIDE_MARGIN;
if (titleHeight < _theme->buttonSize.height())
@@ -266,7 +266,7 @@ void GlowClientGlobals::deletePixmaps()
PixmapCache::clear();
}
-const QString GlowClientGlobals::getPixmapTypeName(PixmapType type)
+const TQString GlowClientGlobals::getPixmapTypeName(PixmapType type)
{
switch(type) {
case (StickyOn):
@@ -284,69 +284,69 @@ const QString GlowClientGlobals::getPixmapTypeName(PixmapType type)
case(Close):
return "Close";
default:
- return QString::null;
+ return TQString::null;
}
}
bool GlowClientGlobals::createPixmap(PixmapType type, bool isActive)
{
- QString theme_dir = KGlobal::dirs()->findResource ("data",
- QString("kwin/glow-themes/") + _config->themeName + "/");
+ TQString theme_dir = KGlobal::dirs()->findResource ("data",
+ TQString("kwin/glow-themes/") + _config->themeName + "/");
- QColor glow_color;
- QColor color = options()->color(ColorButtonBg, isActive);
+ TQColor glow_color;
+ TQColor color = options()->color(ColorButtonBg, isActive);
- QImage bg_image (theme_dir+_theme->backgroundPixmap);
- QImage fg_image;
- QImage glow_image;
+ TQImage bg_image (theme_dir+_theme->backgroundPixmap);
+ TQImage fg_image;
+ TQImage glow_image;
switch(type) {
case (StickyOn):
{
- fg_image = QImage (theme_dir+_theme->stickyOnPixmap);
- glow_image = QImage (theme_dir+_theme->stickyOnGlowPixmap);
+ fg_image = TQImage (theme_dir+_theme->stickyOnPixmap);
+ glow_image = TQImage (theme_dir+_theme->stickyOnGlowPixmap);
glow_color = _config->stickyButtonGlowColor;
break;
}
case (StickyOff):
{
- fg_image = QImage (theme_dir+_theme->stickyOffPixmap);
- glow_image = QImage (theme_dir+_theme->stickyOffGlowPixmap);
+ fg_image = TQImage (theme_dir+_theme->stickyOffPixmap);
+ glow_image = TQImage (theme_dir+_theme->stickyOffGlowPixmap);
glow_color = _config->stickyButtonGlowColor;
break;
}
case (Help):
{
- fg_image = QImage (theme_dir+_theme->helpPixmap);
- glow_image = QImage (theme_dir+_theme->helpGlowPixmap);
+ fg_image = TQImage (theme_dir+_theme->helpPixmap);
+ glow_image = TQImage (theme_dir+_theme->helpGlowPixmap);
glow_color = _config->helpButtonGlowColor;
break;
}
case (Iconify):
{
- fg_image = QImage (theme_dir+_theme->iconifyPixmap);
- glow_image = QImage (theme_dir+_theme->iconifyGlowPixmap);
+ fg_image = TQImage (theme_dir+_theme->iconifyPixmap);
+ glow_image = TQImage (theme_dir+_theme->iconifyGlowPixmap);
glow_color = _config->iconifyButtonGlowColor;
break;
}
case (MaximizeOn):
{
- fg_image = QImage (theme_dir+_theme->maximizeOnPixmap);
- glow_image = QImage (theme_dir+_theme->maximizeOnGlowPixmap);
+ fg_image = TQImage (theme_dir+_theme->maximizeOnPixmap);
+ glow_image = TQImage (theme_dir+_theme->maximizeOnGlowPixmap);
glow_color = _config->maximizeButtonGlowColor;
break;
}
case (MaximizeOff):
{
- fg_image = QImage (theme_dir+_theme->maximizeOffPixmap);
- glow_image = QImage (theme_dir+_theme->maximizeOffGlowPixmap);
+ fg_image = TQImage (theme_dir+_theme->maximizeOffPixmap);
+ glow_image = TQImage (theme_dir+_theme->maximizeOffGlowPixmap);
glow_color = _config->maximizeButtonGlowColor;
break;
}
case (Close):
{
- fg_image = QImage (theme_dir+_theme->closePixmap);
- glow_image = QImage (theme_dir+_theme->closeGlowPixmap);
+ fg_image = TQImage (theme_dir+_theme->closePixmap);
+ glow_image = TQImage (theme_dir+_theme->closeGlowPixmap);
glow_color = _config->closeButtonGlowColor;
break;
}
@@ -357,7 +357,7 @@ bool GlowClientGlobals::createPixmap(PixmapType type, bool isActive)
|| glow_image.size() != _theme->buttonSize)
return false;
- QPixmap * glowPm = buttonFactory()->createGlowButtonPixmap(
+ TQPixmap * glowPm = buttonFactory()->createGlowButtonPixmap(
bg_image, fg_image, glow_image,
color, glow_color);
if (glowPm->isNull())
@@ -398,40 +398,40 @@ void GlowClient::init()
GlowClient::~GlowClient()
{
- PixmapCache::erase(QString::number(widget()->winId()));
+ PixmapCache::erase(TQString::number(widget()->winId()));
}
-void GlowClient::resizeEvent( QResizeEvent * )
+void GlowClient::resizeEvent( TQResizeEvent * )
{
doShape();
widget()->repaint(false);
}
-void GlowClient::paintEvent( QPaintEvent * )
+void GlowClient::paintEvent( TQPaintEvent * )
{
GlowClientConfig *conf = GlowClientGlobals::instance()->config();
- QRect r_this = widget()->rect();
- QRect r_title = _title_spacer->geometry();
- QColorGroup titleCg = options()->colorGroup(ColorTitleBar, isActive());
- QColorGroup titleBlendCg=options()->colorGroup(ColorTitleBlend, isActive());
- QColorGroup cg = widget()->colorGroup();
- QColor titleColor = options()->color(ColorTitleBar, isActive());
- QColor titleBlendColor = options()->color(ColorTitleBlend, isActive());
- QColor bgColor = widget()->colorGroup().background();
- QPainter p;
- QPointArray pArray, pArray2, pArray3, pArray4;
+ TQRect r_this = widget()->rect();
+ TQRect r_title = _title_spacer->geometry();
+ TQColorGroup titleCg = options()->colorGroup(ColorTitleBar, isActive());
+ TQColorGroup titleBlendCg=options()->colorGroup(ColorTitleBlend, isActive());
+ TQColorGroup cg = widget()->colorGroup();
+ TQColor titleColor = options()->color(ColorTitleBar, isActive());
+ TQColor titleBlendColor = options()->color(ColorTitleBlend, isActive());
+ TQColor bgColor = widget()->colorGroup().background();
+ TQPainter p;
+ TQPointArray pArray, pArray2, pArray3, pArray4;
// pixmap for title bar
- QSize tBSize(width(), r_title.height());
- QSize gradientPixmapSize (tBSize-QSize(3,3));
+ TQSize tBSize(width(), r_title.height());
+ TQSize gradientPixmapSize (tBSize-TQSize(3,3));
if (! gradientPixmapSize.isValid())
- gradientPixmapSize = QSize(0,0);
+ gradientPixmapSize = TQSize(0,0);
KPixmap gradientPixmap(gradientPixmapSize);
if (! gradientPixmapSize.isNull())
KPixmapEffect::gradient(gradientPixmap, titleColor, titleBlendColor,
(KPixmapEffect::GradientType) conf->titlebarGradientType);
- QPixmap * title_buffer = new QPixmap(tBSize);
+ TQPixmap * title_buffer = new TQPixmap(tBSize);
p.begin(title_buffer);
if (! gradientPixmap.isNull())
p.drawPixmap(2, 2, gradientPixmap);
@@ -446,7 +446,7 @@ void GlowClient::paintEvent( QPaintEvent * )
Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, caption());
// draw split color beneath buttons top right
- pArray4 = QPointArray(4);
+ pArray4 = TQPointArray(4);
pArray4.setPoint(0, tBSize.width()-1, tBSize.height()/2-1);
pArray4.setPoint(1, r_title.x()+r_title.width()-1+tBSize.height()/2,
tBSize.height()/2-1);
@@ -457,7 +457,7 @@ void GlowClient::paintEvent( QPaintEvent * )
p.drawPolygon(pArray4);
// draw borders
- pArray = QPointArray(3);
+ pArray = TQPointArray(3);
pArray.setPoint(0, tBSize.width()-1, tBSize.height()/2-1);
pArray.setPoint(1, r_title.x()+r_title.width()-1+tBSize.height()/2,
tBSize.height()/2-1);
@@ -466,7 +466,7 @@ void GlowClient::paintEvent( QPaintEvent * )
p.drawPolyline(pArray);
p.drawLine (0, tBSize.height()-1, r_title.x()+r_title.width()-1, tBSize.height()-1);
- pArray2 = QPointArray(3);
+ pArray2 = TQPointArray(3);
pArray2.setPoint(0, 1, tBSize.height()-2);
pArray2.setPoint(1, 1, 1);
pArray2.setPoint(2, tBSize.width()-2, 1);
@@ -474,7 +474,7 @@ void GlowClient::paintEvent( QPaintEvent * )
p.drawPolyline(pArray2);
}
- pArray3 = QPointArray(4);
+ pArray3 = TQPointArray(4);
pArray3.setPoint(0, 0, tBSize.height()-1);
pArray3.setPoint(1, 0, 0);
pArray3.setPoint(2, tBSize.width()-1, 0);
@@ -484,8 +484,8 @@ void GlowClient::paintEvent( QPaintEvent * )
p.end();
// insert title buffer in cache; before that, remove old buffer
- PixmapCache::erase(QString::number(widget()->winId()));
- PixmapCache::insert(QString::number(widget()->winId()), title_buffer);
+ PixmapCache::erase(TQString::number(widget()->winId()));
+ PixmapCache::insert(TQString::number(widget()->winId()), title_buffer);
bitBlt(widget(), 0, 0, title_buffer);
for (unsigned int i=0; i<m_buttonList.size(); ++i)
@@ -518,21 +518,21 @@ void GlowClient::paintEvent( QPaintEvent * )
}
}
-void GlowClient::showEvent( QShowEvent * )
+void GlowClient::showEvent( TQShowEvent * )
{
doShape();
widget()->repaint(false);
}
-void GlowClient::mouseDoubleClickEvent( QMouseEvent *e )
+void GlowClient::mouseDoubleClickEvent( TQMouseEvent *e )
{
if(e->button() == LeftButton && _title_spacer->geometry().contains(e->pos()))
titlebarDblClickOperation();
}
-void GlowClient::wheelEvent( QWheelEvent *e )
+void GlowClient::wheelEvent( TQWheelEvent *e )
{
- if (isSetShade() || QRect( 0, 0, width(), titleHeight ).contains(e->pos()))
+ if (isSetShade() || TQRect( 0, 0, width(), titleHeight ).contains(e->pos()))
titlebarMouseWheelOperation( e->delta());
}
@@ -556,12 +556,12 @@ void GlowClient::captionChange()
widget()->update(_title_spacer->geometry());
}
-QSize GlowClient::minimumSize() const
+TQSize GlowClient::minimumSize() const
{
return widget()->minimumSize();
}
-void GlowClient::resize( const QSize& s )
+void GlowClient::resize( const TQSize& s )
{
widget()->resize( s );
}
@@ -607,7 +607,7 @@ void GlowClient::maximizeChange()
}
}
-KDecoration::Position GlowClient::mousePosition(const QPoint &pos) const
+KDecoration::Position GlowClient::mousePosition(const TQPoint &pos) const
{
Position m = PositionCenter;
@@ -646,87 +646,87 @@ void GlowClient::createButtons()
{
GlowClientGlobals *globals = GlowClientGlobals::instance();
GlowButtonFactory *factory = globals->buttonFactory();
- QSize size = globals->theme()->buttonSize;
+ TQSize size = globals->theme()->buttonSize;
m_stickyButton = factory->createGlowButton(widget(),
"StickyButton", isOnAllDesktops()?i18n("Not on all desktops"):i18n("On all desktops"), LeftButton|RightButton);
m_stickyButton->setFixedSize(size);
- connect(m_stickyButton, SIGNAL(clicked()), this, SLOT(toggleOnAllDesktops()));
+ connect(m_stickyButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(toggleOnAllDesktops()));
m_buttonList.insert(m_buttonList.end(), m_stickyButton);
m_helpButton = factory->createGlowButton(widget(),
"HelpButton", i18n("Help"));
m_helpButton->setFixedSize(size);
- connect(m_helpButton, SIGNAL(clicked()), this, SLOT(showContextHelp()));
+ connect(m_helpButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(showContextHelp()));
m_buttonList.insert(m_buttonList.end(), m_helpButton);
m_minimizeButton = factory->createGlowButton(widget(),
"IconifyButton", i18n("Minimize"));
m_minimizeButton->setFixedSize(size);
- connect(m_minimizeButton, SIGNAL(clicked()), this, SLOT(minimize()));
+ connect(m_minimizeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(minimize()));
m_buttonList.insert(m_buttonList.end(), m_minimizeButton);
m_maximizeButton=factory->createGlowButton(widget(),
"MaximizeButton", i18n("Maximize"), LeftButton|MidButton|RightButton);
m_maximizeButton->setFixedSize(size);
- connect(m_maximizeButton, SIGNAL(clicked()), this, SLOT(slotMaximize()));
+ connect(m_maximizeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMaximize()));
m_buttonList.insert(m_buttonList.end(), m_maximizeButton);
m_closeButton = factory->createGlowButton(widget(),
"CloseButton", i18n("Close"));
m_closeButton->setFixedSize(size);
- connect(m_closeButton, SIGNAL(clicked()), this, SLOT(closeWindow()));
+ connect(m_closeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(closeWindow()));
m_buttonList.insert(m_buttonList.end(), m_closeButton);
}
void GlowClient::resetLayout()
{
- _main_layout = new QVBoxLayout(widget(), 0, 0);
- _main_layout->setResizeMode (QLayout::FreeResize);
+ _main_layout = new TQVBoxLayout(widget(), 0, 0);
+ _main_layout->setResizeMode (TQLayout::FreeResize);
// update button positions and colors
updateButtonPositions();
updateButtonPixmaps();
- QBoxLayout * topLayout = new QBoxLayout(_main_layout,
- QBoxLayout::LeftToRight, 0, 0);
+ TQBoxLayout * topLayout = new TQBoxLayout(_main_layout,
+ TQBoxLayout::LeftToRight, 0, 0);
topLayout->setMargin(0);
topLayout->setSpacing(TITLE_SPACING);
topLayout->addSpacing(SIDE_MARGIN);
- QVBoxLayout *outerLeftLayout = new QVBoxLayout(topLayout);
+ TQVBoxLayout *outerLeftLayout = new TQVBoxLayout(topLayout);
outerLeftLayout->addSpacing(TITLE_MARGIN);
outerLeftLayout->addItem(m_leftButtonLayout);
outerLeftLayout->addSpacing(1);
topLayout->addSpacing(SIDE_MARGIN);
- _title_spacer = new QSpacerItem(0, titleHeight + TITLE_MARGIN + 1,
- QSizePolicy::Expanding, QSizePolicy::Fixed);
+ _title_spacer = new TQSpacerItem(0, titleHeight + TITLE_MARGIN + 1,
+ TQSizePolicy::Expanding, TQSizePolicy::Fixed);
topLayout->addItem(_title_spacer);
topLayout->addSpacing(SIDE_MARGIN);
- QVBoxLayout *outerRightLayout = new QVBoxLayout(topLayout);
+ TQVBoxLayout *outerRightLayout = new TQVBoxLayout(topLayout);
outerRightLayout->addSpacing(TITLE_MARGIN);
outerRightLayout->addItem(m_rightButtonLayout);
outerRightLayout->addSpacing(1);
topLayout->addSpacing(SIDE_MARGIN);
- QBoxLayout *midLayout = new QBoxLayout(
- _main_layout, QBoxLayout::LeftToRight, 0, 0);
+ TQBoxLayout *midLayout = new TQBoxLayout(
+ _main_layout, TQBoxLayout::LeftToRight, 0, 0);
midLayout->addSpacing(SIDE_MARGIN);
if(isPreview())
midLayout->addWidget(
- new QLabel( i18n( "<b><center>Glow preview</center></b>" ), widget()));
+ new TQLabel( i18n( "<b><center>Glow preview</center></b>" ), widget()));
else
- midLayout->addItem( new QSpacerItem( 0, 0 ));
+ midLayout->addItem( new TQSpacerItem( 0, 0 ));
midLayout->addSpacing(SIDE_MARGIN);
if(GlowClientGlobals::instance()->config()->showResizeHandle
&& isResizable() ) {
- _bottom_spacer = new QSpacerItem(SIDE_MARGIN*2,
- RESIZE_HANDLE_HEIGHT, QSizePolicy::Expanding, QSizePolicy::Minimum);
+ _bottom_spacer = new TQSpacerItem(SIDE_MARGIN*2,
+ RESIZE_HANDLE_HEIGHT, TQSizePolicy::Expanding, TQSizePolicy::Minimum);
} else {
- _bottom_spacer = new QSpacerItem(SIDE_MARGIN*2,
- BOTTOM_MARGIN, QSizePolicy::Expanding, QSizePolicy::Minimum);
+ _bottom_spacer = new TQSpacerItem(SIDE_MARGIN*2,
+ BOTTOM_MARGIN, TQSizePolicy::Expanding, TQSizePolicy::Minimum);
}
_main_layout->addItem (_bottom_spacer);
_main_layout->setStretchFactor(topLayout, 0);
@@ -735,7 +735,7 @@ void GlowClient::resetLayout()
void GlowClient::updateButtonPositions()
{
- QString buttons = options()->titleButtonsLeft() + "|"
+ TQString buttons = options()->titleButtonsLeft() + "|"
+ options()->titleButtonsRight();
bool leftButtons=true;
@@ -749,12 +749,12 @@ void GlowClient::updateButtonPositions()
// reset left and right button layout
if(m_leftButtonLayout)
delete m_leftButtonLayout;
- m_leftButtonLayout = new QBoxLayout(0, QBoxLayout::LeftToRight, 0, 0, 0);
+ m_leftButtonLayout = new TQBoxLayout(0, TQBoxLayout::LeftToRight, 0, 0, 0);
m_leftButtonLayout->setMargin(0);
m_leftButtonLayout->setSpacing(TITLE_SPACING);
if(m_rightButtonLayout)
delete m_rightButtonLayout;
- m_rightButtonLayout = new QBoxLayout(0, QBoxLayout::LeftToRight, 0, 0, 0);
+ m_rightButtonLayout = new TQBoxLayout(0, TQBoxLayout::LeftToRight, 0, 0, 0);
m_rightButtonLayout->setMargin(0);
m_rightButtonLayout->setSpacing(TITLE_SPACING);
@@ -825,12 +825,12 @@ void GlowClient::updateButtonPixmaps()
void GlowClient::doShape()
{
- QRegion mask(widget()->rect());
+ TQRegion mask(widget()->rect());
// edges
- mask -= QRegion(width()-1,0,1,1);
- mask -= QRegion(0,height()-1,1,1);
- mask -= QRegion(width()-1,height()-1,1,1);
+ mask -= TQRegion(width()-1,0,1,1);
+ mask -= TQRegion(0,height()-1,1,1);
+ mask -= TQRegion(width()-1,height()-1,1,1);
setMask(mask);
}
@@ -855,29 +855,29 @@ void GlowClient::slotMaximize()
maximize(m_maximizeButton->lastButton());
}
-bool GlowClient::eventFilter( QObject* o, QEvent* e )
+bool GlowClient::eventFilter( TQObject* o, TQEvent* e )
{
if( o != widget())
return false;
switch( e->type())
{
- case QEvent::Resize:
- resizeEvent( static_cast< QResizeEvent* >( e ));
+ case TQEvent::Resize:
+ resizeEvent( static_cast< TQResizeEvent* >( e ));
return true;
- case QEvent::Paint:
- paintEvent( static_cast< QPaintEvent* >( e ));
+ case TQEvent::Paint:
+ paintEvent( static_cast< TQPaintEvent* >( e ));
return true;
- case QEvent::MouseButtonDblClick:
- mouseDoubleClickEvent( static_cast< QMouseEvent* >( e ));
+ case TQEvent::MouseButtonDblClick:
+ mouseDoubleClickEvent( static_cast< TQMouseEvent* >( e ));
return true;
- case QEvent::MouseButtonPress:
- processMousePressEvent( static_cast< QMouseEvent* >( e ));
+ case TQEvent::MouseButtonPress:
+ processMousePressEvent( static_cast< TQMouseEvent* >( e ));
return true;
- case QEvent::Show:
- showEvent( static_cast< QShowEvent* >( e ));
+ case TQEvent::Show:
+ showEvent( static_cast< TQShowEvent* >( e ));
return true;
- case QEvent::Wheel:
- wheelEvent( static_cast< QWheelEvent* >( e ));
+ case TQEvent::Wheel:
+ wheelEvent( static_cast< TQWheelEvent* >( e ));
return true;
default:
break;
diff --git a/kwin-styles/glow/glowclient.h b/kwin-styles/glow/glowclient.h
index 9de73126..faa12e62 100644
--- a/kwin-styles/glow/glowclient.h
+++ b/kwin-styles/glow/glowclient.h
@@ -43,30 +43,30 @@ class GlowButtonFactory;
struct GlowTheme
{
- QSize buttonSize;
+ TQSize buttonSize;
- QString backgroundPixmap;
- QString backgroundAlphaPixmap;
-
- QString stickyOnPixmap;
- QString stickyOffPixmap;
- QString maximizeOnPixmap;
- QString maximizeOffPixmap;
- QString helpPixmap;
- QString closePixmap;
- QString iconifyPixmap;
-
- QString stickyOnGlowPixmap;
- QString stickyOffGlowPixmap;
- QString maximizeOnGlowPixmap;
- QString maximizeOffGlowPixmap;
- QString helpGlowPixmap;
- QString closeGlowPixmap;
- QString iconifyGlowPixmap;
+ TQString backgroundPixmap;
+ TQString backgroundAlphaPixmap;
+
+ TQString stickyOnPixmap;
+ TQString stickyOffPixmap;
+ TQString maximizeOnPixmap;
+ TQString maximizeOffPixmap;
+ TQString helpPixmap;
+ TQString closePixmap;
+ TQString iconifyPixmap;
+
+ TQString stickyOnGlowPixmap;
+ TQString stickyOffGlowPixmap;
+ TQString maximizeOnGlowPixmap;
+ TQString maximizeOffGlowPixmap;
+ TQString helpGlowPixmap;
+ TQString closeGlowPixmap;
+ TQString iconifyGlowPixmap;
};
static GlowTheme default_glow_theme = {
- QSize (17, 17),
+ TQSize (17, 17),
"background.png", "background_alpha.png",
"stickyon.png", "stickyoff.png",
"maximizeon.png", "maximizeoff.png",
@@ -86,14 +86,14 @@ public:
void load (KDecorationFactory *factory);
- QColor stickyButtonGlowColor;
- QColor helpButtonGlowColor;
- QColor iconifyButtonGlowColor;
- QColor maximizeButtonGlowColor;
- QColor closeButtonGlowColor;
+ TQColor stickyButtonGlowColor;
+ TQColor helpButtonGlowColor;
+ TQColor iconifyButtonGlowColor;
+ TQColor maximizeButtonGlowColor;
+ TQColor closeButtonGlowColor;
bool showResizeHandle;
int titlebarGradientType;
- QString themeName;
+ TQString themeName;
};
//-----------------------------------------------------------------------------
@@ -113,9 +113,9 @@ public:
virtual KDecoration* createDecoration( KDecorationBridge* b );
virtual bool reset( unsigned long changed );
virtual bool supports( Ability ability );
- QValueList< GlowClientGlobals::BorderSize > borderSizes() const;
+ TQValueList< GlowClientGlobals::BorderSize > borderSizes() const;
- QString getPixmapName(PixmapType type, bool isActive);
+ TQString getPixmapName(PixmapType type, bool isActive);
GlowTheme * theme() const { return _theme; }
GlowClientConfig * config() const { return _config; }
@@ -134,7 +134,7 @@ private:
bool createPixmaps();
void deletePixmaps();
bool createPixmap(PixmapType type,bool isActive);
- const QString getPixmapTypeName(PixmapType type);
+ const TQString getPixmapTypeName(PixmapType type);
};
//-----------------------------------------------------------------------------
@@ -150,23 +150,23 @@ public:
virtual void init();
virtual void borders( int&, int&, int&, int& ) const;
- virtual void resize( const QSize& );
- virtual QSize minimumSize() const;
+ virtual void resize( const TQSize& );
+ virtual TQSize minimumSize() const;
protected:
- virtual void resizeEvent( QResizeEvent * );
- virtual void paintEvent( QPaintEvent * );
- virtual void showEvent( QShowEvent * );
- virtual void mouseDoubleClickEvent( QMouseEvent * );
- virtual void wheelEvent( QWheelEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
+ virtual void paintEvent( TQPaintEvent * );
+ virtual void showEvent( TQShowEvent * );
+ virtual void mouseDoubleClickEvent( TQMouseEvent * );
+ virtual void wheelEvent( TQWheelEvent * );
virtual void maximizeChange();
virtual void activeChange();
virtual void iconChange();
virtual void desktopChange();
virtual void shadeChange();
virtual void captionChange();
- virtual Position mousePosition(const QPoint &) const;
- virtual bool eventFilter( QObject* o, QEvent* e );
+ virtual Position mousePosition(const TQPoint &) const;
+ virtual bool eventFilter( TQObject* o, TQEvent* e );
private:
std::vector<GlowButton*> m_buttonList;
@@ -177,11 +177,11 @@ private:
GlowButton *m_minimizeButton;
GlowButton *m_maximizeButton;
GlowButton *m_closeButton;
- QBoxLayout *m_leftButtonLayout;
- QBoxLayout *m_rightButtonLayout;
- QSpacerItem * _bottom_spacer;
- QSpacerItem * _title_spacer;
- QVBoxLayout * _main_layout;
+ TQBoxLayout *m_leftButtonLayout;
+ TQBoxLayout *m_rightButtonLayout;
+ TQSpacerItem * _bottom_spacer;
+ TQSpacerItem * _title_spacer;
+ TQVBoxLayout * _main_layout;
void createButtons();
void updateButtonPositions();