VR-Forces 4.0.4 Class Documentation
include/vrvOsgEarthQt/DtOsgEarthStartupDialog.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2011 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: DtOsgEarthStartupDialog.h,v $ $Revision: 1.2 $ $State: Exp $
00007 ******************************************************************************/
00008 
00011 
00012 #pragma once
00013 
00014 #include <vrvUtil/signalslib.h>
00015 #include <vrvUtil/DtVirtualBaseClass.h>
00016 #include <vrvOsgEarthQt/vrvOsgEarthQt.h>
00017 #include <vrvOsgEarthQt/DtOsgEarthStartupDialogInterface.h>
00018 
00019 #include <QtGui/QDialog>
00020 #include <QtGui/QPixmap>
00021 
00022 class QRadioButton;
00023 class QVBoxLayout;
00024 class QHBoxLayout;
00025 class QButton;
00026 class QCheckBox;
00027 class QComboBox;
00028 class QLabel;
00029 class QGridLayout;
00030 
00031 namespace makVrv
00032 {
00033    class DtDe;
00034    class DtOsgEarthStartupTitleBar;
00035 
00040    class DT_DLL_VRVOSGEARTHQT DtOsgEarthStartupDialog
00041    : public QDialog
00042    , public DtOsgEarthStartupDialogInterface
00043    {
00044       Q_OBJECT
00045 
00046    public:
00048       DtOsgEarthStartupDialog(DtDe& de, QWidget* parent = 0, 
00049          const Qt::WindowFlags& flags = 0);
00050 
00052       virtual ~DtOsgEarthStartupDialog();
00053 
00055       virtual void activate();
00056 
00057       virtual void deactivate();
00058 
00059    public:
00061       virtual void setServerAvailability(
00062          const std::string&, ServerStatus, const std::string& reason);
00063 
00065       virtual void setCurrentServer(const std::string&);
00066 
00068       virtual void addServer(const std::string& desc);
00069 
00070       virtual void addTerrain(const std::string& desc);
00071 
00073       virtual void setStartupPreference(StartupPreference);
00074 
00076       virtual void setNeverShowAgain(bool neverShow);
00077       
00079       virtual void showDialog();
00080 
00082       virtual void clear();
00083 
00084    protected slots:
00085       virtual void currentServerChanged();
00086 
00087       virtual void serverComboActivated();
00088       virtual void terrainComboActivated();
00089 
00090    protected:
00092       void setupGui();
00093 
00095       virtual void accept();
00096 
00097       virtual void reject();
00098 
00100       virtual void paintEvent(QPaintEvent*);
00101 
00103       void setupServersGui();
00104 
00106       void setupTerrainGui();
00107 
00108    public:
00109       QVBoxLayout* myMainLayout;
00110       
00111       QLabel* myServerConnectIcon;
00112       QRadioButton* myServerConnectButton;
00113 
00114       QLabel* myLocalTerrainIcon;
00115       QRadioButton* myLocalTerrainButton;
00116 
00117       QLabel* myDoNothingIcon;
00118       QRadioButton* myDoNothingButton;
00119 
00120       QLabel* myServerStatus;
00121       QLabel* myServersLabel;
00122       QComboBox* myServers;
00123       QGridLayout* myServerLayout;
00124 
00125       QLabel* myTerrainsLabel;
00126       QComboBox* myTerrains;
00127       QGridLayout* myTerrainLayout;
00128 
00129       QCheckBox* myNeverShowAgain;
00130       QPushButton* myOk;
00131       QHBoxLayout* myButtonLayout;
00132 
00133       QImage myStartupImage;
00134 
00135    protected:
00136       DtDe&                myDe;
00137       DtVirtualBaseClass*  myLogic;
00138    };
00139 
00142    class DT_DLL_VRVOSGEARTHQT DtOsgEarthStartupDialogCreator : public DtVirtualBaseClass
00143    {
00144    public:
00146       DtOsgEarthStartupDialogCreator();
00147 
00149       virtual ~DtOsgEarthStartupDialogCreator();
00150 
00152       static DtOsgEarthStartupDialogCreator& instance(DtDe&);
00153 
00155       static void registerInstance(DtDe&, DtOsgEarthStartupDialogCreator*);
00156 
00158       virtual DtOsgEarthStartupDialog* create(DtDe&, QWidget* window = 0);
00159    };
00160 }

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)