21 #ifndef SNARK_GRAPHICS_APPLICATIONS_VIEWPOINTS_MAINWINDOW_H_
22 #define SNARK_GRAPHICS_APPLICATIONS_VIEWPOINTS_MAINWINDOW_H_
28 #include <QMainWindow>
29 #include <comma/base/types.h>
41 namespace snark {
namespace graphics {
namespace View {
45 class MainWindow :
public QMainWindow
50 MainWindow(
const std::string& title, snark::graphics::View::Viewer* viewer );
56 QGridLayout* m_fileLayout;
57 bool m_fileFrameVisible;
58 typedef std::map< std::string, std::vector< CheckBox* > > FileGroupMap;
59 FileGroupMap m_fileGroups;
61 void closeEvent( QCloseEvent* event );
62 void keyPressEvent( QKeyEvent *e );
63 void updateFileFrame();
64 void toggleFileFrame(
bool shown );
65 void makeFileGroups();
66 void showFileGroup( std::string name,
bool shown );
69 class CheckBox :
public QCheckBox
74 CheckBox( boost::function<
void(
bool ) > f );
77 void action(
bool checked );
80 boost::function< void( bool ) > m_f;