-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclockwindow.h
More file actions
64 lines (53 loc) · 1.83 KB
/
clockwindow.h
File metadata and controls
64 lines (53 loc) · 1.83 KB
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
//
// Created by Asus on 09/03/2025.
//
#ifndef TIMER_CLOCKWINDOW_H
#define TIMER_CLOCKWINDOW_H
#include <QWidget>
#include "timerwindow.h"
QT_BEGIN_NAMESPACE
namespace Ui { class ClockWIndow; }
QT_END_NAMESPACE
class ClockWIndow : public QWidget {
Q_OBJECT
public:
explicit ClockWIndow(QWidget *parent = nullptr);
void testAccess_changeDateFormat() { changeDateFormat(); }
void testAccess_changeClockFormat() { changeClockFormat(); }
void testAccess_showTimerWindow() { showTimerWindow(); }
// getter per i test
int getCurrentDateIndex() const;
int getCurrentClockIndex() const;
TimerWindow *getTimerWindow() const;
QLabel* getClockLabel() const;
QLabel* getDateLabel() const;
QString getClockLabelText() const;
QString getDateLabelText() const;
const QStringList &getFormatsDate() const;
const QStringList &getFormatsCLock() const;
~ClockWIndow() override;
private slots:
void showTime();
void changeDateFormat();
void changeClockFormat();
void showTimerWindow();
void showDate();
private:
Ui::ClockWIndow *ui;
int currentDateIndex;
int currentClockIndex;
TimerWindow *timerWindow;
QStringList formatsDate = {
"dd/MM/yyyy", // Formato 1: giorno/mese/anno
"dddd, dd MMMM yyyy", // Formato 2: giorno della settimana, giorno mese anno
"yyyy-MM-dd", // Formato 3: anno-mese-giorno (ISO)
"dd MMMM yyyy" // Formato 4: giorno mese anno (con nome del mese)
};
QStringList formatsCLock={
"hh : mm : ss", // Formato 1: ora : minuti : secondi
"hh-mm-ss", // Formato 2: ora-minuti-secondi
"hh:mm ap", // Formato 3: ora:minuti am/pm (inglese)
"HH:mm" // Formato 4: ora:minuti (italiano)
};
};
#endif //TIMER_CLOCKWINDOW_H