forked from ebu/MXFTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenericFilechooserInputOutput.hpp
166 lines (146 loc) · 4.71 KB
/
genericFilechooserInputOutput.hpp
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#ifndef CPP_GENERICFILECHOOSERINPUTOUTPUT_CLASS_H
#define CPP_GENERICFILECHOOSERINPUTOUTPUT_CLASS_H
/*!
* \project_name EBU Player
* \file genericFilechooserWindow.hpp
* \brief EBUCore Metadata encapsulation dialog specifications
* \details This class is used to load the EBUCore Metadata encapsulation dialog
* \authors Marco Dos Santos Oliveira
* \version 0.1
* \dateOfCreation 28 march 2013
* \dateOfUpdate 28 march 2013
* \copyright This software is published under MPL v2.0
*
*/
#include <gtkmm/dialog.h>
#include <gtkmm/builder.h>
#include <gtkmm/button.h>
#include <gtkmm/radiobutton.h>
#include <gtkmm/buttonbox.h>
#include <gtkmm/entry.h>
#include <gtkmm/stock.h>
#include <gtkmm/label.h>
#include <iostream>
#include "genericFilechooserWindow.hpp"
#define XMLEBUCOREMETADATAMIMETYPE 3
#define MXFMETADATAMIMETYPE 4
class genericFilechooserInputOutput : public Gtk::Dialog
{
public:
/*!*
* @brief Class constructor
* @brief The metadataEncapsulationDialog class constructor instantiates a new EBUCore Metadata encapsulation dialog and all its features.\n\n
* @param[in] cobject : GObject is the fundamental type providing the common attributes and methods for all object types in GTK+. In this case, cobject define the instantiate gtk widget
* @param[in] refGlade : This is the reference to your glade design
*/
genericFilechooserInputOutput
(
Gtk::Window& parent,
const Glib::ustring& title,
const Glib::ustring& inputLabel,
const Glib::ustring& outputLabel,
const Glib::ustring& inputButtonLabel,
const Glib::ustring& outputButtonLabel,
const Glib::ustring& inputPlaceHolderLabel,
const Glib::ustring& outputPlaceHolderLabel,
bool setModal = true
);
/*!*
* @brief Class destructor
* @brief The metadataEncapsulationDialog class destructor destroys all variables and instanciate objects of metadataEncapsulationDialog class. This is the garbage collector class. It is always called at the end of class life.
*
*/
~genericFilechooserInputOutput
(
void
);
/**
* @fn int getResponse(void)
* @brief This function will return the Gtk::ResponType of the filechooser
* @brief
* @note needs more documentation
* @param[in] void : no params
* @return int if all is right or an error at compilation time.
*/
int getResponse
(
void
);
/**
* @fn std::string getInputPath(void)
* @brief This function will return the input path.
* @brief
* @note needs more documentation
* @param[in] void : no params
* @return std::string if all is right or an error at compilation time.
*/
std::string getInputPath
(
void
);
/**
* @fn std::string getOutputPath(void)
* @brief This function will return the input path.
* @brief
* @note needs more documentation
* @param[in] void : no params
* @return std::string if all is right or an error at compilation time.
*/
std::string getOutputPath
(
void
);
protected:
Gtk::Box * dialogOptionBox;
// gtk button
Gtk::Button* pathInputButton; /*!< SelectPathToOutputMXF */
Gtk::Button* pathOutputButton; /*!< SelectPathToOutputMXF */
// gtk entries
Gtk::Entry * pathInputEntry;
Gtk::Entry * pathOutputEntry;
// gtk label
//Gtk::Label * partitionLabel;
//Gtk::Label * encodingLabel;
//Gtk::Label * pathLabel;
// dialog response
int response; /*!< response the Gtk::ResponType selected by the user into the filechooser */
/**
* @fn void connectSignalClicked (void)
* @brief To connect the clicked signal to events handler
* @brief This method connects each widgets clicked with its own signal. If you add a new clicked event, you must append its signal connection here.\n \n
* @brief Currently, the following clicked signals have been connected:\n
* \li \c \b importXML When connected, this button sends a signal to import an XML metatada file into the metadata first viewer
* \li \c \b exportXML When connected, this button sends a signal to export an XML metatada from metadata viewer into an XML file.
* \li \c \b modifyXML When connected, this button sends a signal to open a secondary metadata viewer where the user will modify the metadata of the first viewer.
* \li \c \b saveXML When connected, this button sends a signal to save the XML metadata into the currently loaded MXF file.
* \li \c \b XMLconformance When connected, this button sends a signal to run an EBUCore conformance analysis on the metadata.\n \n
* @param[in] void : No params required
* @return nothing if all is right or an error at compilation time.
* @note This function and his documentation must be completed
*/
void connectSignalClicked
(
void
);
void initDialogWidgets
(
void
);
void on_close_dialog
(
void
);
void on_terminate_clicked
(
void
);
void on_pathInputButton_clicked
(
void
);
void on_pathOutputButton_clicked
(
void
);
};
#endif