00001
00002
00003
00004
00005
00006
00007 #ifndef GEOMETRY_WINDOW_H
00008 #define GEOMETRY_WINDOW_H
00009
00010 #include "DocumentModelExportFormat.h"
00011 #include "GeometryStrategyContext.h"
00012 #include "WindowAbstractBase.h"
00013
00014 class CmdMediator;
00015 class Curve;
00016 class GeometryModel;
00017 class MainWindow;
00018 class MainWindowModel;
00019 class QItemSelection;
00020 class QString;
00021 class QTableView;
00022 class Transformation;
00023
00028 class GeometryWindow : public WindowAbstractBase
00029 {
00030 Q_OBJECT;
00031
00032 public:
00034 GeometryWindow (MainWindow *mainWindow);
00035 virtual ~GeometryWindow ();
00036
00037 virtual void clear ();
00038 virtual void closeEvent(QCloseEvent *event);
00039
00041 static int columnBodyPointIdentifiers ();
00042
00043 virtual void doCopy ();
00044 virtual void update (const CmdMediator &cmdMediator,
00045 const MainWindowModel &modelMainWindow,
00046 const QString &curveSelected,
00047 const Transformation &transformation);
00048 virtual QTableView *view () const;
00049
00050 public slots:
00051
00053 void slotPointHoverEnter (QString);
00054
00056 void slotPointHoverLeave (QString);
00057
00058 signals:
00059
00061 void signalGeometryWindowClosed();
00062
00063 private:
00064 GeometryWindow();
00065
00066 void createWidgets (MainWindow *mainWindow);
00067 void initializeHeader();
00068 void loadStrategies ();
00069 void resizeTable (int rowCount);
00070 void unselectAll ();
00071
00072 enum ColumnsHeader {
00073 COLUMN_HEADER_LABEL,
00074 COLUMN_HEADER_VALUE,
00075 NUM_HEADER_COLUMNS
00076 };
00077
00078 enum ColumnsBody {
00079 COLUMN_BODY_X,
00080 COLUMN_BODY_Y,
00081 COLUMN_BODY_INDEX,
00082 COLUMN_BODY_DISTANCE_GRAPH_FORWARD,
00083 COLUMN_BODY_DISTANCE_PERCENT_FORWARD,
00084 COLUMN_BODY_DISTANCE_GRAPH_BACKWARD,
00085 COLUMN_BODY_DISTANCE_PERCENT_BACKWARD,
00086 COLUMN_BODY_POINT_IDENTIFIERS,
00087 NUM_BODY_COLUMNS
00088 };
00089
00090 enum HeaderRows {
00091 HEADER_ROW_NAME,
00092 HEADER_ROW_FUNC_AREA,
00093 HEADER_ROW_POLY_AREA,
00094 HEADER_ROW_COLUMN_NAMES,
00095 NUM_HEADER_ROWS
00096 };
00097
00098 QTableView *m_view;
00099 GeometryModel *m_model;
00100
00101 GeometryStrategyContext m_geometryStrategyContext;
00102
00103
00104 DocumentModelExportFormat m_modelExport;
00105 };
00106
00107 #endif // GEOMETRY_WINDOW_H