mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Added a language preference to the Settings.
When the user first opens the application the default language is selected; this can be changed to a hardcoded one by going to system preferences and choosing the one you want. Restart required. Fixes #136 [Dirk Hohndel: whitespace fixes, removed qDebug() call, rephrased the message displayed prompting the user to restart.] Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
bfe5ccda1c
commit
4e263bae98
5 changed files with 118 additions and 18 deletions
|
@ -234,7 +234,7 @@ private:
|
|||
class YearlyStatisticsModel : public TreeModel {
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum { YEAR,DIVES,TOTAL_TIME,AVERAGE_TIME,SHORTEST_TIME,LONGEST_TIME,AVG_DEPTH,MIN_DEPTH,
|
||||
enum { YEAR,DIVES,TOTAL_TIME,AVERAGE_TIME,SHORTEST_TIME,LONGEST_TIME,AVG_DEPTH,MIN_DEPTH,
|
||||
MAX_DEPTH,AVG_SAC,MIN_SAC,MAX_SAC,AVG_TEMP,MIN_TEMP,MAX_TEMP,COLUMNS};
|
||||
|
||||
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||
|
@ -312,4 +312,16 @@ public slots:
|
|||
void repopulate();
|
||||
};
|
||||
|
||||
|
||||
class LanguageModel : public QAbstractListModel {
|
||||
Q_OBJECT
|
||||
public:
|
||||
static LanguageModel* instance();
|
||||
virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
|
||||
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const;
|
||||
private:
|
||||
LanguageModel(QObject* parent = 0);
|
||||
|
||||
QStringList languages;
|
||||
};
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue