Skip to content

Commit

Permalink
added buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
JvanKatwijk committed Dec 21, 2024
1 parent 783049c commit 0ee4bae
Show file tree
Hide file tree
Showing 15 changed files with 99 additions and 71 deletions.
2 changes: 1 addition & 1 deletion includes/support/skin-handler.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
/*
* Copyright (C) 2016
* Copyright (C) 2015 .. 2024
* Jan van Katwijk (J.vanKatwijk@gmail.com)
* Lazy Chair Computing
*
Expand Down
10 changes: 10 additions & 0 deletions qt-dab-6.9/forms-v7/config-helper.ui
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,16 @@
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QCheckBox" name="auto_http">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If this checkbox is set, then Qt-DAB will (try to) start up the http handler (i.e. the map handler) on the next invocation of the program.&lt;/p&gt;&lt;p&gt;Of course, it will only work if&lt;/p&gt;&lt;p&gt;(a) the local position is filled in, and &lt;/p&gt;&lt;p&gt;(b) the database with TII data is accessible&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>auto fttp</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="logger_selector">
<property name="toolTip">
Expand Down
4 changes: 3 additions & 1 deletion qt-dab-6.9/forms-v7/new-display/display-widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ int sliderValue;
setMarkers = value_i (dabSettings_p,
DISPLAY_WIDGET_SETTINGS,
"setMarkers", 0) != 0;
show_marksButton -> setStyleSheet ("color:cyan");
show_marksButton -> setStyleSheet ("color:yellow");
QString qss = QString ("background-color: QColor (Qt::yellow), QColor(Qt::black)");
show_marksButton -> setStyleSheet (qss);
if (setMarkers)
show_marksButton -> setText ("no markers");
else
Expand Down
28 changes: 14 additions & 14 deletions qt-dab-6.9/forms-v7/new-display/scopewidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>835</width>
<width>774</width>
<height>607</height>
</rect>
</property>
Expand Down Expand Up @@ -312,19 +312,6 @@
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0" colspan="2">
Expand Down Expand Up @@ -494,6 +481,19 @@
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
Expand Down
6 changes: 3 additions & 3 deletions qt-dab-6.9/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
/*
* Copyright (C) 2014 .. 2023
* Copyright (C) 2014 .. 2024
* Jan van Katwijk (J.vanKatwijk@gmail.com)
* Lazy Chair Computing
*
Expand Down Expand Up @@ -136,14 +136,14 @@ QTranslator theTranslator;
#endif

dabSettings -> beginGroup ("SKIN_HANDLING");
QString skin = dabSettings -> value ("skin", "Combinear"). toString ();
QString skin = dabSettings -> value ("skin", "globstyle"). toString ();
dabSettings -> endGroup ();

skin = skin == "Combinear" ? ":res/Combinear.qss" :
skin == "globstyle" ? ":res/globstyle.qss":
skin == "Adaptic" ? ":res/Adaptic.qss" :
skin == "Darkeum" ? ":res/Darkeum.qss" :
skin == "EasyCode" ? ":res/EasyCode.qss":
skin == "globstyle" ? ":res/globstyle.qss" :
skin == "Diffnes" ? ":res/Diffnes.qss" : "";

QApplication a (argc, argv);
Expand Down
8 changes: 4 additions & 4 deletions qt-dab-6.9/qt-dab-6.9-build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ cp ../res/radio-pictures/qt-dab-6.9-128x128.png appdir/usr/share/icons/hicolor/1
cp ../res/radio-pictures/qt-dab-6.9-256x256.png appdir/usr/share/icons/hicolor/256x256/apps/

touch appdir/qt-dab-6.9.png

wget -c https://github.com/$(wget -q https://github.com/probonopd/go-appimage/releases/expanded_assets/continuous -O - | grep "appimagetool-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2)
chmod +x appimagetool-*.AppImage
wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
chmod a+x linuxdeployqt*.AppImage
unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
./appimagetool-*.AppImage -s deploy appdir/usr/share/applications/*.desktop # Bundle EVERYTHING
./linuxdeployqt*.AppImage ./appdir/usr/share/applications/* -bundle-non-qt-libs -no-translations
./linuxdeployqt*.AppImage --appimage-extract
find appdir/usr/plugins/ -type f -exec squashfs-root/usr/bin/patchelf --set-rpath '$ORIGIN/../../lib' {} \;
chmod a+x appimage/* ; rm appdir/AppRun ; cp appimage/* appdir/
export PATH=squashfs-root/usr/bin/:$PATH
Expand Down
26 changes: 0 additions & 26 deletions qt-dab-6.9/qt-dab-6.9-build.txt-xxx

This file was deleted.

20 changes: 10 additions & 10 deletions qt-dab-6.9/qt-dab-6.9.pro
Original file line number Diff line number Diff line change
Expand Up @@ -522,20 +522,20 @@ isEmpty(GITHASHSTRING) {
# DEFINES += __THREADED_BACKEND
#
#for win32, comment out the lines above
equals (QT_MAJOR_VERSION, 5) {
TARGET = qt-dab32-qt5-6.9V3
}
else {
TARGET = qt-dab32-qt6-6.9V3
}
CONFIG += dabstick-win-v3
# equals (QT_MAJOR_VERSION, 5) {
# TARGET = qt-dab-qt5-6.9
# TARGET = qt-dab32-qt5-6.9V3
# }
# else {
# TARGET = qt-dab-qt6-6.9
# TARGET = qt-dab32-qt6-6.9V3
# }
# CONFIG += dabstick-win-v4
# CONFIG += dabstick-win-v3
equals (QT_MAJOR_VERSION, 5) {
TARGET = qt-dab32-qt5-6.9
}
else {
TARGET = qt-dab32-qt6-6.9
}
CONFIG += dabstick-win-v4
CONFIG += airspy-2
CONFIG += spyServer-16
CONFIG += spyServer-8
Expand Down
22 changes: 18 additions & 4 deletions qt-dab-6.9/qt-dab-6.9.pro-32
Original file line number Diff line number Diff line change
Expand Up @@ -870,13 +870,27 @@ local-audio {
PKGCONFIG += portaudio-2.0
DEFINES += QT_AUDIO
QT += multimedia
HEADERS += ../includes/output/Qt-audio.h \
../includes/output/Qt-audiodevice.h \

equals (QT_MAJOR_VERSION, 5) {
INCLUDEPATH += ../includes/output/Qt5
HEADERS += ../includes/output/Qt5/Qt-audio.h \
../includes/output/Qt5/Qt-audiodevice.h \
../includes/output/audiosink.h
SOURCES += ../src/output/Qt5/Qt-audio.cpp \
../src/output/Qt5/Qt-audiodevice.cpp \
../src/output/audiosink.cpp
LIBS += -lportaudio
} else {
INCLUDEPATH += ../includes/output/Qt6
HEADERS += ../includes/output/Qt6/Qt-audio.h \
../includes/output/Qt6/Qt-audiodevice.h \
../includes/output/audiosink.h
SOURCES += ../src/output/Qt-audio.cpp \
../src/output/Qt-audiodevice.cpp \
SOURCES += ../src/output/Qt6/Qt-audio.cpp \
../src/output/Qt6/Qt-audiodevice.cpp \
../src/output/audiosink.cpp
LIBS += -lportaudio
}

}

datastreamer {
Expand Down
25 changes: 19 additions & 6 deletions qt-dab-6.9/qt-dab-6.9.pro-64
Original file line number Diff line number Diff line change
Expand Up @@ -855,12 +855,25 @@ local-audio {
PKGCONFIG += portaudio-2.0
DEFINES += QT_AUDIO
QT += multimedia
HEADERS += ../includes/output/Qt-audio.h \
../includes/output/Qt-audiodevice.h \
../includes/output/audiosink.h
SOURCES += ../src/output/Qt-audio.cpp \
../src/output/Qt-audiodevice.cpp \
../src/output/audiosink.cpp
equals (QT_MAJOR_VERSION, 5) {
INCLUDEPATH += ../includes/output/Qt5
HEADERS += ../includes/output/Qt5/Qt-audio.h \
../includes/output/Qt5/Qt-audiodevice.h \
../includes/output/audiosink.h
SOURCES += ../src/output/Qt5/Qt-audio.cpp \
../src/output/Qt5/Qt-audiodevice.cpp \
../src/output/audiosink.cpp
LIBS += -lportaudio
} else {
INCLUDEPATH += ../includes/output/Qt6
HEADERS += ../includes/output/Qt6/Qt-audio.h \
../includes/output/Qt6/Qt-audiodevice.h \
../includes/output/audiosink.h
SOURCES += ../src/output/Qt6/Qt-audio.cpp \
../src/output/Qt6/Qt-audiodevice.cpp \
../src/output/audiosink.cpp
LIBS += -lportaudio
}
}

datastreamer {
Expand Down
3 changes: 2 additions & 1 deletion qt-dab-6.9/radio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,8 @@ void RadioInterface::doStart_direct () {


startChannel (channelSelector -> currentText ());
int auto_http = value_i (dabSettings_p, DAB_GENERAL, "auto_http", 0);
int auto_http = value_i (dabSettings_p, CONFIG_HANDLER,
"auto_http", 0);
if ((auto_http != 0) && (localPos. latitude != 0)) {
bool succ = autoStart_http ();
if (succ)
Expand Down
13 changes: 13 additions & 0 deletions qt-dab-6.9/support/config-handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ int index_for_key (int key) {
b = value_i (dabSettings, CONFIG_HANDLER, "audioServices_only", 1);
this -> audioServices_only -> setChecked (b);

b = value_i (dabSettings, CONFIG_HANDLER, "auto_http", 9) != 0;
this -> auto_http -> setChecked (b);


#ifndef __MSC_THREAD__
for (int i = 0; decoders [i]. decoderName != ""; i ++)
this -> decoderSelector -> addItem (decoders [i]. decoderName);
Expand All @@ -184,6 +188,8 @@ int index_for_key (int key) {
myRadioInterface, &RadioInterface::handle_tiiThreshold);
connect (pathButton, &QPushButton::clicked,
this, &configHandler::handle_pathButton);
connect (auto_http, &QCheckBox::stateChanged,
this, &configHandler::handle_auto_http);
set_Colors ();
}

Expand Down Expand Up @@ -877,9 +883,16 @@ QString dir =

void configHandler::handle_audioServices_only (int state) {
uint8_t x = audioServices_only -> isChecked ();
(void)state;
store (dabSettings, CONFIG_HANDLER, "audioServices_only", x);
}

bool configHandler::get_audioServices_only () {
return audioServices_only -> isChecked ();
}

void configHandler::handle_auto_http (int state) {
uint8_t x = auto_http -> isChecked ();
(void)state;
store (dabSettings, CONFIG_HANDLER, "auto_http", x);
}
1 change: 1 addition & 0 deletions qt-dab-6.9/support/config-handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ private slots:
void handle_tiiThreshold (int);
void handle_pathButton ();
void handle_audioServices_only (int);
void handle_auto_http (int);

signals:
void selectDecoder (int);
Expand Down
Binary file modified res/read_me/qt-dab-6.9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/support/skin-handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@

skins = QStringList();
skins << "skins" << "no skin" <<
"globstyle" <<
"Adaptic" <<
"Combinear" <<
"Darkeum" <<
"EasyCode" <<
"globstyle" <<
"Diffnes";

skinList. setStringList (skins);
Expand Down

0 comments on commit 0ee4bae

Please sign in to comment.