Limo
A simple mod manager
Loading...
Searching...
No Matches
addtooldialog.h
Go to the documentation of this file.
1
5
6#pragma once
7
8#include <QDialog>
9#include "edittoolwidget.h"
10
11
12namespace Ui
13{
14class AddToolDialog;
15}
16
20class AddToolDialog : public QDialog
21{
22 Q_OBJECT
23
24public:
29 explicit AddToolDialog(QWidget* parent = nullptr);
32
33private:
35 Ui::AddToolDialog* ui;
37 bool dialog_completed_ = false;
42 bool is_edit_mode_ = false;
47
48public:
53 void setAddMode(int app_id);
60 void setEditMode(int app_id, int tool_id, Tool tool);
61
62private slots:
67 void toolWidgetInputValidityChanged(bool is_valid);
70
71signals:
77 void toolAdded(int app_id, Tool tool);
84 void toolEdited(int app_id, int tool_id, Tool tool);
85};
AddToolDialog(QWidget *parent=nullptr)
Initializes the UI.
Definition addtooldialog.cpp:6
~AddToolDialog()
Deletes the UI.
Definition addtooldialog.cpp:16
void setAddMode(int app_id)
Initializes the dialog for adding a new tool.
Definition addtooldialog.cpp:26
bool is_edit_mode_
If true: Dialog is used to edit an existing tool. Else: Dialog is used to add a new tool.
Definition addtooldialog.h:42
void onButtonBoxAccepted()
Closes the dialog and emits a signal for completion.
Definition addtooldialog.cpp:45
int app_id_
Id of the app to which the edited tool belongs.
Definition addtooldialog.h:44
Ui::AddToolDialog * ui
Contains auto-generated UI elements.
Definition addtooldialog.h:35
void toolWidgetInputValidityChanged(bool is_valid)
Updates the Ok button when the new input is valid.
Definition addtooldialog.cpp:21
void toolEdited(int app_id, int tool_id, Tool tool)
Signals dialog completion in edit mode.
void setEditMode(int app_id, int tool_id, Tool tool)
Initializes the dialog for editing an existing tool.
Definition addtooldialog.cpp:35
void toolAdded(int app_id, Tool tool)
Signals dialog completion in add mode.
int tool_id_
If in edit mode: Id of the edited tool.
Definition addtooldialog.h:46
bool dialog_completed_
Indicates whether the dialog has been completed.
Definition addtooldialog.h:37
Represents a third party tool to be run from within Limo.
Definition tool.h:17
Header for the EditToolWidget class.