VR-Forces 4.0.4 Class Documentation
include/tmqt/lineConfigWidget.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 200 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: lineConfigWidget.h,v $ $Revision: 1.46 $ $State: Exp $
00007 *******************************************************************************/
00008 
00011 
00012 #ifndef LINECONFIGWIDGET_H
00013 #define LINECONFIGWIDGET_H
00014 
00015 #include "tmqt/ui_lineConfigWidgetUi.h"
00016 #include "drawerNative/coordUtils.h"
00017 #include "geometry/point.h"
00018 
00019 #include "ngutil/entityMapperKey.h"
00020 
00021 #include <QtCore/QList>
00022 
00023 class DtTMMapArea;
00024 class DtSymbol;
00025 class DtModelData;
00026 class QLayout;
00027 class DtLocationEntryWidget;
00028 class DtArchivableObject;
00029 class QTreeWidgetItem;
00030 class DtUnitDisplayManager;
00031 
00035 #include "tmqt/tmqtDefines.h"
00036 class DT_DLL_tmqt DtLineConfigWidget : public QDialog
00037 {
00038 
00039    Q_OBJECT
00040 
00041 public:
00042 
00044    DtLineConfigWidget(QWidget* parent = NULL, const Qt::WindowFlags& flags = 0);
00045 
00047    virtual ~DtLineConfigWidget();
00048 
00049    virtual bool init
00050    (
00051       const DtTMMapArea* converter,
00052       QVector<DtPoint>* list,
00053       QString* name,
00054       QString* label,
00055       int forceType,
00056       const QString& minimumPoints,
00057       const DtModelData* data,
00058       bool editNotCreate = 0,
00059       DtSymbol* workingSymbol = NULL,
00060       const DtEntityMapperKey* key = NULL,
00061       DtArchivableObject* userData = NULL
00062    );
00063 
00064    virtual double heightOffset() const;
00065 
00066    static QWidget* create(QWidget* parent = NULL, const Qt::WindowFlags& flags = 0);
00067 
00068    bool editNotCreate() const;
00069    const DtEntityMapperKey& entityMapperKey() const;
00070 
00071 signals:
00072 
00073    void updateSymbol();
00074    void createActivated(QVector<DtPoint>& points, QString name,
00075       QString label, QColor color, int forceType,
00076       int appearance, bool publish, QString attachTo, DtArchivableObject* userData, bool lastOne = true);
00077    void cancelActivated();
00078    void editActivated(QString name, QString label, QColor color, int forceType,
00079       int appearance, bool publish, DtArchivableObject* userData);
00080    void heightOffsetChanged(double);
00081 
00083    void colorChanged();
00084 
00086    void nameChanged();
00087 
00090    void closing(QVector<DtPoint>*);
00091    void altitudeSelectionChanged(int, double);
00092 
00093 public slots:
00094 
00095    virtual void updateUnits(const DtUnitDisplayManager* u);
00096    virtual void updateCoordinateSystem(const DtCoordSys& system);
00097    virtual void addPoint(const DtPoint& p);
00098    virtual void editPoint(const DtPoint& p);
00099    virtual void redisplayPoints();
00100    virtual void cancelAndClose();
00101    virtual void createAndClose();
00102    virtual void editAndClose();
00103    virtual void changePoint();
00104    virtual void changeName(const QString& s);
00105    virtual void setEditPoint(QTreeWidgetItem* item);
00106    virtual void changeDefaultZPoint(double height);
00107    virtual void changeAllZPoints(double h);
00108    virtual void setHeightOffset(double h);
00109    virtual void addPoint();
00110    virtual void deletePoint();
00111    virtual void selectionChanged();
00112 
00117    virtual void userComplete(bool finish);
00118 
00120    virtual void reversePoints();
00121 
00123    virtual void setInFreehandDrawingMode(bool);
00124 
00125    virtual void updateUnits(const QString&, const QString&, const QString&);
00126 
00127 public:
00128    Ui::LineConfigWidgetUi myUiImpl;
00129 
00130 private:
00131 
00133    DtLineConfigWidget(const DtLineConfigWidget& orig);
00134 
00136    DtLineConfigWidget& operator=(const DtLineConfigWidget& orig);
00137 
00138 protected:
00139 
00141    virtual void keyPressEvent(QKeyEvent *e);
00142    virtual bool initConnections(const DtTMMapArea* area);
00143    virtual void clearPointEdit();
00144    virtual void addPointToList(const DtPoint& p, QTreeWidgetItem* before = NULL);
00145    virtual void updateButtons();
00146    virtual bool passNameCheck();
00147    virtual bool shouldPublish() const;
00148    virtual void updateNumPointsLabel();
00149    virtual bool prepareCreateModify(QColor & color);
00150 
00152    virtual bool hideZValues(const DtEntityMapperKey* key);
00153    virtual void hideHeightInformation();
00154 
00155    virtual void fillPointList();
00156 
00157    virtual int selectedIndex() const;
00158 
00160    virtual void setLabels();
00161 
00165    virtual bool fillPointListIfDifferent(DtPoint* curPoint = NULL);
00166 
00168    virtual bool initMainDialogChanges();
00169 
00170    virtual void closeEvent(QCloseEvent* c);
00171 
00172    virtual void updateOptions(DtSymbol* symbol, const DtModelData* data,
00173                                        const DtEntityMapperKey* key);
00174 
00175    virtual QTreeWidgetItem* addPoint(const DtPoint& pnt, QTreeWidgetItem* before,
00176       const QString& name, const QString& xtr, const QString& ystr, const QString& zstr);
00177 
00180    virtual QTreeWidgetItem* firstChild();
00181    virtual QTreeWidgetItem* nextSibling(QTreeWidgetItem* item);
00182 
00183    virtual void clearListView();
00184    virtual unsigned int childCount() const;
00185 
00186    virtual bool eventFilter(QObject *o, QEvent *e);
00187 
00191    virtual void reversePoints(int iStart, int iCount);
00192    virtual void reversePointsInMemory(int iStart, int iCount);
00193 
00196    virtual void updatePointList(bool emitSignal = true);
00197 
00200    virtual void addPointToPointLists(DtPoint* pnt, int pos);
00201    virtual void addPointToPointList(QVector<DtPoint>* list, DtPoint* pnt, int pos);
00202 
00205    virtual void applyChangesToPointList();
00206 
00207    virtual bool pointListsDifferent();
00208 
00209    virtual void setupZValue();
00210 
00211 protected:
00213    DtTMMapArea * myCSConverter;
00214    
00215    QVector<DtPoint>* myPointList;
00216 
00217    QString* myObjectNamePtr;
00218    QString* myLabelPtr;
00219    
00220    bool myEditNotCreate;
00221 
00222    int myPointNum;
00223    int myTotalPoints;
00224 
00225    double myHeightOffset;
00226    DtSymbol* myWorkingSymbol;
00227 
00228    int myMinimumPoints;
00229    bool myUnlimitedPoints;
00230 
00231    const DtModelData* myModelData;
00232 
00233    DtLocationEntryWidget* myLocationEntryWidget;
00234    DtArchivableObject* myUserData;
00235 
00236    bool myClosing;
00237 
00238    int myAppearance;
00239 
00241    QVector<DtPoint>* myOriginalList;
00242    int myCurrentSamplingRate;
00243 
00244    int myDefaultLineWidth;
00245    int myDefaultLineStyle;
00246    int myDefaultTransparency;
00247 
00248    bool myFirstTime;
00249 
00250    DtEntityMapperKey myEntityMapperKey;
00251 
00252    QVector<DtPoint> myCurrentList;
00253 
00254    bool myInFreehandDrawingMode;
00255 };
00256 
00257 inline const DtEntityMapperKey& DtLineConfigWidget::entityMapperKey() const
00258 {
00259    return myEntityMapperKey;
00260 }
00261 
00262 inline bool DtLineConfigWidget::editNotCreate() const
00263 {
00264    return myEditNotCreate;
00265 }
00266 
00267 #endif

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)