Skip to content

Commit

Permalink
Add support for green and blue circles in yaml
Browse files Browse the repository at this point in the history
These are used in default.yaml to mean ...something.

More emojis can be added later, should it be needed.
  • Loading branch information
afbjorklund committed May 29, 2022
1 parent bb10971 commit 285c588
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
15 changes: 15 additions & 0 deletions QrwEmoticons/QrwEmoticons.pri
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
QT += gui widgets svg xml

INCLUDEPATH += $$PWD/include

# Removed all emojis but openmoji and circles

QMAKE_PRE_LINK += \
cd $$PWD/lib && qmake && make; \
cd $$PWD/plugin-openmoji && qmake && make

LIBS += \
-L$$PWD/lib \
-lQrwEmoticons \
-L$$PWD/plugin-openmoji \
-lemoticons_openmoji
8 changes: 8 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,24 @@
****************************************************************************/

#include <QApplication>
#include <QtPlugin>

#ifndef QT_NO_SYSTEMTRAYICON

#include <QMessageBox>
#include "window.h"
#include "lima.h"

#ifndef QT_NO_EMOTICONS
Q_IMPORT_PLUGIN(EmoticonOpenmojiPlugin)
#endif

int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(systray);
#ifndef QT_NO_EMOTICONS
Q_INIT_RESOURCE(emoticons_openmoji);
#endif

#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
Expand Down
1 change: 1 addition & 0 deletions systray.pro
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ DISTFILES += \
LICENSE

include(QSourceHighlite/QSourceHighlite.pri)
include(QrwEmoticons/QrwEmoticons.pri)

# Enabling qtermwidget requires GPL-v2 license
#CONFIG += gpl_licensed
Expand Down
10 changes: 10 additions & 0 deletions window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@
using namespace QSourceHighlite;
#endif

#ifndef QT_NO_EMOTICONS
#include <QrwEmoticons/QrwEmoticons>
#endif

//! [0]
Window::Window()
{
Expand Down Expand Up @@ -279,7 +283,13 @@ void Window::yamlEditor(QString instanceName, QString yamlFile, bool create)
topLayout->addWidget(label);
topLayout->addWidget(createName);

#ifndef QT_NO_EMOTICONS
QrwEmoticonsTextEdit *textEdit = new QrwEmoticonsTextEdit( this );
textEdit->emoticons()->setProvider("openmoji", false);
createYAML = textEdit;
#else
createYAML = new QTextEdit("lima");
#endif
QFont font("monospace");
font.setStyleHint(QFont::Monospace);
font.setPointSize(10);
Expand Down

0 comments on commit 285c588

Please sign in to comment.