mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Issue #261: About translation to Korean
This commit is contained in:
@ -27,7 +27,9 @@
|
||||
|
||||
#include <QDialog>
|
||||
#include <QFuture>
|
||||
#include <QSvgRenderer>
|
||||
#include <QFutureWatcher>
|
||||
#include <QStyledItemDelegate>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
@ -110,6 +112,34 @@ private:
|
||||
int m_manualThreshold = 128;
|
||||
};
|
||||
|
||||
class ImagePreviewDelegate : public QStyledItemDelegate
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ImagePreviewDelegate(std::vector<PDFCreateBitonalDocumentDialog::ImageConversionInfo>* imageConversionInfos, QObject* parent);
|
||||
|
||||
virtual void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override;
|
||||
|
||||
virtual bool editorEvent(QEvent* event,
|
||||
QAbstractItemModel* model,
|
||||
const QStyleOptionViewItem& option,
|
||||
const QModelIndex& index) override;
|
||||
|
||||
virtual bool helpEvent(QHelpEvent* event,
|
||||
QAbstractItemView* view,
|
||||
const QStyleOptionViewItem& option,
|
||||
const QModelIndex& index) override;
|
||||
|
||||
private:
|
||||
static constexpr QSize s_iconSize = QSize(24, 24);
|
||||
|
||||
QRect getMarkRect(const QStyleOptionViewItem& option) const;
|
||||
|
||||
std::vector<PDFCreateBitonalDocumentDialog::ImageConversionInfo>* m_imageConversionInfos;
|
||||
mutable QSvgRenderer m_yesRenderer;
|
||||
mutable QSvgRenderer m_noRenderer;
|
||||
};
|
||||
|
||||
} // namespace pdfviewer
|
||||
|
||||
#endif // PDFCREATEBITONALDOCUMENTDIALOG_H
|
||||
|
Reference in New Issue
Block a user