7#include "QHyodaX11Emacs.h"
8#include "QHyodaX11XtermLog.h"
9#include "QHyodaToolCell.h"
10#include "QHyodaToolMesh.h"
11#include "QHyodaToolMatrix.h"
12#include "QHyodaPapi.h"
15QHyodaTool::QHyodaTool(QSplitter *parent):QTabWidget(parent),
24 setObjectName(QString::fromUtf8(
"tools"));
26 setTabsClosable(
true);
29 connect(
this,SIGNAL(tabCloseRequested(
int)),
this,SLOT(tools_close_requested_slot(
int)));
30 connect(
this,SIGNAL(currentChanged(
int)),
this,SLOT(currentChanged(
int)));
33void QHyodaTool::currentChanged(
int idx){
38QHyodaTool::~QHyodaTool(
void){
39 qDebug() <<
"[QHyodaTool::~QHyodaTool] "<< objectName();
47void QHyodaTool::setJob(
QHyodaJob *thisJob){
51void QHyodaTool::add_matrix(
void){
55void QHyodaTool::add_mesh(
void){
57 setCurrentIndex(addTab(mesh,
"Mesh"));
58 job->meshButton->setEnabled(
false);
59 qDebug() <<
"[QHyodaTool::add_mesh] \33[7mAdding variables:\33[m";
60 for(
int i=0; i<job->arcane_variables_names->size(); ++i){
61 qDebug() <<
"[QHyodaTool::add_mesh] Adding variable "<<job->arcane_variables_names->at(i);
62 mesh->variablesComboBox->addItem(job->arcane_variables_names->at(i));
64 connect(mesh->variablesComboBox,SIGNAL(currentIndexChanged(
int)),
65 this,SLOT(tools_variable_index_change(
int)));
67void QHyodaTool::tools_variable_index_change(
int index){
68 qDebug() <<
"[QHyodaTool] tools_variable_index_change:"<<index;
71void QHyodaTool::add_cell(
void){
73 setCurrentIndex(addTab(cell,
"Cell"));
74 cell->setRange(job->data->mesh_total_nb_cell);
75 job->cellButton->setEnabled(
false);
78void QHyodaTool::add_log(
void){
80 setCurrentIndex(addTab(xlog,
"Log"));
84void QHyodaTool::add_src(
void){
93void QHyodaTool::add_papi(
void){
95 setCurrentIndex(addTab(papi,
"Papi"));
98void QHyodaTool::tools_close_requested_slot(
int index){
99 qDebug() <<
"[QHyodaTool::tools_close_requested_slot]";
100 if (tabText(index)==
"Mesh"){
102 job->meshButton->setEnabled(
true);
104 if (tabText(index)==
"Cell"){
106 job->cellButton->setEnabled(
true);
108 if (tabText(index)==
"Log"){
109 if (xlog) xlog->close();
110 job->logButton->setEnabled(
true);
112 if (tabText(index)==
"Src")
113 job->srcButton->setEnabled(
true);
115 if (tabText(index)==
"Papi")
116 job->papiButton->setEnabled(
true);
120 if (count()==0) hide();