mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-20 20:06:12 +00:00
Modified documentation format (#1240)
This commit is contained in:
parent
687ef2d799
commit
003d0d3c26
@ -26,9 +26,9 @@ protected:
|
||||
bool event(QEvent *e);
|
||||
|
||||
private:
|
||||
/*!
|
||||
* \brief Load and translations depending on Language settings
|
||||
* \return true on success
|
||||
/**
|
||||
* @brief Load and translations depending on Language settings
|
||||
* @return true on success
|
||||
*/
|
||||
bool loadTranslations();
|
||||
|
||||
@ -38,15 +38,15 @@ private:
|
||||
};
|
||||
|
||||
|
||||
/*!
|
||||
* \brief CutterProxyStyle is used to force shortcuts displaying in context menu
|
||||
/**
|
||||
* @brief CutterProxyStyle is used to force shortcuts displaying in context menu
|
||||
*/
|
||||
class CutterProxyStyle : public QProxyStyle
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/*!
|
||||
* \brief it is enough to get notification about QMenu polishing to force shortcut displaying
|
||||
/**
|
||||
* @brief it is enough to get notification about QMenu polishing to force shortcut displaying
|
||||
*/
|
||||
void polish(QWidget *widget) override;
|
||||
};
|
||||
|
@ -2,8 +2,8 @@
|
||||
#include "CutterApplication.h"
|
||||
#include "core/MainWindow.h"
|
||||
|
||||
/*!
|
||||
* \brief Migrate Settings used before Cutter 1.8
|
||||
/**
|
||||
* @brief Migrate Settings used before Cutter 1.8
|
||||
*/
|
||||
static void migrateSettings(QSettings &newSettings)
|
||||
{
|
||||
|
@ -11,8 +11,8 @@ BasicBlockHighlighter::~BasicBlockHighlighter()
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Highlight the basic block at address
|
||||
/**
|
||||
* @brief Highlight the basic block at address
|
||||
*/
|
||||
void BasicBlockHighlighter::highlight(RVA address, const QColor &color)
|
||||
{
|
||||
@ -22,16 +22,16 @@ void BasicBlockHighlighter::highlight(RVA address, const QColor &color)
|
||||
bbMap[address] = block;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Clear the basic block highlighting
|
||||
/**
|
||||
* @brief Clear the basic block highlighting
|
||||
*/
|
||||
void BasicBlockHighlighter::clear(RVA address)
|
||||
{
|
||||
bbMap.erase(address);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Return a highlighted basic block
|
||||
/**
|
||||
* @brief Return a highlighted basic block
|
||||
*
|
||||
* If there is nothing to highlight at specified address, returns nullptr
|
||||
*/
|
||||
|
@ -16,8 +16,8 @@ const QList<CutterQtTheme> kCutterQtThemesList = {
|
||||
|
||||
Configuration *Configuration::mPtr = nullptr;
|
||||
|
||||
/*!
|
||||
* \brief All asm.* options saved as settings. Values are the default values.
|
||||
/**
|
||||
* @brief All asm.* options saved as settings. Values are the default values.
|
||||
*/
|
||||
static const QHash<QString, QVariant> asmOptions = {
|
||||
{ "asm.esil", false },
|
||||
@ -136,28 +136,28 @@ void Configuration::resetAll()
|
||||
emit fontsUpdated();
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief get the current Locale set in Cutter's user configuration
|
||||
* \return a QLocale object describes user's current locale
|
||||
/**
|
||||
* @brief get the current Locale set in Cutter's user configuration
|
||||
* @return a QLocale object describes user's current locale
|
||||
*/
|
||||
QLocale Configuration::getCurrLocale() const
|
||||
{
|
||||
return s.value("locale", QLocale().system()).toLocale();
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief sets Cutter's locale
|
||||
* \param l - a QLocale object describes the locate to configure
|
||||
/**
|
||||
* @brief sets Cutter's locale
|
||||
* @param l - a QLocale object describes the locate to configure
|
||||
*/
|
||||
void Configuration::setLocale(const QLocale &l)
|
||||
{
|
||||
s.setValue("locale", l);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief set Cutter's interface language by a given locale name
|
||||
* \param language - a string represents the name of a locale language
|
||||
* \return true on success
|
||||
/**
|
||||
* @brief set Cutter's interface language by a given locale name
|
||||
* @param language - a string represents the name of a locale language
|
||||
* @return true on success
|
||||
*/
|
||||
bool Configuration::setLocaleByName(const QString &language)
|
||||
{
|
||||
@ -353,10 +353,10 @@ QString Configuration::getLogoFile()
|
||||
: QString(":/img/cutter_plain.svg");
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Configuration::setColor sets the local Cutter configuration color
|
||||
* \param name Color Name
|
||||
* \param color The color you want to set
|
||||
/**
|
||||
* @brief Configuration::setColor sets the local Cutter configuration color
|
||||
* @param name Color Name
|
||||
* @param color The color you want to set
|
||||
*/
|
||||
void Configuration::setColor(const QString &name, const QColor &color)
|
||||
{
|
||||
@ -471,9 +471,9 @@ void Configuration::setConfig(const QString &key, const QVariant &value)
|
||||
Core()->setConfig(key, value);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief this function will gather and return available translation for Cutter
|
||||
* \return a list of all available translations
|
||||
/**
|
||||
* @brief this function will gather and return available translation for Cutter
|
||||
* @return a list of all available translations
|
||||
*/
|
||||
QStringList Configuration::getAvailableTranslations()
|
||||
{
|
||||
@ -514,9 +514,9 @@ QStringList Configuration::getAvailableTranslations()
|
||||
return languages << QLatin1String("English");
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief check if this is the first time Cutter's is executed on this computer
|
||||
* \return true if this is first execution; otherwise returns false.
|
||||
/**
|
||||
* @brief check if this is the first time Cutter's is executed on this computer
|
||||
* @return true if this is first execution; otherwise returns false.
|
||||
*/
|
||||
bool Configuration::isFirstExecution()
|
||||
{
|
||||
|
@ -97,23 +97,23 @@ public:
|
||||
QString getColorTheme() const { return s.value("theme", "cutter").toString(); }
|
||||
void setColorTheme(const QString &theme);
|
||||
|
||||
/*!
|
||||
* \brief Get the value of a config var either from r2 or settings, depending on the key.
|
||||
/**
|
||||
* @brief Get the value of a config var either from r2 or settings, depending on the key.
|
||||
*/
|
||||
QVariant getConfigVar(const QString &key);
|
||||
bool getConfigBool(const QString &key);
|
||||
int getConfigInt(const QString &key);
|
||||
QString getConfigString(const QString &key);
|
||||
|
||||
/*!
|
||||
* \brief Set the value of a config var either to r2 or settings, depending on the key.
|
||||
/**
|
||||
* @brief Set the value of a config var either to r2 or settings, depending on the key.
|
||||
*/
|
||||
void setConfig(const QString &key, const QVariant &value);
|
||||
bool isFirstExecution();
|
||||
|
||||
/*!
|
||||
* \brief Get list of available translation directories (depends on configuration and OS)
|
||||
* \return list of directories
|
||||
/**
|
||||
* @brief Get list of available translation directories (depends on configuration and OS)
|
||||
* @return list of directories
|
||||
*/
|
||||
QStringList getTranslationsDirectories() const;
|
||||
|
||||
|
@ -29,8 +29,8 @@ public:
|
||||
void restoreThread();
|
||||
void saveThread();
|
||||
|
||||
/*!
|
||||
* \brief RAII Helper class to call restoreThread() and saveThread() automatically
|
||||
/**
|
||||
* @brief RAII Helper class to call restoreThread() and saveThread() automatically
|
||||
*
|
||||
* As long as an object of this class is in scope, the Python thread will remain restored.
|
||||
*/
|
||||
|
@ -10,8 +10,8 @@ class RefreshDeferrer;
|
||||
using RefreshDeferrerParams = void *;
|
||||
using RefreshDeferrerParamsResult = void *;
|
||||
|
||||
/*!
|
||||
* \brief Abstract class for accumulating params in RefreshDeferrer
|
||||
/**
|
||||
* @brief Abstract class for accumulating params in RefreshDeferrer
|
||||
*/
|
||||
class RefreshDeferrerAccumulator
|
||||
{
|
||||
@ -21,31 +21,31 @@ public:
|
||||
virtual ~RefreshDeferrerAccumulator() = default;
|
||||
|
||||
protected:
|
||||
/*!
|
||||
* \brief Add a new param to the accumulator
|
||||
/**
|
||||
* @brief Add a new param to the accumulator
|
||||
*/
|
||||
virtual void accumulate(RefreshDeferrerParams params) =0;
|
||||
|
||||
/*!
|
||||
* \brief Ignore the incoming params. Useful for freeing if necessary.
|
||||
/**
|
||||
* @brief Ignore the incoming params. Useful for freeing if necessary.
|
||||
*/
|
||||
virtual void ignoreParams(RefreshDeferrerParams params) =0;
|
||||
|
||||
/*!
|
||||
* \brief Clear the current accumulator
|
||||
/**
|
||||
* @brief Clear the current accumulator
|
||||
*/
|
||||
virtual void clear() =0;
|
||||
|
||||
/*!
|
||||
* \brief Return the final result of the accumulation
|
||||
/**
|
||||
* @brief Return the final result of the accumulation
|
||||
*/
|
||||
virtual RefreshDeferrerParamsResult result() =0;
|
||||
};
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Accumulator which simply replaces the current value by an incoming new one
|
||||
* \tparam T The type of the param to store
|
||||
/**
|
||||
* @brief Accumulator which simply replaces the current value by an incoming new one
|
||||
* @tparam T The type of the param to store
|
||||
*
|
||||
* This accumulator takes the ownership of all params passed to it and deletes them automatically if not needed anymore!
|
||||
*/
|
||||
@ -57,7 +57,7 @@ private:
|
||||
bool replaceIfNull;
|
||||
|
||||
public:
|
||||
/*!
|
||||
/**
|
||||
* \param Determines whether, if nullptr is passed, the current value should be replaced or kept.
|
||||
*/
|
||||
explicit ReplacingRefreshDeferrerAccumulator(bool replaceIfNull = true)
|
||||
@ -95,8 +95,8 @@ protected:
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief Helper class for deferred refreshing in Widgets
|
||||
/**
|
||||
* @brief Helper class for deferred refreshing in Widgets
|
||||
*
|
||||
* This class can handle the logic necessary to defer the refreshing of widgets when they are not visible.
|
||||
* It contains an optional RefreshDeferrerAccumulator, which can be used to accumulate incoming events while
|
||||
@ -138,8 +138,8 @@ private:
|
||||
bool dirty = false;
|
||||
|
||||
public:
|
||||
/*!
|
||||
* \param acc The accumulator (can be nullptr). The RefreshDeferrer takes the ownership!
|
||||
/**
|
||||
* @param acc The accumulator (can be nullptr). The RefreshDeferrer takes the ownership!
|
||||
*/
|
||||
explicit RefreshDeferrer(RefreshDeferrerAccumulator *acc, QObject *parent = nullptr);
|
||||
~RefreshDeferrer() override;
|
||||
|
@ -415,11 +415,11 @@ bool CutterCore::tryFile(QString path, bool rw)
|
||||
return true;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Opens a file using r2 API
|
||||
* \param path Path to file
|
||||
* \param mapaddr Map Address
|
||||
* \return bool
|
||||
/**
|
||||
* @brief Opens a file using r2 API
|
||||
* @param path Path to file
|
||||
* @param mapaddr Map Address
|
||||
* @return bool
|
||||
*/
|
||||
bool CutterCore::openFile(QString path, RVA mapaddr)
|
||||
{
|
||||
|
@ -106,8 +106,8 @@ public:
|
||||
void setImmediateBase(const QString &r2BaseName, RVA offset = RVA_INVALID);
|
||||
void setCurrentBits(int bits, RVA offset = RVA_INVALID);
|
||||
|
||||
/*!
|
||||
* \brief Changes immediate displacement to structure offset
|
||||
/**
|
||||
* @brief Changes immediate displacement to structure offset
|
||||
* This function makes use of the "ta" command of r2 to apply structure
|
||||
* offset to the immediate displacement used in the given instruction
|
||||
* \param structureOffset The name of struct which will be applied
|
||||
@ -291,38 +291,38 @@ public:
|
||||
QList<ResourcesDescription> getAllResources();
|
||||
QList<VTableDescription> getAllVTables();
|
||||
|
||||
/*!
|
||||
* \return all loaded types
|
||||
/**
|
||||
* @return all loaded types
|
||||
*/
|
||||
QList<TypeDescription> getAllTypes();
|
||||
|
||||
/*!
|
||||
* \return all loaded primitive types
|
||||
/**
|
||||
* @return all loaded primitive types
|
||||
*/
|
||||
QList<TypeDescription> getAllPrimitiveTypes();
|
||||
|
||||
/*!
|
||||
* \return all loaded unions
|
||||
/**
|
||||
* @return all loaded unions
|
||||
*/
|
||||
QList<TypeDescription> getAllUnions();
|
||||
|
||||
/*!
|
||||
* \return all loaded structs
|
||||
/**
|
||||
* @return all loaded structs
|
||||
*/
|
||||
QList<TypeDescription> getAllStructs();
|
||||
|
||||
/*!
|
||||
* \return all loaded enums
|
||||
/**
|
||||
* @return all loaded enums
|
||||
*/
|
||||
QList<TypeDescription> getAllEnums();
|
||||
|
||||
/*!
|
||||
* \return all loaded typedefs
|
||||
/**
|
||||
* @return all loaded typedefs
|
||||
*/
|
||||
QList<TypeDescription> getAllTypedefs();
|
||||
|
||||
/*!
|
||||
* \brief Adds new types
|
||||
/**
|
||||
* @brief Adds new types
|
||||
* It first uses the r_parse_c_string() function from radare2 API to parse the
|
||||
* supplied C file (in the form of a string). If there were errors, they are displayed.
|
||||
* If there were no errors, it uses sdb_query_lines() function from radare2 API
|
||||
@ -333,10 +333,10 @@ public:
|
||||
QString addTypes(const char *str);
|
||||
QString addTypes(const QString &str) { return addTypes(str.toUtf8().constData()); }
|
||||
|
||||
/*!
|
||||
* \brief Checks if the given address is mapped to a region
|
||||
* \param addr The address to be checked
|
||||
* \return true if addr is mapped, false otherwise
|
||||
/**
|
||||
* @brief Checks if the given address is mapped to a region
|
||||
* @param addr The address to be checked
|
||||
* @return true if addr is mapped, false otherwise
|
||||
*/
|
||||
bool isAddressMapped(RVA addr);
|
||||
|
||||
@ -394,19 +394,19 @@ signals:
|
||||
|
||||
void projectSaved(bool successfully, const QString &name);
|
||||
|
||||
/*!
|
||||
/**
|
||||
* emitted when config regarding disassembly display changes
|
||||
*/
|
||||
void asmOptionsChanged();
|
||||
|
||||
/*!
|
||||
/**
|
||||
* emitted when config regarding graph display changes
|
||||
*/
|
||||
void graphOptionsChanged();
|
||||
|
||||
/*!
|
||||
* \brief seekChanged is emitted each time radare2 seek value is modified
|
||||
* \param offset
|
||||
/**
|
||||
* @brief seekChanged is emitted each time radare2 seek value is modified
|
||||
* @param offset
|
||||
*/
|
||||
void seekChanged(RVA offset);
|
||||
|
||||
|
@ -25,18 +25,18 @@
|
||||
// Global information for Cutter
|
||||
#define APPNAME "Cutter"
|
||||
|
||||
/*!
|
||||
* \brief Type to be used for all kinds of addresses/offsets in r2 address space.
|
||||
/**
|
||||
* @brief Type to be used for all kinds of addresses/offsets in r2 address space.
|
||||
*/
|
||||
typedef ut64 RVA;
|
||||
|
||||
/*!
|
||||
* \brief Maximum value of RVA. Do NOT use this for specifying invalid values, use RVA_INVALID instead.
|
||||
/**
|
||||
* @brief Maximum value of RVA. Do NOT use this for specifying invalid values, use RVA_INVALID instead.
|
||||
*/
|
||||
#define RVA_MAX UT64_MAX
|
||||
|
||||
/*!
|
||||
* \brief Value for specifying an invalid RVA.
|
||||
/**
|
||||
* @brief Value for specifying an invalid RVA.
|
||||
*/
|
||||
#define RVA_INVALID RVA_MAX
|
||||
|
||||
|
@ -433,8 +433,8 @@ void MainWindow::openNewFileFailed()
|
||||
mb.exec();
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief displays the WelocmeDialog
|
||||
/**
|
||||
* @brief displays the WelocmeDialog
|
||||
*
|
||||
* Upon first execution of Cutter, the WelcomeDialog would be showed to the user.
|
||||
* The Welcome dialog would be showed after a reset of Cutter's preferences by the user.
|
||||
@ -1179,8 +1179,8 @@ void MainWindow::addDockWidgetAction(QDockWidget *dockWidget, QAction *action)
|
||||
this->dockWidgetActions[action] = dockWidget;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Show a warning message box.
|
||||
/**
|
||||
* @brief Show a warning message box.
|
||||
*
|
||||
* This API can either be used in Cutter internals, or by Python plugins.
|
||||
*/
|
||||
|
@ -79,13 +79,13 @@ public:
|
||||
|
||||
void initUI();
|
||||
|
||||
/*!
|
||||
/**
|
||||
* @param quit whether to show destructive button in dialog
|
||||
* @return if quit is true, false if the application should not close
|
||||
*/
|
||||
bool saveProject(bool quit = false);
|
||||
|
||||
/*!
|
||||
/**
|
||||
* @param quit whether to show destructive button in dialog
|
||||
* @return false if the application should not close
|
||||
*/
|
||||
|
@ -17,8 +17,8 @@ class EditMethodDialog : public QDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/*!
|
||||
* \param classFixed whether the user should be able to change the class. If false, a QComboBox will be shown, otherwise a plain QLabel.
|
||||
/**
|
||||
* @param classFixed whether the user should be able to change the class. If false, a QComboBox will be shown, otherwise a plain QLabel.
|
||||
*/
|
||||
explicit EditMethodDialog(bool classFixed, QWidget *parent = nullptr);
|
||||
~EditMethodDialog();
|
||||
@ -29,24 +29,24 @@ public:
|
||||
QString getClass();
|
||||
AnalMethodDescription getMethod();
|
||||
|
||||
/*!
|
||||
* \brief Helper function to display the dialog
|
||||
/**
|
||||
* @brief Helper function to display the dialog
|
||||
*
|
||||
* \param title title of the dialog
|
||||
* \param classFixed whether the user should be able to change the class
|
||||
* \param className initial class name, will be overwritten if the user changed the class
|
||||
* \param desc initial data for the method information
|
||||
* \return whether the dialog was accepted by the user
|
||||
* @param title title of the dialog
|
||||
* @param classFixed whether the user should be able to change the class
|
||||
* @param className initial class name, will be overwritten if the user changed the class
|
||||
* @param desc initial data for the method information
|
||||
* @return whether the dialog was accepted by the user
|
||||
*/
|
||||
static bool showDialog(const QString &title, bool classFixed, QString *className, AnalMethodDescription *desc, QWidget *parent = nullptr);
|
||||
|
||||
/*!
|
||||
* \brief Show the dialog to add a new method a given class
|
||||
/**
|
||||
* @brief Show the dialog to add a new method a given class
|
||||
*/
|
||||
static void newMethod(QString className = nullptr, const QString &meth = QString(), QWidget *parent = nullptr);
|
||||
|
||||
/*!
|
||||
* \brief Show the dialog to edit a given method of a given class
|
||||
/**
|
||||
* @brief Show the dialog to edit a given method of a given class
|
||||
*/
|
||||
static void editMethod(const QString &className, const QString &meth, QWidget *parent = nullptr);
|
||||
|
||||
@ -62,7 +62,7 @@ private:
|
||||
|
||||
QComboBox *classComboBox = nullptr;
|
||||
QLabel *classLabel = nullptr;
|
||||
/*!
|
||||
/**
|
||||
* This will only be used when the dialog was created with classFixed = true in order to remember the class name.
|
||||
*/
|
||||
QString fixedClass;
|
||||
|
@ -16,46 +16,46 @@ public:
|
||||
explicit LinkTypeDialog(QWidget *parent = nullptr);
|
||||
~LinkTypeDialog();
|
||||
|
||||
/*!
|
||||
* \brief Sets the default type which will be displayed in the combo box
|
||||
* \param type Default type to be used as default type
|
||||
/**
|
||||
* @brief Sets the default type which will be displayed in the combo box
|
||||
* @param type Default type to be used as default type
|
||||
*/
|
||||
void setDefaultType(const QString &type);
|
||||
|
||||
/*!
|
||||
* \brief Sets the value of the default address which will be displayed
|
||||
/**
|
||||
* @brief Sets the value of the default address which will be displayed
|
||||
* If the given address is linked to a type, then it also sets the default
|
||||
* type to the currently linked type
|
||||
* \param address The address to be used as default address
|
||||
* @param address The address to be used as default address
|
||||
*/
|
||||
void setDefaultAddress(QString address);
|
||||
|
||||
private slots:
|
||||
|
||||
/*!
|
||||
* \brief Overrides the done() method of QDialog
|
||||
/**
|
||||
* @brief Overrides the done() method of QDialog
|
||||
* On clicking the Ok button, it links a valid address to a type.
|
||||
* If "(No Type)" is selected as type, it removes the link.
|
||||
* In case of an invalid address, it displays error message
|
||||
* \param r The value which will be returned by exec()
|
||||
* @param r The value which will be returned by exec()
|
||||
*/
|
||||
void done(int r) override;
|
||||
|
||||
/*!
|
||||
* \brief Executed whenever the text inside exprLineEdit changes
|
||||
/**
|
||||
* @brief Executed whenever the text inside exprLineEdit changes
|
||||
* If expression evaluates to valid address, it is displayed in addressLineEdit
|
||||
* Otherwise "Invalid Address" is shown in addressLineEdit
|
||||
* \param text The current value of exprLineEdit
|
||||
* @param text The current value of exprLineEdit
|
||||
*/
|
||||
void on_exprLineEdit_textChanged(const QString &text);
|
||||
|
||||
private:
|
||||
Ui::LinkTypeDialog *ui;
|
||||
|
||||
/*!
|
||||
* \brief Used for finding the type which is linked to the given address
|
||||
* \param address
|
||||
* \return The type linked to "address" if it exists, or empty string otherwise
|
||||
/**
|
||||
* @brief Used for finding the type which is linked to the given address
|
||||
* @param address
|
||||
* @return The type linked to "address" if it exists, or empty string otherwise
|
||||
*/
|
||||
QString findLinkedType(RVA address);
|
||||
};
|
||||
|
@ -18,22 +18,22 @@ public:
|
||||
~LoadNewTypesDialog();
|
||||
|
||||
private slots:
|
||||
/*!
|
||||
* \brief Executed when the user clicks the selectFileButton
|
||||
/**
|
||||
* @brief Executed when the user clicks the selectFileButton
|
||||
* Opens a File Dialog from where the user can select a file from where
|
||||
* the types will be loaded.
|
||||
*/
|
||||
void on_selectFileButton_clicked();
|
||||
|
||||
/*!
|
||||
* \brief Executed whenever the text inside the textbox changes
|
||||
/**
|
||||
* @brief Executed whenever the text inside the textbox changes
|
||||
* When the text box is empty, the OK button is disabled.
|
||||
*/
|
||||
void on_plainTextEdit_textChanged();
|
||||
|
||||
/*!
|
||||
* \brief done Closes the dialog and sets its result code to r
|
||||
* \param r The value which will be returned by exec()
|
||||
/**
|
||||
* @brief done Closes the dialog and sets its result code to r
|
||||
* @param r The value which will be returned by exec()
|
||||
*/
|
||||
void done(int r) override;
|
||||
|
||||
@ -42,8 +42,8 @@ private:
|
||||
SyntaxHighlighter *syntaxHighLighter;
|
||||
|
||||
signals:
|
||||
/*!
|
||||
* \brief Emitted when new types are loaded
|
||||
/**
|
||||
* @brief Emitted when new types are loaded
|
||||
*/
|
||||
void newTypesLoaded();
|
||||
};
|
||||
|
@ -46,12 +46,12 @@ protected:
|
||||
private:
|
||||
std::unique_ptr<Ui::NewFileDialog> ui;
|
||||
|
||||
/*!
|
||||
/**
|
||||
* @return true if list is not empty
|
||||
*/
|
||||
bool fillRecentFilesList();
|
||||
|
||||
/*!
|
||||
/**
|
||||
* @return true if list is not empty
|
||||
*/
|
||||
bool fillProjectsList();
|
||||
|
@ -8,8 +8,8 @@ namespace Ui {
|
||||
class RenameDialog;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief General Dialog for entering a name
|
||||
/**
|
||||
* @brief General Dialog for entering a name
|
||||
*/
|
||||
class RenameDialog : public QDialog
|
||||
{
|
||||
@ -24,13 +24,13 @@ public:
|
||||
|
||||
void setPlaceholderText(const QString &text);
|
||||
|
||||
/*!
|
||||
* \brief Helper function to display and execute the dialog
|
||||
/**
|
||||
* @brief Helper function to display and execute the dialog
|
||||
*
|
||||
* \param title title of the dialog
|
||||
* \param name initial name, will be overwritten if the user entered something else
|
||||
* \param placeholder placeholder text for the QLineEdit
|
||||
* \return whether the dialog was accepted by the user
|
||||
* @param title title of the dialog
|
||||
* @param name initial name, will be overwritten if the user entered something else
|
||||
* @param placeholder placeholder text for the QLineEdit
|
||||
* @return whether the dialog was accepted by the user
|
||||
*/
|
||||
static bool showDialog(const QString &title, QString *name, const QString &placeholder, QWidget *parent = nullptr);
|
||||
|
||||
|
@ -7,9 +7,9 @@
|
||||
|
||||
#include "ui_WelcomeDialog.h"
|
||||
|
||||
/*!
|
||||
* \brief Constructs a WelcomeDialog object
|
||||
* \param parent
|
||||
/**
|
||||
* @brief Constructs a WelcomeDialog object
|
||||
* @param parent
|
||||
*/
|
||||
WelcomeDialog::WelcomeDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
@ -38,17 +38,17 @@ WelcomeDialog::WelcomeDialog(QWidget *parent) :
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Destroys the WelcomeDialog
|
||||
/**
|
||||
* @brief Destroys the WelcomeDialog
|
||||
*/
|
||||
WelcomeDialog::~WelcomeDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief change Cutter's QT Theme as selected by the user
|
||||
* \param index - a Slot being called after theme's value changes its index
|
||||
/**
|
||||
* @brief change Cutter's QT Theme as selected by the user
|
||||
* @param index - a Slot being called after theme's value changes its index
|
||||
*/
|
||||
void WelcomeDialog::on_themeComboBox_currentIndexChanged(int index)
|
||||
{
|
||||
@ -63,9 +63,9 @@ void WelcomeDialog::on_themeComboBox_currentIndexChanged(int index)
|
||||
ui->logoSvgWidget->load(Config()->getLogoFile());
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief change Cutter's interface language as selected by the user
|
||||
* \param index - a Slot being called after language combo box value changes its index
|
||||
/**
|
||||
* @brief change Cutter's interface language as selected by the user
|
||||
* @param index - a Slot being called after language combo box value changes its index
|
||||
*/
|
||||
void WelcomeDialog::onLanguageComboBox_currentIndexChanged(int index)
|
||||
{
|
||||
@ -80,8 +80,8 @@ void WelcomeDialog::onLanguageComboBox_currentIndexChanged(int index)
|
||||
mb.exec();
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief show Cutter's About dialog
|
||||
/**
|
||||
* @brief show Cutter's About dialog
|
||||
*/
|
||||
void WelcomeDialog::on_checkUpdateButton_clicked()
|
||||
{
|
||||
@ -90,8 +90,8 @@ void WelcomeDialog::on_checkUpdateButton_clicked()
|
||||
a->open();
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief accept user preferences, close the window and continue Cutter's execution
|
||||
/**
|
||||
* @brief accept user preferences, close the window and continue Cutter's execution
|
||||
*/
|
||||
void WelcomeDialog::on_continueButton_clicked()
|
||||
{
|
||||
|
@ -5,9 +5,9 @@
|
||||
|
||||
namespace Ui {
|
||||
|
||||
/*!
|
||||
* \class WelcomeDialog
|
||||
* \brief The WelcomeDialog class will show the user the Welcome windows
|
||||
/**
|
||||
* @class WelcomeDialog
|
||||
* @brief The WelcomeDialog class will show the user the Welcome windows
|
||||
* upon first execution of Cutter.
|
||||
*
|
||||
* Upon first execution of Cutter, the WelcomeDialog would be showed to the user.
|
||||
|
@ -20,9 +20,9 @@ public slots:
|
||||
void setOffset(RVA offset);
|
||||
void setCanCopy(bool enabled);
|
||||
|
||||
/*!
|
||||
* \brief Sets the value of curHighlightedWord
|
||||
* \param text The current highlighted word
|
||||
/**
|
||||
* @brief Sets the value of curHighlightedWord
|
||||
* @param text The current highlighted word
|
||||
*/
|
||||
void setCurHighlightedWord(const QString &text);
|
||||
|
||||
@ -61,16 +61,16 @@ private slots:
|
||||
void on_actionSetToData_triggered();
|
||||
void on_actionSetToDataEx_triggered();
|
||||
|
||||
/*!
|
||||
* \brief Executed on selecting an offset from the structureOffsetMenu
|
||||
/**
|
||||
* @brief Executed on selecting an offset from the structureOffsetMenu
|
||||
* Uses the applyStructureOffset() function of CutterCore to apply the
|
||||
* structure offset
|
||||
* \param action The action which trigered the event
|
||||
*/
|
||||
void on_actionStructureOffsetMenu_triggered(QAction *action);
|
||||
|
||||
/*!
|
||||
* \brief Executed on selecting the "Link Type to Address" option
|
||||
/**
|
||||
* @brief Executed on selecting the "Link Type to Address" option
|
||||
* Opens the LinkTypeDialog box from where the user can link the address
|
||||
* to a type
|
||||
*/
|
||||
@ -91,8 +91,8 @@ private:
|
||||
QKeySequence getDisplayOptionsSequence() const;
|
||||
QList<QKeySequence> getAddBPSequence() const;
|
||||
|
||||
/*!
|
||||
* \return the shortcut key for "Link Type to Address" option
|
||||
/**
|
||||
* @return the shortcut key for "Link Type to Address" option
|
||||
*/
|
||||
QKeySequence getLinkTypeSequence() const;
|
||||
|
||||
|
@ -17,13 +17,13 @@ public:
|
||||
PluginManager();
|
||||
~PluginManager();
|
||||
|
||||
/*!
|
||||
* \brief Load all plugins, should be called once on application start
|
||||
/**
|
||||
* @brief Load all plugins, should be called once on application start
|
||||
*/
|
||||
void loadPlugins();
|
||||
|
||||
/*!
|
||||
* \brief Destroy all loaded plugins, should be called once on application shutdown
|
||||
/**
|
||||
* @brief Destroy all loaded plugins, should be called once on application shutdown
|
||||
*/
|
||||
void destroyPlugins();
|
||||
|
||||
|
@ -18,36 +18,36 @@ class QTreeWidgetItem;
|
||||
class MainWindow;
|
||||
class ClassesWidget;
|
||||
|
||||
/*!
|
||||
* \brief Common abstract base class for Bin and Anal classes models
|
||||
/**
|
||||
* @brief Common abstract base class for Bin and Anal classes models
|
||||
*/
|
||||
class ClassesModel: public QAbstractItemModel
|
||||
{
|
||||
public:
|
||||
enum Columns { NAME = 0, TYPE, OFFSET, VTABLE, COUNT };
|
||||
|
||||
/*!
|
||||
* \brief values for TypeRole data
|
||||
/**
|
||||
* @brief values for TypeRole data
|
||||
*/
|
||||
enum class RowType { Class = 0, Base, VTable, Method, Field };
|
||||
|
||||
/*!
|
||||
* \brief Offset role of data for QModelIndex
|
||||
/**
|
||||
* @brief Offset role of data for QModelIndex
|
||||
*
|
||||
* will contain values of type RVA
|
||||
*/
|
||||
static const int OffsetRole = Qt::UserRole;
|
||||
|
||||
/*!
|
||||
* \brief Name role of data for QModelIndex
|
||||
/**
|
||||
* @brief Name role of data for QModelIndex
|
||||
*
|
||||
* will contain values of QString, used for sorting,
|
||||
* as well as identifying classes and methods
|
||||
*/
|
||||
static const int NameRole = Qt::UserRole + 1;
|
||||
|
||||
/*!
|
||||
* \brief Type role of data for QModelIndex
|
||||
/**
|
||||
* @brief Type role of data for QModelIndex
|
||||
*
|
||||
* will contain values of RowType
|
||||
*/
|
||||
@ -87,8 +87,8 @@ class AnalClassesModel: public ClassesModel
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
/*!
|
||||
* \brief List entry below a class
|
||||
/**
|
||||
* @brief List entry below a class
|
||||
*
|
||||
* This roughly corresponds to attributes of r2 anal classes, which means it is not an attribute in the sense of
|
||||
* a class member variable, but any kind of sub-info associated with the class.
|
||||
@ -104,15 +104,15 @@ private:
|
||||
Attribute(Type type, const QVariant &data) : type(type), data(data) {}
|
||||
};
|
||||
|
||||
/*!
|
||||
/**
|
||||
* This must always stay sorted alphabetically.
|
||||
*/
|
||||
QList<QString> classes;
|
||||
|
||||
RefreshDeferrer *refreshDeferrer;
|
||||
|
||||
/*!
|
||||
* \brief Cache for class attributes
|
||||
/**
|
||||
* @brief Cache for class attributes
|
||||
*
|
||||
* Maps class names to a list of Attributes.
|
||||
* This is filled only when the attributes of a specific class are requested.
|
||||
|
@ -17,9 +17,9 @@ public:
|
||||
bool eventFilter(QObject *object, QEvent *event) override;
|
||||
bool isVisibleToUser() { return isVisibleToUserCurrent; }
|
||||
|
||||
/*!
|
||||
* \brief Convenience method for creating and registering a RefreshDeferrer without any parameters
|
||||
* \param refreshNowFunc lambda taking no parameters, called when a refresh should occur
|
||||
/**
|
||||
* @brief Convenience method for creating and registering a RefreshDeferrer without any parameters
|
||||
* @param refreshNowFunc lambda taking no parameters, called when a refresh should occur
|
||||
*/
|
||||
template<typename Func>
|
||||
RefreshDeferrer *createRefreshDeferrer(Func refreshNowFunc)
|
||||
@ -32,10 +32,10 @@ public:
|
||||
return deferrer;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Convenience method for creating and registering a RefreshDeferrer with a replacing Accumulator
|
||||
* \param replaceIfNull passed to the ReplacingRefreshDeferrerAccumulator
|
||||
* \param refreshNowFunc lambda taking a single parameter of type ParamResult, called when a refresh should occur
|
||||
/**
|
||||
* @brief Convenience method for creating and registering a RefreshDeferrer with a replacing Accumulator
|
||||
* @param replaceIfNull passed to the ReplacingRefreshDeferrerAccumulator
|
||||
* @param refreshNowFunc lambda taking a single parameter of type ParamResult, called when a refresh should occur
|
||||
*/
|
||||
template<class ParamResult, typename Func>
|
||||
RefreshDeferrer *createReplacingRefreshDeferrer(bool replaceIfNull, Func refreshNowFunc)
|
||||
|
@ -55,7 +55,7 @@ private:
|
||||
|
||||
QString curHighlightedWord;
|
||||
|
||||
/*!
|
||||
/**
|
||||
* offset of lines below the first line of the current seek
|
||||
*/
|
||||
int cursorLineOffset;
|
||||
|
@ -63,7 +63,7 @@ public:
|
||||
QVariant data(const QModelIndex &index, int role) const;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||
|
||||
/*!
|
||||
/**
|
||||
* @return true if the index changed
|
||||
*/
|
||||
bool updateCurrentIndex();
|
||||
@ -139,8 +139,4 @@ private:
|
||||
void setScrollMode();
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // FUNCTIONSWIDGET_H
|
||||
|
@ -11,8 +11,8 @@ class OverviewView : public GraphView
|
||||
Q_OBJECT
|
||||
|
||||
signals:
|
||||
/*
|
||||
* \brief signal when mouse is pressed or moved so that
|
||||
/**
|
||||
* @brief signal when mouse is pressed or moved so that
|
||||
* Graph can refresh its contents corresponded with Overview
|
||||
*/
|
||||
void mouseMoved();
|
||||
@ -21,13 +21,13 @@ public:
|
||||
OverviewView(QWidget *parent);
|
||||
~OverviewView() override;
|
||||
|
||||
/*
|
||||
* \brief a rect on Overview to show where you are on Graph
|
||||
/**
|
||||
* @brief a rect on Overview to show where you are on Graph
|
||||
*/
|
||||
QRectF rangeRect;
|
||||
|
||||
/*
|
||||
* \brief Graph access this function to set minimum set of the data
|
||||
/**
|
||||
* @brief Graph access this function to set minimum set of the data
|
||||
* @param baseWidth width of Graph when it computed the blocks
|
||||
* @param baseHeigh height of Graph when it computed the blocks
|
||||
* @param baseBlocks computed blocks passed by Graph
|
||||
@ -35,80 +35,80 @@ public:
|
||||
void setData(int baseWidth, int baseHeight, std::unordered_map<ut64, GraphBlock> baseBlocks);
|
||||
|
||||
public slots:
|
||||
/*
|
||||
* \brief refresh the view and adjust the scale
|
||||
/**
|
||||
* @brief refresh the view and adjust the scale
|
||||
*/
|
||||
void refreshView();
|
||||
|
||||
private slots:
|
||||
/*
|
||||
* \brief update Colors.
|
||||
/**
|
||||
* @brief update Colors.
|
||||
* for example this will be called when the theme is changed.
|
||||
*/
|
||||
void colorsUpdatedSlot();
|
||||
|
||||
protected:
|
||||
/*
|
||||
* \brief mousePressEvent to start moving the rect.
|
||||
/**
|
||||
* @brief mousePressEvent to start moving the rect.
|
||||
*/
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
/*
|
||||
* \brief mouseReleaseEvent to tell not to move the rect anymore.
|
||||
/**
|
||||
* @brief mouseReleaseEvent to tell not to move the rect anymore.
|
||||
*/
|
||||
void mouseReleaseEvent(QMouseEvent *event) override;
|
||||
/*
|
||||
* \brief mouseMoveEvent to move the rect.
|
||||
/**
|
||||
* @brief mouseMoveEvent to move the rect.
|
||||
*/
|
||||
void mouseMoveEvent(QMouseEvent *event) override;
|
||||
/*
|
||||
* \brief override this to prevent scrolling
|
||||
/**
|
||||
* @brief override this to prevent scrolling
|
||||
*/
|
||||
void wheelEvent(QWheelEvent *event) override;
|
||||
|
||||
private:
|
||||
/*
|
||||
* \brief this will be handled in mouse events to move the rect properly
|
||||
/**
|
||||
* @brief this will be handled in mouse events to move the rect properly
|
||||
* along with the mouse.
|
||||
*/
|
||||
bool mouseActive = false;
|
||||
|
||||
/*
|
||||
* \brief save the initial distance
|
||||
/**
|
||||
* @brief save the initial distance
|
||||
* between the point where the mouse was pressed and the point of the rect
|
||||
* so as to change the rect point properly along with mouse.
|
||||
*/
|
||||
QPointF initialDiff;
|
||||
|
||||
/*
|
||||
* \brief draw the computed blocks passed by Graph
|
||||
/**
|
||||
* @brief draw the computed blocks passed by Graph
|
||||
*/
|
||||
virtual void drawBlock(QPainter &p, GraphView::GraphBlock &block) override;
|
||||
|
||||
/*
|
||||
* \brief override the edgeConfiguration so as to
|
||||
/**
|
||||
* @brief override the edgeConfiguration so as to
|
||||
* adjust the width of the edges by the scale
|
||||
* @return EdgeConfiguration
|
||||
*/
|
||||
virtual GraphView::EdgeConfiguration edgeConfiguration(GraphView::GraphBlock &from,
|
||||
GraphView::GraphBlock *to) override;
|
||||
|
||||
/*
|
||||
* \brief override the paintEvent to draw the rect on Overview
|
||||
/**
|
||||
* @brief override the paintEvent to draw the rect on Overview
|
||||
*/
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
|
||||
/*
|
||||
* \brief if the mouse is in the rect in Overview.
|
||||
/**
|
||||
* @brief if the mouse is in the rect in Overview.
|
||||
*/
|
||||
bool mouseContainsRect(QMouseEvent *event);
|
||||
|
||||
/*
|
||||
* \brief base background color changing depending on the theme
|
||||
/**
|
||||
* @brief base background color changing depending on the theme
|
||||
*/
|
||||
QColor disassemblyBackgroundColor;
|
||||
|
||||
/*
|
||||
* \brief color for each node changing depending on the theme
|
||||
/**
|
||||
* @brief color for each node changing depending on the theme
|
||||
*/
|
||||
QColor graphNodeColor;
|
||||
};
|
||||
|
@ -17,20 +17,20 @@ public:
|
||||
|
||||
private:
|
||||
RefreshDeferrer *refreshDeferrer;
|
||||
/*
|
||||
* \brief this takes care of scaling the overview when the widget is resized
|
||||
/**
|
||||
* @brief this takes care of scaling the overview when the widget is resized
|
||||
*/
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
|
||||
private slots:
|
||||
/*
|
||||
* \brief update the overview
|
||||
/**
|
||||
* @brief update the overview
|
||||
*/
|
||||
void updateContents();
|
||||
|
||||
signals:
|
||||
/*
|
||||
* \brief emit signal to update the rect
|
||||
/**
|
||||
* @brief emit signal to update the rect
|
||||
*/
|
||||
void resized();
|
||||
};
|
||||
|
@ -78,34 +78,34 @@ public:
|
||||
private slots:
|
||||
void refreshTypes();
|
||||
|
||||
/*!
|
||||
* \brief Show custom context menu
|
||||
* \param pt Position of the place where the right mouse button was clicked
|
||||
/**
|
||||
* @brief Show custom context menu
|
||||
* @param pt Position of the place where the right mouse button was clicked
|
||||
*/
|
||||
void showTypesContextMenu(const QPoint &pt);
|
||||
|
||||
/*!
|
||||
* \brief Executed on clicking the Export Types option in the context menu
|
||||
/**
|
||||
* @brief Executed on clicking the Export Types option in the context menu
|
||||
* It shows the user a file dialog box to select a file where the types
|
||||
* will be exported. It uses the "tc" command of radare2 to export the types.
|
||||
*/
|
||||
void on_actionExport_Types_triggered();
|
||||
|
||||
/*!
|
||||
* \brief Executed on clicking the Load New types option in the context menu
|
||||
/**
|
||||
* @brief Executed on clicking the Load New types option in the context menu
|
||||
* It will open the LoadNewTypesDialog where the user can either enter the
|
||||
* types manually, or can select a file from where the types will be loaded
|
||||
*/
|
||||
void on_actionLoad_New_Types_triggered();
|
||||
|
||||
/*!
|
||||
* \brief Executed on clicking the Delete Type option in the context menu
|
||||
/**
|
||||
* @brief Executed on clicking the Delete Type option in the context menu
|
||||
* Upon confirmation from the user, it will delete the selected type.
|
||||
*/
|
||||
void on_actionDelete_Type_triggered();
|
||||
|
||||
/*!
|
||||
* \brief Executed on clicking the Link To Address option in the context menu
|
||||
/**
|
||||
* @brief Executed on clicking the Link To Address option in the context menu
|
||||
* Opens the LinkTypeDialog box from where the user can link a address to a type
|
||||
*/
|
||||
void on_actionLink_Type_To_Address_triggered();
|
||||
@ -120,9 +120,9 @@ private:
|
||||
|
||||
void setScrollMode();
|
||||
|
||||
/*!
|
||||
* \brief Sets the contents of the ComboBox to the supplied contents
|
||||
* \param categories The list of categories which has to be added to the ComboBox
|
||||
/**
|
||||
* @brief Sets the contents of the ComboBox to the supplied contents
|
||||
* @param categories The list of categories which has to be added to the ComboBox
|
||||
*/
|
||||
void refreshCategoryCombo(const QStringList &categories);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user