1 #ifndef AESALON_GUI_SESSION_LIST_WIDGET_H
2 #define AESALON_GUI_SESSION_LIST_WIDGET_H
12 class SessionListWidget
: public QListWidget
{ Q_OBJECT
15 QMenu
*new_context_menu
;
16 QAction
*delete_shortcut
;
18 SessionListWidget(QWidget
*parent
= 0);
19 virtual ~SessionListWidget() {}
21 void update_list(QList
<Session
*> sessions
);
23 void display_context_menu(const QPoint
&pos
);
24 void context_menu_new() { emit
new_request(); }
25 void context_menu_edit() { emit
edit_request(this->currentItem()); }
26 void context_menu_delete() { emit
delete_request(this->currentItem()); }
29 void edit_request(QListWidgetItem
*item
);
30 void delete_request(QListWidgetItem
*item
);
34 } // namespace Aesalon