Beispiel #1
0
/*!
*  Initialisation du module
*
*/
void CRaspiGPIO::init(CApplication *application)
{
  CModule::init(application);
  setGUI(&m_ihm); // indique à la classe de base l'IHM

  // Gère les actions sur clic droit sur le panel graphique du module
  m_ihm.setContextMenuPolicy(Qt::CustomContextMenu);
  connect(&m_ihm, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(onRightClicGUI(QPoint)));
  
  // Restore la taille de la fenêtre
  QVariant val;
  val = m_application->m_eeprom->read(getName(), "geometry", QRect(50, 50, 150, 150));
  m_ihm.setGeometry(val.toRect());
  // Restore le fait que la fenêtre est visible ou non
  val = m_application->m_eeprom->read(getName(), "visible", QVariant(true));
  if (val.toBool()) { m_ihm.show(); }
  else              { m_ihm.hide(); }
  // Restore le niveau d'affichage
  val = m_application->m_eeprom->read(getName(), "niveau_trace", QVariant(MSG_TOUS));
  setNiveauTrace(val.toUInt());
  // Restore la couleur de fond
  val = m_application->m_eeprom->read(getName(), "background_color", QVariant(DEFAULT_MODULE_COLOR));
  setBackgroundColor(val.value<QColor>());

  wiringPiSetupGpio(); // Utilise la numérotation de pin BCM

  for (unsigned int i=0; i<MAX_GPIO_COUNT; i++) {
      // Recherche dans le fichier EEPROM une configuration de type "gpio_<i>=input pull down"
      // gpio_17 = input
      QString eeprom_config_name = "gpio_" + QString::number(i);
      val = m_application->m_eeprom->read(getName(), eeprom_config_name, QVariant());
      if (val != QVariant()) {  // le paramètre a été trouvé -> le GPIO est utilisé et doit être configuré
          configPinMode(i, val.toString());
      }

      // Initialise la liste des GPIO dans la liste déroulante de configuration
      // on part des contrôles affichés sur l'interface et on récupère les numéros
      // Rensigne dans la liste déroulante des GPIO tous les numéros possibles de GPIO
      QLabel *lbl = m_ihm.findChild<QLabel*>(PREFIX_MODE_GPIO + QString::number(i)); // "mode_GPIO_<i>" c'est le nom de tous les labels des GPIO sur l'IHM pour indiquer si c'est une entrée / sortie / ...
      if (lbl) {
          m_ihm.ui.configChoixGPIO->addItem("GPIO " + QString::number(i));
      }
      // connexion signal/slot avec toutes les checkbox qui permettent d'écrire sur le port
      // on repert toutes les checkbox par leur nom "write_GPIO_<i>"
      QCheckBox *checkbox = m_ihm.findChild<QCheckBox*>(PREFIX_CHECKBOX_WRITE + QString::number(i));
      if (checkbox) {
          connect(checkbox, SIGNAL(clicked(bool)), this, SLOT(onWritePinChange(bool)));
      }
  }

  // Renseigne dans la liste déroulante des configurations possibles
  QStringList list_modes;
  list_modes << "" << "Input" << "Input pull down" << "Input pull up" << "Output" << "PWM Output";
  m_ihm.ui.configChoixMode->addItems(list_modes);

  connect(m_ihm.ui.configChoixGPIO, SIGNAL(activated(int)), this, SLOT(onChoixConfigGPIO()));
  connect(m_ihm.ui.configChoixMode, SIGNAL(activated(QString)), this, SLOT(onChoixConfigMode(QString)));
  connect(&m_timer_read, SIGNAL(timeout()), this, SLOT(readAllInputs()));
  m_timer_read.start(100);
}
Beispiel #2
0
//--------------------------------------------------------------
void testApp::setup(){
//    ofBackground(40);
    ofSetVerticalSync(true);
    ofEnableAlphaBlending();
    ofEnableSmoothing();
	ofSetDrawBitmapMode(OF_BITMAPMODE_MODEL_BILLBOARD);

    //GUI
    setGUI();
    setGUI2();
    
	cam.initGrabber(640, 480);
	
	tracker.setup();
    
    bClick = true;
    
    snapCounter = 0;
	bSnapshot = false;
	memset(snapString, 0, 255);
    
    bFirst = true;
    
    ofTrueTypeFont::setGlobalDpi(72);
    helveticafont30.loadFont("HelveticaNeueLTStd-Blk.otf", 30);
    helfont15.loadFont("HelveticaNeueLTStd-Roman.otf", 12);

    typeStr.clear();
    stage = 0;
    
    counter = 0;
    bDebug = false;
}
Beispiel #3
0
void
WVDialer::loadConfig()
{
  setProviderCombo();
     
  cfg->load();
  
  int x = cfg->getInt( "geometry", "x", -1 );
  int y = cfg->getInt( "geometry", "y", -1 );
  int w = cfg->getInt( "geometry", "width", -1 );
  int h = cfg->getInt( "geometry", "height", -1 );
  
  if (x != -1 && y != -1 && w != -1 && h != -1)
  {
    setGeometry( x, y, w, h );
  }
  
  int item = cfg->getInt( "gui", "provider", 0 );
  providerCombo->setCurrentItem( item ); 
  configDlg->setStartProcess( cfg->getBool( "connection", "start-process", false ) );
  configDlg->setStartProcessPath( cfg->getString( "connection", "start-process-path", "netscape" ) );
  configDlg->setStartProcessDelay( cfg->getInt( "connection", "start-process-delay", 2 ) );
  configDlg->setPppDevice( cfg->getInt( "connection", "ppp", 0 ) );
  configDlg->setAskRemove( cfg->getBool( "gui", "ask-remove", true ) );
  configDlg->setShowStat( cfg->getBool( "gui", "show-statistics", true ) );
  configDlg->setShowGraph( cfg->getBool( "gui", "show-graph", true ) );
  configDlg->setLogEnabled( cfg->getBool( "connection", "logfiles", true ) );
  
  setGUI();
}
Beispiel #4
0
void
WVDialer::configSLOT()
{
  if (configDlg->exec())
  {
    saveConfig();
    setProviderCombo();
    setGUI();
  }
}
Beispiel #5
0
/**
 * Initialises the delta3d app and also calls initGUI to setup the Qt-based GUI
 */
void HTAppQt::Init(hammerQt* gui) {
	setGUI(gui);

	//call base class to initialise delta3d
	HTApplication::Init();

	mQtGUI->initialiseMap(m_MapName);

	dtCore::System::GetInstance().Start();
}
Beispiel #6
0
void aTrackGui::reset() {
    
    setGUI();
    
    gui->loadSettings("GUI/gui_Track.xml");
    
    gui->setVisible(false);
    
    guiAlloc = true;
    doReset = false;
    
}
void JM_GameOverState::initGUI(SDL_Surface* screen)
{
    m_screen = screen;

    JM_GUI gui;
    gui.setScreen(screen);
    setGUI(gui);

    JM_GUIButtonElement* quitbutton = new JM_GUIButtonElement(BUTTONELEMENTTYPE_QUIT);
    quitbutton->setGFX("GFX/mainmenubutton.png");
    quitbutton->setPosition(320 - (192 / 2), 300, 192, 39);

    getGUI().addElement(quitbutton);
}
Beispiel #8
0
void ofApp::reset(){
    //sphere radius
    radius = 100;
    
    spot.setDiffuseColor(ofFloatColor(255.0, 0.0, 0.0f));
    spot.setSpecularColor(ofColor(0, 0, 255));
    spot.setSpotlight();
    spot.setSpotConcentration(5);
    spot.setSpotlightCutOff(10);
    spot_rot = ofVec3f(0, 0, 0);
    setLightOri(spot, spot_rot);
    
    spot.setPosition(0, 0, 300);
    
    point.setDiffuseColor(ofColor(0.0, 255.0, 0.0));
    
    point.setPointLight();
    
    dir.setDiffuseColor(ofColor(0.0f, 0.0f, 255.0f));
    dir.setSpecularColor(ofColor(255.0f, 0.0f, 0.0f));
    
    dir.setDirectional();
    dir_rot = ofVec3f(0, -95, 0);
    setLightOri(dir, dir_rot);
    
    amb.setAmbientColor(ofColor(20.0, 20.0, 20.0, 20.0));
    
    material.setShininess(120);
    
    material.setSpecularColor(ofColor(255, 255, 255, 255));
    material.setEmissiveColor(ofColor(0, 0, 0, 255));
    material.setDiffuseColor(ofColor(255, 255, 255, 255));
    material.setAmbientColor(ofColor(255, 255, 255, 255));
    
    cull = true;
    useSpot = true;
    usePoint = true;
    useAmb = true;
    useDir = true;
    autoRotatePoint = true;
    showDirSource = true;
    showSpotSource = true;
    showPointSource = true;
    
    cam.reset();
    setGUI();
    doReset = false;
}
//--------------------------------------------------------------
void ofApp::setup(){
    sensors = new Sensor[3];
    simulate = false;
    setBackgroundImage();
    setGUI();
#if ARDUINO
    initArduino();
#endif
    failedAttempts = 0;
    
    // listen for EInitialized notification. this indicates that
    // the arduino is ready to receive commands and it is safe to
    // call setupArduino()
    initArduino();
    ofAddListener(arduino.EInitialized, this, &ofApp::setupArduino);
}
Beispiel #10
0
void DialogFormula::on_comboBox_currentIndexChanged(int index)
{
    // Destroy GUI of groupbox (line edits, labels)
    QLayoutItem *item = nullptr;
    while ((item = ui->gridLayout->takeAt(0)) != nullptr)
    {
        delete item->widget();
        delete item;
    }
    // Clear the vector of input lines
    vctInputLine.clear();

    // Clear the result line
    ui->lineResult->setText("");

    // Set new GUI
    setGUI(index);
}
Beispiel #11
0
/*!
*  Initialisation du module
*
*/
void CXbeeNetworkMessenger::init(CApplication *application)
{
  CModule::init(application);
  setGUI(&m_ihm); // indique à la classe de base l'IHM

  // Gère les actions sur clic droit sur le panel graphique du module
  m_ihm.setContextMenuPolicy(Qt::CustomContextMenu);
  connect(&m_ihm, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(onRightClicGUI(QPoint)));

  // Restore la taille de la fenêtre
  QVariant val;
  val = m_application->m_eeprom->read(getName(), "geometry", QRect(50, 50, 150, 150));
  m_ihm.setGeometry(val.toRect());
  // Restore le fait que la fenêtre est visible ou non
  val = m_application->m_eeprom->read(getName(), "visible", QVariant(true));
  if (val.toBool()) { m_ihm.show(); }
  else              { m_ihm.hide(); }
  // Restore le niveau d'affichage
  val = m_application->m_eeprom->read(getName(), "niveau_trace", QVariant(MSG_TOUS));
  setNiveauTrace(val.toUInt());
  // Restore la couleur de fond
  val = m_application->m_eeprom->read(getName(), "background_color", QVariant(DEFAULT_MODULE_COLOR));
  setBackgroundColor(val.value<QColor>());

  val = m_application->m_eeprom->read(getName(), "trace_active", QVariant(false));
  m_trace_active = val.toBool();
  m_ihm.ui.trace_active->setChecked(m_trace_active);

  m_xbee_messenger.initApp(m_application);

  connect(m_application->m_XBEE, SIGNAL(readyBytes(QByteArray,unsigned short)), this, SLOT(Xbee_readyBytes(QByteArray,unsigned short)));
  connect(m_ihm.ui.clear_trace, SIGNAL(released()), this, SLOT(on_clear_trace()));

  connect(m_ihm.ui.message_list, SIGNAL(currentIndexChanged(QString)), this, SLOT(on_message_name_changed(QString)));
  connect(m_ihm.ui.ID, SIGNAL(editingFinished()), this, SLOT(on_message_id_changed()));
  connect(m_ihm.ui.send, SIGNAL(released()), this, SLOT(on_send_message()));
  connect(m_ihm.ui.trace_active, SIGNAL(clicked(bool)), this, SLOT(on_trace_active_changed(bool)));

  initDiagPresencePage();
  initGeneratorPage();

  connect(&m_timer, SIGNAL(timeout()), this, SLOT(on_timer_tick()));
  m_timer.start(MESSENGER_REFRESH_PERIOD);
}
Beispiel #12
0
//--------------------------------------------------------------
void testApp::setup(){
    
    ofBackground(0);
    ofSetFrameRate(30);
    ofEnableSmoothing();
    
    img.loadImage(filename);
    img.resize(ofGetWidth(), ofGetHeight());
  
    cur_cnt = 0;
    
    voronoi.setBounds(0, 0, ofGetWidth(), ofGetHeight());

    //the initial picture
    addVoronoiPoints(npoints);
    buildVoronoi();

    fbo.allocate(ofGetWidth(), ofGetHeight());
    
    setGUI();
}
Beispiel #13
0
//--------------------------------------------------------------
void testApp::setup() {

	isLive			= true;
	isTracking		= false;
	isTrackingHands	= true;
	isFiltering		= false;
	isRecording		= false;
	isCloud			= false;
	isCPBkgnd		= true;
	isMasking		= true;

	nearThreshold = 500;
	farThreshold  = 1000;

	filterFactor = 0.1f;

	setupRecording();
    
    //firm
    setGUI(); 

}
Beispiel #14
0
void PrefInterface::setData(Preferences * pref) {
	setLanguage( pref->language );
	setIconSet( pref->iconset );

	setResizeMethod( pref->resize_method );
	setSaveSize( pref->save_window_size_on_exit );
#ifdef SINGLE_INSTANCE
	setUseSingleInstance(pref->use_single_instance);
#endif
	setRecentsMaxItems(pref->history_recents->maxItems());

	setSeeking1(pref->seeking1);
	setSeeking2(pref->seeking2);
	setSeeking3(pref->seeking3);
	setSeeking4(pref->seeking4);

	setUpdateWhileDragging(pref->update_while_seeking);
	setRelativeSeeking(pref->relative_seeking);
	setPreciseSeeking(pref->precise_seeking);

	setDefaultFont(pref->default_font);

	setHideVideoOnAudioFiles(pref->hide_video_window_on_audio_files);

#if STYLE_SWITCHING
	setStyle( pref->style );
#endif

	setGUI(pref->gui);

	setFloatingAnimated(pref->floating_control_animated);
	setFloatingWidth(pref->floating_control_width);
	setFloatingMargin(pref->floating_control_margin);
	setDisplayFloatingInCompactMode(pref->floating_display_in_compact_mode);
#ifndef Q_OS_WIN
	setFloatingBypassWindowManager(pref->bypass_window_manager);
#endif
}
Beispiel #15
0
/*!
*  Initialisation du module
*
*/
void CSensorView::init(CApplication *application)
{
  CModule::init(application);
  setGUI(&m_ihm); // indique à la classe de base l'IHM

  // Gère les actions sur clic droit sur le panel graphique du module
  m_ihm.setContextMenuPolicy(Qt::CustomContextMenu);
  connect(&m_ihm, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(onRightClicGUI(QPoint)));

  // Restore la taille de la fenêtre
  QVariant val;
  val = m_application->m_eeprom->read(getName(), "geometry", QRect(50, 50, 150, 150));
  m_ihm.setGeometry(val.toRect());
  // Restore le fait que la fenêtre est visible ou non
  val = m_application->m_eeprom->read(getName(), "visible", QVariant(true));
  if (val.toBool()) { m_ihm.show(); }
  else              { m_ihm.hide(); }
  // Restore le niveau d'affichage
  val = m_application->m_eeprom->read(getName(), "niveau_trace", QVariant(MSG_TOUS));
  setNiveauTrace(val.toUInt());
  // Restore la couleur de fond
  val = m_application->m_eeprom->read(getName(), "background_color", QVariant(DEFAULT_MODULE_COLOR));
  setBackgroundColor(val.value<QColor>());

  //récupération des signaux déjà placés sur la vue
  val=m_application->m_eeprom->read(getName(),"signalsPlacement",QStringList());
  QStringList listePointsWidget_=val.toStringList();
  val=m_application->m_eeprom->read(getName(),"signalsAdded",QStringList());
  listeStringSignalsAdded=val.toStringList();
  int minSize = 0;
  minSize=qMin(listePointsWidget_.size(), listeStringSignalsAdded.size());
  int ind;
  if(minSize>0)
  {
    QString unStringPoint, temp, xString, yString;
    QStringList ListXY;
    double xFromString, yFromString;
    for(ind=0;ind<minSize;ind++)
    {
        unStringPoint=listePointsWidget_.at(ind);
        ListXY=unStringPoint.split('x');
        if (ListXY.size()>=2){
            temp=ListXY.at(0);
            xString=temp.remove(QChar('('), Qt::CaseInsensitive);
            xFromString=xString.toInt();
            temp=ListXY.at(1);
            yString=temp.remove(QChar(')'), Qt::CaseInsensitive);
            yFromString=yString.toInt();
            listePointsSignalsAdded << QPoint(xFromString,yFromString);
        }
     }
  }
  if (minSize>0)
      for(ind=0;ind<minSize;ind++)
      {
          //listeAddedSignals << new viewWidget(listeStringSignalsAdded.at(ind),listePointsSignalsAdded.at(ind));
          addWidget(listeStringSignalsAdded.at(ind),listePointsSignalsAdded.at(ind));
      }

  m_ihm.ui.listWidget->setAcceptDrops(false);
  m_ihm.ui.listWidget->setDragEnabled(false);
  m_ihm.ui.viewWidget->setAcceptDrops(false);
  m_ihm.ui.viewWidget->setDragEnabled(false);

  isLocked=m_ihm.ui.pb_lockGUI->isChecked();

  connect(m_ihm.ui.pb_lockGUI,SIGNAL(toggled(bool)),this,SLOT(lock(bool)));

  connect(m_ihm.ui.viewWidget,SIGNAL(addWidget(QString,QPoint)),this,SLOT(addWidget(QString,QPoint)));
  connect(m_ihm.ui.listWidget,SIGNAL(refreshList(QString)),this,SLOT(removeWidget(QString)));
  refreshListeVariables();

  connect(&m_timer_lecture_variables, SIGNAL(timeout()), this, SLOT(refreshValeursVariables()));
  //m_timer_lecture_variables.start(PERIODE_ECHANTILLONNAGE_VARIABLES);
  connect(m_ihm.ui.pb_play,SIGNAL(toggled(bool)),this,SLOT(start(bool)));

  connect(m_ihm.ui.pb_filtering_nothing, SIGNAL(clicked()),this,SLOT(uncheckAllSignals()));
  connect(m_ihm.ui.pb_filtering_actuator, SIGNAL(clicked()),this,SLOT(refreshListeVariables()));
  connect(m_ihm.ui.pb_filtering_ana, SIGNAL(clicked()),this,SLOT(refreshListeVariables()));
  connect(m_ihm.ui.pb_filtering_computed, SIGNAL(clicked()),this,SLOT(refreshListeVariables()));
  connect(m_ihm.ui.pb_filtering_tor, SIGNAL(clicked()),this,SLOT(refreshListeVariables()));
}
Beispiel #16
0
/*!
*  Initialisation du module
*
*/
void CDataGraph::init(CApplication *application)
{
    CModule::init(application);
    setGUI(&m_ihm); // indique à  la classe de base l'IHM
    setNiveauTrace(MSG_TOUS);

    // Gère les actions sur clic droit sur le panel graphique du module
    m_ihm.setContextMenuPolicy(Qt::CustomContextMenu);
    connect(&m_ihm, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(onRightClicGUI(QPoint)));

    // Restore la taille de la fenêtre
    QVariant val;
    val = m_application->m_eeprom->read(getName(), "geometry", QRect(50, 50, 150, 150));
    m_ihm.setGeometry(val.toRect());
    // Restore le fait que la fenêtre est visible ou non
    val = m_application->m_eeprom->read(getName(), "visible", QVariant(true));
    if (val.toBool()) { m_ihm.show(); }
    else              { m_ihm.hide(); }
    // Restore le niveau d'affichage
    val = m_application->m_eeprom->read(getName(), "niveau_trace", QVariant(MSG_TOUS));
    setNiveauTrace(val.toUInt());
    // Restore la couleur de fond
    val = m_application->m_eeprom->read(getName(), "background_color", QVariant(DEFAULT_MODULE_COLOR));
    setBackgroundColor(val.value<QColor>());

    //labels pour le tableau de données
    QStringList QS_Labels;
    QS_Labels << "Variable" << "Valeur" << "Couleur" << "Curseur 1" << "Curseur 2";
    m_ihm.ui.table_variables_valeurs->setHorizontalHeaderLabels(QS_Labels);
    m_ihm.ui.table_variables_valeurs->horizontalHeader()->setVisible(true);
    m_ihm.ui.table_variables_valeurs->horizontalHeaderItem(3)->setTextColor(Qt::green);
    m_ihm.ui.table_variables_valeurs->horizontalHeaderItem(4)->setTextColor(Qt::red);

    // Restaure la zone minimale autour du curseur pour le sélectionner
    val = m_application->m_eeprom->read(getName(), "fineDistanceCursorSelection", QVariant(true));
    fineDistanceCursorSelection=val.toInt();

    //On cache les contrà´les agissant sur les courbes (réactivés lors de la pause des courbes)
    m_ihm.ui.label_deltaT->setVisible(false);
    m_ihm.ui.pb_resetZoom->setVisible(true);

    //de même on ne permet pas l'activation des curseurs
    m_ihm.ui.pb_cusor->setEnabled(false);
    m_ihm.ui.pb_cusor->setChecked(false);

    //ni de la pause
    m_ihm.ui.pb_resume->setEnabled(false);
    m_ihm.ui.pb_resume->setChecked(false);

    // le bouton refresh met à  jour la liste des variables disponibles
    connect(m_ihm.ui.PB_refresh_liste, SIGNAL(clicked()), this, SLOT(refreshListeVariables()));
    connect(m_ihm.ui.pb_play,SIGNAL(toggled(bool)),this,SLOT(activeGraph(bool)));
    connect(m_ihm.ui.pb_up, SIGNAL(clicked()), this, SLOT(upVariable()));
    connect(m_ihm.ui.pb_down, SIGNAL(clicked()), this, SLOT(downVariable()));
    connect(m_ihm.ui.liste_variables,SIGNAL(itemChanged(QListWidgetItem*)),this,SLOT(authorizePlay(QListWidgetItem*)));

    connect(&m_timer_lecture_variables, SIGNAL(timeout()), this, SLOT(refreshValeursVariables()));

    //récupération du pointeur du graphique et création des curseurs
    customPlot=m_ihm.findChild<QCustomPlot*>("customPlot");
    cursor1 = new QCPItemLine(customPlot);
    cursor1->setPen(QPen(Qt::green));
    cursor2 = new QCPItemLine(customPlot);
    cursor2->setPen(QPen(Qt::red));

    // à  inclure pour supprimer l'antialiasing pour de meilleures perfos
    /*
    customPlot->setNotAntialiasedElements(QCP::aeAll);
    QFont font;
    font.setStyleStrategy(QFont::NoAntialias);
    customPlot->xAxis->setTickLabelFont(font);
    customPlot->yAxis->setTickLabelFont(font);
    customPlot->legend->setFont(font);
    */
    //formattage des axes
    customPlot->xAxis->setTickLabelType(QCPAxis::ltDateTime);
    customPlot->xAxis->setDateTimeFormat("hh:mm:ss");
    customPlot->xAxis->setAutoTickStep(false);
    customPlot->xAxis->setTickStep(2);
    customPlot->axisRect()->setupFullAxesBox();
    //range du premier axe
    customPlot->yAxis->setRange(-300,300);
    val = m_application->m_eeprom->read(getName(), "initHighRange", QVariant());
    customPlot->yAxis->setRange(-fabs(val.toDouble()),fabs(val.toDouble()));
    //range du deuxième axe
    customPlot->yAxis2->setRange(-3.5,3.5);
    val = m_application->m_eeprom->read(getName(), "initLowRange", QVariant());
    customPlot->yAxis2->setRange(-fabs(val.toDouble()),fabs(val.toDouble()));
    customPlot->yAxis2->setAutoTickLabels(true);
    customPlot->yAxis2->setTickLabels(true);
    customPlot->yAxis2->setVisible(true);

    //uniformisation des ranges entre les axes dessus-dessous et gauche-droite
    connect(customPlot->xAxis, SIGNAL(rangeChanged(QCPRange)), customPlot->xAxis2, SLOT(setRange(QCPRange)));

    //gestion des ranges pour les différents zoom
    storedRange->lower=customPlot->yAxis->range().lower;
    storedRange->upper=customPlot->yAxis->range().upper;
    storedRangeAxe1->lower=customPlot->yAxis->range().lower;
    storedRangeAxe1->upper=customPlot->yAxis->range().upper;
    storedRangeAxe2->lower=customPlot->yAxis2->range().lower;
    storedRangeAxe2->upper=customPlot->yAxis2->range().upper;
    //par sécurité on normalise les ranges
    storedRange->normalize();storedRangeAxe1->normalize();storedRangeAxe2->normalize();
    QString str;
    m_ihm.ui.inputRangeAxe1->setText(str.setNum(storedRangeAxe1->upper));
    m_ihm.ui.inputRangeAxe2->setText(str.setNum(storedRangeAxe2->upper));

    //Interaction avec la souris: défilement de la courbe, zoom, sélection de lignes
    customPlot->setInteractions(QCP::iRangeDrag | QCP::iRangeZoom | QCP::iSelectItems);
    // zone minimale autour du curseur pour le sélectionner
    customPlot->setSelectionTolerance(fineDistanceCursorSelection);
    //pour l'init on désactive temporairement le drag and drop des courbes (réactive à  la mise en pause des courbes)
    customPlot->axisRect()->setRangeDrag(0);
    //pour l'init on désactive le zoom (réactive à  la mise en pause des courbes)
    customPlot->axisRect()->setRangeZoom(0);

    //mise à  jour des courbes
    customPlot->replot();    

    backupEnabled=false;

    //gestion des interactions des courbes
    connect(m_ihm.ui.pb_resume,SIGNAL(toggled(bool)),this,SLOT(resumeGraph(bool))); //pause des courbes
    connect(m_ihm.ui.table_variables_valeurs,SIGNAL(itemDoubleClicked(QTableWidgetItem*)),this, SLOT(itemRescaleGraph(QTableWidgetItem*))); //redimensionnement des axes
    connect(customPlot,SIGNAL(mousePress(QMouseEvent*)),this,SLOT(mousePress(QMouseEvent*))); //gestion des curseurs
    connect(customPlot,SIGNAL(mouseMove(QMouseEvent*)),this,SLOT(mouseMove(QMouseEvent*)));
    connect(customPlot,SIGNAL(mouseRelease(QMouseEvent*)),this,SLOT(mouseRelease(QMouseEvent*)));
    connect(m_ihm.ui.pb_resetZoom, SIGNAL(clicked()),this,SLOT(resetZoom())); //resetZoom (no comment)
    connect(m_ihm.ui.pb_cusor, SIGNAL(toggled(bool)),this, SLOT(enableCursor(bool)));
    connect(m_ihm.ui.pb_Range,SIGNAL(clicked()),this,SLOT(userRescaleGraph()));
    connect(m_ihm.ui.sliderZoom,SIGNAL(valueChanged(int)),this,SLOT(userZoomGraph(int)));
	//manage record data
    //connect(m_ihm.ui.pb_record,SIGNAL(toggled(bool)),this,SLOT(Slot_save(bool))); //pause des courbes
}