/Primitive/MainApp/commands/grid.h

https://bitbucket.org/flexcomputer/primitive · C Header · 34 lines · 25 code · 6 blank · 3 comment · 0 complexity · 66909709268c4023a9c0a8f7ebe6c2e3 MD5 · raw file

  1. #ifndef GRID_H
  2. #define GRID_H
  3. #include <QAction>
  4. #include "designtool.h"
  5. #include "settings.h"
  6. class GridTool : public DesignTool
  7. {
  8. Q_OBJECT
  9. public:
  10. GridTool(DrawingView* view) :
  11. DesignTool(view)
  12. {
  13. // Create the action
  14. _action = new QAction(tr("&Grid"), _mainWindow );
  15. _action->setStatusTip(tr("Shows or hides the grid"));
  16. connect(_action, SIGNAL(changed()), this, SLOT(triggered()));
  17. _action->setCheckable(true);
  18. _action->setChecked(true);
  19. // _action->setChecked(settings.showGrid());
  20. // Set the mnemonic
  21. _mnemonic = tr("GRID");
  22. }
  23. signals:
  24. public slots:
  25. void start();
  26. void triggered();
  27. };
  28. #endif // GRID_H