Mentions légales du service

Skip to content
Snippets Groups Projects
Commit b84dcad1 authored by COLAS Adele's avatar COLAS Adele
Browse files

now open can open both type of format and the user can save under a grid or a lsit of curves

parent 64bb17a5
Branches
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.11.1, 2022-08-01T15:21:49. -->
<!-- Written by QtCreator 4.11.1, 2022-10-18T17:02:22. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
......
......@@ -165,6 +165,10 @@ void LayerGroup::combine(LayerGroup *layerB){
}
void LayerGroup::setBorderRect(const QRectF &value){
borderRect=value;
}
/**
* @brief clear the entire group: items + layerviewers
*
......@@ -594,9 +598,10 @@ LayerViewer LayerGroup::computeLayerAt(float parameter) const
* for each layer viewer create a txt file and writte the matrix or the list of control curves
* @param fileName name of the file can be his name or one chose by the user
* @param fileFormat
* @param isContinuus: if true => the file is saved as a list of guide curve and the interpolation is done during the simulation (for VR), if false, the entire gride is saved (for 2D simulation on UMANS).
* @return bool
*/
bool LayerGroup::saveGroup(const QString &fileName, const char *fileFormat)
bool LayerGroup::saveGroup(const QString &fileName, const char *fileFormat, bool isContinuus )
{
bool result;
if(interactionFields.size()>1){
......@@ -604,14 +609,26 @@ bool LayerGroup::saveGroup(const QString &fileName, const char *fileFormat)
{
float key = layer.first;
const QString name = fileName + "_"+QString::number(key) +"."+fileFormat;
result = layer.second->saveImageQuick(name, setMatrixSource());//change to "saveImage()" for old format txt
if(isContinuus){
result = layer.second->saveImageQuick(name, setMatrixSource());//change to "saveImage()" for old format txt
}
else{
result = layer.second->saveImage(name, setMatrixSource());
}
}
}
else{
auto layer = interactionFields[0];
const QString name = fileName + "."+fileFormat;
result = layer->saveImageQuick(name, setMatrixSource());//change to "saveImage()" for old format txt
if(isContinuus){
result = layer->saveImageQuick(name, setMatrixSource());//change to "saveImage()" for old format txt
}
else{
result = layer->saveImage(name, setMatrixSource());
}
}
......
......@@ -62,7 +62,7 @@ public:
bool isModified() const;
bool saveGroup(const QString &fileName, const char *fileFormat);
bool saveGroup(const QString &fileName, const char *fileFormat, bool isContinuus);
std::string setMatrixSource();
......
......@@ -21,7 +21,7 @@
/**
* @brief constructor LayerViewer
* ArenderArea contains several layergroup and a layergroup has on LyerViewer. The layer viewer is what is displayer currently for a layerGroup.
* If a layer group is parametric, it contains several layerviewer, one per keyframe. One LayerViewer is actually one vector matrix
* If a layer group is parametric, it contains several layerviewr, one per keyframe. One LayerViewer is actually one vector matrix
* @param width_ width of the layer viewer
* @param height_ height of the layer viewer
* @param matrix_ matrix of the layer viewer
......@@ -514,7 +514,7 @@ bool LayerViewer::saveImageQuick(const QString &fileName, const std::string &fis
for(auto &curve: getVectCurves()){
std::string line = "";
for (auto &node: curve->getNodes())
line += ";" + std::to_string(node->pos().x()-getBorder().topLeft().x())+" "+ std::to_string(node->pos().y()-getBorder().topLeft().y());
line += "1;" + std::to_string(node->pos().x()-getBorder().topLeft().x())+" "+ std::to_string(node->pos().y()-getBorder().topLeft().y());
line += "\n";
myfile<<line;
}
......
......@@ -13,107 +13,7 @@
<property name="windowTitle">
<string>Dialog</string>
</property>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="geometry">
<rect>
<x>30</x>
<y>240</y>
<width>341</width>
<height>32</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
<widget class="QWidget" name="">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>109</width>
<height>73</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="matrixSize">
<property name="text">
<string>Matrix size</string>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label_matrixHeight">
<property name="text">
<string>Matrix Hieght</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_inputMatrixHeight"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label_matrixWidth">
<property name="text">
<string>Matrix Width</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_inputMatrixWidth"/>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>Dialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>Dialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
<connections/>
</ui>
......@@ -128,9 +128,9 @@ bool RenderArea::saveImage(const QString &fileName, const char *fileFormat)
/**
* @brief load a field
*
* @param isContinuous if the field was saved as list of control curved or a matrix
* @param filename: the name of the file to load
*/
void RenderArea::loadField(bool isContinuous)//load a field in txt format
void RenderArea::loadField(const QString &filename)//load a field in txt format
{
const QString path = "../examples/interactionFields/matrix/";
......@@ -138,33 +138,23 @@ void RenderArea::loadField(bool isContinuous)//load a field in txt format
if(layers[layerID]->getIsParametric() ){
float param = getParameter();
for(auto &layer : layers[layerID]->getInteractionFields())
for(auto &layer : layers[layerID]->getInteractionFields())// if parametric, add a new key field
{
float key = layer.first;
layers[layerID]->setParameter(key);
const QString name = layers[layerID]->getName()+"_"+QString::number(key) +".txt";
const QString nameCv = layers[layerID]->getName()+"_"+QString::number(key) +"_cv.txt";
const QString file = path + name;
layers[layerID]->getCurrentLayer()->generateMatrix(brushIntensity);
if(isContinuous)
generateMatrixFromFileQuick(path+nameCv);
else
generateMatrixFromFile(file);
generateMatrixFromFile(filename);
}
layers[layerID]->setParameter(param);
string a;
}
else{
QString name = layers[layerID]->getName()+".txt";
const QString nameCv = layers[layerID]->getName()+"_cv.txt";
const QString file = path + name;
if(isContinuous)
generateMatrixFromFileQuick(path+nameCv);
else
generateMatrixFromFile(file);
generateMatrixFromFile(filename);
}
addLayerDisplayed();
//addLayerDisplayed();
drawMatrix();
}
/**
* @brief generate matrix of the current layer viewer
......@@ -187,47 +177,8 @@ void RenderArea::loadField(bool isContinuous)//load a field in txt format
//apply(); apply to the simulation scene
}
/**
* @brief save the changes of the fields
*
* @return bool
*/
bool RenderArea::apply()
{
if (getLayers()[getLayerID()]->getHasSource()!=false )
{
QString fileName;
fileName = getLayers()[getLayerID()]->getName();
if (fileName.isEmpty())
return true;
else {
QFile file(fileName);
if (!file.open(QIODevice::WriteOnly)) {
printf("Unable to open file");
return false;
}
QFileInfo fileInf = QFileInfo(fileName);
QString name = "../examples/interactionFields/matrix/"+fileInf.baseName();
return getLayers()[getLayerID()]->saveGroup(name,"txt");
}
}
else{
printf("There is no object nor source\n"
"You have to have a source to generate");
return false;
}
}
......@@ -509,8 +460,6 @@ void RenderArea::mouseMoveEvent(QMouseEvent *event)
void RenderArea::mouseReleaseEvent(QMouseEvent *event)
{
if (event->button() != Qt::LeftButton){
if(myMode == EraseItem || myMode == ColorBrush)
apply();//change the field if we are in safe mode (fields are saved at each modification, not by default)
return;
}
if(!sceneRect().contains(mapToScene(event->pos()))|| !layers[layerID]->getCurrentLayer()->getBorder().contains((mapToScene(event->pos())))){
......@@ -609,8 +558,6 @@ void RenderArea::mouseReleaseEvent(QMouseEvent *event)
}
drawMatrix();
}else if (myMode == EraseItem || myMode == ColorBrush){
apply();
}
......@@ -1060,7 +1007,7 @@ void RenderArea::checkCombination(){//not done yet
*
* @param fileName name of the txt file field
*/
void RenderArea::generateMatrixFromFile(const QString &fileName)
void RenderArea::generateMatrixFromFileOld(const QString &fileName)
{
......@@ -1138,7 +1085,7 @@ void RenderArea::generateMatrixFromFile(const QString &fileName)
* @param fileName fileName name of the txt file field
* @return VectorMatrix return the resulting matrix
*/
VectorMatrix* RenderArea::getMatrixFromFile(const QString &fileName)
VectorMatrix* RenderArea::getMatrixFromFileOld(const QString &fileName)
{
......@@ -1218,7 +1165,7 @@ VectorMatrix* RenderArea::getMatrixFromFile(const QString &fileName)
* @brief read txt field files considering that only the control curves were saved (the continuous version)
* @param fileName fileName name of the txt file field
*/
void RenderArea::generateMatrixFromFileQuick(const QString &fileName)
void RenderArea::generateMatrixFromFile(const QString &fileName)
{
//this->clear();
......@@ -1229,11 +1176,13 @@ void RenderArea::generateMatrixFromFileQuick(const QString &fileName)
if (myfile.is_open())
{
bool isCurve = false;
cout << "File open";
int iteratorLine=0;
int numberCurves =0;
vector<array<int,2>> areaZero;
VectorMatrix *matrix;
int row, col;
while(getline(myfile, line)) {
if (iteratorLine==0){ // --- new file version: the first line also contains the width and height of a cell,
// and the second line contains the source position and all links
......@@ -1243,10 +1192,26 @@ void RenderArea::generateMatrixFromFileQuick(const QString &fileName)
string test = line.substr(0, pos);
string test2 = line.substr(pos + 1, line.length());
int row = stoi(line.substr(0, pos), nullptr, 10);
int col = stoi(line.substr(pos + 1, line.length()), nullptr, 10);
row = stoi(line.substr(0, pos), nullptr, 10);
line.erase(0, line.find(";") + 1);
pos = line.find(";");
col = stoi(line.substr(0, pos), nullptr, 10);
line.erase(0, line.find(";") + 1);
pos = line.find(";");
float subheight = stof( line.substr(0,pos));
line.erase(0, line.find(";") + 1);
pos = line.find(";");
float subwidth = stof(line.substr(0, pos));
layers[layerID]->getCurrentLayer()->setWidth(subwidth*(float)col);
layers[layerID]->getCurrentLayer()->setHeight(subheight*(float)row);
const QRectF &newBorder = QRectF(sceneRect().center()-QPointF(layers[layerID]->getCurrentLayer()->getWidth()/2., layers[layerID]->getCurrentLayer()->getHeight()/2.),QSize(layers[layerID]->getCurrentLayer()->getWidth(), layers[layerID]->getCurrentLayer()->getHeight()));
layers[layerID]->getCurrentLayer()->setBorder(newBorder);
layers[layerID]->setBorderRect(newBorder);
//layers[layerID]->getCurrentLayer()->setBorder(QRectF(float(this->width())/2.f- float(layers[layerID]->getCurrentLayer()->getWidth())/2.f,float(this->height())/2.f+float(layers[layerID]->getCurrentLayer()->getHeight()), layers[layerID]->getCurrentLayer()->getWidth(), layers[layerID]->getCurrentLayer()->getHeight()));
matrix = new VectorMatrix(row,col);
layers[layerID]->getCurrentLayer()->setMatrix( new VectorMatrix(row, col));
//addLayer(layers[layerID]);
}
......@@ -1267,7 +1232,7 @@ void RenderArea::generateMatrixFromFileQuick(const QString &fileName)
}
//insert the source
QPointF sourcePos = QPointF(std::stof(tokens[0]),std::stof(tokens[1]));
QPointF sourcePos = layers[layerID]->getCurrentLayer()->boundingRect().topLeft()+ QPointF(std::stof(tokens[0]),std::stof(tokens[1]));
insertPole(sourcePos, Pole::Agent, true);
// read the links one by one
......@@ -1299,66 +1264,105 @@ void RenderArea::generateMatrixFromFileQuick(const QString &fileName)
else if(iteratorLine ==2){
if(line.find(";") == std::string::npos){
isCurve=true;
std::istringstream issLine(line);
issLine>>numberCurves;
getline(myfile, line);
iteratorLine ++;
}
else{
isCurve = false;
}
std::istringstream issLine(line);
issLine>>numberCurves;
}
//check curves number
else if(iteratorLine < numberCurves +3){
size_t pos = 0;
float coeffColor= 180;
std::string token;
std::string delimiter = ";";
QList<QPointF> pts;
int itCurve = 0;
while ((pos = line.find(delimiter)) != std::string::npos) {
token = line.substr(0, pos);
if(isCurve){
if(iteratorLine < numberCurves +3){ //check curves number
size_t pos = 0;
float coeffColor= 180;
std::string token;
std::string delimiter = ";";
QList<QPointF> pts;
int itCurve = 0;
while ((pos = line.find(delimiter)) != std::string::npos) {
pos = line.find(delimiter);
token = line.substr(0, pos);
float posx;
float posy;
std::istringstream iss(token);
if (itCurve ==0){
iss>>coeffColor;
}
else{
iss >> posx >> posy ;
QPointF p = QPointF(posx,posy);
pts.push_back(p+layers[layerID]->boundingRect().topLeft());
}
std::cout << token << std::endl;
line.erase(0, pos + delimiter.length());
itCurve ++;
}
token = line.substr(pos + 1, line.length());
float posx;
float posy;
std::istringstream iss(token);
if (itCurve ==0){
iss>>coeffColor;
}
else{
iss >> posx >> posy ;
QPointF p = QPointF(posx,posy);
pts.push_back(p+layers[layerID]->boundingRect().topLeft());
}
iss >> posx >> posy ;
QPointF p = QPointF(posx,posy);
pts.push_back(p+layers[layerID]->boundingRect().topLeft());
std::cout << token << std::endl;
line.erase(0, pos + delimiter.length());
itCurve ++;
VectorCurve *curvevect = new VectorCurve(pts, layers[layerID]->getCurrentLayer()->getMyPenWidth());
layers[layerID]->getCurrentLayer()->addVectorCurve(curvevect); // ass the curve to the layer
//add the curve object to the scene
scene()->addItem(curvevect);
for(auto &node: curvevect->getNodes()){
scene()->addItem(node);
}
VectorCurve *curvevect = new VectorCurve(pts, layers[layerID]->getCurrentLayer()->getMyPenWidth());
layers[layerID]->getCurrentLayer()->addVectorCurve(curvevect); // ass the curve to the layer
//add the curve object to the scene
scene()->addItem(curvevect);
for(auto &node: curvevect->getNodes()){
scene()->addItem(node);
}
}
else{//read the zero Area, cells that are empty
size_t pos = line.find(";");
int i = stoi(line.substr(0, pos), nullptr, 10);
int j = stoi(line.substr(pos + 1, line.length()), nullptr, 10);
areaZero.push_back(array<int,2> {i,j});
else{//read the zero Area, cells that are empty
size_t pos = line.find(";");
int i = stoi(line.substr(0, pos), nullptr, 10);
int j = stoi(line.substr(pos + 1, line.length()), nullptr, 10);
areaZero.push_back(array<int,2> {i,j});
}
}
iteratorLine ++;
else if(iteratorLine>1){// of we are is grid reading mode, read each vector
int index = iteratorLine-2;
int j = index % row;
int i = index / col;
size_t pos = line.find(";");
float x = stof(line.substr(0, pos));
float y = stof(line.substr(pos + 1, line.length()));
Vector2D vect = Vector2D(x, y);
matrix->setAt(i, j, vect);
if(vect.isZero()){
areaZero.push_back(array<int,2> {i,j});
}
}
iteratorLine ++;
}
if(areaZero.size()>0){
layers[layerID]->getCurrentLayer()->setZerosArea(areaZero);
}
if(isCurve){
layers[layerID]->getCurrentLayer()->generateMatrix(brushIntensity);
myfile.close();
update();
}
else{
layers[layerID]->getCurrentLayer()->setMatrix(matrix);
}
myfile.close();
update();
}
}
/**
......@@ -2087,7 +2091,7 @@ void RenderArea::drawComparingMatrix(){
for(int k = 2; k<24; k++){
QString name = layers[layerID]->getName();
matrixMean += *getMatrixFromFile("C:\\Users\\acolas\\Documents\\Present\\papierSiggraph\\InteractionField_UserStudy\\Results\\Results_"+ QString::number(k)+"\\Task7\\matrix\\"+ layers[layerID]->getName()+".txt");
matrixMean += *getMatrixFromFileOld("C:\\Users\\acolas\\Documents\\Present\\papierSiggraph\\InteractionField_UserStudy\\Results\\Results_"+ QString::number(k)+"\\Task7\\matrix\\"+ layers[layerID]->getName()+".txt");
}
matrixMean/=22;
......@@ -2102,7 +2106,7 @@ void RenderArea::drawComparingMatrix(){
varianceMatrix.push_back(row);
}
for(int k = 2; k<24; k++){
VectorMatrix matrixCompared = *getMatrixFromFile("C:\\Users\\acolas\\Documents\\Present\\papierSiggraph\\InteractionField_UserStudy\\Results\\Results_"+ QString::number(k)+"\\Task7\\matrix\\"+ layers[layerID]->getName()+".txt");
VectorMatrix matrixCompared = *getMatrixFromFileOld("C:\\Users\\acolas\\Documents\\Present\\papierSiggraph\\InteractionField_UserStudy\\Results\\Results_"+ QString::number(k)+"\\Task7\\matrix\\"+ layers[layerID]->getName()+".txt");
for (int i = 0; i*height/(float)layer->getMatrix()->getRows()< height; i++){
for(int j = 0; j*width/(float)layer->getMatrix()->getCols()< width; j++){
//varianceMatrix[i][j] += pow(angle(matrixMean.at(i,j), matrixCompared.at(i,j))*180/PI, 2);
......
......@@ -49,7 +49,7 @@ public:
void gridCreate();
void generateMatrix();
void drawMatrix();
void generateMatrixFromFile(QString &FileName);
void generateMatrixFromFileOld(QString &FileName);
std::array<int,2> getCase(QPointF);
void updateObstacleSize(QPointF center, float heigt, float width, float offsetH, float offsetW);
......@@ -126,18 +126,18 @@ public:
void removeLayerDisplayed();
void addLayerDisplayed();
void showVector();
void generateMatrixFromFileQuick(const QString &fileName);
void loadField(bool isContinuous);
void generateMatrixFromFile(const QString &fileName);
void loadField(const QString &fileName);
void generate();
bool apply();
void drawComparingMatrix();
void generateMatrixFromFile(const QString &fileName);
void generateMatrixFromFileOld(const QString &fileName);
float getBrushIntensity() const;
void setBrushIntensity(float value);
int getBrushWidth() const;
void setBrushWidth(int value);
void getVisualTrajectory(const QString fileName, QColor color);
VectorMatrix *getMatrixFromFile(const QString &fileName);
VectorMatrix *getMatrixFromFileOld(const QString &fileName);
void drawMatrix(VectorMatrix *matrix, QColor color);
QCursor cursorBrushUpdate();
void drawCurveTo(QPainterPath p);
......
......@@ -152,23 +152,39 @@ void View::open()
tr("Open File"),initialPath);
if (!fileName.isEmpty()){
static_cast<RenderArea *>(tabWidget->currentWidget())->generateMatrixFromFileQuick(fileName);
static_cast<RenderArea *>(tabWidget->currentWidget())->loadField(fileName);
}
}
}
void View::save(bool isExpended){
saveFile("txt", isExpended);
}
/**
* @brief save the current field
* @brief save the current field as a grid, recommanded for the 2D simulation. The magnitude of the vectors can be colored according to the speed of the impacted object object and the interpolation is realized beforehand.
*
* @param isExpended
*/
void View::save(bool isExpended)
void View::saveAsGrid(bool isExpended)
{
isContinuus= false;
saveFile("txt", isExpended);
}
//! [4]
/**
* @brief save the current field as a list of guidelines, recommanded for the VR on Unity. The magnitude of the vectors cannot be colored according to the speed (will be computed during interpolation) of the impacted object object and the interpolation is at runtine.
*
* @param isExpended
*/
void View::saveAsCurves(bool isExpended)
{
isContinuus= true;
saveFile("txt", isExpended);
}
//! [4]
//! [7]
/**
* @brief
......@@ -1534,9 +1550,12 @@ void View::createActions()
saveAsActs.append(action);
*/
saveAsAct = new QAction(tr("Save as"), this);
saveAsGridAct = new QAction(tr("Save entire grid as"), this);
saveAsCurveAct = new QAction(tr("Save the guide lines as"), this);
bool expended = true;
connect(saveAsAct, &QAction::triggered, [this, expended] {save(expended);});
connect(saveAsGridAct, &QAction::triggered, [this, expended] {saveAsGrid(expended);});
connect(saveAsCurveAct, &QAction::triggered, [this, expended] {saveAsCurves(expended);});
saveAct = new QAction(tr("Save"), this);
saveAct->setShortcut((tr("Ctrl+S")));
expended = false;
......@@ -1667,7 +1686,8 @@ void View::createMenus()
fileMenu->addAction(openAct);
fileMenu->addAction(saveAct);
//fileMenu->addMenu(saveAsMenu); to keep the save as as a list of action
fileMenu->addAction(saveAsAct);
fileMenu->addAction(saveAsGridAct);
fileMenu->addAction(saveAsCurveAct);
fileMenu->addSeparator();
fileMenu->addAction(exitAct);
......@@ -1778,6 +1798,7 @@ bool View::saveFile(const QByteArray &fileFormat, bool isExtended)
else{
fileName = static_cast<RenderArea *>(tabWidget->currentWidget())->getLayers()[static_cast<RenderArea *>(tabWidget->currentWidget())->getLayerID()]->getName();
}
......@@ -1792,7 +1813,7 @@ bool View::saveFile(const QByteArray &fileFormat, bool isExtended)
}
QFileInfo fileInf = QFileInfo(fileName);
QString name = fileInf.path()+"/"+fileInf.baseName();
return static_cast<RenderArea *>(tabWidget->currentWidget())->getLayers()[static_cast<RenderArea *>(tabWidget->currentWidget())->getLayerID()]->saveGroup(name,fileFormat);
return static_cast<RenderArea *>(tabWidget->currentWidget())->getLayers()[static_cast<RenderArea *>(tabWidget->currentWidget())->getLayerID()]->saveGroup(name,fileFormat, isContinuus);
}
}
......@@ -1869,7 +1890,7 @@ bool View::saveSimple()
QString name = "../examples/interactionFields/matrix/"+fileInf.baseName();
return static_cast<RenderArea *>(tabWidget->currentWidget())->getLayers()[static_cast<RenderArea *>(tabWidget->currentWidget())->getLayerID()]->saveGroup(name,"txt");
return static_cast<RenderArea *>(tabWidget->currentWidget())->getLayers()[static_cast<RenderArea *>(tabWidget->currentWidget())->getLayerID()]->saveGroup(name,"txt", isContinuus);
}
}
......
......@@ -63,6 +63,7 @@ protected:
void resizeEvent(QResizeEvent* event) override;
private slots:
void open();
void save(bool isExpended);
......@@ -114,7 +115,8 @@ private slots:
void angularSymetry();
void createCentralView();
//void showContextMenu(const QPoint &pos);
void saveAsGrid(bool);
void saveAsCurves(bool);
bool saveSimple();
private:
Ui::View *ui;
......@@ -135,6 +137,7 @@ private:
bool maybeSave();
bool saveFile(const QByteArray &fileFormat, bool isExtended);
bool isContinuus;
RenderArea *renderArea;
QGraphicsView *view;
......@@ -150,7 +153,8 @@ private:
QAction *openAct;
//QList<QAction *> saveAsActs;
QAction *saveAsAct;
QAction *saveAsGridAct;
QAction *saveAsCurveAct;
QAction *saveAct;
QAction *loadAsAct;
QAction *exitAct;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment