diff options
| author | 2008-06-30 13:56:38 +0000 | |
|---|---|---|
| committer | 2008-06-30 13:56:38 +0000 | |
| commit | daacd749bb954a587013d26d5b1f965b7cf60d8b (patch) | |
| tree | 31d49f7d816af250722d101fea2f399a6a222164 /src | |
| parent | cleaned up kvistyledcontrols references on kvirc (complete) and modules (only... (diff) | |
| download | KVIrc-daacd749bb954a587013d26d5b1f965b7cf60d8b.tar.gz KVIrc-daacd749bb954a587013d26d5b1f965b7cf60d8b.tar.bz2 KVIrc-daacd749bb954a587013d26d5b1f965b7cf60d8b.zip | |
trashed kvi_styledcontrols
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@1972 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src')
59 files changed, 211 insertions, 715 deletions
diff --git a/src/kvirc/ui/kvi_styled_controls.cpp b/src/kvirc/ui/kvi_styled_controls.cpp deleted file mode 100644 index 162244f1c..000000000 --- a/src/kvirc/ui/kvi_styled_controls.cpp +++ /dev/null @@ -1,352 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// File : kvi_styled_controls.cpp -// Creation date : 19 Jan 2006 GMT by Alexey Uzhva -// -// This toolbar is part of the KVirc irc client distribution -// Copyright (C) 2006 Alexey Uzhva -// -// This program is FREE software. You can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your opinion) any later version. -// -// This program is distributed in the HOPE that it will be USEFUL, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -// See the GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, write to the Free Software Foundation, -// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -/////////////////////////////////////////////////////////////////////////////// - - -#define __KVIRC__ -/* -#include "kvi_styled_controls.h" -#include "kvi_iconmanager.h" -#include "kvi_app.h" -#include "kvi_options.h" -#include "kvi_tal_toolbar.h" - -#include <QPainter> -#include <QImage> -#include <QEvent> -#include <QTimer> -#include <QPaintEvent> - -KviStyledControlInternal::KviStyledControlInternal( KviStyledControl* control) -:QObject(0) -{ - m_pControl=control; -} - -KviStyledControlInternal::~KviStyledControlInternal() -{ - -} - -bool KviStyledControlInternal::eventFilter( QObject *obj, QEvent *ev ) -{ - if(ev->type()==QEvent::Enter) - { - m_pControl->enterEvent(ev); - } else if(ev->type()==QEvent::Leave) { - m_pControl->leaveEvent(ev); - } - return FALSE; -} - -void KviStyledControlInternal::paintTimerShot () -{ -// debug("%s %s %i",__FILE__,__FUNCTION__,__LINE__); -// debug("%s %i",__FUNCTION__,m_pControl->m_iStepNumber); - if(m_pControl->m_bMouseEnter) - { - m_pControl->m_iStepNumber++; - if(m_pControl->m_iStepNumber>=KVI_STYLE_NUM_STEPS) - { - m_pControl->m_iStepNumber=KVI_STYLE_NUM_STEPS; - m_pControl->m_pTimer->stop(); - } - } else { - m_pControl->m_iStepNumber--; - if(m_pControl->m_iStepNumber<=0) - { - m_pControl->m_iStepNumber=0; - m_pControl->m_pTimer->stop(); - } - } - m_pControl->m_pWidget->repaint(); -} - -KviStyledControl::KviStyledControl(QWidget* w) -{ - m_pWidget=w; - m_iStepNumber=0; - m_bMouseEnter=0; - m_pInternal=new KviStyledControlInternal(this); - m_pTimer = new QTimer(m_pInternal); - m_pWidget->installEventFilter(m_pInternal); -} - -KviStyledControl::~KviStyledControl() -{ - delete m_pTimer; - delete m_pInternal; -} - -void KviStyledControl::enterEvent ( QEvent * ) -{ -// debug("%s %s %i",__FILE__,__FUNCTION__,__LINE__); - if(m_pWidget->isEnabled() && KVI_OPTION_BOOL(KviOption_boolEnableVisualEffects)) - { - if(m_iStepNumber<KVI_STYLE_NUM_STEPS) - { - if(!m_pTimer->isActive()) - { - m_pTimer->connect( m_pTimer, SIGNAL(timeout()), m_pInternal, SLOT(paintTimerShot()) ); - m_pTimer->start(KVI_STYLE_TIMER_STEP); - } - } - m_bMouseEnter=1; - m_iStepNumber++; - m_pWidget->repaint(); - } -} - -void KviStyledControl::leaveEvent ( QEvent * ) -{ -// debug("%s %s %i",__FILE__,__FUNCTION__,__LINE__); - if(m_pWidget->isEnabled() && KVI_OPTION_BOOL(KviOption_boolEnableVisualEffects)) - { - if(m_iStepNumber>0) - { - if(!m_pTimer->isActive()) - { - m_pTimer->connect( m_pTimer, SIGNAL(timeout()), m_pInternal, SLOT(paintTimerShot()) ); - m_pTimer->start(KVI_STYLE_TIMER_STEP); - } - } - m_bMouseEnter=0; - m_iStepNumber--; - m_pWidget->repaint(); - } -} - - -KviStyledCheckBox::KviStyledCheckBox ( QWidget * parent, const char * name ) -: QCheckBox(parent), KviStyledControl(this) -{ - setObjectName(name); - //setWFlags(WNoAutoErase); - -} - -KviStyledCheckBox::KviStyledCheckBox ( const QString & text, QWidget * parent, const char * name ) -: QCheckBox(text,parent), KviStyledControl(this) -{ - setObjectName(name); - //setWFlags(WNoAutoErase); -} - -KviStyledCheckBox::~KviStyledCheckBox() -{ -} - -void KviStyledCheckBox::paintEvent ( QPaintEvent * event) -{ - //debug("%s %s %i %i %i",__FILE__,__FUNCTION__,__LINE__,m_bMouseEnter,m_iStepNumber); - if(KVI_OPTION_BOOL(KviOption_boolEnableVisualEffects)) - { - - QRect rect=event->rect(); - - QPainter p( this); - p.translate(-rect.x(), -rect.y()); - - QPixmap* pStoredPix = 0; - - if(isChecked()) - pStoredPix=g_pIconManager->getBigIcon("kvi_checkbox_selected.png"); - else - pStoredPix=g_pIconManager->getBigIcon("kvi_checkbox_unselected.png"); - //debug("%s %s %i %i %i",__FILE__,__FUNCTION__,__LINE__,m_bMouseEnter,m_iStepNumber); - if(pStoredPix) - { - //debug("%s %s %i %i %i",__FILE__,__FUNCTION__,__LINE__,m_bMouseEnter,m_iStepNumber); - QPixmap pix=*pStoredPix; - if(m_iStepNumber && isEnabled()) - { - QImage image = pix.toImage().convertToFormat(QImage::Format_ARGB32);; - for(int x=0; x<image.width(); x++) - for(int y=0; y<image.height(); y++) - { - QRgb rgb=image.pixel(x,y); - rgb=qRgba( - qRed(rgb)+KVI_STYLE_COLOR_DIFF/KVI_STYLE_NUM_STEPS*m_iStepNumber < 255 ? qRed(rgb)+KVI_STYLE_COLOR_DIFF/KVI_STYLE_NUM_STEPS*m_iStepNumber : 255 , - qGreen(rgb)+KVI_STYLE_COLOR_DIFF/KVI_STYLE_NUM_STEPS*m_iStepNumber < 255 ? qGreen(rgb)+KVI_STYLE_COLOR_DIFF/KVI_STYLE_NUM_STEPS*m_iStepNumber : 255, - qBlue(rgb), - qAlpha(rgb) - ); - image.setPixel(x,y,rgb); - } - p.drawImage(0,0,image); - } else if( !isEnabled()) { - QImage image = pix.toImage().convertToFormat(QImage::Format_ARGB32); - for(int x=0; x<image.width(); x++) - for(int y=0; y<image.height(); y++) - { - //- From Black to Gray conversion for disabled mode. - QRgb rgb=image.pixel(x,y); - rgb=qRgba( - qRed(rgb)+KVI_STYLE_COLOR_DIFF/KVI_STYLE_NUM_STEPS*m_iStepNumber == 0 ? 180 : qRed(rgb)+KVI_STYLE_COLOR_DIFF/KVI_STYLE_NUM_STEPS*m_iStepNumber, - qGreen(rgb)+KVI_STYLE_COLOR_DIFF/KVI_STYLE_NUM_STEPS*m_iStepNumber == 0 ? 180 : qGreen(rgb)+KVI_STYLE_COLOR_DIFF/KVI_STYLE_NUM_STEPS*m_iStepNumber, - qBlue(rgb)+KVI_STYLE_COLOR_DIFF/KVI_STYLE_NUM_STEPS*m_iStepNumber == 0 ? 180 : qBlue(rgb)+KVI_STYLE_COLOR_DIFF/KVI_STYLE_NUM_STEPS*m_iStepNumber, - qAlpha(rgb) - ); - image.setPixel(x,y,rgb); - } - p.drawImage(0,0,image); - } else { - p.drawPixmap(0,0,pix); - } - //debug("%s %s %i %i %i",__FILE__,__FUNCTION__,__LINE__,m_bMouseEnter,m_iStepNumber); - QString szText=text(); - szText=szText.remove("&"); - p.drawText(pix.width()+3,0,width(),height(),0,szText); - //debug("%s %s %i %i %i",__FILE__,__FUNCTION__,__LINE__,m_bMouseEnter,m_iStepNumber); - } else { - QCheckBox::paintEvent(event); - } - } else - QCheckBox::paintEvent(event); -} - -KviStyledToolButton::KviStyledToolButton( QWidget * parent, const char * name ) -: QToolButton(parent), KviStyledControl(this), bShowSubmenuIndicator(false) -{ - //setWFlags(WNoAutoErase); - setObjectName(name); - resizeEvent(0); -} - -KviStyledToolButton::KviStyledToolButton ( const QIcon & iconSet, const QString & textLabel, const QString & grouptext, QObject * receiver, const char * slot, KviTalToolBar * parent, const QString &name) -: QToolButton(iconSet,textLabel,grouptext,receiver,slot,parent,name.toUtf8().data()), KviStyledControl(this), bShowSubmenuIndicator(false) -{ -// setWFlags(WNoAutoErase); - resizeEvent(0); -} - -KviStyledToolButton::~KviStyledToolButton() -{ -} - -void KviStyledToolButton::setShowSubmenuIndicator(bool bShow) -{ - bShowSubmenuIndicator=bShow; - resizeEvent(0); -} - -void KviStyledToolButton::paintEvent ( QPaintEvent * event) -{ - if(KVI_OPTION_BOOL(KviOption_boolEnableVisualEffects)) - { - QPixmap* pArrowPix = 0; - int iWidth=width(); - int iPixWidth=0; - if(bShowSubmenuIndicator) - { - if(pArrowPix=g_pIconManager->getBigIcon("kvi_toolbutton_menuindicator.png")) - iPixWidth=pArrowPix->width(); - } - bool bActive= isChecked() || m_bMouseEnter; - QRect rect=event->rect(); - - QPainter p(this); - p.setPen(bActive ? QColor(206,215,223) : palette().background().color()); - p.setBrush(bActive ? QBrush(QColor(206,215,223)) : palette().background()); - - p.drawRect(event->rect()); - if(bActive) - { - p.setPen(QColor(185,190,195)); - p.drawRect(0,0,iWidth,height()); - } - - p.translate(-rect.x(), -rect.y()); - QPixmap pix=iconSet().pixmap( - usesBigPixmap() ? QIconSet::Large : QIconSet::Small, - isEnabled() ? QIcon::Normal : QIconSet::Disabled, - isChecked() ? QIcon::On : QIcon::Off); - QPoint pos((iWidth-iPixWidth-pix.width())/2,(height()-pix.height())/2); - if(!pix.isNull()) - { - if(m_iStepNumber && isEnabled()) - { - QImage image = pix.toImage().convertToFormat(QImage::Format_ARGB32); - for(int x=0; x<image.width(); x++) - for(int y=0; y<image.height(); y++) - { - QRgb rgb=image.pixel(x,y); - rgb=qRgba( - qRed(rgb)+KVI_STYLE_COLOR_DIFF/KVI_STYLE_NUM_STEPS*m_iStepNumber < 255 ? qRed(rgb)+KVI_STYLE_COLOR_DIFF/KVI_STYLE_NUM_STEPS*m_iStepNumber : 255 , - qGreen(rgb)+KVI_STYLE_COLOR_DIFF/KVI_STYLE_NUM_STEPS*m_iStepNumber < 255 ? qGreen(rgb)+KVI_STYLE_COLOR_DIFF/KVI_STYLE_NUM_STEPS*m_iStepNumber : 255, - qBlue(rgb), - qAlpha(rgb) - ); - image.setPixel(x,y,rgb); - } - p.drawImage(pos,image); - } else if( !isEnabled()) { - QImage image = pix.toImage().convertToFormat(QImage::Format_ARGB32); - for(int x=0; x<image.width(); x++) - for(int y=0; y<image.height(); y++) - { - //- From Black to Gray conversion for disabled mode. - QRgb rgb=image.pixel(x,y); - rgb=qRgba( - qRed(rgb)+KVI_STYLE_COLOR_DIFF/KVI_STYLE_NUM_STEPS*m_iStepNumber == 0 ? 180 : qRed(rgb)+KVI_STYLE_COLOR_DIFF/KVI_STYLE_NUM_STEPS*m_iStepNumber, - qGreen(rgb)+KVI_STYLE_COLOR_DIFF/KVI_STYLE_NUM_STEPS*m_iStepNumber == 0 ? 180 : qGreen(rgb)+KVI_STYLE_COLOR_DIFF/KVI_STYLE_NUM_STEPS*m_iStepNumber, - qBlue(rgb)+KVI_STYLE_COLOR_DIFF/KVI_STYLE_NUM_STEPS*m_iStepNumber == 0 ? 180 : qBlue(rgb)+KVI_STYLE_COLOR_DIFF/KVI_STYLE_NUM_STEPS*m_iStepNumber, - qAlpha(rgb) - ); - image.setPixel(x,y,rgb); - } - p.drawImage(pos,image); - } else { - p.drawPixmap(pos,pix); - } - } - - if(pArrowPix) - { - pos.setX(pix.width()+4); - pos.setY((height()-pArrowPix->height())/2); - p.drawPixmap(pos,*pArrowPix); - } - - } else { - QToolButton::paintEvent(event); - } -} - -void KviStyledToolButton::resizeEvent ( QResizeEvent * e) -{ - QPixmap* pStoredPix = 0; - if(pStoredPix=g_pIconManager->getBigIcon("kvi_toolbutton_menuindicator.png")) - { - QPixmap pix=iconSet().pixmap( - iconSize().height() > 22 ? QIconSet::Large : QIconSet::Small, - isEnabled() ? QIcon::Normal : QIconSet::Disabled, - isChecked() ? QIcon::On : QIcon::Off); - - setMinimumWidth(bShowSubmenuIndicator ? pix.width()+8+pStoredPix->width() : pix.width()); - } -} -*/ -#ifndef COMPILE_USE_STANDALONE_MOC_SOURCES -#include "kvi_styled_controls.moc" -#endif //!COMPILE_USE_STANDALONE_MOC_SOURCES diff --git a/src/kvirc/ui/kvi_styled_controls.h b/src/kvirc/ui/kvi_styled_controls.h deleted file mode 100644 index 36deadf53..000000000 --- a/src/kvirc/ui/kvi_styled_controls.h +++ /dev/null @@ -1,108 +0,0 @@ -#ifndef _KVI_STYLED_CONTROLS_H_ -#define _KVI_STYLED_CONTROLS_H_ - -/////////////////////////////////////////////////////////////////////////////// -// -// File : kvi_styled_controls.h -// Creation date : 19 Jan 2006 GMT by Alexey Uzhva -// -// This toolbar is part of the KVirc irc client distribution -// Copyright (C) 2006 Alexey Uzhva -// -// This program is FREE software. You can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your opinion) any later version. -// -// This program is distributed in the HOPE that it will be USEFUL, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -// See the GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, write to the Free Software Foundation, -// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -/////////////////////////////////////////////////////////////////////////////// -/* -#include "kvi_settings.h" -#include "kvi_heapobject.h" -#include <QEvent> -#include <QTimer> -*/ -#include <QCheckBox> -#include <QToolButton> - -#define KviStyledCheckBox QCheckBox -#define KviStyledToolButton QToolButton - -/* -class KviStyledControl; -class KviTalToolBar; - -#define KVI_STYLE_NUM_STEPS 20 -#define KVI_STYLE_COLOR_DIFF 60 -#define KVI_STYLE_TIMER_STEP 18 - -// FIXME: THIS STUFF SHOULD BE REMOVED. -// HARDCODING STYLES IS A BAD GUI PRACTICE. - -class KVIRC_API KviStyledControlInternal : public QObject -{ - Q_OBJECT -public: - KviStyledControlInternal( KviStyledControl* control ); - virtual ~KviStyledControlInternal(); -public slots: - virtual void paintTimerShot(); -protected: - bool eventFilter( QObject *obj, QEvent *ev ); -protected: - KviStyledControl * m_pControl; -}; - -class KVIRC_API KviStyledControl -{ - friend class KviStyledControlInternal; -public: - KviStyledControl(QWidget*); - virtual ~KviStyledControl(); -protected: - virtual void enterEvent ( QEvent * ); - virtual void leaveEvent ( QEvent * ); - - int m_bMouseEnter; - int m_iStepNumber; - QTimer * m_pTimer; - KviStyledControlInternal * m_pInternal; - QWidget * m_pWidget; -}; - -class KVIRC_API KviStyledCheckBox : public QCheckBox, public KviStyledControl -{ - Q_OBJECT -public: - KviStyledCheckBox ( QWidget * parent, const char * name = 0 ); - KviStyledCheckBox ( const QString & text, QWidget * parent, const char * name = 0 ); - ~KviStyledCheckBox(); -protected: - virtual void paintEvent ( QPaintEvent * ); -}; - -class KVIRC_API KviStyledToolButton : public QToolButton, public KviStyledControl -{ - Q_OBJECT -private: - bool bShowSubmenuIndicator; -public: - KviStyledToolButton ( QWidget * parent, const char * name = 0 ); - KviStyledToolButton ( const QIcon & iconSet, const QString & textLabel, const QString & grouptext, QObject * receiver, const char * slot, KviTalToolBar * parent, const QString &name=QString() ); - ~KviStyledToolButton(); - - void setShowSubmenuIndicator(bool bShow); -protected: - virtual void paintEvent ( QPaintEvent * ); - virtual void resizeEvent ( QResizeEvent * ); -}; -*/ -#endif diff --git a/src/modules/actioneditor/actioneditor.cpp b/src/modules/actioneditor/actioneditor.cpp index abc0c4560..9aaffe16e 100644 --- a/src/modules/actioneditor/actioneditor.cpp +++ b/src/modules/actioneditor/actioneditor.cpp @@ -53,8 +53,6 @@ #include <QMessageBox>
#include <QLineEdit>
#include <QComboBox>
-#include "kvi_styled_controls.h"
-#include "kvi_styled_controls.h"
#include <QPainter>
#include <QTabWidget>
#include <QLabel>
@@ -151,7 +149,7 @@ KviSingleActionEditor::KviSingleActionEditor(QWidget * par,KviActionEditor * ed) gl->addWidget(l,2,0);
m_pSmallIconEdit = new QLineEdit(tab);
gl->addWidget(m_pSmallIconEdit,2,1);
- m_pSmallIconButton = new KviStyledToolButton(tab);
+ m_pSmallIconButton = new QToolButton(tab);
m_pSmallIconButton->setMinimumSize(QSize(20,20));
connect(m_pSmallIconButton,SIGNAL(clicked()),this,SLOT(chooseSmallIcon()));
gl->addWidget(m_pSmallIconButton,2,2);
@@ -165,7 +163,7 @@ KviSingleActionEditor::KviSingleActionEditor(QWidget * par,KviActionEditor * ed) gl->addWidget(l,3,0);
m_pBigIconEdit = new QLineEdit(tab);
gl->addWidget(m_pBigIconEdit,3,1);
- m_pBigIconButton = new KviStyledToolButton(tab);
+ m_pBigIconButton = new QToolButton(tab);
m_pBigIconButton->setMinimumSize(QSize(48,48));
m_pBigIconButton->setIconSize(QSize(32,32));
connect(m_pBigIconButton,SIGNAL(clicked()),this,SLOT(chooseBigIcon()));
@@ -205,7 +203,7 @@ KviSingleActionEditor::KviSingleActionEditor(QWidget * par,KviActionEditor * ed) gl = new QGridLayout(tab);
- m_pNeedsContextCheck = new KviStyledCheckBox(__tr2qs("Needs IRC Context"),tab);
+ m_pNeedsContextCheck = new QCheckBox(__tr2qs("Needs IRC Context"),tab);
connect(m_pNeedsContextCheck,SIGNAL(toggled(bool)),this,SLOT(needsContextCheckToggled(bool)));
m_pNeedsContextCheck->setToolTip(__tr2qs("Check this option if this action should be enabled only when " \
"the active window belongs to an irc context"));
@@ -217,7 +215,7 @@ KviSingleActionEditor::KviSingleActionEditor(QWidget * par,KviActionEditor * ed) l->setMinimumWidth(40);
gl->addWidget(l,1,0);
- m_pNeedsConnectionCheck = new KviStyledCheckBox(__tr2qs("Needs IRC Connection"),tab);
+ m_pNeedsConnectionCheck = new QCheckBox(__tr2qs("Needs IRC Connection"),tab);
connect(m_pNeedsConnectionCheck,SIGNAL(toggled(bool)),this,SLOT(needsConnectionCheckToggled(bool)));
m_pNeedsConnectionCheck->setToolTip(__tr2qs("Check this option if this action should be enabled only when " \
"the active window has an active IRC connection"));
@@ -229,13 +227,13 @@ KviSingleActionEditor::KviSingleActionEditor(QWidget * par,KviActionEditor * ed) l->setMinimumWidth(40);
gl->addWidget(l,2,1);
- m_pEnableAtLoginCheck = new KviStyledCheckBox(__tr2qs("Enable at Login"),tab);
+ m_pEnableAtLoginCheck = new QCheckBox(__tr2qs("Enable at Login"),tab);
m_pEnableAtLoginCheck->setToolTip(__tr2qs("Check this option if this action should be enabled also during " \
"the login operations (so when the logical IRC connection hasn't been estabilished yet)"));
gl->addWidget(m_pEnableAtLoginCheck,2,2,1,2);
// gl->addMultiCellWidget(m_pEnableAtLoginCheck,2,2,2,3);
- m_pSpecificWindowsCheck = new KviStyledCheckBox(__tr2qs("Enable Only in Specified Windows"),tab);
+ m_pSpecificWindowsCheck = new QCheckBox(__tr2qs("Enable Only in Specified Windows"),tab);
connect(m_pSpecificWindowsCheck,SIGNAL(toggled(bool)),this,SLOT(specificWindowsCheckToggled(bool)));
m_pSpecificWindowsCheck->setToolTip(__tr2qs("Check this option if this action should be enabled only when " \
"the active window is of a specified type"));
@@ -243,46 +241,46 @@ KviSingleActionEditor::KviSingleActionEditor(QWidget * par,KviActionEditor * ed) // gl->addMultiCellWidget(m_pSpecificWindowsCheck,3,3,0,3);
- m_pWindowConsoleCheck = new KviStyledCheckBox(__tr2qs("Enable in Console Windows"),tab);
+ m_pWindowConsoleCheck = new QCheckBox(__tr2qs("Enable in Console Windows"),tab);
m_pWindowConsoleCheck->setToolTip(__tr2qs("Check this option if this action should be enabled only when " \
"the active window is a console"));
connect(m_pWindowConsoleCheck,SIGNAL(toggled(bool)),this,SLOT(channelQueryOrConsoleWindowCheckToggled(bool)));
gl->addWidget(m_pWindowConsoleCheck,4,1,1,3);
// gl->addMultiCellWidget(m_pWindowConsoleCheck,4,4,1,3);
- m_pConsoleOnlyIfUsersSelectedCheck = new KviStyledCheckBox(__tr2qs("Only If There Are Selected Users"),tab);
+ m_pConsoleOnlyIfUsersSelectedCheck = new QCheckBox(__tr2qs("Only If There Are Selected Users"),tab);
m_pConsoleOnlyIfUsersSelectedCheck->setToolTip(__tr2qs("This will enable the action only if there are " \
"selected users in the active window"));
gl->addWidget(m_pConsoleOnlyIfUsersSelectedCheck,5,2,1,2);
// gl->addMultiCellWidget(m_pConsoleOnlyIfUsersSelectedCheck,5,5,2,3);
- m_pWindowChannelCheck = new KviStyledCheckBox(__tr2qs("Enable in Channel Windows"),tab);
+ m_pWindowChannelCheck = new QCheckBox(__tr2qs("Enable in Channel Windows"),tab);
m_pWindowChannelCheck->setToolTip(__tr2qs("Check this option if this action should be enabled only when " \
"the active window is a channel"));
connect(m_pWindowChannelCheck,SIGNAL(toggled(bool)),this,SLOT(channelQueryOrConsoleWindowCheckToggled(bool)));
gl->addWidget(m_pWindowChannelCheck,6,1,1,3);
// gl->addMultiCellWidget(m_pWindowChannelCheck,6,6,1,3);
- m_pChannelOnlyIfUsersSelectedCheck = new KviStyledCheckBox(__tr2qs("Only If There Are Selected Users"),tab);
+ m_pChannelOnlyIfUsersSelectedCheck = new QCheckBox(__tr2qs("Only If There Are Selected Users"),tab);
m_pChannelOnlyIfUsersSelectedCheck->setToolTip(__tr2qs("This will enable the action only if there are " \
"selected users in the active window"));
gl->addWidget(m_pChannelOnlyIfUsersSelectedCheck,7,2,1,2);
// gl->addMultiCellWidget(m_pChannelOnlyIfUsersSelectedCheck,7,7,2,3);
- m_pWindowQueryCheck = new KviStyledCheckBox(__tr2qs("Enable in Query Windows"),tab);
+ m_pWindowQueryCheck = new QCheckBox(__tr2qs("Enable in Query Windows"),tab);
m_pWindowQueryCheck->setToolTip(__tr2qs("Check this option if this action should be enabled only when " \
"the active window is a query"));
connect(m_pWindowQueryCheck,SIGNAL(toggled(bool)),this,SLOT(channelQueryOrConsoleWindowCheckToggled(bool)));
gl->addWidget(m_pWindowQueryCheck,8,1,1,3);
// gl->addMultiCellWidget(m_pWindowQueryCheck,8,8,1,3);
- m_pQueryOnlyIfUsersSelectedCheck = new KviStyledCheckBox(__tr2qs("Only If There Are Selected Users"),tab);
+ m_pQueryOnlyIfUsersSelectedCheck = new QCheckBox(__tr2qs("Only If There Are Selected Users"),tab);
m_pQueryOnlyIfUsersSelectedCheck->setToolTip(__tr2qs("This will enable the action only if there are " \
"selected users in the active window"));
gl->addWidget(m_pQueryOnlyIfUsersSelectedCheck,9,2,1,2);
// gl->addMultiCellWidget(m_pQueryOnlyIfUsersSelectedCheck,9,9,2,3);
- m_pWindowDccChatCheck = new KviStyledCheckBox(__tr2qs("Enable in DCC Chat Windows"),tab);
+ m_pWindowDccChatCheck = new QCheckBox(__tr2qs("Enable in DCC Chat Windows"),tab);
m_pWindowDccChatCheck->setToolTip(__tr2qs("Check this option if this action should be enabled only when " \
"the active window is a dcc chat"));
gl->addWidget(m_pWindowDccChatCheck,10,1,1,2);
diff --git a/src/modules/actioneditor/actioneditor.h b/src/modules/actioneditor/actioneditor.h index dc50e2a8d..68a4fea03 100644 --- a/src/modules/actioneditor/actioneditor.h +++ b/src/modules/actioneditor/actioneditor.h @@ -29,13 +29,12 @@ #include <QWidget> #include <QTextDocument> -#include "kvi_styled_controls.h" -#include "kvi_styled_controls.h" +#include <QToolButton> +#include <QCheckBox> class QLineEdit; class QComboBox; -class KviStyledToolButton; class QSimpleRichText; class QPushButton; class QSplitter; @@ -126,19 +125,19 @@ protected: QLineEdit * m_pDescriptionEdit; QLineEdit * m_pSmallIconEdit; QLineEdit * m_pBigIconEdit; - KviStyledToolButton * m_pSmallIconButton; - KviStyledToolButton * m_pBigIconButton; - KviStyledCheckBox * m_pNeedsContextCheck; - KviStyledCheckBox * m_pNeedsConnectionCheck; - KviStyledCheckBox * m_pEnableAtLoginCheck; - KviStyledCheckBox * m_pSpecificWindowsCheck; - KviStyledCheckBox * m_pWindowConsoleCheck; - KviStyledCheckBox * m_pWindowChannelCheck; - KviStyledCheckBox * m_pWindowQueryCheck; - KviStyledCheckBox * m_pWindowDccChatCheck; - KviStyledCheckBox * m_pConsoleOnlyIfUsersSelectedCheck; - KviStyledCheckBox * m_pChannelOnlyIfUsersSelectedCheck; - KviStyledCheckBox * m_pQueryOnlyIfUsersSelectedCheck; + QToolButton * m_pSmallIconButton; + QToolButton * m_pBigIconButton; + QCheckBox * m_pNeedsContextCheck; + QCheckBox * m_pNeedsConnectionCheck; + QCheckBox * m_pEnableAtLoginCheck; + QCheckBox * m_pSpecificWindowsCheck; + QCheckBox * m_pWindowConsoleCheck; + QCheckBox * m_pWindowChannelCheck; + QCheckBox * m_pWindowQueryCheck; + QCheckBox * m_pWindowDccChatCheck; + QCheckBox * m_pConsoleOnlyIfUsersSelectedCheck; + QCheckBox * m_pChannelOnlyIfUsersSelectedCheck; + QCheckBox * m_pQueryOnlyIfUsersSelectedCheck; public: KviActionData * actionData(){ return m_pActionData; }; void setActionData(KviActionData * d); diff --git a/src/modules/addon/managementdialog.cpp b/src/modules/addon/managementdialog.cpp index c7e708006..5fd398472 100644 --- a/src/modules/addon/managementdialog.cpp +++ b/src/modules/addon/managementdialog.cpp @@ -47,7 +47,6 @@ #include <QEvent>
#include <QCloseEvent>
#include <QPushButton>
-#include "kvi_styled_controls.h"
#include <QLayout>
#include <QApplication>
diff --git a/src/modules/addon/packaddondialog.cpp b/src/modules/addon/packaddondialog.cpp index 0fc7bb416..b641563c3 100644 --- a/src/modules/addon/packaddondialog.cpp +++ b/src/modules/addon/packaddondialog.cpp @@ -33,7 +33,6 @@ #include "kvi_app.h" #include "kvi_frame.h" #include "kvi_iconmanager.h" -#include "kvi_styled_controls.h" #include "kvi_packagefile.h" #include "kvi_fileextensions.h" #include "kvi_filedialog.h" diff --git a/src/modules/channelsjoin/channelsjoinwindow.cpp b/src/modules/channelsjoin/channelsjoinwindow.cpp index badaf2226..75bacd393 100644 --- a/src/modules/channelsjoin/channelsjoinwindow.cpp +++ b/src/modules/channelsjoin/channelsjoinwindow.cpp @@ -39,7 +39,6 @@ #include <QLabel> #include <QLineEdit> #include <QLayout> -#include "kvi_styled_controls.h" #include <QPushButton> #include <QEvent> #include <QCloseEvent> @@ -100,7 +99,7 @@ KviChannelsJoinWindow::KviChannelsJoinWindow(QWidget * par, const char * name) g->addWidget(m_pJoinButton,2,0,1,2,Qt::AlignHCenter); // g->addMultiCellWidget(m_pJoinButton,2,2,0,1,Qt::AlignHCenter); - m_pShowAtStartupCheck = new KviStyledCheckBox(__tr2qs("Show this window after connecting"),this); + m_pShowAtStartupCheck = new QCheckBox(__tr2qs("Show this window after connecting"),this); m_pShowAtStartupCheck->setChecked(KVI_OPTION_BOOL(KviOption_boolShowChannelsJoinOnIrc)); g->addWidget(m_pShowAtStartupCheck,3,0); diff --git a/src/modules/channelsjoin/channelsjoinwindow.h b/src/modules/channelsjoin/channelsjoinwindow.h index 5a714c18c..c99d8eba3 100644 --- a/src/modules/channelsjoin/channelsjoinwindow.h +++ b/src/modules/channelsjoin/channelsjoinwindow.h @@ -25,9 +25,9 @@ #define _CHANNELSJOIN_H_ #include "kvi_window.h" #include "kvi_string.h" -#include "kvi_styled_controls.h" #include "kvi_tal_treewidget.h" +#include <QCheckBox> #include <QDialog> class QPushButton; @@ -47,8 +47,8 @@ protected: KviTalTreeWidget * m_pListView; KviTalGroupBox * m_pGroupBox; QLineEdit * m_pPass; - KviStyledCheckBox * m_pShowAtStartupCheck; - KviStyledCheckBox * m_pCloseAfterJoinCheck; + QCheckBox * m_pShowAtStartupCheck; + QCheckBox * m_pCloseAfterJoinCheck; QPushButton * m_pJoinButton; KviConsole * m_pConsole; public: diff --git a/src/modules/codetester/codetester.cpp b/src/modules/codetester/codetester.cpp index b8853f0a2..aa64c5c98 100644 --- a/src/modules/codetester/codetester.cpp +++ b/src/modules/codetester/codetester.cpp @@ -38,7 +38,6 @@ #include <QPushButton> #include <QLayout> #include <QLabel> -#include "kvi_styled_controls.h" extern KviPointerList<KviCodeTesterWindow> * g_pCodeTesterWindowList; diff --git a/src/modules/dcc/send.cpp b/src/modules/dcc/send.cpp index 04f0469ba..aa9a001be 100644 --- a/src/modules/dcc/send.cpp +++ b/src/modules/dcc/send.cpp @@ -53,7 +53,6 @@ #include "kvi_ircconnectionuserinfo.h" #include "kvi_sparser.h" #include "kvi_kvs_script.h" -#include "kvi_styled_controls.h" #ifdef COMPILE_ON_WINDOWS // Ugly Windoze compiler... @@ -64,7 +63,6 @@ #include <QPainter> #include <QDateTime> #include <qglobal.h> -#include "kvi_styled_controls.h" #include <QSpinBox> #include <QLayout> #include <QPushButton> @@ -1824,7 +1822,7 @@ KviDccFileTransferBandwidthDialog::KviDccFileTransferBandwidthDialog(QWidget * p szText = t->isFileUpload() ? __tr2qs_ctx("Limit upload bandwidth to","dcc") : __tr2qs_ctx("Limit download bandwidth to","dcc"); - m_pEnableLimitCheck = new KviStyledCheckBox(szText,this); + m_pEnableLimitCheck = new QCheckBox(szText,this); g->addWidget(m_pEnableLimitCheck,0,0); m_pEnableLimitCheck->setChecked((iVal >= 0) && (iVal < MAX_DCC_BANDWIDTH_LIMIT)); diff --git a/src/modules/dcc/send.h b/src/modules/dcc/send.h index b783c8512..036339091 100644 --- a/src/modules/dcc/send.h +++ b/src/modules/dcc/send.h @@ -34,7 +34,6 @@ #include "kvi_pointerlist.h" #include "kvi_filetransfer.h" #include "kvi_time.h" -#include "kvi_styled_controls.h" #include "kvi_tal_popupmenu.h" #include "kvi_tal_hbox.h" #include "kvi_tal_vbox.h" @@ -43,6 +42,7 @@ #include <QProgressBar> #include <QFile> #include <QDialog> +#include <QCheckBox> class QSpinBox; class QTimer; @@ -156,7 +156,7 @@ public: ~KviDccFileTransferBandwidthDialog(); protected: KviDccFileTransfer * m_pTransfer; - KviStyledCheckBox * m_pEnableLimitCheck; + QCheckBox * m_pEnableLimitCheck; QSpinBox * m_pLimitBox; protected: virtual void closeEvent(QCloseEvent *e); diff --git a/src/modules/dcc/voice.cpp b/src/modules/dcc/voice.cpp index f9c40b780..a8d6116cb 100644 --- a/src/modules/dcc/voice.cpp +++ b/src/modules/dcc/voice.cpp @@ -680,7 +680,7 @@ KviDccVoice::KviDccVoice(KviFrame *pFrm,KviDccDescriptor * dcc,const char * name m_pVolumeSlider->setMaximumHeight(2*m_pPlayingLabel->height()); connect(m_pVolumeSlider, SIGNAL(valueChanged(int)), this, SLOT(setMixerVolume(int))); - m_pTalkButton = new KviStyledToolButton(m_pHBox); + m_pTalkButton = new QToolButton(m_pHBox); m_pTalkButton->setEnabled(false); m_pTalkButton->setCheckable(true); QIcon iset; diff --git a/src/modules/dcc/voice.h b/src/modules/dcc/voice.h index 237adc10d..944551dd5 100644 --- a/src/modules/dcc/voice.h +++ b/src/modules/dcc/voice.h @@ -33,7 +33,7 @@ #include "kvi_tal_hbox.h" #include <QLabel> -#include "kvi_styled_controls.h" +#include <QToolButton> #include <QTimer> class QSlider; @@ -113,7 +113,7 @@ protected: QLabel * m_pOutputLabel; QLabel * m_pRecordingLabel; QLabel * m_pPlayingLabel; - KviStyledToolButton * m_pTalkButton; + QToolButton * m_pTalkButton; QTimer * m_pUpdateTimer; QString m_szTarget; KviDccVoiceThread * m_pSlaveThread; diff --git a/src/modules/editor/scripteditor.cpp b/src/modules/editor/scripteditor.cpp index 5fa06a1f6..0d7312b6a 100644 --- a/src/modules/editor/scripteditor.cpp +++ b/src/modules/editor/scripteditor.cpp @@ -41,10 +41,7 @@ #include <kvi_tal_groupbox.h>
#include "kvi_tal_scrollview.h"
-//FIXME
-
#include <QLayout>
-#include "kvi_styled_controls.h"
#include <QMessageBox>
#include <QTimer>
#include <QCursor>
@@ -919,7 +916,7 @@ KviScriptEditorImplementation::KviScriptEditorImplementation(QWidget * par) g->setRowStretch(0,1);
- KviStyledToolButton * b = new KviStyledToolButton(this);
+ QToolButton * b = new QToolButton(this);
b->setArrowType(Qt::DownArrow);
b->setObjectName("ToolButtonEditor");
@@ -932,7 +929,7 @@ KviScriptEditorImplementation::KviScriptEditorImplementation(QWidget * par) pop->insertSeparator();
pop->insertItem(__tr2qs_ctx("&Configure Editor...","editor"),this,SLOT(configureColors()));
b->setMenu(pop);
- b->setPopupMode(KviStyledToolButton::InstantPopup);
+ b->setPopupMode(QToolButton::InstantPopup);
g->setColumnStretch(1,1);
g->setColumnStretch(2,10);
@@ -1225,7 +1222,7 @@ KviScriptEditorReplaceDialog::KviScriptEditorReplaceDialog( QWidget* parent, con replacebutton->setEnabled( FALSE );
layout->addWidget( replacebutton, 3, 2 );
- checkReplaceAll = new KviStyledCheckBox( this);
+ checkReplaceAll = new QCheckBox( this);
checkReplaceAll->setObjectName("replaceAll" );
checkReplaceAll->setText(tr("&Replace in all Aliases"));
layout->addWidget( checkReplaceAll, 2, 0 );
diff --git a/src/modules/editor/scripteditor.h b/src/modules/editor/scripteditor.h index c6286bff5..6001f52e1 100644 --- a/src/modules/editor/scripteditor.h +++ b/src/modules/editor/scripteditor.h @@ -35,11 +35,10 @@ #include <QLabel> #include <QDialog> -#include "kvi_styled_controls.h" #include <QEvent> #include <QTextEdit> #include <QListWidget> - +#include <QCheckBox> // Q3PopupMenu #include <QSyntaxHighlighter> @@ -179,7 +178,7 @@ protected: QPushButton *findNext; // QPushButton *cancelbutton; - KviStyledCheckBox *checkReplaceAll; + QCheckBox *checkReplaceAll; QWidget *m_pParent; protected slots: void textChanged(const QString &); diff --git a/src/modules/filetransferwindow/filetransferwindow.h b/src/modules/filetransferwindow/filetransferwindow.h index 9e7457f50..a388bec16 100644 --- a/src/modules/filetransferwindow/filetransferwindow.h +++ b/src/modules/filetransferwindow/filetransferwindow.h @@ -36,7 +36,6 @@ #include "kvi_tal_popupmenu.h" #include "kvi_tal_itemdelegates.h" -#include "kvi_styled_controls.h" #include <QTimer> #include <QPixmap> diff --git a/src/modules/help/helpwidget.cpp b/src/modules/help/helpwidget.cpp index 9e5b7e3d6..176e9aa1d 100644 --- a/src/modules/help/helpwidget.cpp +++ b/src/modules/help/helpwidget.cpp @@ -29,14 +29,13 @@ #include "kvi_app.h" #include "kvi_msgbox.h" #include "kvi_module.h" -#include "kvi_styled_controls.h" #include "kvi_fileutils.h" #include <QToolButton> #include <QLineEdit> #include <QToolTip> #include <QTimer> -#include <QClipboard>
+#include <QClipboard> #include <QDir> extern Index * g_pDocIndex; @@ -56,18 +55,18 @@ KviHelpWidget::KviHelpWidget(QWidget * par,KviFrame * lpFrm,bool bIsStandalone) m_pTextBrowser->setFocusPolicy(Qt::NoFocus); m_pToolBar = new KviTalHBox(this); - m_pBtnIndex = new KviStyledToolButton(m_pToolBar); + m_pBtnIndex = new QToolButton(m_pToolBar); m_pBtnIndex->setIcon(*g_pIconManager->getBigIcon(KVI_BIGICON_HELPINDEX)); connect(m_pBtnIndex,SIGNAL(clicked()),this,SLOT(showIndex())); //m_pBtnIndex->setUsesBigPixmap(true); - m_pBtnBackward = new KviStyledToolButton(m_pToolBar); + m_pBtnBackward = new QToolButton(m_pToolBar); m_pBtnBackward->setIcon(*g_pIconManager->getBigIcon(KVI_BIGICON_HELPBACK)); connect(m_pBtnBackward,SIGNAL(clicked()),m_pTextBrowser,SLOT(backward())); m_pBtnBackward->setEnabled(false); //m_pBtnBackward->setUsesBigPixmap(true); - m_pBtnForward = new KviStyledToolButton(m_pToolBar); + m_pBtnForward = new QToolButton(m_pToolBar); m_pBtnForward->setIcon(*g_pIconManager->getBigIcon(KVI_BIGICON_HELPFORWARD)); connect(m_pBtnForward,SIGNAL(clicked()),m_pTextBrowser,SLOT(forward())); m_pBtnForward->setEnabled(false); @@ -77,7 +76,7 @@ KviHelpWidget::KviHelpWidget(QWidget * par,KviFrame * lpFrm,bool bIsStandalone) if(bIsStandalone) { - QToolButton * b = new KviStyledToolButton(m_pToolBar); + QToolButton * b = new QToolButton(m_pToolBar); b->setIcon(*g_pIconManager->getBigIcon(KVI_BIGICON_HELPCLOSE)); connect(b,SIGNAL(clicked()),this,SLOT(doClose())); //b->setUsesBigPixmap(true); @@ -96,12 +95,12 @@ KviHelpWidget::~KviHelpWidget() } void KviHelpWidget::showIndex() -{
+{ QString szHelpDir; - QDir dirHelp;
+ QDir dirHelp; - g_pApp->getGlobalKvircDirectory(szHelpDir,KviApp::Help);
- dirHelp = QDir(szHelpDir);
+ g_pApp->getGlobalKvircDirectory(szHelpDir,KviApp::Help); + dirHelp = QDir(szHelpDir); m_pTextBrowser->setSource(QUrl::fromLocalFile(dirHelp.absoluteFilePath("index.html"))); } diff --git a/src/modules/help/helpwindow.cpp b/src/modules/help/helpwindow.cpp index 90ee57f8b..b10db335b 100644 --- a/src/modules/help/helpwindow.cpp +++ b/src/modules/help/helpwindow.cpp @@ -32,7 +32,6 @@ #include "kvi_config.h" #include "kvi_valuelist.h" #include "kvi_sourcesdate.h" -#include "kvi_styled_controls.h" #include <QFileInfo> #include <QSplitter> @@ -88,7 +87,7 @@ KviHelpWindow::KviHelpWindow(KviFrame * lpFrm,const char * name) connect( m_pIndexSearch, SIGNAL( returnPressed() ), this, SLOT( showIndexTopic() ) ); - KviStyledToolButton* pBtnRefreshIndex = new KviStyledToolButton(pSearchBox); + QToolButton* pBtnRefreshIndex = new QToolButton(pSearchBox); pBtnRefreshIndex->setIcon(*g_pIconManager->getBigIcon(KVI_REFRESH_IMAGE_NAME)); connect(pBtnRefreshIndex,SIGNAL(clicked()),this,SLOT(refreshIndex())); pBtnRefreshIndex->setToolTip(__tr2qs("Refresh index") ); diff --git a/src/modules/links/linkswindow.cpp b/src/modules/links/linkswindow.cpp index 979690f31..137f9be78 100644 --- a/src/modules/links/linkswindow.cpp +++ b/src/modules/links/linkswindow.cpp @@ -51,7 +51,7 @@ KviLinksWindow::KviLinksWindow(KviFrame * lpFrm,KviConsole * lpConsole) // The button box on the left KviTalHBox * box = new KviTalHBox(m_pTopSplitter); - m_pRequestButton = new KviStyledToolButton(box,"request_button"); + m_pRequestButton = new QToolButton(box,"request_button"); m_pRequestButton->setUsesBigPixmap(false); m_pRequestButton->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_LINKS))); connect(m_pRequestButton,SIGNAL(clicked()),this,SLOT(requestLinks())); diff --git a/src/modules/links/linkswindow.h b/src/modules/links/linkswindow.h index b73a2860f..3befc875d 100644 --- a/src/modules/links/linkswindow.h +++ b/src/modules/links/linkswindow.h @@ -31,7 +31,7 @@ #include "kvi_tal_listview.h" #include "kvi_tal_popupmenu.h" -#include "kvi_styled_controls.h" +#include <QToolButton> class KviThemedLabel; @@ -58,7 +58,7 @@ protected: KviPointerList<KviLink> * m_pLinkList; KviTalPopupMenu * m_pHostPopup; QString m_szRootServer; - KviStyledToolButton * m_pRequestButton; + QToolButton * m_pRequestButton; KviThemedLabel * m_pInfoLabel; public: // Methods virtual void control(int msg); diff --git a/src/modules/list/listwindow.cpp b/src/modules/list/listwindow.cpp index 86ac371a8..f57d39276 100644 --- a/src/modules/list/listwindow.cpp +++ b/src/modules/list/listwindow.cpp @@ -42,7 +42,6 @@ #include "kvi_topicw.h" #include "kvi_config.h" #include "kvi_filedialog.h" -#include "kvi_styled_controls.h" #include "kvi_msgbox.h" #include "kvi_fileextensions.h" #include "kvi_tal_hbox.h" @@ -186,21 +185,21 @@ KviListWindow::KviListWindow(KviFrame * lpFrm,KviConsole * lpConsole) KviTalHBox * box = new KviTalHBox(m_pTopSplitter); box->setSpacing(1); box->setMargin(0); - m_pOpenButton = new KviStyledToolButton(box); + m_pOpenButton = new QToolButton(box); m_pOpenButton->setIcon(QIcon(*(g_pIconManager->getBigIcon(KVI_BIGICON_OPEN)))); connect(m_pOpenButton,SIGNAL(clicked()),this,SLOT(importList())); - m_pSaveButton = new KviStyledToolButton(box); + m_pSaveButton = new QToolButton(box); m_pSaveButton->setIcon(QIcon(*(g_pIconManager->getBigIcon(KVI_BIGICON_SAVE)))); connect(m_pSaveButton,SIGNAL(clicked()),this,SLOT(exportList())); - m_pRequestButton = new KviStyledToolButton(box,"request_button"); + m_pRequestButton = new QToolButton(box,"request_button"); m_pRequestButton->setIconSize(QSize(16,16)); m_pRequestButton->setIcon(QIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_LIST)))); connect(m_pRequestButton,SIGNAL(clicked()),this,SLOT(requestList())); KviTalToolTip::add(m_pRequestButton,__tr2qs("Request List")); - m_pStopListDownloadButton = new KviStyledToolButton(box,"stoplistdownload_button"); + m_pStopListDownloadButton = new QToolButton(box,"stoplistdownload_button"); m_pStopListDownloadButton->setIconSize(QSize(16,16)); m_pStopListDownloadButton->setIcon(QIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NICKNAMEPROBLEM)))); connect(m_pStopListDownloadButton,SIGNAL(clicked()),this,SLOT(stoplistdownload())); diff --git a/src/modules/list/listwindow.h b/src/modules/list/listwindow.h index 92092702b..ecedab507 100644 --- a/src/modules/list/listwindow.h +++ b/src/modules/list/listwindow.h @@ -34,7 +34,7 @@ #include "kvi_tal_treewidget.h" #include "kvi_tal_popupmenu.h" -#include "kvi_styled_controls.h" +#include <QToolButton> #include <QLineEdit> #include <QItemDelegate> @@ -94,10 +94,10 @@ protected: QSplitter * m_pTopSplitter; KviTalTreeWidget * m_pTreeWidget; QLineEdit * m_pParamsEdit; - KviStyledToolButton * m_pRequestButton; - KviStyledToolButton * m_pStopListDownloadButton; - KviStyledToolButton * m_pOpenButton; - KviStyledToolButton * m_pSaveButton; + QToolButton * m_pRequestButton; + QToolButton * m_pStopListDownloadButton; + QToolButton * m_pOpenButton; + QToolButton * m_pSaveButton; KviThemedLabel * m_pInfoLabel; QTimer * m_pFlushTimer; KviPointerList<KviChannelTreeWidgetItemData> * m_pItemList; diff --git a/src/modules/logview/logviewmdiwindow.cpp b/src/modules/logview/logviewmdiwindow.cpp index 5ea33dcf2..7cd66cbeb 100644 --- a/src/modules/logview/logviewmdiwindow.cpp +++ b/src/modules/logview/logviewmdiwindow.cpp @@ -34,7 +34,6 @@ #include "kvi_app.h" #include "kvi_fileutils.h" #include "kvi_valuelist.h" -#include "kvi_styled_controls.h" #include "kvi_tal_listview.h" #include "kvi_tal_popupmenu.h" @@ -86,27 +85,27 @@ KviLogViewMDIWindow::KviLogViewMDIWindow(KviModuleExtensionDescriptor * d,KviFra QGridLayout *layout = new QGridLayout(m_pSearchTab); - m_pShowChannelsCheck = new KviStyledCheckBox(__tr2qs_ctx("Show channel logs","logview"),m_pSearchTab); + m_pShowChannelsCheck = new QCheckBox(__tr2qs_ctx("Show channel logs","logview"),m_pSearchTab); m_pShowChannelsCheck->setChecked(true); layout->addWidget(m_pShowChannelsCheck,0,0,1,2); // layout->addMultiCellWidget(m_pShowChannelsCheck,0,0,0,1); - m_pShowQueryesCheck = new KviStyledCheckBox(__tr2qs_ctx("Show query logs","logview"),m_pSearchTab); + m_pShowQueryesCheck = new QCheckBox(__tr2qs_ctx("Show query logs","logview"),m_pSearchTab); m_pShowQueryesCheck->setChecked(true); layout->addWidget(m_pShowQueryesCheck,1,0,1,2); // layout->addMultiCellWidget(m_pShowQueryesCheck,1,1,0,1); - m_pShowConsolesCheck = new KviStyledCheckBox(__tr2qs_ctx("Show console logs","logview"),m_pSearchTab); + m_pShowConsolesCheck = new QCheckBox(__tr2qs_ctx("Show console logs","logview"),m_pSearchTab); m_pShowConsolesCheck->setChecked(true); layout->addWidget(m_pShowConsolesCheck,2,0,1,2); // layout->addMultiCellWidget(m_pShowConsolesCheck,2,2,0,1); - m_pShowDccChatCheck = new KviStyledCheckBox(__tr2qs_ctx("Show DCC chat logs","logview"),m_pSearchTab); + m_pShowDccChatCheck = new QCheckBox(__tr2qs_ctx("Show DCC chat logs","logview"),m_pSearchTab); m_pShowDccChatCheck->setChecked(true); layout->addWidget(m_pShowDccChatCheck,3,0,1,2); // layout->addMultiCellWidget(m_pShowDccChatCheck,3,3,0,1); - m_pShowOtherCheck = new KviStyledCheckBox(__tr2qs_ctx("Show other logs","logview"),m_pSearchTab); + m_pShowOtherCheck = new QCheckBox(__tr2qs_ctx("Show other logs","logview"),m_pSearchTab); m_pShowOtherCheck->setChecked(true); layout->addWidget(m_pShowOtherCheck,4,0,1,2); // layout->addMultiCellWidget(m_pShowOtherCheck,4,4,0,1); @@ -128,7 +127,7 @@ KviLogViewMDIWindow::KviLogViewMDIWindow(KviModuleExtensionDescriptor * d,KviFra layout->addWidget(l,7,0); layout->addWidget(m_pContentsMask,7,1); - m_pEnableFromFilter = new KviStyledCheckBox(__tr2qs_ctx("Only older than","logview"),m_pSearchTab); + m_pEnableFromFilter = new QCheckBox(__tr2qs_ctx("Only older than","logview"),m_pSearchTab); m_pFromDateEdit = new QDateEdit(m_pSearchTab); m_pFromDateEdit->setDate(QDate::currentDate()); layout->addWidget(m_pEnableFromFilter,8,0); @@ -136,7 +135,7 @@ KviLogViewMDIWindow::KviLogViewMDIWindow(KviModuleExtensionDescriptor * d,KviFra connect(m_pEnableFromFilter,SIGNAL(toggled(bool)),m_pFromDateEdit,SLOT(setEnabled(bool))); m_pFromDateEdit->setEnabled(false); - m_pEnableToFilter = new KviStyledCheckBox(__tr2qs_ctx("Only newier than","logview"),m_pSearchTab); + m_pEnableToFilter = new QCheckBox(__tr2qs_ctx("Only newier than","logview"),m_pSearchTab); m_pToDateEdit = new QDateEdit(m_pSearchTab); m_pToDateEdit->setDate(QDate::currentDate()); layout->addWidget(m_pEnableToFilter,9,0); diff --git a/src/modules/logview/logviewmdiwindow.h b/src/modules/logview/logviewmdiwindow.h index a8e4ee6ea..b12d5fc15 100644 --- a/src/modules/logview/logviewmdiwindow.h +++ b/src/modules/logview/logviewmdiwindow.h @@ -31,9 +31,9 @@ #include <QTabWidget> #include <QDateTime> +#include <QCheckBox> class QStringList; -class QCheckBox; class QLineEdit; class QDateEdit; class KviTalListView; diff --git a/src/modules/objects/class_checkbox.cpp b/src/modules/objects/class_checkbox.cpp index 7782b327f..a3f73ddd9 100644 --- a/src/modules/objects/class_checkbox.cpp +++ b/src/modules/objects/class_checkbox.cpp @@ -24,9 +24,10 @@ #include "kvi_error.h" #include "kvi_debug.h" #include "kvi_locale.h" -#include "kvi_styled_controls.h" #include "class_checkbox.h" +#include <QCheckBox> + /* @doc: checkbox @title: @@ -77,7 +78,7 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_checkbox) bool KviKvsObject_checkbox::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - KviStyledCheckBox * cb = new KviStyledCheckBox(parentScriptWidget(), getName().toUtf8().data()); + QCheckBox * cb = new QCheckBox(parentScriptWidget(), getName().toUtf8().data()); setObject(cb, true); connect(cb,SIGNAL(toggled(bool)),this,SLOT(toggled(bool))); connect(widget(),SIGNAL(clicked()),this,SLOT(slotClicked())); @@ -86,7 +87,7 @@ bool KviKvsObject_checkbox::init(KviKvsRunTimeContext * pContext,KviKvsVariantLi bool KviKvsObject_checkbox::function_isChecked(KviKvsObjectFunctionCall *c) { - if(widget()) c->returnValue()->setBoolean(((KviStyledCheckBox *)widget())->isChecked()); + if(widget()) c->returnValue()->setBoolean(((QCheckBox *)widget())->isChecked()); return true; } @@ -96,7 +97,7 @@ bool KviKvsObject_checkbox::function_setChecked(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("bChecked",KVS_PT_BOOL,KVS_PF_OPTIONAL,bChecked) KVSO_PARAMETERS_END(c) - if(widget()) ((KviStyledCheckBox *)widget())->setChecked(bChecked); + if(widget()) ((QCheckBox *)widget())->setChecked(bChecked); return true; } @@ -106,7 +107,7 @@ bool KviKvsObject_checkbox::function_setText(KviKvsObjectFunctionCall *c) KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szText) KVSO_PARAMETERS_END(c) - if(widget()) ((KviStyledCheckBox *)widget())->setText(szText); + if(widget()) ((QCheckBox *)widget())->setText(szText); return true; } diff --git a/src/modules/objects/class_toolbutton.cpp b/src/modules/objects/class_toolbutton.cpp index 32dc0e189..3d03acefa 100644 --- a/src/modules/objects/class_toolbutton.cpp +++ b/src/modules/objects/class_toolbutton.cpp @@ -129,7 +129,7 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_toolbutton) bool KviKvsObject_toolbutton::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams) { - SET_OBJECT(KviStyledToolButton); + SET_OBJECT(QToolButton); connect(widget(),SIGNAL(clicked()),this,SLOT(slotClicked())); return true; } @@ -143,10 +143,10 @@ bool KviKvsObject_toolbutton::functionsetImage(KviKvsObjectFunctionCall *c) if (!widget()) return true; QPixmap * pix = g_pIconManager->getImage(icon); if(pix){ - ((KviStyledToolButton *)widget())->setIcon(QIcon(*pix)); + ((QToolButton *)widget())->setIcon(QIcon(*pix)); } else - ((KviStyledToolButton *)widget())->setIcon(QIcon()); + ((QToolButton *)widget())->setIcon(QIcon()); return true; } bool KviKvsObject_toolbutton::functionsetUsesBigPixmap(KviKvsObjectFunctionCall *c) @@ -156,13 +156,13 @@ bool KviKvsObject_toolbutton::functionsetUsesBigPixmap(KviKvsObjectFunctionCall KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETERS_END(c) if(widget()) - ((KviStyledToolButton *)widget())->setUsesBigPixmap(bEnabled); + ((QToolButton *)widget())->setUsesBigPixmap(bEnabled); return true; } bool KviKvsObject_toolbutton::functionusesBigPixmap(KviKvsObjectFunctionCall *c) { if (widget()) - c->returnValue()->setBoolean(((KviStyledToolButton *)widget())->usesBigPixmap()); + c->returnValue()->setBoolean(((QToolButton *)widget())->usesBigPixmap()); return true; } bool KviKvsObject_toolbutton::functionsetUsesTextLabel(KviKvsObjectFunctionCall *c) @@ -172,13 +172,13 @@ bool KviKvsObject_toolbutton::functionsetUsesTextLabel(KviKvsObjectFunctionCall KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETERS_END(c) if(widget()) - ((KviStyledToolButton *)widget())->setUsesTextLabel(bEnabled); + ((QToolButton *)widget())->setUsesTextLabel(bEnabled); return true; } bool KviKvsObject_toolbutton::functionusesTextLabel(KviKvsObjectFunctionCall *c) { if (widget()) - c->returnValue()->setBoolean(((KviStyledToolButton *)widget())->usesTextLabel()); + c->returnValue()->setBoolean(((QToolButton *)widget())->usesTextLabel()); return true; } bool KviKvsObject_toolbutton::function_setAutoRaise(KviKvsObjectFunctionCall *c) @@ -188,13 +188,13 @@ bool KviKvsObject_toolbutton::function_setAutoRaise(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETERS_END(c) if(widget()) - ((KviStyledToolButton *)widget())->setAutoRaise(bEnabled); + ((QToolButton *)widget())->setAutoRaise(bEnabled); return true; } bool KviKvsObject_toolbutton::function_autoRaise(KviKvsObjectFunctionCall *c) { if(widget()) - c->returnValue()->setBoolean(((KviStyledToolButton *)widget())->autoRaise()); + c->returnValue()->setBoolean(((QToolButton *)widget())->autoRaise()); return true; } bool KviKvsObject_toolbutton::functionsetOn(KviKvsObjectFunctionCall *c) @@ -204,7 +204,7 @@ bool KviKvsObject_toolbutton::functionsetOn(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETERS_END(c) if(widget()) - ((KviStyledToolButton *)widget())->setOn(bEnabled); + ((QToolButton *)widget())->setOn(bEnabled); return true; } @@ -215,13 +215,13 @@ bool KviKvsObject_toolbutton::functionsetToggleButton(KviKvsObjectFunctionCall * KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETERS_END(c) if(widget()) - ((KviStyledToolButton *)widget())->setCheckable(bEnabled); + ((QToolButton *)widget())->setCheckable(bEnabled); return true; } bool KviKvsObject_toolbutton::functiontoggle(KviKvsObjectFunctionCall *c) { if (widget()) - ((KviStyledToolButton *)widget())->toggle(); + ((QToolButton *)widget())->toggle(); return true; } @@ -233,14 +233,14 @@ bool KviKvsObject_toolbutton::functionsetTextLabel(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("tooltip",KVS_PT_STRING,KVS_PF_OPTIONAL,szTip) KVSO_PARAMETERS_END(c) if(!widget()) return true; - ((KviStyledToolButton *)widget())->setText(szLabel); - if (!szTip.isEmpty()) ((KviStyledToolButton *)widget())->setToolTip(szTip); + ((QToolButton *)widget())->setText(szLabel); + if (!szTip.isEmpty()) ((QToolButton *)widget())->setToolTip(szTip); return true; } bool KviKvsObject_toolbutton::functiontextLabel(KviKvsObjectFunctionCall *c) { if (widget()) - c->returnValue()->setString(((KviStyledToolButton *)widget())->text()); + c->returnValue()->setString(((QToolButton *)widget())->text()); return true; } bool KviKvsObject_toolbutton::functionsetPopup(KviKvsObjectFunctionCall *c) @@ -267,13 +267,13 @@ bool KviKvsObject_toolbutton::functionsetPopup(KviKvsObjectFunctionCall *c) return TRUE; } if(widget()) - ((KviStyledToolButton *)widget())->setMenu(((KviTalPopupMenu *)(ob->object()))); + ((QToolButton *)widget())->setMenu(((KviTalPopupMenu *)(ob->object()))); return true; } bool KviKvsObject_toolbutton::functionopenPopup(KviKvsObjectFunctionCall *c) { if(widget()) - ((KviStyledToolButton *)widget())->showMenu(); + ((QToolButton *)widget())->showMenu(); return true; } bool KviKvsObject_toolbutton::functionsetPopupDelay(KviKvsObjectFunctionCall *c) @@ -283,13 +283,13 @@ bool KviKvsObject_toolbutton::functionsetPopupDelay(KviKvsObjectFunctionCall *c) KVSO_PARAMETER("delay",KVS_PT_UNSIGNEDINTEGER,0,uDelay) KVSO_PARAMETERS_END(c) if (widget()) - ((KviStyledToolButton *)widget())->setPopupDelay(uDelay); + ((QToolButton *)widget())->setPopupDelay(uDelay); return true; } bool KviKvsObject_toolbutton::functionpopupDelay(KviKvsObjectFunctionCall *c) { if (widget()) - c->returnValue()->setInteger(((KviStyledToolButton *)widget())->popupDelay()); + c->returnValue()->setInteger(((QToolButton *)widget())->popupDelay()); return true; } bool KviKvsObject_toolbutton::functionsetTextPosition(KviKvsObjectFunctionCall *c) @@ -300,9 +300,9 @@ bool KviKvsObject_toolbutton::functionsetTextPosition(KviKvsObjectFunctionCall * KVSO_PARAMETERS_END(c) if(!widget())return true; if(KviQString::equalCI(szPos,"BesideIcon")) - ((KviStyledToolButton *)widget())->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + ((QToolButton *)widget())->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); else if(KviQString::equalCI(szPos,"BelowIcon")) - ((KviStyledToolButton *)widget())->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); + ((QToolButton *)widget())->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); else c->warning(__tr2qs("Unknown text position '%Q'"),&szPos); return true; } @@ -310,7 +310,7 @@ bool KviKvsObject_toolbutton::functiontextPosition(KviKvsObjectFunctionCall *c) { if(!widget()) return true; QString szPos="BelowIcon"; - if ((((KviStyledToolButton *)widget())->toolButtonStyle())==(Qt::ToolButtonTextBesideIcon)) + if ((((QToolButton *)widget())->toolButtonStyle())==(Qt::ToolButtonTextBesideIcon)) szPos="BesideIcon"; c->returnValue()->setString(szPos); return true; diff --git a/src/modules/objects/class_toolbutton.h b/src/modules/objects/class_toolbutton.h index 366d51b1f..8c3ab3b0f 100644 --- a/src/modules/objects/class_toolbutton.h +++ b/src/modules/objects/class_toolbutton.h @@ -29,8 +29,6 @@ #include "class_widget.h" #include "object_macros.h" -#include "kvi_styled_controls.h" - class KviKvsObject_toolbutton : public KviKvsObject_widget { Q_OBJECT diff --git a/src/modules/objects/class_wrapper.cpp b/src/modules/objects/class_wrapper.cpp index b181b5b36..c27b0b53d 100644 --- a/src/modules/objects/class_wrapper.cpp +++ b/src/modules/objects/class_wrapper.cpp @@ -89,7 +89,7 @@ Now %A. will be point to the wrapped object, therefore we could modify its property or to consider it as if it were an object created by us in scripting. [br] Obviously, deleting the created object (for example %A) you don't will delete the object of Kvirc (in this case the statusbar). [br] Another example could be this:[br] - %A=$new(wrapper,0,test,KviFrame::kvirc_frame,KviStyledToolButton::kvirc.identityoptions)[br] + %A=$new(wrapper,0,test,KviFrame::kvirc_frame,QToolButton::kvirc.identityoptions)[br] %A->$setProperty(usesBigPixmap,0)[br] In this fool example with the function $setProperty, we has setted the property usesBigPixmap to False, making to become the small icons of the ToolBar.[br] [br] diff --git a/src/modules/options/dialog.cpp b/src/modules/options/dialog.cpp index 703d188f3..239dd5f77 100644 --- a/src/modules/options/dialog.cpp +++ b/src/modules/options/dialog.cpp @@ -30,7 +30,6 @@ #include "kvi_locale.h" #include "kvi_iconmanager.h" #include "kvi_module.h" -#include "kvi_styled_controls.h" #include "kvi_pointerhashtable.h" #include "kvi_accel.h" #include "kvi_tal_vbox.h" @@ -43,8 +42,6 @@ #include <QLabel> #include <QSplitter> #include <QPushButton> -#include "kvi_styled_controls.h" -#include "kvi_styled_controls.h" #include <QPainter> #include <QFont> #include <QEvent> @@ -200,7 +197,7 @@ KviOptionsDialog::KviOptionsDialog(QWidget * par,const QString &szGroup) m_pSearchLineEdit = new QLineEdit(hbox); connect(m_pSearchLineEdit,SIGNAL(returnPressed()),this,SLOT(searchClicked())); - m_pSearchButton = new KviStyledToolButton(hbox); + m_pSearchButton = new QToolButton(hbox); m_pSearchButton->setUsesBigPixmap(false); m_pSearchButton->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SEARCH))); connect(m_pSearchButton,SIGNAL(clicked()),this,SLOT(searchClicked())); @@ -320,7 +317,7 @@ bool KviOptionsDialog::recursiveSearch(KviOptionsListViewItem * pItem,const QStr o = *it; QString szText; if(o->inherits("QLabel"))szText = ((QLabel *)o)->text(); - else if(o->inherits("QCheckBox"))szText = ((KviStyledCheckBox *)o)->text(); + else if(o->inherits("QCheckBox"))szText = ((QCheckBox *)o)->text(); else if(o->inherits("KviTalGroupBox"))szText = ((KviTalGroupBox *)o)->title(); if(o->inherits("QWidget")) diff --git a/src/modules/options/dialog.h b/src/modules/options/dialog.h index 62c5a2e69..d333f8de4 100644 --- a/src/modules/options/dialog.h +++ b/src/modules/options/dialog.h @@ -32,11 +32,11 @@ #include <QDialog> #include <QStringList> +#include <QToolButton> class QLabel; class QPushButton; class QLineEdit; -class KviStyledToolButton; class KviTalWidgetStack; class KviGeneralOptionsFrontWidget : public KviOptionsWidget @@ -76,7 +76,7 @@ private: KviGeneralOptionsFrontWidget* m_pFrontWidget; QString m_szGroup; QLineEdit * m_pSearchLineEdit; - KviStyledToolButton * m_pSearchButton; + QToolButton * m_pSearchButton; private: void recursiveCommit(KviOptionsListViewItem *it); void fillListView(KviTalListViewItem * p,KviPointerList<KviOptionsWidgetInstanceEntry> * l,const QString &szGroup,bool bNotContainedOnly = false); diff --git a/src/modules/options/optw_identity.cpp b/src/modules/options/optw_identity.cpp index 64c066be7..aa0b01d1b 100644 --- a/src/modules/options/optw_identity.cpp +++ b/src/modules/options/optw_identity.cpp @@ -39,7 +39,6 @@ #include "kvi_tal_tooltip.h" #include <QLineEdit> -#include "kvi_styled_controls.h" #include <QPushButton> #include <QLayout> #include <QTabWidget> @@ -479,7 +478,7 @@ KviIdentityAvatarOptionsWidget::KviIdentityAvatarOptionsWidget(QWidget * parent) "The image also should be smaller than 800x600 pixels since<br>" \ "it will have to be viewable in everyone's monitor.","options"); - m_pUseAvatarCheck = new KviStyledCheckBox(__tr2qs_ctx("Use avatar","options"),this); + m_pUseAvatarCheck = new QCheckBox(__tr2qs_ctx("Use avatar","options"),this); addWidgetToLayout(m_pUseAvatarCheck,0,0,0,0); m_pUseAvatarCheck->setChecked(bHaveAvatar); mergeTip(m_pUseAvatarCheck,szTip); diff --git a/src/modules/options/optw_identity.h b/src/modules/options/optw_identity.h index db20cb690..8811e5880 100644 --- a/src/modules/options/optw_identity.h +++ b/src/modules/options/optw_identity.h @@ -32,9 +32,9 @@ #include "kvi_pixmap.h" #include <QDialog> +#include <QCheckBox> class QLineEdit; -class KviStyledCheckBox; class QPushButton; class QComboBox; class KviHttpRequest; @@ -152,7 +152,7 @@ public: KviIdentityAvatarOptionsWidget(QWidget * pParent); ~KviIdentityAvatarOptionsWidget(); protected: - KviStyledCheckBox * m_pUseAvatarCheck; + QCheckBox * m_pUseAvatarCheck; QLineEdit * m_pAvatarNameEdit; QPushButton * m_pChooseAvatarButton; KviPixmap * m_pLocalAvatar; diff --git a/src/modules/options/optw_interfacefeatures.cpp b/src/modules/options/optw_interfacefeatures.cpp index a5b4da725..0a8f8f1de 100644 --- a/src/modules/options/optw_interfacefeatures.cpp +++ b/src/modules/options/optw_interfacefeatures.cpp @@ -47,7 +47,7 @@ KviInterfaceFeaturesOptionsWidget::KviInterfaceFeaturesOptionsWidget(QWidget * p QString szSplashDisableFile; g_pApp->getLocalKvircDirectory(szSplashDisableFile,KviApp::Pics,"disable-splash." KVI_VERSION); bool bDisableSplash = KviFileUtils::fileExists(szSplashDisableFile); - m_pDisableSplash = new KviStyledCheckBox(__tr2qs_ctx("Disable splash screen","options"),this); + m_pDisableSplash = new QCheckBox(__tr2qs_ctx("Disable splash screen","options"),this); addWidgetToLayout(m_pDisableSplash,0,3,0,3); m_pDisableSplash->setChecked(bDisableSplash); diff --git a/src/modules/options/optw_interfacefeatures.h b/src/modules/options/optw_interfacefeatures.h index f917588f3..ecb4146c6 100644 --- a/src/modules/options/optw_interfacefeatures.h +++ b/src/modules/options/optw_interfacefeatures.h @@ -26,13 +26,12 @@ //============================================================================= #include "kvi_optionswidget.h" +#include <QCheckBox> #define KVI_OPTIONS_WIDGET_ICON_KviInterfaceFeaturesOptionsWidget KVI_SMALLICON_IDEA #define KVI_OPTIONS_WIDGET_NAME_KviInterfaceFeaturesOptionsWidget __tr2qs_no_lookup("Interface") #define KVI_OPTIONS_WIDGET_PRIORITY_KviInterfaceFeaturesOptionsWidget 50000 -class KviStyledCheckBox; - class KviInterfaceFeaturesOptionsWidget : public KviOptionsWidget { Q_OBJECT @@ -40,7 +39,7 @@ public: KviInterfaceFeaturesOptionsWidget(QWidget * parent); ~KviInterfaceFeaturesOptionsWidget(); protected: - KviStyledCheckBox * m_pDisableSplash; + QCheckBox * m_pDisableSplash; public: virtual void commit(); }; diff --git a/src/modules/options/optw_messages.cpp b/src/modules/options/optw_messages.cpp index 440e97bea..19e8276a2 100644 --- a/src/modules/options/optw_messages.cpp +++ b/src/modules/options/optw_messages.cpp @@ -34,7 +34,6 @@ #include "kvi_mirccntrl.h" #include "kvi_config.h" #include "kvi_filedialog.h" -#include "kvi_styled_controls.h" #include "kvi_tal_vbox.h" #include <QLayout> diff --git a/src/modules/options/optw_nickserv.cpp b/src/modules/options/optw_nickserv.cpp index 1219677fa..ea1547f71 100644 --- a/src/modules/options/optw_nickserv.cpp +++ b/src/modules/options/optw_nickserv.cpp @@ -35,7 +35,6 @@ #include <QLayout> #include <QLineEdit> #include <QPushButton> -#include "kvi_styled_controls.h" #include <QMessageBox> @@ -229,7 +228,7 @@ KviNickServOptionsWidget::KviNickServOptionsWidget(QWidget * parent) KviNickServRuleSet * rs = g_pNickServRuleSet; bool bNickServEnabled = rs ? (rs->isEnabled() && !rs->isEmpty()) : false; - m_pNickServCheck = new KviStyledCheckBox(__tr2qs_ctx("Enable NickServ Identification","options"),this); + m_pNickServCheck = new QCheckBox(__tr2qs_ctx("Enable NickServ Identification","options"),this); gl->addWidget(m_pNickServCheck,0,0,1,3); // gl->addMultiCellWidget(m_pNickServCheck,0,0,0,2); KviTalToolTip::add(m_pNickServCheck,__tr2qs_ctx("This check enables the automatic identification with NickServ","options")); diff --git a/src/modules/options/optw_nickserv.h b/src/modules/options/optw_nickserv.h index 6c0f9bcb8..0fa01c0ad 100644 --- a/src/modules/options/optw_nickserv.h +++ b/src/modules/options/optw_nickserv.h @@ -30,10 +30,10 @@ #include "kvi_optionswidget.h" #include <QDialog> +#include <QCheckBox> class QLineEdit; class QPushButton; -class KviStyledCheckBox; class KviNickServRule; class KviTalTreeWidget; @@ -73,7 +73,7 @@ public: ~KviNickServOptionsWidget(); protected: KviTalTreeWidget * m_pNickServTreeWidget; - KviStyledCheckBox * m_pNickServCheck; + QCheckBox * m_pNickServCheck; QPushButton * m_pAddRuleButton; QPushButton * m_pDelRuleButton; QPushButton * m_pEditRuleButton; diff --git a/src/modules/options/optw_proxy.cpp b/src/modules/options/optw_proxy.cpp index 62f7a2af9..209ac489a 100644 --- a/src/modules/options/optw_proxy.cpp +++ b/src/modules/options/optw_proxy.cpp @@ -29,7 +29,6 @@ #include "kvi_netutils.h" #include "kvi_settings.h" #include "kvi_options.h" -//#include "kvi_styled_controls.h" #include <kvi_tal_groupbox.h> #include "kvi_tal_popupmenu.h" #include "kvi_tal_tooltip.h" @@ -37,10 +36,9 @@ #include <QLabel> #include <QLineEdit> #include <QComboBox> -#include "kvi_styled_controls.h" #include <QCursor> -#include "kvi_styled_controls.h" #include <QIcon> +#include <QToolButton> KviProxyOptionsTreeWidgetItem::KviProxyOptionsTreeWidgetItem(KviTalTreeWidget *parent,const QPixmap &pm,KviProxy * prx) @@ -85,13 +83,13 @@ KviProxyOptionsWidget::KviProxyOptionsWidget(QWidget * parent) KviTalVBox * vbox = new KviTalVBox(this); addWidgetToLayout(vbox,1,1,1,1); - KviStyledToolButton * tb = new KviStyledToolButton(vbox); + QToolButton * tb = new QToolButton(vbox); tb->setIcon(QIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_PROXY)))); tb->setAutoRaise(true); connect(tb,SIGNAL(clicked()),this,SLOT(newProxy())); mergeTip(tb,__tr2qs_ctx("New Proxy","options")); - tb = new KviStyledToolButton(vbox); + tb = new QToolButton(vbox); tb->setIcon(QIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CUT)))); //tb->setEnabled(false); tb->setAutoRaise(true); @@ -125,7 +123,7 @@ KviProxyOptionsWidget::KviProxyOptionsWidget(QWidget * parent) m_pProtocolBox->addItems(l); - m_pIpV6Check = new KviStyledCheckBox(__tr2qs_ctx("Use IPv6 protocol","options"),gbox); + m_pIpV6Check = new QCheckBox(__tr2qs_ctx("Use IPv6 protocol","options"),gbox); connect(m_pIpV6Check,SIGNAL(toggled(bool)),this,SLOT(ipV6CheckToggled(bool))); #ifndef COMPILE_IPV6_SUPPORT m_pIpV6Check->setEnabled(false); diff --git a/src/modules/options/optw_proxy.h b/src/modules/options/optw_proxy.h index 6b0f8dc83..f94e09673 100644 --- a/src/modules/options/optw_proxy.h +++ b/src/modules/options/optw_proxy.h @@ -26,9 +26,10 @@ #include "kvi_optionswidget.h" #include "kvi_tal_treewidget.h" +#include <QCheckBox> + class QLabel; class QLineEdit; -class KviStyledCheckBox; class QComboBox; class KviIpEditor; class KviTalPopupMenu; @@ -74,7 +75,7 @@ protected: QLabel * m_pProtocolLabel; QComboBox * m_pProtocolBox; KviTalPopupMenu * m_pContextPopup; - KviStyledCheckBox * m_pIpV6Check; + QCheckBox * m_pIpV6Check; KviProxyOptionsTreeWidgetItem * m_pLastEditedItem; private: diff --git a/src/modules/options/optw_servers.cpp b/src/modules/options/optw_servers.cpp index cbd83f47b..0e214f85d 100644 --- a/src/modules/options/optw_servers.cpp +++ b/src/modules/options/optw_servers.cpp @@ -49,14 +49,11 @@ #include "kvi_nickserv.h" #include "kvi_proxydb.h" #include "kvi_kvs_script.h" -#include "kvi_styled_controls.h" #include "kvi_pointerhashtable.h" #include "kvi_tal_popupmenu.h" #include "kvi_tal_tooltip.h" -#include "kvi_styled_controls.h" #include <QLineEdit> -#include "kvi_styled_controls.h" #include <QCursor> #include <QValidator> #include <QMessageBox> @@ -178,7 +175,7 @@ KviNetworkDetailsWidget::KviNetworkDetailsWidget(QWidget * par,KviIrcNetwork * n m_pEncodingEditor->setCurrentIndex(current); - m_pAutoConnectCheck = new KviStyledCheckBox(__tr2qs_ctx("Connect to this network at startup","options"),tab); + m_pAutoConnectCheck = new QCheckBox(__tr2qs_ctx("Connect to this network at startup","options"),tab); m_pAutoConnectCheck->setChecked(n->autoConnect()); gl->addWidget(m_pAutoConnectCheck,2,0,1,2); // gl->addMultiCellWidget(m_pAutoConnectCheck,2,2,0,1); @@ -253,7 +250,7 @@ KviNetworkDetailsWidget::KviNetworkDetailsWidget(QWidget * par,KviIrcNetwork * n KviNickServRuleSet * rs = n->nickServRuleSet(); bool bNickServEnabled = rs ? (rs->isEnabled() && !rs->isEmpty()) : false; - m_pNickServCheck = new KviStyledCheckBox(__tr2qs_ctx("Enable NickServ Identification","options"),tab); + m_pNickServCheck = new QCheckBox(__tr2qs_ctx("Enable NickServ Identification","options"),tab); gl->addWidget(m_pNickServCheck,0,0,1,3); // gl->addMultiCellWidget(m_pNickServCheck,0,0,0,2); KviTalToolTip::add(m_pNickServCheck, @@ -498,7 +495,7 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s) gbox = new KviTalGroupBox(Qt::Horizontal,__tr2qs_ctx("User Mode","options"),tab); gl->addWidget(gbox,1,0); - m_pUseDefaultInitUMode = new KviStyledCheckBox(__tr2qs_ctx("Use default user mode","options"),gbox); + m_pUseDefaultInitUMode = new QCheckBox(__tr2qs_ctx("Use default user mode","options"),gbox); KviTalToolTip::add(m_pUseDefaultInitUMode,__tr2qs_ctx("<center>If this is enabled, the global initial <b>user mode</b> (configured from"\ " the identity dialog) will be used. If disabled, you can configure an initial user mode for this server","options")); bool bHasUmode = !(s->initUMode().isEmpty()); @@ -506,15 +503,15 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s) m_pUseDefaultInitUMode->setChecked(!bHasUmode); connect(m_pUseDefaultInitUMode,SIGNAL(toggled(bool)),this,SLOT(useDefaultInitUModeToggled(bool))); - m_pIMode = new KviStyledCheckBox(__tr2qs_ctx("Invisible (+i)","options"),gbox); + m_pIMode = new QCheckBox(__tr2qs_ctx("Invisible (+i)","options"),gbox); m_pIMode->setEnabled(bHasUmode); m_pIMode->setChecked(bHasUmode ? s->initUMode().contains('i',Qt::CaseInsensitive) : szDefUMode.contains('i',Qt::CaseInsensitive)); - m_pSMode = new KviStyledCheckBox(__tr2qs_ctx("Server notices (+s)","options"),gbox); + m_pSMode = new QCheckBox(__tr2qs_ctx("Server notices (+s)","options"),gbox); m_pSMode->setEnabled(bHasUmode); m_pSMode->setChecked(bHasUmode ? s->initUMode().contains('s',Qt::CaseInsensitive) : szDefUMode.contains('s',Qt::CaseInsensitive)); - m_pWMode = new KviStyledCheckBox(__tr2qs_ctx("Wallops (+w)","options"),gbox); + m_pWMode = new QCheckBox(__tr2qs_ctx("Wallops (+w)","options"),gbox); m_pWMode->setEnabled(bHasUmode); m_pWMode->setChecked(bHasUmode ? s->initUMode().contains('w',Qt::CaseInsensitive) : szDefUMode.contains('w',Qt::CaseInsensitive)); @@ -568,7 +565,7 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s) #endif } - m_pCacheIpCheck = new KviStyledCheckBox(__tr2qs_ctx("Cache IP address","options"),tab); + m_pCacheIpCheck = new QCheckBox(__tr2qs_ctx("Cache IP address","options"),tab); gl->addWidget(m_pCacheIpCheck,2,0,1,2); // gl->addMultiCellWidget(m_pCacheIpCheck,2,2,0,1); KviTalToolTip::add(m_pCacheIpCheck,__tr2qs_ctx("<center>This check will enable <b>IP address caching</b> for this server:<br>" \ @@ -580,7 +577,7 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s) m_pCacheIpCheck->setChecked(s->cacheIp()); - m_pUseIPV6Check = new KviStyledCheckBox(__tr2qs_ctx("Use IPv6 protocol","options"),tab); + m_pUseIPV6Check = new QCheckBox(__tr2qs_ctx("Use IPv6 protocol","options"),tab); gl->addWidget(m_pUseIPV6Check,3,0,1,2); // gl->addMultiCellWidget(m_pUseIPV6Check,3,3,0,1); #ifdef COMPILE_IPV6_SUPPORT @@ -593,7 +590,7 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s) KviTalToolTip::add(m_pUseIPV6Check,__tr2qs_ctx("<center>This check identifies IPv6 servers.<br>If enabled, KVIrc will attempt to use the IPv6 protocol " \ "(thus your OS <b>must</b> have a working IPv6 stack and you <b>must</b> have an IPv6 connection).</center>","options")); - m_pUseSSLCheck = new KviStyledCheckBox(__tr2qs_ctx("Use SSL protocol","options"),tab); + m_pUseSSLCheck = new QCheckBox(__tr2qs_ctx("Use SSL protocol","options"),tab); gl->addWidget(m_pUseSSLCheck,4,0,1,2); // gl->addMultiCellWidget(m_pUseSSLCheck,4,4,0,1); KviTalToolTip::add(m_pUseSSLCheck,__tr2qs_ctx("<center>This check will cause the connection to use the <b>Secure Socket Layer</b> " \ @@ -604,7 +601,7 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s) m_pUseSSLCheck->setChecked(s->useSSL()); - m_pUseAutoConnect = new KviStyledCheckBox(__tr2qs_ctx("Connect to this server at startup","options"),tab); + m_pUseAutoConnect = new QCheckBox(__tr2qs_ctx("Connect to this server at startup","options"),tab); m_pUseAutoConnect->setChecked(s->autoConnect()); gl->addWidget(m_pUseAutoConnect,5,0,1,2); @@ -1029,19 +1026,19 @@ KviServerOptionsWidget::KviServerOptionsWidget(QWidget * parent) vbox->setSpacing(0); addWidgetToLayout(vbox,1,0,1,0); - m_pNewNetworkButton = new KviStyledToolButton(vbox); + m_pNewNetworkButton = new QToolButton(vbox); m_pNewNetworkButton->setIcon(QIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_WORLD)))); m_pNewNetworkButton->setAutoRaise(true); connect(m_pNewNetworkButton,SIGNAL(clicked()),this,SLOT(newNetwork())); KviTalToolTip::add(m_pNewNetworkButton,__tr2qs_ctx("New Network","options")); - m_pNewServerButton = new KviStyledToolButton(vbox); + m_pNewServerButton = new QToolButton(vbox); m_pNewServerButton->setIcon(QIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_SERVER)))); m_pNewServerButton->setAutoRaise(true); connect(m_pNewServerButton,SIGNAL(clicked()),this,SLOT(newServer())); KviTalToolTip::add(m_pNewServerButton,__tr2qs_ctx("New Server","options")); - m_pRemoveButton = new KviStyledToolButton(vbox); + m_pRemoveButton = new QToolButton(vbox); m_pRemoveButton->setIcon(QIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CUT)))); m_pRemoveButton->setEnabled(false); m_pRemoveButton->setAutoRaise(true); @@ -1051,14 +1048,14 @@ KviServerOptionsWidget::KviServerOptionsWidget(QWidget * parent) QFrame * f = new QFrame(vbox); f->setFrameStyle(QFrame::Sunken | QFrame::HLine); - m_pCopyServerButton = new KviStyledToolButton(vbox); + m_pCopyServerButton = new QToolButton(vbox); m_pCopyServerButton->setIcon(QIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_COPY)))); m_pCopyServerButton->setEnabled(false); m_pCopyServerButton->setAutoRaise(true); connect(m_pCopyServerButton,SIGNAL(clicked()),this,SLOT(copyServer())); KviTalToolTip::add(m_pCopyServerButton,__tr2qs_ctx("Copy Server","options")); - m_pPasteServerButton = new KviStyledToolButton(vbox); + m_pPasteServerButton = new QToolButton(vbox); m_pPasteServerButton->setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_PASTE))); m_pPasteServerButton->setEnabled(false); m_pPasteServerButton->setAutoRaise(true); @@ -1068,7 +1065,7 @@ KviServerOptionsWidget::KviServerOptionsWidget(QWidget * parent) f = new QFrame(vbox); f->setFrameStyle(QFrame::Sunken | QFrame::HLine); - m_pImportButton = new KviStyledToolButton(vbox); + m_pImportButton = new QToolButton(vbox); m_pImportButton->setIcon(QIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_FOLDER)))); m_pImportButton->setAutoRaise(true); m_pImportButton->setMenu(m_pImportPopup); @@ -1085,7 +1082,7 @@ KviServerOptionsWidget::KviServerOptionsWidget(QWidget * parent) KviTalToolTip::add(m_pSrvNetEdit,__tr2qs_ctx("<center>This is the name of the currently selected server or network</center>","options")); /* - m_pIpV6Check = new KviStyledCheckBox(__tr2qs_ctx("Use IPv6 protocol","options"),gbox); + m_pIpV6Check = new QCheckBox(__tr2qs_ctx("Use IPv6 protocol","options"),gbox); #ifndef COMPILE_IPV6_SUPPORT m_pIpV6Check->setEnabled(false); @@ -1114,7 +1111,7 @@ KviServerOptionsWidget::KviServerOptionsWidget(QWidget * parent) connect(m_pRecentPopup,SIGNAL(aboutToShow()),this,SLOT(recentServersPopupAboutToShow())); connect(m_pRecentPopup,SIGNAL(activated(int)),this,SLOT(recentServersPopupClicked(int))); - KviStyledToolButton * tb = new KviStyledToolButton(this); + QToolButton * tb = new QToolButton(this); addWidgetToLayout(tb,1,2,1,2); tb->setIcon(QIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)))); tb->setMenu(m_pRecentPopup); diff --git a/src/modules/options/optw_servers.h b/src/modules/options/optw_servers.h index 25dd4670d..949175d5f 100644 --- a/src/modules/options/optw_servers.h +++ b/src/modules/options/optw_servers.h @@ -31,13 +31,13 @@ #include <QDialog> #include <QButtonGroup> #include <QTabWidget> +#include <QCheckBox> +#include <QToolButton> class QLabel; class QLineEdit; -class KviStyledCheckBox; class QComboBox; class QPushButton; -class KviStyledToolButton; class KviIpEditor; class KviIrcServer; class KviTalPopupMenu; @@ -82,10 +82,10 @@ protected: QComboBox * m_pEncodingEditor; - KviStyledCheckBox * m_pAutoConnectCheck; + QCheckBox * m_pAutoConnectCheck; KviTalTreeWidget * m_pNickServTreeWidget; - KviStyledCheckBox * m_pNickServCheck; + QCheckBox * m_pNickServCheck; QPushButton * m_pAddRuleButton; QPushButton * m_pDelRuleButton; QPushButton * m_pEditRuleButton; @@ -121,14 +121,14 @@ protected: QComboBox * m_pLinkFilterEditor; QComboBox * m_pEncodingEditor; KviIpEditor * m_pIpEditor; - KviStyledCheckBox * m_pCacheIpCheck; - KviStyledCheckBox * m_pUseSSLCheck; - KviStyledCheckBox * m_pUseDefaultInitUMode; - KviStyledCheckBox * m_pIMode; - KviStyledCheckBox * m_pWMode; - KviStyledCheckBox * m_pSMode; - KviStyledCheckBox * m_pUseAutoConnect; - KviStyledCheckBox * m_pUseIPV6Check; + QCheckBox * m_pCacheIpCheck; + QCheckBox * m_pUseSSLCheck; + QCheckBox * m_pUseDefaultInitUMode; + QCheckBox * m_pIMode; + QCheckBox * m_pWMode; + QCheckBox * m_pSMode; + QCheckBox * m_pUseAutoConnect; + QCheckBox * m_pUseIPV6Check; QLineEdit * m_pPortEditor; QStringList m_lstChannels; KviChannelListSelector * m_pChannelListSelector; @@ -167,7 +167,7 @@ protected: KviTalPopupMenu * m_pContextPopup; KviTalPopupMenu * m_pImportPopup; KviIrcServer * m_pClipboard; - //KviStyledCheckBox * m_pIpV6Check; + //QCheckBox * m_pIpV6Check; QPushButton * m_pConnectCurrent; QPushButton * m_pConnectNew; KviServerOptionsTreeWidgetItem * m_pLastEditedItem; @@ -175,12 +175,12 @@ protected: KviNetworkDetailsWidget * m_pNetworkDetailsDialog; KviMexServerImport * m_pImportFilter; - KviStyledToolButton * m_pNewServerButton; - KviStyledToolButton * m_pNewNetworkButton; - KviStyledToolButton * m_pRemoveButton; - KviStyledToolButton * m_pCopyServerButton; - KviStyledToolButton * m_pPasteServerButton; - KviStyledToolButton * m_pImportButton; + QToolButton * m_pNewServerButton; + QToolButton * m_pNewNetworkButton; + QToolButton * m_pRemoveButton; + QToolButton * m_pCopyServerButton; + QToolButton * m_pPasteServerButton; + QToolButton * m_pImportButton; private: void fillServerList(); void saveLastItem(); diff --git a/src/modules/options/optw_texticons.cpp b/src/modules/options/optw_texticons.cpp index a490d7040..d415077e3 100644 --- a/src/modules/options/optw_texticons.cpp +++ b/src/modules/options/optw_texticons.cpp @@ -33,7 +33,7 @@ #include <QCursor> #include <QTableWidget> #include <QTableWidgetItem> - +#include <QToolButton> KviTextIconTableItem::KviTextIconTableItem(QTableWidget * t,KviTextIcon * icon) @@ -164,8 +164,8 @@ void KviTextIconsOptionsWidget::itemClicked(QTableWidgetItem *i) delete m_pBox; m_pBox=new KviTalHBox(0); m_pItem=(KviTextIconTableItem *)i; - KviStyledToolButton *iconButton=new KviStyledToolButton(m_pBox); - KviStyledToolButton *browseButton=new KviStyledToolButton(m_pBox); + QToolButton *iconButton=new QToolButton(m_pBox); + QToolButton *browseButton=new QToolButton(m_pBox); browseButton->setText("..."); m_pBox->setSpacing(0); m_pBox->setMargin(0); diff --git a/src/modules/options/optw_texticons.h b/src/modules/options/optw_texticons.h index 091415aeb..8084b38ad 100644 --- a/src/modules/options/optw_texticons.h +++ b/src/modules/options/optw_texticons.h @@ -28,7 +28,6 @@ #include "kvi_tal_popupmenu.h" #include "kvi_tal_hbox.h" -#include "kvi_styled_controls.h" #include <QTableWidget> #include <QTableWidgetItem> diff --git a/src/modules/reguser/edituser.cpp b/src/modules/reguser/edituser.cpp index b432717af..933f7cb59 100644 --- a/src/modules/reguser/edituser.cpp +++ b/src/modules/reguser/edituser.cpp @@ -387,7 +387,7 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste g = new QGridLayout(p2);
- m_pNotifyCheck = new KviStyledCheckBox(__tr2qs("Notify when user is online"),p2);
+ m_pNotifyCheck = new QCheckBox(__tr2qs("Notify when user is online"),p2);
g->addMultiCellWidget(m_pNotifyCheck,0,0,0,2);
l = new QLabel(__tr2qs("Notify nicknames:"),p2);
@@ -425,7 +425,7 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste f->setFrameStyle(QFrame::HLine | QFrame::Sunken);
g->addMultiCellWidget(f,4,4,0,2);
- m_pCustomColorCheck = new KviStyledCheckBox(__tr2qs("Use custom color in userlist"),p2);
+ m_pCustomColorCheck = new QCheckBox(__tr2qs("Use custom color in userlist"),p2);
if(r)
m_pCustomColorCheck->setChecked(r->getBoolProperty("useCustomColor"));
g->addMultiCellWidget(m_pCustomColorCheck,5,5,0,1);
@@ -446,29 +446,29 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste KviTalVBox * vb = new KviTalVBox(this);
vb->setMargin(10);
- m_pIgnoreEnabled = new KviStyledCheckBox(__tr2qs("Enable ignore for this user"),vb);
+ m_pIgnoreEnabled = new QCheckBox(__tr2qs("Enable ignore for this user"),vb);
QGroupBox * gb = new QGroupBox(__tr2qs("Ignore features"),vb);
connect(m_pIgnoreEnabled,SIGNAL(toggled(bool)),gb,SLOT(setEnabled(bool)));
QVBoxLayout * layout = new QVBoxLayout(gb,20,3);
- m_pIgnoreQuery = new KviStyledCheckBox(__tr2qs("Ignore query-messages"),gb);
+ m_pIgnoreQuery = new QCheckBox(__tr2qs("Ignore query-messages"),gb);
layout->addWidget(m_pIgnoreQuery);
- m_pIgnoreChannel = new KviStyledCheckBox(__tr2qs("Ignore channel-messages"),gb);
+ m_pIgnoreChannel = new QCheckBox(__tr2qs("Ignore channel-messages"),gb);
layout->addWidget(m_pIgnoreChannel);
- m_pIgnoreNotice = new KviStyledCheckBox(__tr2qs("Ignore notice-messages"),gb);
+ m_pIgnoreNotice = new QCheckBox(__tr2qs("Ignore notice-messages"),gb);
layout->addWidget(m_pIgnoreNotice);
- m_pIgnoreCtcp = new KviStyledCheckBox(__tr2qs("Ignore ctcp-messages"),gb);
+ m_pIgnoreCtcp = new QCheckBox(__tr2qs("Ignore ctcp-messages"),gb);
layout->addWidget(m_pIgnoreCtcp);
- m_pIgnoreInvite = new KviStyledCheckBox(__tr2qs("Ignore invites"),gb);
+ m_pIgnoreInvite = new QCheckBox(__tr2qs("Ignore invites"),gb);
layout->addWidget(m_pIgnoreInvite);
- m_pIgnoreDcc = new KviStyledCheckBox(__tr2qs("Ignore DCCs"),gb);
+ m_pIgnoreDcc = new QCheckBox(__tr2qs("Ignore DCCs"),gb);
layout->addWidget(m_pIgnoreDcc);
QWidget *w = new QWidget(vb);
diff --git a/src/modules/reguser/edituser.h b/src/modules/reguser/edituser.h index 151f6ebc9..67e25e4de 100644 --- a/src/modules/reguser/edituser.h +++ b/src/modules/reguser/edituser.h @@ -37,6 +37,7 @@ #include <QLineEdit> #include <QPushButton> #include <QTableWidget> +#include <QCheckBox> class KviRegisteredUser; @@ -103,7 +104,7 @@ protected: QPushButton * m_pEditMaskButton; QPushButton * m_pAddMaskButton; - KviStyledCheckBox * m_pNotifyCheck; + QCheckBox * m_pNotifyCheck; QLineEdit * m_pNotifyNick; KviPixmap * m_pAvatar; @@ -111,18 +112,18 @@ protected: KviPointerHashTable<QString,QString> * m_pPropertyDict; - KviStyledCheckBox * m_pCustomColorCheck; + QCheckBox * m_pCustomColorCheck; QColor * m_pCustomColor; KviColorSelector * m_pCustomColorSelector; //Ignore TAB - KviStyledCheckBox * m_pIgnoreEnabled; - KviStyledCheckBox * m_pIgnoreQuery; - KviStyledCheckBox * m_pIgnoreChannel; - KviStyledCheckBox * m_pIgnoreNotice; - KviStyledCheckBox * m_pIgnoreCtcp; - KviStyledCheckBox * m_pIgnoreInvite; - KviStyledCheckBox * m_pIgnoreDcc; + QCheckBox * m_pIgnoreEnabled; + QCheckBox * m_pIgnoreQuery; + QCheckBox * m_pIgnoreChannel; + QCheckBox * m_pIgnoreNotice; + QCheckBox * m_pIgnoreCtcp; + QCheckBox * m_pIgnoreInvite; + QCheckBox * m_pIgnoreDcc; virtual void closeEvent(QCloseEvent *); protected slots: diff --git a/src/modules/reguser/wizard.cpp b/src/modules/reguser/wizard.cpp index 62604df9e..7e23d41ba 100644 --- a/src/modules/reguser/wizard.cpp +++ b/src/modules/reguser/wizard.cpp @@ -33,7 +33,6 @@ #include "kvi_iconmanager.h" #include <QDesktopWidget> -#include "kvi_styled_controls.h" #include <QLabel> #include <QLineEdit> #include <QPushButton> @@ -209,7 +208,7 @@ KviRegistrationWizard::KviRegistrationWizard(const QString &startMask,KviRegiste f->setFrameStyle(QFrame::HLine | QFrame::Sunken); m_pPage4Layout->addMultiCellWidget(f,1,1,0,1); - m_pNotifyCheck = new KviStyledCheckBox(m_pPage4); + m_pNotifyCheck = new QCheckBox(m_pPage4); m_pNotifyCheck->setText(__tr2qs("Add this user to the notify list")); m_pNotifyCheck->setChecked(false); connect(m_pNotifyCheck,SIGNAL(toggled(bool)),this,SLOT(notifyCheckToggled(bool))); diff --git a/src/modules/reguser/wizard.h b/src/modules/reguser/wizard.h index ad675f803..359a84c2a 100644 --- a/src/modules/reguser/wizard.h +++ b/src/modules/reguser/wizard.h @@ -23,11 +23,11 @@ // #include "kvi_string.h" -#include "kvi_styled_controls.h" #include "kvi_tal_wizard.h" +#include <QCheckBox> + class QGridLayout; -//class KviStyledCheckBox; class QLabel; class QLineEdit; class QWidget; @@ -65,7 +65,7 @@ public: QLabel* m_pLabel3; KviPixmapSelector * m_pAvatarSelector; QWidget* m_pPage4; - KviStyledCheckBox* m_pNotifyCheck; + QCheckBox* m_pNotifyCheck; QLabel* m_pNotifyNickLabel1; QLabel* m_pNotifyNickLabel2; QLabel* m_pLabel4; diff --git a/src/modules/setup/setupwizard.cpp b/src/modules/setup/setupwizard.cpp index 1c9895126..cc68c5194 100644 --- a/src/modules/setup/setupwizard.cpp +++ b/src/modules/setup/setupwizard.cpp @@ -498,11 +498,11 @@ KviSetupWizard::KviSetupWizard() addPage(m_pDesktopIntegration,__tr2qs("Desktop Integration")); #if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW) - m_pCreateUrlHandlers = new KviStyledCheckBox(__tr2qs("Make KVIrc default IRC client"),m_pDesktopIntegration->m_pVBox); + m_pCreateUrlHandlers = new QCheckBox(__tr2qs("Make KVIrc default IRC client"),m_pDesktopIntegration->m_pVBox); m_pCreateUrlHandlers->setChecked(true); #endif #ifdef COMPILE_KDE_SUPPORT - m_pCreateDesktopShortcut = new KviStyledCheckBox(__tr2qs("Create desktop shortcut"),m_pDesktopIntegration->m_pVBox); + m_pCreateDesktopShortcut = new QCheckBox(__tr2qs("Create desktop shortcut"),m_pDesktopIntegration->m_pVBox); m_pCreateDesktopShortcut->setChecked(true); #endif diff --git a/src/modules/setup/setupwizard.h b/src/modules/setup/setupwizard.h index 019504602..c1ec8bf32 100644 --- a/src/modules/setup/setupwizard.h +++ b/src/modules/setup/setupwizard.h @@ -37,7 +37,7 @@ #include <QLineEdit> #include <QRadioButton> #include <QComboBox> -#include "kvi_styled_controls.h" +#include <QCheckBox> #include <QGroupBox> #define KviTalVButtonGroup QGroupBox @@ -86,8 +86,8 @@ public: QRadioButton * m_pThemeNone; // Welcome - KviStyledCheckBox * m_pCreateUrlHandlers; - KviStyledCheckBox * m_pCreateDesktopShortcut; + QCheckBox * m_pCreateUrlHandlers; + QCheckBox * m_pCreateDesktopShortcut; //Dir QLineEdit * m_pDataPathEdit; diff --git a/src/modules/sharedfileswindow/sharedfileswindow.cpp b/src/modules/sharedfileswindow/sharedfileswindow.cpp index 6fde3fcd1..caddd491f 100644 --- a/src/modules/sharedfileswindow/sharedfileswindow.cpp +++ b/src/modules/sharedfileswindow/sharedfileswindow.cpp @@ -35,7 +35,6 @@ #include "kvi_themedlabel.h" #include "kvi_input.h" #include "kvi_filedialog.h" -#include "kvi_styled_controls.h" #include "kvi_tal_hbox.h" #include "kvi_tal_vbox.h" @@ -45,7 +44,6 @@ #include <QPushButton> #include <QSplitter> #include <QLayout> -#include "kvi_styled_controls.h" #include <QMessageBox> #include <QFileInfo> @@ -87,7 +85,7 @@ KviSharedFileEditDialog::KviSharedFileEditDialog(QWidget * par,KviSharedFile * f g->addWidget(m_pUserMaskEdit,2,1,1,3); // g->addMultiCellWidget( m_pUserMaskEdit, 2, 2, 1, 3 ); - m_pExpireCheckBox = new KviStyledCheckBox(__tr2qs_ctx("Expire at:","sharedfileswindow"),this); + m_pExpireCheckBox = new QCheckBox(__tr2qs_ctx("Expire at:","sharedfileswindow"),this); g->addWidget(m_pExpireCheckBox,3,0); m_pExpireDateTimeEdit = new QDateTimeEdit(this); diff --git a/src/modules/sharedfileswindow/sharedfileswindow.h b/src/modules/sharedfileswindow/sharedfileswindow.h index 7fa4f7860..946f7c1c7 100644 --- a/src/modules/sharedfileswindow/sharedfileswindow.h +++ b/src/modules/sharedfileswindow/sharedfileswindow.h @@ -30,10 +30,10 @@ #include "kvi_console.h" #include "kvi_moduleextension.h" #include "kvi_sharedfiles.h" -#include "kvi_styled_controls.h" #include "kvi_tal_treewidget.h" #include <QDialog> +#include <QCheckBox> class QGridLayout; class QDateTimeEdit; @@ -65,7 +65,7 @@ public: QLineEdit * m_pUserMaskEdit; QPushButton * m_pBrowseButton; QLineEdit * m_pShareNameEdit; - KviStyledCheckBox * m_pExpireCheckBox; + QCheckBox * m_pExpireCheckBox; public: KviSharedFile * getResult(); protected slots: diff --git a/src/modules/theme/managementdialog.cpp b/src/modules/theme/managementdialog.cpp index 503510ec5..cf54bcb65 100644 --- a/src/modules/theme/managementdialog.cpp +++ b/src/modules/theme/managementdialog.cpp @@ -35,7 +35,6 @@ #include "kvi_frame.h" #include "kvi_iconmanager.h" #include "kvi_internalcmd.h" -#include "kvi_styled_controls.h" #include "kvi_doublebuffer.h" #include "kvi_packagefile.h" #include "kvi_fileextensions.h" @@ -127,10 +126,10 @@ KviThemeManagementDialog::KviThemeManagementDialog(QWidget * parent) hb->setSpacing(1); g->addWidget(hb,0,0); - KviStyledToolButton * tb; + QToolButton * tb; QFrame * sep; - tb = new KviStyledToolButton(hb); + tb = new QToolButton(hb); tb->setIcon(*(g_pIconManager->getBigIcon(KVI_BIGICON_SAVE))); tb->setIconSize(QSize(32,32)); QToolTip::add(tb,__tr2qs_ctx("Save Current Theme...","theme")); @@ -140,14 +139,14 @@ KviThemeManagementDialog::KviThemeManagementDialog(QWidget * parent) sep->setFrameStyle(QFrame::VLine | QFrame::Sunken); sep->setMinimumWidth(12); - m_pPackThemeButton = new KviStyledToolButton(hb); + m_pPackThemeButton = new QToolButton(hb); m_pPackThemeButton->setIcon(*(g_pIconManager->getBigIcon(KVI_BIGICON_PACK))); m_pPackThemeButton->setIconSize(QSize(32,32)); QToolTip::add(m_pPackThemeButton,__tr2qs_ctx("Export Selected Themes to a Distributable Package","theme")); connect(m_pPackThemeButton,SIGNAL(clicked()),this,SLOT(packTheme())); - m_pDeleteThemeButton = new KviStyledToolButton(hb); + m_pDeleteThemeButton = new QToolButton(hb); m_pDeleteThemeButton->setIcon(*(g_pIconManager->getBigIcon(KVI_BIGICON_REMOVE))); m_pDeleteThemeButton->setIconSize(QSize(32,32)); QToolTip::add(m_pDeleteThemeButton,__tr2qs_ctx("Delete Selected Themes","theme")); @@ -157,13 +156,13 @@ KviThemeManagementDialog::KviThemeManagementDialog(QWidget * parent) sep->setFrameStyle(QFrame::VLine | QFrame::Sunken); sep->setMinimumWidth(12); - tb = new KviStyledToolButton(hb); + tb = new QToolButton(hb); tb->setIcon(*(g_pIconManager->getBigIcon(KVI_BIGICON_OPEN))); tb->setIconSize(QSize(32,32)); QToolTip::add(tb,__tr2qs_ctx("Install Theme Package From Disk","theme")); connect(tb,SIGNAL(clicked()),this,SLOT(installFromFile())); - tb = new KviStyledToolButton(hb); + tb = new QToolButton(hb); tb->setIcon(*(g_pIconManager->getBigIcon(KVI_BIGICON_WWW))); tb->setIconSize(QSize(32,32)); QToolTip::add(tb,__tr2qs_ctx("Get More Themes...","theme")); diff --git a/src/modules/theme/managementdialog.h b/src/modules/theme/managementdialog.h index 610e2abb7..3873b369a 100644 --- a/src/modules/theme/managementdialog.h +++ b/src/modules/theme/managementdialog.h @@ -38,14 +38,12 @@ #include <QTextDocument> #include <QListWidget> #include <QItemDelegate> +#include <QToolButton> class QLineEdit; class QPushButton; class QLabel; -class KviStyledCheckBox; - class KviDynamicToolTip; -class KviStyledToolButton; class KviThemeListWidgetItem : public KviTalListWidgetItem @@ -71,8 +69,8 @@ protected: KviTalIconAndRichTextItemDelegate * m_pItemDelegate; KviTalListWidget * m_pListWidget; KviTalPopupMenu * m_pContextPopup; - KviStyledToolButton * m_pDeleteThemeButton; - KviStyledToolButton * m_pPackThemeButton; + QToolButton * m_pDeleteThemeButton; + QToolButton * m_pPackThemeButton; public: static KviThemeManagementDialog * instance(){ return m_pInstance; }; static void display(); diff --git a/src/modules/theme/savethemedialog.cpp b/src/modules/theme/savethemedialog.cpp index 9712d5fb6..d290b1a40 100644 --- a/src/modules/theme/savethemedialog.cpp +++ b/src/modules/theme/savethemedialog.cpp @@ -32,7 +32,6 @@ #include "kvi_app.h" #include "kvi_frame.h" #include "kvi_iconmanager.h" -#include "kvi_styled_controls.h" #include "kvi_packagefile.h" #include "kvi_fileextensions.h" #include "kvi_filedialog.h" diff --git a/src/modules/theme/savethemedialog.h b/src/modules/theme/savethemedialog.h index b77b6cced..5760eb440 100644 --- a/src/modules/theme/savethemedialog.h +++ b/src/modules/theme/savethemedialog.h @@ -33,9 +33,7 @@ class QLineEdit; class QPushButton; -class KviStyledCheckBox; class QLabel; -//class Q3MultiLineEdit; class KviTalTextEdit; class KviFileSelector; diff --git a/src/modules/tip/libkvitip.cpp b/src/modules/tip/libkvitip.cpp index bf6bc1868..3fb817ed2 100644 --- a/src/modules/tip/libkvitip.cpp +++ b/src/modules/tip/libkvitip.cpp @@ -23,7 +23,6 @@ #include "libkvitip.h"
#include "kvi_module.h"
-#include "kvi_styled_controls.h"
#include "kvi_locale.h"
#include "kvi_app.h"
#include "kvi_iconmanager.h"
@@ -127,7 +126,7 @@ KviTipWindow::KviTipWindow() connect(pb,SIGNAL(clicked()),this,SLOT(close()));
pb->setDefault(true);
- m_pShowAtStartupCheck = new KviStyledCheckBox(__tr2qs("Show at startup"),this);
+ m_pShowAtStartupCheck = new QCheckBox(__tr2qs("Show at startup"),this);
m_pShowAtStartupCheck->setChecked(KVI_OPTION_BOOL(KviOption_boolShowTipAtStartup));
m_pShowAtStartupCheck->setGeometry(
KVI_TIP_WINDOW_BORDER,
diff --git a/src/modules/tip/libkvitip.h b/src/modules/tip/libkvitip.h index f898b42d5..79f9b7f0a 100644 --- a/src/modules/tip/libkvitip.h +++ b/src/modules/tip/libkvitip.h @@ -23,14 +23,13 @@ // Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // -#include "kvi_styled_controls.h" #include "kvi_string.h" #include "kvi_config.h" #include <QWidget> #include <QFrame> #include <QPixmap> -#include "kvi_styled_controls.h" +#include <QCheckBox> #include <QTextDocument> @@ -57,7 +56,7 @@ public: ~KviTipWindow(); protected: KviTipFrame * m_pTipFrame; - KviStyledCheckBox * m_pShowAtStartupCheck; + QCheckBox * m_pShowAtStartupCheck; KviConfig * m_pConfig; QString m_szConfigFileName; // no path! protected: diff --git a/src/modules/url/libkviurl.cpp b/src/modules/url/libkviurl.cpp index 3ab49bcd9..8ccb35df9 100644 --- a/src/modules/url/libkviurl.cpp +++ b/src/modules/url/libkviurl.cpp @@ -20,7 +20,6 @@ #include "libkviurl.h" #include "icons.h" -#include "kvi_styled_controls.h" #include "kvi_module.h" #include "kvi_app.h" #include "kvi_frame.h" @@ -346,11 +345,11 @@ ConfigDialog::ConfigDialog() KviConfig *cfg = new KviConfig(szConfigPath.ptr(),KviConfig::Read); cfg->setGroup("ConfigDialog"); - cb[0] = new KviStyledCheckBox(__tr2qs("Save URL list on module unload"),this); + cb[0] = new QCheckBox(__tr2qs("Save URL list on module unload"),this); cb[0]->setChecked(cfg->readBoolEntry("SaveUrlListOnUnload",false)); g->addMultiCellWidget(cb[0],0,0,0,1); - cb[1] = new KviStyledCheckBox(__tr2qs("Save columns width on URL list close"),this); + cb[1] = new QCheckBox(__tr2qs("Save columns width on URL list close"),this); cb[1]->setChecked(cfg->readBoolEntry("SaveColumnWidthOnClose",false)); g->addMultiCellWidget(cb[1],1,1,0,1); @@ -413,7 +412,7 @@ BanFrame::BanFrame(QWidget *parent, const char *name, bool banEnabled) QGridLayout *g = new QGridLayout(this); - m_pEnable = new KviStyledCheckBox(__tr2qs("Enable URL ban list"),this); + m_pEnable = new QCheckBox(__tr2qs("Enable URL ban list"),this); connect(m_pEnable,SIGNAL(clicked()),this,SLOT(enableClicked())); m_pEnable->setChecked(banEnabled); g->addMultiCellWidget(m_pEnable,0,0,0,1); diff --git a/src/modules/url/libkviurl.h b/src/modules/url/libkviurl.h index 8f4918151..3f69c534d 100644 --- a/src/modules/url/libkviurl.h +++ b/src/modules/url/libkviurl.h @@ -26,7 +26,6 @@ #include "kvi_window.h" #include "kvi_tal_menubar.h" #include "kvi_mextoolbar.h" -#include "kvi_styled_controls.h" #include "kvi_kvs_action.h" #include "kvi_tal_listview.h" #include "kvi_tal_listbox.h" @@ -36,12 +35,11 @@ #include <QString> #include <QPushButton> #include <QFile> -#include "kvi_styled_controls.h" #include <QMenuBar> #include <QInputDialog> -#include "kvi_styled_controls.h" #include <QIcon> #include <QPixmap> +#include <QCheckBox> typedef struct _KviUrl { @@ -91,7 +89,7 @@ public: ~BanFrame(); void saveBans(); private: - KviStyledCheckBox *m_pEnable; + QCheckBox *m_pEnable; KviTalListBox *m_pBanList; QPushButton *m_pAddBtn; QPushButton *m_pRemoveBtn; @@ -110,7 +108,7 @@ public: ConfigDialog(); ~ConfigDialog(); private: - KviStyledCheckBox *cb[cbnum]; + QCheckBox *cb[cbnum]; BanFrame *m_pBanFrame; void closeEvent(QCloseEvent *); protected slots: |
