Added logic to read indenter ini files and populate GUI toolbox

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
master
Michele Calgaro 1 year ago
parent 44f39b628c
commit febcebba07
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -21,20 +21,21 @@
#define INDENTHANDLER_H
#include <tqwidget.h>
#include <tqvaluevector.h>
class MainWindow;
class UiGuiErrorMessage;
///-- class UiGuiIniFileParser;
class UiGuiIniFileParser;
class UiGuiSettings;
class TQCheckBox;
class TQComboBox;
class TQLabel;
class TQLineEdit;
class TQSpinBox;
class TQToolBox;
class TQToolButton;
class TQVBoxLayout;
///-- class TQMenu;
///-- class TQLabel;
///-- class TQSpinBox;
///-- class TQCheckBox;
///-- class TQLineEdit;
class IndentHandler : public TQWidget
@ -56,8 +57,7 @@ class IndentHandler : public TQWidget
///-- TQString getManual();
///-- TQString getCurrentIndenterName();
void contextMenuEvent(TQContextMenuEvent *event);
///-- int getIndenterId();
///--
signals:
void indenterSettingsChanged();
///-- void selectedIndenterIndexChanged(int index);
@ -81,91 +81,86 @@ class IndentHandler : public TQWidget
void saveConfigFile(const TQString &filePathName, const TQString &parameterString);
void readIndentIniFile(const TQString &iniFilePath);
bool createIndenterCallString();
///--
///-- // Holds a reference to all created pages of the parameter categories toolbox and the pages
///-- // boxlayout
///-- struct IndenterParameterCategoryPage
///-- {
///-- TQWidget *widget;
///-- TQVBoxLayout *vboxLayout;
///-- };
///--
///-- TQVector<IndenterParameterCategoryPage> _indenterParameterCategoryPages;
///--
///-- // Holds a reference to all checkboxes needed for boolean parameter setting and the parameters
///-- // name
///-- struct ParamBoolean
///-- {
///-- TQString paramName;
///-- TQString trueString;
///-- TQString falseString;
///-- TQCheckBox *checkBox;
///-- };
///--
///-- TQVector<ParamBoolean> _paramBooleans;
///--
///-- // Holds a reference to all line edits needed for parameter setting and the parameters name
///-- struct ParamString
///-- {
///-- TQString paramName;
///-- TQString paramCallName;
///-- TQCheckBox *valueEnabledChkBox;
///-- TQLineEdit *lineEdit;
///-- TQLabel *label;
///-- };
///--
///-- TQVector<ParamString> _paramStrings;
///--
///-- // Hold a reference to all spin boxes needed for parameter setting and the parameters name
///-- struct ParamNumeric
///-- {
///-- TQString paramName;
///-- TQString paramCallName;
///-- TQCheckBox *valueEnabledChkBox;
///-- TQSpinBox *spinBox;
///-- TQLabel *label;
///-- };
///--
///-- TQVector<ParamNumeric> _paramNumerics;
///--
///-- // Hold a reference to all combo boxes needed for parameter setting and the parameters name
///-- struct ParamMultiple
///-- {
///-- TQString paramName;
///-- TQString paramCallName;
///-- TQCheckBox *valueEnabledChkBox;
///-- TQComboBox *comboBox;
///-- TQStringList choicesStrings;
///-- TQStringList choicesStringsReadable;
///-- };
///--
///-- TQVector<ParamMultiple> _paramMultiples;
///--
// Holds a reference to all created pages of the parameter categories toolbox and their layout
struct IndenterParameterCategoryPage
{
TQWidget *widget;
TQVBoxLayout *vboxLayout;
};
TQValueVector<IndenterParameterCategoryPage> m_indenterParameterCategoryPages;
// Holds a reference to all checkboxes needed for boolean parameters and their names
struct ParamBoolean
{
TQString paramName;
TQString trueString;
TQString falseString;
TQCheckBox *checkBox;
};
TQValueVector<ParamBoolean> m_paramBooleans;
// Holds a reference to all line edits needed for parameter setting and the parameters name
struct ParamString
{
TQString paramName;
TQString paramCallName;
TQCheckBox *valueEnabledChkBox;
TQLineEdit *lineEdit;
TQLabel *label;
};
TQValueVector<ParamString> m_paramStrings;
// Hold a reference to all spin boxes needed for parameter setting and the parameters name
struct ParamNumeric
{
TQString paramName;
TQString paramCallName;
TQCheckBox *valueEnabledChkBox;
TQSpinBox *spinBox;
TQLabel *label;
};
TQValueVector<ParamNumeric> m_paramNumerics;
// Hold a reference to all combo boxes needed for parameter setting and the parameters name
struct ParamMultiple
{
TQString paramName;
TQString paramCallName;
TQCheckBox *valueEnabledChkBox;
TQComboBox *comboBox;
TQStringList choicesStrings;
TQStringList choicesStringsReadable;
};
TQValueVector<ParamMultiple> m_paramMultiples;
UiGuiSettings *m_settings;
TQComboBox *m_indenterSelectionCombobox;
TQToolButton *m_indenterParameterHelpButton;
///-- // Vertical layout box, into which the toolbox will be added
// Vertical layout box, into which the toolbox will be added
TQVBoxLayout *m_toolBoxContainerLayout;
TQToolBox *m_indenterParameterCategoriesToolBox;
///-- UiGuiIniFileParser *m_indenterSettings;
///-- TQStringList _indenterParameters;
///-- // The indenters name in a descriptive form
///-- TQString _indenterName;
///-- // The indenters file name (w/o extension), that is being called
UiGuiIniFileParser *m_indenterSettings;
TQStringList m_indenterParameters;
// The indenters name in a descriptive form
TQString m_indenterName;
// The indenters file name (w/o extension), that is being called
TQString m_indenterFileName;
TQString m_indenterDirectoryStr;
TQString m_tempDirectoryStr;
TQString m_settingsDirectoryStr;
TQStringList m_indenterIniFileList;
///-- TQString _parameterOrder;
TQString m_globalConfigFilename;
///-- TQString _cfgFileParameterEnding;
///-- TQString _inputFileParameter;
///-- TQString _inputFileName;
///-- TQString _outputFileParameter;
///-- TQString _outputFileName;
///-- TQString _fileTypes;
///-- TQString _useCfgFileParameter;
///-- TQString _indenterShowHelpParameter;
TQString m_cfgFileParameterEnding;
TQString m_parameterOrder;
TQString m_inputFileParameter;
TQString m_inputFileName;
TQString m_outputFileParameter;
TQString m_outputFileName;
TQString m_fileTypes;
TQString m_useCfgFileParameter;
TQString m_indenterShowHelpParameter;
MainWindow *m_mainWindow;
TQWidget *m_parent;
UiGuiErrorMessage *m_errorMessageDialog;

@ -682,7 +682,7 @@ void MainWindow::updateSourceView()
*/
void MainWindow::callIndenter()
{
TQApplication::setOverrideCursor(TQCursor(TQt::WaitCursor));
TQApplication::setOverrideCursor(TQt::WaitCursor);
///-- m_sourceFormattedContent = m_indentHandler->callIndenter(m_sourceFileContent,
///-- m_currentSourceFileExtension);
updateSourceView();

Loading…
Cancel
Save