mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-18 07:55:21 +01:00
Show keyboard instructions if no mouse / warning on custom repo
This commit is contained in:
parent
f5390c821a
commit
b34d2a54af
4 changed files with 32 additions and 2 deletions
|
@ -11,7 +11,7 @@ set(IMAGER_VERSION_MAJOR 1)
|
|||
set(IMAGER_VERSION_MINOR 6)
|
||||
set(IMAGER_VERSION_STR "${IMAGER_VERSION_MAJOR}.${IMAGER_VERSION_MINOR}.3")
|
||||
set(IMAGER_VERSION_CSV "${IMAGER_VERSION_MAJOR},${IMAGER_VERSION_MINOR},3,0")
|
||||
add_definitions(-DIMAGER_VERSION_STR="${IMAGER_VERSION_STR}beta")
|
||||
add_definitions(-DIMAGER_VERSION_STR="${IMAGER_VERSION_STR}")
|
||||
add_definitions(-DIMAGER_VERSION_CSV=${IMAGER_VERSION_CSV})
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
|
|
@ -1213,6 +1213,16 @@ QString ImageWriter::detectPiKeyboard()
|
|||
return QString();
|
||||
}
|
||||
|
||||
bool ImageWriter::hasMouse()
|
||||
{
|
||||
return !_embeddedMode || QFile::exists("/dev/input/mouse0");
|
||||
}
|
||||
|
||||
bool ImageWriter::customRepo()
|
||||
{
|
||||
return _repo.toString() != OSLIST_URL;
|
||||
}
|
||||
|
||||
void MountUtilsLog(std::string msg) {
|
||||
Q_UNUSED(msg)
|
||||
//qDebug() << "mountutils:" << msg.c_str();
|
||||
|
|
|
@ -119,9 +119,11 @@ public:
|
|||
Q_INVOKABLE QString getCurrentKeyboard();
|
||||
Q_INVOKABLE void changeLanguage(const QString &newLanguageName);
|
||||
Q_INVOKABLE void changeKeyboard(const QString &newKeymapLayout);
|
||||
Q_INVOKABLE bool customRepo();
|
||||
|
||||
void replaceTranslator(QTranslator *trans);
|
||||
QString detectPiKeyboard();
|
||||
Q_INVOKABLE bool hasMouse();
|
||||
|
||||
signals:
|
||||
/* We are emiting signals with QVariant as parameters because QML likes it that way */
|
||||
|
|
20
main.qml
20
main.qml
|
@ -83,7 +83,7 @@ ApplicationWindow {
|
|||
anchors.rightMargin: 50
|
||||
anchors.leftMargin: 50
|
||||
|
||||
rows: 4
|
||||
rows: 6
|
||||
columns: 3
|
||||
columnSpacing: 25
|
||||
|
||||
|
@ -269,6 +269,24 @@ ApplicationWindow {
|
|||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
Layout.columnSpan: 3
|
||||
color: "#ffffff"
|
||||
font.pixelSize: 18
|
||||
font.family: roboto.name
|
||||
visible: imageWriter.isEmbeddedMode() && imageWriter.customRepo()
|
||||
text: qsTr("Using custom repository: %1").arg(imageWriter.constantOsListUrl())
|
||||
}
|
||||
|
||||
Text {
|
||||
Layout.columnSpan: 3
|
||||
color: "#ffffff"
|
||||
font.pixelSize: 18
|
||||
font.family: roboto.name
|
||||
visible: !imageWriter.hasMouse()
|
||||
text: qsTr("Keyboard navigation: <tab> navigate to next button <space> press button/select item <arrow up/down> go up/down in lists")
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: langbar
|
||||
Layout.columnSpan: 3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue