-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.h
More file actions
68 lines (58 loc) · 1.86 KB
/
app.h
File metadata and controls
68 lines (58 loc) · 1.86 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
65
66
/**************************************
* logbook-gui, GUI app
*
* check the layout below
*
* @author ftouchte
* @date July 17, 2025
* **********************************/
#ifndef LOGBOOK_GUI_APP
#define LOGBOOK_GUI_APP
#include <gtkmm.h>
#include <string>
#include <vector>
#include <cmath>
class Window : public Gtk::Window {
protected :
// Widgets
Gtk::Box VBox_main, VBox_header, VBox_body, HBox_footer;
Gtk::Paned HPaned1, HPaned2;
Gtk::Frame Frame_title, Frame_email, Frame_marker, Frame_screenshots, Frame_comments;
Gtk::ScrolledWindow ScrolledWindow_comments;
//Gtk::Separator Separator_sidebar;
Gtk::Box VBox_screenshots, HBox_screenshots;
Gtk::Notebook Notebook_screenshots;
Gtk::Button Button_take_screenshot;
Gtk::Button Button_plus;
Gtk::Button Button_minus;
Gtk::Button Button_submit;
Gtk::Button Button_reset;
Gtk::TextView TextView_comments;
Glib::RefPtr<Gtk::TextBuffer> TextBuffer_comments;
Gtk::Entry Entry_title, Entry_email, Entry_marker;
Gtk::Label Label_log;
bool flag_screenshot = false;
std::vector<std::string> attachments; // list of screenshots
std::string output_dir = "/home/touchte-codjo/.gui-logbook";
// for CSS file
Glib::RefPtr<Gtk::CssProvider> m_refCssProvider; // copied from gtkmm documention
static void on_parsing_error(const Glib::RefPtr<const Gtk::CssSection>& section, const Glib::Error& error);
public :
Window();
~Window();
// Signals
void on_button_take_screenshot();
void on_button_plus();
void on_button_minus();
void on_button_submit();
void on_button_reset();
// method
void update_screenshots();
std::string time_t2string(std::time_t t, std::string format = "%Y/%m/%d %H:%M:%S");
time_t string2time_t(std::string date, std::string format);
int get_last_lognumber();
std::vector<int> get_lognumbers();
void deploy_logbook();
//void on_mouse_clicked(int n_press, double x, double y);
};
#endif