##// END OF EJS Templates
Switched to cpp_utils package...
Switched to cpp_utils package Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>

File last commit:

r1460:ffe37c282008
r1486:8539a975891c
Show More
browser.cpp
53 lines | 1.9 KiB | text/x-c | CppLexer
Some progress on new Catalogue GUI, can display most of items, still lack edition and link to SciQLop...
r1408 #include "Catalogue2/browser.h"
#include "ui_browser.h"
#include <SqpApplication.h>
Set revision to 1.1.0 some work to bring back catalogs...
r1460 CataloguesBrowser::CataloguesBrowser(QWidget* parent)
: QWidget(parent, Qt::Window), ui(new Ui::Browser)
Some progress on new Catalogue GUI, can display most of items, still lack edition and link to SciQLop...
r1408 {
ui->setupUi(this);
connect(ui->repositories, &RepositoriesTreeView::repositorySelected, this,
Set revision to 1.1.0 some work to bring back catalogs...
r1460 &CataloguesBrowser::repositorySelected);
Some progress on new Catalogue GUI, can display most of items, still lack edition and link to SciQLop...
r1408 connect(ui->repositories, &RepositoriesTreeView::catalogueSelected, this,
Set revision to 1.1.0 some work to bring back catalogs...
r1460 &CataloguesBrowser::catalogueSelected);
connect(ui->events, &EventsTreeView::eventSelected, this, &CataloguesBrowser::eventSelected);
connect(
ui->events, &EventsTreeView::productSelected, this, &CataloguesBrowser::productSelected);
Some progress on new Catalogue GUI, can display most of items, still lack edition and link to SciQLop...
r1408 }
Set revision to 1.1.0 some work to bring back catalogs...
r1460 CataloguesBrowser::~CataloguesBrowser()
Some progress on new Catalogue GUI, can display most of items, still lack edition and link to SciQLop...
r1408 {
delete ui;
}
Set revision to 1.1.0 some work to bring back catalogs...
r1460 void CataloguesBrowser::repositorySelected(const QString& repo)
Some progress on new Catalogue GUI, can display most of items, still lack edition and link to SciQLop...
r1408 {
this->ui->Infos->setCurrentIndex(0);
this->ui->events->setEvents(sqpApp->catalogueController().events(repo));
// TODO add a statistic API
this->ui->catalogues_count->setText(
QString::number(sqpApp->catalogueController().catalogues(repo).size()));
this->ui->rep_events_count->setText(
QString::number(sqpApp->catalogueController().events(repo).size()));
}
Set revision to 1.1.0 some work to bring back catalogs...
r1460 void CataloguesBrowser::catalogueSelected(const CatalogueController::Catalogue_ptr& catalogue)
Some progress on new Catalogue GUI, can display most of items, still lack edition and link to SciQLop...
r1408 {
this->ui->Infos->setCurrentIndex(1);
this->ui->events->setEvents(sqpApp->catalogueController().events(catalogue));
this->ui->cat_events_count->setText(
QString::number(sqpApp->catalogueController().events(catalogue).size()));
}
Set revision to 1.1.0 some work to bring back catalogs...
r1460 void CataloguesBrowser::eventSelected(const CatalogueController::Event_ptr& event)
Some progress on new Catalogue GUI, can display most of items, still lack edition and link to SciQLop...
r1408 {
this->ui->Infos->setCurrentIndex(2);
this->ui->Event->setEvent(event);
}
Set revision to 1.1.0 some work to bring back catalogs...
r1460 void CataloguesBrowser::productSelected(
const CatalogueController::Product_t& product, const CatalogueController::Event_ptr& event)
Some progress on new Catalogue GUI, can display most of items, still lack edition and link to SciQLop...
r1408 {
this->ui->Infos->setCurrentIndex(2);
Set revision to 1.1.0 some work to bring back catalogs...
r1460 this->ui->Event->setProduct(product, event);
Some progress on new Catalogue GUI, can display most of items, still lack edition and link to SciQLop...
r1408 }