QElectroTech
0.70
|
#include <elementdialog.h>
Public Member Functions | |
ElementDialog (uint=ElementDialog::OpenElement, QWidget *parent=nullptr) | |
ElementDialog::ElementDialog. More... | |
ElementsLocation | location () const |
ElementDialog::location. More... | |
Static Public Member Functions | |
static ElementsLocation | getOpenElementLocation (QWidget *parent=nullptr) |
ElementDialog::getOpenElementLocation Display a dialog for open an element through her location. More... | |
static ElementsLocation | getSaveElementLocation (QWidget *parent=nullptr) |
ElementDialog::getSaveElementLocation Display a dialog that allow to user to select an element (existing or not) who he want to save. More... | |
Private Types | |
enum | { OpenElement = 0, SaveElement = 1, OpenCategory = 2, SaveCategory = 3 } |
Private Member Functions | |
ElementDialog (const ElementDialog &) | |
void | setUpWidget () |
ElementDialog::setUpWidget Build and setup the widgets of this dialog. More... | |
void | setUpConnection () |
ElementDialog::setUpConnection Setup connection of this dialog. More... | |
void | indexClicked (const QModelIndex &index) |
ElementDialog::indexClicked. More... | |
void | updateWidget () |
void | checkCurrentLocation () |
ElementDialog::checkCurrentLocation Update this dialog according to the current selected location and the current mode. More... | |
void | checkAccept () |
Static Private Member Functions | |
static ElementsLocation | execConfiguredDialog (int, QWidget *parent=nullptr) |
ElementDialog::execConfiguredDialog launch a dialog with the chosen mode. More... | |
Private Attributes | |
uint | m_mode |
ElementsLocation | m_location |
QDialogButtonBox * | m_buttons_box = nullptr |
QFileNameEdit * | m_text_field = nullptr |
QTreeView * | m_tree_view = nullptr |
ElementsCollectionModel * | m_model = nullptr |
This class provides several dialogs to select an element or a category (e.g. new or existing, for opening or for saving...).
Definition at line 33 of file elementdialog.h.
|
private |
This enum represents the available configurations for the required dialog
Definition at line 40 of file elementdialog.h.
ElementDialog::ElementDialog | ( | uint | mode = ElementDialog::OpenElement , |
QWidget * | parent = nullptr |
||
) |
mode | |
parent |
Definition at line 37 of file elementdialog.cpp.
References setUpConnection(), and setUpWidget().
Referenced by execConfiguredDialog().
|
private |
|
private |
Definition at line 190 of file elementdialog.cpp.
References QET::QetMessageBox::critical(), ElementsLocation::exist(), ElementsLocation::isElement(), location(), m_mode, OpenElement, QET::QetMessageBox::question(), SaveElement, and QET::Icons::tr.
Referenced by setUpConnection().
|
private |
ElementDialog::checkCurrentLocation Update this dialog according to the current selected location and the current mode.
Definition at line 154 of file elementdialog.cpp.
References ElementsLocation::addToPath(), ElementsLocation::exist(), ElementsLocation::isDirectory(), ElementsLocation::isElement(), QFileNameEdit::isEmpty(), m_buttons_box, m_location, m_mode, m_text_field, OpenElement, and SaveElement.
Referenced by indexClicked(), and setUpConnection().
|
staticprivate |
ElementDialog::execConfiguredDialog launch a dialog with the chosen mode.
mode | : mode of the dialog |
parentWidget | : parent widget of the dialog |
Definition at line 301 of file elementdialog.cpp.
References ElementDialog(), and location().
Referenced by getOpenElementLocation(), and getSaveElementLocation().
|
static |
ElementDialog::getOpenElementLocation Display a dialog for open an element through her location.
parentWidget |
Definition at line 280 of file elementdialog.cpp.
References execConfiguredDialog(), and OpenElement.
Referenced by QETElementEditor::pasteFromElement(), and QETElementEditor::slot_open().
|
static |
ElementDialog::getSaveElementLocation Display a dialog that allow to user to select an element (existing or not) who he want to save.
parentWidget |
Definition at line 290 of file elementdialog.cpp.
References execConfiguredDialog(), and SaveElement.
Referenced by QETElementEditor::slot_saveAs().
|
private |
index |
Definition at line 143 of file elementdialog.cpp.
References checkCurrentLocation(), ElementCollectionItem::collectionPath(), m_location, and m_model.
Referenced by setUpConnection().
ElementsLocation ElementDialog::location | ( | ) | const |
Definition at line 243 of file elementdialog.cpp.
References ElementsLocation::addToPath(), ElementsLocation::isDirectory(), ElementsLocation::isElement(), m_location, m_mode, m_text_field, OpenElement, and SaveElement.
Referenced by checkAccept(), and execConfiguredDialog().
|
private |
ElementDialog::setUpConnection Setup connection of this dialog.
Definition at line 130 of file elementdialog.cpp.
References checkAccept(), checkCurrentLocation(), indexClicked(), m_buttons_box, m_text_field, and m_tree_view.
Referenced by ElementDialog().
|
private |
ElementDialog::setUpWidget Build and setup the widgets of this dialog.
Definition at line 49 of file elementdialog.cpp.
References QET::Icons::Cancel, ElementsCollectionModel::loadCollections(), m_buttons_box, m_mode, m_model, m_text_field, m_tree_view, OpenCategory, OpenElement, QETApp::registeredProjects(), SaveCategory, SaveElement, and QET::Icons::tr.
Referenced by ElementDialog().
|
private |
|
private |
Definition at line 68 of file elementdialog.h.
Referenced by checkCurrentLocation(), setUpConnection(), and setUpWidget().
|
private |
Definition at line 67 of file elementdialog.h.
Referenced by checkCurrentLocation(), indexClicked(), and location().
|
private |
Definition at line 66 of file elementdialog.h.
Referenced by checkAccept(), checkCurrentLocation(), location(), and setUpWidget().
|
private |
Definition at line 71 of file elementdialog.h.
Referenced by indexClicked(), and setUpWidget().
|
private |
Definition at line 69 of file elementdialog.h.
Referenced by checkCurrentLocation(), location(), setUpConnection(), and setUpWidget().
|
private |
Definition at line 70 of file elementdialog.h.
Referenced by setUpConnection(), and setUpWidget().