1 #ifndef AESALON_GUI_SESSION_EDITOR_H
2 #define AESALON_GUI_SESSION_EDITOR_H
6 #include <QDialogButtonBox>
10 #include <QFormLayout>
11 #include <QVBoxLayout>
12 #include <QHBoxLayout>
13 #include <QFileDialog>
15 #include <QButtonGroup>
16 #include <QRadioButton>
23 class SessionEditor
: public QDialog
{ Q_OBJECT
28 QFormLayout
*form_layout
;
29 QLineEdit
*session_name
;
31 QHBoxLayout
*session_type_layout
;
32 QButtonGroup
*session_type_group
;
33 QRadioButton
*launch_session_type
;
34 QRadioButton
*connect_session_type
;
35 QHBoxLayout
*executable_path_layout
;
36 QLabel
*executable_path_label
;
37 QLineEdit
*executable_path
;
38 QPushButton
*file_select_dialog
;
39 QFileDialog
*file_dialog
;
40 QLabel
*arguments_label
;
44 QDialogButtonBox
*button_box
;
46 static QString last_directory
;
48 void create_widgets();
50 SessionEditor(QWidget
*parent
= 0, Session
*session
= 0);
51 virtual ~SessionEditor() {}
53 Session
*get_session() const { return session
; }
56 void show_file_select_dialog();
57 void change_selected_file(QString new_filename
);
58 void change_session_type(Session::session_type_e new_type
);
59 void session_type_changed(QAbstractButton
*new_type
) {
60 if(new_type
== launch_session_type
) change_session_type(Session::LAUNCH_SESSION
);
61 else change_session_type(Session::CONNECT_SESSION
);
66 } // namespace Aesalon