Commit 678444a2 authored by Langston Ball's avatar Langston Ball

refs #1108 - various minor fixes for qorbiter.

parent 79bda144
# This file is used to ignore files which are generated
# ----------------------------------------------------------------------------
*~
*.autosave
*.a
*.core
*.moc
*.o
*.obj
*.orig
*.rej
*.so
*.so.*
*_pch.h.cpp
*_resource.rc
*.qm
.#*
*.*#
core
!core/
tags
.DS_Store
.directory
*.debug
Makefile*
*.prl
*.app
moc_*.cpp
ui_*.h
qrc_*.cpp
Thumbs.db
*.res
*.rc
/.qmake.cache
/.qmake.stash
# qtcreator generated files
*.pro.user*
# xemacs temporary files
*.flc
# Vim temporary files
.*.swp
# Visual Studio generated files
*.ib_pdb_index
*.idb
*.ilk
*.pdb
*.sln
*.suo
*.vcproj
*vcproj.*.*.user
*.ncb
*.sdf
*.opensdf
*.vcxproj
*vcxproj.*
# MinGW generated files
*.Debug
*.Release
# Python byte code
*.pyc
# Binaries
# --------
*.dll
*.exe
This diff is collapsed.
import QtQuick 2.7
Page1Form {
button1.onClicked: {
console.log("Button 1 clicked.");
}
button2.onClicked: {
console.log("Button 2 clicked.");
}
}
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.0
Item {
property alias button1: button1
property alias button2: button2
RowLayout {
anchors.centerIn: parent
Button {
id: button1
text: qsTr("Press Me 1")
}
Button {
id: button2
text: qsTr("Press Me 2")
}
}
}
unix:!android {
isEmpty(target.path) {
qnx {
target.path = /tmp/$${TARGET}/bin
} else {
target.path = /opt/$${TARGET}/bin
}
export(target.path)
}
INSTALLS += target
}
export(INSTALLS)
#include <QGuiApplication>
#include <QQmlApplicationEngine>
int main(int argc, char *argv[])
{
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
engine.load(QUrl(QLatin1String("qrc:/main.qml")));
return app.exec();
}
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.0
ApplicationWindow {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
SwipeView {
id: swipeView
anchors.fill: parent
currentIndex: tabBar.currentIndex
Page1 {
}
Page {
Label {
text: qsTr("Second page")
anchors.centerIn: parent
}
}
}
footer: TabBar {
id: tabBar
currentIndex: swipeView.currentIndex
TabButton {
text: qsTr("First")
}
TabButton {
text: qsTr("Second")
}
}
}
<RCC>
<qresource prefix="/">
<file>main.qml</file>
<file>Page1.qml</file>
<file>Page1Form.ui.qml</file>
</qresource>
</RCC>
......@@ -3,7 +3,7 @@ source setEnv.sh
if [ -d "rpi-tools/$QT_VERSION" ]; then
#make clean -j8
cd rpi-tools/$QT_VERSION
./configure -release -force-debug-info -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=$STARTPATH/rpi-tools/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot $STARTPATH/rpi-tools/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix $STARTPATH/qt/qt5pi -hostprefix $STARTPATH/qt/qt5 -c++11 -nomake examples -v -I $STARTPATH/rpi-tools/sysroot/opt/vc/include/ -I $STARTPATH/rpi-tools/sysroot/opt/vc/include/interface/vcos/pthreads/ -I $STARTPATH/rpi-tools/sysroot/opt/vc/include/interface/vcos/ -skip webkit
./configure -release -force-debug-info -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=$STARTPATH/rpi-tools/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot $STARTPATH/rpi-tools/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix $STARTPATH/qt/qt5pi -hostprefix $STARTPATH/qt/qt5 -c++11 -nomake examples -v -I $STARTPATH/rpi-tools/sysroot/opt/vc/include/ -I $STARTPATH/rpi-tools/sysroot/opt/vc/include/interface/vcos/pthreads/ -I $STARTPATH/rpi-tools/sysroot/opt/vc/include/interface/vcos/ -plugin-sql-mysql
#make module-qtdeclarative -j8
echo "You Have 10 seconds to cancel auto build"
sleep 10
......
......@@ -32,7 +32,7 @@
</activity>
</application>
<supports-screens android:smallScreens="true" android:largeScreens="true" android:normalScreens="true" android:anyDensity="true"/>
<uses-sdk android:targetSdkVersion="10" android:minSdkVersion="10"/>
<uses-sdk android:targetSdkVersion="23" android:minSdkVersion="16"/>
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
......
......@@ -2931,12 +2931,54 @@ void DCE::qOrbiter::GetMediaAttributeGrid(QString qs_fk_fileno)
int placeholder;
//QApplication::processEvents(QEventLoop::AllEvents);
#ifdef debug
qDebug() << details.join("||");
#endif
bool next = false;
for(auto key : details){
if(next==true){
emit newFileDetailAttribute(ATTRIBUTETYPE_Performer_CONST, -1 , key );
next=false;
}
if(key=="PERFORMER"){
next=true;
}
}
next = false;
for(auto key : details){
if(next==true){
emit newFileDetailAttribute(ATTRIBUTETYPE_Studio_CONST , -1 , key );
next=false;
}
if(key=="STUDIO"){
next=true;
}
}
next = false;
for(auto key : details){
if(next==true){
emit newFileDetailAttribute(ATTRIBUTETYPE_Genre_CONST, -1 , key );
next=false;
}
if(key=="GENRE"){
next=true;
}
}
next = false;
for(auto key : details){
if(next==true){
emit newFileDetailAttribute(ATTRIBUTETYPE_ComposerWriter_CONST, -1 , key );
next=false;
}
if(key=="COMPOSER/WRITER"){
next=true;
}
}
placeholder = details.indexOf("TITLE");
if(placeholder != -1) { emit fd_titleChanged(details.at(placeholder+1)); }
if(placeholder != -1) { emit fd_mediaTitleChanged(details.at(placeholder+1)); emit newFileDetailAttribute( ATTRIBUTETYPE_Title_CONST, -1, details.at(placeholder+1) ); }
placeholder = details.indexOf("SYNOPSIS");
if(placeholder != -1) { emit fd_synopChanged(details.at(placeholder+1)); }
......@@ -2945,13 +2987,13 @@ void DCE::qOrbiter::GetMediaAttributeGrid(QString qs_fk_fileno)
if(placeholder != -1) { emit fd_imageUrlChanged(QString(details.at(placeholder+1))); }
placeholder = details.indexOf("EPISODE");
if(placeholder != -1) { emit fd_episodeChanged(details.at(placeholder+1) ); }
if(placeholder != -1) { emit fd_episodeChanged(details.at(placeholder+1) ); emit newFileDetailAttribute( ATTRIBUTETYPE_Episode_CONST, -1, details.at(placeholder+1) ); }
placeholder = details.indexOf("RUN TIME");
if(placeholder != -1) { emit fd_runtimeChanged(details.at(placeholder+1) ); }
if(placeholder != -1) { emit fd_runtimeChanged(details.at(placeholder+1) ); emit newFileDetailAttribute(ATTRIBUTETYPE_Run_Time_CONST, -1, details.at(placeholder+1) ); }
placeholder = details.indexOf("RATING");
if(placeholder != -1) { emit fd_ratingChanged(details.at(placeholder+1) ); }
if(placeholder != -1) { emit fd_ratingChanged(details.at(placeholder+1) ); emit newFileDetailAttribute(ATTRIBUTETYPE_Rated_CONST, -1,details.at(placeholder+1) ); }
placeholder = details.indexOf("EPISODE NUMBER");
if(placeholder != -1) { emit newFileDetailAttribute(ATTRIBUTETYPE_Episode_Number_CONST, -1,details.at(placeholder+1) ); }
......@@ -2960,7 +3002,7 @@ void DCE::qOrbiter::GetMediaAttributeGrid(QString qs_fk_fileno)
if(placeholder != -1) {emit newFileDetailAttribute(ATTRIBUTETYPE_Track_CONST, -1 ,details.at(placeholder+1) ); }
placeholder = details.indexOf("RELEASE DATE");
if(placeholder != -1) { emit newFileDetailAttribute(ATTRIBUTETYPE_Release_Date_CONST, -1,details.at(placeholder+1) ); }
if(placeholder != -1) { emit newFileDetailAttribute(ATTRIBUTETYPE_Release_Date_CONST, -1, details.at(placeholder+1) ); }
placeholder = details.indexOf("SEASON NUMBER");
if(placeholder != -1) {
......@@ -3043,6 +3085,7 @@ void DCE::qOrbiter::GetMediaAttributeGrid(QString qs_fk_fileno)
DataGridCell *pCell;
for(MemoryDataTable::iterator it=pDataGridTable->m_MemoryDataTable.begin();it!=pDataGridTable->m_MemoryDataTable.end();++it)
{
/*! \todo - add way to cancel out of this if user closes ui */
pCell = it->second;
// const char *pPath = pCell->GetImagePath();
......@@ -3050,10 +3093,12 @@ void DCE::qOrbiter::GetMediaAttributeGrid(QString qs_fk_fileno)
QString attributeType = pCell->m_mapAttributes_Find("Title").c_str();
QString attribute = pCell->m_mapAttributes_Find("Name").c_str();
cellfk = pCell->GetValue();
qDebug() << Q_FUNC_INFO << attribute;
#ifdef debug
emit commandResponseChanged();
#endif
int at = cellfk.remove("!A").toInt();
qDebug() << attributeType;
if(attributeType == "Program") { emit fd_programChanged(attribute); emit newFileDetailAttribute(ATTRIBUTETYPE_Program_CONST, at,attribute ); }
else if(attributeType == "Title") { emit fd_mediaTitleChanged(attribute); }
else if(attributeType == "Channel") { emit fd_chanIdChanged(attribute); emit newFileDetailAttribute(ATTRIBUTETYPE_TV_Channel_ID_CONST, at,attribute ); }
......@@ -3263,7 +3308,6 @@ void DCE::qOrbiter::GetScreenSaverImages()
emit screenSaverImages(tempList);
tempList.detachShared();
tempList.clear();
}
void DCE::qOrbiter::BindMediaRemote(bool onoff)
......@@ -5522,6 +5566,7 @@ void qOrbiter::getAttributeImage(QString param)
{
CMD_Get_Attribute_Image attributeImage(m_dwPK_Device , iPK_Device_MediaPlugin );
}
......
......@@ -56,6 +56,7 @@ void FileDetailsClass::handleNewFileAttribute(int attribType, int attribute, QSt
case ATTRIBUTETYPE_Album_Artist_CONST:m_albumArtistList.append(new FileDetailsObject(attribute, val, attribType) ); emit albumArtistChanged(); break;
case ATTRIBUTETYPE_Season_Number_CONST:m_singleItemMap.insert(attribType, new FileDetailsObject(attribute, val, attribType) ); emit seasonChanged(); break;
case ATTRIBUTETYPE_Release_Date_CONST:m_singleItemMap.insert(attribType, new FileDetailsObject(attribute, val, attribType) ); emit releaseDateChanged(); break;
case ATTRIBUTETYPE_Run_Time_CONST:setRunTime(val); /*m_singleItemMap.insert(attribType, new FileDetailsObject(attribute, val, attribType) );*/ ; break;
break;
default:
qDebug() << " No handler for attribute " << attribute << " value:: " << val;
......
......@@ -51,7 +51,7 @@ class FileDetailsObject : public QObject
Q_PROPERTY(int attributeType READ attributeType WRITE setAttributeType NOTIFY attributeTypeChanged)
public:
FileDetailsObject(int a, QString b, int c):m_attributeValue(a), m_attribute(b), m_attributeType(c) { }
FileDetailsObject(int attributeId, QString attribute, int attributeType):m_attributeValue(attributeId), m_attribute(attribute), m_attributeType(attributeType) { }
FileDetailsObject(){}
QString attribute() const{ return m_attribute; }
......@@ -334,13 +334,19 @@ public slots:
void setPerformers (const QString inc_performer) {performers << inc_performer; emit performersChanged();}
void setPerformers (const QString inc_performer) {
m_performerList.append( new FileDetailsObject(-1, inc_performer, ATTRIBUTETYPE_Performer_CONST ) );
emit performersChanged();
}
QString getPerformers() {performerlist = performers.join(" | "); return performerlist;}
QStringList getPerformerList() {return performers;}
//QQmlListProperty for performers
FileDetailsObject * performer(int idx) {return m_performerList.at(idx);}
int performerCount() { return m_performerList.size();}
QQmlListProperty <FileDetailsObject> performersList(){
return QQmlListProperty<FileDetailsObject>(this, m_performerList);
}
return QQmlListProperty<FileDetailsObject>(this, this, &FileDetailsClass::performerCount, &FileDetailsClass::performer); }
QQmlListProperty<FileDetailsObject> albumArtistList(){
return QQmlListProperty<FileDetailsObject>(this, m_albumArtistList);
......@@ -395,7 +401,7 @@ public slots:
inline QString getScreenShot() {return screenshot;}
inline QString getFilename() {return filename;}
inline void setFilename (const QString f) {filename = f; emit fileNameChanged();}
inline void setFilename (const QString f) {filename = QString(f).remove("!F"); emit fileNameChanged();}
inline QString getPath() {return path;}
inline void setPath (const QString f) {path = f; emit pathChanged();}
......@@ -419,6 +425,10 @@ private:
QString m_runningTime;
//static functions for qqmllist property
static int performerCount(QQmlListProperty<FileDetailsObject>* list) { return reinterpret_cast<FileDetailsClass*>(list->data)->performerCount(); }
static FileDetailsObject * performer(QQmlListProperty<FileDetailsObject> * list, int idx) { return reinterpret_cast<FileDetailsClass*>(list->data)->performer(idx); }
};
#endif // FILEDETAILSCLASS_H
......@@ -38,7 +38,6 @@ bool GenericModelItem::setData(int role, const QVariant &value)
return false;
}
m_data.insert(role, value);
emit dataChanged();
return true;
......
......@@ -263,6 +263,7 @@ int main(int argc, char* argv[])
string screen = "";
int PK_Device=-1;
int screenSize=-1;
bool clearSettings=false;
string sLogger="stdout";
bool bLocalMode=false,bError=false; // An error parsing the command line
char c;
......@@ -304,6 +305,9 @@ int main(int argc, char* argv[])
case 'z':
screenSize=atoi(argv[++optnum]);
break;
case 'c':
settings.destroySettingsData();
break;
case 'x':
overrideDir= QString::fromStdString( argv[++optnum]);
break;
......@@ -324,6 +328,7 @@ int main(int argc, char* argv[])
<< "-o --Switch for frameless MD and desktops. " << endl
<< "-s --Switch for fullscreen. " << endl
<< "-z --Screen size setting for testing 4 - small \n 7 - medium\n 10 - large " << endl
<< "-c --Clear existing settings" << endl
<< "-x --Point to custom skins directory. " << endl;
}
......
#include "fontshelper.h"
#include "qdebug.h"
#include "qapplication.h"
#include "qfont.h"
FontsHelper::FontsHelper(QObject *parent) : QObject(parent)
......
......@@ -122,14 +122,10 @@ orbiterWindow::orbiterWindow(int deviceid, std::string routerip, bool fullScreen
break;
}
// QFileSelector sel(winSelector);
// qDebug() << sel.allSelectors();
} else {
#ifdef ANDROID
// mainView.showFullScreen();
mainView.showMaximized();
#elif defined(Q_OS_IOS)
// mainView.showFullScreen();
#else
......
......@@ -46,7 +46,7 @@
#include "androidsystem.h"
#include <QDebug>
#include <QApplication>
#include <QGuiApplication>
#include <QUrl>
static JavaVM *m_pvm = 0;
......
......@@ -41,7 +41,7 @@ linux-rasp-pi-g++{
}
android-g++{
DESTDIR=$$PWD/../../../platforms/Android/androidPlugins/Qt5/armeabi-v7a/ #On Android we have a special case where we need to split locations in necessitas of the lib and qmldir, unlike desktop versions.
DESTDIR=$$[QT_INSTALL_PREFIX]/qml/AudioVisual
}
macx-g++{
......@@ -123,7 +123,7 @@ HEADERS += \
!equals(_PRO_FILE_PWD_, $$DESTDIR) {
android-g++{
QMLDIR_TARGET=../../../platforms/Android/androidComponents/AudioVisual/qmldir
QMLDIR_TARGET=$$DESTDIR/qmldir
}
linux-g++{
......
......@@ -418,6 +418,7 @@ void MediaManagerBase::pluginNotifyEnd(bool withError)
void MediaManagerBase::playbackInfoUpdated(QString mediaTitle, QString mediaSubTitle, QString name, int screen)
{
if(mediaPlayer)
mediaPlayer->updateMetadata(mediaTitle, mediaSubTitle, name, screen);
}
......
......@@ -3,10 +3,9 @@
omxdbusplayerinterface::omxdbusplayerinterface()
{
qDebug() << Q_FUNC_INFO;
#ifdef RPI
setUsingExternalMediaPlayer(true);
connect(this, &omxdbusplayerinterface::readyForConnections, this, &omxdbusplayerinterface::setConnections);
#ifdef RPI
m_omxProxy = new OmxInterface(this);
#endif
......
......@@ -18,6 +18,7 @@ ApplicationWindow {
width: manager.appWidth
onWidthChanged: console.log("window size"+manager.appWidth+ "w x "+manager.appHeight+"h")
visible: true
color:"transparent"
property string appEntryQml: manager.skinEntryFile
property int currentStage:deviceSettingsReady+orbiterReady
......
......@@ -13,7 +13,7 @@ Item{
Rectangle{
id:fil
anchors.fill: parent
color: appStyle.button_system_color
color: appstyle.button_system_color
opacity:.65
}
......@@ -47,7 +47,7 @@ Item{
Rectangle{
id:optionContainer
gradient:appStyle.buttonGradient
gradient:appstyle.buttonGradient
width: scaleX(15)
anchors{
......
......@@ -26,7 +26,7 @@ Item {
ButtonSq{
buttontext: "Play All"
buttontextfontsize: scaleY(5)
height: appStyle.stdbuttonh
height: appstyle.stdbuttonh
width: parent.width
buttontextbold: false
imgSource: ""
......@@ -37,7 +37,7 @@ Item {
StyledButton{
buttonText: "Attribute Sort"
height: appStyle.stdbuttonh
height: appstyle.stdbuttonh
width: parent.width
onActivated:{filterTarget.currentModel = attribfilter; attributeSelector.state="hidden"}
}
......
......@@ -4,10 +4,10 @@ import "../../../../skins-common/lib/handlers"
Item {
id:audio_remote
width: manager.appWidth
height:appStyle.toolbarButtonHeight
height:appstyle.toolbarButtonHeight
Rectangle{
anchors.fill: parent
color: appStyle.toolbarBgColor
color: appstyle.toolbarBgColor
opacity: .25
}
......