mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
mobile/statistics: add a statistics page on mobile
This adds a reasonably flexibile mobile page that tries to do the right thing for both portrait and landscape mode. In order to get the most out of a mobile screen, it's implemented in a way that always gives it the full screen (it does so by emptying out the page stack and being the only page shown - brutal, but effective). This commit also contains a bunch of other random cleanups that didn't really justify being in separate commits. Parts of this was written by Berthold, hence the double SOB. Signed-off-by: Dirk Hohndel <dirk@hohndel.org> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
d77f254328
commit
eb2b0f0a3e
5 changed files with 229 additions and 3 deletions
|
@ -5,16 +5,39 @@
|
|||
#include "stats/statsview.h"
|
||||
#include "stats/statsstate.h"
|
||||
|
||||
#include <QStringList>
|
||||
|
||||
class StatsManager : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
Q_PROPERTY(QStringList var1List MEMBER var1List NOTIFY var1ListChanged)
|
||||
Q_PROPERTY(QStringList binner1List MEMBER binner1List NOTIFY binner1ListChanged)
|
||||
Q_PROPERTY(QStringList var2List MEMBER var2List NOTIFY var2ListChanged)
|
||||
Q_PROPERTY(QStringList binner2List MEMBER binner2List NOTIFY binner2ListChanged)
|
||||
|
||||
StatsManager();
|
||||
~StatsManager();
|
||||
Q_INVOKABLE void init(StatsView *v);
|
||||
Q_INVOKABLE void init(StatsView *v, QObject *o);
|
||||
Q_INVOKABLE void doit();
|
||||
Q_INVOKABLE void var1Changed(int idx);
|
||||
Q_INVOKABLE void var1BinnerChanged(int idx);
|
||||
Q_INVOKABLE void var2Changed(int idx);
|
||||
Q_INVOKABLE void var2BinnerChanged(int idx);
|
||||
signals:
|
||||
void var1ListChanged();
|
||||
void binner1ListChanged();
|
||||
void var2ListChanged();
|
||||
void binner2ListChanged();
|
||||
private:
|
||||
StatsView *view;
|
||||
StatsState state;
|
||||
QStringList var1List;
|
||||
QStringList binner1List;
|
||||
QStringList var2List;
|
||||
QStringList binner2List;
|
||||
StatsState::UIState uiState; // Remember UI state so that we can interpret indexes
|
||||
void updateUi();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue