-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcalldetails.hpp
70 lines (63 loc) · 1.6 KB
/
calldetails.hpp
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 CALLDETAILS_HPP
#define CALLDETAILS_HPP
#include <QCloseEvent>
#include <QDate>
#include <QIcon>
#include <QKeySequence>
#include <QLocale>
#include <QMessageBox>
#include <QRect>
#include <QResizeEvent>
#include <QSize>
#include <QStringList>
#include <QTableWidget>
#include <QTableWidgetItem>
#include <QWidget>
#include "database.hpp"
namespace Ui { class CallDetails; }
class CallDetails : public QWidget
{
Q_OBJECT
Ui::CallDetails *m_ui;
QTableWidget* m_tw;
Database& m_db;
QString m_datetime;
QString m_dayname;
class Geometry;
Geometry* m_geometry;
void prepareTableWidget();
public:
CallDetails(Database& db, const QString& datetime, const QString& dayname, QWidget* parent = nullptr);
~CallDetails();
protected:
void closeEvent(QCloseEvent* event);
void resizeEvent(QResizeEvent* event);
signals:
void closed();
private slots:
void setCalls();
};
class CallDetails::Geometry : public QObject
{
Q_OBJECT
CallDetails* m_callDetails;
QSize m_size;
const int m_initialWindowWidth;
const int m_initialWindowHeight;
const int m_initialLabelX;
const int m_initialLabelY;
const int m_initialLabelWidth;
const int m_initialLabelHeight;
const int m_initialUpdateButtonX;
const int m_initialTableWidgetX;
const int m_initialTableWidgetY;
const int m_initialTableWidgetWidth;
const int m_initialTableWidgetHeight;
public:
Geometry(CallDetails* callDetails);
void setSize(QSize size);
QRect label() const;
QRect updateButton() const;
QRect tableWidget() const;
};
#endif // CALLDETAILS_HPP