-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
49 changed files
with
1,839 additions
and
1,699 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// Unit Include | ||
#include "properties.h" | ||
|
||
namespace Import | ||
{ | ||
|
||
//=============================================================================================================== | ||
// Properties | ||
//=============================================================================================================== | ||
|
||
//-Constructor------------------------------------------------------------- | ||
//Public: | ||
Properties::Properties() : | ||
mHasLinkPerms(false) | ||
{} | ||
|
||
//-Instance Functions------------------------------------------------------------- | ||
//Public: | ||
void Properties::setHasLinkPermissions(bool perms) { mHasLinkPerms = perms; } | ||
bool Properties::hasLinkPermissions() const { return mHasLinkPerms; } | ||
|
||
Qx::Bindable<bool> Properties::bindableIsLauncherPresent() { return &mLauncherPresent; } | ||
bool Properties::isLauncherPresent() const { return mLauncherPresent; } | ||
|
||
Qx::Bindable<bool> Properties::bindableIsLauncherReady() { return &mLauncherReady; } | ||
bool Properties::isLauncherReady() const { return mLauncherReady; } | ||
|
||
Qx::Bindable<bool> Properties::bindableIsFlashpointPresent() { return &mFlashpointPresent; } | ||
bool Properties::isFlashpointPresent() const { return mFlashpointPresent; } | ||
|
||
Qx::Bindable<bool> Properties::bindableIsFlashpointReady() { return &mFlashpointReady; } | ||
bool Properties::isFlashpointReady() const { return mFlashpointReady; } | ||
|
||
Qx::Bindable<bool> Properties::bindableIsBothTargetsReady() { return &mBothTargetsReady; } | ||
bool Properties::isBothTargetsReady() const { return mBothTargetsReady; } | ||
|
||
Qx::Bindable<bool> Properties::bindableIsFlashpointTargetSeries() { return &mFlashpointTargetSeries; } | ||
bool Properties::isFlashpointTargetSeries() const { return mFlashpointTargetSeries; } | ||
|
||
Qx::Bindable<QList<ImageMode>> Properties::bindableImageModeOrder() { return &mImageModeOrder; } | ||
const Qx::Bindable<QList<ImageMode>> Properties::bindableImageModeOrder() const { return &mImageModeOrder; } | ||
QList<ImageMode> Properties::imageModeOrder() const { return mImageModeOrder; } | ||
|
||
Qx::Bindable<bool> Properties::bindableIsImageDownloadable() { return &mImageDownloadable; } | ||
bool Properties::isImageDownloadable() const { return mImageDownloadable; } | ||
|
||
Qx::Bindable<QString> Properties::bindableLauncherInfo() { return &mLauncherInfo; } | ||
QString Properties::launcherInfo() const { return mLauncherInfo; } | ||
|
||
Qx::Bindable<QString> Properties::bindableFlashpointInfo() { return &mFlashpointInfo; } | ||
QString Properties::flashpointInfo() const { return mFlashpointInfo; } | ||
|
||
Qx::Bindable<QMap<int, Fp::Db::TagCategory>> Properties::bindableTagMap() { return &mTagMap; } | ||
const Qx::Bindable<QMap<int, Fp::Db::TagCategory>> Properties::bindableTagMap() const { return &mTagMap; } | ||
QMap<int, Fp::Db::TagCategory> Properties::tagMap() const { return mTagMap; } | ||
|
||
Qx::Bindable<QList<Importee>> Properties::bindablePlatforms() { return &mPlatforms; } | ||
const Qx::Bindable<QList<Importee>> Properties::bindablePlatforms() const { return &mPlatforms; } | ||
QList<Importee> Properties::platforms() const { return mPlatforms; } | ||
|
||
Qx::Bindable<QList<Importee>> Properties::bindablePlaylists() { return &mPlaylists; } | ||
const Qx::Bindable<QList<Importee>> Properties::bindablePlaylists() const { return &mPlaylists; } | ||
QList<Importee> Properties::playlists() const { return mPlaylists; } | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
#ifndef IMPORT_PROPERTIES_H | ||
#define IMPORT_PROPERTIES_H | ||
|
||
// Qt Includes | ||
#include <QProperty> | ||
|
||
// Qx Includes | ||
#include <qx/core/qx-property.h> | ||
|
||
// libfp Includes | ||
#include <fp/fp-db.h> | ||
|
||
// Project Includes | ||
#include "import/settings.h" | ||
|
||
/* TODO: The number of properties here has gotten somewhat out of hand. | ||
* Mainwindow should probably just be given access to something like | ||
* const QBindable<const std::shared_ptr<Fp::Install>> (and same for | ||
* launcher) so that it can setup its own bindings/properties directly | ||
* off of that. Since it would be read only, that still lets Controller | ||
* have control of the instances. | ||
*/ | ||
|
||
namespace Import | ||
{ | ||
|
||
class Properties | ||
{ | ||
//-Instance Variables------------------------------------------------------------- | ||
private: | ||
bool mHasLinkPerms; | ||
Qx::Property<bool> mLauncherPresent; | ||
Qx::Property<bool> mLauncherReady; | ||
Qx::Property<bool> mFlashpointPresent; | ||
Qx::Property<bool> mFlashpointReady; | ||
Qx::Property<bool> mBothTargetsReady; | ||
Qx::Property<bool> mFlashpointTargetSeries; | ||
Qx::Property<QList<ImageMode>> mImageModeOrder; | ||
Qx::Property<bool> mImageDownloadable; | ||
Qx::Property<QString> mLauncherInfo; | ||
Qx::Property<QString> mFlashpointInfo; | ||
Qx::Property<QMap<int, Fp::Db::TagCategory>> mTagMap; | ||
Qx::Property<QList<Importee>> mPlatforms; | ||
Qx::Property<QList<Importee>> mPlaylists; | ||
|
||
//-Constructor------------------------------------------------------------- | ||
public: | ||
Properties(); | ||
|
||
//-Instance Functions------------------------------------------------------------- | ||
public: | ||
void setHasLinkPermissions(bool perms); | ||
bool hasLinkPermissions() const; | ||
|
||
Qx::Bindable<bool> bindableIsLauncherPresent(); | ||
bool isLauncherPresent() const; | ||
|
||
Qx::Bindable<bool> bindableIsLauncherReady(); | ||
bool isLauncherReady() const; | ||
|
||
Qx::Bindable<bool> bindableIsFlashpointPresent(); | ||
bool isFlashpointPresent() const; | ||
|
||
Qx::Bindable<bool> bindableIsFlashpointReady(); | ||
bool isFlashpointReady() const; | ||
|
||
Qx::Bindable<bool> bindableIsBothTargetsReady(); | ||
bool isBothTargetsReady() const; | ||
|
||
Qx::Bindable<bool> bindableIsFlashpointTargetSeries(); | ||
bool isFlashpointTargetSeries() const; | ||
|
||
Qx::Bindable<QList<ImageMode>> bindableImageModeOrder(); | ||
const Qx::Bindable<QList<ImageMode>> bindableImageModeOrder() const; | ||
QList<ImageMode> imageModeOrder() const; | ||
|
||
Qx::Bindable<bool> bindableIsImageDownloadable(); | ||
bool isImageDownloadable() const; | ||
|
||
Qx::Bindable<QString> bindableLauncherInfo(); | ||
QString launcherInfo() const; | ||
|
||
Qx::Bindable<QString> bindableFlashpointInfo(); | ||
QString flashpointInfo() const; | ||
|
||
Qx::Bindable<QMap<int, Fp::Db::TagCategory>> bindableTagMap(); | ||
const Qx::Bindable<QMap<int, Fp::Db::TagCategory>> bindableTagMap() const; | ||
QMap<int, Fp::Db::TagCategory> tagMap() const; | ||
|
||
Qx::Bindable<QList<Importee>> bindablePlatforms(); | ||
const Qx::Bindable<QList<Importee>> bindablePlatforms() const; | ||
QList<Importee> platforms() const; | ||
|
||
Qx::Bindable<QList<Importee>> bindablePlaylists(); | ||
const Qx::Bindable<QList<Importee>> bindablePlaylists() const; | ||
QList<Importee> playlists() const; | ||
}; | ||
|
||
} | ||
|
||
#endif // IMPORT_PROPERTIES_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#ifndef IMPORT_SETTINGS_H | ||
#define IMPORT_SETTINGS_H | ||
|
||
// Qt Includes | ||
#include <QString> | ||
#include <QList> | ||
|
||
// libfp Includes | ||
#include <fp/fp-db.h> | ||
|
||
namespace Import | ||
{ | ||
|
||
// Enums | ||
enum class Install{ Launcher, Flashpoint }; | ||
enum class UpdateMode {OnlyNew, NewAndExisting}; | ||
enum class ImageMode {Copy, Reference, Link}; | ||
enum class PlaylistGameMode {SelectedPlatform, ForceAll}; | ||
|
||
// Structs | ||
struct Importee | ||
{ | ||
QString name; | ||
bool existing = false; | ||
}; | ||
|
||
struct Selections | ||
{ | ||
QStringList platforms; | ||
QStringList playlists; | ||
}; | ||
|
||
struct UpdateOptions | ||
{ | ||
UpdateMode importMode; | ||
bool removeObsolete; | ||
}; | ||
|
||
struct OptionSet | ||
{ | ||
UpdateOptions updateOptions; | ||
ImageMode imageMode; | ||
bool downloadImages; | ||
PlaylistGameMode playlistMode; | ||
Fp::Db::InclusionOptions inclusionOptions; | ||
}; | ||
|
||
} | ||
|
||
#endif // IMPORT_SETTINGS_H |
Oops, something went wrong.