diff --git a/CMakeLists.txt b/CMakeLists.txt index 674a51d7..6a2ab75f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,82 +1,82 @@ project(konversation) cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR) set (QT_MIN_VERSION "5.5.0") set(KF5_MIN_VERSION "5.25.0") -find_package(ECM 1.2.0 REQUIRED NO_MODULE) +find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) include(CheckIncludeFile) include(KDEInstallDirs) include(KDECMakeSettings) include(KDECompilerSettings NO_POLICY_SCOPE) include(ECMInstallIcons) include(FeatureSummary) find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Core Widgets) find_package(KF5 ${KF5_MIN_VERSION} REQUIRED Archive Bookmarks Config ConfigWidgets CoreAddons Crash DocTools Emoticons I18n IdleTime NotifyConfig KIO Parts Solid Wallet WidgetsAddons GlobalAccel DBusAddons Notifications WindowSystem IconThemes ItemViews ) find_package(Phonon4Qt5 4.6.60 REQUIRED) include_directories(${PHONON_INCLUDES}) find_package(Qca-qt5 2.1.0) set_package_properties(Qca-qt5 PROPERTIES DESCRIPTION "Support for encryption" URL "http://download.kde.org/stable/qca-qt5/" TYPE OPTIONAL) check_include_file("stropts.h" HAVE_STROPTS_H) check_include_file("byteswap.h" HAVE_BYTESWAP_H) check_include_file("sys/endian.h" HAVE_SYS_ENDIAN_H) set(HAVE_QCA2 ${Qca-qt5_FOUND}) configure_file(config-konversation.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-konversation.h ) include_directories(${CMAKE_CURRENT_BINARY_DIR}) add_definitions( -DQT_USE_QSTRINGBUILDER -DQT_NO_CAST_TO_ASCII -DQT_STRICT_ITERATORS -DQT_NO_URL_CAST_FROM_STRING -DQT_NO_CAST_FROM_BYTEARRAY # -DQT_NO_SIGNALS_SLOTS_KEYWORDS FIXME KF5 Port: QCA includes cause trouble. -DQT_USE_FAST_OPERATOR_PLUS ) add_subdirectory(src) add_subdirectory(data) add_subdirectory(doc) ki18n_install(po) get_filename_component(_doc_translations_path doc-translations ABSOLUTE) if (EXISTS ${_doc_translations_path}/CMakeLists.txt) add_subdirectory(doc-translations) endif() feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/src/awaymanager.h b/src/awaymanager.h index 49b4bdfb..9fa8f8a1 100644 --- a/src/awaymanager.h +++ b/src/awaymanager.h @@ -1,181 +1,181 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ /* Copyright (C) 2008 Eike Hein Copyright (C) 2010 Martin Blumenstingl */ #ifndef AWAYMANAGER_H #define AWAYMANAGER_H #include #include class ConnectionManager; class AwayManager : public QObject { Q_OBJECT public: - explicit AwayManager(QObject* parent = 0); + explicit AwayManager(QObject* parent = nullptr); ~AwayManager(); public Q_SLOTS: void identitiesChanged(); void identityOnline(int identityId); void identityOffline(int identityId); void requestAllAway(const QString& reason = QString()); void requestAllUnaway(); /** * Marks all identities which have auto-away enabled as away. */ virtual void setManagedIdentitiesAway(); /** * Marks all identities which have auto-away and automatic un-away enabled as "not away". */ virtual void setManagedIdentitiesUnaway(); /** * Simulates user activity. This means the implementation should ensure * the idle indicators should be reset as if the user did some input * himself. * This tells KIdleTime that the user was active. Then the idle-time * calculation is restarted. */ void simulateUserActivity(); void setGlobalAway(bool away); void updateGlobalAwayAction(bool away); private Q_SLOTS: /** * Called as soon as the user does some input (after he was away). * This will also ensure that the next idle timeout is exactly * the one which the user has configured for the identity. */ void resumeFromIdle(); /** * The timer with the given ID has reached it's timeout. * * @param timerId the ID of the KIdleTimer */ void idleTimeoutReached(int timerId); private: /** * Marks the given identity as away if it has auto-away enabled. * * @param identityId the ID of the identity. */ void implementManagedAway(int identityId); /** * Marks all given identities as "not away" if they have automatic un-away enabled. * * @param identityList a list of identitiy IDs which will be marked as "not away" */ void implementManagedUnaway(const QList& identityList); /** * Called when the list of identities which have auto-away enabled has changed. * This first drops all active idle timers. Then it triggers recalculation * of all idle timers for all identities which have auto-away enabled. */ virtual void identitiesOnAutoAwayChanged(); /** * An identity which has auto-away enabled went offline. * Triggers the recalculation of the auto-away timer of the identity. * * @param identityId the ID of the identity which just went offline */ virtual void identityOnAutoAwayWentOnline(int identityId); /** * An identity which has auto-away enabled went offline. * Stops the idle timer corresponding to the given identity. * * @param identityId the ID of the identity which just went offline */ virtual void identityOnAutoAwayWentOffline(int identityId); /** * Creates a new idle timer for the given identity with the given * idle time. Also adds the timer to the identity <-> timer mapping. * * @param identityId the ID of the identity for which the timer is * @param idleTime the interval of the idle timer */ void implementAddIdleTimeout(int identityId, int idleTime); /** * Removes the timer with the given ID. Also removes the timer from the * identity <-> timer mapping. * * @param timerId the ID of the timer which should be rmoved. */ void implementRemoveIdleTimeout(int timerId); /** * Updates the KIdleTime timer for the given identity. * If there is no timer for the identity yet it will be created. * In case the auto-away time has changed this will update the * KIdleTime timers (and the internal identity <-> timer mapping). * * @param identityId the ID of the identity for which the idle timeout * should be updated */ void implementUpdateIdleTimeout(int identityId); /** * Calculates the remaining time until the idle time has elapsed. * * @param identityId the identity for which the remaining time should * get calculated */ int calculateRemainingTime(int identityId); /** * Marks the given identity as away. Also starts catching KIdleTime * resume events. * * @param identityId the identity which should be marked as away */ void implementMarkIdentityAway(int identityId); /** * Converts the given minutes to milliseconds. * * @param minutes the number of minutes */ static int minutesToMilliseconds(int minutes); /** * A list of identity IDs and their corresponding auto-away times (in * milliseconds). */ QHash m_identitiesWithIdleTimesOnAutoAway; /** * A mapping between KIdleTime timer IDs (key) and identity IDs (value). */ QHash m_timerForIdentity; ConnectionManager* m_connectionManager; }; #endif diff --git a/src/config/highlight_config.h b/src/config/highlight_config.h index c35434d7..343b8a0b 100644 --- a/src/config/highlight_config.h +++ b/src/config/highlight_config.h @@ -1,60 +1,60 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ /* Copyright (C) 2006 Dario Abatianni Copyright (C) 2006 John Tapsell */ #ifndef HIGHLIGHT_CONFIG_H #define HIGHLIGHT_CONFIG_H #include "ui_highlight_configui.h" #include "settingspage.h" class Highlight_Config; class Highlight; class Highlight_Config : public QWidget, public KonviSettingsPage, private Ui::Highlight_ConfigUI { Q_OBJECT public: - explicit Highlight_Config(QWidget *parent = 0, const char *name = 0); + explicit Highlight_Config(QWidget *parent = nullptr, const char *name = 0); ~Highlight_Config(); public: void saveSettings() Q_DECL_OVERRIDE; void loadSettings() Q_DECL_OVERRIDE; void restorePageToDefaults() Q_DECL_OVERRIDE; bool hasChanged() Q_DECL_OVERRIDE; Q_SIGNALS: void modified(); protected Q_SLOTS: void highlightSelected(QTreeWidgetItem* item); void patternChanged(const QString& newPattern); void notifyModeChanged(bool); void colorChanged(const QColor& newColor); void soundURLChanged(const QString& newURL); void autoTextChanged(const QString& newText); void chatWindowsChanged(const QString& newChatWindows); void addHighlight(); void removeHighlight(); void playSound(); QList getHighlightList(); // prefs format QStringList currentHighlightList(); // hasChanged() format protected: void updateButtons(); bool newItemSelected; QStringList m_oldHighlightList; }; #endif diff --git a/src/config/nicklistbehavior_config.h b/src/config/nicklistbehavior_config.h index feb8a37b..cbee96a4 100644 --- a/src/config/nicklistbehavior_config.h +++ b/src/config/nicklistbehavior_config.h @@ -1,44 +1,44 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ /* Copyright (C) 2006 Dario Abatianni Copyright (C) 2006 John Tapsell */ #ifndef NICKLISTBEHAVIOR_CONFIG_H #define NICKLISTBEHAVIOR_CONFIG_H #include "settingspage.h" #include "ui_nicklistbehavior_configui.h" class NicklistBehavior_Config : public QWidget, public KonviSettingsPage, private Ui::NicklistBehavior_ConfigUI { Q_OBJECT public: - explicit NicklistBehavior_Config(QWidget *parent = 0, const char *name = 0); + explicit NicklistBehavior_Config(QWidget *parent = nullptr, const char *name = 0); ~NicklistBehavior_Config(); void saveSettings() Q_DECL_OVERRIDE; void loadSettings() Q_DECL_OVERRIDE; void restorePageToDefaults() Q_DECL_OVERRIDE; bool hasChanged() Q_DECL_OVERRIDE; private: void setNickList(const QString &sortingOrder); QString currentSortingOrder(); QString m_oldSortingOrder; Q_SIGNALS: void modified(); }; #endif diff --git a/src/config/tabs_config.h b/src/config/tabs_config.h index 212f0ecc..27bf6d31 100644 --- a/src/config/tabs_config.h +++ b/src/config/tabs_config.h @@ -1,33 +1,33 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ /* Copyright (C) 2006 Eike Hein */ #ifndef TABS_CONFIG_H #define TABS_CONFIG_H #include "ui_tabs_configui.h" class Tabs_Config : public QWidget, private Ui::Tabs_PreferencesUI { Q_OBJECT public: - explicit Tabs_Config(QWidget *parent = 0, const char *name = 0); + explicit Tabs_Config(QWidget *parent = nullptr, const char *name = 0); ~Tabs_Config(); protected Q_SLOTS: void toggleCheckBoxes(int activated); protected: void showEvent(QShowEvent *event) Q_DECL_OVERRIDE; }; #endif diff --git a/src/connectionmanager.h b/src/connectionmanager.h index f30ded67..fc402506 100644 --- a/src/connectionmanager.h +++ b/src/connectionmanager.h @@ -1,109 +1,109 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ /* Copyright (C) 2008 Eike Hein */ #ifndef CONNECTIONMANAGER_H #define CONNECTIONMANAGER_H #include "server.h" #include "identity.h" #include #include class ConnectionSettings; class ConnectionManager : public QObject { Q_OBJECT public: - explicit ConnectionManager(QObject* parent = 0); + explicit ConnectionManager(QObject* parent = nullptr); ~ConnectionManager(); uint connectionCount() const { return m_connectionList.count(); } QList getServerList() const; enum NameMatchFlags { MatchByName, MatchByIdThenName }; Server* getServerByConnectionId(int connectionId); Server* getServerByName(const QString& name, NameMatchFlags flags = MatchByName); public Q_SLOTS: void connectTo(Konversation::ConnectionFlag flag, const QString& target, const QString& port = QString(), const QString& password = QString(), const QString& nick = QString(), const QString& channel = QString(), bool useSSL = false); void connectTo(Konversation::ConnectionFlag flag, int serverGroupId); void connectTo(Konversation::ConnectionFlag flag, const QList& list); void connectTo(Konversation::ConnectionFlag flag, ConnectionSettings settings); void quitServers(); void reconnectServers(); void involuntaryQuitServers(); void reconnectInvoluntary(); Q_SIGNALS: void connectionListChanged(); void connectionChangedState(Server* server, Konversation::ConnectionState state); void connectionChangedAwayState(bool away); void requestReconnect(Server* server); void identityOnline(int identityId); void identityOffline(int identityId); void closeServerList(); private Q_SLOTS: void delistConnection(int connectionId); void handleConnectionStateChange(Server* server, Konversation::ConnectionState state); void handleReconnect(Server* server); void onOnlineStateChanged(bool isOnline); private: void enlistConnection(int connectionId, Server* server); void decodeIrcUrl(const QString& url, ConnectionSettings& settings); void decodeAddress(const QString& address, ConnectionSettings& settings, bool checkIfServerGroup = true); bool reuseExistingConnection(ConnectionSettings& settings, bool interactive); bool validateIdentity(IdentityPtr identity, bool interactive = true); QMap m_connectionList; QSet m_activeIdentities; bool m_overrideAutoReconnect; enum ConnectionDupe { SameServer, SameServerGroup }; }; #endif diff --git a/src/dbus.h b/src/dbus.h index 76ea18e1..62b20af2 100644 --- a/src/dbus.h +++ b/src/dbus.h @@ -1,122 +1,122 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ /* The konversation D-Bus interface class begin: Mar 7 2003 copyright: (C) 2003 by Alex Zepeda email: zipzippy@sonic.net */ #ifndef KONVERSATION_DBUS_H #define KONVERSATION_DBUS_H #include "common.h" #include namespace Konversation { class DBus : public QObject { Q_OBJECT Q_CLASSINFO("D-Bus Interface", "org.kde.konversation") public: - explicit DBus(QObject *parent = 0); + explicit DBus(QObject *parent = nullptr); QString getNickname (const QString &server); QString getChannelEncoding(const QString& server, const QString& channel); Q_SIGNALS: void dbusSay(const QString& server,const QString& target,const QString& command); void dbusInfo(const QString& string); void dbusInsertMarkerLine(); void dbusRaw(const QString& server, const QString& command); void dbusMultiServerRaw(const QString& command); void connectTo(Konversation::ConnectionFlag flag, const QString& hostName, const QString& port = QString(), const QString& password = QString(), const QString& nick = QString(), const QString& channel = QString(), bool useSSL = false); public Q_SLOTS: void setAway(const QString &awaymessage); void setBack(); void sayToAll(const QString &message); void actionToAll(const QString &message); void raw(const QString& server,const QString& command); void say(const QString& server,const QString& target,const QString& command); void info(const QString& string); void debug(const QString& string); void error(const QString& string); void insertMarkerLine(); void connectToServer(const QString& address, int port, const QString& channel, const QString& password); QStringList listConnections(); QStringList listServers(); QStringList listConnectedServers(); QStringList listJoinedChannels(const QString& server); private Q_SLOTS: void changeAwayStatus(bool away); }; class IdentDBus : public QObject { Q_OBJECT Q_CLASSINFO("D-Bus Interface", "org.kde.konversation") public: - explicit IdentDBus(QObject *parent = 0); + explicit IdentDBus(QObject *parent = nullptr); public Q_SLOTS: void setrealName(const QString &identity, const QString& name); QString getrealName(const QString &identity); void setIdent(const QString &identity, const QString& ident); QString getIdent(const QString &identity); void setNickname(const QString &identity, int index,const QString& nick); QString getNickname(const QString &identity, int index); void setBot(const QString &identity, const QString& bot); QString getBot(const QString &identity); void setPassword(const QString &identity, const QString& password); QString getPassword(const QString &identity); void setNicknameList(const QString &identity, const QStringList& newList); QStringList getNicknameList(const QString &identity); void setQuitReason(const QString &identity, const QString& reason); QString getQuitReason(const QString &identity); void setPartReason(const QString &identity, const QString& reason); QString getPartReason(const QString &identity); void setKickReason(const QString &identity, const QString& reason); QString getKickReason(const QString &identity); void setRunAwayCommands(const QString &identity, bool run); bool getRunAwayCommands(const QString &identity); void setAwayCommand(const QString &identity, const QString& command); QString getAwayCommand(const QString &identity); void setReturnCommand(const QString &identity, const QString& command); QString getReturnCommand(const QString &identity); void setAwayNickname(const QString& identity, const QString& nickname); QString getAwayNickname(const QString& identity); void setAwayMessage(const QString& identity, const QString& message); QString getAwayMessage(const QString& identity); QStringList listIdentities(); }; } #endif diff --git a/src/dcc/dcccommon.h b/src/dcc/dcccommon.h index ef82dc8e..6ec73559 100644 --- a/src/dcc/dcccommon.h +++ b/src/dcc/dcccommon.h @@ -1,50 +1,50 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ /* Copyright (C) 2007 Shintaro Matsuoka Copyright (C) 2009 Bernd Buschinski */ #ifndef DCCCOMMON_H #define DCCCOMMON_H #include class QObject; class QTcpServer; class Server; namespace Konversation { namespace DCC { class DccCommon { public: // converts an IP text like "127.0.0.1" to a number. static QString textIpToNumericalIp( const QString& ipString ); // converts a numerical IP text like "12345678" to a normal IP text. static QString numericalIpToTextIp( const QString& numericalIp ); // returns the self IP following the setting. static QString getOwnIp( Server* server = 0 ); static QString ipv6FallbackAddress(const QString& address); // creates an instance of QTcpServer following the DCC settings - static QTcpServer* createServerSocketAndListen( QObject* parent = 0, QString* failedReason = 0, int minPort = 0, int maxPort = 0 ); + static QTcpServer* createServerSocketAndListen( QObject* parent = nullptr, QString* failedReason = 0, int minPort = 0, int maxPort = 0 ); private: DccCommon(); }; } } #endif // DCCCOMMON_H diff --git a/src/dcc/transferdetailedinfopanel.h b/src/dcc/transferdetailedinfopanel.h index 0e7391de..00e8319d 100644 --- a/src/dcc/transferdetailedinfopanel.h +++ b/src/dcc/transferdetailedinfopanel.h @@ -1,58 +1,58 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ /* Copyright (C) 2007 Shintaro Matsuoka Copyright (C) 2009 Bernd Buschinski */ #ifndef TRANSFERDETAILEDINFOPANEL_H #define TRANSFERDETAILEDINFOPANEL_H #include "ui_transferdetailedinfopanelui.h" #include "ui_transferdetailedtimeinfopanelui.h" #include class QTimer; namespace Konversation { namespace DCC { class Transfer; class TransferDetailedInfoPanel : public QTabWidget { Q_OBJECT public: - explicit TransferDetailedInfoPanel(QWidget *parent = 0); + explicit TransferDetailedInfoPanel(QWidget *parent = nullptr); virtual ~TransferDetailedInfoPanel(); void setTransfer(Transfer *item); Transfer *transfer() const; void clear(); private Q_SLOTS: void updateView(); // Only updates labels that can change during transfer void updateChangeableView(); void slotTransferStatusChanged(Konversation::DCC::Transfer *transfer, int newStatus, int oldStatus); void slotLocationChanged(const QString& url); private: Ui::DccTransferDetailedInfoPanelUI m_locationInfo; Ui::DccTransferDetailedTimeInfoPanelUI m_timeInfo; Transfer *m_transfer; QTimer *m_autoViewUpdateTimer; }; } } #endif // TRANSFERDETAILEDINFOPANEL_H diff --git a/src/dcc/transferlistmodel.h b/src/dcc/transferlistmodel.h index c6216da3..1275419b 100644 --- a/src/dcc/transferlistmodel.h +++ b/src/dcc/transferlistmodel.h @@ -1,177 +1,177 @@ /* This class represents a DCC transferlist model. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ /* Copyright (C) 2009,2010 Bernd Buschinski */ #ifndef TRANSFERLISTMODEL_H #define TRANSFERLISTMODEL_H #include #include #include #include #include #include #include "transfer.h" class KCategoryDrawer; namespace Konversation { namespace DCC { class TransferHeaderData { public: enum HeaderType { TypeIcon = 0, OfferDate = 1, Status = 2, FileName = 3, PartnerNick = 4, Progress = 5, Position = 6, TimeLeft = 7, CurrentSpeed= 8, SenderAdress= 9, COUNT = 10 //last item }; static QString typeToName(int headertype); QString name; int type; }; class TransferItemData { public: // order+values are important, from the lowest to highest item enum ItemDisplayType { SendItem = QTreeWidgetItem::UserType + 1, SendCategory, SpaceRow, ReceiveItem, ReceiveCategory }; int displayType; Transfer *transfer; }; class TransferSizeDelegate : public QStyledItemDelegate { public: - explicit TransferSizeDelegate(KCategoryDrawer* categoryDrawer, QObject *parent = 0); + explicit TransferSizeDelegate(KCategoryDrawer* categoryDrawer, QObject *parent = nullptr); QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const Q_DECL_OVERRIDE; void paint(QPainter *painter, const QStyleOptionViewItem & option, const QModelIndex &index) const Q_DECL_OVERRIDE; private: KCategoryDrawer* m_categoryDrawer; }; class TransferProgressBarDelegate : public QStyledItemDelegate { public: - explicit TransferProgressBarDelegate(QObject *parent = 0); + explicit TransferProgressBarDelegate(QObject *parent = nullptr); void paint(QPainter *painter, const QStyleOptionViewItem & option, const QModelIndex &index) const Q_DECL_OVERRIDE; }; class TransferListProxyModel : public QSortFilterProxyModel { public: - explicit TransferListProxyModel(QObject *parent = 0); + explicit TransferListProxyModel(QObject *parent = nullptr); bool lessThan(const QModelIndex &left, const QModelIndex &right) const Q_DECL_OVERRIDE; }; class TransferListModel : public QAbstractListModel { Q_OBJECT public: enum Role { TransferDisplayType = Qt::UserRole + 1, HeaderType, TransferType, TransferStatus, TransferPointer, TransferProgress, TransferOfferDate //to get the QDateTime, not just a time string }; explicit TransferListModel(QObject *parent); void append(const TransferItemData &item); void appendHeader(TransferHeaderData data); int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; // counts the rows regardless of what type they are int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; // itemCount only counts the transferitems, not the CategoryItems int itemCount(TransferItemData::ItemDisplayType displaytype) const; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; bool removeRow (int row, const QModelIndex &parent = QModelIndex()); bool removeRows (int row, int count, const QModelIndex &parent = QModelIndex()) Q_DECL_OVERRIDE; Qt::ItemFlags flags (const QModelIndex &index) const Q_DECL_OVERRIDE; static QString getStatusText(Transfer::Status status, Transfer::Type type); static QString getSpeedPrettyText(transferspeed_t speed); static QString getTimeLeftPrettyText(int timeleft); static QString secToHMS(long sec); Q_SIGNALS: //use our own signal that guarantees the data was removed from model //NOTE: rowsRemoved does not void rowsPermanentlyRemoved (int startrow, int endrow); public Q_SLOTS: void transferStatusChanged(Konversation::DCC::Transfer *transfer, int oldstatus, int newstatus); private: inline int columnToHeaderType(int column) const; inline QString displayTypeToString(int type) const; inline QString getPositionPrettyText(KIO::fileoffset_t position, KIO::filesize_t filesize) const; inline QString getSenderAddressPrettyText(Transfer *transfer) const; inline QPixmap getStatusIcon(Transfer::Status status) const; inline QPixmap getTypeIcon(Transfer::Type type) const; inline QString getStatusDescription(Transfer::Status status, Transfer::Type type, const QString& errorMessage = QString()) const; QList m_transferList; QList m_headerList; }; } } #endif //TRANSFERLISTMODEL_H diff --git a/src/dcc/transfermanager.h b/src/dcc/transfermanager.h index 6e3227bc..c789bc78 100644 --- a/src/dcc/transfermanager.h +++ b/src/dcc/transfermanager.h @@ -1,127 +1,127 @@ /* DccTransferManager controls DccTransfer instances. All DccTransferRecv/DccTransferSend instances are created and deleted by this class. Each DccTransfer instance is deleted immediately after its transfer done. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ /* Copyright (C) 2007 Shintaro Matsuoka Copyright (C) 2009 Michael Kreitzer Copyright (C) 2009 Bernd Buschinski */ #ifndef TRANSFERMANAGER_H #define TRANSFERMANAGER_H #include #include namespace Konversation { namespace UPnP { class UPnPMCastSocket; class UPnPRouter; } namespace DCC { class Transfer; class TransferRecv; class TransferSend; class Chat; class TransferManager : public QObject { Q_OBJECT public: - explicit TransferManager(QObject* parent = 0); + explicit TransferManager(QObject* parent = nullptr); ~TransferManager(); Q_SIGNALS: /* * The status of the item is DccTransfer::Configuring when this signal is emitted. */ void newTransferAdded(Konversation::DCC::Transfer* transfer); /* * The status of the item is DccTransfer::Queued when this signal is emitted. */ void newDccTransferQueued(Konversation::DCC::Transfer* transfer); void fileURLChanged(Konversation::DCC::TransferRecv* transfer); public: TransferRecv* newDownload(); TransferSend* newUpload(); Chat* newChat(); TransferSend* rejectSend(int connectionId, const QString& partnerNick, const QString& fileName); Chat* rejectChat(int connectionId, const QString& partnerNick); /** * @return a DccTransferRecv item if applicable one found, otherwise 0. */ TransferRecv* resumeDownload(int connectionId, const QString& partnerNick, const QString& fileName, quint16 ownPort, quint64 position); /** * @return a DccTransferSend item if applicable one found, otherwise 0. */ TransferSend* resumeUpload(int connectionId, const QString& partnerNick, const QString& fileName, quint16 ownPort, quint64 position); TransferSend* startReverseSending(int connectionId, const QString& partnerNick, const QString& fileName, const QString& partnerHost, quint16 partnerPort, quint64 fileSize, const QString& token); Chat* startReverseChat(int connectionId, const QString& partnerNick, const QString& partnerHost, quint16 partnerPort, const QString& token); void acceptDccGet(int connectionId, const QString& partnerNick, const QString& fileName); bool isLocalFileInWritingProcess(const QUrl &localUrl) const; int generateReverseTokenNumber(); bool hasActiveTransfers(); bool hasActiveChats(); UPnP::UPnPRouter *getUPnPRouter(); void startupUPnP(void); void shutdownUPnP(void); private: /* * initTransfer() does the common jobs for newDownload() and newUpload() */ void initTransfer(Transfer* transfer); private Q_SLOTS: void slotTransferStatusChanged(Konversation::DCC::Transfer* item, int newStatus, int oldStatus); void removeSendItem(Konversation::DCC::Transfer* item); void removeRecvItem(Konversation::DCC::Transfer* item); void removeChatItem(Konversation::DCC::Chat* chat); void slotSettingsChanged(); void upnpRouterDiscovered(Konversation::UPnP::UPnPRouter *router); private: QList< TransferSend* > m_sendItems; QList< TransferRecv* > m_recvItems; QList< Chat* > m_chatItems; UPnP::UPnPMCastSocket *m_upnpSocket; UPnP::UPnPRouter *m_upnpRouter; int m_nextReverseTokenNumber; QUrl m_defaultIncomingFolder; // store here to know if this settings is changed }; } } #endif // TRANSFERMANAGER_H diff --git a/src/dcc/transferview.h b/src/dcc/transferview.h index 84ecd71e..37d0ee42 100644 --- a/src/dcc/transferview.h +++ b/src/dcc/transferview.h @@ -1,129 +1,129 @@ /* This class represents a DCC transferview for transfermodel. */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ /* Copyright (C) 2009,2010 Bernd Buschinski */ #ifndef TRANSFERVIEW_H #define TRANSFERVIEW_H #include #include "transferlistmodel.h" class QKeyEvent; class KCategoryDrawer; namespace Konversation { namespace DCC { class Transfer; class TransferListProxyModel; class TransferView : public QTreeView { Q_OBJECT public: - explicit TransferView(QWidget *parent = 0); + explicit TransferView(QWidget *parent = nullptr); virtual ~TransferView(); void addTransfer(Transfer *transfer); int itemCount() const; int rowCount() const; QList rowIndexes(int column = 0) const; QList selectedIndexes() const Q_DECL_OVERRIDE; QList selectedRows(int column = 0) const; QModelIndex index(int row, int column) const; QModelIndex index(Transfer *transfer) const; void selectAllCompleted(); void selectRow(int row); void selectRows(QList rows); Q_SIGNALS: void runSelectedTransfers(); public Q_SLOTS: void clear(); void headerCustomContextMenuRequested(const QPoint &pos); void toggleFilenameColumn(bool visible); void togglePartnerNickColumn(bool visible); void toggleProgressColumn(bool visible); void toggleStartedAtColumn(bool visible); void togglePositionColumn(bool visible); void toggleCurrentSpeedColumn(bool visible); void toggleSenderAdressColumn(bool visible); void toggleStatusColumn(bool visible); void toggleTimeLeftColumn (bool visible); void toogleTypeIconColumn(bool visible); void update(); void updateModel(); void transferStatusChanged(Konversation::DCC::Transfer *transfer, int newStatus, int oldStatus); protected: void drawRow(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE; void scrollContentsBy(int dx, int dy) Q_DECL_OVERRIDE; void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE; protected Q_SLOTS: void rowsAboutToBeRemovedFromModel(const QModelIndex &parent, int start, int end); void rowsRemovedFromModel(int start, int end); private: //extra enum needed because ItemDisplayType are not or-able enum CategoryState { None = 0, SendCategory = 1, ReceiveCategory = 1 << 1, SpacerRow = 1 << 2 }; int m_categorieFlags; inline int headerTypeToColumn(int headerType) const; inline void setProgressBarDeletegate(); inline int removeItems(TransferItemData::ItemDisplayType displaytype); inline void saveColumns(); inline void restoreColumns(); inline void addItem(Transfer *transfer, TransferItemData::ItemDisplayType type); KCategoryDrawer *m_categoryDrawer; TransferListModel *m_dccModel; TransferListProxyModel *m_proxyModel; QTimer *m_updateTimer; int m_activeTransfers; int m_itemCategoryToRemove; }; } } #endif //TRANSFERVIEW_H diff --git a/src/identitydialog.h b/src/identitydialog.h index e6c21ac4..61d0fec5 100644 --- a/src/identitydialog.h +++ b/src/identitydialog.h @@ -1,68 +1,68 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ /* copyright: (C) 2004, 2009 by Peter Simonsson email: peter.simonsson@gmail.com Copyright (C) 2012 Eike Hein */ #ifndef KONVERSATIONIDENTITYDIALOG_H #define KONVERSATIONIDENTITYDIALOG_H #include "identity.h" #include "ui_identitydialog.h" #include class KEditListWidget; class KMessageWidget; namespace Konversation { class IdentityDialog : public QDialog, private Ui::IdentityDialog { Q_OBJECT public: - explicit IdentityDialog(QWidget *parent = 0); + explicit IdentityDialog(QWidget *parent = nullptr); ~IdentityDialog() {} void setCurrentIdentity(int index); IdentityPtr setCurrentIdentity(const IdentityPtr &identity); IdentityPtr currentIdentity() const; public Q_SLOTS: void accept() Q_DECL_OVERRIDE; Q_SIGNALS: void identitiesChanged(); protected: bool checkCurrentIdentity(); protected Q_SLOTS: void updateIdentity(int index); void refreshCurrentIdentity(); void newIdentity(); void renameIdentity(); void deleteIdentity(); void copyIdentity(); void authTypeChanged(int index); private: IdentityList m_identityList; IdentityPtr m_currentIdentity; KEditListWidget* m_nicknameLBox; KMessageWidget* m_additionalAuthInfo; }; } #endif diff --git a/src/irc/channellistpanel.h b/src/irc/channellistpanel.h index 7639fbfc..ffeee52a 100644 --- a/src/irc/channellistpanel.h +++ b/src/irc/channellistpanel.h @@ -1,154 +1,154 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ /* Shows the list of channels Copyright (C) 2003 Dario Abatianni Copyright (C) 2009 Travis McHenry */ #ifndef CHANNELLISTPANEL_H #define CHANNELLISTPANEL_H #include "chatwindow.h" #include "ui_channellistpanelui.h" #include #include class KToolBar; struct ChannelItem { QString name; int users; QString topic; }; class ChannelListProxyModel : public QSortFilterProxyModel { Q_OBJECT public: - explicit ChannelListProxyModel(QObject *parent = 0); + explicit ChannelListProxyModel(QObject *parent = nullptr); int filterMinimumUsers() { return m_minUsers; } int filterMaximumUsers() { return m_maxUsers; } bool filterTopic() { return m_filterTopic; } bool filterChannel() { return m_filterChannel; } public Q_SLOTS: void setFilterMinimumUsers(int users); void setFilterMaximumUsers(int users); void setFilterTopic(bool filter); void setFilterChannel(bool filter); protected: bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const Q_DECL_OVERRIDE; private: bool usersInRange(int users) const; int m_minUsers; int m_maxUsers; bool m_filterTopic; bool m_filterChannel; }; class ChannelListModel : public QAbstractListModel { Q_OBJECT public: explicit ChannelListModel(QObject* parent); void append(const ChannelItem& item); int columnCount(const QModelIndex& parent = QModelIndex()) const Q_DECL_OVERRIDE; int rowCount(const QModelIndex& parent = QModelIndex()) const Q_DECL_OVERRIDE; QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; QVariant headerData (int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; private: QList m_channelList; }; class ChannelListPanel : public ChatWindow, private Ui::ChannelListWidgetUI { Q_OBJECT public: explicit ChannelListPanel(QWidget* parent); ~ChannelListPanel(); using ChatWindow::closeYourself; virtual bool closeYourself(); void emitUpdateInfo() Q_DECL_OVERRIDE; bool isInsertSupported() Q_DECL_OVERRIDE { return true; } QString getTextInLine() Q_DECL_OVERRIDE { return m_filterLine->text(); } Q_SIGNALS: void refreshChannelList(); void joinChannel(const QString& channelName); public Q_SLOTS: void refreshList(); void addToChannelList(const QString& channel,int users,const QString& topic); void endOfChannelList(); void applyFilterClicked(); void appendInputText(const QString&, bool fromCursor) Q_DECL_OVERRIDE; void setFilter(const QString& filter); protected Q_SLOTS: void saveList(); void filterChanged(); void updateFilter(); void updateUsersChannels(); void currentChanged(const QModelIndex ¤t,const QModelIndex &previous); void setProgress(); void joinChannelClicked(); void contextMenu(const QPoint& pos); void openURL(); //Used to disable functions when not connected void serverOnline(bool online) Q_DECL_OVERRIDE; protected: /** Called from ChatWindow adjustFocus */ void childAdjustFocus()Q_DECL_OVERRIDE {} void countUsers(const QModelIndex& index, int pos); int m_numChannels; int m_numUsers; int m_visibleChannels; int m_visibleUsers; bool m_online; bool m_firstRun; bool m_regexState; QTimer* m_progressTimer; QTimer* m_filterTimer; QTimer* m_tempTimer; ChannelListModel* m_channelListModel; ChannelListProxyModel* m_proxyModel; KToolBar *m_toolBar; QAction *m_saveList; QAction *m_refreshList; QAction *m_joinChannel; }; #endif diff --git a/src/irc/joinchanneldialog.h b/src/irc/joinchanneldialog.h index 3d787f94..731acab9 100644 --- a/src/irc/joinchanneldialog.h +++ b/src/irc/joinchanneldialog.h @@ -1,52 +1,52 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ /* Copyright (C) 2004 Peter Simonsson */ #ifndef KONVERSATIONJOINCHANNELDIALOG_H #define KONVERSATIONJOINCHANNELDIALOG_H #include #include "ui_joinchannelui.h" class Server; class QPushButton; namespace Konversation { class JoinChannelUI; class JoinChannelDialog : public QDialog { Q_OBJECT public: - explicit JoinChannelDialog(Server* server, QWidget *parent = 0); + explicit JoinChannelDialog(Server* server, QWidget *parent = nullptr); ~JoinChannelDialog(); int connectionId() const; QString channel() const; QString password() const; protected Q_SLOTS: virtual void slotOk(); void slotNicknameChanged(const QString& nickname); void slotConnectionListChanged(); void slotSelectedConnectionChanged(int); void slotChannelChanged(const QString& text); void slotChannelHistoryCleared(); private: Ui::JoinChannelUI m_ui; QPushButton *mOkButton; }; } #endif diff --git a/src/irc/servergroupdialog.h b/src/irc/servergroupdialog.h index c88fc3e1..b19b17f2 100644 --- a/src/irc/servergroupdialog.h +++ b/src/irc/servergroupdialog.h @@ -1,122 +1,122 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ /* copyright: (C) 2004 by Peter Simonsson email: psn@linux.se */ #ifndef KONVERSATIONSERVERGROUPDIALOG_H #define KONVERSATIONSERVERGROUPDIALOG_H #include "servergroupsettings.h" #include class QPushButton; namespace Ui { class ServerGroupDialogUI; class ChannelDialogUI; class ServerDialogUI; } namespace Konversation { class ServerGroupDialog : public QDialog { Q_OBJECT public: explicit ServerGroupDialog(const QString& title, QWidget* parent = nullptr); ~ServerGroupDialog(); void setServerGroupSettings(ServerGroupSettingsPtr settings); ServerGroupSettingsPtr serverGroupSettings(); ServerSettings editedServer(); int execAndEditServer(const ServerSettings &server); bool identitiesNeedsUpdate() const { return m_identitiesNeedsUpdate; } public Q_SLOTS: void accept() Q_DECL_OVERRIDE; protected Q_SLOTS: void addServer(); void editServer(); void editServer(const ServerSettings &server); void deleteServer(); void updateServerArrows(); void moveServerUp(); void moveServerDown(); void addChannel(); void editChannel(); void deleteChannel(); void updateChannelArrows(); void moveChannelUp(); void moveChannelDown(); void editIdentity(); private: Ui::ServerGroupDialogUI* m_mainWidget; bool m_expanded; bool m_enableNotifications; bool m_configBacked; int m_id; int m_sortIndex; bool m_identitiesNeedsUpdate; bool m_editedServer; int m_editedServerIndex; ServerList m_serverList; ChannelList m_channelList; ChannelList m_channelHistory; }; class ServerDialog : public QDialog { Q_OBJECT public: - explicit ServerDialog(const QString& title, QWidget *parent = 0); + explicit ServerDialog(const QString& title, QWidget *parent = nullptr); ~ServerDialog(); void setServerSettings(const ServerSettings& server); ServerSettings serverSettings(); protected Q_SLOTS: void slotOk(); void slotServerNameChanged( const QString& ); private: Ui::ServerDialogUI* m_mainWidget; QPushButton *m_okButton; }; class ChannelSettings; class ChannelDialog : public QDialog { Q_OBJECT public: - explicit ChannelDialog(const QString& title, QWidget *parent = 0); + explicit ChannelDialog(const QString& title, QWidget *parent = nullptr); ~ChannelDialog(); void setChannelSettings(const ChannelSettings& channel); ChannelSettings channelSettings(); protected Q_SLOTS: void slotOk(); void slotServerNameChanged( const QString& ); private: Ui::ChannelDialogUI* m_mainWidget; QPushButton *m_okButton; }; } #endif diff --git a/src/irc/serverlistdialog.h b/src/irc/serverlistdialog.h index 7437165a..75da62fb 100644 --- a/src/irc/serverlistdialog.h +++ b/src/irc/serverlistdialog.h @@ -1,95 +1,95 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ /* Copyright (C) 2004 Peter Simonsson Copyright (C) 2006-2008 Eike Hein */ #ifndef KONVERSATIONSERVERLISTDIALOG_H #define KONVERSATIONSERVERLISTDIALOG_H #include "common.h" #include "servergroupsettings.h" #include "serverlistview.h" #include "ui_serverlistdialogui.h" #include class ConnectionSettings; class QTreeWidgetItem; namespace Konversation { class ServerListItem : public QTreeWidgetItem { public: ServerListItem(QTreeWidget* tree, QStringList & strings); ServerListItem(QTreeWidgetItem* parent, QStringList & strings); bool operator<(const QTreeWidgetItem &other) const Q_DECL_OVERRIDE; enum DataRole { SortIndex = Qt::UserRole + 2 }; }; class ServerListDialog : public QDialog, private Ui::ServerListDialogUI { Q_OBJECT public: - explicit ServerListDialog(const QString& title, QWidget *parent = 0); + explicit ServerListDialog(const QString& title, QWidget *parent = nullptr); ~ServerListDialog(); enum DataRole { ServerGroupId = Qt::UserRole + 1, SortIndex = Qt::UserRole + 2, IsServer = Qt::UserRole + 3, ServerId = Qt::UserRole + 4 }; public Q_SLOTS: void updateServerList(); Q_SIGNALS: void connectTo(Konversation::ConnectionFlag flag, int serverGroupId); void connectTo(Konversation::ConnectionFlag flag, ConnectionSettings connectionSettings); void serverGroupsChanged(const Konversation::ServerGroupSettingsPtr serverGroup = Konversation::ServerGroupSettingsPtr()); protected Q_SLOTS: virtual void slotOk(); void slotAdd(); void slotEdit(); void slotDelete(); void slotSetGroupExpanded(QTreeWidgetItem* item); void slotSetGroupCollapsed(QTreeWidgetItem* item); void slotAboutToMove(); void slotMoved(); void updateButtons(); void setShowAtStartup(bool show); protected: QTreeWidgetItem* insertServerGroup(ServerGroupSettingsPtr serverGroup); void addServerGroup(ServerGroupSettingsPtr serverGroup); int m_lastSortColumn; Qt::SortOrder m_lastSortOrder; private: int selectedChildrenCount(QTreeWidgetItem* item); bool m_selectedItem; int m_selectedServerGroupId; ServerSettings m_selectedServer; QTreeWidgetItem* m_selectedItemPtr; }; } #endif diff --git a/src/irc/topichistorymodel.h b/src/irc/topichistorymodel.h index 9a4c9b07..87df2aab 100644 --- a/src/irc/topichistorymodel.h +++ b/src/irc/topichistorymodel.h @@ -1,91 +1,91 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or (at your option) version 3 or any later version accepted by the membership of KDE e.V. (or its successor appro- ved by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of version 3 of the license. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. */ /* Copyright (C) 2012 Eike Hein */ #ifndef TOPICHISTORYMODEL_H #define TOPICHISTORYMODEL_H #include #include #include "channel.h" #ifdef HAVE_QCA2 namespace Konversation { class Cipher; } #endif struct Topic { QString author; QString text; QDateTime timestamp; bool operator==(const Topic& other) const { return (author == other.author && text == other.text && timestamp == other.timestamp); } }; class TopicHistoryModel : public QAbstractListModel { Q_OBJECT public: - explicit TopicHistoryModel(QObject* parent = 0); + explicit TopicHistoryModel(QObject* parent = nullptr); ~TopicHistoryModel(); QString currentTopic(); void appendTopic(const QString& text, const QString& author = QString(), const QDateTime ×tamp = QDateTime::currentDateTime()); void setCurrentTopicMetadata(const QString& author, const QDateTime ×tamp = QDateTime::currentDateTime()); #ifdef HAVE_QCA2 void setCipher(Konversation::Cipher* cipher); void clearCipher(); #endif QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; int columnCount(const QModelIndex& parent = QModelIndex()) const Q_DECL_OVERRIDE; int rowCount(const QModelIndex& parent = QModelIndex()) const Q_DECL_OVERRIDE; static QString authorPlaceholder(); Q_SIGNALS: void currentTopicChanged(const QString& text); private: QList m_topicList; #ifdef HAVE_QCA2 Konversation::Cipher* m_cipher; #endif }; #endif diff --git a/src/notificationhandler.h b/src/notificationhandler.h index 183c9d18..9a5bf171 100644 --- a/src/notificationhandler.h +++ b/src/notificationhandler.h @@ -1,64 +1,64 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ /* copyright: (C) 2004 by Peter Simonsson email: psn@linux.se */ #ifndef KONVERSATIONNOTIFICATIONHANDLER_H #define KONVERSATIONNOTIFICATIONHANDLER_H #include class ChatWindow; class Application; class MainWindow; namespace Konversation { namespace DCC { class Transfer; } class NotificationHandler : public QObject { Q_OBJECT public: - explicit NotificationHandler(Application* parent = 0); + explicit NotificationHandler(Application* parent = nullptr); ~NotificationHandler(); public Q_SLOTS: void message(ChatWindow* chatWin, const QString& fromNick, const QString& message); void nick(ChatWindow* chatWin, const QString& fromNick, const QString& message); void join(ChatWindow* chatWin, const QString& nick); void part(ChatWindow* chatWin, const QString& nick); void quit(ChatWindow* chatWin, const QString& nick); void nickChange(ChatWindow* chatWin, const QString& oldNick, const QString& newNick); void dccIncoming(ChatWindow* chatWin, const QString& fromNick); void dccError(ChatWindow* chatWin, const QString& error); void dccTransferDone(ChatWindow* chatWin, const QString& file, Konversation::DCC::Transfer* transfer); void mode(ChatWindow* chatWin, const QString& nick, const QString& subject, const QString& change); void query(ChatWindow* chatWin, const QString& fromNick); void queryMessage(ChatWindow* chatWin, const QString& fromNick, const QString& message); void nickOnline(ChatWindow* chatWin, const QString& nick); void nickOffline(ChatWindow* chatWin, const QString& nick); void kick(ChatWindow* chatWin, const QString& channel,const QString& nick); void dccChat(ChatWindow* chatWin, const QString& nick); void highlight(ChatWindow* chatWin, const QString& fromNick, const QString& message); void connectionFailure(ChatWindow* chatWin, const QString& server); void channelJoin(ChatWindow* chatWin, const QString& channel); protected: void startTrayNotification(ChatWindow* chatWin); private: MainWindow* m_mainWindow; }; } #endif diff --git a/src/sound.h b/src/sound.h index a5d8eab6..b3406873 100644 --- a/src/sound.h +++ b/src/sound.h @@ -1,65 +1,65 @@ // Copyright 2009 Peter Simonsson // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License as // published by the Free Software Foundation; either version 2 of // the License or (at your option) version 3 or any later version // accepted by the membership of KDE e.V. (or its successor approved // by the membership of KDE e.V.), which shall act as a proxy // defined in Section 14 of version 3 of the license. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . #ifndef KONVERSATIONKONVERSATIONSOUND_H #define KONVERSATIONKONVERSATIONSOUND_H #include #include #include class QUrl; namespace Phonon { class AudioOutput; } namespace Konversation { /** Class that handles sounds */ class Sound : public QObject { Q_OBJECT public: - explicit Sound(QObject *parent = 0, const QString &name = QString()); + explicit Sound(QObject *parent = nullptr, const QString &name = QString()); ~Sound(); public Q_SLOTS: void play(const QUrl &url); protected Q_SLOTS: void tryPlayNext(Phonon::State newState, Phonon::State oldState); protected: void playSound(const QUrl &url); private: Phonon::MediaObject* m_mediaObject; Phonon::AudioOutput* m_audioOutput; QQueue m_playQueue; bool m_played; }; } #endif diff --git a/src/urlcatcher.h b/src/urlcatcher.h index 6db57ac6..e14d9530 100644 --- a/src/urlcatcher.h +++ b/src/urlcatcher.h @@ -1,105 +1,105 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or (at your option) version 3 or any later version accepted by the membership of KDE e.V. (or its successor appro- ved by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of version 3 of the license. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. */ /* Copyright (C) 2010 Eike Hein */ #ifndef URLCATCHER_H #define URLCATCHER_H #include #include #include "chatwindow.h" class QTreeView; class QMenu; class KToolBar; class UrlDateItem : public QStandardItem { public: explicit UrlDateItem(const QDateTime& dateTime); ~UrlDateItem(); QVariant data(int role) const Q_DECL_OVERRIDE; }; class UrlSortFilterProxyModel : public QSortFilterProxyModel { Q_OBJECT public: - explicit UrlSortFilterProxyModel(QObject* parent = 0); + explicit UrlSortFilterProxyModel(QObject* parent = nullptr); ~UrlSortFilterProxyModel(); Qt::ItemFlags flags(const QModelIndex& index) const Q_DECL_OVERRIDE; protected: bool lessThan(const QModelIndex& left, const QModelIndex& right) const Q_DECL_OVERRIDE; }; class UrlCatcher : public ChatWindow { Q_OBJECT public: explicit UrlCatcher(QWidget* parent); ~UrlCatcher(); protected: void childAdjustFocus() Q_DECL_OVERRIDE; bool event(QEvent* event) Q_DECL_OVERRIDE; private Q_SLOTS: void updateItemActionStates(); void updateListActionStates(); void openContextMenu(const QPoint& p); void openUrl(const QModelIndex& index); void openSelectedUrls(); void saveSelectedUrls(); void bookmarkSelectedUrls(); void copySelectedUrls(); void deleteSelectedUrls(); void saveUrlModel(); void clearUrlModel(); private: void setupActions(); void setupUrlTree(); KToolBar* m_toolBar; QMenu* m_contextMenu; QList m_itemActions; QList m_listActions; QTreeView* m_urlTree; }; #endif diff --git a/src/viewer/awaylabel.h b/src/viewer/awaylabel.h index 26a915fd..b2432c4b 100644 --- a/src/viewer/awaylabel.h +++ b/src/viewer/awaylabel.h @@ -1,35 +1,35 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ /* Copyright (C) 2004, 2009 Peter Simonsson Copyright (C) 2006-2008 Eike Hein */ #ifndef KONVERSATIONAWAYLABEL_H #define KONVERSATIONAWAYLABEL_H #include class AwayLabel : public QLabel { Q_OBJECT public: - explicit AwayLabel(QWidget *parent = 0); + explicit AwayLabel(QWidget *parent = nullptr); ~AwayLabel(); Q_SIGNALS: void awayMessageChanged(const QString&); void unaway(); protected Q_SLOTS: void changeAwayMessage(); }; #endif diff --git a/src/viewer/insertchardialog.h b/src/viewer/insertchardialog.h index 771bcb8c..6814d506 100644 --- a/src/viewer/insertchardialog.h +++ b/src/viewer/insertchardialog.h @@ -1,47 +1,47 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ /* copyright: (C) 2004 by Peter Simonsson email: psn@linux.se */ #ifndef KONVERSATIONINSERTCHARDIALOG_H #define KONVERSATIONINSERTCHARDIALOG_H #include class KCharSelect; class QChar; namespace Konversation { class InsertCharDialog : public QDialog { Q_OBJECT public: - explicit InsertCharDialog(const QString& font = QString(), QWidget *parent = 0); + explicit InsertCharDialog(const QString& font = QString(), QWidget *parent = nullptr); ~InsertCharDialog(); void setFont(const QFont &font); uint chr(); protected Q_SLOTS: void charSelected(); void slotAccepted(); Q_SIGNALS: void insertChar(uint); private: KCharSelect* m_charTable; }; } #endif diff --git a/src/viewer/osd.h b/src/viewer/osd.h index 1d540c99..0beb09a7 100644 --- a/src/viewer/osd.h +++ b/src/viewer/osd.h @@ -1,136 +1,136 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ /* Copyright (C) 2003 Christian Muehlhaeuser Copyright (C) 2008 Mark Kretschmann */ #ifndef OSD_H #define OSD_H #include #include #include //baseclass #define OSD_WINDOW_OPACITY 0.8 class OSDWidget : public QWidget { Q_OBJECT public: enum Alignment { Left, Middle, Center, Right }; - explicit OSDWidget(const QString &appName, QWidget *parent = 0, const char *name = "osd" ); + explicit OSDWidget(const QString &appName, QWidget *parent = nullptr, const char *name = "osd" ); virtual ~OSDWidget(); /** resets the colours to defaults */ void unsetColors(); void setShadow( bool shadow ) { m_drawShadow = shadow; } void setOffset( int x, int y ); public Q_SLOTS: /** calls setText() then show() */ void show( const QString &text, bool preemptive=false ); /** reimplemented, shows the OSD */ virtual void show(); /** * For the sake of simplicity, when these settings are * changed they do not take effect until the next time * the OSD is shown! * * To force an update call show(); */ void setDuration( int ms ); void setTextColor( const QColor &color ) { QPalette palette = this->palette(); palette.setColor( QPalette::Active, QPalette::WindowText, color ); setPalette(palette); } void setOffset( int y ) { m_y = y; } void setAlignment( Alignment alignment ) { m_alignment = alignment; } void setScreen( int screen ); void setText( const QString &text ) { m_currentText = text; } void setTranslucent( bool enabled ) { setWindowOpacity( enabled ? OSD_WINDOW_OPACITY : 1.0 ); } protected Q_SLOTS: void minReached(); protected: /** determine new size and position */ QRect determineMetrics( const int M ); // Reimplemented from QWidget void paintEvent( QPaintEvent* ) Q_DECL_OVERRIDE; void mousePressEvent( QMouseEvent* ) Q_DECL_OVERRIDE; void resizeEvent( QResizeEvent *e ) Q_DECL_OVERRIDE; bool event( QEvent* ) Q_DECL_OVERRIDE; /** distance from screen edge */ static const int MARGIN = 15; QString m_appName; uint m_m; QSize m_size; int m_duration; QTimer *m_timer; QTimer *m_timerMin; QStringList textBuffer; Alignment m_alignment; int m_screen; uint m_y; bool m_drawShadow; QString m_currentText; }; class OSDPreviewWidget : public OSDWidget { Q_OBJECT public: - explicit OSDPreviewWidget( const QString &appName, QWidget *parent = 0, const char *name = "osdpreview" ); + explicit OSDPreviewWidget( const QString &appName, QWidget *parent = nullptr, const char *name = "osdpreview" ); int screen() const { return m_screen; } int alignment() const { return m_alignment; } int y() const { return m_y; } public Q_SLOTS: void setTextColor( const QColor &color ) { OSDWidget::setTextColor( color ); doUpdate(); } void setFont( const QFont &font ) { OSDWidget::setFont( font ); doUpdate(); } void setScreen( int screen ) { OSDWidget::setScreen( screen ); doUpdate(); } void setUseCustomColors( const bool use, const QColor &fg ) { if( use ) OSDWidget::setTextColor( fg ); else unsetColors(); doUpdate(); } void setTranslucent( bool enabled ) { setWindowOpacity( enabled ? OSD_WINDOW_OPACITY : 1.0 ); doUpdate(); } private: inline void doUpdate() { if( !isHidden() ) show(); } Q_SIGNALS: void positionChanged(); protected: void mousePressEvent( QMouseEvent * ) Q_DECL_OVERRIDE; void mouseReleaseEvent( QMouseEvent * ) Q_DECL_OVERRIDE; void mouseMoveEvent( QMouseEvent * ) Q_DECL_OVERRIDE; private: bool m_dragging; QPoint m_dragOffset; }; #endif /* OSD_H*/ diff --git a/src/viewer/topichistoryview.h b/src/viewer/topichistoryview.h index e624a8da..f2ff2761 100644 --- a/src/viewer/topichistoryview.h +++ b/src/viewer/topichistoryview.h @@ -1,140 +1,140 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or (at your option) version 3 or any later version accepted by the membership of KDE e.V. (or its successor appro- ved by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of version 3 of the license. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. */ /* Copyright (C) 2005-2007 Peter Simonsson Copyright (C) 2012 Eike Hein */ #ifndef TOPICHISTORYVIEW_H #define TOPICHISTORYVIEW_H #include #include #include #include class Server; class TopicHistorySortfilterProxyModel : public KCategorizedSortFilterProxyModel { Q_OBJECT friend class TopicHistoryView; public: - explicit TopicHistorySortfilterProxyModel(QObject* parent = 0); + explicit TopicHistorySortfilterProxyModel(QObject* parent = nullptr); ~TopicHistorySortfilterProxyModel(); QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; void setSourceModel(QAbstractItemModel* model) Q_DECL_OVERRIDE; protected: bool filterAcceptsColumn ( int source_column, const QModelIndex & source_parent ) const Q_DECL_OVERRIDE; private Q_SLOTS: void sourceDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight); }; class TopicHistoryLabel : public KTextEdit { Q_OBJECT public: explicit TopicHistoryLabel(QWidget* parent = nullptr); ~TopicHistoryLabel(); public Q_SLOTS: void setTextSelectable(bool selectable); }; class TopicHistoryItemDelegate : public KWidgetItemDelegate { Q_OBJECT public: - explicit TopicHistoryItemDelegate(QAbstractItemView* itemView, QObject* parent = 0); + explicit TopicHistoryItemDelegate(QAbstractItemView* itemView, QObject* parent = nullptr); ~TopicHistoryItemDelegate(); void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const Q_DECL_OVERRIDE; QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const Q_DECL_OVERRIDE; bool eventFilter(QObject* watched, QEvent* event) Q_DECL_OVERRIDE; protected: QList createItemWidgets (const QModelIndex& index) const Q_DECL_OVERRIDE; void updateItemWidgets(const QList widgets, const QStyleOptionViewItem& option, const QPersistentModelIndex& index) const Q_DECL_OVERRIDE; private: TopicHistoryLabel* m_hiddenLabel; bool m_shownBefore; }; class TopicHistoryView : public KCategorizedView { Q_OBJECT public: explicit TopicHistoryView(QWidget* parent = nullptr); ~TopicHistoryView(); void setServer(Server* server) { m_server = server; } bool textSelectable() const; void setTextSelectable(bool selectable); void setModel(QAbstractItemModel* model) Q_DECL_OVERRIDE; Q_SIGNALS: void textSelectableChanged(bool selectable); protected: void resizeEvent(QResizeEvent* event) Q_DECL_OVERRIDE; void contextMenuEvent (QContextMenuEvent* event) Q_DECL_OVERRIDE; void updateGeometries() Q_DECL_OVERRIDE; private Q_SLOTS: void updateSelectedItemWidgets(); private: Server* m_server; TopicHistorySortfilterProxyModel* m_proxyModel; bool m_textSelectable; }; #endif struct Topic; diff --git a/src/viewer/topiclabel.h b/src/viewer/topiclabel.h index fa961000..1e01fbe6 100644 --- a/src/viewer/topiclabel.h +++ b/src/viewer/topiclabel.h @@ -1,83 +1,83 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ /* Copyright (C) 2004, 2009 Peter Simonsson Copyright (C) 2006-2008 Eike Hein */ #ifndef KONVERSATIONTOPICLABEL_H #define KONVERSATIONTOPICLABEL_H #include "irccontextmenus.h" #include class Server; namespace Konversation { class TopicLabel : public QLabel { Q_OBJECT public: - explicit TopicLabel(QWidget *parent = 0, const char *name = 0); + explicit TopicLabel(QWidget *parent = nullptr, const char *name = 0); ~TopicLabel(); QSize minimumSizeHint() const Q_DECL_OVERRIDE; QSize sizeHint() const Q_DECL_OVERRIDE; void setServer(Server* server); void setChannelName(const QString& channel); void setContextMenuOptions(IrcContextMenus::MenuOptions options, bool on); public Q_SLOTS: virtual void openLink(const QString& link); void setText(const QString& text); Q_SIGNALS: void setStatusBarTempText(const QString&); void clearStatusBarTempText(); protected: void updateSqueezedText(); QString rPixelSqueeze(const QString& text, int maxPixels); int textWidth(const QString& text); void leaveEvent (QEvent*) Q_DECL_OVERRIDE; void contextMenuEvent(QContextMenuEvent* ev) Q_DECL_OVERRIDE; void resizeEvent(QResizeEvent*) Q_DECL_OVERRIDE; void mouseReleaseEvent(QMouseEvent* ev) Q_DECL_OVERRIDE; void mousePressEvent(QMouseEvent* ev) Q_DECL_OVERRIDE; void mouseMoveEvent(QMouseEvent* ev) Q_DECL_OVERRIDE; protected Q_SLOTS: void highlightedSlot(const QString&); private: void resetLinkHighlightState(); inline QString tagUrls(const QString& text, const QString& sender); Server* m_server; QString m_channelName; QString m_fullText; QString m_lastStatusText; IrcContextMenus::MenuOptions m_contextMenuOptions; QString m_currentChannel; bool m_isOnChannel; QString m_currentUrl; QString m_dragUrl; bool m_mousePressedOnUrl; QPoint m_mousePressPosition; }; } #endif diff --git a/src/viewer/viewcontainer.h b/src/viewer/viewcontainer.h index 0665719f..53e4fe8d 100644 --- a/src/viewer/viewcontainer.h +++ b/src/viewer/viewcontainer.h @@ -1,309 +1,309 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. */ /* Copyright (C) 2006-2008 Eike Hein */ #ifndef VIEWCONTAINER_H #define VIEWCONTAINER_H #include "mainwindow.h" #include "common.h" #include "server.h" #include #include #include class QSplitter; class KActionCollection; class MainWindow; class ViewTree; class ChatWindow; class Server; class Images; class UrlCatcher; class NicksOnline; class QueueTuner; class ViewSpringLoader; namespace Konversation { class InsertCharDialog; class ServerGroupSettings; namespace DCC { class Chat; } } class ViewMimeData : public QMimeData { public: explicit ViewMimeData(ChatWindow *view); ~ViewMimeData(); ChatWindow* view() const; private: ChatWindow *m_view; }; class TabWidget : public QTabWidget { Q_OBJECT public: explicit TabWidget(QWidget* parent = nullptr); ~TabWidget(); Q_SIGNALS: void contextMenu(QWidget* widget, const QPoint& pos); void tabBarMiddleClicked(int index); protected: void contextMenuEvent(QContextMenuEvent* event) Q_DECL_OVERRIDE; void mouseReleaseEvent(QMouseEvent* event) Q_DECL_OVERRIDE; }; class ViewContainer : public QAbstractItemModel { Q_OBJECT public: enum DataRoles { ColorRole = Qt::UserRole + 1, DisabledRole, HighlightRole }; explicit ViewContainer(MainWindow* window); ~ViewContainer(); QSplitter* getWidget() { return m_viewTreeSplitter; } MainWindow* getWindow() { return m_window; } KActionCollection* actionCollection() { return m_window->actionCollection(); } QPointer getFrontView() { return m_frontView; } Server* getFrontServer() { return m_frontServer; } void prepareShutdown(); int rowCount(const QModelIndex & parent = QModelIndex()) const Q_DECL_OVERRIDE; int columnCount(const QModelIndex& parent = QModelIndex()) const Q_DECL_OVERRIDE; QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const Q_DECL_OVERRIDE; QModelIndex indexForView(ChatWindow* view) const; QModelIndex parent(const QModelIndex& index) const Q_DECL_OVERRIDE; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; Qt::DropActions supportedDragActions() const Q_DECL_OVERRIDE; Qt::DropActions supportedDropActions() const Q_DECL_OVERRIDE; Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE; QStringList mimeTypes() const Q_DECL_OVERRIDE; QMimeData* mimeData(const QModelIndexList &indexes) const Q_DECL_OVERRIDE; bool canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const Q_DECL_OVERRIDE; bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) Q_DECL_OVERRIDE; bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) Q_DECL_OVERRIDE; QString currentViewTitle(); QString currentViewURL(bool passNetwork = true); void appendToFrontmost(const QString& type,const QString& message,ChatWindow* serverView, const QHash &messageTags = QHash(), bool parseURL = true); void showQueueTuner(bool); int getViewIndex(QWidget* widget); ChatWindow* getViewAt(int index); QList > getChannelsURI(); public Q_SLOTS: void updateAppearance(); void saveSplitterSizes(); void setViewTreeShown(bool show = false); void updateViews(const Konversation::ServerGroupSettingsPtr &serverGroup = Konversation::ServerGroupSettingsPtr()); void setViewNotification(ChatWindow* widget, const Konversation::TabNotifyType& type); void unsetViewNotification(ChatWindow* view); void toggleViewNotifications(); void toggleAutoJoin(); void toggleConnectOnStartup(); void showView(ChatWindow* view); void goToView(int page); void showNextView(); void showPreviousView(); void showNextActiveView(); void showLastFocusedView(); bool canMoveViewLeft() const; bool canMoveViewRight() const; void moveViewLeft(); void moveViewRight(); void closeView(int view); void closeView(ChatWindow* view); void closeViewMiddleClick(int view); void closeCurrentView(); void renameKonsole(); void cleanupAfterClose(ChatWindow* view); void changeViewCharset(int index); void updateViewEncoding(ChatWindow* view); void showViewContextMenu(QWidget* tab, const QPoint& pos); void clearView(); void clearAllViews(); void findText(); void findNextText(); void findPrevText(); void insertCharacter(); void insertChar(uint chr); void insertIRCColor(); void doAutoReplace(); void focusInputBox(); void clearViewLines(); void insertRememberLine(); void cancelRememberLine(); void insertMarkerLine(); void insertRememberLines(Server* server); void openLogFile(); void openLogFile(const QString& caption, const QString& file); void addKonsolePanel(); void zoomIn(); void zoomOut(); void resetFont(); void addUrlCatcher(); void closeUrlCatcher(); void toggleDccPanel(); void addDccPanel(); void closeDccPanel(); void deleteDccPanel(); ChatWindow* getDccPanel(); void addDccChat(Konversation::DCC::Chat* myNick); StatusPanel* addStatusView(Server* server); RawLog* addRawLog(Server* server); void disconnectFrontServer(); void reconnectFrontServer(); void showJoinChannelDialog(); void connectionStateChanged(Server* server, Konversation::ConnectionState state); void channelJoined(Channel* channel); Channel* addChannel(Server* server, const QString& name); void rejoinChannel(); void openChannelSettings(); void toggleChannelNicklists(); Query* addQuery(Server* server,const NickInfoPtr & name, bool weinitiated=true); void updateQueryChrome(ChatWindow* view, const QString& name); void closeQueries(); ChannelListPanel* addChannelListPanel(Server* server); - void openChannelList(Server* server = 0, const QString& filter = QString(), bool getList = false); + void openChannelList(Server* server = nullptr, const QString& filter = QString(), bool getList = false); void openNicksOnlinePanel(); void closeNicksOnlinePanel(); Q_SIGNALS: void viewChanged(const QModelIndex& idx); void setWindowCaption(const QString& caption); void updateChannelAppearance(); void contextMenuClosed(); void resetStatusBar(); void setStatusBarTempText(const QString& text); void clearStatusBarTempText(); void setStatusBarInfoLabel(const QString& text); void clearStatusBarInfoLabel(); void setStatusBarLagLabelShown(bool shown); void updateStatusBarLagLabel(Server* server, int msec); void resetStatusBarLagLabel(Server* server); void setStatusBarLagLabelTooLongLag(Server* server, int msec); void updateStatusBarSSLLabel(Server* server); void removeStatusBarSSLLabel(); void autoJoinToggled(const Konversation::ServerGroupSettingsPtr); void autoConnectOnStartupToggled(const Konversation::ServerGroupSettingsPtr); void frontServerChanging(Server*); private Q_SLOTS: void setupIrcContextMenus(); void viewSwitched(int newIndex); void onViewTreeDestroyed(QObject *object); private: void setupTabWidget(); void setupViewTree(); void removeViewTree(); void updateTabWidgetAppearance(); void addView(ChatWindow* view, const QString& label, bool weinitiated=true); int insertIndex(ChatWindow* view); void unclutterTabs(); void updateViewActions(int index); void updateFrontView(); void setFrontServer(Server *); void initializeSplitterSizes(); bool m_saveSplitterSizesLock; MainWindow* m_window; QSplitter* m_viewTreeSplitter; TabWidget* m_tabWidget; ViewTree* m_viewTree; QWidget* m_vbox; QueueTuner* m_queueTuner; Images* images; QPointer m_frontServer; QPointer m_contextServer; QPointer m_frontView; QPointer m_searchView; QPointer m_currentView; QPointer m_lastFocusedView; UrlCatcher* m_urlCatcherPanel; NicksOnline* m_nicksOnlinePanel; ChatWindow* m_dccPanel; bool m_dccPanelOpen; Konversation::InsertCharDialog* m_insertCharDialog; int m_popupViewIndex; int m_queryViewCount; QList m_activeViewOrderList; ViewSpringLoader* m_viewSpringLoader; }; #endif