42 ConflictElement(T element,
const std::string&
id, FXIcon* icon,
const std::string& description) :
57 const std::string&
getID()
const {
126 myTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
127 myTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
132 myTable->getRowHeader()->setWidth(0);
137 myTable->setColumnWidth(1, 110);
141 myTable->setColumnText(2,
TL(
"Conflict"));
143 FXTableItem* item =
nullptr;
148 item->setIconPosition(FXTableItem::CENTER_X);
152 item->setJustify(FXTableItem::LEFT | FXTableItem::CENTER_Y);
156 item->setJustify(FXTableItem::LEFT | FXTableItem::CENTER_Y);
194 option->setWidth(
int(
myTable->getWidth() * 0.5));
221 TL(
"Save list of conflicted items"),
233 device << conflictedElement.getID() <<
":" << conflictedElement.getDescription() <<
"\n";
239 TL(
"Saving successfully"),
240 TL(
"List of conflicted items was successfully saved"));
245 TL(
"Saving list of conflicted items failed"), e.what());
285 fixOption->selectInternalTestSolution(dialogArgument->
getCustomAction());
294 bool abortSaving =
false;
298 if (fixOption->applyFixOption() ==
false) {
303 if (abortSaving ==
false) {
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignAuxiliarFrameFixedWidth(width)
design for auxiliar (Without borders) frame with fixed width and extended height
#define GUIDesignAuxiliarVerticalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignTableFixElements
design for tables used in GNEFixDemandElementsDialog dialogs
FXString gCurrentFolder
The folder used as last.
GUIIcon
An enumeration of icons used by the gui applications.
int GUIDesignHeight
the default height for GUI elements
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
The main window of Netedit.
FXVerticalFrame * myContentFrame
content frame
GNEApplicationWindow * myApplicationWindow
FOX needs this.
long closeDialogAccepting()
close dialog accepting the changes
OpenType
Open dialog type.
long closeDialogCanceling()
close dialog declining the changes
const std::string & getID() const
get element ID
T getElement() const
conflicted element
ConflictElement(T element, const std::string &id, FXIcon *icon, const std::string &description)
constructor
~ConflictElement()
destructor
FXIcon * getIcon() const
get element icon
T myElement
conflicted element
std::string myID
ID of the element.
std::string myDescription
conflict description
ConflictElement()=delete
invalidate default constructor
const std::string & getDescription() const
get conflict description
bool saveContents() const
save save list of conflicted items to a file (Reimplemented from MFXGroupBoxModule)
FixOptions & operator=(const FixOptions &)=delete
Invalidated assignment operator.
FixOptions()
default constructor
void enableOptions()
enable options
void registerOption(FXWindow *option)
add option to options container (used for adjust width and enable/disable)
virtual long onCmdSelectOption(FXObject *, FXSelector, void *)=0
called when user select a option
std::vector< ConflictElement > myConflictedElements
list of elements to fix
void setInvalidElements(const std::vector< ConflictElement > &conflictedElements)
set invalid elements to fix
FXVerticalFrame * myRightFrameOptions
vertical right frame for options
virtual bool applyFixOption()=0
apply selected fix option
FXTable * myTable
Table with the demand elements.
GNEFixElementsDialog * myFixElementDialogParent
pointer to the parent dialog
void disableOptions()
disable options
FixOptions(GNEFixElementsDialog< T > *fixElementDialog, FXVerticalFrame *frameParent, const std::string &title)
constructor
FixOptions(const FixOptions &)=delete
Invalidated copy constructor.
std::vector< FXWindow * > myOptions
list of options
FXVerticalFrame * myLeftFrameOptions
vertical left frame for options
virtual void selectInternalTestSolution(const std::string &solution)=0
select internal test solution (used in internal tests)
GNEFixElementsDialog(GNEApplicationWindow *mainWindow, const std::string title, GUIIcon icon)
Constructor.
GNEApplicationWindow * getApplicationWindow()
pointer to the main window
~GNEFixElementsDialog()
destructor
FXVerticalFrame * myRightFrame
right frame for fix options
GNEFixElementsDialog & operator=(const GNEFixElementsDialog &)=delete
Invalidated assignment operator.
GNEFixElementsDialog(const GNEFixElementsDialog &)=delete
Invalidated copy constructor.
long onCmdAccept(FXObject *, FXSelector, void *)
event after press accept button
std::vector< GNEFixElementsDialog::FixOptions * > myFixOptions
vector with all fix options
void runInternalTest(const InternalTestStep::DialogArgument *dialogArgument)
run internal test
void registerFixOptions(FixOptions *fixOptions)
register fix options to the dialog (called automatically during FixOptions constructor)
FXVerticalFrame * myLeftFrame
left frame for fix options
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
dialog arguments, used for certain modal dialogs that can not be edited using tab
const std::string & getCustomAction() const
get custom action
MFXGroupBoxModule (based on FXGroupBox)
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toggled)
Options
GroupBoxModule options.
static FXString getFilename2Write(FXWindow *parent, const FXString &header, const FXString &extensions, FXIcon *icon, FXString ¤tFolder)
Returns the file name to write.
Static storage of an output device and its base (abstract) implementation.
void close()
Closes the device and removes it from the dictionary.
static OutputDevice & getDevice(const std::string &name, bool usePrefix=true)
Returns the described OutputDevice.
static StringBijection< TXTFileExtension > TXTFileExtensions
TXT file Extensions.