diff --git a/gui acdc.png b/gui acdc.png index e89baca3bb0b84dcd0f2f212e35d38ca4d790f29..016c7e41d188d323f51c5d435b1a73e1e171e5c8 100644 Binary files a/gui acdc.png and b/gui acdc.png differ diff --git a/src/acdc.cpp b/src/acdc.cpp index 3cd353fc4c5a2bb87f58b73a654f3032518a2a72..73088d31080a626853149ffc950926fa8db16a82 100644 --- a/src/acdc.cpp +++ b/src/acdc.cpp @@ -23,6 +23,8 @@ Acdc::Acdc(CumbiaPool *cumbia_pool, QWidget *parent) : // cumbia connect(ui->cbShowUnits, SIGNAL(toggled(bool)), this, SLOT(m_show_units(bool))); m_show_units(false); + + connect(ui->bStopAll, SIGNAL(clicked()), this, SLOT(m_stop_all())); } Acdc::~Acdc() @@ -35,4 +37,18 @@ void Acdc::m_show_units(bool show) { l->setDisplayUnitEnabled(show); } +void Acdc::m_stop_all() { + QStringList tgts; + foreach(QGroupBox *gb, findChildren<QGroupBox *>(QRegularExpression("gbM\\d"))) { + foreach(QuInputOutput *io, gb->findChildren<QuInputOutput *>()) { + QString dev = io->source().section('/', 0, io->source().count('/') - 1); + tgts << dev + "->Stop"; + } + } + if(tgts.size() > 0) + tgts << "pos/dmrc/dmrc_pos.01->Stop"; + foreach(const QString &t, tgts) + printf("would execute \e[1;32m%s\e[0m\n", qstoc(t)); +} + diff --git a/src/acdc.h b/src/acdc.h index 65250d4b953649d2aa7e790afce331afb29b3531..79fa716f4d741448f7c536864a76721a67329bf8 100644 --- a/src/acdc.h +++ b/src/acdc.h @@ -24,6 +24,7 @@ public: private slots: void m_show_units(bool show); + void m_stop_all(); private: Ui::Acdc *ui; // cumbia diff --git a/src/acdc.ui b/src/acdc.ui index 65774772710b03ec48b174c312de456faddaa0e3..3302844881f08a15f2b55b20feeac2c3b4d355ca 100644 --- a/src/acdc.ui +++ b/src/acdc.ui @@ -28,7 +28,7 @@ <height>776</height> </rect> </property> - <widget class="QGroupBox" name="groupBox_9"> + <widget class="QGroupBox" name="gbM6"> <property name="geometry"> <rect> <x>500</x> @@ -203,7 +203,7 @@ </item> </layout> </widget> - <widget class="QGroupBox" name="groupBox_3"> + <widget class="QGroupBox" name="gbM8"> <property name="geometry"> <rect> <x>960</x> @@ -369,7 +369,7 @@ </item> </layout> </widget> - <widget class="QGroupBox" name="groupBox"> + <widget class="QGroupBox" name="gbM1"> <property name="geometry"> <rect> <x>76</x> @@ -584,7 +584,7 @@ <bool>true</bool> </property> </widget> - <widget class="QGroupBox" name="groupBox_2"> + <widget class="QGroupBox" name="gbM5"> <property name="geometry"> <rect> <x>179</x> @@ -750,7 +750,7 @@ </item> </layout> </widget> - <widget class="QGroupBox" name="groupBox_10"> + <widget class="QGroupBox" name="gbM7"> <property name="geometry"> <rect> <x>740</x> @@ -916,7 +916,7 @@ </item> </layout> </widget> - <widget class="QGroupBox" name="groupBox_8"> + <widget class="QGroupBox" name="gbM3"> <property name="geometry"> <rect> <x>789</x> @@ -946,6 +946,15 @@ </color> </brush> </colorrole> + <colorrole role="PlaceholderText"> + <brush brushstyle="NoBrush"> + <color alpha="128"> + <red>46</red> + <green>117</green> + <blue>182</blue> + </color> + </brush> + </colorrole> </active> <inactive> <colorrole role="WindowText"> @@ -966,6 +975,15 @@ </color> </brush> </colorrole> + <colorrole role="PlaceholderText"> + <brush brushstyle="NoBrush"> + <color alpha="128"> + <red>46</red> + <green>117</green> + <blue>182</blue> + </color> + </brush> + </colorrole> </inactive> <disabled> <colorrole role="WindowText"> @@ -986,6 +1004,15 @@ </color> </brush> </colorrole> + <colorrole role="PlaceholderText"> + <brush brushstyle="NoBrush"> + <color alpha="128"> + <red>46</red> + <green>117</green> + <blue>182</blue> + </color> + </brush> + </colorrole> </disabled> </palette> </property> @@ -1098,7 +1125,7 @@ </item> </layout> </widget> - <widget class="QGroupBox" name="groupBox_5"> + <widget class="QGroupBox" name="gbM4"> <property name="geometry"> <rect> <x>1070</x> @@ -1107,6 +1134,49 @@ <height>161</height> </rect> </property> + <property name="palette"> + <palette> + <active> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>46</red> + <green>117</green> + <blue>182</blue> + </color> + </brush> + </colorrole> + </active> + <inactive> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>46</red> + <green>117</green> + <blue>182</blue> + </color> + </brush> + </colorrole> + </inactive> + <disabled> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>190</red> + <green>190</green> + <blue>190</blue> + </color> + </brush> + </colorrole> + </disabled> + </palette> + </property> + <property name="font"> + <font> + <weight>75</weight> + <bold>true</bold> + </font> + </property> <property name="autoFillBackground"> <bool>true</bool> </property> @@ -1221,7 +1291,7 @@ </item> </layout> </widget> - <widget class="QGroupBox" name="groupBox_6"> + <widget class="QGroupBox" name="gbM2"> <property name="geometry"> <rect> <x>460</x> @@ -1251,6 +1321,15 @@ </color> </brush> </colorrole> + <colorrole role="PlaceholderText"> + <brush brushstyle="NoBrush"> + <color alpha="128"> + <red>46</red> + <green>117</green> + <blue>182</blue> + </color> + </brush> + </colorrole> </active> <inactive> <colorrole role="WindowText"> @@ -1271,6 +1350,15 @@ </color> </brush> </colorrole> + <colorrole role="PlaceholderText"> + <brush brushstyle="NoBrush"> + <color alpha="128"> + <red>46</red> + <green>117</green> + <blue>182</blue> + </color> + </brush> + </colorrole> </inactive> <disabled> <colorrole role="WindowText"> @@ -1291,6 +1379,15 @@ </color> </brush> </colorrole> + <colorrole role="PlaceholderText"> + <brush brushstyle="NoBrush"> + <color alpha="128"> + <red>46</red> + <green>117</green> + <blue>182</blue> + </color> + </brush> + </colorrole> </disabled> </palette> </property> @@ -1546,14 +1643,14 @@ </property> </widget> <zorder>label</zorder> - <zorder>groupBox_2</zorder> - <zorder>groupBox_10</zorder> - <zorder>groupBox_8</zorder> - <zorder>groupBox_5</zorder> - <zorder>groupBox_6</zorder> - <zorder>groupBox_9</zorder> - <zorder>groupBox_3</zorder> - <zorder>groupBox</zorder> + <zorder>gbM5</zorder> + <zorder>gbM7</zorder> + <zorder>gbM3</zorder> + <zorder>gbM4</zorder> + <zorder>gbM2</zorder> + <zorder>gbM6</zorder> + <zorder>gbM8</zorder> + <zorder>gbM1</zorder> <zorder>cbShowUnits</zorder> <zorder>quLabel</zorder> <zorder>label_18</zorder>