Geodesy MapControl
Geodesy.h
// Copyright 2010 ESRI
// 
// All rights reserved under the copyright laws of the United States
// and applicable international laws, treaties, and conventions.
// 
// You may freely redistribute and use this sample code, with or
// without modification, provided you include the original copyright
// notice and use restrictions.
// 
// See the use restrictions.
// 

#ifndef GEODESY_H
#define GEODESY_H

#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QComboBox>
#include <QtGui/QDialog>
#include <QtGui/QGroupBox>
#include <QtGui/QLabel>
#include <QtGui/QLineEdit>
#include <QtGui/QPushButton>
#include <QtGui/QtGui>

#include <ArcSDK.h>
#include <olb/esridefensesolutions.h>
#include <Ao/AoControls.h>
#include <AxCtl/qtaxctl.h>
#include "MapControlEvents.h"

extern IMapControl3Ptr m_ipMapControl;
extern IToolbarControlPtr m_ipToolbarControl;
extern ITOCControlPtr m_ipTOCControl;

class Geodesy : public QObject
{
Q_OBJECT
public:

    QGroupBox *GeoPolyline;
    QComboBox *comboBox;
    QLabel *label;
    QLabel *label_6;
    QLabel *label_7;
    QLineEdit *lineEdit_5;
    QLineEdit *lineEdit_6;
    QLabel *label_2;
    QLabel *label_3;
    QLabel *label_4;
    QLabel *label_5;
    QLineEdit *lineEdit;
    QLineEdit *lineEdit_2;
    QPushButton *pushButton;
    QPushButton *pushButton_2;
    QLabel *label_8;
    QLineEdit *lineEdit_3;
    QLabel *label_9;
    QLineEdit *lineEdit_4;
    QGroupBox *GeoEllipse;
    QLabel *label_12;
    QLabel *label_13;
    QLabel *label_14;
    QLabel *label_10;
    QLabel *label_11;
    QLineEdit *lineEdit_7;
    QLineEdit *lineEdit_8;
    QLineEdit *lineEdit_9;
    QLineEdit *lineEdit_10;
    QLineEdit *lineEdit_11;
    QPushButton *pushButton_3;
    QPushButton *pushButton_4;
    QPushButton *pushButton_5;
    QLabel *label_18;
    QLabel *label_19;
    QLabel *label_15;
    QLabel *label_16;
    QLabel *label_17;

    QWidget *vbox;
    QVBoxLayout *layout;
    QAxCtl *tlb;
    QSplitter *split;
    QAxCtl *toc;
    QAxCtl *map;

    QDialog* mainDlg;

     IGeoEllipsePtr m_ipGeoEllipse;
    IPolygonPtr m_ipKeyPointPoly;

    void setupUi(QDialog *Dialog);
    void retranslateUi(QDialog *Dialog);
    void addGISControls(QDialog* Dialog);
    void addToolbarItems(IToolbarControl* pToolbar);
    bool createGeoEllipse();
    bool validateEllipseInputs(double* cenetrX, double* centerY, double* xAxis, double* yAxis, double* rotation);
    bool validatePolylineInputs(double* startX, double* startY, double* endX, double* endY);
    bool String_To_Double(QString strVal, double* dblVal);
    void drawElement(IElement* ipElement);
    void clearGraphics();


public slots:
    void drawGeoline();
    void clearLineFields();
    void drawGeoEllipse();
    void drawKeyPoints();
    void clearEllipseFields();


};

#endif // GEODESY_H