Warning, /education/marble/src/bindings/python/sip/MarbleWidget.sip is written in an unsupported language. File is not indexed.

0001 //
0002 // Copyright 2008 Simon Edwards <simon@simonzone.com>
0003 // 
0004 // This library is free software; you can redistribute it and/or
0005 // modify it under the terms of the GNU Lesser General Public
0006 // License as published by the Free Software Foundation; either 
0007 // version 2.1 of the License, or (at your option) any later version.
0008 // 
0009 // This library is distributed in the hope that it will be useful,
0010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
0011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0012 // Lesser General Public License for more details.
0013 // 
0014 // You should have received a copy of the GNU Lesser General Public 
0015 // License along with this library.  If not, see <http://www.gnu.org/licenses/>.
0016 //
0017 
0018 namespace Marble
0019 {
0020 
0021 class MarbleWidget : QWidget
0022 {
0023 %TypeHeaderCode
0024 #include <MarbleWidget.h>
0025 %End
0026 
0027 public:
0028     explicit                MarbleWidget (QWidget* parent /TransferThis/ = 0);
0029     Marble::MarbleModel*    model () const;
0030     int                     radius () const;
0031     void                    setRadius (int radius);
0032     int                     zoom () const;
0033     qreal                   distance () const;
0034     void                    setDistance (qreal distance);
0035     QString                 distanceString () const;
0036     int                     minimumZoom () const;
0037     int                     maximumZoom () const;
0038     qreal                   centerLongitude () const;
0039     qreal                   centerLatitude () const;
0040     QPixmap                 mapScreenShot ();
0041     bool                    showOverviewMap () const;
0042     bool                    showScaleBar () const;
0043     bool                    showCompass () const;
0044     bool                    showClouds () const;
0045     bool                    showAtmosphere () const;
0046     bool                    showCrosshairs () const;
0047     bool                    showGrid () const;
0048     bool                    showPlaces () const;
0049     bool                    showCities () const;
0050     bool                    showTerrain () const;
0051     bool                    showOtherPlaces () const;
0052     bool                    showRelief () const;
0053     bool                    showIceLayer () const;
0054     bool                    showBorders () const;
0055     bool                    showRivers () const;
0056     bool                    showLakes () const;
0057     bool                    showFrameRate () const;
0058     quint64                 volatileTileCacheLimit () const;
0059     QList<Marble::RenderPlugin*>  renderPlugins () const;
0060     QList<Marble::AbstractFloatItem*>  floatItems () const;
0061     Marble::Projection      projection () const;
0062     QString                 mapThemeId () const;
0063     Marble::ViewContext     viewContext () const;
0064     bool                    animationsEnabled () const;
0065     Marble::AngleUnit       defaultAngleUnit () const;
0066     void                    setDefaultAngleUnit (Marble::AngleUnit angleUnit);
0067     QFont                   defaultFont () const;
0068     void                    setDefaultFont (const QFont& font);
0069     void                    zoomView (int zoom, Marble::FlyToMode mode = Marble::Instant);
0070     void                    zoomViewBy (int zoomStep, Marble::FlyToMode mode = Marble::Instant);
0071     void                    zoomIn (Marble::FlyToMode mode = Marble::Automatic);
0072     void                    zoomOut (Marble::FlyToMode mode = Marble::Automatic);
0073     void                    centerOn (const Marble::GeoDataCoordinates& point, bool animated = 0);
0074     void                    setCenterLatitude (qreal lat, Marble::FlyToMode mode = Marble::Instant);
0075     void                    setCenterLongitude (qreal lon, Marble::FlyToMode mode = Marble::Instant);
0076     void                    setProjection (int projection);
0077     void                    setProjection (Marble::Projection projection /Constrained/);
0078     void                    moveLeft (Marble::FlyToMode mode = Marble::Automatic);
0079     void                    moveRight (Marble::FlyToMode mode = Marble::Automatic);
0080     void                    moveUp (Marble::FlyToMode mode = Marble::Automatic);
0081     void                    moveDown (Marble::FlyToMode mode = Marble::Automatic);
0082     void                    goHome (Marble::FlyToMode mode = Marble::Automatic);
0083     void                    setMapThemeId (const QString& maptheme);
0084     void                    setPropertyValue (const QString& name, bool value);
0085     void                    setShowOverviewMap (bool visible);
0086     void                    setShowScaleBar (bool visible);
0087     void                    setShowCompass (bool visible);
0088     void                    setShowClouds (bool visible);
0089     void                    setShowAtmosphere (bool visible);
0090     void                    setShowCrosshairs (bool visible);
0091     void                    setShowGrid (bool visible);
0092     void                    setShowPlaces (bool visible);
0093     void                    setShowCities (bool visible);
0094     void                    setShowTerrain (bool visible);
0095     void                    setShowOtherPlaces (bool visible);
0096     void                    setShowRelief (bool visible);
0097     void                    setShowIceLayer (bool visible);
0098     void                    setShowBorders (bool visible);
0099     void                    setShowRivers (bool visible);
0100     void                    setShowLakes (bool visible);
0101     void                    setShowFrameRate (bool visible);
0102     void                    setShowTileId (bool visible);
0103     void                    notifyMouseClick (int x, int y);
0104     void                    clearVolatileTileCache ();
0105     void                    setVolatileTileCacheLimit (quint64 kiloBytes);
0106     void                    creatingTilesStart (Marble::TileCreator* creator, const QString& name, const QString& description);
0107     void                    setViewContext (Marble::ViewContext viewContext);
0108     void                    setAnimationsEnabled (bool enabled);
0109     void                    setSelection (const QRect& region);
0110 
0111 signals:
0112     void                    zoomChanged (int zoom);
0113     void                    distanceChanged (const QString& distanceString);
0114     void                    projectionChanged (Marble::Projection);
0115     void                    mouseClickGeoPosition (qreal lon, qreal lat, Marble::GeoDataCoordinates::Unit);
0116     void                    framesPerSecond (qreal fps);
0117 
0118 protected:
0119     void                    leaveEvent (QEvent* event);
0120     void                    paintEvent (QPaintEvent* event);
0121     virtual void            customPaint (Marble::GeoPainter* painter);
0122     void                    resizeEvent (QResizeEvent* event);
0123     void                    connectNotify (const char* signal);
0124     void                    disconnectNotify (const char* signal);
0125 
0126 public:
0127     virtual ~MarbleWidget ();
0128 //ig    MarbleWidgetInputHandler*  inputHandler () const;
0129 //ig    void                    setInputHandler (MarbleWidgetInputHandler* handler);
0130     void                    readPluginSettings (QSettings& settings);
0131     void                    writePluginSettings (QSettings& settings) const;
0132 //ig    Marble::GeoSceneDocument*  mapTheme () const;
0133     void                    setInputEnabled (bool);
0134     void                    centerOn (const Marble::GeoDataLatLonBox& box, bool animated = 0);
0135 signals:
0136 //ig    void                    regionSelected (const Marble::GeoDataLatLonBox &);
0137     void                    pluginSettingsChanged ();
0138     void                    renderPluginInitialized (Marble::RenderPlugin* renderPlugin);
0139 protected:
0140     void                    changeEvent (QEvent* event);
0141 public:
0142 //ig    Marble::ViewportParams*  viewport ();
0143     const Marble::ViewportParams*  viewport () const;
0144     Marble::GeoDataLookAt   lookAt () const;
0145     Marble::AbstractFloatItem*  floatItem (const QString& nameId) const;
0146 //ig    RoutingLayer*           routingLayer ();
0147     void                    rotateBy (const qreal deltaLon, const qreal deltaLat, Marble::FlyToMode mode = Marble::Instant);
0148     void                    centerOn (const qreal lon, const qreal lat, bool animated = 0);
0149     void                    flyTo (const Marble::GeoDataLookAt& lookAt, Marble::FlyToMode mode = Marble::Automatic);
0150     void                    reloadMap ();
0151 signals:
0152     void                    themeChanged (const QString& theme);
0153     void                    mouseMoveGeoPosition (const QString&);
0154     void                    visibleLatLonAltBoxChanged (const Marble::GeoDataLatLonAltBox& visibleLatLonAltBox);
0155 public:
0156     int                     tileZoomLevel () const;
0157     QList<Marble::AbstractDataPluginItem*>  whichItemAt (const QPoint& curpos) const;
0158 signals:
0159     void                    tileLevelChanged (int level);
0160 public:
0161     void                    addLayer (Marble::LayerInterface* layer /Transfer/);
0162     void                    removeLayer (Marble::LayerInterface* layer /TransferBack/);
0163     qreal                   radiusFromDistance (qreal distance) const;
0164     qreal                   distanceFromRadius (qreal radius) const;
0165     qreal                   zoomFromDistance (qreal distance) const;
0166     qreal                   distanceFromZoom (qreal zoom) const;
0167     bool                    showBackground () const;
0168     void                    setShowBackground (bool visible);
0169     void                    setMapQualityForViewContext (Marble::MapQuality quality, Marble::ViewContext viewContext);
0170 //FIXME
0171 //ig    QVector<const Marble::GeoDataPlacemark*>  whichFeatureAt (const QPoint&) const;
0172 //ig    MarbleWidgetPopupMenu*  popupMenu ();
0173     bool                    showSunShading () const;
0174     bool                    showCityLights () const;
0175     void                    centerOn (const Marble::GeoDataPlacemark& placemark, bool animated = 0);
0176     void                    setShowSunShading (bool visible);
0177     void                    setShowCityLights (bool visible);
0178     QRegion                 mapRegion () const;
0179     bool                    screenCoordinates (qreal lon, qreal lat, qreal& x, qreal& y) const;
0180     bool                    geoCoordinates (int x, int y, qreal& lon, qreal& lat, Marble::GeoDataCoordinates::Unit = Marble::GeoDataCoordinates::Degree) const;
0181     qreal                   moveStep () const;
0182     Marble::GeoDataCoordinates  focusPoint () const;
0183     void                    setFocusPoint (const Marble::GeoDataCoordinates& focusPoint);
0184     void                    resetFocusPoint ();
0185     Marble::MapQuality      mapQuality (Marble::ViewContext = Marble::Still) const;
0186 //ig    const TextureLayer*     textureLayer () const;
0187     void                    setShowRuntimeTrace (bool visible);
0188     void                    downloadRegion (const QVector<Marble::TileCoordsPyramid>&);
0189 
0190 // FIXME
0191 //ig    PopupLayer*             popupLayer ();
0192     bool                    isLockedToSubSolarPoint () const;
0193     bool                    isSubSolarPointIconVisible () const;
0194     void                    setZoom (int zoom, Marble::FlyToMode mode = Marble::Instant);
0195     void                    setLockToSubSolarPoint (bool visible);
0196     void                    setSubSolarPointIconVisible (bool visible);
0197 };
0198 // MarbleWidget
0199 
0200 };
0201 // Marble
0202 
0203