Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/sdwidget.cpp
Show All 9 Lines | 1 | /* AtCore Test Client | |||
---|---|---|---|---|---|
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. | ||
14 | 14 | | |||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | */ | 17 | */ | ||
18 | #include <QFileDialog> | ||||
18 | #include <QGroupBox> | 19 | #include <QGroupBox> | ||
19 | #include <QHBoxLayout> | 20 | #include <QHBoxLayout> | ||
20 | #include <QPushButton> | 21 | #include <QPushButton> | ||
21 | #include <QVBoxLayout> | 22 | #include <QVBoxLayout> | ||
22 | 23 | | |||
23 | #include "sdwidget.h" | 24 | #include "sdwidget.h" | ||
24 | 25 | | |||
25 | SdWidget::SdWidget(QWidget *parent) : | 26 | SdWidget::SdWidget(QWidget *parent) : | ||
Show All 11 Lines | 28 | { | |||
37 | hBoxLayout->addWidget(newButton); | 38 | hBoxLayout->addWidget(newButton); | ||
38 | connect(newButton, &QPushButton::clicked, this, [this] { | 39 | connect(newButton, &QPushButton::clicked, this, [this] { | ||
39 | if (listSdFiles->currentRow() != -1) | 40 | if (listSdFiles->currentRow() != -1) | ||
40 | { | 41 | { | ||
41 | emit printSdFile(listSdFiles->currentItem()->text()); | 42 | emit printSdFile(listSdFiles->currentItem()->text()); | ||
42 | } | 43 | } | ||
43 | }); | 44 | }); | ||
44 | 45 | | |||
46 | newButton = new QPushButton(tr("Send File")); | ||||
47 | hBoxLayout->addWidget(newButton); | ||||
48 | connect(newButton, &QPushButton::clicked, this, [this] { | ||||
49 | emit writeSdFile(); | ||||
50 | }); | ||||
51 | | ||||
45 | newButton = new QPushButton(tr("Delete Selected")); | 52 | newButton = new QPushButton(tr("Delete Selected")); | ||
46 | hBoxLayout->addWidget(newButton); | 53 | hBoxLayout->addWidget(newButton); | ||
47 | connect(newButton, &QPushButton::clicked, this, [this] { | 54 | connect(newButton, &QPushButton::clicked, this, [this] { | ||
48 | if (listSdFiles->currentRow() != -1) | 55 | if (listSdFiles->currentRow() != -1) | ||
49 | { | 56 | { | ||
50 | emit deleteSdFile(listSdFiles->currentItem()->text()); | 57 | emit deleteSdFile(listSdFiles->currentItem()->text()); | ||
51 | listSdFiles->setCurrentRow(-1); | 58 | listSdFiles->setCurrentRow(-1); | ||
52 | } | 59 | } | ||
Show All 20 Lines |