diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-11-30 20:02:46 +0200 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-11-30 20:02:46 +0200 |
commit | eae069ad93a6822e8cb96522708115793c01c5d7 (patch) | |
tree | e44b67a82110051f90ce8555a3520f62456be02b /src | |
parent | Create directories for related files (diff) | |
download | nheko-eae069ad93a6822e8cb96522708115793c01c5d7.tar.xz |
Group emoji and dialogs with namespaces
Diffstat (limited to 'src')
-rw-r--r-- | src/RoomList.cc | 7 | ||||
-rw-r--r-- | src/TextInputWidget.cc | 2 | ||||
-rw-r--r-- | src/TopRoomBar.cc | 4 | ||||
-rw-r--r-- | src/UserInfoWidget.cc | 4 | ||||
-rw-r--r-- | src/dialogs/ImageOverlay.cc (renamed from src/dialogs/ImageOverlayDialog.cc) | 12 | ||||
-rw-r--r-- | src/dialogs/JoinRoom.cc (renamed from src/dialogs/JoinRoomDialog.cc) | 6 | ||||
-rw-r--r-- | src/dialogs/LeaveRoom.cc (renamed from src/dialogs/LeaveRoomDialog.cc) | 8 | ||||
-rw-r--r-- | src/dialogs/Logout.cc (renamed from src/dialogs/LogoutDialog.cc) | 8 | ||||
-rw-r--r-- | src/emoji/Category.cc (renamed from src/emoji/EmojiCategory.cc) | 14 | ||||
-rw-r--r-- | src/emoji/ItemDelegate.cc (renamed from src/emoji/EmojiItemDelegate.cc) | 14 | ||||
-rw-r--r-- | src/emoji/Panel.cc (renamed from src/emoji/EmojiPanel.cc) | 66 | ||||
-rw-r--r-- | src/emoji/PickButton.cc (renamed from src/emoji/EmojiPickButton.cc) | 17 | ||||
-rw-r--r-- | src/emoji/Provider.cc (renamed from src/emoji/EmojiProvider.cc) | 20 | ||||
-rw-r--r-- | src/timeline/widgets/ImageItem.cc | 4 |
14 files changed, 96 insertions, 90 deletions
diff --git a/src/RoomList.cc b/src/RoomList.cc index 6b8867f3..23c0c5a7 100644 --- a/src/RoomList.cc +++ b/src/RoomList.cc @@ -18,9 +18,6 @@ #include <QDebug> #include <QObject> -#include "dialogs/JoinRoomDialog.h" -#include "dialogs/LeaveRoomDialog.h" - #include "MainWindow.h" #include "MatrixClient.h" #include "OverlayModal.h" @@ -159,10 +156,10 @@ void RoomList::openLeaveRoomDialog(const QString &room_id) { if (leaveRoomDialog_.isNull()) { - leaveRoomDialog_ = QSharedPointer<LeaveRoomDialog>(new LeaveRoomDialog(this)); + leaveRoomDialog_ = QSharedPointer<dialogs::LeaveRoom>(new dialogs::LeaveRoom(this)); connect(leaveRoomDialog_.data(), - &LeaveRoomDialog::closing, + &dialogs::LeaveRoom::closing, this, [=](bool leaving) { closeLeaveRoomDialog(leaving, room_id); }); } diff --git a/src/TextInputWidget.cc b/src/TextInputWidget.cc index c4d01357..2f6c435a 100644 --- a/src/TextInputWidget.cc +++ b/src/TextInputWidget.cc @@ -211,7 +211,7 @@ TextInputWidget::TextInputWidget(QWidget *parent) sendMessageBtn_->setIcon(send_message_icon); sendMessageBtn_->setIconSize(QSize(24, 24)); - emojiBtn_ = new EmojiPickButton(this); + emojiBtn_ = new emoji::PickButton(this); QIcon emoji_icon; emoji_icon.addFile(":/icons/icons/ui/smile.png"); diff --git a/src/TopRoomBar.cc b/src/TopRoomBar.cc index 3418e6f1..51a3af68 100644 --- a/src/TopRoomBar.cc +++ b/src/TopRoomBar.cc @@ -27,8 +27,6 @@ #include "RoomSettings.h" #include "TopRoomBar.h" -#include "dialogs/LeaveRoomDialog.h" - TopRoomBar::TopRoomBar(QWidget *parent) : QWidget(parent) , buttonSize_{32} @@ -94,7 +92,7 @@ TopRoomBar::TopRoomBar(QWidget *parent) connect(leaveRoom_, &QAction::triggered, this, [=]() { if (leaveRoomDialog_.isNull()) { leaveRoomDialog_ = - QSharedPointer<LeaveRoomDialog>(new LeaveRoomDialog(this)); + QSharedPointer<dialogs::LeaveRoom>(new dialogs::LeaveRoom(this)); connect(leaveRoomDialog_.data(), SIGNAL(closing(bool)), diff --git a/src/UserInfoWidget.cc b/src/UserInfoWidget.cc index 98977bb3..fe0c2b56 100644 --- a/src/UserInfoWidget.cc +++ b/src/UserInfoWidget.cc @@ -24,8 +24,6 @@ #include "OverlayModal.h" #include "UserInfoWidget.h" -#include "dialogs/LogoutDialog.h" - UserInfoWidget::UserInfoWidget(QWidget *parent) : QWidget(parent) , display_name_("User") @@ -94,7 +92,7 @@ UserInfoWidget::UserInfoWidget(QWidget *parent) // Show the confirmation dialog. connect(logoutButton_, &QPushButton::clicked, this, [=]() { if (logoutDialog_.isNull()) { - logoutDialog_ = QSharedPointer<LogoutDialog>(new LogoutDialog(this)); + logoutDialog_ = QSharedPointer<dialogs::Logout>(new dialogs::Logout(this)); connect(logoutDialog_.data(), SIGNAL(closing(bool)), this, diff --git a/src/dialogs/ImageOverlayDialog.cc b/src/dialogs/ImageOverlay.cc index ad87d144..1e30b3ff 100644 --- a/src/dialogs/ImageOverlayDialog.cc +++ b/src/dialogs/ImageOverlay.cc @@ -19,9 +19,11 @@ #include <QDesktopWidget> #include <QPainter> -#include "dialogs/ImageOverlayDialog.h" +#include "dialogs/ImageOverlay.h" -ImageOverlayDialog::ImageOverlayDialog(QPixmap image, QWidget *parent) +using namespace dialogs; + +ImageOverlay::ImageOverlay(QPixmap image, QWidget *parent) : QWidget{parent} , originalImage_{image} { @@ -47,7 +49,7 @@ ImageOverlayDialog::ImageOverlayDialog(QPixmap image, QWidget *parent) // TODO: Move this into Utils void -ImageOverlayDialog::scaleImage(int max_width, int max_height) +ImageOverlay::scaleImage(int max_width, int max_height) { if (originalImage_.isNull()) return; @@ -73,7 +75,7 @@ ImageOverlayDialog::scaleImage(int max_width, int max_height) } void -ImageOverlayDialog::paintEvent(QPaintEvent *event) +ImageOverlay::paintEvent(QPaintEvent *event) { Q_UNUSED(event); @@ -117,7 +119,7 @@ ImageOverlayDialog::paintEvent(QPaintEvent *event) } void -ImageOverlayDialog::mousePressEvent(QMouseEvent *event) +ImageOverlay::mousePressEvent(QMouseEvent *event) { if (event->button() != Qt::LeftButton) return; diff --git a/src/dialogs/JoinRoomDialog.cc b/src/dialogs/JoinRoom.cc index 2cee7ef6..5b874011 100644 --- a/src/dialogs/JoinRoomDialog.cc +++ b/src/dialogs/JoinRoom.cc @@ -5,9 +5,11 @@ #include "FlatButton.h" #include "Theme.h" -#include "dialogs/JoinRoomDialog.h" +#include "dialogs/JoinRoom.h" -JoinRoomDialog::JoinRoomDialog(QWidget *parent) +using namespace dialogs; + +JoinRoom::JoinRoom(QWidget *parent) : QFrame(parent) { setMaximumSize(400, 400); diff --git a/src/dialogs/LeaveRoomDialog.cc b/src/dialogs/LeaveRoom.cc index b0d1679f..6a8447d4 100644 --- a/src/dialogs/LeaveRoomDialog.cc +++ b/src/dialogs/LeaveRoom.cc @@ -6,9 +6,11 @@ #include "FlatButton.h" #include "Theme.h" -#include "dialogs/LeaveRoomDialog.h" +#include "dialogs/LeaveRoom.h" -LeaveRoomDialog::LeaveRoomDialog(QWidget *parent) +using namespace dialogs; + +LeaveRoom::LeaveRoom(QWidget *parent) : QFrame(parent) { setMaximumSize(400, 400); @@ -45,7 +47,7 @@ LeaveRoomDialog::LeaveRoomDialog(QWidget *parent) } void -LeaveRoomDialog::paintEvent(QPaintEvent *) +LeaveRoom::paintEvent(QPaintEvent *) { QStyleOption opt; opt.init(this); diff --git a/src/dialogs/LogoutDialog.cc b/src/dialogs/Logout.cc index 73e09745..f4752b0a 100644 --- a/src/dialogs/LogoutDialog.cc +++ b/src/dialogs/Logout.cc @@ -24,9 +24,11 @@ #include "FlatButton.h" #include "Theme.h" -#include "dialogs/LogoutDialog.h" +#include "dialogs/Logout.h" -LogoutDialog::LogoutDialog(QWidget *parent) +using namespace dialogs; + +Logout::Logout(QWidget *parent) : QFrame(parent) { setMaximumSize(400, 400); @@ -63,7 +65,7 @@ LogoutDialog::LogoutDialog(QWidget *parent) } void -LogoutDialog::paintEvent(QPaintEvent *) +Logout::paintEvent(QPaintEvent *) { QStyleOption opt; opt.init(this); diff --git a/src/emoji/EmojiCategory.cc b/src/emoji/Category.cc index 42f09409..6b925ce9 100644 --- a/src/emoji/EmojiCategory.cc +++ b/src/emoji/Category.cc @@ -21,9 +21,11 @@ #include "Config.h" -#include "emoji/EmojiCategory.h" +#include "emoji/Category.h" -EmojiCategory::EmojiCategory(QString category, QList<Emoji> emoji, QWidget *parent) +using namespace emoji; + +Category::Category(QString category, QList<Emoji> emoji, QWidget *parent) : QWidget(parent) { mainLayout_ = new QVBoxLayout(this); @@ -33,7 +35,7 @@ EmojiCategory::EmojiCategory(QString category, QList<Emoji> emoji, QWidget *pare emojiListView_ = new QListView(); itemModel_ = new QStandardItemModel(this); - delegate_ = new EmojiItemDelegate(this); + delegate_ = new ItemDelegate(this); data_ = new Emoji; emojiListView_->setItemDelegate(delegate_); @@ -75,11 +77,11 @@ EmojiCategory::EmojiCategory(QString category, QList<Emoji> emoji, QWidget *pare mainLayout_->addWidget(category_); mainLayout_->addWidget(emojiListView_); - connect(emojiListView_, &QListView::clicked, this, &EmojiCategory::clickIndex); + connect(emojiListView_, &QListView::clicked, this, &Category::clickIndex); } void -EmojiCategory::paintEvent(QPaintEvent *) +Category::paintEvent(QPaintEvent *) { QStyleOption opt; opt.init(this); @@ -87,4 +89,4 @@ EmojiCategory::paintEvent(QPaintEvent *) style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); } -EmojiCategory::~EmojiCategory() {} +Category::~Category() {} diff --git a/src/emoji/EmojiItemDelegate.cc b/src/emoji/ItemDelegate.cc index 547d3b4c..2cc838e3 100644 --- a/src/emoji/EmojiItemDelegate.cc +++ b/src/emoji/ItemDelegate.cc @@ -18,20 +18,22 @@ #include <QDebug> #include <QPainter> -#include "emoji/EmojiItemDelegate.h" +#include "emoji/ItemDelegate.h" -EmojiItemDelegate::EmojiItemDelegate(QObject *parent) +using namespace emoji; + +ItemDelegate::ItemDelegate(QObject *parent) : QStyledItemDelegate(parent) { data_ = new Emoji; } -EmojiItemDelegate::~EmojiItemDelegate() { delete data_; } +ItemDelegate::~ItemDelegate() { delete data_; } void -EmojiItemDelegate::paint(QPainter *painter, - const QStyleOptionViewItem &option, - const QModelIndex &index) const +ItemDelegate::paint(QPainter *painter, + const QStyleOptionViewItem &option, + const QModelIndex &index) const { Q_UNUSED(index); diff --git a/src/emoji/EmojiPanel.cc b/src/emoji/Panel.cc index 9df6f193..0b99eb81 100644 --- a/src/emoji/EmojiPanel.cc +++ b/src/emoji/Panel.cc @@ -22,10 +22,12 @@ #include "DropShadow.h" #include "FlatButton.h" -#include "emoji/EmojiCategory.h" -#include "emoji/EmojiPanel.h" +#include "emoji/Category.h" +#include "emoji/Panel.h" -EmojiPanel::EmojiPanel(QWidget *parent) +using namespace emoji; + +Panel::Panel(QWidget *parent) : QWidget(parent) , shadowMargin_{2} , width_{370} @@ -53,9 +55,6 @@ EmojiPanel::EmojiPanel(QWidget *parent) contentLayout->setSpacing(0); auto emojiCategories = new QFrame(mainWidget); - emojiCategories->setStyleSheet( - QString("background-color: %1") - .arg(palette().color(QPalette::Window).darker(110).name())); auto categoriesLayout = new QHBoxLayout(emojiCategories); categoriesLayout->setSpacing(0); @@ -124,79 +123,78 @@ EmojiPanel::EmojiPanel(QWidget *parent) scrollArea_->setWidget(scrollWidget); auto peopleEmoji = - new EmojiCategory(tr("Smileys & People"), emoji_provider_.people, scrollWidget); + new Category(tr("Smileys & People"), emoji_provider_.people, scrollWidget); scrollLayout->addWidget(peopleEmoji); auto natureEmoji = - new EmojiCategory(tr("Animals & Nature"), emoji_provider_.nature, scrollWidget); + new Category(tr("Animals & Nature"), emoji_provider_.nature, scrollWidget); scrollLayout->addWidget(natureEmoji); - auto foodEmoji = new EmojiCategory(tr("Food & Drink"), emoji_provider_.food, scrollWidget); + auto foodEmoji = new Category(tr("Food & Drink"), emoji_provider_.food, scrollWidget); scrollLayout->addWidget(foodEmoji); - auto activityEmoji = - new EmojiCategory(tr("Activity"), emoji_provider_.activity, scrollWidget); + auto activityEmoji = new Category(tr("Activity"), emoji_provider_.activity, scrollWidget); scrollLayout->addWidget(activityEmoji); auto travelEmoji = - new EmojiCategory(tr("Travel & Places"), emoji_provider_.travel, scrollWidget); + new Category(tr("Travel & Places"), emoji_provider_.travel, scrollWidget); scrollLayout->addWidget(travelEmoji); - auto objectsEmoji = new EmojiCategory(tr("Objects"), emoji_provider_.objects, scrollWidget); + auto objectsEmoji = new Category(tr("Objects"), emoji_provider_.objects, scrollWidget); scrollLayout->addWidget(objectsEmoji); - auto symbolsEmoji = new EmojiCategory(tr("Symbols"), emoji_provider_.symbols, scrollWidget); + auto symbolsEmoji = new Category(tr("Symbols"), emoji_provider_.symbols, scrollWidget); scrollLayout->addWidget(symbolsEmoji); - auto flagsEmoji = new EmojiCategory(tr("Flags"), emoji_provider_.flags, scrollWidget); + auto flagsEmoji = new Category(tr("Flags"), emoji_provider_.flags, scrollWidget); scrollLayout->addWidget(flagsEmoji); contentLayout->addWidget(scrollArea_); contentLayout->addWidget(emojiCategories); - connect(peopleEmoji, &EmojiCategory::emojiSelected, this, &EmojiPanel::emojiSelected); + connect(peopleEmoji, &Category::emojiSelected, this, &Panel::emojiSelected); connect(peopleCategory, &QPushButton::clicked, [this, peopleEmoji]() { - this->showEmojiCategory(peopleEmoji); + this->showCategory(peopleEmoji); }); - connect(natureEmoji, &EmojiCategory::emojiSelected, this, &EmojiPanel::emojiSelected); + connect(natureEmoji, &Category::emojiSelected, this, &Panel::emojiSelected); connect(natureCategory_, &QPushButton::clicked, [this, natureEmoji]() { - this->showEmojiCategory(natureEmoji); + this->showCategory(natureEmoji); }); - connect(foodEmoji, &EmojiCategory::emojiSelected, this, &EmojiPanel::emojiSelected); + connect(foodEmoji, &Category::emojiSelected, this, &Panel::emojiSelected); connect(foodCategory_, &QPushButton::clicked, [this, foodEmoji]() { - this->showEmojiCategory(foodEmoji); + this->showCategory(foodEmoji); }); - connect(activityEmoji, &EmojiCategory::emojiSelected, this, &EmojiPanel::emojiSelected); + connect(activityEmoji, &Category::emojiSelected, this, &Panel::emojiSelected); connect(activityCategory, &QPushButton::clicked, [this, activityEmoji]() { - this->showEmojiCategory(activityEmoji); + this->showCategory(activityEmoji); }); - connect(travelEmoji, &EmojiCategory::emojiSelected, this, &EmojiPanel::emojiSelected); + connect(travelEmoji, &Category::emojiSelected, this, &Panel::emojiSelected); connect(travelCategory, &QPushButton::clicked, [this, travelEmoji]() { - this->showEmojiCategory(travelEmoji); + this->showCategory(travelEmoji); }); - connect(objectsEmoji, &EmojiCategory::emojiSelected, this, &EmojiPanel::emojiSelected); + connect(objectsEmoji, &Category::emojiSelected, this, &Panel::emojiSelected); connect(objectsCategory, &QPushButton::clicked, [this, objectsEmoji]() { - this->showEmojiCategory(objectsEmoji); + this->showCategory(objectsEmoji); }); - connect(symbolsEmoji, &EmojiCategory::emojiSelected, this, &EmojiPanel::emojiSelected); + connect(symbolsEmoji, &Category::emojiSelected, this, &Panel::emojiSelected); connect(symbolsCategory, &QPushButton::clicked, [this, symbolsEmoji]() { - this->showEmojiCategory(symbolsEmoji); + this->showCategory(symbolsEmoji); }); - connect(flagsEmoji, &EmojiCategory::emojiSelected, this, &EmojiPanel::emojiSelected); + connect(flagsEmoji, &Category::emojiSelected, this, &Panel::emojiSelected); connect(flagsCategory, &QPushButton::clicked, [this, flagsEmoji]() { - this->showEmojiCategory(flagsEmoji); + this->showCategory(flagsEmoji); }); } void -EmojiPanel::showEmojiCategory(const EmojiCategory *category) +Panel::showCategory(const Category *category) { auto posToGo = category->mapToParent(QPoint()).y(); auto current = scrollArea_->verticalScrollBar()->value(); @@ -217,13 +215,13 @@ EmojiPanel::showEmojiCategory(const EmojiCategory *category) } void -EmojiPanel::leaveEvent(QEvent *) +Panel::leaveEvent(QEvent *) { hide(); } void -EmojiPanel::paintEvent(QPaintEvent *event) +Panel::paintEvent(QPaintEvent *event) { Q_UNUSED(event); diff --git a/src/emoji/EmojiPickButton.cc b/src/emoji/PickButton.cc index 44955a8c..ca3b3017 100644 --- a/src/emoji/EmojiPickButton.cc +++ b/src/emoji/PickButton.cc @@ -15,23 +15,24 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "emoji/EmojiPickButton.h" -#include "emoji/EmojiPanel.h" +#include "emoji/PickButton.h" +#include "emoji/Panel.h" -EmojiPickButton::EmojiPickButton(QWidget *parent) +using namespace emoji; + +PickButton::PickButton(QWidget *parent) : FlatButton(parent) , panel_{nullptr} {} void -EmojiPickButton::enterEvent(QEvent *e) +PickButton::enterEvent(QEvent *e) { Q_UNUSED(e); if (panel_.isNull()) { - panel_ = QSharedPointer<EmojiPanel>(new EmojiPanel(this)); - connect( - panel_.data(), &EmojiPanel::emojiSelected, this, &EmojiPickButton::emojiSelected); + panel_ = QSharedPointer<Panel>(new Panel(this)); + connect(panel_.data(), &Panel::emojiSelected, this, &PickButton::emojiSelected); } QPoint pos(rect().x(), rect().y()); @@ -47,7 +48,7 @@ EmojiPickButton::enterEvent(QEvent *e) } void -EmojiPickButton::leaveEvent(QEvent *e) +PickButton::leaveEvent(QEvent *e) { Q_UNUSED(e); diff --git a/src/emoji/EmojiProvider.cc b/src/emoji/Provider.cc index 838c0340..23f99c05 100644 --- a/src/emoji/EmojiProvider.cc +++ b/src/emoji/Provider.cc @@ -17,9 +17,11 @@ #include <QByteArray> -#include "emoji/EmojiProvider.h" +#include "emoji/Provider.h" -const QList<Emoji> EmojiProvider::people = { +using namespace emoji; + +const QList<Emoji> Provider::people = { Emoji{QString::fromUtf8("\xf0\x9f\x98\x80"), ":grinning:"}, Emoji{QString::fromUtf8("\xf0\x9f\x98\x81"), ":grin:"}, Emoji{QString::fromUtf8("\xf0\x9f\x98\x82"), ":joy:"}, @@ -229,7 +231,7 @@ const QList<Emoji> EmojiProvider::people = { Emoji{QString::fromUtf8("\xf0\x9f\x92\xbc"), ":briefcase:"}, }; -const QList<Emoji> EmojiProvider::nature = { +const QList<Emoji> Provider::nature = { Emoji{QString::fromUtf8("\xf0\x9f\x99\x88"), ":see_no_evil:"}, Emoji{QString::fromUtf8("\xf0\x9f\x99\x89"), ":hear_no_evil:"}, Emoji{QString::fromUtf8("\xf0\x9f\x99\x8a"), ":speak_no_evil:"}, @@ -392,7 +394,7 @@ const QList<Emoji> EmojiProvider::nature = { Emoji{QString::fromUtf8("\xf0\x9f\x8e\x8d"), ":bamboo:"}, }; -const QList<Emoji> EmojiProvider::food = { +const QList<Emoji> Provider::food = { Emoji{QString::fromUtf8("\xf0\x9f\x8d\x87"), ":grapes:"}, Emoji{QString::fromUtf8("\xf0\x9f\x8d\x88"), ":melon:"}, Emoji{QString::fromUtf8("\xf0\x9f\x8d\x89"), ":watermelon:"}, @@ -480,7 +482,7 @@ const QList<Emoji> EmojiProvider::food = { Emoji{QString::fromUtf8("\xf0\x9f\xa5\x84"), ":spoon:"}, }; -const QList<Emoji> EmojiProvider::activity = { +const QList<Emoji> Provider::activity = { Emoji{QString::fromUtf8("\xf0\x9f\x91\xbe"), ":space_invader:"}, Emoji{QString::fromUtf8("\xf0\x9f\x95\xb4"), ":levitate:"}, Emoji{QString::fromUtf8("\xf0\x9f\xa4\xba"), ":fencer:"}, @@ -622,7 +624,7 @@ const QList<Emoji> EmojiProvider::activity = { Emoji{QString::fromUtf8("\xf0\x9f\x8f\xb9"), ":bow_and_arrow:"}, }; -const QList<Emoji> EmojiProvider::travel = { +const QList<Emoji> Provider::travel = { Emoji{QString::fromUtf8("\xf0\x9f\x8f\x8e"), ":race_car:"}, Emoji{QString::fromUtf8("\xf0\x9f\x8f\x8d"), ":motorcycle:"}, Emoji{QString::fromUtf8("\xf0\x9f\x97\xbe"), ":japan:"}, @@ -743,7 +745,7 @@ const QList<Emoji> EmojiProvider::travel = { Emoji{QString::fromUtf8("\xf0\x9f\x8f\x81"), ":checkered_flag:"}, }; -const QList<Emoji> EmojiProvider::objects = { +const QList<Emoji> Provider::objects = { Emoji{QString::fromUtf8("\xe2\x98\xa0"), ":skull_crossbones:"}, Emoji{QString::fromUtf8("\xf0\x9f\x92\x8c"), ":love_letter:"}, Emoji{QString::fromUtf8("\xf0\x9f\x92\xa3"), ":bomb:"}, @@ -926,7 +928,7 @@ const QList<Emoji> EmojiProvider::objects = { Emoji{QString::fromUtf8("\xf0\x9f\x8f\xb3\xf0\x9f\x8c\x88"), ":rainbow_flag:"}, }; -const QList<Emoji> EmojiProvider::symbols = { +const QList<Emoji> Provider::symbols = { Emoji{QString::fromUtf8("\xf0\x9f\x91\x81\xf0\x9f\x97\xa8"), ":eye_in_speech_bubble:"}, Emoji{QString::fromUtf8("\xf0\x9f\x92\x98"), ":cupid:"}, Emoji{QString::fromUtf8("\xe2\x9d\xa4"), ":heart:"}, @@ -1204,7 +1206,7 @@ const QList<Emoji> EmojiProvider::symbols = { Emoji{QString::fromUtf8("\xf0\x9f\x94\xb5"), ":blue_circle:"}, }; -const QList<Emoji> EmojiProvider::flags = { +const QList<Emoji> Provider::flags = { Emoji{QString::fromUtf8("\xf0\x9f\x87\xa6\xf0\x9f\x87\xa8"), ":flag_ac:"}, Emoji{QString::fromUtf8("\xf0\x9f\x87\xa6\xf0\x9f\x87\xa9"), ":flag_ad:"}, Emoji{QString::fromUtf8("\xf0\x9f\x87\xa6\xf0\x9f\x87\xaa"), ":flag_ae:"}, diff --git a/src/timeline/widgets/ImageItem.cc b/src/timeline/widgets/ImageItem.cc index 106fc79b..c8cf8e23 100644 --- a/src/timeline/widgets/ImageItem.cc +++ b/src/timeline/widgets/ImageItem.cc @@ -22,7 +22,7 @@ #include <QPainter> #include <QPixmap> -#include "dialogs/ImageOverlayDialog.h" +#include "dialogs/ImageOverlay.h" #include "timeline/widgets/ImageItem.h" namespace events = matrix::events; @@ -165,7 +165,7 @@ ImageItem::mousePressEvent(QMouseEvent *event) if (QRect(0, height_ - bottom_height_, width_, bottom_height_).contains(point)) { openUrl(); } else { - auto image_dialog = new ImageOverlayDialog(image_, this); + auto image_dialog = new dialogs::ImageOverlay(image_, this); image_dialog->show(); } } |