kaddressbook

distributionlistpicker.h

00001 /*
00002     This file is part of KAddressBook.
00003     Copyright (c) 2007 Klaralvdalens Datakonsult AB <frank@kdab.net>
00004 
00005     This program is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation; either version 2 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with this program; if not, write to the Free Software
00017     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00018     As a special exception, permission is given to link this program
00019     with any edition of Qt, and distribute the resulting executable,
00020     without including the source code for Qt in the source distribution.
00021 */
00022 
00023 #ifndef KPIM_DISTRIBUTIONLISTPICKER_H
00024 #define KPIM_DISTRIBUTIONLISTPICKER_H
00025 
00026 #include <kdialogbase.h>
00027 
00028 #include <qstring.h>
00029 
00030 class KListBox;
00031 
00032 namespace KABC {
00033     class AddressBook;
00034 }
00035 
00036 namespace KPIM {
00037 
00038 class DistributionListPickerDialog : public KDialogBase
00039 {
00040     Q_OBJECT
00041 public:
00042     explicit DistributionListPickerDialog( KABC::AddressBook* book, QWidget* parent = 0 );
00043     QString selectedDistributionList() const;
00044 
00045     void setLabelText( const QString& text );
00046 
00047 private slots:
00048 
00049     //override
00050     void slotOk();
00051 
00052     //override
00053     void slotCancel();
00054 
00055     //override
00056     void slotUser1();
00057 
00058     void entrySelected( const QString& name );
00059 
00060 private:
00061     KABC::AddressBook* m_book;
00062     QLabel* m_label;
00063     KListBox* m_listBox;
00064     QString m_selectedDistributionList;
00065 };
00066     
00067 } //namespace KPIM
00068 
00069 #endif // KPIM_DISTRIBUTIONLISTPICKER_H