8#include <QStandardItemModel>
9#include <QStandardItem>
11#include <QJsonDocument>
13#include "GeneralChartPlotter.h"
49 explicit MainWindow(QWidget* parent =
nullptr);
81 bool Execute(
const std::string& command, std::map<std::string, std::string> arguments);
131 QStandardItem*
ToQStandardItem(
const QString& key,
const QJsonObject& json);
137 QJsonDocument
loadJson(
const QString& fileName);
138 void saveJson(
const QJsonDocument& document,
const QString& fileName);
235 const QString& iconPath,
236 const QString& toolTip,
247 GeneralChartPlotter*
plotter =
nullptr;
Main application window for SedSAT3 source apportionment analysis.
void on_actionRecent_triggered()
void addToolBarAction(const QString &text, const QString &iconPath, const QString &toolTip, void(MainWindow::*slot)())
Helper to add an action to the toolbar with icon and connection.
QString resourcesPath() const
void on_old_result_requested(const QModelIndex &index)
bool ReadExcel(const QString &filename)
Reads elemental profile data from Excel file.
QStringList recentFiles
List of recently opened files.
SourceSinkData * Data()
Returns pointer to the main data collection.
QMenu * ResultscontextMenu
Context menu for results view.
GeneralPlotter * plotter
Main plotting widget.
SourceSinkData dataCollection
Main data collection for analysis.
void showdistributionsforelements()
void on_show_data_as_table()
QString ProjectFileName
Current project file path.
QStandardItem * ToQStandardItem(const QString &key, const SourceSinkData *srcsinkdata)
std::unique_ptr< QStandardItemModel > columnViewModel
Model for column/data tree view.
bool LoadModel(const QString &fileName)
void setupResultsView()
Initializes the results tree view and context menu.
void WriteMessageOnScreen(const QString &text, QColor color=Qt::black)
Writes a message to the application's message display area.
bool treeItemChangedProgramatically
Flag for programmatic tree changes.
void setupToolsView()
Initializes the tools tree view.
bool CreateFileIfDoesNotExist(const QString &fileName)
void Populate_General_ToolBar()
std::unique_ptr< QStandardItemModel > resultsViewModel
Model for results tree view.
const SourceSinkData * Data() const
bool saveProjectToFile(const QString &filePath)
Saves project data to the specified file.
QString getSaveFilePath(bool promptUser)
Gets the file path for saving, prompting user if needed.
std::unique_ptr< Conductor > conductor
Analysis command coordinator.
void on_Options_triggered()
void addToRecentFiles(const QString &fileName, bool addToFile)
QJsonObject buildProjectJson() const
Builds the complete project JSON object.
QJsonDocument formsstructure
Forms structure definitions.
void SetSinkSheet(int i)
Sets the sink sheet index for Excel import.
QString selectedTreeItemType
Currently selected tree item type.
void on_constituent_properties_triggered()
QStandardItemModel * ToQStandardItemModel(const SourceSinkData *srcsinkdata)
QString TreeQStringSelectedType()
void removeFromRecentList(QAction *selectedFileAction)
void writeRecentFilesList()
void setupConnections()
Sets up all signal-slot connections for UI elements.
std::unique_ptr< QMenu > menu
Main menu.
QJsonObject buildResultsJson() const
Builds the results section of the project JSON.
QJsonDocument loadJson(const QString &fileName)
std::unique_ptr< QWidget > centralform
Central form widget.
QAction * DeleteAction
Delete action for results.
std::unique_ptr< Interface > plottedData
Currently plotted data interface.
void preparetreeviewMenu(const QPoint &pos)
void onOMSizeCorrection()
QStandardItem * ElementsToQStandardItem(const QString &key, const SourceSinkData *srcsinkdata)
void readRecentFilesList()
int sinkSheet
Index of sink sheet in Excel import.
void on_plot_raw_elemental_profiles()
void setupToolBar()
Initializes the general toolbar.
void onCustomContextMenu(const QPoint &pos)
QModelIndex indexresultselected
Currently selected result index.
void on_tree_selectionChanged(const QItemSelection &changed)
~MainWindow()
Destructor - cleans up UI resources.
bool Execute(const std::string &command, std::map< std::string, std::string > arguments)
Executes a specified analysis command.
void saveJson(const QJsonDocument &document, const QString &fileName)
void onIncludeExcludeSample()
void on_tool_executed(const QModelIndex &index)
QString localAppFolderAddress()
Returns the local application folder address.