New attachment mechanism. Also add image from clipboard.
This commit is contained in:
@@ -31,13 +31,9 @@
|
||||
#include <QtNetwork/QAuthenticator>
|
||||
#include <QtNetwork/QNetworkReply>
|
||||
|
||||
Controller::Controller(QObject* parent)
|
||||
: QObject(parent), notificationsManager(this) {
|
||||
Controller::Controller(QObject* parent) : QObject(parent) {
|
||||
QApplication::setQuitOnLastWindowClosed(false);
|
||||
|
||||
connect(¬ificationsManager, &NotificationsManager::notificationClicked,
|
||||
this, &Controller::notificationClicked);
|
||||
|
||||
Connection::setRoomType<SpectralRoom>();
|
||||
Connection::setUserType<SpectralUser>();
|
||||
|
||||
@@ -232,10 +228,6 @@ void Controller::createDirectChat(Connection* c, const QString& userID) {
|
||||
});
|
||||
}
|
||||
|
||||
void Controller::copyToClipboard(const QString& text) {
|
||||
m_clipboard->setText(text);
|
||||
}
|
||||
|
||||
void Controller::playAudio(QUrl localFile) {
|
||||
QMediaPlayer* player = new QMediaPlayer;
|
||||
player->setMedia(localFile);
|
||||
@@ -243,16 +235,6 @@ void Controller::playAudio(QUrl localFile) {
|
||||
connect(player, &QMediaPlayer::stateChanged, [=] { player->deleteLater(); });
|
||||
}
|
||||
|
||||
void Controller::postNotification(const QString& roomId,
|
||||
const QString& eventId,
|
||||
const QString& roomName,
|
||||
const QString& senderName,
|
||||
const QString& text,
|
||||
const QImage& icon) {
|
||||
notificationsManager.postNotification(roomId, eventId, roomName, senderName,
|
||||
text, icon);
|
||||
}
|
||||
|
||||
int Controller::dpi() {
|
||||
return SettingsGroup("Interface").value("dpi", 100).toInt();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user