equal
deleted
inserted
replaced
52 class QListWidget; |
52 class QListWidget; |
53 class QPushButton; |
53 class QPushButton; |
54 class QComboBox; |
54 class QComboBox; |
55 class QLabel; |
55 class QLabel; |
56 class QLineEdit; |
56 class QLineEdit; |
|
57 class QMainWindow; |
57 QT_END_NAMESPACE |
58 QT_END_NAMESPACE |
58 |
59 |
59 QTM_USE_NAMESPACE |
60 QTM_USE_NAMESPACE |
60 |
61 |
61 class ContactListPage : public QWidget |
62 class ContactListPage : public QWidget |
62 { |
63 { |
63 Q_OBJECT |
64 Q_OBJECT |
64 |
65 |
65 public: |
66 public: |
66 ContactListPage(QWidget *parent = 0); |
67 ContactListPage(QMainWindow *mainWindow = 0, QWidget *parent = 0); |
67 ~ContactListPage(); |
68 ~ContactListPage(); |
68 |
69 |
69 void rebuildList(const QContactFilter& filter); |
70 void rebuildList(const QContactFilter& filter); |
70 |
71 |
71 signals: |
72 signals: |
72 void showEditorPage(QContactLocalId contactId); |
73 void showEditorPage(QContactLocalId contactId); |
73 void showFilterPage(const QContactFilter& filter); |
74 void showFilterPage(const QContactFilter& filter); |
74 void managerChanged(QContactManager *manager); |
75 void managerChanged(QContactManager *manager); |
|
76 void clearFilter(); |
75 |
77 |
76 private slots: |
78 private slots: |
77 void backendSelected(); |
79 void backendSelected(); |
78 void addContactClicked(); |
80 void addClicked(); |
79 void editClicked(); |
81 void editClicked(); |
80 void filterClicked(); |
82 void filterClicked(); |
81 void deleteClicked(); |
83 void deleteClicked(); |
82 void importClicked(); |
84 void importClicked(); |
83 void exportClicked(); |
85 void exportClicked(); |
87 QComboBox *m_backendsCombo; |
89 QComboBox *m_backendsCombo; |
88 QLabel *m_filterActiveLabel; |
90 QLabel *m_filterActiveLabel; |
89 |
91 |
90 QListWidget *m_contactsList; |
92 QListWidget *m_contactsList; |
91 |
93 |
|
94 // The main window that the page can add actions to |
|
95 QMainWindow *m_mainWindow; |
92 |
96 |
93 // data |
97 // data |
94 QContactManager *m_manager; |
98 QContactManager *m_manager; |
95 QMap<QContactLocalId, int> m_idToListIndex; |
99 QMap<QContactLocalId, int> m_idToListIndex; |
96 QMap<QString, QContactManager*> m_initialisedManagers; |
100 QMap<QString, QContactManager*> m_initialisedManagers; |
97 |
101 |
98 QContactFilter m_currentFilter; |
102 QContactFilter m_currentFilter; |
|
103 QMap<QString, QString> m_availableManagers; |
99 }; |
104 }; |
100 |
105 |
101 #endif // CONTACTLISTPAGE_H |
106 #endif // CONTACTLISTPAGE_H |