Skip to content

Commit 19d1b10

Browse files
committed
- Removed 3D support from OMNotebook
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@10880 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent 620bf1e commit 19d1b10

File tree

9 files changed

+10
-63
lines changed

9 files changed

+10
-63
lines changed

OMNotebook/OMNotebookGUI/OMNotebook.config.in

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@ QMAKE_CC = @CC@
22
QMAKE_CXX = @CXX@
33
QMAKE_LINK = @CXX@
44

5-
COIN_LIBS = @COIN_LIBS@
6-
SOQT_LIBS = @SOQT_LIBS@
7-
COIN_INCLUDE = @COIN_INCLUDE@
8-
SOQT_INCLUDE = @SOQT_INCLUDE@
9-
HAVE_COIN = @HAVE_COIN@
10-
115
CORBALIBS = @CORBALIBS@
126
CORBAINC = @CORBA_QMAKE_INCLUDES@
137
USE_CORBA = @QT_USE_CORBA@

OMNotebook/OMNotebookGUI/OMNotebookGUI.pro

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ SOURCES += \
4444
graphcell.cpp \
4545
evalthread.cpp \
4646
indent.cpp \
47-
../3Dpkg/SimulationData.cpp \
48-
../3Dpkg/VisualizationWidget.cpp \
4947
../OMSketch/Tools.cpp \
5048
../OMSketch/Sketch_files.cpp \
5149
../OMSketch/Shapes.cpp \
@@ -122,8 +120,6 @@ HEADERS += \
122120
graphcell.h \
123121
evalthread.h \
124122
indent.h \
125-
../3Dpkg/SimulationData.h \
126-
../3Dpkg/VisualizationWidget.h \
127123
omc_communicator.h \
128124
../OMSketch/Tools.h \
129125
../OMSketch/Sketch_files.h \
@@ -148,12 +144,7 @@ HEADERS += \
148144

149145
FORMS += ImageSizeDlg.ui \
150146
OtherDlg.ui \
151-
searchform.ui \
152-
../Pltpkg2/compoundWidget.ui\
153-
../Pltpkg2/dataSelect.ui\
154-
../Pltpkg2/graphWindow.ui\
155-
../Pltpkg2/preferences.ui \
156-
../Pltpkg2/newgraph.ui
147+
searchform.ui
157148
# -------For OMNIorb
158149
win32 {
159150
DEFINES += __x86__ \
@@ -162,19 +153,15 @@ win32 {
162153
__WIN32__
163154
CORBAINC = $$(OMDEV)/lib/omniORB-4.1.4-mingw/include
164155
CORBALIBS = -L$$(OMDEV)/lib/omniORB-4.1.4-mingw/lib/x86_win32 -lomniORB414_rt -lomnithread34_rt
165-
COIN_LIBS =
166-
SOQT_LIBS =
167156
USE_CORBA = USE_OMNIORB
168157
} else {
169158
include(OMNotebook.config)
170159
}
171160
#---------End OMNIorb
172161

173-
DEFINES += $${HAVE_COIN} $${USE_CORBA}
174-
LIBS += $${CORBALIBS} $${COIN_LIBS} $${SOQT_LIBS}
162+
DEFINES += $${USE_CORBA}
163+
LIBS += $${CORBALIBS}
175164
INCLUDEPATH += $${CORBAINC} \
176-
../Pltpkg2 \
177-
../3Dpkg \
178165
../OMSketch \
179166
../../
180167

OMNotebook/OMNotebookGUI/cellapplication.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,7 @@ namespace IAEX
9494
: QObject()
9595
{
9696
app_ = new QApplication(argc, argv);
97-
#ifdef HAVE_COIN
98-
mainWindow = SoQt::init(argc, argv, argv[0]);
99-
#else
10097
mainWindow = new QMainWindow();
101-
#endif
10298
QDir dir;
10399

104100
// 2005-10-25 AF, added a check if omc is running, otherwise

OMNotebook/OMNotebookGUI/graphcell.cpp

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,6 @@ namespace IAEX {
525525

526526
connect(output_, SIGNAL(anchorClicked(const QUrl&)), input_, SLOT(goToPos(const QUrl&)));
527527

528-
showGraph = false;
529-
530528
imageFile=0;
531529
}
532530

@@ -1293,12 +1291,6 @@ namespace IAEX {
12931291
return evaluated_;
12941292
}
12951293

1296-
void GraphCell::showGraphics()
1297-
{
1298-
showGraph = true;
1299-
contentChanged();
1300-
}
1301-
13021294
bool GraphCell::isQtPlot(QString text)
13031295
{
13041296
QRegExp exp("plot[ ]*\\(.*\\)|plotParametric[ ]*\\(.*\\)|plotAll[ ]*\\(.*\\)" );
@@ -1422,16 +1414,11 @@ namespace IAEX {
14221414
// remove plot.png if it already exist, don't want any
14231415
// old plot.
14241416
bool newPlot = isQtPlot(input_->toPlainText());
1425-
bool visualize = isVisualize(input_->toPlainText());
14261417

14271418
if(newPlot)
14281419
{
14291420
setClosed(false);
14301421
}
1431-
else if (visualize)
1432-
{
1433-
showGraphics();
1434-
}
14351422

14361423
// 2006-02-02 AF, Added try-catch
14371424
QString res, error;
@@ -1456,7 +1443,7 @@ namespace IAEX {
14561443
EvalThread* et = new EvalThread(getDelegate(), expr);
14571444
connect(et, SIGNAL(finished()), this, SLOT(delegateFinished()));
14581445
et->start();
1459-
if (!visualize && !newPlot) { et->wait(); }
1446+
if (!newPlot) { et->wait(); }
14601447
}
14611448
catch( exception &e )
14621449
{

OMNotebook/OMNotebookGUI/graphcell.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ namespace IAEX
128128

129129
void delegateFinished();
130130
void setState(int state);
131-
void showGraphics();
132-
133131

134132
protected:
135133
void resizeEvent(QResizeEvent *event); //AF
@@ -168,7 +166,6 @@ namespace IAEX
168166
Document *document_;
169167

170168
public:
171-
bool showGraph;
172169
QPushButton* variableButton;
173170
QTemporaryFile* imageFile;
174171
};

OMNotebook/OMNotebookGUI/serializingvisitor.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,6 @@ namespace IAEX
254254
else
255255
graphcell.setAttribute( XML_CLOSED, XML_FALSE );
256256

257-
graphcell.setAttribute( XML_GRAPHCELL_SHOWGRAPH, node->showGraph?XML_TRUE:XML_FALSE);
258-
259257
// Create an text element (for input) and append it to the element
260258
QDomElement textelement = domdoc_.createElement( XML_INPUTPART );
261259
QDomText textnode = domdoc_.createTextNode( node->text() );

OMNotebook/OMNotebookGUI/xmlparser.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -626,13 +626,6 @@ namespace IAEX
626626
else
627627
throw runtime_error( "Unknown closed value in inputcell" );
628628

629-
bool showGraphics = (element.attribute(XML_GRAPHCELL_SHOWGRAPH, XML_FALSE) == XML_TRUE)?true:false;
630-
if(showGraphics)
631-
{
632-
gCell->showGraph = true;
633-
gCell->showGraphics();
634-
}
635-
636629
parent->addChild( graphcell );
637630
}
638631

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +0,0 @@
1-
HAVE_COIN = @HAVE_COIN@
2-
COIN_LIBS = @COIN_LIBS@
3-
SOQT_LIBS = @SOQT_LIBS@
4-
COIN_INCLUDE = @COIN_INCLUDE@
5-
SOQT_INCLUDE = @SOQT_INCLUDE@

OMNotebook/OMSketch/Tools.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Tools::Tools(Document *document1,DocumentView *doc1):document(document1),doc_vie
1313
rect = new QToolButton();
1414
hlayout = new QVBoxLayout;
1515
main_widget = new QWidget;
16-
file_dialog = new QFileDialog(this,"Open","c:",".skh");
16+
file_dialog = new QFileDialog(this,"Open",QString(),".skh");
1717

1818
color_dialog = new QColorDialog(this);
1919

@@ -389,7 +389,7 @@ void Tools::draw_new()
389389

390390
if(msg->clickedButton()==msg_save)
391391
{
392-
QString file_name=file_dialog->getSaveFileName(this,"Save","c:",tr("Image(*.png)"));
392+
QString file_name=file_dialog->getSaveFileName(this,"Save",QString(),tr("Image(*.png)"));
393393
file_dialog->deleteLater();
394394
if(file_name.contains(".png"))
395395
writeImage(file_name);
@@ -420,7 +420,7 @@ void Tools::draw_save()
420420
break;
421421
else if(opt==QMessageBox::Yes)
422422
{
423-
QString file_name=file_dialog->getSaveFileName(this,"Save","c:",tr("Image(*.png);;Image(*.jpg);;Images(*.bmp)"));
423+
QString file_name=file_dialog->getSaveFileName(this,"Save",QString(),tr("Image(*.png);;Image(*.jpg);;Images(*.bmp)"));
424424

425425
QMessageBox::about(this,"file name ",file_name);
426426
writeImage(file_name);
@@ -534,7 +534,7 @@ void Tools::draw_save()
534534

535535
void Tools::draw_open()
536536
{
537-
QString file_name=file_dialog->getOpenFileName(this,"Open","c:","*.png *.jpg *.bmp" );
537+
QString file_name=file_dialog->getOpenFileName(this,"Open",QString(),"*.png *.jpg *.bmp" );
538538

539539
if(!isSaved)
540540
draw_save();
@@ -1078,7 +1078,7 @@ void Tools::draw_shapes()
10781078
void Tools::msg_save_file()
10791079
{
10801080
qDebug()<<"Entered \n";
1081-
QString file_name=file_dialog->getSaveFileName(this,"Save","c:","*.skh");
1081+
QString file_name=file_dialog->getSaveFileName(this,"Save",QString(),"*.skh");
10821082
file_dialog->deleteLater();
10831083
scene->save_Scene(file_name);
10841084
scene->new_Scene();
@@ -1379,7 +1379,7 @@ void Tools::closeEvent(QCloseEvent* event)
13791379
{
13801380
if(!isSaved)
13811381
{
1382-
QString file_name=file_dialog->getSaveFileName(this,"Save","c:",tr("Image(*.png)"));
1382+
QString file_name=file_dialog->getSaveFileName(this,"Save",QString(),tr("Image(*.png)"));
13831383
if(file_name.contains(".png"))
13841384
writeImage(file_name);
13851385
}

0 commit comments

Comments
 (0)