00001 /********************************************************************** 00002 ** Copyright (C) 2000 Trolltech AS. All rights reserved. 00003 ** 00004 ** This file is part of Qt Palmtop Environment. 00005 ** 00006 ** This file may be distributed and/or modified under the terms of the 00007 ** GNU General Public License version 2 as published by the Free Software 00008 ** Foundation and appearing in the file LICENSE.GPL included in the 00009 ** packaging of this file. 00010 ** 00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00013 ** 00014 ** See http://www.trolltech.com/gpl/ for GPL licensing information. 00015 ** 00016 ** Contact info@trolltech.com if any conditions of this licensing are 00017 ** not clear to you. 00018 ** 00019 **********************************************************************/ 00020 #ifndef ABLABEL_H 00021 #define ABLABEL_H 00022 00023 #include <opie2/opimcontact.h> 00024 #include <opie2/ocontactaccess.h> 00025 00026 #include <qtextview.h> 00027 00028 class AbLabel : public QTextView 00029 { 00030 Q_OBJECT 00031 00032 public: 00033 AbLabel( QWidget *parent, const char *name = 0 ); 00034 ~AbLabel(); 00035 00036 // Set the contacts 00037 void setContacts( const Opie::OPimContactAccess::List& viewList ); 00038 00039 // Selects a contact 00040 bool selectContact( int UID ); 00041 00042 // Get the UID of the current selected Entry 00043 int currentEntry_UID(); 00044 00045 // 00046 Opie::OPimContact currentEntry(); 00047 00048 signals: 00049 void signalOkPressed(); 00050 00051 protected: 00052 void sync(); 00053 void keyPressEvent( QKeyEvent * ); 00054 00055 private: 00056 Opie::OPimContactAccess::List m_viewList; 00057 Opie::OPimContactAccess::List::Iterator m_itCurContact; 00058 00059 bool m_empty; 00060 00061 }; 00062 00063 #endif // ABLABEL_H 00064
1.4.2