mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-18 06:11:46 -05:00
Handle my geolocation
This commit is contained in:
parent
7a502e4a56
commit
894394909b
@ -82,6 +82,7 @@ public:
|
|||||||
void setInputGUI(int deviceTabIndex, QWidget* gui, const QString& sourceDisplayName);
|
void setInputGUI(int deviceTabIndex, QWidget* gui, const QString& sourceDisplayName);
|
||||||
|
|
||||||
const QTimer& getMasterTimer() const { return m_masterTimer; }
|
const QTimer& getMasterTimer() const { return m_masterTimer; }
|
||||||
|
const MainSettings& getMainSettings() const { return m_settings; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum {
|
enum {
|
||||||
|
@ -25,6 +25,11 @@ public:
|
|||||||
int getSourceIndex() const { return m_preferences.getSourceIndex(); }
|
int getSourceIndex() const { return m_preferences.getSourceIndex(); }
|
||||||
void setSourceIndex(int value) { m_preferences.setSourceIndex(value); }
|
void setSourceIndex(int value) { m_preferences.setSourceIndex(value); }
|
||||||
|
|
||||||
|
void setLatitude(float latitude) { m_preferences.setLatitude(latitude); }
|
||||||
|
void setLongitude(float longitude) { m_preferences.setLongitude(longitude); }
|
||||||
|
float getLatitude() const { return m_preferences.getLatitude(); }
|
||||||
|
float getLongitude() const { return m_preferences.getLongitude(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Preferences m_preferences;
|
Preferences m_preferences;
|
||||||
Preset m_workingPreset;
|
Preset m_workingPreset;
|
||||||
|
@ -13,6 +13,8 @@ void Preferences::resetToDefaults()
|
|||||||
m_audioType.clear();
|
m_audioType.clear();
|
||||||
m_audioDevice.clear();
|
m_audioDevice.clear();
|
||||||
m_sourceIndex = 0;
|
m_sourceIndex = 0;
|
||||||
|
m_latitude = 0.0;
|
||||||
|
m_longitude = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray Preferences::serialize() const
|
QByteArray Preferences::serialize() const
|
||||||
@ -23,6 +25,8 @@ QByteArray Preferences::serialize() const
|
|||||||
s.writeString(3, m_audioType);
|
s.writeString(3, m_audioType);
|
||||||
s.writeString(4, m_audioDevice);
|
s.writeString(4, m_audioDevice);
|
||||||
s.writeS32(5, m_sourceIndex);
|
s.writeS32(5, m_sourceIndex);
|
||||||
|
s.writeFloat(6, m_latitude);
|
||||||
|
s.writeFloat(7, m_longitude);
|
||||||
return s.final();
|
return s.final();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,6 +45,8 @@ bool Preferences::deserialize(const QByteArray& data)
|
|||||||
d.readString(3, &m_audioType);
|
d.readString(3, &m_audioType);
|
||||||
d.readString(4, &m_audioDevice);
|
d.readString(4, &m_audioDevice);
|
||||||
d.readS32(5, &m_sourceIndex, 0);
|
d.readS32(5, &m_sourceIndex, 0);
|
||||||
|
d.readFloat(6, &m_latitude, 0.0);
|
||||||
|
d.readFloat(7, &m_longitude, 0.0);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
resetToDefaults();
|
resetToDefaults();
|
||||||
|
@ -23,6 +23,11 @@ public:
|
|||||||
void setAudioDevice(const QString& value) { m_audioDevice= value; }
|
void setAudioDevice(const QString& value) { m_audioDevice= value; }
|
||||||
const QString& getAudioDevice() const { return m_audioDevice; }
|
const QString& getAudioDevice() const { return m_audioDevice; }
|
||||||
|
|
||||||
|
void setLatitude(float latitude) { m_latitude = latitude; }
|
||||||
|
void setLongitude(float longitude) { m_longitude = longitude; }
|
||||||
|
float getLatitude() const { return m_latitude; }
|
||||||
|
float getLongitude() const { return m_longitude; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QString m_sourceType;
|
QString m_sourceType;
|
||||||
QString m_sourceDevice;
|
QString m_sourceDevice;
|
||||||
@ -30,6 +35,9 @@ protected:
|
|||||||
|
|
||||||
QString m_audioType;
|
QString m_audioType;
|
||||||
QString m_audioDevice;
|
QString m_audioDevice;
|
||||||
|
|
||||||
|
float m_latitude;
|
||||||
|
float m_longitude;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_PREFERENCES_H
|
#endif // INCLUDE_PREFERENCES_H
|
||||||
|
Loading…
Reference in New Issue
Block a user