/trunk/ClassEditor/iconform.ui |
---|
6,8 → 6,8 |
<rect> |
<x>0</x> |
<y>0</y> |
<width>177</width> |
<height>70</height> |
<width>133</width> |
<height>69</height> |
</rect> |
</property> |
<property name="windowTitle"> |
21,12 → 21,12 |
<rect> |
<x>0</x> |
<y>0</y> |
<width>111</width> |
<width>31</width> |
<height>31</height> |
</rect> |
</property> |
<property name="text"> |
<string>Поменять</string> |
<string>П</string> |
</property> |
</widget> |
<widget class="QPushButton" name="pushButton_2"> |
33,21 → 33,21 |
<property name="geometry"> |
<rect> |
<x>0</x> |
<y>30</y> |
<width>111</width> |
<y>40</y> |
<width>31</width> |
<height>30</height> |
</rect> |
</property> |
<property name="text"> |
<string>Сохранить</string> |
<string>С</string> |
</property> |
</widget> |
<widget class="QLabel" name="label"> |
<property name="geometry"> |
<rect> |
<x>120</x> |
<x>30</x> |
<y>0</y> |
<width>81</width> |
<width>101</width> |
<height>71</height> |
</rect> |
</property> |
/trunk/ClassEditor/delegate.cpp |
---|
308,6 → 308,8 |
} |
else { |
//QItemDelegate::paint(painter, option, index); |
return; |
} |
icnFrm->setPixmap(m_pxPicture); |
321,6 → 323,8 |
QAbstractItemModel *model, |
const QModelIndex& index) const { |
IconForm *icnFrm = static_cast<IconForm*>(editor); |
if (!(icnFrm->dataIsChanged())) return; |
m_pxPicture = icnFrm->pixmap(); |
QImage currentImage = m_pxPicture.toImage(); |
QByteArray bytes; |
/trunk/ClassEditor/iconform.cpp |
---|
8,6 → 8,7 |
ui(new Ui::IconForm) |
{ |
ui->setupUi(this); |
IconForm::fdataIsChanged = false; |
} |
IconForm::~IconForm() |
38,6 → 39,7 |
Pixmap.load(fileName); |
ui->label->setPixmap(Pixmap); |
IconForm::fdataIsChanged = true; |
// IconForm::close(); |
} |
52,3 → 54,11 |
QPixmap IconForm::pixmap (){ |
return Pixmap; |
} |
bool IconForm::dataIsChanged(){ |
return IconForm::fdataIsChanged; |
} |
// void IconForm::clearPixmap(){} |
/trunk/ClassEditor/iconform.h |
---|
13,7 → 13,9 |
IconForm(QWidget *parent = 0); |
~IconForm(); |
void setPixmap (QPixmap newPixmap); |
// void clearPixmap(); |
QPixmap pixmap (); |
bool dataIsChanged(); |
protected: |
void changeEvent(QEvent *e); |
20,6 → 22,7 |
private: |
Ui::IconForm *ui; |
QPixmap Pixmap; |
bool fdataIsChanged; |
private slots: |
void on_pushButton_clicked(); // îáðàáîò÷èê íàæàòèÿ êíîïêè "Ïîìåíÿòü èêîíêó" |