summaryrefslogtreecommitdiffstats
path: root/sigmodr/tree
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-05-21 01:38:04 -0400
committerBen Boeckel <MathStuf@gmail.com>2009-05-21 01:38:04 -0400
commitf58d7f1f3bfc7879c387dd30f166d525d9819317 (patch)
tree70a66caba1e688b064d1b0365999682e4e22da9a /sigmodr/tree
parent69172cc1968ab4c7b05251d598287d4e8ab4986e (diff)
downloadsigen-f58d7f1f3bfc7879c387dd30f166d525d9819317.tar.gz
sigen-f58d7f1f3bfc7879c387dd30f166d525d9819317.tar.xz
sigen-f58d7f1f3bfc7879c387dd30f166d525d9819317.zip
Add management of the dirty flag for games
Diffstat (limited to 'sigmodr/tree')
-rw-r--r--sigmodr/tree/TreeWidget.cpp18
-rw-r--r--sigmodr/tree/TreeWidget.h1
2 files changed, 13 insertions, 6 deletions
diff --git a/sigmodr/tree/TreeWidget.cpp b/sigmodr/tree/TreeWidget.cpp
index 5a9b67a7..f0855a79 100644
--- a/sigmodr/tree/TreeWidget.cpp
+++ b/sigmodr/tree/TreeWidget.cpp
@@ -149,9 +149,15 @@ TreeWidget::TreeWidget(QWidget* parent) :
// m_games[game] = UrlDirty(url, false);
// }
//
-// bool TreeWidget::dirty(const Game* game) const
-// {
-// if (m_games.contains(game))
-// return m_games[game].second;
-// return false;
-// }
+void TreeWidget::setDirty(const Game* game, const bool dirty)
+{
+ if (m_games.contains(game))
+ m_games[game].second = dirty;
+}
+
+bool TreeWidget::dirty(const Game* game) const
+{
+ if (m_games.contains(game))
+ return m_games[game].second;
+ return false;
+}
diff --git a/sigmodr/tree/TreeWidget.h b/sigmodr/tree/TreeWidget.h
index da2148e0..42699fed 100644
--- a/sigmodr/tree/TreeWidget.h
+++ b/sigmodr/tree/TreeWidget.h
@@ -72,6 +72,7 @@ class SIGMODRTREE_EXPORT TreeWidget : public QTreeView
// QStringList urls() const;
// void setUrl(const Sigmod::Game* game, const KUrl& url);
+ void setDirty(const Sigmod::Game* game, const bool dirty);
bool dirty(const Sigmod::Game* game = NULL) const;
private:
typedef QPair<KUrl, bool> UrlDirty;