mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-03-24 23:30:25 +01:00
Removing old unused code
This commit is contained in:
parent
6f0c586c90
commit
8d53bc81eb
@ -414,46 +414,6 @@ void PDFViewerMainWindow::on_actionRendering_Errors_triggered()
|
|||||||
renderingErrorsDialog.exec();
|
renderingErrorsDialog.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PDFViewerMainWindow::on_actionGenerateCMAPrepository_triggered()
|
|
||||||
{
|
|
||||||
QStringList files = QFileDialog::getOpenFileNames(this, tr("Select CMAP mapping files"));
|
|
||||||
|
|
||||||
pdf::PDFFontCMapRepository* instance = pdf::PDFFontCMapRepository::getInstance();
|
|
||||||
instance->clear();
|
|
||||||
|
|
||||||
for (const QString& fileName : files)
|
|
||||||
{
|
|
||||||
QFile file(fileName);
|
|
||||||
if (file.open(QFile::ReadOnly))
|
|
||||||
{
|
|
||||||
pdf::PDFFontCMap map = pdf::PDFFontCMap::createFromData(file.readAll());
|
|
||||||
file.close();
|
|
||||||
|
|
||||||
if (map.isValid())
|
|
||||||
{
|
|
||||||
QFileInfo fileInfo(file);
|
|
||||||
instance->add(fileInfo.baseName().toLatin1(), map.serialize());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
QMessageBox::critical(this, tr("Error"), tr("Invalid CMAP in file '%1'.").arg(fileName));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
QMessageBox::critical(this, tr("Error"), tr("File '%1' can't be opened.").arg(fileName));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
QString repositoryFileName = QFileDialog::getSaveFileName(this, tr("Save CMAP repository to file"));
|
|
||||||
if (!repositoryFileName.isEmpty())
|
|
||||||
{
|
|
||||||
instance->saveToFile(repositoryFileName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PDFViewerMainWindow::on_actionOptions_triggered()
|
void PDFViewerMainWindow::on_actionOptions_triggered()
|
||||||
{
|
{
|
||||||
PDFViewerSettingsDialog dialog(m_settings->getSettings(), this);
|
PDFViewerSettingsDialog dialog(m_settings->getSettings(), this);
|
||||||
|
@ -62,8 +62,6 @@ private slots:
|
|||||||
void on_actionFirstPageOnRightSide_triggered();
|
void on_actionFirstPageOnRightSide_triggered();
|
||||||
|
|
||||||
void on_actionRendering_Errors_triggered();
|
void on_actionRendering_Errors_triggered();
|
||||||
void on_actionGenerateCMAPrepository_triggered();
|
|
||||||
|
|
||||||
void on_actionOptions_triggered();
|
void on_actionOptions_triggered();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -71,17 +71,10 @@
|
|||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionOptions"/>
|
<addaction name="actionOptions"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menuDeveloper">
|
|
||||||
<property name="title">
|
|
||||||
<string>Developer</string>
|
|
||||||
</property>
|
|
||||||
<addaction name="actionGenerateCMAPrepository"/>
|
|
||||||
</widget>
|
|
||||||
<addaction name="menuFile"/>
|
<addaction name="menuFile"/>
|
||||||
<addaction name="menuView"/>
|
<addaction name="menuView"/>
|
||||||
<addaction name="menuGoTo"/>
|
<addaction name="menuGoTo"/>
|
||||||
<addaction name="menuTools"/>
|
<addaction name="menuTools"/>
|
||||||
<addaction name="menuDeveloper"/>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QToolBar" name="mainToolBar">
|
<widget class="QToolBar" name="mainToolBar">
|
||||||
<attribute name="toolBarArea">
|
<attribute name="toolBarArea">
|
||||||
@ -173,11 +166,6 @@
|
|||||||
<string>Ctrl+E</string>
|
<string>Ctrl+E</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionGenerateCMAPrepository">
|
|
||||||
<property name="text">
|
|
||||||
<string>Generate CMAP repository</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="actionRenderOptionAntialiasing">
|
<action name="actionRenderOptionAntialiasing">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user