valentina/mainwindow.h

81 lines
2.6 KiB
C
Raw Normal View History

2013-06-20 16:09:50 +02:00
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
2013-07-03 14:29:26 +02:00
#include <QLabel>
2013-07-13 12:51:31 +02:00
#include <QtXml>
#include <QComboBox>
2013-07-03 14:29:26 +02:00
#include "widgets/vmaingraphicsscene.h"
#include "dialogs/dialogsinglepoint.h"
2013-07-17 13:38:11 +02:00
#include "dialogs/dialogincrements.h"
2013-07-13 12:51:31 +02:00
#include "tools/vtoolsimplepoint.h"
#include "xml/vdomdocument.h"
#include "container/vcontainer.h"
2013-06-20 16:09:50 +02:00
namespace Ui {
class MainWindow;
}
2013-07-03 14:29:26 +02:00
namespace Tools{
enum Enum
{
ArrowTool,
SinglePointTool
};
}
2013-06-20 16:09:50 +02:00
class MainWindow : public QMainWindow
{
2013-07-03 14:29:26 +02:00
Q_OBJECT
2013-06-20 16:09:50 +02:00
public:
2013-07-03 14:29:26 +02:00
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
public slots:
void mouseMove(QPointF scenePos);
2013-07-13 12:51:31 +02:00
void clickedToolButtonSinglePoint(bool checked);
2013-07-03 14:29:26 +02:00
void triggeredActionAroowTool();
2013-07-13 12:51:31 +02:00
void triggeredActionDraw(bool checked);
void triggeredActionDetails(bool checked);
void ToolCanseled();
void SinglePointCreated(const QString name, const QPointF point);
void triggeredActionNewDraw();
void currentDrawChanged( int index );
void triggeredOptionDraw();
void triggeredActionSaveAs();
void triggeredActionSave();
void triggeredActionOpen();
void triggeredActionNew();
void haveChange();
2013-07-17 13:38:11 +02:00
void ChangedSize(const QString &text);
void ChangedGrowth(const QString & text);
void triggeredActionTable(bool checked);
void closedActionTable();
2013-07-13 12:51:31 +02:00
protected:
virtual void keyPressEvent ( QKeyEvent * event );
virtual void showEvent( QShowEvent *event );
2013-07-17 13:38:11 +02:00
virtual void closeEvent ( QCloseEvent * event );
2013-06-20 16:09:50 +02:00
private:
2013-07-03 14:29:26 +02:00
Ui::MainWindow *ui;
2013-07-13 12:51:31 +02:00
Tools::Enum tool;
2013-07-03 14:29:26 +02:00
VMainGraphicsScene *scene;
QLabel *mouseCoordinate;
QLabel *helpLabel;
bool isInitialized;
DialogSinglePoint *dialogSinglePoint;
2013-07-17 13:38:11 +02:00
DialogIncrements *dialogTable;
2013-07-13 12:51:31 +02:00
VDomDocument *doc;
VContainer *data;
QComboBox *comboBoxDraws;
QString fileName;
bool changeInFile;
2013-07-03 14:29:26 +02:00
void ToolBarOption();
void ToolBarDraws();
void CanselTool();
void ArrowTool();
2013-07-17 13:38:11 +02:00
void CreateManTableIGroup () const;
void SetEnableWidgets(bool enable);
2013-06-20 16:09:50 +02:00
};
#endif // MAINWINDOW_H