diff options
| author | 2007-01-26 03:54:22 +0000 | |
|---|---|---|
| committer | 2007-01-26 03:54:22 +0000 | |
| commit | 1a8a7e6f145613c34ff0604b95370995fc625ef2 (patch) | |
| tree | 79b63ab083ae2eecfbf98170e9d50731f6bb4d67 /src/modules/theme | |
| parent | fix win compilation and update win projects (diff) | |
| download | KVIrc-1a8a7e6f145613c34ff0604b95370995fc625ef2.tar.gz KVIrc-1a8a7e6f145613c34ff0604b95370995fc625ef2.tar.bz2 KVIrc-1a8a7e6f145613c34ff0604b95370995fc625ef2.zip | |
More Qt 4.x port and the torrent module by Alexander Stillich
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@255 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/theme')
| -rw-r--r-- | src/modules/theme/managementdialog.cpp | 26 | ||||
| -rw-r--r-- | src/modules/theme/managementdialog.h | 14 |
2 files changed, 20 insertions, 20 deletions
diff --git a/src/modules/theme/managementdialog.cpp b/src/modules/theme/managementdialog.cpp index d385e4746..a3c004c34 100644 --- a/src/modules/theme/managementdialog.cpp +++ b/src/modules/theme/managementdialog.cpp @@ -39,7 +39,7 @@ #include <qlayout.h> #include <qpushbutton.h> -#include <qlistbox.h> +#include "kvi_tal_listbox.h" #include <qlineedit.h> #include <qtextedit.h> #include <qregexp.h> @@ -78,8 +78,8 @@ extern QRect g_rectManagementDialogGeometry; -KviThemeListBoxItem::KviThemeListBoxItem(QListBox * box,KviThemeInfo * inf) -: QListBoxText(box) +KviThemeListBoxItem::KviThemeListBoxItem(KviTalListBox * box,KviThemeInfo * inf) +: KviTalListBoxText(box) { m_pThemeInfo = inf; QString t; @@ -120,7 +120,7 @@ KviThemeListBoxItem::~KviThemeListBoxItem() void KviThemeListBoxItem::paint(QPainter * p) { - QListBoxText::paint(p); + KviTalListBoxText::paint(p); p->drawPixmap(LVI_BORDER,LVI_BORDER, *(g_pIconManager->getBigIcon(QString(KVI_BIGICON_THEME))) ); int afterIcon = LVI_BORDER + LVI_ICON_SIZE + LVI_SPACING; int www = p->window().width() - (afterIcon + LVI_BORDER); @@ -128,7 +128,7 @@ void KviThemeListBoxItem::paint(QPainter * p) m_pText->draw(p,afterIcon,LVI_BORDER,QRect(afterIcon,LVI_BORDER,www,p->window().height() - (LVI_BORDER * 2)),listBox()->viewport()->colorGroup()); } -int KviThemeListBoxItem::height(const QListBox * lb) const +int KviThemeListBoxItem::height(const KviTalListBox * lb) const { int iHeight = m_pText->height() + (2 * LVI_BORDER); if(iHeight < (LVI_ICON_SIZE + (2 * LVI_BORDER)))iHeight = LVI_ICON_SIZE + (2 * LVI_BORDER); @@ -197,13 +197,13 @@ KviThemeManagementDialog::KviThemeManagementDialog(QWidget * parent) QWidget *w= new QWidget(hb); w->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum); - m_pListBox = new QListBox(this); + m_pListBox = new KviTalListBox(this); m_pListBox->setMinimumHeight(400); m_pListBox->setMinimumWidth(400); - m_pListBox->setSelectionMode(QListBox::Extended); - connect(m_pListBox,SIGNAL(doubleClicked(QListBoxItem *)),this,SLOT(applyTheme(QListBoxItem *))); - connect(m_pListBox,SIGNAL(contextMenuRequested(QListBoxItem *,const QPoint &)), - this,SLOT(contextMenuRequested(QListBoxItem *,const QPoint &))); + m_pListBox->setSelectionMode(KviTalListBox::Extended); + connect(m_pListBox,SIGNAL(doubleClicked(KviTalListBoxItem *)),this,SLOT(applyTheme(KviTalListBoxItem *))); + connect(m_pListBox,SIGNAL(contextMenuRequested(KviTalListBoxItem *,const QPoint &)), + this,SLOT(contextMenuRequested(KviTalListBoxItem *,const QPoint &))); connect(m_pListBox,SIGNAL(selectionChanged()),this,SLOT(enableDisableButtons())); g->addMultiCellWidget(m_pListBox,1,1,0,1); @@ -274,7 +274,7 @@ void KviThemeManagementDialog::packTheme() } -void KviThemeManagementDialog::contextMenuRequested(QListBoxItem * it,const QPoint & pos) +void KviThemeManagementDialog::contextMenuRequested(KviTalListBoxItem * it,const QPoint & pos) { if(it) { @@ -286,7 +286,7 @@ void KviThemeManagementDialog::contextMenuRequested(QListBoxItem * it,const QPoi } } -void KviThemeManagementDialog::applyTheme ( QListBoxItem * it) +void KviThemeManagementDialog::applyTheme ( KviTalListBoxItem * it) { if(it)m_pListBox->setCurrentItem(it); applyCurrentTheme(); @@ -407,7 +407,7 @@ void KviThemeManagementDialog::fillThemeBox() bool KviThemeManagementDialog::hasSelectedItems() { - for(QListBoxItem * it = m_pListBox->firstItem();it;it = it->next()) + for(KviTalListBoxItem * it = m_pListBox->firstItem();it;it = it->next()) { if(it->isSelected())return true; } diff --git a/src/modules/theme/managementdialog.h b/src/modules/theme/managementdialog.h index 25658a9dc..ef2fc37ec 100644 --- a/src/modules/theme/managementdialog.h +++ b/src/modules/theme/managementdialog.h @@ -30,7 +30,7 @@ #include <qdialog.h> #include <qsimplerichtext.h> -#include <qlistbox.h> +#include "kvi_tal_listbox.h" #include <qcombobox.h> #include "kvi_tal_popupmenu.h" #include <qcursor.h> @@ -48,17 +48,17 @@ class KviDynamicToolTip; class KviStyledToolButton; -class KviThemeListBoxItem : public QListBoxText +class KviThemeListBoxItem : public KviTalListBoxText { public: - KviThemeListBoxItem(QListBox * box,KviThemeInfo * inf); + KviThemeListBoxItem(KviTalListBox * box,KviThemeInfo * inf); virtual ~KviThemeListBoxItem(); public: KviThemeInfo * m_pThemeInfo; QSimpleRichText * m_pText; public: KviThemeInfo * themeInfo(){ return m_pThemeInfo; }; - virtual int height ( const QListBox * lb ) const ; + virtual int height ( const KviTalListBox * lb ) const ; protected: virtual void paint ( QPainter * painter ); }; @@ -72,7 +72,7 @@ public: virtual ~KviThemeManagementDialog(); protected: static KviThemeManagementDialog * m_pInstance; - QListBox * m_pListBox; + KviTalListBox * m_pListBox; KviTalPopupMenu * m_pContextPopup; KviStyledToolButton * m_pDeleteThemeButton; KviStyledToolButton * m_pPackThemeButton; @@ -92,10 +92,10 @@ protected slots: void deleteTheme(); void closeClicked(); void packTheme(); - void applyTheme(QListBoxItem *); + void applyTheme(KviTalListBoxItem *); void applyCurrentTheme(); void enableDisableButtons(); - void contextMenuRequested(QListBoxItem * item, const QPoint & pos); + void contextMenuRequested(KviTalListBoxItem * item, const QPoint & pos); void tipRequest(KviDynamicToolTip *pTip,const QPoint &pnt); }; |
