-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainWindow.h
57 lines (43 loc) · 1.42 KB
/
mainWindow.h
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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <glibmm/ustring.h>
#include <glibmm/refptr.h>
#include <gtkmm/window.h>
#include <gtkmm/builder.h>
#include <gtkmm/toolbutton.h>
#include <gtkmm/treeview.h>
#include <gtkmm/treemodelcolumn.h>
#include <gtkmm/liststore.h>
#include <gtkmm/statusbar.h>
class mainWindow : public Gtk::Window {
public:
mainWindow(BaseObjectType* type, const Glib::RefPtr<Gtk::Builder>& builder);
private:
void playStream(const Glib::ustring &url, const Glib::ustring &quality);
void readDataFile();
void writeDataFile();
class ModelColumns : public Gtk::TreeModelColumnRecord {
public:
ModelColumns()
{
add(streamName);
add(streamUrl);
add(streamQuality);
}
Gtk::TreeModelColumn<Glib::ustring> streamName;
Gtk::TreeModelColumn<Glib::ustring> streamUrl;
Gtk::TreeModelColumn<Glib::ustring> streamQuality;
};
Glib::RefPtr<Gtk::Builder> builder;
// TOOLBAR ITEMS
Gtk::ToolButton* addStreamButton;
Gtk::ToolButton* editStreamButton;
Gtk::ToolButton* playStreamButton;
Gtk::ToolButton* removeStreamButton;
Gtk::ToolButton* quitButton;
Gtk::TreeView* streamList;
Gtk::Statusbar* statusbar;
ModelColumns columns;
Glib::RefPtr<Gtk::ListStore> listModel;
};
#endif // MAINWINDOW_H