Code style change.

--HG--
branch : develop
This commit is contained in:
dismine 2014-02-18 22:42:06 +02:00
parent 1264c1df58
commit d5c4c26444

View File

@ -207,34 +207,35 @@ void TableWindow::saveScene()
QFileInfo fi( name ); QFileInfo fi( name );
QStringList suffix; QStringList suffix;
suffix << "svg" << "png" << "pdf" << "eps" << "ps"; suffix << "svg" << "png" << "pdf" << "eps" << "ps";
switch (suffix.indexOf(fi.suffix())) { switch (suffix.indexOf(fi.suffix()))
case 0: {
case 0: //svg
paper->setVisible(false); paper->setVisible(false);
SvgFile(name); SvgFile(name);
paper->setVisible(true); paper->setVisible(true);
break; break;
case 1: case 1: //png
paper->setPen(QPen(Qt::white, 0.1, Qt::NoPen)); paper->setPen(QPen(Qt::white, 0.1, Qt::NoPen));
PngFile(name); PngFile(name);
paper->setPen(QPen(Qt::black, widthMainLine)); paper->setPen(QPen(Qt::black, widthMainLine));
break; break;
case 2: case 2: //pdf
paper->setPen(QPen(Qt::white, 0.1, Qt::NoPen)); paper->setPen(QPen(Qt::white, 0.1, Qt::NoPen));
PdfFile(name); PdfFile(name);
paper->setPen(QPen(Qt::black, widthMainLine)); paper->setPen(QPen(Qt::black, widthMainLine));
break; break;
case 3: case 3: //eps
paper->setPen(QPen(Qt::white, 0.1, Qt::NoPen)); paper->setPen(QPen(Qt::white, 0.1, Qt::NoPen));
EpsFile(name); EpsFile(name);
paper->setPen(QPen(Qt::black, widthMainLine)); paper->setPen(QPen(Qt::black, widthMainLine));
break; break;
case 4: case 4: //ps
paper->setPen(QPen(Qt::white, 0.1, Qt::NoPen)); paper->setPen(QPen(Qt::white, 0.1, Qt::NoPen));
PsFile(name); PsFile(name);
paper->setPen(QPen(Qt::black, widthMainLine)); paper->setPen(QPen(Qt::black, widthMainLine));
break; break;
default: default:
qWarning() << "Bad file suffix in TableWindow::saveScene()."; qWarning() << "Bad file suffix"<<Q_FUNC_INFO;
break; break;
} }
brush->setColor( QColor( Qt::gray ) ); brush->setColor( QColor( Qt::gray ) );
@ -505,6 +506,7 @@ void TableWindow::PsFile(const QString &name) const
} }
} }
//TODO delete parametr name and use last parameter in string list instead.
void TableWindow::PdfToPs(const QString &name, const QStringList &params) const void TableWindow::PdfToPs(const QString &name, const QStringList &params) const
{ {
QProcess proc; QProcess proc;