mirror of
https://github.com/eosswedenorg/antelope-keygen
synced 2026-06-27 10:53:42 +02:00
Merge pull request #34 from pnx/gui-help-text
GUI: Helptext for dictionary widgets.
This commit is contained in:
commit
227ce91c98
4 changed files with 31 additions and 8 deletions
|
|
@ -24,7 +24,7 @@ string(REGEX REPLACE "\n\n([^\n]+)" "<p>\\1</p>" GUI_ABOUT_LICENSE ${GUI_ABOUT_L
|
||||||
string(REGEX REPLACE "\n" "" GUI_ABOUT_LICENSE ${GUI_ABOUT_LICENSE})
|
string(REGEX REPLACE "\n" "" GUI_ABOUT_LICENSE ${GUI_ABOUT_LICENSE})
|
||||||
string(REGEX REPLACE "\<(.+)\>" "- <a href=\"mailto:\\1\">\\1</a>" GUI_ABOUT_AUTHOR ${PROJECT_MAINTAINER})
|
string(REGEX REPLACE "\<(.+)\>" "- <a href=\"mailto:\\1\">\\1</a>" GUI_ABOUT_AUTHOR ${PROJECT_MAINTAINER})
|
||||||
|
|
||||||
configure_file(gui_about.h.in "${CMAKE_CURRENT_BINARY_DIR}/gui_about.h" @ONLY ESCAPE_QUOTES)
|
configure_file(gui_text.h.in "${CMAKE_CURRENT_BINARY_DIR}/gui_text.h" @ONLY ESCAPE_QUOTES)
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
# --------------------------------
|
# --------------------------------
|
||||||
|
|
|
||||||
|
|
@ -21,12 +21,14 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
#ifndef EOSIOKEYGEN_GUI_ABOUT_H
|
#ifndef EOSIOKEYGEN_GUI_TEXT_H
|
||||||
#define EOSIOKEYGEN_GUI_ABOUT_H
|
#define EOSIOKEYGEN_GUI_TEXT_H
|
||||||
|
|
||||||
#define EOSIOKEYGEN_GUI_ABOUT_TITLE "@PROJECT_NAME@ - About"
|
#include <config.hpp>
|
||||||
|
|
||||||
#define EOSIOKEYGEN_GUI_ABOUT_TEXT \
|
#define EOSIOKEYGEN_GUI_TEXT_ABOUT_TITLE "@PROJECT_NAME@ - About"
|
||||||
|
|
||||||
|
#define EOSIOKEYGEN_GUI_TEXT_ABOUT_BODY \
|
||||||
"<h1>@PROJECT_NAME@ - v@PROJECT_VERSION@</h1>" \
|
"<h1>@PROJECT_NAME@ - v@PROJECT_VERSION@</h1>" \
|
||||||
"<p>@PROJECT_DESCRIPTION@</p>" \
|
"<p>@PROJECT_DESCRIPTION@</p>" \
|
||||||
"<p><a href=\"@PROJECT_HOMEPAGE_URL@\">@PROJECT_HOMEPAGE_URL@</a></p>" \
|
"<p><a href=\"@PROJECT_HOMEPAGE_URL@\">@PROJECT_HOMEPAGE_URL@</a></p>" \
|
||||||
|
|
@ -34,4 +36,19 @@
|
||||||
"<h2>Author</h2>" \
|
"<h2>Author</h2>" \
|
||||||
"<p>@GUI_ABOUT_AUTHOR@</p>"
|
"<p>@GUI_ABOUT_AUTHOR@</p>"
|
||||||
|
|
||||||
#endif /* EOSIOKEYGEN_CONFIG_ABOUT_H */
|
#define EOSIOKEYGEN_GUI_TEXT_DICT_LANG_TOOLTIP \
|
||||||
|
"<p>Highlight words from given language dictionary in the found keys (note that the words " \
|
||||||
|
"<strong>are not</strong> used for search. only for highlight output).</p>" \
|
||||||
|
"<p>There can be more then one language. In that case contents " \
|
||||||
|
"of all languges are merged into one dictionary.</p>" \
|
||||||
|
"<p>The langauges are stored in files at <i>" CONFIG_SHARE_FULL_PATH "/dict</i></p>"
|
||||||
|
|
||||||
|
|
||||||
|
#define EOSIOKEYGEN_GUI_TEXT_DICT_FILE_TOOLTIP \
|
||||||
|
"<p>Use words found in file (separated by newline) to highlight " \
|
||||||
|
"words in the keys found (note that the words in this " \
|
||||||
|
"file are not used for search. only for highlight output).</p>" \
|
||||||
|
"<p>There can be more then one file. In that case contents " \
|
||||||
|
"of all files are merged into one dictionary.</p>"
|
||||||
|
|
||||||
|
#endif /* EOSIOKEYGEN_GUI_TEXT_H */
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
#include <QMenuBar>
|
#include <QMenuBar>
|
||||||
#include <QGridLayout>
|
#include <QGridLayout>
|
||||||
#include <QStackedWidget>
|
#include <QStackedWidget>
|
||||||
#include "gui_about.h"
|
#include "gui_text.h"
|
||||||
#include "GenerateWindow.hpp"
|
#include "GenerateWindow.hpp"
|
||||||
#include "SearchWindow.hpp"
|
#include "SearchWindow.hpp"
|
||||||
#include "MainWindow.hpp"
|
#include "MainWindow.hpp"
|
||||||
|
|
@ -59,5 +59,7 @@ void MainWindow::switchToSearch()
|
||||||
|
|
||||||
void MainWindow::showAbout()
|
void MainWindow::showAbout()
|
||||||
{
|
{
|
||||||
QMessageBox::about(this, EOSIOKEYGEN_GUI_ABOUT_TITLE, EOSIOKEYGEN_GUI_ABOUT_TEXT);
|
QMessageBox::about(this,
|
||||||
|
EOSIOKEYGEN_GUI_TEXT_ABOUT_TITLE,
|
||||||
|
EOSIOKEYGEN_GUI_TEXT_ABOUT_BODY);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
#include <libeosio/WIF.hpp>
|
#include <libeosio/WIF.hpp>
|
||||||
#include <eoskeygen/core/leet.hpp>
|
#include <eoskeygen/core/leet.hpp>
|
||||||
#include <eoskeygen/core/string.hpp>
|
#include <eoskeygen/core/string.hpp>
|
||||||
|
#include "gui_text.h"
|
||||||
#include "config.hpp"
|
#include "config.hpp"
|
||||||
#include "helpers.hpp"
|
#include "helpers.hpp"
|
||||||
#include "SearchWindow.hpp"
|
#include "SearchWindow.hpp"
|
||||||
|
|
@ -61,6 +62,9 @@ m_btn_clear ("Clear")
|
||||||
|
|
||||||
// First row.
|
// First row.
|
||||||
m_dict_lang.addItems(get_files(CONFIG_DICT_FULL_PATH));
|
m_dict_lang.addItems(get_files(CONFIG_DICT_FULL_PATH));
|
||||||
|
m_dict_lang.setToolTip(EOSIOKEYGEN_GUI_TEXT_DICT_LANG_TOOLTIP);
|
||||||
|
m_dict_file.setToolTip(EOSIOKEYGEN_GUI_TEXT_DICT_FILE_TOOLTIP);
|
||||||
|
|
||||||
m_layout.addWidget(&m_dict_lang, 0, 0);
|
m_layout.addWidget(&m_dict_lang, 0, 0);
|
||||||
m_layout.addWidget(&m_dict_file, 0, 1);
|
m_layout.addWidget(&m_dict_file, 0, 1);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue