Skip to content

Commit

Permalink
docs(exp): explained the file
Browse files Browse the repository at this point in the history
  • Loading branch information
eshanized committed May 9, 2024
1 parent cc957dd commit 3e578ee
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion qt/snigdhaosassistant.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,24 @@
//class for managing network operations
#include <QtNetwork/QNetworkAccessManager>

/*
* defines a namespace for the user interface of the application, typically generated by Qt Designer.
* QT_BEGIN_NAMESPACE and QT_END_NAMESPACE are macros used to enclose the Qt namespace.
*/
QT_BEGIN_NAMESPACE
namespace Ui {
class SnigdhaOSAssistant;
}
QT_END_NAMESPACE

//declares a class named SnigdhaOSAssistant, which inherits from QMainWindow.
//the Q_OBJECT macro is used to enable the Qt's meta-object system for this class, allowing features like signals and slots.
class SnigdhaOSAssistant : public QMainWindow
{
Q_OBJECT

//declares an enumeration type named State inside the SnigdhaOSAssistant class,
//containing various states that the application can be in.
public:
enum class State {
QUIT,
Expand All @@ -42,18 +50,27 @@ class SnigdhaOSAssistant : public QMainWindow
SUCCESS
};

//constructor and destructor declarations for the SnigdhaOSAssistant class.
//the constructor takes a QWidget pointer as the parent widget and a QString representing the initial state of the application.
//the destructor has no parameters.
SnigdhaOSAssistant(QWidget* parent = nullptr, QString state = "WELCOME");
~SnigdhaOSAssistant();

//declare private slots, which are functions that can be connected to signals from widgets
private slots:
void on_textWidget_buttonBox_clicked(QAbstractButton* button);
void on_selectWidget_buttonBox_clicked(QAbstractButton* button);


//These are private member variables of the SnigdhaOSAssistant class.
//ui is a pointer to the user interface object generated by Qt Designer.
//executable_modify_date is a QDateTime object representing the modification date of the executable.
//currentState is an instance of the State enumeration representing the current state of the application.
private:
Ui::SnigdhaOSAssistant *ui;
QDateTime executable_modify_date;
State currentState;
//private member functions of the SnigdhaOSAssistant class.
//they perform various tasks such as making internet requests, updating the application, populating select widgets, updating the application state, and relaunching the application.
void doInternetUpRequest();
void doUpdate();
void doApply();
Expand Down

0 comments on commit 3e578ee

Please sign in to comment.