ff7tk  0.02
Toolkit for making FF7 Tools
AchievementEditor Class Reference

A QWidget editor for achievements.dat file from 2012 and 2013 release of Final Fantasy 7. More...

#include <AchievementEditor.h>

Inheritance diagram for AchievementEditor:

Public Slots

bool openFile (QString fileName="")
 open a file. More...
 
bool saveFile (QString fileName="")
 saves a file. More...
 

Public Member Functions

 AchievementEditor (qreal Scale=1, QWidget *parent=0)
 create a new AchievementEditor More...
 

Private Slots

void itemToggled (QModelIndex index)
 an item has been toggled More...
 

Private Member Functions

void initDisplay (void)
 create this items widgets More...
 
void initConnect (void)
 Connect objects. More...
 
void initDisconnect (void)
 Disconnect object. More...
 

Private Attributes

FF7Achievements achievements
 data class for widget More...
 
QListWidget * achievementList
 QListWidget that will contain the list of achievements. More...
 
qreal scale
 Scale value for hidpi systems. More...
 

Detailed Description

A QWidget editor for achievements.dat file from 2012 and 2013 release of Final Fantasy 7.

This widget uses FF7Achievements to do everything for us we only need to tell it what file to open and what file to save. The list will contain icons for each achievement so be sure to include achievements.qrc in your projects resources The end user only ever needs to see a list the rest sholud be set to signals/slots in the host application

Definition at line 36 of file AchievementEditor.h.

Constructor & Destructor Documentation

AchievementEditor::AchievementEditor ( qreal  Scale = 1,
QWidget *  parent = 0 
)
explicit

create a new AchievementEditor

Definition at line 18 of file AchievementEditor.cpp.

References initConnect(), initDisplay(), and scale.

Member Function Documentation

void AchievementEditor::initConnect ( void  )
private

Connect objects.

Definition at line 25 of file AchievementEditor.cpp.

References achievementList, and itemToggled().

Referenced by AchievementEditor(), and openFile().

void AchievementEditor::initDisconnect ( void  )
private

Disconnect object.

Definition at line 29 of file AchievementEditor.cpp.

References achievementList, and itemToggled().

Referenced by openFile().

void AchievementEditor::initDisplay ( void  )
private

create this items widgets

Definition at line 33 of file AchievementEditor.cpp.

References achievementList, achievements, FF7Achievements::name(), and scale.

Referenced by AchievementEditor().

void AchievementEditor::itemToggled ( QModelIndex  index)
privateslot

an item has been toggled

Parameters
indexQModeIndex from where the change occored

Definition at line 64 of file AchievementEditor.cpp.

References achievementList, achievements, and FF7Achievements::setAchievementUnlocked().

Referenced by initConnect(), and initDisconnect().

bool AchievementEditor::openFile ( QString  fileName = "")
slot

open a file.

Parameters
fileNamean achievements.dat file that you want to open
Returns
TRUE if successful while attempting to open the file
See also
openFile()

Definition at line 52 of file AchievementEditor.cpp.

References achievementList, achievements, FF7Achievements::achievmentUnlocked(), initConnect(), initDisconnect(), and FF7Achievements::openFile().

Referenced by MainWindow::on_btn_loadAchievement_clicked().

bool AchievementEditor::saveFile ( QString  fileName = "")
slot

saves a file.

Parameters
fileNamean achievements.dat file that you want to save
Returns
TRUE if successful while attempting to write the file
See also
saveFile()

Definition at line 72 of file AchievementEditor.cpp.

References achievements, and FF7Achievements::saveFile().

Referenced by MainWindow::on_btn_saveAchievement_clicked().

Member Data Documentation

QListWidget* AchievementEditor::achievementList
private

QListWidget that will contain the list of achievements.

Definition at line 65 of file AchievementEditor.h.

Referenced by initConnect(), initDisconnect(), initDisplay(), itemToggled(), and openFile().

FF7Achievements AchievementEditor::achievements
private

data class for widget

Definition at line 64 of file AchievementEditor.h.

Referenced by initDisplay(), itemToggled(), openFile(), and saveFile().

qreal AchievementEditor::scale
private

Scale value for hidpi systems.

Definition at line 66 of file AchievementEditor.h.

Referenced by AchievementEditor(), and initDisplay().


The documentation for this class was generated from the following files: