[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[vidalia-svn] r4087: Add some accessor methods for retrieving data stored in a St (vidalia/trunk/src/vidalia/log)



Author: edmanm
Date: 2009-08-29 18:16:17 -0400 (Sat, 29 Aug 2009)
New Revision: 4087

Modified:
   vidalia/trunk/src/vidalia/log/StatusEventItem.cpp
   vidalia/trunk/src/vidalia/log/StatusEventItem.h
Log:

Add some accessor methods for retrieving data stored in a StatusEventItem object.


Modified: vidalia/trunk/src/vidalia/log/StatusEventItem.cpp
===================================================================
--- vidalia/trunk/src/vidalia/log/StatusEventItem.cpp	2009-08-29 18:40:47 UTC (rev 4086)
+++ vidalia/trunk/src/vidalia/log/StatusEventItem.cpp	2009-08-29 22:16:17 UTC (rev 4087)
@@ -31,30 +31,60 @@
   setData(0, TimestampRole, timestamp);
 }
 
+QTime
+StatusEventItem::timestamp() const
+{
+  return data(0, TimestampRole).toTime();
+}
+
 void
 StatusEventItem::setIcon(const QPixmap &pixmap)
 {
   setData(0, IconRole, pixmap);
 }
 
+QPixmap
+StatusEventItem::icon() const
+{
+  return data(0, IconRole).value<QPixmap>();
+}
+
 void
 StatusEventItem::setTitle(const QString &title)
 {
   setData(0, TitleRole, title);
 }
 
+QString
+StatusEventItem::title() const
+{
+  return data(0, TitleRole).toString();
+}
+
 void
 StatusEventItem::setDescription(const QString &description)
 {
   setData(0, DescriptionRole, description);
 }
 
+QString
+StatusEventItem::description() const
+{
+  return data(0, DescriptionRole).toString();
+}
+
 void
 StatusEventItem::setHelpUrl(const QString &url)
 {
   setData(0, HelpUrlRole, url);
 }
 
+QString
+StatusEventItem::helpUrl() const
+{
+  return data(0, HelpUrlRole).toString();
+}
+
 void
 StatusEventItem::setToolTip(const QString &toolTip)
 {

Modified: vidalia/trunk/src/vidalia/log/StatusEventItem.h
===================================================================
--- vidalia/trunk/src/vidalia/log/StatusEventItem.h	2009-08-29 18:40:47 UTC (rev 4086)
+++ vidalia/trunk/src/vidalia/log/StatusEventItem.h	2009-08-29 22:16:17 UTC (rev 4087)
@@ -43,24 +43,48 @@
   StatusEventItem(QTreeWidget *parent = 0);
 
   /** Sets the <b>timestamp</b> at which this status event occurred.
+   * \sa timestamp()
    */
   void setTimestamp(const QTime &timestamp);
 
+  /** Returns the timestamp at which this status event occurred.
+   * \sa setTimestamp()
+   */
+  QTime timestamp() const;
+
   /** Sets the icon to be drawn along with this status event to <b>pixmap</b>.
+   * \sa icon()
    */
   void setIcon(const QPixmap &pixmap);
 
+  /** Returns the icon draw along with this status event.
+   * \sa setIcon()
+   */
+  QPixmap icon() const;
+
   /** Sets the <b>title</b> text for this status event. The title is a short
    * (fewer than 10 words or so) summary of the event.
+   * \sa title()
    */
   void setTitle(const QString &title);
 
+  /** Returns the title text for this status event.
+   * \sa setTitle()
+   */
+  QString title() const;
+
   /** Sets the detailed <b>description</b> text for this status event. The
    * text should explain what the event means to the user, and any corrective
    * action they might need to take.
+   * \sa description()
    */
   void setDescription(const QString &description);
 
+  /** Returns the detailed description text for this status event.
+   * \sa setDescription()
+   */
+  QString description() const;
+
   /** Sets the help topic URL that contains more information about this
    * particular status event.
    * \sa helpUrl
@@ -70,7 +94,7 @@
   /** Returns the help topic URL associated with this event item.
    * \sa setHelpUrl
    */
-  void helpUrl() const;
+  QString helpUrl() const;
 
   /** Sets <b>toolTip</b> as the text displayed when the user hovers the mouse
    * over a StatusEventItem. It is more useful for particularly long item