1,6 → 1,8 |
#include "iconform.h" |
#include "ui_iconform.h" |
#include "classeditor.h" |
|
|
IconForm::IconForm(QWidget *parent) : |
QWidget(parent), |
ui(new Ui::IconForm) |
24,3 → 26,29 |
break; |
} |
} |
|
|
void IconForm::on_pushButton_clicked(){ // îáðàáîò÷èê íàæàòèÿ êíîïêè "Ïîìåíÿòü èêîíêó" |
|
QString fileName; |
fileName = QFileDialog::getOpenFileName(this, |
tr("Open Image"), "", tr("Image Files (*.png *.jpg *.bmp)")); |
|
if (fileName.isEmpty()) return; |
Pixmap.load(fileName); |
|
ui->label->setPixmap(Pixmap); |
// IconForm::close(); |
} |
|
|
void IconForm::setPixmap (QPixmap newPixmap){ |
Pixmap = newPixmap; |
ui->label->setPixmap(Pixmap); |
|
} |
|
|
QPixmap IconForm::pixmap (){ |
return Pixmap; |
} |