-
Notifications
You must be signed in to change notification settings - Fork 0
/
searchwindow.h
70 lines (48 loc) · 1.58 KB
/
searchwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifndef SEARCHWINDOW_H
#define SEARCHWINDOW_H
#include "contact.h"
#include <QMainWindow>
#include <QPushButton>
#include <QGridLayout>
#include <QWidget>
#include <QLineEdit>
#include <QCheckBox>
#include <QTableWidget>
class SearchWindow : public QMainWindow
{
Q_OBJECT
public:
explicit SearchWindow(QWidget *parent = 0);
QGridLayout * mslayout;
QWidget * mswidget;
QPushButton * CloseButton;
QLineEdit * search_line1;
// checkboxes //
QCheckBox * SearchByFirstName;
QCheckBox * SearchByLastName;
QCheckBox * SearchByPhoneNumber;
QCheckBox * SearchAGroupByName;
// ---------- //
QTableWidget * SearchTable;
void CreateSearchTable();
void CreateCheckBox();
void setCheckBoxesInLayout();
void CreateButtons();
void SetButtonsInlayout();
void ConnectButtons();
bool ReadFromFile(QList<Contact> & AllContacts);
void CreateLayout();
void FindContactByStartOfFirstName(QList<Contact> & searchlist,QString myname);
void FindConactByStartOfLastName(QList<Contact> & sl,QString myname);
void FindContactByStartOfPhoneNumber(QList<Contact> & sl,QString myNumber);
void InsertInTable(QList<Contact> & mycontacts);
QStringList getAllGroupsName();
QList<QString> FindRelatedGroupName();
void ConnectCheckBoxes();
void InsertRalatedGroupsNameInTable(QList<QString> & RGN);
void RefindList();
signals:
public slots:
void RefreshList();
};
#endif // SEARCHWINDOW_H