task_p.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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_TASK_P_H
  20. #define RTM_TASK_P_H
  21. #include "task.h"
  22. #include "request.h"
  23. #include "session.h"
  24. class RTM::TaskPrivate {
  25. TaskPrivate(Task *parent)
  26. : q(parent)
  27. {
  28. }
  29. RTM::Request *standardRequest(const QString& method)
  30. {
  31. RTM::Request *request = session->request(method); // auth token is done for us
  32. request->addArgument("timeline", QString::number(session->getTimeline()));
  33. request->addArgument("list_id", QString::number(listId));
  34. request->addArgument("taskseries_id", QString::number(seriesId));
  35. request->addArgument("task_id", QString::number(taskId));
  36. return request;
  37. }
  38. friend class Task;
  39. friend class TasksReader;
  40. Task *q;
  41. RTM::Session *session;
  42. RTM::TaskId taskId;
  43. QList<Tag> tags;
  44. ListId listId;
  45. int priority;
  46. RTM::TaskSeriesId seriesId;
  47. QDateTime due;
  48. QDateTime completed;
  49. QDateTime deleted;
  50. QString estimate;
  51. LocationId locationId;
  52. QString name;
  53. QString repeatString;
  54. QString url;
  55. QHash<RTM::NoteId, RTM::Note> notes;
  56. };
  57. #endif // RTM_TASK_P_H