Changeset 4716

Show
Ignore:
Timestamp:
10/19/06 06:46:34 (2 years ago)
Author:
erijo
Message:

Use CETabWidget instead of QTabWidget all over the place, to be able to switch tabs with the mouse wheel. Thanks to Fabian for suggesting this (and supplying a patch). Closes #1422.

Also fixes a small bug in the "mouse wheel" logic. Without this fix, you could use the mouse wheel anywhere in the options dialog to change tabs.

Location:
trunk/qt-gui/src
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/qt-gui/src/ewidgets.cpp

    r4702 r4716  
    528528void CETabBar::wheelEvent(QWheelEvent *e) 
    529529{ 
    530   if (count() <= 1) 
     530  if (count() <= 1 || !hasMouse()) 
    531531  { 
    532532    e->ignore(); 
  • trunk/qt-gui/src/optionsdlg.cpp

    r4704 r4716  
    4848#endif 
    4949 
     50#include "ewidgets.h" 
    5051#include "optionsdlg.h" 
    5152#include "licq_log.h" 
     
    7071  QBoxLayout* top_lay = new QVBoxLayout(this, 4); 
    7172 
    72   tabw = new QTabWidget(this); 
     73  tabw = new CETabWidget(this); 
    7374  top_lay->addWidget(tabw); 
    7475 
  • trunk/qt-gui/src/searchuserdlg.cpp

    r4699 r4716  
    3434#include <qpushbutton.h> 
    3535#include <qlineedit.h> 
    36 #include <qtabwidget.h> 
    3736#include <qvbuttongroup.h> 
    3837#include <qvalidator.h> 
     
    4140#include <qtextcodec.h> 
    4241 
     42#include "ewidgets.h" 
    4343#include "searchuserdlg.h" 
    4444#include "sigman.h" 
     
    144144 
    145145  // pre-search widgets 
    146   search_tab = new QTabWidget(this); 
     146  search_tab = new CETabWidget(this); 
    147147 
    148148  //-- first tab: search by Alias/name 
  • trunk/qt-gui/src/userinfodlg.cpp

    r4699 r4716  
    119119  QBoxLayout *lay = new QVBoxLayout(this, 8); 
    120120 
    121   tabs = new QTabWidget(this); 
     121  tabs = new CETabWidget(this); 
    122122  lay->addWidget(tabs, 2); 
    123123