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-28 00:18:06 +02:00
|
|
|
#include <QSharedPointer>
|
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-25 20:39:51 +02:00
|
|
|
#include "dialogs/dialogline.h"
|
2013-07-28 00:18:06 +02:00
|
|
|
#include "dialogs/dialogalongline.h"
|
2013-07-29 14:55:40 +02:00
|
|
|
#include "dialogs/dialogshoulderpoint.h"
|
|
|
|
#include "dialogs/dialogendline.h"
|
2013-07-30 15:09:34 +02:00
|
|
|
#include "dialogs/dialognormal.h"
|
2013-07-30 20:46:40 +02:00
|
|
|
#include "dialogs/dialogbisector.h"
|
2013-07-31 13:34:39 +02:00
|
|
|
#include "dialogs/dialoglineintersect.h"
|
2013-08-05 10:37:56 +02:00
|
|
|
#include "dialogs/dialogspline.h"
|
|
|
|
#include "tools/vtoolsinglepoint.h"
|
2013-07-13 12:51:31 +02:00
|
|
|
#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,
|
2013-07-25 14:00:51 +02:00
|
|
|
SinglePointTool,
|
2013-07-25 20:39:51 +02:00
|
|
|
EndLineTool,
|
2013-07-28 00:18:06 +02:00
|
|
|
LineTool,
|
2013-07-29 14:55:40 +02:00
|
|
|
AlongLineTool,
|
2013-07-30 15:09:34 +02:00
|
|
|
ShoulderPointTool,
|
2013-07-30 20:46:40 +02:00
|
|
|
NormalTool,
|
2013-07-31 13:34:39 +02:00
|
|
|
BisectorTool,
|
2013-08-05 10:37:56 +02:00
|
|
|
LineIntersectTool,
|
|
|
|
SplineTool
|
2013-07-03 14:29:26 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
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-25 14:00:51 +02:00
|
|
|
void ToolSinglePoint(bool checked);
|
|
|
|
void ActionAroowTool();
|
|
|
|
void ActionDraw(bool checked);
|
|
|
|
void ActionDetails(bool checked);
|
2013-07-28 00:18:06 +02:00
|
|
|
void ClosedDialogSinglePoint(int result);
|
2013-07-25 14:00:51 +02:00
|
|
|
void ActionNewDraw();
|
2013-07-13 12:51:31 +02:00
|
|
|
void currentDrawChanged( int index );
|
2013-07-25 14:00:51 +02:00
|
|
|
void OptionDraw();
|
|
|
|
void ActionSaveAs();
|
|
|
|
void ActionSave();
|
|
|
|
void ActionOpen();
|
|
|
|
void ActionNew();
|
2013-07-13 12:51:31 +02:00
|
|
|
void haveChange();
|
2013-07-17 13:38:11 +02:00
|
|
|
void ChangedSize(const QString &text);
|
|
|
|
void ChangedGrowth(const QString & text);
|
2013-07-25 14:00:51 +02:00
|
|
|
void ActionTable(bool checked);
|
|
|
|
void ClosedActionTable();
|
|
|
|
void ToolEndLine(bool checked);
|
|
|
|
void ClosedDialogEndLine(int result);
|
2013-07-25 20:39:51 +02:00
|
|
|
void ToolLine(bool checked);
|
|
|
|
void ClosedDialogLine(int result);
|
2013-07-28 00:18:06 +02:00
|
|
|
void ToolAlongLine(bool checked);
|
|
|
|
void ClosedDialogAlongLine(int result);
|
2013-07-29 14:55:40 +02:00
|
|
|
void ToolShoulderPoint(bool checked);
|
|
|
|
void ClosedDialogShoulderPoint(int result);
|
2013-07-30 15:09:34 +02:00
|
|
|
void ToolNormal(bool checked);
|
|
|
|
void ClosedDialogNormal(int result);
|
2013-07-30 20:46:40 +02:00
|
|
|
void ToolBisector(bool checked);
|
|
|
|
void ClosedDialogBisector(int result);
|
2013-07-31 13:34:39 +02:00
|
|
|
void ToolLineIntersect(bool checked);
|
|
|
|
void ClosedDialogLineIntersect(int result);
|
2013-08-05 10:37:56 +02:00
|
|
|
void ToolSpline(bool checked);
|
|
|
|
void ClosedDialogSpline(int result);
|
2013-07-13 12:51:31 +02:00
|
|
|
protected:
|
|
|
|
virtual void keyPressEvent ( QKeyEvent * event );
|
|
|
|
virtual void showEvent( QShowEvent *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-25 14:00:51 +02:00
|
|
|
DialogEndLine *dialogEndLine;
|
2013-07-25 20:39:51 +02:00
|
|
|
DialogLine *dialogLine;
|
2013-07-28 00:18:06 +02:00
|
|
|
DialogAlongLine *dialogAlongLine;
|
2013-07-29 14:55:40 +02:00
|
|
|
DialogShoulderPoint *dialogShoulderPoint;
|
2013-07-30 15:09:34 +02:00
|
|
|
DialogNormal *dialogNormal;
|
2013-07-30 20:46:40 +02:00
|
|
|
DialogBisector *dialogBisector;
|
2013-07-31 13:34:39 +02:00
|
|
|
DialogLineIntersect *dialogLineIntersect;
|
2013-08-05 10:37:56 +02:00
|
|
|
DialogSpline *dialogSpline;
|
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-07-25 14:00:51 +02:00
|
|
|
void SetEnableTool(bool enable);
|
2013-06-20 16:09:50 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MAINWINDOW_H
|