#include <groupsWidget.h>
Inheritance diagram for GroupsWidget:
Definition at line 25 of file groupsWidget.h.
Public Member Functions | |
GroupsWidget (QWidget *parent=0, const char *name=0) | |
void | keyPressEvent (QKeyEvent *e) |
QSize | sizeHint () const |
void | setTextWidth (int val) |
int | getTextWidth () |
Protected Member Functions | |
void | contentsMousePressEvent (QMouseEvent *e) |
Private Attributes | |
int | textWidth |
|
Definition at line 18 of file groupsWidget.cpp. 00019 : QIconView( parent, name) 00020 { 00021 setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum); 00022 }
|
|
Definition at line 24 of file groupsWidget.cpp. 00025 { 00026 //ignore all clicks other than left-clicks 00027 if( e->button() != Qt::LeftButton ) return; 00028 00029 QIconView::contentsMousePressEvent( e ); 00030 }
|
|
Definition at line 68 of file groupsWidget.cpp. 00069 { return textWidth; }
|
|
Definition at line 32 of file groupsWidget.cpp. 00033 { 00034 //change key left/right presses to up/down events 00035 int key = e->key(); 00036 if( key == Key_Left) key = Key_Up; 00037 if( key == Key_Right) key = Key_Down; 00038 00039 QIconView::keyPressEvent( 00040 new QKeyEvent(QEvent::KeyPress, 00041 key, 00042 e->ascii(), 00043 e->state(), 00044 e->text(), 00045 e->isAutoRepeat(), 00046 e->count() ) ); 00047 }
|
|
Definition at line 65 of file groupsWidget.cpp. References textWidth. Referenced by ConfigurationWidget::ConfigurationWidget(). 00066 { textWidth = val; }
|
|
Definition at line 49 of file groupsWidget.cpp. 00050 { 00051 QSize s = QIconView::sizeHint(); 00052 00053 //find max item width 00054 s.setWidth(0); 00055 QIconViewItem *item; 00056 for( item = firstItem(); item != NULL; item = item->nextItem() ) 00057 { 00058 if(item->width() + 2 > s.width() ) 00059 s.setWidth( item->width() ); 00060 } 00061 s.setWidth( s.width() + 2*spacing() ); 00062 return s; 00063 }
|
|
Definition at line 43 of file groupsWidget.h. Referenced by setTextWidth(). |