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

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

Loading…
Cancel
Save