mirror of
https://github.com/YACReader/yacreader
synced 2025-07-14 11:04:25 -04:00
Update russian translation. Need to subtract and to bring the terminology to a common denominator
This commit is contained in:
55
YACReader/shortcuts_dialog.cpp
Normal file
55
YACReader/shortcuts_dialog.cpp
Normal file
@ -0,0 +1,55 @@
|
||||
#include "shortcuts_dialog.h"
|
||||
#include <QVBoxLayout>
|
||||
#include <QPushButton>
|
||||
#include <QTextEdit>
|
||||
#include <QLabel>
|
||||
#include <QPixmap>
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
#include <QTextCodec>
|
||||
|
||||
ShortcutsDialog::ShortcutsDialog(QWidget * parent)
|
||||
:QDialog(parent)//,Qt::FramelessWindowHint)
|
||||
{
|
||||
setModal(true);
|
||||
setWindowIcon(QIcon(":/images/shortcuts.png"));
|
||||
setWindowTitle(tr("YACReader keyboard shortcuts"));
|
||||
|
||||
QVBoxLayout * mainLayout = new QVBoxLayout;
|
||||
|
||||
close = new QPushButton(tr("Close"));
|
||||
connect(close,SIGNAL(clicked()),this,SLOT(close()));
|
||||
|
||||
QHBoxLayout *bottomLayout = new QHBoxLayout;
|
||||
bottomLayout->addStretch();
|
||||
bottomLayout->addWidget(close);
|
||||
|
||||
QHBoxLayout * 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);
|
||||
txtS.setCodec(QTextCodec::codecForName("UTF-8"));
|
||||
QString content = txtS.readAll();
|
||||
|
||||
f.close();
|
||||
|
||||
shortcuts->setHtml(content);
|
||||
|
||||
setWindowTitle(tr("Keyboard Shortcuts"));
|
||||
}
|
Reference in New Issue
Block a user