19 #ifndef SNARK_GRAPHICS_APPLICATIONS_LABELPOINTS_MAINWINDOW_H
20 #define SNARK_GRAPHICS_APPLICATIONS_LABELPOINTS_MAINWINDOW_H
23 #include <QMainWindow>
24 #include <QGridLayout>
27 #include <comma/base/types.h>
28 #include "./Actions.h"
32 namespace snark {
namespace graphics {
namespace View {
36 class MainWindow :
public QMainWindow
41 MainWindow(
const std::string& title, snark::graphics::View::Viewer* viewer );
44 void viewerInitialized();
48 QActionGroup m_paintToolGroup;
51 QMenu* m_writableMenu;
53 QGridLayout* m_fileLayout;
54 bool m_fileFrameVisible;
55 typedef std::map< std::string, std::vector< std::pair< CheckBox*, CheckBox* > > > FileGroupMap;
56 FileGroupMap m_fileGroups;
58 void closeEvent( QCloseEvent* event );
60 void updateFileFrame();
62 void toggleFileFrame(
bool shown );
63 void makeFileGroups();
64 void showFileGroup( std::string name,
bool shown );
65 void setWritableFileGroup( std::string name,
bool writable );
66 void keyPressEvent(QKeyEvent *e);
69 class CheckBox :
public QCheckBox
74 CheckBox( boost::function<
void(
bool ) > f );
77 void action(
bool checked );
80 boost::function< void( bool ) > m_f;