Skip to content

Commit

Permalink
translation improved;
Browse files Browse the repository at this point in the history
unused code removed;
version changed
  • Loading branch information
aizenbit committed Jun 13, 2016
1 parent b324a42 commit 90d20f6
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 36 deletions.
3 changes: 0 additions & 3 deletions fontdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ FontDialog::FontDialog(QWidget *parent) :
ui->treeWidget->sortByColumn(0, Qt::AscendingOrder);
ui->splitter->setSizes(QList <int> () << 200 << 350);
lastItem = nullptr;

ui->buttonBox->button(QDialogButtonBox::Save)->setText(tr("Save"));
ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel"));
}

FontDialog::~FontDialog()
Expand Down
6 changes: 5 additions & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ int main(int argc, char *argv[])
QApplication a(argc, argv);

QTranslator myTranslator;
myTranslator.load("Scribbler-" + QLocale::system().name());
myTranslator.load("Scribbler-" + QLocale::system().name(), "translations");
a.installTranslator(&myTranslator);

QTranslator qtTranslator;
qtTranslator.load("qt_" + QLocale::system().name(), "translations");
a.installTranslator(&qtTranslator);

qApp->addLibraryPath("./plugins");
MainWindow w;
w.show();
Expand Down
1 change: 0 additions & 1 deletion mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,6 @@ void MainWindow::printAllSheets(QPrinter *printer)
{ //i.e. while printing all sheets
renderNextSheet();
ui->svgView->hideBorders(true);
int to = printer->toPage(), from = printer->fromPage();

if (printer->fromPage() != 0 && printer->fromPage() > currentSheetNumber + 1)
continue;
Expand Down
2 changes: 1 addition & 1 deletion mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class MainWindow : public QMainWindow
QLabel *sheetNumberLabel;
QVector<int> sheetPointers; //pointers to the beginning of the sheets
int currentSheetNumber; //number of sheet that is displaying or rendering now
const QString version = "0.8.1 beta";
const QString version = "0.8.2 beta";
void saveAllSheetsToImages(const QString &fileName, const int indexOfExtension);
void saveAllSheetsToPDF(const QString &fileName);
void preparePrinter(QPrinter *printer);
Expand Down
3 changes: 0 additions & 3 deletions preferencesdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ PreferencesDialog::PreferencesDialog(QWidget *parent) :

ui->seedSpinBox->setMaximum(std::numeric_limits<int>::max());
ui->seedSpinBox->setMinimum(std::numeric_limits<int>::min());

ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK"));
ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel"));
}

PreferencesDialog::~PreferencesDialog()
Expand Down
26 changes: 0 additions & 26 deletions svgview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,32 +362,6 @@ void SvgView::connectLetters()
}
}

void SvgView::connectLastLetterToCurrent()
{
QSizeF lastLetterBoundingRect;
lastLetterBoundingRect.setWidth(lastLetter->boundingRect().width() * lastLetter->scale());
lastLetterBoundingRect.setHeight(lastLetter->boundingRect().height() * lastLetter->scale());

QPointF inPoint, outPoint;
outPoint.rx() = previousSymbolCursor.x() +
previousSymbolData.outPoint.x() * lastLetterBoundingRect.width();
outPoint.ry() = previousSymbolCursor.y() +
previousSymbolData.outPoint.y() * lastLetterBoundingRect.height() -
lastLetterBoundingRect.height() * previousSymbolData.limits.topLeft().y();

inPoint.rx() = cursor.x() +
symbolData.inPoint.x() * symbolBoundingSize.width();
inPoint.ry() = cursor.y() +
symbolData.inPoint.y() * symbolBoundingSize.height() -
symbolBoundingSize.height() * symbolData.limits.topLeft().y();

QPen pen(fontColor);
pen.setWidth(penWidth * dpmm);
pen.setCapStyle(Qt::RoundCap);

scene->addLine(outPoint.x(), outPoint.y(), inPoint.x(), inPoint.y(), pen);
}

void SvgView::processUnknownSymbol(const QChar &symbol)
{
switch (symbol.toLatin1())
Expand Down
1 change: 0 additions & 1 deletion svgview.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ public slots:
void limitScale(qreal factor); //limited view zoom
void prepareSceneToRender();
bool preventGoingBeyondRightMargin(qreal letterWidth, QStringRef text, int currentSymbolIndex);
void connectLastLetterToCurrent();
void connectLetters();
void processUnknownSymbol(const QChar &symbol);
void insertSymbol(QChar key, SymbolData &symbolData);
Expand Down

0 comments on commit 90d20f6

Please sign in to comment.