1 #ifndef AESALON_GUI_ACTIVE_SESSION_H
2 #define AESALON_GUI_ACTIVE_SESSION_H
8 #include "ActiveSessionSocket.h"
9 #include "ActiveSessionOverview.h"
10 #include "ActiveSessionBlockView.h"
12 #include "platform/Memory.h"
17 class ActiveSession
: public QTabWidget
{ Q_OBJECT
21 WAITING_FOR_CONNECTION
,
28 Platform::Memory
*memory
;
29 ActiveSessionSocket
*socket
;
30 ActiveSessionOverview
*overview
;
31 ActiveSessionBlockView
*block_view
;
34 void set_status(status_e new_status
) {
35 if(new_status
== status
) return;
37 emit
status_changed(get_status_as_string());
40 ActiveSession(Session
*session
, QWidget
*parent
= 0);
41 virtual ~ActiveSession();
45 Platform::Memory
*get_memory() const { return memory
; }
47 status_e
get_status() const { return status
; }
48 QString
get_status_as_string() const;
50 void connect_to(QString host
, int port
);
52 void terminate_session() { emit
close_session(this); }
53 void socket_connection();
54 void socket_disconnection();
56 void close_session(ActiveSession
*session
);
57 void status_changed(QString new_status
);
61 } // namespace Aesalon