diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-08-24 21:28:39 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-08-31 16:31:47 +0900 |
commit | 7c3b44b81086c6b99f91e294c3b438dc808b47e2 (patch) | |
tree | d92d61649487df1a2fbd200d4ead11a7f16ba63f /src/modules/addon/managementdialog.cpp | |
parent | cafbffba66b6ce809783ed1eb4d24aac6fe9701f (diff) | |
download | kvirc-7c3b44b81086c6b99f91e294c3b438dc808b47e2.tar.gz kvirc-7c3b44b81086c6b99f91e294c3b438dc808b47e2.zip |
Drop USE_QT4 code
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 030a2248f3630fd0404df98beffc78b5b5ca4c31)
Diffstat (limited to 'src/modules/addon/managementdialog.cpp')
-rw-r--r-- | src/modules/addon/managementdialog.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/modules/addon/managementdialog.cpp b/src/modules/addon/managementdialog.cpp index beb9f4f5..f89d9bfe 100644 --- a/src/modules/addon/managementdialog.cpp +++ b/src/modules/addon/managementdialog.cpp @@ -45,12 +45,7 @@ #include <tqmessagebox.h> #include <tqframe.h> #include "kvi_tal_scrollview.h" -#ifdef COMPILE_USE_QT4 - #include <tq3header.h> - -#else #include <tqheader.h> -#endif #include "kvi_draganddrop.h" #include <tqpainter.h> #include <tqpixmap.h> @@ -84,13 +79,7 @@ KviScriptAddonListViewItem::KviScriptAddonListViewItem(KviTalListView * v,KviKvs t += a->description(); t += "</font></nobr>"; m_szKey = a->visibleName().upper(); -#ifdef COMPILE_USE_QT4 - m_pText = new TQTextDocument(); - m_pText->setHtml(t); - m_pText->setDefaultFont(v->font()); -#else m_pText = new TQSimpleRichText(t,v->font()); -#endif TQPixmap * p = a->icon(); m_pIcon = p ? new TQPixmap(*p) : new TQPixmap(LVI_ICON_SIZE,LVI_ICON_SIZE); @@ -115,33 +104,14 @@ void KviScriptAddonListViewItem::setup() if(iWidth < LVI_MINIMUM_CELL_WIDTH)iWidth = LVI_MINIMUM_CELL_WIDTH; iWidth -= LVI_BORDER + LVI_ICON_SIZE + LVI_SPACING + LVI_BORDER; - #ifdef COMPILE_USE_QT4 - int iHeight = m_pText->size().height() + (2 * LVI_BORDER); - #else m_pText->setWidth(iWidth); int iHeight = m_pText->height() + (2 * LVI_BORDER); - #endif if(iHeight < (LVI_ICON_SIZE + (2 * LVI_BORDER)))iHeight = LVI_ICON_SIZE + (2 * LVI_BORDER); setHeight(iHeight+2); } void KviScriptAddonListViewItem::paintCell(TQPainter * p,const TQColorGroup & cg,int column,int width,int align) { - #ifdef COMPILE_USE_QT4 - if (isSelected()) - { - TQColor col(m_pListView->palette().highlight()); - col.setAlpha(127); - p->setBrush(col); - p->drawRect(0, 0, m_pListView->visibleWidth(), height()); - } - p->drawPixmap(LVI_BORDER,LVI_BORDER,*m_pIcon); - int afterIcon = LVI_BORDER + LVI_ICON_SIZE + LVI_SPACING; - int www = m_pListView->visibleWidth() - (afterIcon + LVI_BORDER); - p->translate(afterIcon,LVI_BORDER); - m_pText->setPageSize(TQSizeF(www,height() - (LVI_BORDER * 2))); - m_pText->drawContents(p); - #else p->drawPixmap(LVI_BORDER,LVI_BORDER,*m_pIcon); int afterIcon = LVI_BORDER + LVI_ICON_SIZE + LVI_SPACING; int www = m_pListView->visibleWidth() - (afterIcon + LVI_BORDER); @@ -155,7 +125,6 @@ void KviScriptAddonListViewItem::paintCell(TQPainter * p,const TQColorGroup & cg } else { m_pText->draw(p,afterIcon,LVI_BORDER,TQRect(afterIcon,LVI_BORDER,www,height() - (LVI_BORDER * 2)),cg); } - #endif } |