mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Remove unused dialog
This commit is contained in:
parent
8f738766ed
commit
b3d970fdf4
@ -86,7 +86,6 @@ HEADERS += ../common/comic.h \
|
||||
../common/bookmarks.h \
|
||||
bookmarks_dialog.h \
|
||||
render.h \
|
||||
shortcuts_dialog.h \
|
||||
translator.h \
|
||||
goto_flow_widget.h \
|
||||
page_label_widget.h \
|
||||
@ -125,7 +124,6 @@ SOURCES += ../common/comic.cpp \
|
||||
../common/bookmarks.cpp \
|
||||
bookmarks_dialog.cpp \
|
||||
render.cpp \
|
||||
shortcuts_dialog.cpp \
|
||||
translator.cpp \
|
||||
goto_flow_widget.cpp \
|
||||
page_label_widget.cpp \
|
||||
|
@ -1,64 +0,0 @@
|
||||
#include "shortcuts_dialog.h"
|
||||
#include <QVBoxLayout>
|
||||
#include <QPushButton>
|
||||
#include <QTextEdit>
|
||||
#include <QLabel>
|
||||
#include <QPixmap>
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
#include <QTextCodec>
|
||||
#endif
|
||||
|
||||
ShortcutsDialog::ShortcutsDialog(QWidget *parent)
|
||||
: QDialog(parent) //,Qt::FramelessWindowHint)
|
||||
{
|
||||
setModal(true);
|
||||
setWindowIcon(QIcon(":/images/shortcuts.png"));
|
||||
setWindowTitle(tr("YACReader keyboard shortcuts"));
|
||||
|
||||
auto mainLayout = new QVBoxLayout;
|
||||
|
||||
close = new QPushButton(tr("Close"));
|
||||
connect(close, &QAbstractButton::clicked, this, &QWidget::close);
|
||||
|
||||
auto bottomLayout = new QHBoxLayout;
|
||||
bottomLayout->addStretch();
|
||||
bottomLayout->addWidget(close);
|
||||
|
||||
auto shortcutsLayout = new QHBoxLayout;
|
||||
|
||||
shortcuts = new QTextEdit();
|
||||
shortcuts->setFrameStyle(QFrame::NoFrame);
|
||||
|
||||
//"<p><b>General functions:</b><hr/><b>O</b> : Open comic<br/><b>Esc</b> : Exit</p>"
|
||||
shortcuts->setReadOnly(true);
|
||||
shortcutsLayout->addWidget(shortcuts);
|
||||
// shortcutsLayout->addWidget(shortcuts2);
|
||||
shortcutsLayout->setSpacing(0);
|
||||
mainLayout->addLayout(shortcutsLayout);
|
||||
mainLayout->addLayout(bottomLayout);
|
||||
|
||||
setLayout(mainLayout);
|
||||
|
||||
setFixedSize(QSize(700, 500));
|
||||
|
||||
QFile f(":/files/shortcuts.html");
|
||||
f.open(QIODevice::ReadOnly);
|
||||
QTextStream txtS(&f);
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
txtS.setEncoding(QStringConverter::Utf8);
|
||||
#else
|
||||
txtS.setCodec(QTextCodec::codecForName("UTF-8"));
|
||||
#endif
|
||||
|
||||
QString content = txtS.readAll();
|
||||
|
||||
f.close();
|
||||
|
||||
shortcuts->setHtml(content);
|
||||
|
||||
setWindowTitle(tr("Keyboard Shortcuts"));
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
#ifndef SHORTCUTS_DIALOG_H
|
||||
#define SHORTCUTS_DIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QTextEdit>
|
||||
#include <QPushButton>
|
||||
|
||||
class ShortcutsDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ShortcutsDialog(QWidget *parent = nullptr);
|
||||
|
||||
private:
|
||||
QTextEdit *shortcuts;
|
||||
QPushButton *close;
|
||||
public slots:
|
||||
};
|
||||
|
||||
#endif // SHORTCUTS_DIALOG_H
|
Loading…
Reference in New Issue
Block a user