-
Notifications
You must be signed in to change notification settings - Fork 1
/
route_selection.h
executable file
·86 lines (75 loc) · 2.38 KB
/
route_selection.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#ifndef ROUTE_SELECTION_H
#define ROUTE_SELECTION_H
#include <QWidget>
#include "header.h"
#include "keyboard.h"
#include "train_route.h"
#include "database.h"
#include "webserver.h"
#include <QXmlStreamWriter>
/** @brief Route selection window to provide input from keyboard and select train route.
Detailed description follows here.
@author Gurpartap Singh
@date December 23 2015
*/
/** @file
*
*/
namespace Ui {
class route_selection;
}
/** Route selection window to provide input from keyboard and select train route.
* @author Gurpartap Singh
* @date December 23 2015
* */
class route_selection : public QWidget
{
Q_OBJECT
public:
explicit route_selection( QWidget *parent = 0);
keyboard *train_selection_keyboard;/**<android style qwerty keyboard to input train route info. **/
QSqlTableModel *master_trains_model;
QSqlTableModel *slave_trains_model;
QSqlTableModel *dummy_model;
QStandardItemModel *model;
QSortFilterProxyModel *proxyModel;
database *train_database;/**< mysql database of train routes and trains numbers and their types **/
train_route *current_route;/**< All information about current selected train route like trains,types of messages**/
~route_selection();
public slots:
/**
* @brief this function set the text in user input box by reading values from keyboard.
* @param value single character entered by the user.
*/
void settext(char value);
/**
* @brief Shows the current route selected by user which exist in main database.
*/
void route_window();
void select_next(QByteArray IN_OUT);
void skip_station(QByteArray);
void select_train_route_with_sorting();
void write_route_data_to_xml(QString selected_train_no);
private slots:
/**
* @brief when back button is clicked the control goes to homescreen.
*/
void on_backButton_clicked();
void on_linedit_clicked();
void lineedit_filtering(QString value);
void on_tableView_clicked();
signals:
/**
* @brief This signal is emited when train route entered by the user matched with Database and valid.
*/
void train_selected(bool);
void station_skipped(int);
void halt_clicked();
void next_clicked();
void change_numeric_keypad();
void lineedit_filter(QString value);
private:
Ui::route_selection *ui;
QString train_name;
};
#endif // ROUTE_SELECTION_H