Skip to content

Commit

Permalink
add doxygen
Browse files Browse the repository at this point in the history
Documentin makes it easier to remember
  • Loading branch information
noisecode3 committed Jan 5, 2024
1 parent 3acd6cd commit 62219a7
Show file tree
Hide file tree
Showing 9 changed files with 3,222 additions and 165 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
CMakeLists.txt.user
build-Debug
build
2,854 changes: 2,854 additions & 0 deletions Doxyfile

Large diffs are not rendered by default.

File renamed without changes.
16 changes: 3 additions & 13 deletions src/TombRaiderLinuxLauncher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
#include "worker.h"
#include "ui_TombRaiderLinuxLauncher.h"

/*
*
*
*
*
*/
TombRaiderLinuxLauncher::TombRaiderLinuxLauncher(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::TombRaiderLinuxLauncher)
Expand All @@ -41,14 +35,10 @@ TombRaiderLinuxLauncher::TombRaiderLinuxLauncher(QWidget *parent)

}
/*
* 0 Game dose not exist.
* 1 The path is a symbolic link.
* 2 The path is not a symbolic link.
* 3 value 3:The path is not a directory.
*/
int TombRaiderLinuxLauncher::checkGameDirectory(int game)
{
struct folderNames folder;
struct FolderNames folder;
QString name;
switch (game)
{
Expand Down Expand Up @@ -104,7 +94,7 @@ int TombRaiderLinuxLauncher::checkGameDirectory(int game)
void TombRaiderLinuxLauncher::checkCommonFiles()
{
int dirStaus = checkGameDirectory(TR3); // we only setup tr3 for now
folderNames folder;
FolderNames folder;
if (dirStaus)
{
if(dirStaus == 1)// The path is a symbolic link.
Expand Down Expand Up @@ -256,7 +246,7 @@ void TombRaiderLinuxLauncher::setOptionsClicked()

void TombRaiderLinuxLauncher::linkClicked()
{
struct folderNames folder;
struct FolderNames folder;
const QString gamePath = settings.value("gamePath").toString() + folder.TR3;
qDebug() << "Read game path value:" << gamePath;
const QString levelPath = settings.value("levelPath").toString();
Expand Down
40 changes: 38 additions & 2 deletions src/TombRaiderLinuxLauncher.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,66 @@

#include <QMainWindow>
#include <QSettings>
//#include "controller.h"
#include "controller.h"

QT_BEGIN_NAMESPACE
namespace Ui { class TombRaiderLinuxLauncher; }
QT_END_NAMESPACE

/**
*
*/
class TombRaiderLinuxLauncher : public QMainWindow
{
Q_OBJECT
public:
/**
*
*/
TombRaiderLinuxLauncher(QWidget *parent = nullptr);
/**
*
*/
~TombRaiderLinuxLauncher();

public slots:
/**
*
*/
void linkClicked();
/**
*
*/
void downloadClicked();
/**
*
*/
void setOptionsClicked();

private:
/**
*
*/
void setup();
/**
*
*/
void readSavedSettings();
/**
*
*/
void checkCommonFiles();
/**
*
*/
void generateList();


/**
* 0 Game dose not exist.
* 1 The path is a symbolic link.
* 2 The path is not a symbolic link.
* 3 value 3:The path is not a directory.
*/
int checkGameDirectory(int game);
QString selected;
QSettings settings;
Expand Down
16 changes: 16 additions & 0 deletions src/controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,31 @@
#define CONTROLLER_H
#include <QObject>
#include "worker.h"
/**
* @brief The controller is the way for the UI to with blocking thread work
*
*/
class Controller : public QObject
{
Q_OBJECT
public:
/**
*
*/
explicit Controller(QObject *parent = nullptr);
/**
*
*/
void startWorkerThread();
/**
*
*/
void stopWorkerThread();

private slots:
/**
*
*/
void onWorkerThreadFinished();

private:
Expand Down
3 changes: 3 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
#include <QApplication>


/**
*
*/
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Expand Down
28 changes: 16 additions & 12 deletions src/network.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,24 @@
#include <QFile>
#include <QDebug>

/**
* //Example usage
* FileDownloader downloader;
* QUrl url("https://example.com/sample.txt");
* QString localFilePath = "downloaded_file.txt";
* downloader.downloadFile(url, localFilePath);
*/
class FileDownloader : public QObject
{
Q_OBJECT
public:
/**
*
*/
explicit FileDownloader(QObject *parent = nullptr) : QObject(parent) {}
/**
*
*/
void downloadFile(const QUrl &url, const QString &localFilePath)
{
// Create a QNetworkAccessManager
Expand Down Expand Up @@ -39,6 +52,9 @@ class FileDownloader : public QObject
});
}
private:
/**
*
*/
void saveToFile(QIODevice *data, const QString &filePath)
{
// Open the local file for writing
Expand All @@ -50,15 +66,3 @@ class FileDownloader : public QObject
}
}
};




/**Example usage**********************************
*
* FileDownloader downloader;
* QUrl url("https://example.com/sample.txt");
* QString localFilePath = "downloaded_file.txt";
* downloader.downloadFile(url, localFilePath);
*************************************************/

Loading

0 comments on commit 62219a7

Please sign in to comment.