The complete source code of IdealIRC
http://www.idealirc.org/
76 lines
2.1 KiB
76 lines
2.1 KiB
/*
|
|
* IdealIRC - Internet Relay Chat client
|
|
* Copyright (C) 2019 Tom-Andre Barstad
|
|
*
|
|
* 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.
|
|
*
|
|
* 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, write to the Free Software Foundation, Inc.,
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
*/
|
|
|
|
#ifndef IWINCHANNEL_H
|
|
#define IWINCHANNEL_H
|
|
|
|
#include "IWin.h"
|
|
#include "NicklistController.h"
|
|
#include "Widgets/ILineEdit.h"
|
|
#include "Widgets/IListWidget.h"
|
|
#include "Script/SymbolScope.h"
|
|
#include <QSplitter>
|
|
#include <QVBoxLayout>
|
|
#include <QListWidget>
|
|
#include <QTableView>
|
|
#include <QCloseEvent>
|
|
#include <memory>
|
|
|
|
class IWinStatus;
|
|
|
|
class IWinChannel : public IWin
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
IWinChannel(IWinStatus* statusParent, const QString& channelName);
|
|
|
|
bool print(const PrintType ptype, const QString& text) override;
|
|
void refreshWindowTitle() override;
|
|
void resetNicklist();
|
|
|
|
private:
|
|
void inputEnter();
|
|
void listboxDoubleclick(QListWidgetItem* item);
|
|
bool isUserModePrefix(QChar c); //! Returns true if the passed character is a prefix like @ + etc
|
|
|
|
void closeEvent(QCloseEvent* evt) override;
|
|
|
|
QSplitter* splitter;
|
|
QVBoxLayout* v_layout;
|
|
IIRCView* view;
|
|
IListWidget* listbox;
|
|
ILineEdit* input;
|
|
|
|
NicklistController* nlControl;
|
|
|
|
IWinStatus* status;
|
|
IRC& connection;
|
|
|
|
SymbolScope menuSymbols;
|
|
|
|
private slots:
|
|
void memberListReloaded(const QString& channel);
|
|
void memberListCleared();
|
|
void memberListAdd(const QString& channel, const IRCMemberEntry& member);
|
|
void memberListUpdateMember(const QString& nickname, const IRCMemberEntry& member);
|
|
void memberListRemoveMember(const QString& channel, const IRCMemberEntry& member);
|
|
};
|
|
|
|
#endif // IWINCHANNEL_H
|
|
|