代码拉取完成,页面将自动刷新
同步操作将从 uenigma/linux_feiq 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "chooseemojidlg.h"
#include "feiqlib/feiqengine.h"
#include "fellowlistwidget.h"
#include "filemanagerdlg.h"
#include "recvtextedit.h"
#include "searchfellowdlg.h"
#include "sendtextedit.h"
#include "settings.h"
#include <QFileInfo>
#include <QMainWindow>
#include <unordered_map>
using namespace std;
namespace Ui
{
class MainWindow;
}
class FeiqWin;
struct UnshownMessage
{
shared_ptr<ViewEvent> event;
bool replied = false;
bool read = false;
long notifyId = 0;
bool isUnread()
{
return !replied && !read;
}
};
Q_DECLARE_METATYPE(shared_ptr<ViewEvent>)
class MainWindow : public QMainWindow, IFeiqView
{
Q_OBJECT
friend class FeiqWin;
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
void setFeiqWin(FeiqWin *feiqWin);
public slots:
void onNotifyClicked(const QString &fellowIp);
void onNotifyReplied(long notifyId, const QString &fellowIp, const QString &reply);
protected:
void enterEvent(QEvent *event);
signals:
void showErrorAndQuit(const QString &text);
void statChanged(FileTask *fileTask);
void progressChanged(FileTask *fileTask);
void feiqViewEvent(shared_ptr<ViewEvent> event);
private slots:
void finishSearch(const Fellow *fellow);
void openSettings();
void openSearchDlg();
void openDownloadDlg();
void onShowErrorAndQuit(const QString &text);
void navigateToFileTask(IdType packetNo, IdType fileId, bool upload);
void sendKnock();
void sendText();
void openChartTo(const Fellow *fellow);
void handleFeiqViewEvent(shared_ptr<ViewEvent> event);
void refreshFellowList();
void addFellow();
void openChooseEmojiDlg();
void sendFile();
void sendFile(string filepath);
void sendFiles(QList<QFileInfo> files);
private:
void userAddFellow(QString ip);
long showNotification(const Fellow *fellow, const QString &text);
shared_ptr<Fellow> checkCurFellow();
void showResult(pair<bool, string> ret, const Content *content);
vector<const Fellow *> fellowSearchDriver(const QString &text);
void initFeiq();
void readEvent(const ViewEvent *event);
void setBadgeNumber(int number);
QString simpleTextOf(const Content *content);
UnshownMessage &addUnshownMessage(const Fellow *fellow, shared_ptr<ViewEvent> event);
UnshownMessage *findUnshownMessage(int id);
void notifyUnshown(UnshownMessage &umsg);
void updateUnshownHint(const Fellow *fellow);
int getUnreadCount();
void flushUnshown(const Fellow *fellow);
// IFileTaskObserver interface
public:
void onStateChanged(FileTask *fileTask);
void onProgress(FileTask *fileTask);
// IFeiqView interface
public:
void onEvent(shared_ptr<ViewEvent> event);
private:
Ui::MainWindow *ui;
FellowListWidget mFellowList;
SearchFellowDlg *mSearchFellowDlg;
FileManagerDlg *mDownloadFileDlg;
ChooseEmojiDlg *mChooseEmojiDlg;
Settings *mSettings;
FeiqEngine mFeiq;
RecvTextEdit *mRecvTextEdit;
SendTextEdit *mSendTextEdit;
QString mTitle;
unordered_map<const Fellow *, list<UnshownMessage>> mUnshownEvents;
FeiqWin *mFeiqWin = nullptr;
};
#endif // MAINWINDOW_H
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。