-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuploadselect.cpp
More file actions
27 lines (23 loc) · 1005 Bytes
/
Copy pathuploadselect.cpp
File metadata and controls
27 lines (23 loc) · 1005 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "uploadselect.h"
#include "ui_uploadselect.h"
UploadSelect::UploadSelect(QWidget *parent, std::string bucket, std::string key) : QDialog(parent),
bucket(bucket),
key(key),
ui(new Ui::UploadSelect) {
ui->setupUi(this);
ui->lineEdit->setText(QString::fromStdString(bucket));
ui->lineEdit->setDisabled(true);
ui->lineEdit_2->setText(QString::fromStdString(key));
}
UploadSelect::~UploadSelect() {
delete ui;
}
void UploadSelect::on_lineEdit_textChanged(const QString &arg1) {
this->bucket = arg1.toStdString();
}
void UploadSelect::on_lineEdit_2_textChanged(const QString &arg1) {
if (!arg1.startsWith("/"))
this->key = std::string("/") + arg1.toStdString();
else
this->key = arg1.toStdString();
}