LeechCraft Azoth
0.6.70-18450-gabe19ee3b0
Modular multiprotocol IM plugin for LeechCraft
Toggle main menu visibility
Loading...
Searching...
No Matches
ichatstyleresourcesource.h
Go to the documentation of this file.
1
/**********************************************************************
2
* LeechCraft - modular cross-platform feature rich internet client.
3
* Copyright (C) 2006-2014 Georg Rudoy
4
*
5
* Distributed under the Boost Software License, Version 1.0.
6
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7
**********************************************************************/
8
9
#pragma once
10
11
#include "
iresourceplugin.h
"
12
13
class
QUrl;
14
class
QWebEnginePage;
15
16
namespace
LC::Azoth
17
{
18
struct
ChatEvent
;
19
20
class
IAccount
;
21
24
struct
ChatMsgAppendInfo
25
{
28
bool
IsHighlightMsg_
;
29
32
bool
IsActiveChat_
;
33
36
bool
UseRichTextBody_
;
37
40
IAccount
*
Account_
;
41
};
42
54
class
IChatStyleResourceSource
:
public
IResourceSource
55
{
56
public
:
57
~IChatStyleResourceSource
()
override
=
default
;
58
73
virtual
QUrl
GetBaseURL
(
const
QString& style)
const
= 0;
74
101
virtual
QString
GetHTMLTemplate
(
const
QString& style,
102
const
QString& variant, QObject *entry, QWebEnginePage *page)
const
= 0;
103
114
virtual
bool
AppendMessage
(QWebEnginePage *page, QObject *message,
const
ChatMsgAppendInfo
& info) = 0;
115
116
virtual
void
Append
(QWebEnginePage *page,
const
ChatEvent
& event) = 0;
117
129
virtual
void
FrameFocused
(QWebEnginePage *page) = 0;
130
142
virtual
QStringList
GetVariantsForPack
(
const
QString& style) = 0;
143
};
144
}
145
146
Q_DECLARE_INTERFACE (
LC::Azoth::IChatStyleResourceSource
,
147
"org.Deviant.LeechCraft.Azoth.IChatStyleResourceSource/1.0"
)
LC::Azoth::IAccount
Interface representing a single account.
Definition
iaccount.h:46
LC::Azoth::IChatStyleResourceSource
Interface for chat style resource loaders and handlers.
Definition
ichatstyleresourcesource.h:55
LC::Azoth::IChatStyleResourceSource::~IChatStyleResourceSource
~IChatStyleResourceSource() override=default
LC::Azoth::IChatStyleResourceSource::FrameFocused
virtual void FrameFocused(QWebEnginePage *page)=0
Notifies about a frame obtaining user input focus.
LC::Azoth::IChatStyleResourceSource::GetVariantsForPack
virtual QStringList GetVariantsForPack(const QString &style)=0
Returns the list of variants for the style pack.
LC::Azoth::IChatStyleResourceSource::GetHTMLTemplate
virtual QString GetHTMLTemplate(const QString &style, const QString &variant, QObject *entry, QWebEnginePage *page) const =0
Returns the base HTML template for the given style.
LC::Azoth::IChatStyleResourceSource::GetBaseURL
virtual QUrl GetBaseURL(const QString &style) const =0
Returns the base URL for the given style.
LC::Azoth::IChatStyleResourceSource::AppendMessage
virtual bool AppendMessage(QWebEnginePage *page, QObject *message, const ChatMsgAppendInfo &info)=0
Appends a new message to the chat view.
LC::Azoth::IChatStyleResourceSource::Append
virtual void Append(QWebEnginePage *page, const ChatEvent &event)=0
LC::Azoth::IResourceSource
Base interface for specific resource sources.
Definition
iresourceplugin.h:38
iresourceplugin.h
LC::Azoth
Definition
activityinfo.h:16
LC::Azoth::ChatEvent
Definition
message.h:61
LC::Azoth::ChatMsgAppendInfo
Defines additional parameters of the message.
Definition
ichatstyleresourcesource.h:25
LC::Azoth::ChatMsgAppendInfo::IsHighlightMsg_
bool IsHighlightMsg_
Whether this message has triggered our highlight.
Definition
ichatstyleresourcesource.h:28
LC::Azoth::ChatMsgAppendInfo::UseRichTextBody_
bool UseRichTextBody_
Whether rich text body should be used (if available).
Definition
ichatstyleresourcesource.h:36
LC::Azoth::ChatMsgAppendInfo::IsActiveChat_
bool IsActiveChat_
Whether the chat view is currently visible and focused.
Definition
ichatstyleresourcesource.h:32
LC::Azoth::ChatMsgAppendInfo::Account_
IAccount * Account_
The account corresponding to this message.
Definition
ichatstyleresourcesource.h:40
src
plugins
azoth
interfaces
azoth
ichatstyleresourcesource.h
Generated by
1.17.0