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
12
namespace
Ui
13
{
14
class
AddToolDialog;
15
}
16
20
class
AddToolDialog
:
public
QDialog
21
{
22
Q_OBJECT
23
24
public
:
29
explicit
AddToolDialog
(QWidget* parent =
nullptr
);
31
~AddToolDialog
();
32
33
private
:
35
Ui::AddToolDialog*
ui
;
37
bool
dialog_completed_
=
false
;
42
bool
is_edit_mode_
=
false
;
44
int
app_id_
;
46
int
tool_id_
;
47
48
public
:
53
void
setAddMode
(
int
app_id);
60
void
setEditMode
(
int
app_id,
int
tool_id,
Tool
tool);
61
62
private
slots:
67
void
toolWidgetInputValidityChanged
(
bool
is_valid);
69
void
onButtonBoxAccepted
();
70
71
signals:
77
void
toolAdded
(
int
app_id,
Tool
tool);
84
void
toolEdited
(
int
app_id,
int
tool_id,
Tool
tool);
85
};
AddToolDialog::AddToolDialog
AddToolDialog(QWidget *parent=nullptr)
Initializes the UI.
Definition
addtooldialog.cpp:6
AddToolDialog::~AddToolDialog
~AddToolDialog()
Deletes the UI.
Definition
addtooldialog.cpp:16
AddToolDialog::setAddMode
void setAddMode(int app_id)
Initializes the dialog for adding a new tool.
Definition
addtooldialog.cpp:26
AddToolDialog::is_edit_mode_
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
AddToolDialog::onButtonBoxAccepted
void onButtonBoxAccepted()
Closes the dialog and emits a signal for completion.
Definition
addtooldialog.cpp:45
AddToolDialog::app_id_
int app_id_
Id of the app to which the edited tool belongs.
Definition
addtooldialog.h:44
AddToolDialog::ui
Ui::AddToolDialog * ui
Contains auto-generated UI elements.
Definition
addtooldialog.h:35
AddToolDialog::toolWidgetInputValidityChanged
void toolWidgetInputValidityChanged(bool is_valid)
Updates the Ok button when the new input is valid.
Definition
addtooldialog.cpp:21
AddToolDialog::toolEdited
void toolEdited(int app_id, int tool_id, Tool tool)
Signals dialog completion in edit mode.
AddToolDialog::setEditMode
void setEditMode(int app_id, int tool_id, Tool tool)
Initializes the dialog for editing an existing tool.
Definition
addtooldialog.cpp:35
AddToolDialog::toolAdded
void toolAdded(int app_id, Tool tool)
Signals dialog completion in add mode.
AddToolDialog::tool_id_
int tool_id_
If in edit mode: Id of the edited tool.
Definition
addtooldialog.h:46
AddToolDialog::dialog_completed_
bool dialog_completed_
Indicates whether the dialog has been completed.
Definition
addtooldialog.h:37
Tool
Represents a third party tool to be run from within Limo.
Definition
tool.h:17
edittoolwidget.h
Header for the EditToolWidget class.
src
ui
addtooldialog.h
Generated by
1.13.2