note.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Copyright 2009 Andrew Stromme <astromme@chatonka.com>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU Library General Public License as
  6. * published by the Free Software Foundation; either version 2, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details
  13. *
  14. * You should have received a copy of the GNU Library General Public
  15. * License along with this program; if not, write to the
  16. * Free Software Foundation, Inc.,
  17. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  18. */
  19. #ifndef RTM_NOTE_H
  20. #define RTM_NOTE_H
  21. // Qt Includes
  22. #include <QString>
  23. // Local Includes
  24. #include "rtm.h"
  25. typedef QHash<RTM::NoteId, RTM::Note> Notes;
  26. namespace RTM {
  27. class RTM_EXPORT Note {
  28. public:
  29. Note(RTM::NoteId id, const QString& title, const QString& text)
  30. {
  31. noteId = id;
  32. m_title = title;
  33. m_text = text;
  34. }
  35. RTM::NoteId id() const { return noteId; }
  36. QString title() const { return m_title; }
  37. QString text() const { return m_text; }
  38. protected:
  39. RTM::NoteId noteId;
  40. QString m_text;
  41. QString m_title;
  42. };
  43. } // rtm namespace
  44. #endif