File indexing completed on 2024-10-27 03:34:42
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2014 Abhinav Gangwar <abhgang@gmail.com> 0004 // 0005 0006 0007 #ifndef MARBLE_CLICK_ON_THAT 0008 #define MARBLE_CLICK_ON_THAT 0009 0010 // Qt 0011 #include <QObject> 0012 0013 // Marble 0014 #include <marble/GeoDataCoordinates.h> 0015 0016 namespace Marble 0017 { 0018 class ClickOnThatPrivate; 0019 class MarbleWidget; 0020 0021 class ClickOnThat : public QObject 0022 { 0023 Q_OBJECT 0024 public: 0025 explicit ClickOnThat( MarbleWidget *marbleWidget ); 0026 ~ClickOnThat() override; 0027 0028 /** 0029 * disable the GeoDataDocument which 0030 * shows the pin on map. This method 0031 * is called when this game quits. 0032 */ 0033 void disablePinDocument(); 0034 0035 public Q_SLOTS: 0036 void initiateGame(); 0037 void postQuestion( QObject* ); 0038 void updateSelectPin( bool, const GeoDataCoordinates& ); 0039 void determineResult( qreal, qreal, GeoDataCoordinates::Unit ); 0040 void highlightCorrectAnswer(); 0041 0042 Q_SIGNALS: 0043 void gameInitialized(); 0044 void updateResult( bool ); 0045 void announceHighlight(qreal, qreal, GeoDataCoordinates::Unit ); 0046 0047 private: 0048 ClickOnThatPrivate * const d; 0049 }; 0050 0051 } // namespace Marble 0052 0053 #endif // MARBLE_CLICK_ON_THAT