-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.hpp
More file actions
66 lines (54 loc) · 1.89 KB
/
MainWindow.hpp
File metadata and controls
66 lines (54 loc) · 1.89 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
#ifndef CMT_PARSER_MAINWINDOW_HPP
#define CMT_PARSER_MAINWINDOW_HPP
#include <gtkmm.h>
#include "Parser.hpp"
#include <vector>
#include <string>
#include <thread>
#include <mutex>
// Artık Gtk::Window'dan miras almıyor.
class MainWindow {
public:
// Kurucu metot artık basit.
MainWindow();
virtual ~MainWindow();
// Ana programın, bu sınıfın yönettiği pencereye erişmesi için.
Gtk::Window* get_window();
protected:
void on_select_files_clicked();
void on_requirements_clicked();
void on_extract_clicked();
void on_delete_clicked();
void on_file_row_activated(Gtk::ListBoxRow* row);
void on_extraction_finished();
void on_export_csv_clicked();
void on_export_pdf_clicked();
private:
void process_file_in_thread(const std::string& path);
Glib::RefPtr<Gtk::Builder> m_builder;
Glib::RefPtr<Gtk::FileDialog> m_file_dialog;
Gtk::Window* m_pWindow = nullptr;
Gtk::Label* m_pStatusLabel = nullptr;
Gtk::Label* m_pReqFileTracker = nullptr;
Gtk::Label* m_pFileCountLabel = nullptr;
Gtk::Button* m_pSelectFilesButton = nullptr;
Gtk::Button* m_pExtractButton = nullptr;
Gtk::Button* m_pDeleteButton = nullptr;
Gtk::Button* m_pRequirementsButton = nullptr;
Gtk::ListBox* m_pFileListbox = nullptr;
Gtk::ListBox* m_pIssuesListbox = nullptr;
Gtk::Button* m_pExportCsvButton = nullptr;
Gtk::Button* m_pExportPdfButton = nullptr;
//isimlendirme standartı
std::mutex m_mutex;
int m_csv_export_counter = 0;
Parser m_parser;
std::string m_requirements_file_path;
std::vector<std::string> m_file_paths;
std::unordered_map<std::string, Gtk::Picture*> m_extract_icons;
std::unordered_map<std::string, std::vector<Issue>> m_issues;
Glib::Dispatcher m_dispatcher_extraction_finished;
int m_total_files_to_process = 0;
int m_processed_files_count = 0;
};
#endif