<commit_before>//
// This file is part of the Marble Desktop Globe.
//
// This program is free software licensed under the GNU LGPL. You can
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
// Copyright 2005-2007 <NAME> <<EMAIL>>"
// Copyright 2007      <NAME>  <<EMAIL>>"
//

//
// MarbleModel is the data store and index class for the MarbleWidget.
//

#ifndef MARBLEMODEL_H
#define MARBLEMODEL_H


/** @file
 * This file contains the headers for MarbleModel
 *
 * @author <NAME> <<EMAIL>>
 * @author <NAME>  <<EMAIL>>
 */



#include "marble_export.h"

#include <QtCore/QAbstractListModel>
#include <QtCore/QObject>
#include <QtGui/QPainter>
#include <QtGui/QImage>
#include <QtGui/QPixmap>

#include "global.h"
#include "Quaternion.h"
#include "GridMap.h"
#include "PlaceMarkContainer.h"
#include "placemarkpainter.h"
#include "placemarkmodel.h"
#include "GlobeScanlineTextureMapper.h"
#include "FlatScanlineTextureMapper.h"
#include "vectorcomposer.h"
#include "texcolorizer.h"

class ClipPainter;
class PlaceMark;
class PlaceMarkManager;
class GpsLayer;
class MarbleModelPrivate;
class ViewParams;


/**
 * @short The data model (not based on QAbstractModel) for a MarbleWidget.
 *
 * This class provides a data storage and indexer that can be
 * displayed in a MarbleWidget.  It contains 3 different datatypes:
 * <b>tiles</b> which provide the background, <b>vectors</b> which
 * provide things like country borders and coastlines and
 * <b>placemarks</b> which can show points of interest, such as
 * cities, mountain tops or the poles.
 *
 * The <b>tiles</b> provide the background of the image and can be for
 * instance height and depth fields, magnetic strength, topographic
 * data or anything else that is area based.
 *
 * The <b>vectors</b> provide things like country borders and
 * coastlines.  They are stored in separate files and can be added or
 * removed at anytime.
 *
 * The <b>placemarks</b> contain points of interest, such as cities,
 * mountain tops or the poles. These are sorted by size (for cities)
 * and category (capitals, other important cities, less important
 * cities, etc) and are displayed with different color or shape like
 * square or round.
 *
 * @see MarbleWidget
 */

class MARBLE_EXPORT MarbleModel : public QObject
{
    Q_OBJECT

 public:
    /**
     * @brief  Construct a new MarbleModel.
     * @param view  The widget that is the view for this Model.
     */
    MarbleModel( QWidget *parent );
    virtual ~MarbleModel();

    void  paintGlobe(ClipPainter*, int width, int height,
                     ViewParams *viewParams,
                     bool redrawBackground, const QRect&);

    void  resize( int width, int height );

    QAbstractListModel* getPlaceMarkModel() const;

    void setMapTheme( const QString &selectedMap, QWidget *parent );

    void addPlaceMarkFile( const QString& filename );

    QVector< PlaceMark* > whichFeatureAt( const QPoint& );

    PlaceMarkContainer *placeMarkContainer() const;
    PlaceMarkPainter   *placeMarkPainter()   const;
    VectorComposer     *vectorComposer()     const;
    TextureColorizer   *textureColorizer()   const;
#ifndef FLAT_PROJ
    GlobeScanlineTextureMapper  *textureMapper() const;
#else
    FlatScanlineTextureMapper   *textureMapper() const;
#endif

    GpsLayer           *gpsLayer()           const;

    /**
     * @brief Return whether the Gps Data is visible.
     * @return The Gps Data visibility.
     */
    bool showGps() const;

    /**
     * @brief Set whether the Gps Data is visible.
     * @param visible visibility of the Gps Data.
     */
    void setShowGps( bool visible );

    /**
     * @brief Start the model's timer polling
     *
     * this is default behaviour so does not need to be started unless
     * it was previously stopped
     * @param time the amount of milliseconds between each poll
     */
    void startPolling( int time = 1000 );
<commit_msg>Compile also for Flat projection<commit_after>//
// This file is part of the Marble Desktop Globe.
//
// This program is free software licensed under the GNU LGPL. You can
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
// Copyright 2005-2007 <NAME> <<EMAIL>>"
// Copyright 2007      <NAME>  <<EMAIL>>"
//

//
// MarbleModel is the data store and index class for the MarbleWidget.
//

#ifndef MARBLEMODEL_H
#define MARBLEMODEL_H


/** @file
 * This file contains the headers for MarbleModel
 *
 * @author <NAME> <<EMAIL>>
 * @author <NAME>  <<EMAIL>>
 */



#include "marble_export.h"

#include <QtCore/QAbstractListModel>
#include <QtCore/QObject>
#include <QtGui/QPainter>
#include <QtGui/QImage>
#include <QtGui/QPixmap>

#include "global.h"
#include "Quaternion.h"
#include "GridMap.h"
#include "PlaceMarkContainer.h"
#include "placemarkpainter.h"
#include "placemarkmodel.h"
#include "GlobeScanlineTextureMapper.h"
#include "FlatScanlineTextureMapper.h"
#include "vectorcomposer.h"
#include "texcolorizer.h"

class ClipPainter;
class PlaceMark;
class PlaceMarkManager;
class GpsLayer;
class MarbleModelPrivate;
class ViewParams;


/**
 * @short The data model (not based on QAbstractModel) for a MarbleWidget.
 *
 * This class provides a data storage and indexer that can be
 * displayed in a MarbleWidget.  It contains 3 different datatypes:
 * <b>tiles</b> which provide the background, <b>vectors</b> which
 * provide things like country borders and coastlines and
 * <b>placemarks</b> which can show points of interest, such as
 * cities, mountain tops or the poles.
 *
 * The <b>tiles</b> provide the background of the image and can be for
 * instance height and depth fields, magnetic strength, topographic
 * data or anything else that is area based.
 *
 * The <b>vectors</b> provide things like country borders and
 * coastlines.  They are stored in separate files and can be added or
 * removed at anytime.
 *
 * The <b>placemarks</b> contain points of interest, such as cities,
 * mountain tops or the poles. These are sorted by size (for cities)
 * and category (capitals, other important cities, less important
 * cities, etc) and are displayed with different color or shape like
 * square or round.
 *
 * @see MarbleWidget
 */

class MARBLE_EXPORT MarbleModel : public QObject
{
    Q_OBJECT

 public:
    /**
     * @brief  Construct a new MarbleModel.
     * @param view  The widget that is the view for this Model.
     */
    MarbleModel( QWidget *parent );
    virtual ~MarbleModel();

    void  paintGlobe(ClipPainter*, int width, int height,
                     ViewParams *viewParams,
                     bool redrawBackground, const QRect&);

    void  resize( int width, int height );

    QAbstractListModel* getPlaceMarkModel() const;

    void setMapTheme( const QString &selectedMap, QWidget *parent );

    void addPlaceMarkFile( const QString& filename );

    QVector< PlaceMark* > whichFeatureAt( const QPoint& );

    PlaceMarkContainer *placeMarkContainer() const;
    PlaceMarkPainter   *placeMarkPainter()   const;
    VectorComposer     *vectorComposer()     const;
    TextureColorizer   *textureColorizer()   const;
#ifndef FLAT_PROJ
    GlobeScanlineTextureMapper  *textureMapper() const;
#else
    FlatScanlineTextureMapper   *textureMapper() pconst;
#endif

    GpsLayer           *gpsLayer()           const;

    /**
     * @brief Return whether the Gps Data is visible.
     * @return The Gps Data visibility.
     */
    bool showGps() const;

    /**
     * @brief Set whether the Gps Data is visible.
     * @param visible visibility of the Gps Data.
     */
    void setShowGps( bool visible );

    /**
     * @brief Start the model's timer polling
     *
     * this is default behaviour so does not need to be started unless
     * it was previously stopped
     * @param time the amount of milliseconds between each poll
     */
    void startPolling( int time = 1000 );

{'fraction_non_alphanumeric': 0.09205548549810845, 'fraction_numerical': 0.004287515762925599, 'mean_word_length': 3.3505211190345583, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 63, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6574043', 'n_tokens_mistral': 2408, 'n_tokens_neox': 2299, 'n_words': 880}