From fb428def5f94aea0d8b206599a549b4f0f22799e Mon Sep 17 00:00:00 2001 From: Michal Kubecek Date: Tue, 14 Apr 2015 15:11:35 +0200 Subject: Qt4 port step 8: disable buddy list tooltip This will need rewriting to event handler. Disable for now. --- src/gui/buddylistview.cpp | 30 ------------------------------ src/gui/buddylistview.h | 10 ---------- src/gui/mphoneform.ui | 1 - src/gui/mphoneform.ui.h | 6 +----- 4 files changed, 1 insertion(+), 46 deletions(-) (limited to 'src/gui') diff --git a/src/gui/buddylistview.cpp b/src/gui/buddylistview.cpp index 75d25f4..a094f47 100644 --- a/src/gui/buddylistview.cpp +++ b/src/gui/buddylistview.cpp @@ -246,33 +246,3 @@ t_presence_epa *BLViewUserItem::get_presence_epa(void) { return presence_epa; } - -BuddyListViewTip::BuddyListViewTip(Q3ListView *parent) : - QToolTip(parent->viewport()), - parentListView(parent) -{} - -void BuddyListViewTip::maybeTip ( const QPoint & p ) { - Q3ListView *listView = parentListView; - - Q3ListViewItem *item = listView->itemAt(p); - if (!item) return; - - AbstractBLVItem *bitem = dynamic_cast(item); - if (!bitem) return; - - int x = listView->header()->sectionPos( listView->header()->mapToIndex( 0 ) ) + - listView->treeStepSize() * ( item->depth() + ( listView->rootIsDecorated() ? 1 : 0) ) + - listView->itemMargin(); - - if ( p.x() > x || - p.x() < listView->header()->sectionPos( listView->header()->mapToIndex( 0 ) ) ) - { - // p is not on root decoration - QRect tipRect = listView->itemRect(item); - - // Shrink rect to exclude root decoration - tipRect.setX(x); - tip(tipRect, bitem->get_tip()); - } -} diff --git a/src/gui/buddylistview.h b/src/gui/buddylistview.h index 54dc9b5..eb796fe 100644 --- a/src/gui/buddylistview.h +++ b/src/gui/buddylistview.h @@ -79,14 +79,4 @@ public: t_presence_epa *get_presence_epa(void); }; -class BuddyListViewTip : public QToolTip { -private: - Q3ListView *parentListView; - -public: - BuddyListViewTip(Q3ListView *parent); - virtual ~BuddyListViewTip() {}; - void maybeTip ( const QPoint & p ); -}; - #endif diff --git a/src/gui/mphoneform.ui b/src/gui/mphoneform.ui index d70d279..4a07346 100644 --- a/src/gui/mphoneform.ui +++ b/src/gui/mphoneform.ui @@ -2707,7 +2707,6 @@ If the SAS is equal at both ends, then you should confirm it by clicking this pa QPopupMenu *buddyPopupMenu; QPopupMenu *buddyListPopupMenu; QPopupMenu *changeAvailabilityPopupMenu; - QToolTip *buddyToolTip; bool viewBuddyList; diff --git a/src/gui/mphoneform.ui.h b/src/gui/mphoneform.ui.h index 1b51704..9a2a0d7 100644 --- a/src/gui/mphoneform.ui.h +++ b/src/gui/mphoneform.ui.h @@ -89,9 +89,7 @@ void MphoneForm::init() changeAvailabilityPopupMenu); buddyListPopupMenu->insertItem(addIcon, tr("&Add buddy..."), this, SLOT(doAddBuddy())); - // Tool tip for buddy list - buddyToolTip = new BuddyListViewTip(buddyListView); - MEMMAN_NEW(buddyToolTip); + // ToDo: Tool tip for buddy list // Line timers lineTimer1 = 0; @@ -288,8 +286,6 @@ void MphoneForm::destroy() delete changeAvailabilityPopupMenu; MEMMAN_DELETE(buddyListPopupMenu); delete buddyListPopupMenu; - MEMMAN_DELETE(buddyToolTip); - delete buddyToolTip; } QString MphoneForm::lineSubstate2str( int line) { -- cgit v1.2.3