-
Notifications
You must be signed in to change notification settings - Fork 1
/
ServiceDialog.h
54 lines (43 loc) · 1.47 KB
/
ServiceDialog.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
#ifndef SERVICEDIALOG_H
#define SERVICEDIALOG_H
#include <QDialog>
#include <QTreeWidget>
#include "ServiceEntryDialog.h"
namespace Ui {
class ServiceDialog;
}
class ServiceDialog : public QDialog
{
Q_OBJECT
public:
explicit ServiceDialog(QWidget *parent = nullptr, QTreeWidget *tree = nullptr);
~ServiceDialog();
bool bikeNeedsService( int index );
private slots:
void on_pushButtonClose_clicked();
void on_pushButtonAdd_clicked();
void on_pushButtonDelete_clicked();
void on_tableWidget_cellDoubleClicked(int row, int column);
void on_comboBoxBike_currentIndexChanged(int index);
void on_comboBoxCostFilter_currentIndexChanged(int index);
void on_pushButtonPie_clicked();
private:
Ui::ServiceDialog *ui;
void fillTableRow(ServiceEntryDialog *entryDialog, int row , int index);
double odoAtDateTime(QDateTime dateTime , int index);
double odoInUse( int row, int index );
void updateOdoInUseColumn( int index );
double secsAtDateTime(QDateTime dateTime , int index);
int secsInUse( int row, int index );
void updateSecsInUseColumn( int index );
void updateCellColor( void );
std::pair<unsigned int, double> calcCost( QString name );
void updateCosts( void );
void updateCostFilterCombo( void );
void writeToJson( int index );
void loadFromJson( int index );
QStringList partList( void );
QTreeWidget *m_tourTree;
QString m_currency = QString( " €" );
};
#endif // SERVICEDIALOG_H