1 #ifndef CONTACTWIDGETITEM_H
2 #define CONTACTWIDGETITEM_H
9 const int ICON_SIZE = 38;
10 const int MARGE_HEIGH = 4;
11 const int CONTACT_ITEM_MARGE_WIDTH = 50;
12 const int BTN_SELECTED_OFFSET_X = 10;
13 const int BTN_SELECTED_OFFSET_Y = 5;
14 const int USER_PIC_OFFSET_X = BTN_SELECTED_OFFSET_X + 80;
15 const int USER_PIC_OFFSET_Y = BTN_SELECTED_OFFSET_Y + 20;
16 const int FULL_NAME_OFFSET_X = USER_PIC_OFFSET_X + 50;
17 const int FULL_NAME_OFFSET_Y = 5;
18 const int MOBILE_NUMBER_OFFSET_X = FULL_NAME_OFFSET_X;
19 const int MOBILE_NUMBER_OFFSET_Y = FULL_NAME_OFFSET_Y + 30;
21 const int BTN_SELECTED_MARGE_WIDTH = 130;
24 const int BTN_OPEN_GROUP_OFFSET_X = 10;
25 const int BTN_OPEN_GROUP_OFFSET_Y = 5;
26 const int BTN_GROUP_SELECTED_OFFSET_X = BTN_OPEN_GROUP_OFFSET_X + 60;
27 const int BTN_GROUP_SELECTED_OFFSET_Y = 5;
28 const int GROUP_USER_PIC_OFFSET_X = BTN_GROUP_SELECTED_OFFSET_X + 80;
29 const int GROUP_USER_PIC_OFFSET_Y = BTN_OPEN_GROUP_OFFSET_Y + 25;
30 const int GROUP_NAME_OFFSET_X = GROUP_USER_PIC_OFFSET_X + 50;
31 const int GROUP_NAME_OFFSET_Y = 20;
33 const int ITEM_HEIGHT = 60;
35 const int BTN_TOOL_WIDTH = 60;
36 const int BTN_TOOL_HEIGHT = 60;
38 class ContactWidgetItem : public QObject
42 ContactWidgetItem(QObject *parent = 0);
46 int move(int x, int y, QWidget *parent = 0);
50 void setData( Item &item );
51 void setSelected(bool selected);
53 QToolButton *btn_selected;
54 QLabel *label_fullname;
55 QLabel *label_mobile_number;
56 QLabel *label_user_pic;
60 QString mobile_number;
72 void itemSelected( ContactWidgetItem *item, bool selected );
75 void btn_selected_clicked();
78 #endif // CONTACTWIDGETITEM_H