Compare commits

..

1 commit

Author SHA1 Message Date
Jan-Martin Raemer
849cc91da8 mayas piggy version 2023-11-12 15:47:16 +01:00
10 changed files with 31 additions and 72 deletions

View file

@ -97,7 +97,7 @@ void EnergySaver::initAdroidLocks()
QAndroidJniObject powerMgr = activity.callObjectMethod("getSystemService", "(Ljava/lang/String;)Ljava/lang/Object;",serviceName.object<jobject>());
if ( powerMgr.isValid() )
{
jint levelAndFlags = QAndroidJniObject::getStaticField<jint>("android/os/PowerManager","SCREEN_DIM_WAKE_LOCK");
jint levelAndFlags = QAndroidJniObject::getStaticField<jint>("android/os/PowerManager","PARTIAL_WAKE_LOCK");
QAndroidJniObject tag = QAndroidJniObject::fromString( "My Tag" );

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 7.0.1, 2022-07-15T15:40:08. -->
<!-- Written by QtCreator 9.0.2, 2023-11-03T13:50:06. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
@ -54,6 +54,7 @@
<value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
<value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
<value type="bool" key="EditorConfiguration.tintMarginArea">true</value>
</valuemap>
</data>
<data>
@ -219,18 +220,6 @@
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">RemoteLinux.CheckForFreeDiskSpaceStep</value>
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedFiles"/>
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedHosts"/>
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedRemotePaths"/>
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedSysroots"/>
<value type="QString" key="RemoteLinux.CheckForFreeDiskSpaceStep.PathToCheck">/</value>
<value type="qlonglong" key="RemoteLinux.CheckForFreeDiskSpaceStep.RequiredSpace">5242880</value>
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedLocalTimes"/>
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedRemoteTimes"/>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">RemoteLinux.KillAppStep</value>
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedFiles"/>
@ -240,7 +229,7 @@
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedLocalTimes"/>
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedRemoteTimes"/>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.2">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">RemoteLinux.RsyncDeployStep</value>
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedFiles"/>
@ -251,7 +240,7 @@
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedRemoteTimes"/>
<value type="QString" key="RemoteLinux.RsyncDeployStep.Flags">-av</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">3</value>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
@ -263,62 +252,21 @@
</valuemap>
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="QString" key="Analyzer.Perf.CallgraphMode">dwarf</value>
<valuelist type="QVariantList" key="Analyzer.Perf.Events">
<value type="QString">cpu-cycles</value>
</valuelist>
<value type="QString" key="Analyzer.Perf.SampleMode">-F</value>
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">0</value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="QString">0</value>
<value type="QString">1</value>
<value type="QString">2</value>
<value type="QString">3</value>
<value type="QString">4</value>
<value type="QString">5</value>
<value type="QString">6</value>
<value type="QString">7</value>
<value type="QString">8</value>
<value type="QString">9</value>
<value type="QString">10</value>
<value type="QString">11</value>
<value type="QString">12</value>
<value type="QString">13</value>
<value type="QString">14</value>
</valuelist>
<valuelist type="QVariantList" key="CustomOutputParsers"/>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1">
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="QString">0</value>
<value type="QString">1</value>
<value type="QString">2</value>
<value type="QString">3</value>
<value type="QString">4</value>
<value type="QString">5</value>
<value type="QString">6</value>
<value type="QString">7</value>
<value type="QString">8</value>
<value type="QString">9</value>
<value type="QString">10</value>
<value type="QString">11</value>
<value type="QString">12</value>
<value type="QString">13</value>
<value type="QString">14</value>
</valuelist>
<valuelist type="QVariantList" key="CustomOutputParsers"/>
<value type="int" key="PE.EnvironmentAspect.Base">1</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">RemoteLinux.CustomRunConfig</value>
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">LenaPi (on %{Device:Name})</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">RemoteLinuxRunConfiguration:/home/jmr/privat/src/LenaPi/LenaPi/LenaPi.pro</value>
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/home/jmr/privat/src/LenaPi/LenaPi/LenaPi.pro</value>
<value type="int" key="RemoteLinux.EnvironmentAspect.Version">1</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
@ -326,7 +274,7 @@
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.X11Forwarding">:0.0</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">2</value>
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
@ -532,8 +480,8 @@
<value type="QString">armeabi-v7a</value>
<value type="QString">armeabi</value>
</valuelist>
<value type="QString" key="AndroidDeviceSerialNumber">58009fc2</value>
<value type="int" key="AndroidVersion.ApiLevel">28</value>
<value type="QString" key="AndroidDeviceSerialNumber">A209G5H30201</value>
<value type="int" key="AndroidVersion.ApiLevel">30</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="QString" key="Analyzer.Perf.CallgraphMode">dwarf</value>
@ -542,6 +490,7 @@
</valuelist>
<value type="QString" key="Analyzer.Perf.SampleMode">-F</value>
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">0</value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="Android.PostStartShellCmdListKey">
@ -570,7 +519,7 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{73308c85-3272-4fe8-8c9f-0eb72285644f}</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
@ -717,6 +666,7 @@
</valuelist>
<value type="QString" key="Analyzer.Perf.SampleMode">-F</value>
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">0</value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="CustomOutputParsers"/>

View file

@ -60,7 +60,7 @@
application still try to draw after
"applicationStateChanged(Qt::ApplicationSuspended)"
signal is sent! -->
<meta-data android:name="android.app.background_running" android:value="false"/>
<meta-data android:name="android.app.background_running" android:value="true"/>
<!-- Background running -->
<!-- auto screen scale factor -->
<meta-data android:name="android.app.auto_screen_scale_factor" android:value="false"/>

View file

@ -36,7 +36,6 @@ void NavigationController::init(const QString &rootPath)
auto rootDir = QDir(rootPath);
if(!rootDir.exists()) return;
mRootPath = rootPath;
add(mRootPath, mRootItem);
mNavList->setModelItems(mRootItem->getChildren());

View file

@ -60,7 +60,13 @@ QString SettingsHandler::getShutdownScript() const
void SettingsHandler::initDefaults()
{
#ifdef ANDROID
// three out of four devices report '4' as QStandardPaths::MusicLocation
//mDefaults.insert(rootPath, "/storage/self/primary/Music");
mDefaults.insert(rootPath, QStandardPaths::writableLocation(QStandardPaths::MusicLocation));
#else
mDefaults.insert(rootPath, QStandardPaths::MusicLocation);
#endif
mDefaults.insert(enableEnergySaver, false);
mDefaults.insert(timeout, 60);
mDefaults.insert(shutdownScript, "/usr/local/sbin/do_shutdown.sh");

View file

@ -31,6 +31,7 @@ public:
QString getProfile() const;
bool isEnergySaverEnabled() const;
int getEnergySaverTimeout() const;
bool isVolumeControlsVisible() const;
QString getShutdownScript() const;

View file

@ -11,5 +11,6 @@
<file alias="icon_close">resources/close.png</file>
<file alias="icon_increase_volume">resources/speaker_high_volume.png</file>
<file alias="icon_decrease_volume">resources/speaker_low_volume.png</file>
<file>resources/pig.png</file>
</qresource>
</RCC>

View file

@ -15,6 +15,7 @@ Window {
anchors.fill: parent
z: -1
//source: "qrc:/resources/pig.png"
source: "qrc:/background"
}

View file

@ -21,6 +21,7 @@ bool UiStateModel::isShowQuitAppButton() const
bool UiStateModel::isShowVolumeControls() const
{
// return true; //comment in as workaround for maya pi
const auto & profileInfo = mProfileInfoMap[mProfile];
return profileInfo.isShowVolumeControls;
}

BIN
LenaPi/resources/pig.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB