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

📄 phonebookcontrol.h

📁 KDE下的西门子手机管理程序
💻 H
字号:
/***************************************************************************                          phonebookcontrol.h  -  description                             -------------------    begin                : Thu Jan 18 2001    copyright            : (C) 2001 by Matthias Welwarsky    email                : matze@stud.fbi.fh-darmstadt.de ***************************************************************************//*************************************************************************** *                                                                         * *   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.                                   * *                                                                         * ***************************************************************************/#ifndef PHONEBOOKCONTROL_H#define PHONEBOOKCONTROL_H#include <qwidget.h>#include <qdict.h>#include <kabapi.h>#include <list>#include "phonebookcontroldlg.h"/**manages the phonebook of the mobile phone  *@author Matthias Welwarsky  */class MessageDispatcher;class QListView;class QListViewItem;class QProgressDialog;class PhoneBookControl : public PhoneBookControlDlg  {   Q_OBJECTpublic:	enum PhoneBook { FD=0, SM=1, ME, DC, LD, MC, RC, ON };	enum State { Idle=0, SelectingPhonebook, QueryingPhonebook, ReadingPhonebook, Synchronizing };	PhoneBookControl(QWidget *parent=0, const char *name=0);	virtual ~PhoneBookControl();  	/** stops the phonebook control, reimplemented from PhoneControl */  	virtual void stopControl();  	/** starts the phonebook control, reimplemented from PhoneControl */  	virtual void startControl();  	/** reimplemented from PhoneControl */  	virtual void deliverMessage(QString);public slots: // Public slots    /** this slot it called when someone activates a phonebook item */    void editPhonebookItem(QListViewItem*);protected slots: // Protected slots    /** called when the "Synchronize..." button is clicked.      * scans all local entries and writes back those that have changed. */    void synchronizeBooks();private: // Private attributes  	/** the message dispatcher connected to the mobile phone */  	MessageDispatcher* messageDispatcher;	/** the selected phone book */	PhoneBook selectedBook;  	/** holds pointers to all available Views of phone books */  	QDict<QListView> bookViewList;  	/** the state of the control */    State controlState;	static const char* bookViewTitle[];	static const char* bookDenominator[];  	/** number of books available */  	int availableBooks;	/** list of entries in KAB */	std::list<AddressBook::Entry> kabEntries;	/** a reference to the KabAPI */	KabAPI* kabAPI;    /** stores all commands that need to be send to the phone to synchronize the phonebooks */    QList<QString> updateList;    /** holds the current position of the update list while synchronizing */    QListIterator<QString> updateListIterator;    /** a progress dialog that displays the progress of the synchronization */    QProgressDialog* progressDialog;    /** the current progress step */    int progress;private: // Private methods    /** transmits a list of updates to the mobile phone. */    void sendUpdates();    /** conveniece function. returns QString(bookDenominator(selectedBook)). */    QString selectedPhonebook();};#endif

⌨️ 快捷键说明

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