19 #include "ui_mainwindow.h" 20 #include "QFileDialog" 26 ui->sb_scale->setValue(qApp->desktop()->logicalDpiX()/96);
27 scale = qApp->desktop()->logicalDpiX()/96;
30 QHBoxLayout *listLayout =
new QHBoxLayout;
32 ui->phsListBox->setLayout(listLayout);
35 QHBoxLayout *list2Layout =
new QHBoxLayout;
37 ui->menuListBox->setLayout(list2Layout);
40 QHBoxLayout *options_layout =
new QHBoxLayout();
42 ui->dialog_preview_box->setLayout(options_layout);
45 QHBoxLayout *materia_editor_layout=
new QHBoxLayout();
47 ui->editor_box->setLayout(materia_editor_layout);
50 QHBoxLayout * char_editor_layout =
new QHBoxLayout();
52 ui->charEditor_box->setLayout(char_editor_layout);
55 QHBoxLayout *item_list_layout =
new QHBoxLayout;
57 ui->itemList_box->setLayout(item_list_layout);
60 QHBoxLayout *locLayout =
new QHBoxLayout();
62 ui->innerLocBox->setLayout(locLayout);
65 QHBoxLayout *ChocoboManagerLayout =
new QHBoxLayout();
67 ui->ChocoboManagerBox->setLayout(ChocoboManagerLayout);
68 chocoboManager->
setHoverStyle(QString(
"rgba(%1,%2,%3,128);").arg(QString::number(this->palette().highlight().color().red()),QString::number(this->palette().highlight().color().green()),QString::number(this->palette().highlight().color().blue())));
71 QVBoxLayout *AchievementLayout =
new QVBoxLayout();
73 ui->achievementEditor_Frame->setLayout(AchievementLayout);
76 QVBoxLayout *charManagerLayout =
new QVBoxLayout;
78 ui->CharManager_Box->setLayout(charManagerLayout);
90 case 1:
ui->dialog_preview_box->setVisible(1);
break;
91 case 2:
ui->materia_editor_box->setVisible(1);
break;
92 case 3:
ui->item_list_box->setVisible(1);
break;
93 case 4:
ui->char_editor_box->setVisible(1);
break;
94 case 5:
ui->metadata_box->setVisible(1);
break;
95 case 6:
ui->slotSelect_Box->setVisible(1);
break;
96 case 7:
ui->phsListBox->setVisible(1);
break;
97 case 8:
ui->menuListBox->setVisible(1);
break;
98 case 9:
ui->lgp_Box->setVisible(1);
break;
99 case 10:
ui->locListBox->setVisible(1);
break;
100 case 11:
ui->ChocoboManagerBox->setVisible(1);
break;
101 case 12:
ui->AchievementEditor_Box->setVisible(1);
break;
102 case 13:
ui->CharManager_Box->setVisible(1);
break;
117 memcpy(&c_data,temp,132);
132 QString fileFilter(
"Multi Slot Save Types (*.ff7 *.vmp *.vgs *.mem *.gme *.mcr *.mcd *.mci *.mc *.ddf *.ps *.psm *.VM1 *.bin *.psv);;PC FF7 SaveGame (*.ff7);;MC SaveGame (*.mcr *.mcd *.mci *.mc *.ddf *.ps *.psm *.VM1 *.bin);;PSP SaveGame (*.vmp);;VGS SaveGame(*.vgs *.mem);;Dex-Drive SaveGame(*.gme)");
133 QString filename = QFileDialog::getOpenFileName(
this,
"Select A Save To Preview",QDir::homePath(),fileFilter);
134 if(!filename.isEmpty())
142 else {QMessageBox::critical(
this,QString(tr(
"File Error")),QString(tr(
"Error Loading File: %1")).arg(filename));}
148 ui->listLgpFile->clear();
149 QString fileName = QFileDialog::getOpenFileName(
this,
"Select Lgp Archive",QDir::homePath(),
"Lgp Archive(*.lgp)");
150 if(fileName.isEmpty()){
return;}
154 if(!
lgpFile->
open()){QMessageBox::information(
this,
"Error",
"Failed To Open Lgp Archive");}
160 QString title = fileName;
161 title.remove(0,fileName.lastIndexOf(
"/")+1);
162 title.append(QString (
" (%1 files)").arg(
lgpFile->
fileList().count()));
163 ui->groupLgpView->setTitle(title);
164 ui->groupLgpView->setVisible(
true);
170 QString extPath = QFileDialog::getExistingDirectory(
this,
"Select Path To Extract Files",QDir::homePath());
171 if(extPath.isEmpty()){
return;}
174 for(
int i=0;i<
ui->listLgpFile->count();i++)
176 QString fileName = extPath;
178 QFile file(fileName);
179 if(!file.open(QFile::WriteOnly)){
return;}
186 QMessageBox::information(
this,
"Lgp Utility",QString(
"Extracted %1 File(s).").arg(
lgpFile->
fileList().count()));
191 ui->dialog_preview_box->setVisible(0);
192 ui->materia_editor_box->setVisible(0);
193 ui->char_editor_box->setVisible(0);
194 ui->item_list_box->setVisible(0);
195 ui->metadata_box->setVisible(0);
196 ui->slotSelect_Box->setVisible(0);
197 ui->phsListBox->setVisible(0);
198 ui->menuListBox->setVisible(0);
199 ui->lgp_Box->setVisible(0);
200 ui->groupLgpView->setVisible(0);
201 ui->locListBox->setVisible(0);
202 ui->ChocoboManagerBox->setVisible(0);
203 ui->AchievementEditor_Box->setVisible(0);
204 ui->CharManager_Box->setVisible(0);
209 QString fileFilter(
"*.dat (*.dat);");
210 QString filename = QFileDialog::getOpenFileName(
this,
"Select An Achievement File To Preview",QDir::homePath(),fileFilter);
216 QString fileName=QFileDialog::getSaveFileName(
this,
"Select File to Save",QDir::home().absolutePath(),
"*.dat (*.dat);");
A QWidget editor for achievements.dat file from 2012 and 2013 release of Final Fantasy 7...
LocationViewer * locViewer
void on_cb_materia_editor_setEditable_toggled(bool checked)
void on_cb_charEditor_clicked(bool checked)
QStringList fileList() const
Returns a list of file paths sorted by file position.
void on_checkBox_3_clicked(bool checked)
void on_btn_loadAchievement_clicked()
Widget to allow editing of a character using FF7Char for data.
bool openFile(QString fileName="")
open a file.
void setAdvancedMode(bool)
void setAdvancedMode(bool advancedMode)
CharManager * charManager
Set Saves Location or View Field Locations and Toggle the items picked up from them.
void on_btn_slotSelect_clicked()
OptionsWidget * optionsWidget
const QString & companyName()
Returns the company name (like "SQUARESOFT") or a null string if there is an error.
void on_pushButton_clicked()
void setEditableComboBoxes(bool)
bool saveFile(QString fileName="")
saves a file.
Character Info in the save game.
void on_cbEditableMateriaCombos_clicked(bool checked)
void on_sb_materia_editor_setStarSize_valueChanged(int arg1)
void on_lineEdit_editingFinished()
void setEditableItemCombo(bool)
void on_checkBox_2_toggled(bool checked)
bool loadFile(const QString &fileName)
attempt to load fileName as ff7save
MenuListWidget * ListMenu
void on_checkBox_4_clicked(bool checked)
void on_btnExtractLgp_clicked()
const QString & productName()
Returns the product name (like "FINAL FANTASY7") or a null string if there is an error.
void on_checkBox_toggled(bool checked)
edit saves from Final Fantasy 7
MainWindow(QWidget *parent=0)
void setHoverStyle(QString backgroundColor)
ChocoboManager * chocoboManager
void on_btn_showmetaData_clicked()
AchievementEditor * achievementEditor
QByteArray fileData(const QString &filePath)
Returns the data for the file named filePath.
MetadataCreator * metadataCreator
void setSelected(QString)
Display a preview of the contents of a PSX memory card file or FF7 PC save.
MateriaEditor * materia_editor
void setChar(FF7CHAR Chardata, QString Processed_Name="")
void on_btn_saveAchievement_clicked()
void on_combo_widget_currentIndexChanged(int index)
void on_btn_lgpSelect_clicked()
virtual bool open()
Opens the archive, returning true if successful; otherwise false.
void setEditableMateriaCombo(bool enabled)