* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef INPUTWIDGET_H
-#define INPUTWIDGET_H
+#pragma once
-#include "ui_inputwidget.h"
+#include <QHash>
+#include <QIcon>
+#include <QMap>
+#include <QTextCharFormat>
#include "abstractitemview.h"
+#include "action.h"
#include "buffermodel.h"
#include "bufferinfo.h"
#include "identity.h"
#include "network.h"
-#include <action.h>
+
+#include "ui_inputwidget.h"
class MultiLineEdit;
Q_OBJECT
public:
- InputWidget(QWidget *parent = 0);
- virtual ~InputWidget();
+ InputWidget(QWidget *parent = nullptr);
const Network *currentNetwork() const;
void clearFormat();
protected:
- virtual bool eventFilter(QObject *watched, QEvent *event);
+ bool eventFilter(QObject *watched, QEvent *event) override;
protected slots:
- virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous);
- virtual void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end);
- virtual void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
+ void currentChanged(const QModelIndex ¤t, const QModelIndex &previous) override;
+ void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end) override;
+ void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) override;
private slots:
void setCustomFont(const QVariant &font);
void setUseCustomFont(const QVariant &);
- void setEnableSpellCheck(const QVariant &);
void setEnableEmacsMode(const QVariant &);
void setShowNickSelector(const QVariant &);
void setShowStyleButtons(const QVariant &);
struct HistoryState {
QStringList history;
QHash<int, QString> tempHistory;
- qint32 idx;
+ qint32 idx{0};
QString inputLine;
- inline HistoryState() : idx(0) {};
};
QMap<BufferId, HistoryState> historyMap;
Q_OBJECT
public:
- MouseWheelFilter(QObject *parent = 0);
- virtual bool eventFilter(QObject *obj, QEvent *event);
+ MouseWheelFilter(QObject *parent = nullptr);
+ bool eventFilter(QObject *obj, QEvent *event) override;
};
-
-
-#endif // INPUTWIDGET_H