Go to the documentation of this file.
27 #include "../gui/applicationdatabaseitem.h"
32 #include <QMessageBox>
35 using namespace Controller;
36 using namespace Data_Structure;
51 qRegisterMetaType<FilterableTreeModelSortFilterProxyModelPtr>(
"FilterableTreeModelSortFilterProxyModelPtr");
52 model->setSourceModel(&treemodel);
71 for (
const auto& package : *packages)
75 for (
const auto& application : *package->getApplications())
79 if (!application->getFound())
93 model->setSourceModel(&treemodel);
103 if (appItem ==
nullptr)
111 message.setText(
"Could not find Application " + appItem->
data(0).toString() +
" at " + QString::fromStdString(appItem->
getApplication()->getPathToExecutable()) +
".");
117 if (
index.parent().isValid())
void modelUpdated(FilterableTreeModelSortFilterProxyModelPtr model)
void updatePackages()
Updates the packages displayed in the ApplicationDatabaseView by reloading all packages and applicati...
virtual QVariant data(int column) const
FilterableTreeModelSortFilterProxyModelPtr getModel()
Returns the model used by the ApplicationDatabaseView and managed by this controller.
void appendChild(TreeItem *child)
message(STATUS "Boost-Library-Dir: " "${Boost_LIBRARY_DIRS}") message(STATUS "Boost-LIBRARIES
std::shared_ptr< Executor > ExecutorPtr
std::shared_ptr< std::vector< ScenarioManager::Data_Structure::PackagePtr > > PackageVectorPtr
This class represents an item in the ApplicationDatabaseView.
void packageClicked(Data_Structure::PackagePtr package)
Gets emitted after a Package gets clicked in the ApplicationDatabaseView.
ApplicationDatabaseItem * getRootItem()
~ApplicationDatabaseController() override
void update()
Updates the model.
void on_itemClicked(const QModelIndex &index)
Finds out whether an Application or a Scenario has been clicked and sends a signal with the correspon...
void clear() override
Clears and resets this model as if it was newly constructed.
std::shared_ptr< FilterableTreeModelSortFilterProxyModel > FilterableTreeModelSortFilterProxyModelPtr
Model of the FilterableTreeView.
void setEnabled(bool enabled)
ApplicationDatabaseController(Data_Structure::PackageVectorPtr packages, Exec::ExecutorPtr executor, QObject *parent=0)
Constructor that takes the data structure this controller operates on and optionally the parent objec...
static std::string getCacheDir()
ScenarioManager::Data_Structure::PackagePtr getPackage()
Returns the Package displayed in this item.
ScenarioManager::Data_Structure::ApplicationPtr getApplication()
Returns the Application displayed in this item.
This file offers overloads of toIce() and fromIce() functions for STL container types.