To keep dialogs in a common format and allow them to share the same
properties, three classes of dialogs have been implemented inheriting from
each other.
The classes are `BaseDialog` -> `ButtonDialog` -> `ActionDialog`
* Basedialog: is the basis of all dialogs and is responsible for
rejecting close requests from the window manager and the keyboard.
It also restricts access to `exec()` and `exec_()` because they are harmful.
It serves as the basis of Launch and Login dialogs
* ButtonDialog: is offering buttons for accepting or rejecting the presented
option. It implements its own buttons and exposes abstract methods to
implement handling in them. It restricts access to `close()` because these
dialogs should always product a result.
It is the basis of Uninstall, Selective dialogs.
* ActionDialog: in addition to the ButtonDialog, it offers an action buttom
with to validate the form or to make the dialog unable to close. It serves
as the basis of Install and Move dialogs.
Requesting the pixmap in `paintEvent` only loads the
pixmap when the widget first becomes visible, making loading
the library smoother. Also avoid spawning multiple singleshot
QTimers and use QObject's internal timer, with CoarseTimer precision.
Also set some more defaults for legendary because Rare lacks support for
them. Forced at startup.
* Set `disable_auto_crossover` to `false` because we don't support CX yet.
* Set `egl_sync` to `false` because issues.
This property reports the default platform to use for a game based
on legendary's configuration and if they platform is available in the
game's assets.
Using that property we can make better choices on what platform to operate
on without user intervention. Currently we use it to infer the platform
in when installing, importing, and calculating game versions.
* Infer the displayed to reflect where the affected directory is
If base_path is set outside of InstallDialog, display that.
If the game is already installed, show the installation directory
If neither of the above is true, use legendary's inference based on
the default platform if the game supports it. Fallback to Windows.
* Disable irrelevant and potentially harmful options when the game is
already installed, such as the installation path, the platform selection
and creating a shortcut.
* Infer the correct platform based on the existing installation. If it
is not installed, use the default platform if the game supports it and
fallback to windows.
* Move the horrible lambda used to populate the error box when the
platform was unsupported into a separate method.