92 lines
2.1 KiB
C++
92 lines
2.1 KiB
C++
|
#ifndef GTKMM_MAIN_WINDOW
|
||
|
#define GTKMM_MAIN_WINDOW
|
||
|
|
||
|
#include <gtkmm/button.h>
|
||
|
#include <gtkmm/checkbutton.h>
|
||
|
#include <gtkmm/combobox.h>
|
||
|
#include <gtkmm/entry.h>
|
||
|
#include <gtkmm/layout.h>
|
||
|
#include <gtkmm/label.h>
|
||
|
#include <gtkmm/window.h>
|
||
|
#include <set>
|
||
|
|
||
|
#include "network.hpp"
|
||
|
#include "seasonwindow.hpp"
|
||
|
|
||
|
class MainWindow : public Gtk::Window {
|
||
|
public:
|
||
|
MainWindow(const Glib::RefPtr<Gtk::Application> &ptr);
|
||
|
virtual ~MainWindow() = default;
|
||
|
|
||
|
private:
|
||
|
void quit();
|
||
|
void process();
|
||
|
void getNames();
|
||
|
void finishedSelection();
|
||
|
void chooseFile();
|
||
|
void patternHelp();
|
||
|
|
||
|
protected:
|
||
|
Gtk::Button m_button_dir;
|
||
|
Gtk::Button m_button_get_names;
|
||
|
Gtk::Button m_button_quit;
|
||
|
Gtk::Button m_button_process;
|
||
|
Gtk::Button m_button_pattern;
|
||
|
|
||
|
Gtk::CheckButton m_check_linux;
|
||
|
Gtk::CheckButton m_check_trust;
|
||
|
|
||
|
Gtk::ComboBox m_combo_language;
|
||
|
Gtk::ComboBox m_combo_possible;
|
||
|
|
||
|
Gtk::Entry m_entry_show;
|
||
|
Gtk::Entry m_entry_dir;
|
||
|
Gtk::Entry m_entry_pattern;
|
||
|
|
||
|
Gtk::Label m_label_language;
|
||
|
Gtk::Label m_label_possible;
|
||
|
Gtk::Label m_label_show;
|
||
|
Gtk::Label m_label_dir;
|
||
|
Gtk::Label m_label_pattern;
|
||
|
|
||
|
Gtk::Layout m_layout;
|
||
|
|
||
|
Curl c;
|
||
|
|
||
|
class LanguageColumns : public Gtk::TreeModel::ColumnRecord {
|
||
|
public:
|
||
|
|
||
|
LanguageColumns() {
|
||
|
add(m_col_code);
|
||
|
add(m_col_language);
|
||
|
}
|
||
|
|
||
|
Gtk::TreeModelColumn<std::string> m_col_code;
|
||
|
Gtk::TreeModelColumn<std::string> m_col_language;
|
||
|
};
|
||
|
|
||
|
class UrlColumns: public Gtk::TreeModel::ColumnRecord {
|
||
|
public:
|
||
|
UrlColumns() {
|
||
|
add(m_col_url);
|
||
|
add(m_col_show);
|
||
|
}
|
||
|
Gtk::TreeModelColumn<Glib::ustring> m_col_url;
|
||
|
Gtk::TreeModelColumn<Glib::ustring> m_col_show;
|
||
|
};
|
||
|
|
||
|
LanguageColumns m_columns_language;
|
||
|
UrlColumns m_columns_url;
|
||
|
|
||
|
Glib::RefPtr<Gtk::Application> app;
|
||
|
|
||
|
SeasonWindow *sw;
|
||
|
std::vector<int> selected;
|
||
|
std::map<int, std::set<std::string>> files;
|
||
|
std::string path;
|
||
|
std::string language_code;
|
||
|
std::string default_pattern;
|
||
|
};
|
||
|
|
||
|
#endif // GTKMM_EXAMPLE_HELLOWORLD_H
|