TDE personal information management applications
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
2.2KB

  1. /*
  2. This file is part of KAddressBook.
  3. Copyright (c) 2007 Klaralvdalens Datakonsult AB <frank@kdab.net>
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  15. As a special exception, permission is given to link this program
  16. with any edition of TQt, and distribute the resulting executable,
  17. without including the source code for TQt in the source distribution.
  18. */
  19. #ifndef KPIM_DISTRIBUTIONLISTEDITOR_P_H
  20. #define KPIM_DISTRIBUTIONLISTEDITOR_P_H
  21. #include <libtdepim/addresseelineedit.h>
  22. #include <libtdepim/distributionlist.h>
  23. #include <tqpushbutton.h>
  24. #include <tqstring.h>
  25. class TQToolButton;
  26. namespace KABC {
  27. class Addressee;
  28. class AddressBook;
  29. }
  30. namespace KPIM {
  31. namespace DistributionListEditor {
  32. class LineEdit : public KPIM::AddresseeLineEdit
  33. {
  34. Q_OBJECT
  35. TQ_OBJECT
  36. public:
  37. explicit LineEdit( TQWidget* parent = 0 );
  38. };
  39. class Line : public TQWidget
  40. {
  41. Q_OBJECT
  42. TQ_OBJECT
  43. public:
  44. explicit Line( KABC::AddressBook* book, TQWidget* parent = 0 );
  45. void setEntry( const KPIM::DistributionList::Entry& entry );
  46. KPIM::DistributionList::Entry entry() const;
  47. void setFocusToLineEdit();
  48. signals:
  49. void cleared();
  50. void textChanged();
  51. private:
  52. KABC::Addressee findAddressee( const TQString& name, const TQString& email ) const;
  53. private slots:
  54. void textChanged( const TQString& );
  55. private:
  56. TQString m_uid;
  57. TQString m_initialText;
  58. LineEdit* m_lineEdit;
  59. TQToolButton* m_clearButton;
  60. KABC::AddressBook* m_addressBook;
  61. };
  62. } // namespace DisributionListEditor
  63. } // namespace KPIM
  64. #endif // KPIM_DISTRIBUTIONLISTEDITOR_P_H