⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mailchecker.h

📁 张勇的linQ学习P2P及IM软件的极佳素材代码
💻 H
字号:
/***************************************************************************
 *                                                                         *
 *   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 by Zhang Yong                         *
 *   email                : z-yong163@163.com                              *
 ***************************************************************************/

#ifndef _MAIL_CHECKER_H
#define _MAIL_CHECKER_H

#include <qobject.h>
#include <qpixmap.h>
#include "plugin.h"


class Options {
public:
	Options();

	void load(const QDomElement &pref);
	void save(QDomDocument &doc, QDomElement &pref);

	QString host;
	int port;
	QString user;
	QString password;
	int interval;
};


class QSocket;
class QTimer;

class MailChecker : public QObject, public Plugin {
	Q_OBJECT

public:
	MailChecker();
	~MailChecker();

	virtual bool init(MAPI *mapi);
	virtual void destroy() { delete this; }

	virtual void load(const QDomElement &pref);
	virtual void unload(QDomDocument &doc, QDomElement &pref);

	virtual QString getName();
	virtual QString getDesc();
	virtual const QPixmap *getIcon() {
		return &iconPix;
	}
	virtual QWidget *getConfigWidget(QWidget *parent);
	virtual void saveConfig(QWidget *w);

private slots:
	void slotDataReady();
	void slotCheckMail();

private:
	bool startTimer();
	void sendCmd(const char *cmd);
	void onStatReply(const QString &reply);

	NotifyText *notifyText;
	QPixmap iconPix;
	Options options;
	QSocket *popSocket;
	int lastCmd;
	QTimer *checkTimer;
};


#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -