Limo
A simple mod manager
Loading...
Searching...
No Matches
NexusModDialog Class Reference

Dialog used to display the descrition page, the changelogs and all available files for a mod on NexusMods. More...

#include <nexusmoddialog.h>

Inheritance diagram for NexusModDialog:
Collaboration diagram for NexusModDialog:

Signals

void modDownloadRequested (int app_id, int mod_id, int file_id, QString mod_url, QString version)
 Sends a download request for the given file.
 

Public Member Functions

 NexusModDialog (QWidget *parent=nullptr)
 Initializes the UI.
 
 ~NexusModDialog ()
 Deletes the UI.
 
void setupDialog (int app_id, int mod_id, const nexus::Page &page)
 Initializes the dialog with the data for the given Page.
 

Private Slots

void onDownloadClicked (int file_id, int file_id_copy)
 Sends a download request for the given file.
 

Private Member Functions

QString bbcodeToHtml (const QString &bbcode)
 Converts the given BBCode formatted string to a string formatted with HTML tags.
 

Private Attributes

Ui::NexusModDialog * ui
 Contains auto-generated UI elements.
 
int app_id_
 ModdedApplication to which the mod, whose page is being shown, belongs.
 
int mod_id_
 Limo mod id for the mod to which the page belongs.
 
nexus::Page page_
 Contains all data necessary for the dialog.
 

Detailed Description

Dialog used to display the descrition page, the changelogs and all available files for a mod on NexusMods.

Constructor & Destructor Documentation

◆ NexusModDialog()

NexusModDialog::NexusModDialog ( QWidget * parent = nullptr)
explicit

Initializes the UI.

Parameters
parentParent for this widget, this is passed to the constructor of QDialog.

Member Function Documentation

◆ bbcodeToHtml()

QString NexusModDialog::bbcodeToHtml ( const QString & bbcode)
private

Converts the given BBCode formatted string to a string formatted with HTML tags.

Parameters
bbcodeString to convert.
Returns
The converted string.

◆ modDownloadRequested

void NexusModDialog::modDownloadRequested ( int app_id,
int mod_id,
int file_id,
QString mod_url,
QString version )
signal

Sends a download request for the given file.

Parameters
app_idModdedApplication to which the mod, whose page is being shown, belongs.
mod_idLimo mod id for the mod to which the page belongs.
file_idNexusMods file id used for the download.
mod_urlURL of the mod page on NexusMods.
versionIf not empty: Use this to overwrite the default version.

◆ onDownloadClicked

void NexusModDialog::onDownloadClicked ( int file_id,
int file_id_copy )
privateslot

Sends a download request for the given file.

Parameters
file_idId of the NexusMods file to download.
file_id_copyId of the NexusMods file to download.

◆ setupDialog()

void NexusModDialog::setupDialog ( int app_id,
int mod_id,
const nexus::Page & page )

Initializes the dialog with the data for the given Page.

Parameters
app_idModdedApplication to which the mod, whose page is being shown, belongs.
mod_idLimo mod id for the mod to which the page belongs.
pageContains all data necessary for the dialog.

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