Qtopia Home - Classes - Annotated - Functions - Qt Embedded |
|
This is the verbatim text of the calllist.h include file. It is provided only for illustration; the copyright remains with Trolltech.
/**********************************************************************
** Copyright (C) 2000-2003 Trolltech AS. All rights reserved.
**
** This file is part of the Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#ifndef CALLLIST_H
#define CALLLIST_H
#include <qobject.h>
#include <qstring.h>
#include <qdatetime.h>
class CallListItem;
class CallListItemPrivate;
class CallListPrivate;
class CallListItem
{
public:
enum CallType { Dialed, Received, Missed };
CallListItem();
CallListItem( CallType type, const QString& number, const QDateTime& start,
const QDateTime &end );
CallListItem( const CallListItem& info );
~CallListItem();
bool operator== ( const CallListItem& other ) const;
bool operator!= ( const CallListItem& other ) const
{
return !operator==(other);
}
CallListItem& operator= ( const CallListItem& other );
CallType type() const;
QString number() const;
QDateTime start() const;
QDateTime end() const;
QT_STATIC_CONST CallListItem null;
private:
CallListItemPrivate *d;
};
class CallList
{
public:
CallList( const int &l = -1 );
~CallList();
QValueList<CallListItem> raw() const;
void record( CallListItem item, bool permitDuplicates=TRUE );
uint count() const;
CallListItem at( uint posn ) const;
void clear();
void setLimit( const int &l );
int limit() const;
void remove( uint posn );
void remove( const QString& number );
void remove( CallListItem::CallType type );
int cursor() const;
void setCursor( int posn );
void diffCursor( int diff );
private:
CallListPrivate *d;
QString callListFilename();
void load();
void save();
void internalRecord( CallListItem item,
bool permitDuplicates=FALSE );
bool removeByNumber( const QString& number );
};
#endif // CALLLIST_H
| Copyright © 2001-2004 Trolltech | Trademarks | Qtopia version 2.0.1
|