добавил интерфейс для менеджера действий
This commit is contained in:
@@ -108,6 +108,9 @@ uGeneral::uGeneral(QWidget *parent)
|
|||||||
ui->www->setTabIcon(i, tabIcons[i]);
|
ui->www->setTabIcon(i, tabIcons[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ui->gbActionsAudio->setVisible(false);
|
||||||
|
ui->gbActionsNotify->setVisible(false);
|
||||||
|
|
||||||
setupButtonIcons();
|
setupButtonIcons();
|
||||||
|
|
||||||
// Загружаем QSS файлы при создании формы
|
// Загружаем QSS файлы при создании формы
|
||||||
@@ -3476,3 +3479,74 @@ void uGeneral::on_btnCRDelete_clicked()
|
|||||||
ui->btnCRDelete->setEnabled(false);
|
ui->btnCRDelete->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void uGeneral::on_cbActions_currentIndexChanged(int index)
|
||||||
|
{
|
||||||
|
// 0 - ножатие кнопок
|
||||||
|
// 1 - возспроизвести звук (вызвать веб сервис для звука)
|
||||||
|
// 2 - вызвать вебсервис с параметрами
|
||||||
|
switch (index) {
|
||||||
|
case 0:
|
||||||
|
ui->gbActionsKeys->setVisible(true);
|
||||||
|
ui->gbActionsAudio->setVisible(false);
|
||||||
|
ui->gbActionsNotify->setVisible(false);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
ui->gbActionsKeys->setVisible(false);
|
||||||
|
ui->gbActionsAudio->setVisible(true);
|
||||||
|
ui->gbActionsNotify->setVisible(false);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
ui->gbActionsKeys->setVisible(false);
|
||||||
|
ui->gbActionsAudio->setVisible(false);
|
||||||
|
ui->gbActionsNotify->setVisible(true);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void uGeneral::on_btnOpenAudioFile_clicked()
|
||||||
|
{
|
||||||
|
QString sourceFile = QFileDialog::getOpenFileName(this,
|
||||||
|
"Выберите файл для уведомлений",
|
||||||
|
QDir::homePath(),
|
||||||
|
"Звуковой файл (*.mp3);;Все файлы (*.*)");
|
||||||
|
|
||||||
|
if (sourceFile.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ui->edtActionAudio->setText(sourceFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void uGeneral::on_btnActionPicOpen_clicked()
|
||||||
|
{
|
||||||
|
QString sourceFile = QFileDialog::getOpenFileName(this,
|
||||||
|
"Выберите файл для уведомлений",
|
||||||
|
QDir::homePath(),
|
||||||
|
"Картинка (*.jpg;*.jpeg;*.png);;Все файлы (*.*)");
|
||||||
|
|
||||||
|
if (sourceFile.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ui->edtActionPic->setText(sourceFile);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void uGeneral::on_btnActionAudioOpen_clicked()
|
||||||
|
{
|
||||||
|
QString sourceFile = QFileDialog::getOpenFileName(this,
|
||||||
|
"Выберите файл для уведомлений",
|
||||||
|
QDir::homePath(),
|
||||||
|
"Звуковой файл (*.mp3);;Все файлы (*.*)");
|
||||||
|
|
||||||
|
if (sourceFile.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ui->edtActionSound->setText(sourceFile);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -366,6 +366,14 @@ private slots:
|
|||||||
|
|
||||||
void on_btnCRDelete_clicked();
|
void on_btnCRDelete_clicked();
|
||||||
|
|
||||||
|
void on_cbActions_currentIndexChanged(int index);
|
||||||
|
|
||||||
|
void on_btnOpenAudioFile_clicked();
|
||||||
|
|
||||||
|
void on_btnActionPicOpen_clicked();
|
||||||
|
|
||||||
|
void on_btnActionAudioOpen_clicked();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
// Установка статуса подключения к Twitch
|
// Установка статуса подключения к Twitch
|
||||||
void setTwitchConnected(bool connected);
|
void setTwitchConnected(bool connected);
|
||||||
|
|||||||
+246
-21
@@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1007</width>
|
<width>1002</width>
|
||||||
<height>819</height>
|
<height>985</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -1159,7 +1159,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_19">
|
<layout class="QHBoxLayout" name="horizontalLayout_19">
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>10</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="btnCRAdd">
|
<widget class="QPushButton" name="btnCRAdd">
|
||||||
@@ -1191,19 +1191,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer_4">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -1216,7 +1203,225 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_29">
|
<layout class="QVBoxLayout" name="verticalLayout_29">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QListWidget" name="listWidget_2"/>
|
<widget class="QTableWidget" name="sgActions"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_20">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_29">
|
||||||
|
<property name="text">
|
||||||
|
<string>Действие:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="cbActions">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Нажать кнопки</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Воcпроизвести звук</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Показать уведомление</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="gbActionsKeys">
|
||||||
|
<property name="title">
|
||||||
|
<string>Нажатие кнопок</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_21">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_30">
|
||||||
|
<property name="text">
|
||||||
|
<string>Комбинация:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="edtKeyLine"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="gbActionsAudio">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Воспроизвести звук</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_23">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_31">
|
||||||
|
<property name="text">
|
||||||
|
<string>Файл:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="edtActionAudio"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btnOpenAudioFile">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="gbActionsNotify">
|
||||||
|
<property name="title">
|
||||||
|
<string>Показать уведомление</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_32">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_24">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_32">
|
||||||
|
<property name="text">
|
||||||
|
<string>Загаловок:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="lineEdit_3"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_25">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_33">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Plain</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Описание:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="lineEdit_4"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_26">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>10</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_34">
|
||||||
|
<property name="text">
|
||||||
|
<string>Картинка:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="edtActionPic"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btnActionPicOpen">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_27">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>10</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_35">
|
||||||
|
<property name="text">
|
||||||
|
<string>Звук:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="edtActionSound"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btnActionAudioOpen">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_22">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btnAddAction">
|
||||||
|
<property name="text">
|
||||||
|
<string>Добавить</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btnDelAction">
|
||||||
|
<property name="text">
|
||||||
|
<string>Удалить</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_12">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer_7">
|
<spacer name="verticalSpacer_7">
|
||||||
@@ -1238,6 +1443,26 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_31">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_8">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tab_5">
|
<widget class="QWidget" name="tab_5">
|
||||||
@@ -1337,7 +1562,7 @@
|
|||||||
<item row="0" column="4">
|
<item row="0" column="4">
|
||||||
<widget class="QPushButton" name="btnNotifyOpen">
|
<widget class="QPushButton" name="btnNotifyOpen">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Открыть</string>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset>
|
<iconset>
|
||||||
@@ -1397,7 +1622,7 @@
|
|||||||
<item row="3" column="4">
|
<item row="3" column="4">
|
||||||
<widget class="QPushButton" name="btnNotifyOpenSub">
|
<widget class="QPushButton" name="btnNotifyOpenSub">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Открыть</string>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset>
|
<iconset>
|
||||||
@@ -1432,7 +1657,7 @@
|
|||||||
<item row="2" column="4">
|
<item row="2" column="4">
|
||||||
<widget class="QPushButton" name="btnNotifyOpenVip">
|
<widget class="QPushButton" name="btnNotifyOpenVip">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Открыть</string>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset>
|
<iconset>
|
||||||
@@ -1474,7 +1699,7 @@
|
|||||||
<item row="1" column="4">
|
<item row="1" column="4">
|
||||||
<widget class="QPushButton" name="btnNotifyOpenMod">
|
<widget class="QPushButton" name="btnNotifyOpenMod">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Открыть</string>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset>
|
<iconset>
|
||||||
|
|||||||
Reference in New Issue
Block a user