-quassel_add_module(Client)
+quassel_add_module(Client EXPORT)
target_sources(${TARGET} PRIVATE
abstractmessageprocessor.cpp
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef ABSTRACTMESSAGEPROCESSOR_H_
-#define ABSTRACTMESSAGEPROCESSOR_H_
+#pragma once
+
+#include "client-export.h"
#include "client.h"
#include "message.h"
#include "networkmodel.h"
-class AbstractMessageProcessor : public QObject
+class CLIENT_EXPORT AbstractMessageProcessor : public QObject
{
Q_OBJECT
// is called before inserting the message into the model
inline void preProcess(Message &msg) { Client::networkModel()->updateBufferActivity(msg); }
};
-
-
-#endif
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef ABSTRACTUI_H
-#define ABSTRACTUI_H
+#pragma once
+
+#include "client-export.h"
#include <QObject>
#include <QVariantMap>
-//#include "message.h"
class MessageFilter;
class MessageModel;
class QAction;
class QMenu;
-class AbstractUi : public QObject
+class CLIENT_EXPORT AbstractUi : public QObject
{
Q_OBJECT
void connectToCore(const QVariantMap &connInfo);
void disconnectFromCore();
};
-
-
-#endif
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef BUFFERMODEL_H
-#define BUFFERMODEL_H
+#pragma once
+
+#include "client-export.h"
#include <QSortFilterProxyModel>
#include <QItemSelectionModel>
class QAbstractItemView;
-class BufferModel : public QSortFilterProxyModel
+class CLIENT_EXPORT BufferModel : public QSortFilterProxyModel
{
Q_OBJECT
SelectionModelSynchronizer _selectionModelSynchronizer;
QPair<NetworkId, QString> _bufferToSwitchTo;
};
-
-
-#endif // BUFFERMODEL_H
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef BUFFERSETTINGS_H
-#define BUFFERSETTINGS_H
+#include "client-export.h"
#include "clientsettings.h"
#include "message.h"
#include "types.h"
-class BufferSettings : public ClientSettings
+class CLIENT_EXPORT BufferSettings : public ClientSettings
{
public:
enum RedirectTarget {
inline int errorMsgsTarget() { return localValue("ErrorMsgsTarget", DefaultBuffer).toInt(); }
inline void setErrorMsgsTarget(int target) { setLocalValue("ErrorMsgsTarget", target); }
};
-
-
-#endif
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef BUFFERVIEWOVERLAY_H
-#define BUFFERVIEWOVERLAY_H
+#pragma once
+
+#include "client-export.h"
#include <QObject>
class BufferViewConfig;
class ClientBufferViewConfig;
-class BufferViewOverlay : public QObject
+class CLIENT_EXPORT BufferViewOverlay : public QObject
{
Q_OBJECT
static const int _updateEventId;
};
-
-
-#endif //BUFFERVIEWOVERLAY_H
#pragma once
+#include "client-export.h"
+
#include <memory>
#include <QList>
struct NetworkInfo;
-class Client : public QObject, public Singleton<Client>
+class CLIENT_EXPORT Client : public QObject, public Singleton<Client>
{
Q_OBJECT
#pragma once
+#include "client-export.h"
+
#include "aliasmanager.h"
-class ClientAliasManager : public AliasManager
+class CLIENT_EXPORT ClientAliasManager : public AliasManager
{
Q_OBJECT
#pragma once
+#include "client-export.h"
+
#include "backlogmanager.h"
#include "message.h"
class BacklogRequester;
-class ClientBacklogManager : public BacklogManager
+class CLIENT_EXPORT ClientBacklogManager : public BacklogManager
{
Q_OBJECT
#pragma once
+#include "client-export.h"
+
#include "bufferviewconfig.h"
-class ClientBufferViewConfig : public BufferViewConfig
+class CLIENT_EXPORT ClientBufferViewConfig : public BufferViewConfig
{
Q_OBJECT
#pragma once
+#include "client-export.h"
+
#include "bufferviewmanager.h"
class ClientBufferViewConfig;
class BufferViewOverlay;
-class ClientBufferViewManager : public BufferViewManager
+class CLIENT_EXPORT ClientBufferViewManager : public BufferViewManager
{
Q_OBJECT
#pragma once
+#include "client-export.h"
+
#include "identity.h"
class ClientCertManager;
-class CertIdentity : public Identity
+class CLIENT_EXPORT CertIdentity : public Identity
{
Q_OBJECT
// ClientCertManager
// ========================================
#ifdef HAVE_SSL
+
class ClientCertManager : public CertManager
{
Q_OBJECT
#pragma once
+#include "client-export.h"
+
#include "ignorelistmanager.h"
#include <QMap>
-class ClientIgnoreListManager : public IgnoreListManager
+class CLIENT_EXPORT ClientIgnoreListManager : public IgnoreListManager
{
Q_OBJECT
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef CLIENTSETTINGS_H
-#define CLIENTSETTINGS_H
+#pragma once
+
+#include "client-export.h"
#include "settings.h"
class QHostAddress;
class QSslSocket;
-class ClientSettings : public Settings
+class CLIENT_EXPORT ClientSettings : public Settings
{
public:
virtual ~ClientSettings();
//
// Note that you'll get invalid data (and setting is ignored) if you are not connected to a core!
-class CoreAccountSettings : public ClientSettings
+class CLIENT_EXPORT CoreAccountSettings : public ClientSettings
{
public:
// stores account-specific data in CoreAccounts/$ACCID/$SUBGROUP/$KEY)
// ========================================
// NotificationSettings
// ========================================
-class NotificationSettings : public ClientSettings
+class CLIENT_EXPORT NotificationSettings : public ClientSettings
{
public:
enum HighlightNickType {
// CoreConnectionSettings
// ========================================
-class CoreConnectionSettings : public ClientSettings
+class CLIENT_EXPORT CoreConnectionSettings : public ClientSettings
{
public:
enum NetworkDetectionMode {
// TabCompletionSettings
// ========================================
-class TabCompletionSettings : public ClientSettings
+class CLIENT_EXPORT TabCompletionSettings : public ClientSettings
{
public:
enum SortMode {
// ========================================
// ItemViewSettings
// ========================================
-class ItemViewSettings : public ClientSettings
+class CLIENT_EXPORT ItemViewSettings : public ClientSettings
{
public:
ItemViewSettings(const QString &group = "ItemViews");
bool displayTopicInTooltip();
bool mouseWheelChangesBuffer();
};
-
-
-#endif
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef COREACCOUNT_H_
-#define COREACCOUNT_H_
+#pragma once
+
+#include "client-export.h"
#include <QCoreApplication>
#include <QDebug>
#include <QVariantMap>
#include "types.h"
-class CoreAccount
+
+class CLIENT_EXPORT CoreAccount
{
Q_DECLARE_TR_FUNCTIONS(CoreAccount)
};
QDebug operator<<(QDebug dbg, const CoreAccount &msg);
-
-#endif
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef COREACCOUNTMODEL_H_
-#define COREACCOUNTMODEL_H_
+#pragma once
+
+#include "client-export.h"
#include <QAbstractListModel>
#include <QUuid>
#include "coreaccount.h"
-class CoreAccountModel : public QAbstractListModel
+class CLIENT_EXPORT CoreAccountModel : public QAbstractListModel
{
Q_OBJECT
{
return _internalAccount;
}
-
-
-#endif
#pragma once
+#include "client-export.h"
+
#include <QNetworkConfigurationManager>
#include <QPointer>
#include <QTimer>
class Peer;
class SignalProxy;
-class CoreConnection : public QObject
+class CLIENT_EXPORT CoreConnection : public QObject
{
Q_OBJECT
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef IRCLISTMODEL_H
-#define IRCLISTMODEL_H
+#pragma once
+
+#include "client-export.h"
#include "irclisthelper.h"
#include <QAbstractItemModel>
-class IrcListModel : public QAbstractItemModel
+class CLIENT_EXPORT IrcListModel : public QAbstractItemModel
{
Q_OBJECT
private:
QList<IrcListHelper::ChannelDescription> _channelList;
};
-
-
-#endif //IRCLISTMODEL_H
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef MESSAGEFILTER_H_
-#define MESSAGEFILTER_H_
+#pragma once
+
+#include "client-export.h"
#include <QSortFilterProxyModel>
#include <set>
#include "networkmodel.h"
#include "types.h"
-class MessageFilter : public QSortFilterProxyModel
+class CLIENT_EXPORT MessageFilter : public QSortFilterProxyModel
{
Q_OBJECT
int _serverNoticesTarget;
int _errorMsgsTarget;
};
-
-
-#endif
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef MESSAGEMODEL_H_
-#define MESSAGEMODEL_H_
+#pragma once
+
+#include "client-export.h"
#include <QAbstractItemModel>
#include <QDateTime>
class MessageModelItem;
struct MsgId;
-class MessageModel : public QAbstractItemModel
+class CLIENT_EXPORT MessageModel : public QAbstractItemModel
{
Q_OBJECT
// **************************************************
// MessageModelItem
// **************************************************
-class MessageModelItem
+class CLIENT_EXPORT MessageModelItem
{
public:
//! Creates a MessageModelItem from a Message object.
QDebug operator<<(QDebug dbg, const MessageModelItem &msgItem);
-
-#endif
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef NETWORKMODEL_H
-#define NETWORKMODEL_H
+#pragma once
+
+#include "client-export.h"
#include "bufferinfo.h"
#include "clientsettings.h"
* User Category Items (like @vh etc.)
*****************************************/
class IrcUserItem;
-class UserCategoryItem : public PropertyMapItem
+
+class CLIENT_EXPORT UserCategoryItem : public PropertyMapItem
{
Q_OBJECT
Q_PROPERTY(QString categoryName READ categoryName)
/*****************************************
* NetworkModel
*****************************************/
-class NetworkModel : public TreeModel
+class CLIENT_EXPORT NetworkModel : public TreeModel
{
Q_OBJECT
Q_DECLARE_OPERATORS_FOR_FLAGS(NetworkModel::ItemTypes)
-
-#endif // NETWORKMODEL_H
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef _SELECTIONMODELSYNCHRONIZER_H_
-#define _SELECTIONMODELSYNCHRONIZER_H_
+#pragma once
+
+#include "client-export.h"
#include <QObject>
#include <QItemSelectionModel>
class QAbstractItemModel;
-class SelectionModelSynchronizer : public QObject
+class CLIENT_EXPORT SelectionModelSynchronizer : public QObject
{
Q_OBJECT
QSet<QItemSelectionModel *> _selectionModels;
};
-
-
-#endif
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef TREEMODEL_H
-#define TREEMODEL_H
+#pragma once
+
+#include "client-export.h"
#include <QList>
#include <QStringList>
/*****************************************
* general item used in the Tree Model
*****************************************/
-class AbstractTreeItem : public QObject
+class CLIENT_EXPORT AbstractTreeItem : public QObject
{
Q_OBJECT
/*****************************************
* SimpleTreeItem
*****************************************/
-class SimpleTreeItem : public AbstractTreeItem
+class CLIENT_EXPORT SimpleTreeItem : public AbstractTreeItem
{
Q_OBJECT
/*****************************************
* PropertyMapItem
*****************************************/
-class PropertyMapItem : public AbstractTreeItem
+class CLIENT_EXPORT PropertyMapItem : public AbstractTreeItem
{
Q_OBJECT
/*****************************************
* TreeModel
*****************************************/
-class TreeModel : public QAbstractItemModel
+class CLIENT_EXPORT TreeModel : public QAbstractItemModel
{
Q_OBJECT
void debug_rowsRemoved(const QModelIndex &parent, int start, int end);
void debug_dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
};
-
-
-#endif
-quassel_add_module(Common)
+quassel_add_module(Common EXPORT)
target_sources(${TARGET} PRIVATE
abstractsignalwatcher.h
#pragma once
+#include "common-export.h"
+
#include <QVariantMap>
#include "bufferinfo.h"
class Network;
-class AliasManager : public SyncableObject
+class COMMON_EXPORT AliasManager : public SyncableObject
{
Q_OBJECT
SYNCABLE_OBJECT
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef AUTHHANDLER_H
-#define AUTHHANDLER_H
+#pragma once
+
+#include "common-export.h"
#include <QTcpSocket>
class Peer;
-class AuthHandler : public QObject
+class COMMON_EXPORT AuthHandler : public QObject
{
Q_OBJECT
QTcpSocket *_socket; // FIXME: should be a QSharedPointer? -> premature disconnect before the peer has taken over
bool _disconnectedSent;
};
-
-#endif
#pragma once
+#include "common-export.h"
+
#include "syncableobject.h"
#include "types.h"
-class BacklogManager : public SyncableObject
+class COMMON_EXPORT BacklogManager : public SyncableObject
{
Q_OBJECT
SYNCABLE_OBJECT
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef BASICHANDLER_H
-#define BASICHANDLER_H
+#pragma once
+
+#include "common-export.h"
#include <QObject>
#include <QString>
#include <QHash>
#include <QGenericArgument>
-class BasicHandler : public QObject
+class COMMON_EXPORT BasicHandler : public QObject
{
Q_OBJECT
bool _initDone;
QString _methodPrefix;
};
-
-
-#endif
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef BUFFERINFO_H
-#define BUFFERINFO_H
+#pragma once
+
+#include "common-export.h"
#include "types.h"
class QString;
class QDataStream;
-class BufferInfo
+class COMMON_EXPORT BufferInfo
{
public:
enum Type {
Q_DECLARE_OPERATORS_FOR_FLAGS(BufferInfo::ActivityLevel)
uint qHash(const BufferInfo &);
-
-#endif
#pragma once
+#include "common-export.h"
+
#include "syncableobject.h"
#include "types.h"
#include "message.h"
-class BufferSyncer : public SyncableObject
+class COMMON_EXPORT BufferSyncer : public SyncableObject
{
Q_OBJECT
SYNCABLE_OBJECT
#pragma once
+#include "common-export.h"
+
#include "syncableobject.h"
#include "bufferinfo.h"
#include "types.h"
-class BufferViewConfig : public SyncableObject
+class COMMON_EXPORT BufferViewConfig : public SyncableObject
{
Q_OBJECT
SYNCABLE_OBJECT
#pragma once
+#include "common-export.h"
+
#include "syncableobject.h"
#include <QList>
class BufferViewConfig;
class SignalProxy;
-class BufferViewManager : public SyncableObject
+class COMMON_EXPORT BufferViewManager : public SyncableObject
{
Q_OBJECT
SYNCABLE_OBJECT
#pragma once
+#include "common-export.h"
+
#include "syncableobject.h"
/*
* gather various information about the core.
*/
-class CoreInfo : public SyncableObject
+class COMMON_EXPORT CoreInfo : public SyncableObject
{
Q_OBJECT
SYNCABLE_OBJECT
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef CTCPEVENT_H
-#define CTCPEVENT_H
+#pragma once
+
+#include "common-export.h"
#include "ircevent.h"
#include <QUuid>
-class CtcpEvent : public IrcEvent
+class COMMON_EXPORT CtcpEvent : public IrcEvent
{
public:
enum CtcpType {
QString _target, _param, _reply;
QUuid _uuid;
};
-
-
-#endif
#pragma once
+#include "common-export.h"
+
#include <QHostAddress>
#include "syncableobject.h"
* @warning Equality and assignment operators are optimized for use in a settings page
* and do not cover all attributes!
*/
-class DccConfig : public SyncableObject
+class COMMON_EXPORT DccConfig : public SyncableObject
{
Q_OBJECT
SYNCABLE_OBJECT
#pragma once
+#include "common-export.h"
+
#include <memory>
#include <type_traits>
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef EVENT_H
-#define EVENT_H
+#pragma once
+
+#include "common-export.h"
#include <QDateTime>
#include <QDebug>
class Network;
-class Event
+class COMMON_EXPORT Event
{
public:
explicit Event(EventManager::EventType type = EventManager::Invalid);
EventManager::EventType _type;
EventManager::EventFlags _flags;
QDateTime _timestamp;
- //QVariant _data;
bool _valid;
- friend QDebug operator<<(QDebug dbg, Event *e);
+ friend COMMON_EXPORT QDebug operator<<(QDebug dbg, Event *e);
};
-
-QDebug operator<<(QDebug dbg, Event *e);
-
-/*******/
-
-#endif
+COMMON_EXPORT QDebug operator<<(QDebug dbg, Event *e);
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef EVENTMANAGER_H
-#define EVENTMANAGER_H
+#pragma once
+
+#include "common-export.h"
#include <QMetaEnum>
class Event;
class Network;
-class EventManager : public QObject
+class COMMON_EXPORT EventManager : public QObject
{
Q_OBJECT
Q_FLAGS(EventFlag EventFlags)
Q_DECLARE_OPERATORS_FOR_FLAGS(EventManager::EventFlags)
-
-#endif
#pragma once
+#include "common-export.h"
+
#include <QRegularExpression>
#include <QString>
#include <QStringList>
/**
* Expression matcher with multiple modes of operation and automatic caching for performance
*/
-class ExpressionMatch
+class COMMON_EXPORT ExpressionMatch
{
public:
#pragma once
+#include "common-export.h"
+
#include <utility>
#include <QString>
#include "nickhighlightmatcher.h"
#include "syncableobject.h"
-class HighlightRuleManager : public SyncableObject
+class COMMON_EXPORT HighlightRuleManager : public SyncableObject
{
Q_OBJECT
SYNCABLE_OBJECT
/**
* Individual highlight rule
*/
- class HighlightRule
+ class COMMON_EXPORT HighlightRule
{
public:
/**
#pragma once
+#include "common-export.h"
+
#include <QByteArray>
#include <QDataStream>
#include <QMetaType>
#include "types.h"
#include "syncableobject.h"
-class Identity : public SyncableObject
+class COMMON_EXPORT Identity : public SyncableObject
{
Q_OBJECT
SYNCABLE_OBJECT
#include <QSslKey>
#include <QSslCertificate>
-class CertManager : public SyncableObject
+class COMMON_EXPORT CertManager : public SyncableObject
{
Q_OBJECT
SYNCABLE_OBJECT
#pragma once
-#include <QDebug>
+#include "common-export.h"
+
#include <QString>
#include <QStringList>
#include <QRegExp>
#include "message.h"
#include "syncableobject.h"
-class IgnoreListManager : public SyncableObject
+class COMMON_EXPORT IgnoreListManager : public SyncableObject
{
Q_OBJECT
SYNCABLE_OBJECT
/**
* Individual ignore list rule
*/
- class IgnoreListItem {
+ class COMMON_EXPORT IgnoreListItem {
public:
/**
* Construct an empty ignore rule
#pragma once
+#include "common-export.h"
+
#include <QPointer>
#include <QString>
#include "protocol.h"
#include "signalproxy.h"
-class InternalPeer : public Peer
+class COMMON_EXPORT InternalPeer : public Peer
{
Q_OBJECT
#pragma once
+#include "common-export.h"
+
#include <QHash>
#include <QSet>
#include <QString>
class IrcUser;
class Network;
-class IrcChannel : public SyncableObject
+class COMMON_EXPORT IrcChannel : public SyncableObject
{
Q_OBJECT
SYNCABLE_OBJECT
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef IRCEVENT_H
-#define IRCEVENT_H
+#pragma once
+
+#include "common-export.h"
#include "networkevent.h"
#include "util.h"
-class IrcEvent : public NetworkEvent
+class COMMON_EXPORT IrcEvent : public NetworkEvent
{
public:
explicit IrcEvent(EventManager::EventType type, Network *network, const QString &prefix, const QStringList ¶ms = QStringList())
};
-class IrcEventNumeric : public IrcEvent
+class COMMON_EXPORT IrcEventNumeric : public IrcEvent
{
public:
explicit IrcEventNumeric(uint number, Network *network, const QString &prefix, const QString &target, const QStringList ¶ms = QStringList())
};
-class IrcEventRawMessage : public IrcEvent
+class COMMON_EXPORT IrcEventRawMessage : public IrcEvent
{
public:
explicit inline IrcEventRawMessage(EventManager::EventType type, Network *network,
friend class IrcEvent;
};
-
-
-#endif
#pragma once
+#include "common-export.h"
+
#include "syncableobject.h"
#include "types.h"
* when RPL_LISTEND is received the clients will be informed, that they can pull the data
* 3.) client pulls the data by calling requestChannelList again. receiving the data in receiveChannelList
*/
-class IrcListHelper : public SyncableObject
+class COMMON_EXPORT IrcListHelper : public SyncableObject
{
Q_OBJECT
SYNCABLE_OBJECT
#pragma once
+#include "common-export.h"
+
#include <QSet>
#include <QString>
#include <QStringList>
class Network;
class IrcChannel;
-class IrcUser : public SyncableObject
+class COMMON_EXPORT IrcUser : public SyncableObject
{
Q_OBJECT
SYNCABLE_OBJECT
#pragma once
+#include "common-export.h"
+
#include <vector>
#include <QDateTime>
/**
* The Logger class encapsulates the various configured logging backends.
*/
-class Logger : public QObject
+class COMMON_EXPORT Logger : public QObject
{
Q_OBJECT
#pragma once
+#include "common-export.h"
+
#include <QStringList>
#include <QTextStream>
*
* Very similar in concept to qDebug() and friends.
*/
-class LogMessage
+class COMMON_EXPORT LogMessage
{
public:
LogMessage(Logger::LogLevel level);
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef MESSAGE_H_
-#define MESSAGE_H_
+#pragma once
+
+#include "common-export.h"
#include <QCoreApplication>
#include <QDateTime>
#include "bufferinfo.h"
#include "types.h"
-class Message
+class COMMON_EXPORT Message
{
Q_DECLARE_TR_FUNCTIONS(Message)
Q_DECLARE_METATYPE(Message)
Q_DECLARE_OPERATORS_FOR_FLAGS(Message::Types)
Q_DECLARE_OPERATORS_FOR_FLAGS(Message::Flags)
-
-#endif
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef MESSAGEEVENT_H
-#define MESSAGEEVENT_H
+#pragma once
+
+#include "common-export.h"
#include "message.h"
#include "networkevent.h"
// this corresponds to CoreSession::RawMessage for now and should contain the information we need to convert events
// into messages for the legacy code to work with
-class MessageEvent : public NetworkEvent
+class COMMON_EXPORT MessageEvent : public NetworkEvent
{
public:
explicit MessageEvent(Message::Type msgType,
QString _text, _sender, _target;
Message::Flags _msgFlags;
};
-
-
-#endif
#pragma once
+#include "common-export.h"
+
#include <QString>
#include <QStringList>
#include <QList>
// TODO: ConnectionInfo to propagate and sync the current state of NetworkConnection, encodings etcpp
-class Network : public SyncableObject
+class COMMON_EXPORT Network : public SyncableObject
{
Q_OBJECT
SYNCABLE_OBJECT
//! Stores all editable information about a network (as opposed to runtime state).
-struct NetworkInfo
+struct COMMON_EXPORT NetworkInfo
{
QString networkName;
bool operator!=(const NetworkInfo &other) const;
};
-QDataStream &operator<<(QDataStream &out, const NetworkInfo &info);
-QDataStream &operator>>(QDataStream &in, NetworkInfo &info);
-QDebug operator<<(QDebug dbg, const NetworkInfo &i);
+COMMON_EXPORT QDataStream &operator<<(QDataStream &out, const NetworkInfo &info);
+COMMON_EXPORT QDataStream &operator>>(QDataStream &in, NetworkInfo &info);
+COMMON_EXPORT QDebug operator<<(QDebug dbg, const NetworkInfo &i);
Q_DECLARE_METATYPE(NetworkInfo)
-QDataStream &operator<<(QDataStream &out, const Network::Server &server);
-QDataStream &operator>>(QDataStream &in, Network::Server &server);
-QDebug operator<<(QDebug dbg, const Network::Server &server);
+COMMON_EXPORT QDataStream &operator<<(QDataStream &out, const Network::Server &server);
+COMMON_EXPORT QDataStream &operator>>(QDataStream &in, Network::Server &server);
+COMMON_EXPORT QDebug operator<<(QDebug dbg, const Network::Server &server);
Q_DECLARE_METATYPE(Network::Server)
#pragma once
+#include "common-export.h"
+
#include "syncableobject.h"
-class NetworkConfig : public SyncableObject
+class COMMON_EXPORT NetworkConfig : public SyncableObject
{
Q_OBJECT
SYNCABLE_OBJECT
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef NETWORKEVENT_H
-#define NETWORKEVENT_H
+#pragma once
#include <QStringList>
#include <QVariantList>
#include "event.h"
#include "network.h"
-class NetworkEvent : public Event
+class COMMON_EXPORT NetworkEvent : public Event
{
public:
explicit NetworkEvent(EventManager::EventType type, Network *network)
/*****************************************************************************/
-class NetworkConnectionEvent : public NetworkEvent
+class COMMON_EXPORT NetworkConnectionEvent : public NetworkEvent
{
public:
explicit NetworkConnectionEvent(EventManager::EventType type, Network *network, Network::ConnectionState state)
};
-class NetworkDataEvent : public NetworkEvent
+class COMMON_EXPORT NetworkDataEvent : public NetworkEvent
{
public:
explicit NetworkDataEvent(EventManager::EventType type, Network *network, const QByteArray &data)
};
-class NetworkSplitEvent : public NetworkEvent
+class COMMON_EXPORT NetworkSplitEvent : public NetworkEvent
{
public:
explicit NetworkSplitEvent(EventManager::EventType type,
friend class NetworkEvent;
};
-
-
-#endif
#pragma once
+#include "common-export.h"
+
#include <QHash>
#include <QString>
#include <QStringList>
/**
* Nickname matcher with automatic caching for performance
*/
-class NickHighlightMatcher
+class COMMON_EXPORT NickHighlightMatcher
{
public:
/// Nickname highlighting mode
#pragma once
+#include "common-export.h"
+
#include <QAbstractSocket>
#include <QDataStream>
#include <QPointer>
#include "quassel.h"
#include "signalproxy.h"
-class Peer : public QObject
+class COMMON_EXPORT Peer : public QObject
{
Q_OBJECT
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef PEERFACTORY_H
-#define PEERFACTORY_H
+#pragma once
+
+#include "common-export.h"
#include <QPair>
class AuthHandler;
class RemotePeer;
-class PeerFactory
+class COMMON_EXPORT PeerFactory
{
public:
static RemotePeer *createPeer(const ProtoList &protocols, AuthHandler *authHandler, QTcpSocket *socket, Compressor::CompressionLevel level, QObject *parent = 0);
};
-
-#endif
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef PRESETNETWORKS_H
-#define PRESETNETWORKS_H
+#pragma once
+
+#include "common-export.h"
#include <QString>
#include <QStringList>
#include "network.h"
-class PresetNetworks
+class COMMON_EXPORT PresetNetworks
{
public:
static QStringList names(bool onlyDefault = false);
private:
static QString _networksIniPath;
};
-
-#endif
#pragma once
+#include "common-export.h"
+
#include <functional>
#include <vector>
class Logger;
-class Quassel : public QObject, public Singleton<Quassel>
+class COMMON_EXPORT Quassel : public QObject, public Singleton<Quassel>
{
// TODO Qt5: Use Q_GADGET
Q_OBJECT
*
* @sa Quassel::Feature
*/
-class Quassel::Features
+class COMMON_EXPORT Quassel::Features
{
public:
/**
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef REMOTEPEER_H
-#define REMOTEPEER_H
+#pragma once
+
+#include "common-export.h"
#include <QDateTime>
class AuthHandler;
-class RemotePeer : public Peer
+class COMMON_EXPORT RemotePeer : public Peer
{
Q_OBJECT
int _lag;
quint32 _msgSize;
};
-
-#endif
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef SETTINGS_H
-#define SETTINGS_H
+#pragma once
+
+#include "common-export.h"
#include <QCoreApplication>
#include <QHash>
#include "quassel.h"
-class SettingsChangeNotifier : public QObject
+class COMMON_EXPORT SettingsChangeNotifier : public QObject
{
Q_OBJECT
};
-class Settings
+class COMMON_EXPORT Settings
{
public:
enum Mode { Default, Custom };
return settingsChangeNotifier.contains(normKey);
}
};
-
-
-#endif
#pragma once
+#include "common-export.h"
+
#include <QEvent>
#include <QSet>
class Peer;
class SyncableObject;
-class SignalProxy : public QObject
+class COMMON_EXPORT SignalProxy : public QObject
{
Q_OBJECT
#pragma once
-#include <QtGlobal>
+#include <iostream>
+
+// For Windows DLLs, we must not export the template function.
+// For other systems, we must, otherwise the local static variables won't work across library boundaries...
+#ifndef Q_OS_WIN
+# include "common-export.h"
+# define QUASSEL_SINGLETON_EXPORT COMMON_EXPORT
+#else
+# define QUASSEL_SINGLETON_EXPORT
+#endif
+
+namespace detail {
+
+// This needs to be a free function instead of a member function of Singleton, because
+// - MSVC can't deal with static attributes in an exported template class
+// - Clang produces weird and unreliable results for local static variables in static member functions
+//
+// We need to export the function on anything not using Windows DLLs, otherwise local static members don't
+// work across library boundaries.
+template<typename T>
+QUASSEL_SINGLETON_EXPORT T *getOrSetInstance(T *instance = nullptr, bool destroyed = false)
+{
+ static T *_instance = instance;
+ static bool _destroyed = destroyed;
+
+ if (destroyed) {
+ _destroyed = true;
+ return _instance = nullptr;
+ }
+ if (instance) {
+ if (_destroyed) {
+ std::cerr << "Trying to reinstantiate a destroyed singleton, this must not happen!\n";
+ abort(); // This produces a backtrace, which is highly useful for finding the culprit
+ }
+ if (_instance != instance) {
+ std::cerr << "Trying to reinstantiate a singleton that is already instantiated, this must not happen!\n";
+ abort();
+ }
+ }
+ if (!_instance) {
+ std::cerr << "Trying to access a singleton that has not been instantiated yet!\n";
+ abort();
+ }
+ return _instance;
+}
+
+} // detail
/**
* Mixin class for "pseudo" singletons.
*/
Singleton(T *instance)
{
- if (_destroyed) {
- qFatal("Trying to reinstantiate a destroyed singleton, this must not happen!");
- abort(); // This produces a backtrace, which is highly useful for finding the culprit
- }
- if (_instance) {
- qFatal("Trying to reinstantiate a singleton that is already instantiated, this must not happen!");
- abort();
- }
- _instance = instance;
+ detail::getOrSetInstance<T>(instance);
}
// Satisfy Rule of Five
*/
~Singleton()
{
- _instance = nullptr;
- _destroyed = true;
+ detail::getOrSetInstance<T>(nullptr, true);
}
/**
*/
static T *instance()
{
- if (_instance) {
- return _instance;
- }
- qFatal("Trying to access a singleton that has not been instantiated yet");
- abort();
+ return detail::getOrSetInstance<T>();
}
-
-private:
- static T *_instance;
- static bool _destroyed;
-
};
-
-template<typename T>
-T *Singleton<T>::_instance{nullptr};
-
-template<typename T>
-bool Singleton<T>::_destroyed{false};
#pragma once
+#include "common-export.h"
+
#include <QDataStream>
#include <QMetaType>
#include <QObject>
#define ARG(x) const_cast<void *>(reinterpret_cast<const void *>(&x))
#define NO_ARG 0
-class SyncableObject : public QObject
+class COMMON_EXPORT SyncableObject : public QObject
{
Q_OBJECT
#pragma once
+#include "common-export.h"
+
#include <QHostAddress>
#include <QUuid>
#include "peer.h"
#include "syncableobject.h"
-class Transfer : public SyncableObject
+class COMMON_EXPORT Transfer : public SyncableObject
{
Q_OBJECT
SYNCABLE_OBJECT
#pragma once
+#include "common-export.h"
+
#include <QHash>
#include <QList>
#include <QUuid>
class Transfer;
-class TransferManager : public SyncableObject
+class COMMON_EXPORT TransferManager : public SyncableObject
{
Q_OBJECT
SYNCABLE_OBJECT
#pragma once
+#include "common-export.h"
+
#include <QList>
#include <QString>
#include <QVariant>
-QString nickFromMask(const QString &mask);
-QString userFromMask(const QString &mask);
-QString hostFromMask(const QString &mask);
-bool isChannelName(const QString &str);
+COMMON_EXPORT QString nickFromMask(const QString &mask);
+COMMON_EXPORT QString userFromMask(const QString &mask);
+COMMON_EXPORT QString hostFromMask(const QString &mask);
+COMMON_EXPORT bool isChannelName(const QString &str);
//! Strip mIRC format codes
-QString stripFormatCodes(QString);
+COMMON_EXPORT QString stripFormatCodes(QString);
//! Remove accelerator markers (&) from the string
-QString stripAcceleratorMarkers(const QString &);
+COMMON_EXPORT QString stripAcceleratorMarkers(const QString &);
-QString secondsToString(int timeInSeconds);
+COMMON_EXPORT QString secondsToString(int timeInSeconds);
//! Take a string and decode it using the specified text codec, recognizing utf8.
/** This function takes a string and first checks if it is encoded in utf8, in which case it is
* \param codec The text codec we use if the input is not utf8
* \return The decoded string.
*/
-QString decodeString(const QByteArray &input, QTextCodec *codec = 0);
+COMMON_EXPORT QString decodeString(const QByteArray &input, QTextCodec *codec = 0);
-uint editingDistance(const QString &s1, const QString &s2);
+COMMON_EXPORT uint editingDistance(const QString &s1, const QString &s2);
template<typename T>
QVariantList toVariantList(const QList<T> &list)
}
-QByteArray prettyDigest(const QByteArray &digest);
+COMMON_EXPORT QByteArray prettyDigest(const QByteArray &digest);
/**
* Format a string with %%<text>%% to current date/timestamp via QDateTime.
* @param[in] formatStr String with format codes
* @return String with current date/time substituted in via formatting codes
*/
-QString formatCurrentDateTimeInString(const QString &formatStr);
+COMMON_EXPORT QString formatCurrentDateTimeInString(const QString &formatStr);
/**
* Try to localize a given date/time in seconds from Unix epoch, pass through string if invalid
* @param useUTC If true, use UTC timezone, otherwise use local time
* @return Localized date/time if parse succeeded, otherwise the source string
*/
-QString tryFormatUnixEpoch(const QString &possibleEpochDate,
- Qt::DateFormat dateFormat = Qt::DateFormat::TextDate,
- bool useUTC = false);
+COMMON_EXPORT QString tryFormatUnixEpoch(const QString &possibleEpochDate,
+ Qt::DateFormat dateFormat = Qt::DateFormat::TextDate,
+ bool useUTC = false);
/**
* @param dateTime Date/time of interest
* @return Date/time in ISO 8601 format with timezone offset
*/
-QString formatDateTimeToOffsetISO(const QDateTime &dateTime);
+COMMON_EXPORT QString formatDateTimeToOffsetISO(const QDateTime &dateTime);
-quassel_add_module(Core)
+quassel_add_module(Core EXPORT)
target_sources(${TARGET} PRIVATE
abstractsqlstorage.cpp
#pragma once
+#include "core-export.h"
+
#include <memory>
#include <vector>
class AbstractSqlMigrationReader;
class AbstractSqlMigrationWriter;
-class Core : public QObject, public Singleton<Core>
+class CORE_EXPORT Core : public QObject, public Singleton<Core>
{
Q_OBJECT
#pragma once
+#include "core-export.h"
+
#include <memory>
#include <QCoreApplication>
class Core;
-class CoreApplication : public QCoreApplication
+class CORE_EXPORT CoreApplication : public QCoreApplication
{
Q_OBJECT
-quassel_add_module(QtUi)
+quassel_add_module(QtUi EXPORT)
target_sources(${TARGET} PRIVATE
aboutdlg.cpp
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef BUFFERWIDGET_H_
-#define BUFFERWIDGET_H_
+#pragma once
#include "ui_bufferwidget.h"
bool _autoMarkerLine;
bool _autoMarkerLineOnLostFocus;
};
-
-
-#endif
#pragma once
+#include "qtui-export.h"
+
#include <memory>
#include <QApplication>
class QtUi;
-class QtUiApplication : public QApplication
+class QTUI_EXPORT QtUiApplication : public QApplication
{
Q_OBJECT
-quassel_add_module(UiSupport)
+quassel_add_module(UiSupport EXPORT)
target_sources(${TARGET} PRIVATE
aboutdata.cpp
#pragma once
+#include "uisupport-export.h"
+
#include <QList>
#include <QLocale>
#include <QString>
*
* This is used to show a list of contributors in the About Quassel dialog.
*/
-class AboutPerson
+class UISUPPORT_EXPORT AboutPerson
{
public:
/**
* the About Quassel dialog. Additionally, this class can provide a KAboutData object to be shown
* if KDE integration is enabled.
*/
-class AboutData : public QObject
+class UISUPPORT_EXPORT AboutData : public QObject
{
Q_OBJECT
public:
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef ABSTRACTBUFFERCONTAINER_H_
-#define ABSTRACTBUFFERCONTAINER_H_
+#pragma once
+
+#include "uisupport-export.h"
#include "abstractitemview.h"
#include "buffermodel.h"
class AbstractUiMsg;
class Buffer;
-class AbstractBufferContainer : public AbstractItemView
+class UISUPPORT_EXPORT AbstractBufferContainer : public AbstractItemView
{
Q_OBJECT
virtual ~AbstractChatView() {};
virtual MsgId lastMsgId() const = 0;
};
-
-
-#endif
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef ABSTRACTITEMVIEW_H
-#define ABSTRACTITEMVIEW_H
+#pragma once
+
+#include "uisupport-export.h"
#include <QWidget>
#include <QAbstractItemModel>
#include <QAbstractItemDelegate>
#include <QPointer>
-class AbstractItemView : public QWidget
+class UISUPPORT_EXPORT AbstractItemView : public QWidget
{
Q_OBJECT
QPointer<QAbstractItemModel> _model;
QPointer<QItemSelectionModel> _selectionModel;
};
-
-
-#endif // ABSTRACTITEMVIEW_H
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef ABSTRACTNOTIFICATIONBACKEND_H_
-#define ABSTRACTNOTIFICATIONBACKEND_H_
+#pragma once
+
+#include "uisupport-export.h"
#include <QObject>
#include <QString>
class SettingsPage;
-class AbstractNotificationBackend : public QObject
+class UISUPPORT_EXPORT AbstractNotificationBackend : public QObject
{
Q_OBJECT
//! May be emitted by the notification to tell the MainWin to raise itself
void activated(uint notificationId = 0);
};
-
-
-#endif
#pragma once
+#include "uisupport-export.h"
+
#include <QShortcut>
#include <QWidgetAction>
/** This declares/implements a subset of KAction's API (notably we've left out global shortcuts
* for now), which should make it easy to plug in KDE support later on.
*/
-class Action : public QWidgetAction
+class UISUPPORT_EXPORT Action : public QWidgetAction
{
Q_OBJECT
#pragma once
+#include "uisupport-export.h"
+
#ifndef HAVE_KDE
#include <QDebug>
class Action;
class QAction;
-class ActionCollection : public QObject
+class UISUPPORT_EXPORT ActionCollection : public QObject
{
Q_OBJECT
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef BUFFERHOTLISTFILTER_H
-#define BUFFERHOTLISTFILTER_H
+#pragma once
+
+#include "uisupport-export.h"
#include <QSortFilterProxyModel>
#include "types.h"
-class BufferHotListFilter : public QSortFilterProxyModel
+class UISUPPORT_EXPORT BufferHotListFilter : public QSortFilterProxyModel
{
Q_OBJECT
virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
virtual bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const;
};
-
-
-#endif //BUFFERHOTLISTFILTER_H
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef BUFFERVIEW_H_
-#define BUFFERVIEW_H_
+#pragma once
+
+#include "uisupport-export.h"
#include <QAction>
#include <QMenu>
/*****************************************
* The TreeView showing the Buffers
*****************************************/
-class BufferView : public TreeViewTouch
+class UISUPPORT_EXPORT BufferView : public TreeViewTouch
{
Q_OBJECT
// ==============================
// BufferView Dock
// ==============================
-class BufferViewDock : public QDockWidget
+class UISUPPORT_EXPORT BufferViewDock : public QDockWidget
{
Q_OBJECT
Q_PROPERTY(bool active READ isActive WRITE setActive STORED true)
bool _active;
QString _title;
};
-
-
-#endif
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef BUFFERVIEWFILTER_H_
-#define BUFFERVIEWFILTER_H_
+#pragma once
+
+#include "uisupport-export.h"
#include <QAction>
#include <QDropEvent>
/*****************************************
* Buffer View Filter
*****************************************/
-class BufferViewFilter : public QSortFilterProxyModel
+class UISUPPORT_EXPORT BufferViewFilter : public QSortFilterProxyModel
{
Q_OBJECT
Q_DECLARE_OPERATORS_FOR_FLAGS(BufferViewFilter::Modes)
-
-#endif // BUFFERVIEWFILTER_H_
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef BUFFERVIEWOVERLAYFILTER_H_
-#define BUFFERVIEWOVERLAYFILTER_H_
+#pragma once
+
+#include "uisupport-export.h"
#include <QSortFilterProxyModel>
class BufferViewOverlay;
-class BufferViewOverlayFilter : public QSortFilterProxyModel
+class UISUPPORT_EXPORT BufferViewOverlayFilter : public QSortFilterProxyModel
{
Q_OBJECT
private:
BufferViewOverlay *_overlay;
};
-
-
-#endif // BUFFERVIEWOVERLAYFILTER_H_
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef CLEARABLELINEEDIT_H
-#define CLEARABLELINEEDIT_H
+#pragma once
+
+#include "uisupport-export.h"
#include <QLineEdit>
class QToolButton;
-class ClearableLineEdit : public QLineEdit
+class UISUPPORT_EXPORT ClearableLineEdit : public QLineEdit
{
Q_OBJECT
private:
QToolButton *clearButton;
};
-
-
-#endif // CLEARABLELINEEDIT_H
#pragma once
+#include "uisupport-export.h"
+
#include <vector>
#include <QStackedWidget>
class QModelIndex;
-class Clickable
+class UISUPPORT_EXPORT Clickable
{
public:
// Don't change these enums without also changing dependent methods!
};
-class ClickableList : public std::vector<Clickable>
+class UISUPPORT_EXPORT ClickableList : public std::vector<Clickable>
{
public:
static ClickableList fromString(const QString &);
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef CLICKABLELABEL_H
-#define CLICKABLELABEL_H
+#pragma once
+
+#include "uisupport-export.h"
#include <QLabel>
-class ClickableLabel : public QLabel
+class UISUPPORT_EXPORT ClickableLabel : public QLabel
{
Q_OBJECT
protected:
void mouseReleaseEvent(QMouseEvent *event);
};
-
-
-#endif //CLICKABLELABEL_H
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef COLORBUTTON_H_
-#define COLORBUTTON_H_
+#pragma once
+
+#include "uisupport-export.h"
#include <QToolButton>
-class ColorButton : public QToolButton
+class UISUPPORT_EXPORT ColorButton : public QToolButton
{
Q_OBJECT
Q_PROPERTY(QColor color READ color WRITE setColor USER true)
public :
- explicit ColorButton(QWidget *parent = 0);
+ explicit ColorButton(QWidget *parent = 0);
explicit ColorButton(const QColor &c, QWidget *parent = 0);
void setColor(const QColor &color);
signals:
void colorChanged(const QColor &);
-protected:
- //void paintEvent(QPaintEvent *event);
-
private slots:
void chooseColor();
private:
QColor _color;
};
-
-
-#endif
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef CONTEXTMENUACTIONPROVIDER_H
-#define CONTEXTMENUACTIONPROVIDER_H
+#pragma once
+
+#include "uisupport-export.h"
#include "networkmodelcontroller.h"
-class ContextMenuActionProvider : public NetworkModelController
+class UISUPPORT_EXPORT ContextMenuActionProvider : public NetworkModelController
{
Q_OBJECT
Action *_nickIgnoreMenuAction;
QList<QAction *> _ignoreDescriptions;
};
-
-
-#endif
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef FLATPROXYMODEL_H
-#define FLATPROXYMODEL_H
+#pragma once
+
+#include "uisupport-export.h"
#include <QAbstractProxyModel>
-class FlatProxyModel : public QAbstractProxyModel
+class UISUPPORT_EXPORT FlatProxyModel : public QAbstractProxyModel
{
Q_OBJECT
friend class FlatProxyModel;
};
-
-
-#endif //FLATPROXYMODEL_H
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef FONTSELECTOR_H_
-#define FONTSELECTOR_H_
+#pragma once
+
+#include "uisupport-export.h"
#include <QLabel>
#include <QWidget>
-class FontSelector : public QWidget
+class UISUPPORT_EXPORT FontSelector : public QWidget
{
Q_OBJECT
Q_PROPERTY(QFont selectedFont READ selectedFont WRITE setSelectedFont)
QFont _font;
QLabel *_demo;
};
-
-
-#endif // FONTSELECTOR_H_
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef GRAPHICALUI_H_
-#define GRAPHICALUI_H_
+#pragma once
+
+#include "uisupport-export.h"
#include "abstractui.h"
#include "singleton.h"
#include <Carbon/Carbon.h>
#endif
-class GraphicalUi : public AbstractUi, protected Singleton<GraphicalUi>
+class UISUPPORT_EXPORT GraphicalUi : public AbstractUi, protected Singleton<GraphicalUi>
{
Q_OBJECT
UiStyle *GraphicalUi::uiStyle() { return _uiStyle; }
QWidget *GraphicalUi::mainWidget() { return _mainWidget; }
bool GraphicalUi::isHidingMainWidgetAllowed() const { return false; }
-
-#endif
#pragma once
+#include "uisupport-export.h"
+
#include <vector>
#include <QIcon>
* @param fallbackPath Full path to a fallback icon
* @returns The requested icon, if available
*/
-QIcon get(const QString &iconName, const QString &fallbackPath = {});
+UISUPPORT_EXPORT QIcon get(const QString &iconName, const QString &fallbackPath = {});
/**
* Gets an icon from the current icon theme.
* @param fallbackPath Full path to a fallback icon
* @returns The requested icon, if available
*/
-QIcon get(const std::vector<QString> &iconNames, const QString &fallbackPath = {});
+UISUPPORT_EXPORT QIcon get(const std::vector<QString> &iconNames, const QString &fallbackPath = {});
}
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef MULTILINEEDIT_H_
-#define MULTILINEEDIT_H_
+#pragma once
+
+#include "uisupport-export.h"
#include <QKeyEvent>
#include <QHash>
# include <Sonnet/SpellCheckDecorator>
#endif
-class MultiLineEdit : public MultiLineEditParent
+class UISUPPORT_EXPORT MultiLineEdit : public MultiLineEditParent
{
Q_OBJECT
Sonnet::SpellCheckDecorator *_spellCheckDecorator{nullptr};
#endif
};
-
-
-#endif
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef NETWORKMODELCONTROLLER_H_
-#define NETWORKMODELCONTROLLER_H_
+#pragma once
+
+#include "uisupport-export.h"
#include <QDialog>
class QDialogButtonBox;
class QLineEdit;
-class NetworkModelController : public QObject
+class UISUPPORT_EXPORT NetworkModelController : public QObject
{
Q_OBJECT
QString NetworkModelController::contextItem() const { return _contextItem; }
QObject *NetworkModelController::receiver() const { return _receiver; }
const char *NetworkModelController::method() const { return _method; }
-
-#endif
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef NICKVIEW_H_
-#define NICKVIEW_H_
+#pragma once
+
+#include "uisupport-export.h"
#include <QTreeView>
#include "bufferinfo.h"
#include "treeviewtouch.h"
-class NickView : public TreeViewTouch
+class UISUPPORT_EXPORT NickView : public TreeViewTouch
{
Q_OBJECT
private:
friend class NickListWidget; // needs selectedIndexes()
};
-
-
-#endif
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef NICKVIEWFILTER_H
-#define NICKVIEWFILTER_H
+#pragma once
+
+#include "uisupport-export.h"
#include <QSortFilterProxyModel>
class NetworkModel;
// This is proxymodel is purely for the sorting right now
-class NickViewFilter : public QSortFilterProxyModel
+class UISUPPORT_EXPORT NickViewFilter : public QSortFilterProxyModel
{
Q_OBJECT
private:
BufferId _bufferId;
};
-
-
-#endif
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef RESIZINGSTACKEDWIDGET_H_
-#define RESIZINGSTACKEDWIDGET_H_
+#pragma once
+
+#include "uisupport-export.h"
#include <QStackedWidget>
-class ResizingStackedWidget : public QStackedWidget
+class UISUPPORT_EXPORT ResizingStackedWidget : public QStackedWidget
{
Q_OBJECT
private slots:
void indexChanged(int index);
};
-
-
-#endif // RESIZINGSTACKEDWIDGET_H_
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef _SETTINGSPAGE_H_
-#define _SETTINGSPAGE_H_
+#pragma once
+
+#include "uisupport-export.h"
#include <QWidget>
* - QComboBox (currentIndex())
* - QSpinBox (value())
*/
-class SettingsPage : public QWidget
+class UISUPPORT_EXPORT SettingsPage : public QWidget
{
Q_OBJECT
bool _changed, _autoWidgetsChanged;
QObjectList _autoWidgets;
};
-
-
-#endif
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef STYLEDLABEL_H
-#define STYLEDLABEL_H
+#pragma once
+
+#include "uisupport-export.h"
#include <QFrame>
#include "clickable.h"
#include "uistyle.h"
-class StyledLabel : public QFrame
+class UISUPPORT_EXPORT StyledLabel : public QFrame
{
Q_OBJECT
void setHoverMode(int start, int length);
void endHoverMode();
};
-
-
-#endif
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef TABCOMPLETER_H_
-#define TABCOMPLETER_H_
+#pragma once
+
+#include "uisupport-export.h"
#include <QPointer>
#include <QString>
class IrcUser;
class Network;
-class TabCompleter : public QObject
+class UISUPPORT_EXPORT TabCompleter : public QObject
{
Q_OBJECT
void buildCompletionList();
};
-
-
-#endif
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef TOOLBARACTIONPROVIDER_H_
-#define TOOLBARACTIONPROVIDER_H_
+#pragma once
+
+#include "uisupport-export.h"
#include "networkmodelcontroller.h"
class QToolBar;
-class ToolBarActionProvider : public NetworkModelController
+class UISUPPORT_EXPORT ToolBarActionProvider : public NetworkModelController
{
Q_OBJECT
QModelIndex _currentBuffer;
QModelIndexList _selectedNicks;
};
-
-
-#endif
#pragma once
+#include "uisupport-export.h"
+
#include <QTreeView>
/**
* This class handles Touch Events for TreeViews
*/
-class TreeViewTouch : public QTreeView
+class UISUPPORT_EXPORT TreeViewTouch : public QTreeView
{
Q_OBJECT
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef UISETTINGS_H
-#define UISETTINGS_H
+#pragma once
+
+#include "uisupport-export.h"
#include "clientsettings.h"
#include "uistyle.h"
-class UiSettings : public ClientSettings
+class UISUPPORT_EXPORT UiSettings : public ClientSettings
{
public:
UiSettings(const QString &group = "Ui");
};
-class UiStyleSettings : public UiSettings
+class UISUPPORT_EXPORT UiStyleSettings : public UiSettings
{
public:
UiStyleSettings();
};
-class SessionSettings : public UiSettings
+class UISUPPORT_EXPORT SessionSettings : public UiSettings
{
public:
SessionSettings(const QString &sessionId, const QString &group = "Session");
};
-class ShortcutSettings : public UiSettings
+class UISUPPORT_EXPORT ShortcutSettings : public UiSettings
{
public:
ShortcutSettings();
void saveShortcut(const QString &name, const QKeySequence &shortcut);
QKeySequence loadShortcut(const QString &name);
};
-
-
-#endif
#pragma once
+#include "uisupport-export.h"
+
#include <utility>
#include <vector>
#include "networkmodel.h"
#include "settings.h"
-class UiStyle : public QObject
+class UISUPPORT_EXPORT UiStyle : public QObject
{
Q_OBJECT
Q_ENUMS(SenderPrefixModes)
};
-class UiStyle::StyledMessage : public Message
+class UISUPPORT_EXPORT UiStyle::StyledMessage : public Message
{
Q_DECLARE_TR_FUNCTIONS(UiStyle::StyledMessage)
// ---- Operators for dealing with enums ----------------------------------------------------------
-UiStyle::FormatType operator|(UiStyle::FormatType lhs, UiStyle::FormatType rhs);
-UiStyle::FormatType& operator|=(UiStyle::FormatType &lhs, UiStyle::FormatType rhs);
-UiStyle::FormatType operator|(UiStyle::FormatType lhs, quint32 rhs);
-UiStyle::FormatType& operator|=(UiStyle::FormatType &lhs, quint32 rhs);
-UiStyle::FormatType operator&(UiStyle::FormatType lhs, UiStyle::FormatType rhs);
-UiStyle::FormatType& operator&=(UiStyle::FormatType &lhs, UiStyle::FormatType rhs);
-UiStyle::FormatType operator&(UiStyle::FormatType lhs, quint32 rhs);
-UiStyle::FormatType& operator&=(UiStyle::FormatType &lhs, quint32 rhs);
-UiStyle::FormatType& operator^=(UiStyle::FormatType &lhs, UiStyle::FormatType rhs);
-
-UiStyle::MessageLabel operator|(UiStyle::MessageLabel lhs, UiStyle::MessageLabel rhs);
-UiStyle::MessageLabel& operator|=(UiStyle::MessageLabel &lhs, UiStyle::MessageLabel rhs);
-UiStyle::MessageLabel operator&(UiStyle::MessageLabel lhs, quint32 rhs);
-UiStyle::MessageLabel& operator&=(UiStyle::MessageLabel &lhs, UiStyle::MessageLabel rhs);
+UISUPPORT_EXPORT UiStyle::FormatType operator|(UiStyle::FormatType lhs, UiStyle::FormatType rhs);
+UISUPPORT_EXPORT UiStyle::FormatType& operator|=(UiStyle::FormatType &lhs, UiStyle::FormatType rhs);
+UISUPPORT_EXPORT UiStyle::FormatType operator|(UiStyle::FormatType lhs, quint32 rhs);
+UISUPPORT_EXPORT UiStyle::FormatType& operator|=(UiStyle::FormatType &lhs, quint32 rhs);
+UISUPPORT_EXPORT UiStyle::FormatType operator&(UiStyle::FormatType lhs, UiStyle::FormatType rhs);
+UISUPPORT_EXPORT UiStyle::FormatType& operator&=(UiStyle::FormatType &lhs, UiStyle::FormatType rhs);
+UISUPPORT_EXPORT UiStyle::FormatType operator&(UiStyle::FormatType lhs, quint32 rhs);
+UISUPPORT_EXPORT UiStyle::FormatType& operator&=(UiStyle::FormatType &lhs, quint32 rhs);
+UISUPPORT_EXPORT UiStyle::FormatType& operator^=(UiStyle::FormatType &lhs, UiStyle::FormatType rhs);
+
+UISUPPORT_EXPORT UiStyle::MessageLabel operator|(UiStyle::MessageLabel lhs, UiStyle::MessageLabel rhs);
+UISUPPORT_EXPORT UiStyle::MessageLabel& operator|=(UiStyle::MessageLabel &lhs, UiStyle::MessageLabel rhs);
+UISUPPORT_EXPORT UiStyle::MessageLabel operator&(UiStyle::MessageLabel lhs, quint32 rhs);
+UISUPPORT_EXPORT UiStyle::MessageLabel& operator&=(UiStyle::MessageLabel &lhs, UiStyle::MessageLabel rhs);
// Shifts the label into the upper half of the return value
-quint64 operator|(UiStyle::FormatType lhs, UiStyle::MessageLabel rhs);
+UISUPPORT_EXPORT quint64 operator|(UiStyle::FormatType lhs, UiStyle::MessageLabel rhs);
-UiStyle::ItemFormatType operator|(UiStyle::ItemFormatType lhs, UiStyle::ItemFormatType rhs);
-UiStyle::ItemFormatType& operator|=(UiStyle::ItemFormatType &lhs, UiStyle::ItemFormatType rhs);
+UISUPPORT_EXPORT UiStyle::ItemFormatType operator|(UiStyle::ItemFormatType lhs, UiStyle::ItemFormatType rhs);
+UISUPPORT_EXPORT UiStyle::ItemFormatType& operator|=(UiStyle::ItemFormatType &lhs, UiStyle::ItemFormatType rhs);
// ---- Allow for FormatList in QVariant ----------------------------------------------------------