Rev 201 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 201 | Rev 202 | ||
---|---|---|---|
Line 62... | Line 62... | ||
62 | 62 | ||
63 | QByteArray data_tmp;
|
63 | QByteArray data_tmp;
|
64 | QFile file;
|
64 | QFile file;
|
65 | QDataStream out(&Data,QIODevice::ReadOnly); |
65 | QDataStream out(&Data,QIODevice::ReadOnly); |
66 | QString fileName;
|
66 | QString fileName;
|
- | 67 | // QString fileName_tmp;
|
|
67 | if (Data.isEmpty()) return; |
68 | if (Data.isEmpty()) return; |
- | 69 | out.device()->reset(); |
|
68 | out >> fileName; |
70 | out >> fileName; |
69 | fileName = QFileDialog::getSaveFileName(this, tr("Save File"), |
71 | fileName = QFileDialog::getSaveFileName(this, tr("Save File"), |
70 | fileName, |
72 | fileName, |
71 | tr("All Files (*.*);;Image Files (*.png *.jpg *.bmp);;Text files (*.txt);;XML files (*.xml)")); |
73 | tr("All Files (*.*);;Image Files (*.png *.jpg *.bmp);;Text files (*.txt);;XML files (*.xml)")); |
72 | 74 | ||
Line 94... | Line 96... | ||
94 | FileForm::fdataIsChanged = true; |
96 | FileForm::fdataIsChanged = true; |
95 | 97 | ||
96 | 98 | ||
97 | 99 | ||
98 | }
|
100 | }
|
- | 101 | ||
- | 102 | void FileForm::setData(QByteArray new_data){ |
|
- | 103 | int i; |
|
- | 104 | ||
- | 105 | Data = new_data; |
|
- | 106 | ||
- | 107 | i++; |
|
- | 108 | }
|