mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Update downloadfromdivecomputer.cpp
Changed DDC<n> to DeleteDC<n> and hide set visibility for new Qframe Signed-off-by: jme <32236882+notrege@users.noreply.github.com>
This commit is contained in:
parent
d59bd1831a
commit
7fb0e9e59e
1 changed files with 13 additions and 11 deletions
|
@ -117,13 +117,15 @@ DownloadFromDCWidget::DownloadFromDCWidget(const QString &filename, QWidget *par
|
||||||
#define SETUPDC(num) \
|
#define SETUPDC(num) \
|
||||||
if (!qPrefDiveComputer::vendor##num().isEmpty()) { \
|
if (!qPrefDiveComputer::vendor##num().isEmpty()) { \
|
||||||
ui.DC##num->setVisible(true); \
|
ui.DC##num->setVisible(true); \
|
||||||
ui.DDC##num->setVisible(true); \
|
ui.DCFrame##num->setVisible(true); \
|
||||||
|
ui.DeleteDC##num->setVisible(true); \
|
||||||
ui.DC##num->setText(qPrefDiveComputer::vendor##num() + " - " + qPrefDiveComputer::product##num()); \
|
ui.DC##num->setText(qPrefDiveComputer::vendor##num() + " - " + qPrefDiveComputer::product##num()); \
|
||||||
connect(ui.DC##num, &QPushButton::clicked, this, &DownloadFromDCWidget::DC##num##Clicked, Qt::UniqueConnection); \
|
connect(ui.DC##num, &QPushButton::clicked, this, &DownloadFromDCWidget::DC##num##Clicked, Qt::UniqueConnection); \
|
||||||
connect(ui.DDC##num, &QPushButton::clicked, this, &DownloadFromDCWidget::DDC##num##Clicked, Qt::UniqueConnection); \
|
connect(ui.DeleteDC##num, &QPushButton::clicked, this, &DownloadFromDCWidget::DeleteDC##num##Clicked, Qt::UniqueConnection); \
|
||||||
} else { \
|
} else { \
|
||||||
ui.DC##num->setVisible(false); \
|
ui.DC##num->setVisible(false); \
|
||||||
ui.DDC##num->setVisible(false); \
|
ui.DCFrame##num->setVisible(false); \
|
||||||
|
ui.DeleteDC##num->setVisible(false); \
|
||||||
}
|
}
|
||||||
|
|
||||||
void DownloadFromDCWidget::showRememberedDCs()
|
void DownloadFromDCWidget::showRememberedDCs()
|
||||||
|
@ -176,11 +178,11 @@ DCBUTTON(3)
|
||||||
DCBUTTON(4)
|
DCBUTTON(4)
|
||||||
|
|
||||||
// Delete DC button slots
|
// Delete DC button slots
|
||||||
#define DDCBUTTON(num) \
|
#define DELETEDCBUTTON(num) \
|
||||||
void DownloadFromDCWidget::DDC##num##Clicked() \
|
void DownloadFromDCWidget::DeleteDC##num##Clicked() \
|
||||||
{ \
|
{ \
|
||||||
ui.DC##num->setVisible(false); \
|
ui.DC##num->setVisible(false); \
|
||||||
ui.DDC##num->setVisible(false); \
|
ui.DeleteDC##num->setVisible(false); \
|
||||||
int dc = num; \
|
int dc = num; \
|
||||||
switch (dc) { \
|
switch (dc) { \
|
||||||
case 1: \
|
case 1: \
|
||||||
|
@ -206,10 +208,10 @@ void DownloadFromDCWidget::DDC##num##Clicked() \
|
||||||
DownloadFromDCWidget::showRememberedDCs(); \
|
DownloadFromDCWidget::showRememberedDCs(); \
|
||||||
}
|
}
|
||||||
|
|
||||||
DDCBUTTON(1)
|
DELETEDCBUTTON(1)
|
||||||
DDCBUTTON(2)
|
DELETEDCBUTTON(2)
|
||||||
DDCBUTTON(3)
|
DELETEDCBUTTON(3)
|
||||||
DDCBUTTON(4)
|
DELETEDCBUTTON(4)
|
||||||
|
|
||||||
void DownloadFromDCWidget::updateProgressBar()
|
void DownloadFromDCWidget::updateProgressBar()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue