Skip to content

Commit

Permalink
Merge branch 'dev-redesign' into dev-redesign_ProjectItem
Browse files Browse the repository at this point in the history
  • Loading branch information
iiLubos authored Dec 11, 2023
2 parents f410c37 + 2a37b1b commit e2e5448
Show file tree
Hide file tree
Showing 21 changed files with 769 additions and 864 deletions.
7 changes: 3 additions & 4 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Building Mergin Maps mobile app from source - step by step
* [5. Building iOS](#5-building-ios)
* [6. Building macOS](#6-building-macos)
* [7. Building Windows](#7-building-windows)
* [8. Auto Testing](#9-auto-testing)
* [8. Auto Testing](#8-auto-testing)

# 1. Introduction

Expand Down Expand Up @@ -89,8 +89,7 @@ openssl aes-256-cbc -d -in merginsecrets.cpp.enc -out merginsecrets.cpp -md md5
## 2.2 Code formatting

We use `astyle` to format CPP and Objective-C files. Format is similar to what QGIS has.

For QML files we use latest version of `jesperhh/qmlfmt`. To install, follow instruction on the GitHub of the project.
For more details about code conventions, please read [our code conventions doc](./docs/code_convention.md).

We also use software [pre-commit](https://pre-commit.com/) to automatically check format when doing a commit.
You need to install it via `brew`/`pip`, see [installation details](https://pre-commit.com/#installation).
Expand Down Expand Up @@ -397,7 +396,7 @@ or you need some user with unlimited projects limit. First workspace from list i

now you need to set environment variables:
```
TEST_MERGIN_URL=test.dev.merginmaps.com
TEST_MERGIN_URL=https://test.dev.merginmaps.com/
TEST_API_USERNAME=test_mobileapp_dev
TEST_API_PASSWORD=<your_password>
```
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,9 @@ To setup your development environment, read [INSTALL](./INSTALL.md)

New sub-project 'gallery' app is used to develop/design all UI components, used in the Mergin Maps app

### Code conventions

To learn about our code conventions, please see the [code conventions](./docs/code_convention.md) file.

## Privacy policy
Read more about the app privacy policy [here](https://merginmaps.com/docs/reference/privacy/)
7 changes: 6 additions & 1 deletion app/mmstyle.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ class MMStyle: public QObject
Q_PROPERTY( double toolbarHeight READ toolbarHeight CONSTANT )
Q_PROPERTY( double menuDrawerHeight READ menuDrawerHeight CONSTANT )

// Other
Q_PROPERTY( double inputRadius READ inputRadius CONSTANT )

public:
explicit MMStyle( qreal dp )
: mDp( dp )
Expand All @@ -119,7 +122,7 @@ class MMStyle: public QObject
QFont t1() {return fontFactory( 18, true );}
QFont t2() {return fontFactory( 16, true );}
QFont t3() {return fontFactory( 14, true );}
QFont t4() {return fontFactory( 18, true );}
QFont t4() {return fontFactory( 12, true );}
QFont t5() {return fontFactory( 10, true );}

QFont p1() {return fontFactory( 32, false );}
Expand Down Expand Up @@ -192,6 +195,8 @@ class MMStyle: public QObject
double toolbarHeight() {return 89 * mDp;}
double menuDrawerHeight() {return 67 * mDp;}

double inputRadius() {return 12 * mDp;}

signals:
void styleChanged();

Expand Down
6 changes: 1 addition & 5 deletions app/projectsmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ void ProjectsModel::onAuthChanged()
{
if ( !mBackend->userAuth() || !mBackend->userAuth()->hasAuthData() ) // user logged out, clear created and shared lists
{
if ( mModelType == CreatedProjectsModel || mModelType == SharedProjectsModel )
if ( mModelType == WorkspaceProjectsModel )
{
clearProjects();
}
Expand Down Expand Up @@ -586,10 +586,6 @@ QString ProjectsModel::modelTypeToFlag() const
{
switch ( mModelType )
{
case CreatedProjectsModel:
return QStringLiteral( "created" );
case SharedProjectsModel:
return QStringLiteral( "shared" );
case WorkspaceProjectsModel:
return QStringLiteral( "workspace" );
case PublicProjectsModel:
Expand Down
6 changes: 2 additions & 4 deletions app/projectsmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class LocalProjectsManager;
*
* Model can have different types that affect handling of the projects.
* - LocalProjectsModel always keeps all local projects and seek their mergin part when listProjectsByNameFinished
* - Created-, Shared-, and PublicProjectsModel does the opposite, keeps all mergin projects and seeks their local part in projects from LocalProjectsManager
* - Workspace-, and PublicProjectsModel does the opposite, keeps all mergin projects and seeks their local part in projects from LocalProjectsManager
* - EmptyProjectsModel is default state
*
* To avoid overriding of requests, model remembers last sent request ID and upon receiving signal from MerginAPI about listProjectsFinished, it firsts compares
Expand Down Expand Up @@ -68,15 +68,13 @@ class ProjectsModel : public QAbstractListModel
/**
* \brief The ProjectModelTypes enum:
* - LocalProjectsModel always keeps all local projects and seek their mergin part when listProjectsByNameFinished
* - Created-, Shared-, and PublicProjectsModel does the opposite, keeps all mergin projects and seeks their local part in projects from LocalProjectsManager
* - Workspace-, and PublicProjectsModel does the opposite, keeps all mergin projects and seeks their local part in projects from LocalProjectsManager
* - EmptyProjectsModel is default state
*/
enum ProjectModelTypes
{
EmptyProjectsModel = 0, // default, holding no projects ~ invalid model
LocalProjectsModel,
CreatedProjectsModel,
SharedProjectsModel,
PublicProjectsModel,
WorkspaceProjectsModel,
RecentProjectsModel
Expand Down
Loading

1 comment on commit e2e5448

@inputapp-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS - version 23.12.493811 just submitted!

Please sign in to comment.