Bug Summary

File:OMOptim/OMOptim/build/../GUI/Tabs/TabResOneSim.cpp
Warning:line 53, column 20
Value stored to 'problem' during its initialization is never read

Annotated Source Code

[?] Use j/k keys for keyboard navigation

1// $Id$
2/**
3 * This file is part of OpenModelica.
4 *
5 * Copyright (c) 1998-CurrentYear, Open Source Modelica Consortium (OSMC),
6 * c/o Linköpings universitet, Department of Computer and Information Science,
7 * SE-58183 Linköping, Sweden.
8 *
9 * All rights reserved.
10 *
11 * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR
12 * THIS OSMC PUBLIC LICENSE (OSMC-PL).
13 * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
14 * OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, ACCORDING TO RECIPIENTS CHOICE.
15 *
16 * The OpenModelica software and the Open Source Modelica
17 * Consortium (OSMC) Public License (OSMC-PL) are obtained
18 * from OSMC, either from the above address,
19 * from the URLs: http://www.ida.liu.se/projects/OpenModelica or
20 * http://www.openmodelica.org, and in the OpenModelica distribution.
21 * GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html.
22 *
23 * This program is distributed WITHOUT ANY WARRANTY; without
24 * even the implied warranty of MERCHANTABILITY or FITNESS
25 * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH
26 * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL.
27 *
28 * See the full OSMC Public License conditions for more details.
29 *
30 * Main contributor 2010, Hubert Thierot, CEP - ARMINES (France)
31 * Main contributor 2010, Hubert Thierot, CEP - ARMINES (France)
32
33 @file tabResOneSim.cpp
34 @brief Comments for file documentation.
35 @author Hubert Thieriot, hubert.thieriot@mines-paristech.fr
36 Company : CEP - ARMINES (France)
37 http://www-cep.ensmp.fr/english/
38 @version
39*/
40
41#include "TabResOneSim.h"
42#include "Plots/MOOptPlot.h"
43
44
45TabResOneSim::TabResOneSim(OneSimResult *result, QWidget *parent) :
46 MO2ColTab(result->project()->name(),result,false,parent)
47{
48 this->setLocale(QLocale::C);
49
50 _project = dynamic_cast<Project*>(result->project());
51 _result = result;
52
53 OneSimulation* problem = dynamic_cast<OneSimulation*>(_result->problem());
Value stored to 'problem' during its initialization is never read
54
55 // table widgets
56 // _inputTableVars = new WidgetTableVar(_result->inputVariables(),this);
57 _finalTableVars = new WidgetTableOptVar(_result->finalVariables(),this);
58
59 // addDockWidget("Input Variables",_inputTableVars );
60 addDockWidget("Final Variables",_finalTableVars,_inputTableVars);
61 QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Ignored);
62 sizePolicy.setHorizontalStretch(0);
63 sizePolicy.setVerticalStretch(100);
64 _finalTableVars->setSizePolicy(sizePolicy);
65 mapDockWidgets.key(_finalTableVars)->setSizePolicy(sizePolicy);
66
67
68// _widgetCtrl = new WidgetCtrlParameters(_project,problem->model(),problem->ctrls(),true,this);
69// addDockWidget("Simulator",_widgetCtrl,_finalTableVars);
70
71
72 mapDockWidgets.key(_finalTableVars)->raise();
73
74
75
76 // scan
77 if(_result->finalVariables()->nbScans()>1)
78 {
79 _widgetSelPointScan = new WidgetSelPointScan(_result->finalVariables(),this);
80 addFixedWidget("Scans",_widgetSelPointScan,Qt::BottomDockWidgetArea,Qt::Vertical,false);
81 _widgetSelPointScan->resize(_widgetSelPointScan->minimumSize());
82 QSize test = _widgetSelPointScan->minimumSize();
83 test = _widgetSelPointScan->size();
84 test = mapDockWidgets.key(_widgetSelPointScan)->size();
85 test = mapDockWidgets.key(_widgetSelPointScan)->minimumSize();
86 mapDockWidgets.key(_widgetSelPointScan)->resize(mapDockWidgets.key(_widgetSelPointScan)->minimumSize());
87 }
88}
89
90TabResOneSim::~TabResOneSim()
91{
92 //delete ui;
93}
94//
95//void TabResOneSim::updateView(int newCurView)
96//{
97// if (newCurView != curView)
98// {
99// curView = newCurView;
100// if (viewList[newCurView] == "Problem")
101// {
102//
103// tabProblem->show();
104// problemToolBar->show();
105//
106// tabComposites->hide();
107// compositesToolBar->hide();
108//
109// tabVariables->hide();
110// variablesToolBar->hide();
111//
112//
113// }
114//
115// if (viewList[newCurView] == "Variables")
116// {
117//
118// tabVariables->show();
119// variablesToolBar->show();
120//
121// tabProblem->hide();
122// problemToolBar->hide();
123//
124// tabComposites->hide();
125// compositesToolBar->hide();
126// }
127// if (viewList[newCurView] == "Composite curves")
128// {
129// tabVariables->hide();
130// variablesToolBar->hide();
131//
132// tabComposites->show();
133// compositesToolBar->show();
134//
135// tabProblem->hide();
136// problemToolBar->hide();
137// }
138// }
139//}
140//
141//void TabResOneSim::actualizeGui()
142//{
143//
144//}