From 7c3b44b81086c6b99f91e294c3b438dc808b47e2 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 24 Aug 2023 21:28:39 +0900 Subject: Drop USE_QT4 code Signed-off-by: Michele Calgaro (cherry picked from commit 030a2248f3630fd0404df98beffc78b5b5ca4c31) --- src/modules/addon/managementdialog.cpp | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'src/modules/addon/managementdialog.cpp') diff --git a/src/modules/addon/managementdialog.cpp b/src/modules/addon/managementdialog.cpp index beb9f4f..f89d9bf 100644 --- a/src/modules/addon/managementdialog.cpp +++ b/src/modules/addon/managementdialog.cpp @@ -45,12 +45,7 @@ #include #include #include "kvi_tal_scrollview.h" -#ifdef COMPILE_USE_QT4 - #include - -#else #include -#endif #include "kvi_draganddrop.h" #include #include @@ -84,13 +79,7 @@ KviScriptAddonListViewItem::KviScriptAddonListViewItem(KviTalListView * v,KviKvs t += a->description(); t += ""; 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 } -- cgit v1.2.3