[longomatch/stats2] WIP on stats
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch/stats2] WIP on stats
- Date: Tue, 16 Jul 2013 23:30:18 +0000 (UTC)
commit 28ece105e7e289db5e331b545fe18168b4bd8cfc
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Wed Jul 17 01:29:50 2013 +0200
WIP on stats
LongoMatch.Core/Handlers/Handlers.cs | 3 +
LongoMatch.Core/Interfaces/GUI/IGUIToolkit.cs | 2 +
LongoMatch.Core/Interfaces/GUI/IMainWindow.cs | 3 +
LongoMatch.Core/Stats/CategoryStats.cs | 13 +-
LongoMatch.Core/Stats/ProjectStats.cs | 4 +-
LongoMatch.Core/Stats/SubCategoryStat.cs | 12 +-
.../Gui/Component/PlaysCoordinatesTagger.cs | 71 +++--
.../Gui/Component/Stats/CategoriesViewer.cs | 67 ++++
.../Gui/Component/Stats/CategoryViewer.cs | 59 ++++
.../Gui/Component/Stats/PangoTextMeasurer.cs | 64 ++++
LongoMatch.GUI/Gui/Component/Stats/Plotter.cs | 163 +++++++++
.../Gui/Component/Stats/SubcategoryViewer.cs | 53 +++
LongoMatch.GUI/Gui/Dialog/StatsViewer.cs | 37 ++
LongoMatch.GUI/Gui/GUIToolkit.cs | 9 +
LongoMatch.GUI/Gui/Helpers/Misc.cs | 5 +-
LongoMatch.GUI/Gui/MainWindow.cs | 8 +
LongoMatch.GUI/LongoMatch.GUI.mdp | 14 +
...goMatch.Gui.Component.Stats.CategoriesViewer.cs | 58 +++
...ongoMatch.Gui.Component.Stats.CategoryViewer.cs | 45 +++
.../LongoMatch.Gui.Component.Stats.Plotter.cs | 87 +++++
...oMatch.Gui.Component.Stats.SubCategoryViewer.cs | 67 ++++
.../gtk-gui/LongoMatch.Gui.Dialog.StatsViewer.cs | 67 ++++
.../gtk-gui/LongoMatch.Gui.MainWindow.cs | 10 +-
LongoMatch.GUI/gtk-gui/gui.stetic | 304 ++++++++++++++++
LongoMatch.GUI/gtk-gui/objects.xml | 367 ++++++++++----------
LongoMatch.Services/Services/EventsManager.cs | 8 +
LongoMatch.mds | 4 +
oxyplot/OxyPlot/Render/IRenderContext.cs | 26 +--
oxyplot/OxyPlot/Svg/SvgExporter.cs | 2 +-
oxyplot/OxyPlot/Svg/SvgRenderContext.cs | 8 +-
oxyplot/OxyPlotMono/OxyPlotMono.csproj | 4 +-
31 files changed, 1401 insertions(+), 243 deletions(-)
---
diff --git a/LongoMatch.Core/Handlers/Handlers.cs b/LongoMatch.Core/Handlers/Handlers.cs
index 25de474..e783d25 100644
--- a/LongoMatch.Core/Handlers/Handlers.cs
+++ b/LongoMatch.Core/Handlers/Handlers.cs
@@ -140,4 +140,7 @@ namespace LongoMatch.Handlers
public delegate void FilterUpdatedHandler ();
public delegate void DetachPlayerHandler (bool detach);
+
+ /* Show project stats */
+ public delegate void ShowProjectStats(Project project);
}
diff --git a/LongoMatch.Core/Interfaces/GUI/IGUIToolkit.cs b/LongoMatch.Core/Interfaces/GUI/IGUIToolkit.cs
index e2157ec..e6af4d1 100644
--- a/LongoMatch.Core/Interfaces/GUI/IGUIToolkit.cs
+++ b/LongoMatch.Core/Interfaces/GUI/IGUIToolkit.cs
@@ -24,6 +24,7 @@ using LongoMatch.Common;
using LongoMatch.Store;
using LongoMatch.Store.Templates;
using Image = LongoMatch.Common.Image;
+using LongoMatch.Stats;
namespace LongoMatch.Interfaces.GUI
{
@@ -63,6 +64,7 @@ namespace LongoMatch.Interfaces.GUI
Project NewFakeProject(IDatabase db, ITemplatesService ts);
Project NewFileProject(IDatabase db, ITemplatesService ts);
Project EditFakeProject(IDatabase db, Project project, ITemplatesService ts);
+ void ShowProjectStats(Project project);
void OpenProjectsManager(Project openedProject, IDatabase db, ITemplatesService ts);
void OpenCategoriesTemplatesManager(ITemplatesService ts);
diff --git a/LongoMatch.Core/Interfaces/GUI/IMainWindow.cs b/LongoMatch.Core/Interfaces/GUI/IMainWindow.cs
index 1ac01cb..c6bc27e 100644
--- a/LongoMatch.Core/Interfaces/GUI/IMainWindow.cs
+++ b/LongoMatch.Core/Interfaces/GUI/IMainWindow.cs
@@ -65,6 +65,9 @@ namespace LongoMatch.Interfaces.GUI
event ManageDatabases ManageDatabasesEvent;
event EditPreferences EditPreferencesEvent;
+ /* Stats */
+ event ShowProjectStats ShowProjectStatsEvent;
+
/* Game Units events */
event GameUnitHandler GameUnitEvent;
event UnitChangedHandler UnitChanged;
diff --git a/LongoMatch.Core/Stats/CategoryStats.cs b/LongoMatch.Core/Stats/CategoryStats.cs
index 4b9a2fa..5c52c0e 100644
--- a/LongoMatch.Core/Stats/CategoryStats.cs
+++ b/LongoMatch.Core/Stats/CategoryStats.cs
@@ -19,17 +19,20 @@ using System;
using System.Collections.Generic;
using LongoMatch.Interfaces;
+using LongoMatch.Store;
namespace LongoMatch.Stats
{
public class CategoryStats: Stat
{
List <SubCategoryStat> subcatStats;
+ Category cat;
- public CategoryStats (string name, int totalCount, int localTeamCount, int visitorTeamCount):
- base (name, totalCount, localTeamCount, visitorTeamCount)
+ public CategoryStats (Category cat, int totalCount, int localTeamCount, int visitorTeamCount):
+ base (cat.Name, totalCount, localTeamCount, visitorTeamCount)
{
subcatStats = new List<SubCategoryStat>();
+ this.cat = cat;
}
public List<SubCategoryStat> SubcategoriesStats {
@@ -38,6 +41,12 @@ namespace LongoMatch.Stats
}
}
+ public Category Category {
+ get {
+ return cat;
+ }
+ }
+
public void AddSubcatStat (SubCategoryStat subcatStat) {
subcatStats.Add(subcatStat);
}
diff --git a/LongoMatch.Core/Stats/ProjectStats.cs b/LongoMatch.Core/Stats/ProjectStats.cs
index 039378e..4975ef5 100644
--- a/LongoMatch.Core/Stats/ProjectStats.cs
+++ b/LongoMatch.Core/Stats/ProjectStats.cs
@@ -112,7 +112,7 @@ namespace LongoMatch.Stats
plays = project.PlaysInCategory (cat);
CountPlaysInTeam(plays, out localTeamCount, out visitorTeamCount);
- stats = new CategoryStats(cat.Name, plays.Count, localTeamCount,
visitorTeamCount);
+ stats = new CategoryStats(cat, plays.Count, localTeamCount, visitorTeamCount);
catStats.Add (stats);
foreach (ISubCategory subcat in cat.SubCategories) {
@@ -121,7 +121,7 @@ namespace LongoMatch.Stats
if (subcat is PlayerSubCategory)
continue;
- subcatStat = new SubCategoryStat(subcat.Name);
+ subcatStat = new SubCategoryStat(subcat);
stats.AddSubcatStat(subcatStat);
if (subcat is TagSubCategory) {
diff --git a/LongoMatch.Core/Stats/SubCategoryStat.cs b/LongoMatch.Core/Stats/SubCategoryStat.cs
index ccfd341..73a5cec 100644
--- a/LongoMatch.Core/Stats/SubCategoryStat.cs
+++ b/LongoMatch.Core/Stats/SubCategoryStat.cs
@@ -30,10 +30,12 @@ namespace LongoMatch.Stats
List<PercentualStat> optionStats;
Dictionary<string, List<PlayersStats>> localPlayersStats;
Dictionary<string, List<PlayersStats>> visitorPlayersStats;
+ ISubCategory subcat;
- public SubCategoryStat (string name)
+ public SubCategoryStat (ISubCategory subcat)
{
- Name = name;
+ Name = subcat.Name;
+ this.subcat = subcat;
optionStats = new List<PercentualStat>();
localPlayersStats = new Dictionary<string, List<PlayersStats>>();
visitorPlayersStats = new Dictionary<string, List<PlayersStats>>();
@@ -51,6 +53,12 @@ namespace LongoMatch.Stats
}
}
+ public ISubCategory SubCategory {
+ get {
+ return subcat;
+ }
+ }
+
public Dictionary<string, List<PlayersStats>> LocalPlayersStats {
get {
return localPlayersStats;
diff --git a/LongoMatch.GUI/Gui/Component/PlaysCoordinatesTagger.cs
b/LongoMatch.GUI/Gui/Component/PlaysCoordinatesTagger.cs
index b094b91..13ca6fd 100644
--- a/LongoMatch.GUI/Gui/Component/PlaysCoordinatesTagger.cs
+++ b/LongoMatch.GUI/Gui/Component/PlaysCoordinatesTagger.cs
@@ -61,31 +61,58 @@ namespace LongoMatch.Gui.Component
ShowAll ();
}
+ public void LoadPlays (List<Play> plays, Categories template, bool horizontal=true) {
+ field.Visible = hfield.Visible = goal.Visible = false;
+ SetBackgrounds (template);
+ foreach (Play play in plays) {
+ AddPlay (play, false);
+ }
+ }
+
public void LoadPlay (Play play, Categories template, bool horizontal=true) {
field.Visible = hfield.Visible = goal.Visible = false;
+ SetBackgrounds (template);
+ AddPlay (play, true);
+
+ }
+
+ void SetBackgrounds (Categories template) {
+ if (template.FieldBackgroundImage != null) {
+ field.Background = template.FieldBackgroundImage.Value;
+ } else {
+ field.Background = Gdk.Pixbuf.LoadFromResource (Constants.FIELD_BACKGROUND);
+ }
+ if (template.HalfFieldBackgroundImage != null) {
+ hfield.Background = template.HalfFieldBackgroundImage.Value;
+ } else {
+ hfield.Background = Gdk.Pixbuf.LoadFromResource
(Constants.HALF_FIELD_BACKGROUND);
+ }
+ if (template.GoalBackgroundImage != null) {
+ goal.Background = template.GoalBackgroundImage.Value;
+ } else {
+ goal.Background = Gdk.Pixbuf.LoadFromResource (Constants.GOAL_BACKGROUND);
+ }
+ }
+
+ void AddPlay (Play play, bool fill) {
if (play.Category.TagFieldPosition) {
- AddFieldPosTagger (play, template);
+ AddFieldPosTagger (play, fill);
}
if (play.Category.TagHalfFieldPosition) {
- AddHalfFieldPosTagger (play, template);
+ AddHalfFieldPosTagger (play, fill);
}
if (play.Category.TagGoalPosition) {
- AddGoalPosTagger (play, template);
+ AddGoalPosTagger (play, fill);
}
}
- void AddFieldPosTagger (Play play, Categories template) {
+ void AddFieldPosTagger (Play play, bool fill) {
List<Coordinates> coords = new List<Coordinates>();
- if (template.FieldBackgroundImage != null) {
- field.Background = template.FieldBackgroundImage.Value;
- } else {
- field.Background = Gdk.Pixbuf.LoadFromResource (Constants.FIELD_BACKGROUND);
- }
if (play.FieldPosition != null) {
coords.Add (play.FieldPosition);
- } else {
+ } else if (fill) {
Coordinates c = new Coordinates ();
c.Add (new Point(100, 100));
if (play.Category.FieldPositionIsDistance) {
@@ -93,22 +120,19 @@ namespace LongoMatch.Gui.Component
}
coords.Add (c);
play.FieldPosition = c;
+ } else {
+ return;
}
field.Coordinates = coords;
field.Visible = true;
}
- void AddHalfFieldPosTagger (Play play, Categories template) {
+ void AddHalfFieldPosTagger (Play play, bool fill) {
List<Coordinates> coords = new List<Coordinates>();
- if (template.HalfFieldBackgroundImage != null) {
- hfield.Background = template.HalfFieldBackgroundImage.Value;
- } else {
- hfield.Background = Gdk.Pixbuf.LoadFromResource
(Constants.HALF_FIELD_BACKGROUND);
- }
if (play.HalfFieldPosition != null) {
coords.Add (play.HalfFieldPosition);
- } else {
+ } else if (fill) {
Coordinates c = new Coordinates ();
c.Add (new Point(100, 100));
if (play.Category.HalfFieldPositionIsDistance) {
@@ -116,26 +140,25 @@ namespace LongoMatch.Gui.Component
}
coords.Add (c);
play.HalfFieldPosition = c;
+ } else {
+ return;
}
hfield.Coordinates = coords;
hfield.Visible = true;
}
- void AddGoalPosTagger (Play play, Categories template) {
+ void AddGoalPosTagger (Play play, bool fill) {
List<Coordinates> coords = new List<Coordinates>();
- if (template.GoalBackgroundImage != null) {
- goal.Background = template.GoalBackgroundImage.Value;
- } else {
- goal.Background = Gdk.Pixbuf.LoadFromResource (Constants.GOAL_BACKGROUND);
- }
if (play.GoalPosition != null) {
coords.Add (play.GoalPosition);
- } else {
+ } else if (fill) {
Coordinates c = new Coordinates ();
c.Add (new Point(100, 100));
coords.Add (c);
play.GoalPosition = c;
+ } else {
+ return;
}
goal.Coordinates = coords;
goal.Visible = true;
diff --git a/LongoMatch.GUI/Gui/Component/Stats/CategoriesViewer.cs
b/LongoMatch.GUI/Gui/Component/Stats/CategoriesViewer.cs
new file mode 100644
index 0000000..ee3c5cb
--- /dev/null
+++ b/LongoMatch.GUI/Gui/Component/Stats/CategoriesViewer.cs
@@ -0,0 +1,67 @@
+//
+// Copyright (C) 2013 Andoni Morales Alastruey
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using System;
+using Gtk;
+
+using LongoMatch.Stats;
+using LongoMatch.Store;
+using LongoMatch.Common;
+
+namespace LongoMatch.Gui.Component.Stats
+{
+ [System.ComponentModel.ToolboxItem(true)]
+ public partial class CategoriesViewer : Gtk.Bin
+ {
+ ListStore store;
+
+ public CategoriesViewer ()
+ {
+ this.Build ();
+ store = new ListStore(typeof(Category), typeof(string));
+ treeview.AppendColumn ("Desc", new Gtk.CellRendererText (), "text", 1);
+ treeview.CursorChanged += HandleCursorChanged;
+ treeview.Model = store;
+ treeview.HeadersVisible = false;
+ treeview.EnableGridLines = TreeViewGridLines.None;
+ treeview.EnableTreeLines = false;
+ }
+
+ public void LoadStats (ProjectStats pstats) {
+ TreeIter iter;
+
+ store.Clear();
+ foreach (CategoryStats cstats in pstats.CategoriesStats) {
+ store.AppendValues (cstats, cstats.Name);
+ }
+ store.GetIterFirst(out iter);
+ treeview.Selection.SelectIter(iter);
+ categoryviewer1.LoadStats (store.GetValue (iter, 0) as CategoryStats);
+ }
+
+ void HandleCursorChanged (object sender, EventArgs e)
+ {
+ CategoryStats stats;
+ TreeIter iter;
+
+ treeview.Selection.GetSelected(out iter);
+ stats = store.GetValue(iter, 0) as CategoryStats;
+ categoryviewer1.LoadStats (stats);
+ }
+ }
+}
+
diff --git a/LongoMatch.GUI/Gui/Component/Stats/CategoryViewer.cs
b/LongoMatch.GUI/Gui/Component/Stats/CategoryViewer.cs
new file mode 100644
index 0000000..ac75216
--- /dev/null
+++ b/LongoMatch.GUI/Gui/Component/Stats/CategoryViewer.cs
@@ -0,0 +1,59 @@
+//
+// Copyright (C) 2013 Andoni Morales Alastruey
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using System;
+using Gtk;
+using LongoMatch.Stats;
+using System.Collections.Generic;
+using LongoMatch.Common;
+
+namespace LongoMatch.Gui.Component.Stats
+{
+ [System.ComponentModel.ToolboxItem(true)]
+ public partial class CategoryViewer : Gtk.Bin
+ {
+ List<SubCategoryViewer> subcatViewers;
+ public CategoryViewer ()
+ {
+ this.Build ();
+ }
+
+ public void LoadStats (CategoryStats stats) {
+ PlaysCoordinatesTagger tagger;
+
+ tagger = new PlaysCoordinatesTagger();
+ vbox1.PackStart (tagger);
+ subcatViewers = new List<SubCategoryViewer>();
+
+ foreach (Widget child in vbox1.AllChildren) {
+ vbox1.Remove (child);
+ }
+
+ foreach (SubCategoryStat st in stats.SubcategoriesStats) {
+ SubCategoryViewer subcatviewer = new SubCategoryViewer();
+ subcatviewer.LoadStats (st);
+ subcatViewers.Add (subcatviewer);
+ vbox1.PackStart (subcatviewer);
+ vbox1.PackStart (new HSeparator());
+ }
+
+ tagger = new PlaysCoordinatesTagger ();
+ vbox1.ShowAll ();
+ }
+ }
+}
+
diff --git a/LongoMatch.GUI/Gui/Component/Stats/PangoTextMeasurer.cs
b/LongoMatch.GUI/Gui/Component/Stats/PangoTextMeasurer.cs
new file mode 100644
index 0000000..52d9870
--- /dev/null
+++ b/LongoMatch.GUI/Gui/Component/Stats/PangoTextMeasurer.cs
@@ -0,0 +1,64 @@
+//
+// Copyright (C) 2013 Andoni Morales Alastruey
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using System;
+using Pango;
+using OxyPlot;
+
+namespace LongoMatch.Gui.Component.Stats
+{
+ public class PangoTextMeasurer: ITextMeasurer
+ {
+ Layout layout;
+
+ public PangoTextMeasurer ()
+ {
+ layout = new Layout (Gdk.PangoHelper.ContextGet());
+ }
+
+ public OxySize MeasureText(string text, string fontFamily = "",
+ double fontSize = 10, double fontWeight = 500) {
+ FontDescription desc = new FontDescription();
+ OxySize size = new OxySize();
+ int width, height;
+
+ desc.Family = fontFamily;
+ desc.Size = (int) fontSize;
+ desc.Weight = PangoWeightFromDouble (fontWeight);
+ layout.SetText (text);
+ layout.GetPixelSize (out width, out height);
+ size.Width = (double) width;
+ size.Height = (double) height;
+ return size;
+ }
+
+ Weight PangoWeightFromDouble (double weight) {
+ if (weight <= 250)
+ return Weight.Ultralight;
+ if (weight <= 350)
+ return Weight.Light;
+ if (weight <= 600)
+ return Weight.Normal;
+ if (weight <= 750)
+ return Weight.Bold;
+ if (weight <= 850)
+ return Weight.Ultrabold;
+ return Weight.Heavy;
+ }
+ }
+}
+
diff --git a/LongoMatch.GUI/Gui/Component/Stats/Plotter.cs b/LongoMatch.GUI/Gui/Component/Stats/Plotter.cs
new file mode 100644
index 0000000..e1c7d54
--- /dev/null
+++ b/LongoMatch.GUI/Gui/Component/Stats/Plotter.cs
@@ -0,0 +1,163 @@
+//
+// Copyright (C) 2013 Andoni Morales Alastruey
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using System;
+using System.IO;
+using Gdk;
+using Cairo;
+using OxyPlot;
+using OxyPlot.Series;
+using OxyPlot.Axes;
+
+using LongoMatch.Stats;
+using LongoMatch.Common;
+using Mono.Unix;
+using Gtk;
+
+namespace LongoMatch.Gui.Component.Stats
+{
+ [System.ComponentModel.ToolboxItem(true)]
+ public partial class Plotter : Gtk.Bin
+ {
+ const double WIDTH = 800;
+ const double HEIGHT = 300;
+ GraphType graphType;
+ SubCategoryStat stats;
+
+ public Plotter ()
+ {
+ this.Build ();
+ HeightRequest = (int) HEIGHT;
+ WidthRequest = (int) WIDTH;
+ pieradiobutton.Toggled += HandleToggled;
+ historadiobutton.Toggled += HandleToggled;
+ }
+
+ public void LoadPie (SubCategoryStat stats) {
+ graphType = GraphType.Pie;
+ this.stats = stats;
+ Reload ();
+ }
+
+ public void LoadHistogram (SubCategoryStat stats) {
+ graphType = GraphType.Histogram;
+ this.stats = stats;
+ Reload ();
+ }
+
+ Pixbuf Load (PlotModel model, double width, double height) {
+ MemoryStream stream = new MemoryStream();
+ SvgExporter.Export (model, stream, width, height, false, new PangoTextMeasurer());
+ stream.Seek (0, SeekOrigin.Begin);
+ return new Pixbuf (stream);
+ }
+
+ PlotModel GetHistogram (SubCategoryStat stats) {
+ PlotModel model = new PlotModel ();
+ CategoryAxis categoryAxis;
+ LinearAxis valueAxis;
+
+ valueAxis = new LinearAxis(AxisPosition.Left) { MinimumPadding = 0, AbsoluteMinimum =
0,
+ MinorStep = 1, MajorStep = 1, Minimum = 0};
+ categoryAxis = new CategoryAxis () {ItemsSource = stats.OptionStats, LabelField = "Name",
+ Angle = 20.0};
+
+ model.Series.Add(new ColumnSeries { Title = Catalog.GetString ("Total"), ItemsSource
= stats.OptionStats,
+ ValueField = "TotalCount" });
+ model.Series.Add(new ColumnSeries { Title = Catalog.GetString ("Home"), ItemsSource =
stats.OptionStats,
+ ValueField = "LocalTeamCount" });
+ model.Series.Add(new ColumnSeries { Title = Catalog.GetString ("Away"), ItemsSource =
stats.OptionStats,
+ ValueField = "VisitorTeamCount" });
+ model.Axes.Add(categoryAxis);
+ model.Axes.Add(valueAxis);
+ return model;
+ }
+
+ PlotModel GetPie (SubCategoryStat stats, Team team) {
+ PlotModel model = new PlotModel ();
+ PieSeries ps = new PieSeries();
+
+ foreach (PercentualStat st in stats.OptionStats) {
+ double count = GetCount (st, team);
+ if (count == 0)
+ continue;
+ ps.Slices.Add(new PieSlice(st.Name, count));
+ }
+ ps.InnerDiameter = 0;
+ ps.ExplodedDistance = 0.0;
+ ps.Stroke = OxyColors.White;
+ ps.StrokeThickness = 2.0;
+ ps.InsideLabelPosition = 0.8;
+ ps.AngleSpan = 360;
+ ps.StartAngle = 0;
+ model.Series.Add(ps);
+ return model;
+ }
+
+ double GetCount (PercentualStat stats, Team team) {
+ switch (team) {
+ case Team.NONE:
+ case Team.BOTH:
+ return stats.TotalCount;
+ case Team.LOCAL:
+ return stats.LocalTeamCount;
+ case Team.VISITOR:
+ return stats.VisitorTeamCount;
+ }
+ return 0;
+ }
+
+ void Reload () {
+ if (stats == null)
+ return;
+
+ switch (graphType) {
+ case GraphType.Histogram:
+ imageall.Pixbuf = Load (GetHistogram (stats), WIDTH, HEIGHT);
+ imagehome.Visible = false;
+ imageaway.Visible = false;
+ break;
+ case GraphType.Pie:
+ imageall.Pixbuf = Load (GetPie (stats, Team.BOTH), WIDTH / 3, HEIGHT);
+ imagehome.Pixbuf = Load (GetPie (stats, Team.LOCAL), WIDTH / 3, HEIGHT);
+ imageaway.Pixbuf = Load (GetPie (stats, Team.VISITOR), WIDTH / 3, HEIGHT);
+ imagehome.Visible = true;
+ imageaway.Visible = true;
+ break;
+ }
+ }
+
+ void HandleToggled (object sender, EventArgs args) {
+ RadioButton r = sender as RadioButton;
+
+ if (r == pieradiobutton && r.Active) {
+ graphType = GraphType.Pie;
+ Reload ();
+ } else if (r == historadiobutton && r.Active) {
+ graphType = GraphType.Histogram;
+ Reload ();
+ }
+ }
+
+ protected enum GraphType {
+ Histogram,
+ Pie,
+ }
+ }
+
+}
+
diff --git a/LongoMatch.GUI/Gui/Component/Stats/SubcategoryViewer.cs
b/LongoMatch.GUI/Gui/Component/Stats/SubcategoryViewer.cs
new file mode 100644
index 0000000..785fb78
--- /dev/null
+++ b/LongoMatch.GUI/Gui/Component/Stats/SubcategoryViewer.cs
@@ -0,0 +1,53 @@
+//
+// Copyright (C) 2013 Andoni Morales Alastruey
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using System;
+using Gtk;
+using Mono.Unix;
+
+using LongoMatch.Stats;
+using LongoMatch.Common;
+
+namespace LongoMatch.Gui.Component.Stats
+{
+ [System.ComponentModel.ToolboxItem(true)]
+ public partial class SubCategoryViewer : Gtk.Bin
+ {
+ ListStore store;
+ public SubCategoryViewer ()
+ {
+ this.Build ();
+ treeview.AppendColumn (Catalog.GetString ("Count"), new Gtk.CellRendererText (),
"text", 0);
+ treeview.AppendColumn (Catalog.GetString("All"), new Gtk.CellRendererText (), "text",
1);
+ treeview.AppendColumn (Catalog.GetString("Home"), new Gtk.CellRendererText (),
"text", 2);
+ treeview.AppendColumn (Catalog.GetString("Away"), new Gtk.CellRendererText (),
"text", 3);
+ }
+
+ public void LoadStats (SubCategoryStat stats) {
+ store = new ListStore(typeof(string), typeof(string), typeof(string), typeof(string));
+ treeview.Model = store;
+
+ gtkframe.Markup = String.Format("<b> {0} </b>", stats.Name);
+ plotter.LoadHistogram (stats);
+
+ foreach (PercentualStat st in stats.OptionStats) {
+ store.AppendValues (st.Name, st.TotalCount.ToString(),
+ st.LocalTeamCount.ToString(),
st.VisitorTeamCount.ToString());
+ }
+ }
+ }
+}
diff --git a/LongoMatch.GUI/Gui/Dialog/StatsViewer.cs b/LongoMatch.GUI/Gui/Dialog/StatsViewer.cs
new file mode 100644
index 0000000..32dab47
--- /dev/null
+++ b/LongoMatch.GUI/Gui/Dialog/StatsViewer.cs
@@ -0,0 +1,37 @@
+//
+// Copyright (C) 2013 Andoni Morales Alastruey
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using System;
+using LongoMatch.Stats;
+using LongoMatch.Store;
+
+namespace LongoMatch.Gui.Dialog
+{
+ public partial class StatsViewer : Gtk.Dialog
+ {
+ public StatsViewer ()
+ {
+ this.Build ();
+ }
+
+ public void LoadStats (Project project) {
+ ProjectStats stats = new ProjectStats (project);
+ categoriesviewer.LoadStats (stats);
+ }
+ }
+}
+
diff --git a/LongoMatch.GUI/Gui/GUIToolkit.cs b/LongoMatch.GUI/Gui/GUIToolkit.cs
index df8dba0..197ea8c 100644
--- a/LongoMatch.GUI/Gui/GUIToolkit.cs
+++ b/LongoMatch.GUI/Gui/GUIToolkit.cs
@@ -33,6 +33,7 @@ using LongoMatch.Store;
using LongoMatch.Store.Templates;
using LongoMatch.Video.Utils;
using LongoMatch.Gui.Helpers;
+using LongoMatch.Stats;
namespace LongoMatch.Gui
{
@@ -352,6 +353,14 @@ namespace LongoMatch.Gui
return project;
}
+ public void ShowProjectStats (Project project) {
+ StatsViewer dialog = new StatsViewer ();
+ dialog.LoadStats (project);
+ dialog.TransientFor = mainWindow as Gtk.Window;
+ dialog.Run();
+ dialog.Destroy();
+ }
+
}
}
diff --git a/LongoMatch.GUI/Gui/Helpers/Misc.cs b/LongoMatch.GUI/Gui/Helpers/Misc.cs
index 5c1e9b3..fe998a6 100644
--- a/LongoMatch.GUI/Gui/Helpers/Misc.cs
+++ b/LongoMatch.GUI/Gui/Helpers/Misc.cs
@@ -58,7 +58,7 @@ namespace LongoMatch.Gui.Helpers
return pimage;
}
- public static Pixbuf Scale(Pixbuf pixbuf, int max_width, int max_height) {
+ public static Pixbuf Scale(Pixbuf pixbuf, int max_width, int max_height, bool dispose=true) {
int ow,oh,h,w;
h = ow = pixbuf.Height;
@@ -75,7 +75,8 @@ namespace LongoMatch.Gui.Helpers
else
oh = (int)(ow / rate);
scalledPixbuf = pixbuf.ScaleSimple(ow,oh,Gdk.InterpType.Bilinear);
- pixbuf.Dispose();
+ if (dispose)
+ pixbuf.Dispose();
return scalledPixbuf;
} else {
return pixbuf;
diff --git a/LongoMatch.GUI/Gui/MainWindow.cs b/LongoMatch.GUI/Gui/MainWindow.cs
index fc9580e..fc68eb0 100644
--- a/LongoMatch.GUI/Gui/MainWindow.cs
+++ b/LongoMatch.GUI/Gui/MainWindow.cs
@@ -77,6 +77,7 @@ namespace LongoMatch.Gui
public event CloseOpenendProjectHandler CloseOpenedProjectEvent;
public event ImportProjectHandler ImportProjectEvent;
public event ExportProjectHandler ExportProjectEvent;
+ public event ShowProjectStats ShowProjectStatsEvent;
/* Managers */
public event ManageJobsHandler ManageJobsEvent;
@@ -323,6 +324,7 @@ namespace LongoMatch.Gui
ProjectsManagerAction.Activated += (o, e) => {EmitManageProjects();};
DatabasesManagerAction.Activated += (o, e) => {EmitManageDatabases();};
PreferencesAction.Activated += (sender, e) => {EmitEditPreferences();};
+ ShowProjectStatsAction.Activated += (sender, e) => {EmitShowProjectStats();};
}
void DetachPlayer (bool detach) {
@@ -577,6 +579,12 @@ namespace LongoMatch.Gui
ConvertVideoFilesEvent (converter.Files, converter.EncodingSettings);
}
}
+
+ private void EmitShowProjectStats () {
+ if (ShowProjectStatsEvent != null)
+ ShowProjectStatsEvent (openedProject);
+ }
+
#endregion
#region View
diff --git a/LongoMatch.GUI/LongoMatch.GUI.mdp b/LongoMatch.GUI/LongoMatch.GUI.mdp
index e1c8d24..75aa82b 100644
--- a/LongoMatch.GUI/LongoMatch.GUI.mdp
+++ b/LongoMatch.GUI/LongoMatch.GUI.mdp
@@ -178,6 +178,19 @@
<File subtype="Code" buildaction="Compile"
name="gtk-gui/LongoMatch.Gui.Component.LiveAnalysisPreferences.cs" />
<File subtype="Code" buildaction="Compile" name="Gui/Component/PlaysCoordinatesTagger.cs" />
<File subtype="Code" buildaction="Compile"
name="gtk-gui/LongoMatch.Gui.Component.PlaysCoordinatesTagger.cs" />
+ <File subtype="Directory" buildaction="Compile" name="Gui/Component/Stats" />
+ <File subtype="Directory" buildaction="Compile" name="Gui/Component/Stats" />
+ <File subtype="Code" buildaction="Compile" name="Gui/Component/Stats/CategoryViewer.cs" />
+ <File subtype="Code" buildaction="Compile" name="Gui/Component/Stats/Plotter.cs" />
+ <File subtype="Code" buildaction="Compile" name="Gui/Component/Stats/PangoTextMeasurer.cs" />
+ <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.Stats.Plotter.cs" />
+ <File subtype="Code" buildaction="Compile"
name="gtk-gui/LongoMatch.Gui.Component.Stats.CategoryViewer.cs" />
+ <File subtype="Code" buildaction="Compile" name="Gui/Component/Stats/SubcategoryViewer.cs" />
+ <File subtype="Code" buildaction="Compile"
name="gtk-gui/LongoMatch.Gui.Component.Stats.SubCategoryViewer.cs" />
+ <File subtype="Code" buildaction="Compile" name="Gui/Component/Stats/CategoriesViewer.cs" />
+ <File subtype="Code" buildaction="Compile"
name="gtk-gui/LongoMatch.Gui.Component.Stats.CategoriesViewer.cs" />
+ <File subtype="Code" buildaction="Compile" name="Gui/Dialog/StatsViewer.cs" />
+ <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.StatsViewer.cs" />
</Contents>
<References>
<ProjectReference type="Gac" localcopy="True" refto="atk-sharp, Version=2.12.0.0, Culture=neutral,
PublicKeyToken=35e10195dab3c99f" />
@@ -193,6 +206,7 @@
<ProjectReference type="Gac" localcopy="True" refto="System, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" />
<ProjectReference type="Gac" localcopy="True" refto="System.Core, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" />
<ProjectReference type="Gac" localcopy="True" refto="System.Drawing, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" />
+ <ProjectReference type="Project" localcopy="True" refto="OxyPlotMono" />
</References>
<LanguageParameters ApplicationIcon="." CodePage="65001" ctype="CSharpProjectParameters" />
</Project>
\ No newline at end of file
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Stats.CategoriesViewer.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Stats.CategoriesViewer.cs
new file mode 100644
index 0000000..a900939
--- /dev/null
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Stats.CategoriesViewer.cs
@@ -0,0 +1,58 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace LongoMatch.Gui.Component.Stats
+{
+ public partial class CategoriesViewer
+ {
+ private global::Gtk.HPaned hpaned1;
+ private global::Gtk.ScrolledWindow GtkScrolledWindow;
+ private global::Gtk.TreeView treeview;
+ private global::Gtk.ScrolledWindow scrolledwindow3;
+ private global::LongoMatch.Gui.Component.Stats.CategoryViewer categoryviewer1;
+
+ protected virtual void Build ()
+ {
+ global::Stetic.Gui.Initialize (this);
+ // Widget LongoMatch.Gui.Component.Stats.CategoriesViewer
+ global::Stetic.BinContainer.Attach (this);
+ this.Name = "LongoMatch.Gui.Component.Stats.CategoriesViewer";
+ // Container child
LongoMatch.Gui.Component.Stats.CategoriesViewer.Gtk.Container+ContainerChild
+ this.hpaned1 = new global::Gtk.HPaned ();
+ this.hpaned1.CanFocus = true;
+ this.hpaned1.Name = "hpaned1";
+ this.hpaned1.Position = 185;
+ // Container child hpaned1.Gtk.Paned+PanedChild
+ this.GtkScrolledWindow = new global::Gtk.ScrolledWindow ();
+ this.GtkScrolledWindow.Name = "GtkScrolledWindow";
+ this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
+ // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
+ this.treeview = new global::Gtk.TreeView ();
+ this.treeview.CanFocus = true;
+ this.treeview.Name = "treeview";
+ this.GtkScrolledWindow.Add (this.treeview);
+ this.hpaned1.Add (this.GtkScrolledWindow);
+ global::Gtk.Paned.PanedChild w2 = ((global::Gtk.Paned.PanedChild)(this.hpaned1
[this.GtkScrolledWindow]));
+ w2.Resize = false;
+ // Container child hpaned1.Gtk.Paned+PanedChild
+ this.scrolledwindow3 = new global::Gtk.ScrolledWindow ();
+ this.scrolledwindow3.CanFocus = true;
+ this.scrolledwindow3.Name = "scrolledwindow3";
+ this.scrolledwindow3.ShadowType = ((global::Gtk.ShadowType)(1));
+ // Container child scrolledwindow3.Gtk.Container+ContainerChild
+ global::Gtk.Viewport w3 = new global::Gtk.Viewport ();
+ w3.ShadowType = ((global::Gtk.ShadowType)(0));
+ // Container child GtkViewport.Gtk.Container+ContainerChild
+ this.categoryviewer1 = new global::LongoMatch.Gui.Component.Stats.CategoryViewer ();
+ this.categoryviewer1.Events = ((global::Gdk.EventMask)(256));
+ this.categoryviewer1.Name = "categoryviewer1";
+ w3.Add (this.categoryviewer1);
+ this.scrolledwindow3.Add (w3);
+ this.hpaned1.Add (this.scrolledwindow3);
+ this.Add (this.hpaned1);
+ if ((this.Child != null)) {
+ this.Child.ShowAll ();
+ }
+ this.Hide ();
+ }
+ }
+}
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Stats.CategoryViewer.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Stats.CategoryViewer.cs
new file mode 100644
index 0000000..722f811
--- /dev/null
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Stats.CategoryViewer.cs
@@ -0,0 +1,45 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace LongoMatch.Gui.Component.Stats
+{
+ public partial class CategoryViewer
+ {
+ private global::Gtk.ScrolledWindow scrolledwindow1;
+ private global::Gtk.VBox vbox1;
+ private global::LongoMatch.Gui.Component.PlaysCoordinatesTagger playscoordinatestagger1;
+
+ protected virtual void Build ()
+ {
+ global::Stetic.Gui.Initialize (this);
+ // Widget LongoMatch.Gui.Component.Stats.CategoryViewer
+ global::Stetic.BinContainer.Attach (this);
+ this.Name = "LongoMatch.Gui.Component.Stats.CategoryViewer";
+ // Container child
LongoMatch.Gui.Component.Stats.CategoryViewer.Gtk.Container+ContainerChild
+ this.scrolledwindow1 = new global::Gtk.ScrolledWindow ();
+ this.scrolledwindow1.CanFocus = true;
+ this.scrolledwindow1.Name = "scrolledwindow1";
+ this.scrolledwindow1.ShadowType = ((global::Gtk.ShadowType)(1));
+ // Container child scrolledwindow1.Gtk.Container+ContainerChild
+ global::Gtk.Viewport w1 = new global::Gtk.Viewport ();
+ w1.ShadowType = ((global::Gtk.ShadowType)(0));
+ // Container child GtkViewport.Gtk.Container+ContainerChild
+ this.vbox1 = new global::Gtk.VBox ();
+ this.vbox1.Name = "vbox1";
+ this.vbox1.Spacing = 6;
+ // Container child vbox1.Gtk.Box+BoxChild
+ this.playscoordinatestagger1 = new
global::LongoMatch.Gui.Component.PlaysCoordinatesTagger ();
+ this.playscoordinatestagger1.Events = ((global::Gdk.EventMask)(256));
+ this.playscoordinatestagger1.Name = "playscoordinatestagger1";
+ this.vbox1.Add (this.playscoordinatestagger1);
+ global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox1
[this.playscoordinatestagger1]));
+ w2.Position = 1;
+ w1.Add (this.vbox1);
+ this.scrolledwindow1.Add (w1);
+ this.Add (this.scrolledwindow1);
+ if ((this.Child != null)) {
+ this.Child.ShowAll ();
+ }
+ this.Hide ();
+ }
+ }
+}
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Stats.Plotter.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Stats.Plotter.cs
new file mode 100644
index 0000000..ad9cc26
--- /dev/null
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Stats.Plotter.cs
@@ -0,0 +1,87 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace LongoMatch.Gui.Component.Stats
+{
+ public partial class Plotter
+ {
+ private global::Gtk.VBox vbox3;
+ private global::Gtk.HBox hbox4;
+ private global::Gtk.RadioButton historadiobutton;
+ private global::Gtk.RadioButton pieradiobutton;
+ private global::Gtk.HBox hbox3;
+ private global::Gtk.Image imageall;
+ private global::Gtk.Image imagehome;
+ private global::Gtk.Image imageaway;
+
+ protected virtual void Build ()
+ {
+ global::Stetic.Gui.Initialize (this);
+ // Widget LongoMatch.Gui.Component.Stats.Plotter
+ global::Stetic.BinContainer.Attach (this);
+ this.Name = "LongoMatch.Gui.Component.Stats.Plotter";
+ // Container child LongoMatch.Gui.Component.Stats.Plotter.Gtk.Container+ContainerChild
+ this.vbox3 = new global::Gtk.VBox ();
+ this.vbox3.Name = "vbox3";
+ this.vbox3.Spacing = 6;
+ // Container child vbox3.Gtk.Box+BoxChild
+ this.hbox4 = new global::Gtk.HBox ();
+ this.hbox4.Name = "hbox4";
+ this.hbox4.Spacing = 6;
+ // Container child hbox4.Gtk.Box+BoxChild
+ this.historadiobutton = new global::Gtk.RadioButton
(global::Mono.Unix.Catalog.GetString ("Histogram"));
+ this.historadiobutton.CanFocus = true;
+ this.historadiobutton.Name = "historadiobutton";
+ this.historadiobutton.DrawIndicator = true;
+ this.historadiobutton.UseUnderline = true;
+ this.historadiobutton.Group = new global::GLib.SList (global::System.IntPtr.Zero);
+ this.hbox4.Add (this.historadiobutton);
+ global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.hbox4
[this.historadiobutton]));
+ w1.Position = 0;
+ // Container child hbox4.Gtk.Box+BoxChild
+ this.pieradiobutton = new global::Gtk.RadioButton
(global::Mono.Unix.Catalog.GetString ("Pie chart"));
+ this.pieradiobutton.CanFocus = true;
+ this.pieradiobutton.Name = "pieradiobutton";
+ this.pieradiobutton.DrawIndicator = true;
+ this.pieradiobutton.UseUnderline = true;
+ this.pieradiobutton.Group = this.historadiobutton.Group;
+ this.hbox4.Add (this.pieradiobutton);
+ global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox4
[this.pieradiobutton]));
+ w2.Position = 1;
+ this.vbox3.Add (this.hbox4);
+ global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.hbox4]));
+ w3.Position = 0;
+ w3.Expand = false;
+ w3.Fill = false;
+ // Container child vbox3.Gtk.Box+BoxChild
+ this.hbox3 = new global::Gtk.HBox ();
+ this.hbox3.Name = "hbox3";
+ this.hbox3.Spacing = 6;
+ // Container child hbox3.Gtk.Box+BoxChild
+ this.imageall = new global::Gtk.Image ();
+ this.imageall.Name = "imageall";
+ this.hbox3.Add (this.imageall);
+ global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox3
[this.imageall]));
+ w4.Position = 0;
+ // Container child hbox3.Gtk.Box+BoxChild
+ this.imagehome = new global::Gtk.Image ();
+ this.imagehome.Name = "imagehome";
+ this.hbox3.Add (this.imagehome);
+ global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox3
[this.imagehome]));
+ w5.Position = 1;
+ // Container child hbox3.Gtk.Box+BoxChild
+ this.imageaway = new global::Gtk.Image ();
+ this.imageaway.Name = "imageaway";
+ this.hbox3.Add (this.imageaway);
+ global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox3
[this.imageaway]));
+ w6.Position = 2;
+ this.vbox3.Add (this.hbox3);
+ global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.hbox3]));
+ w7.Position = 1;
+ this.Add (this.vbox3);
+ if ((this.Child != null)) {
+ this.Child.ShowAll ();
+ }
+ this.Hide ();
+ }
+ }
+}
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Stats.SubCategoryViewer.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Stats.SubCategoryViewer.cs
new file mode 100644
index 0000000..d068cc4
--- /dev/null
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Stats.SubCategoryViewer.cs
@@ -0,0 +1,67 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace LongoMatch.Gui.Component.Stats
+{
+ public partial class SubCategoryViewer
+ {
+ private global::Gtk.Frame frame2;
+ private global::Gtk.Alignment GtkAlignment;
+ private global::Gtk.HBox hbox1;
+ private global::Gtk.ScrolledWindow GtkScrolledWindow;
+ private global::Gtk.TreeView treeview;
+ private global::LongoMatch.Gui.Component.Stats.Plotter plotter;
+ private global::Gtk.Label gtkframe;
+
+ protected virtual void Build ()
+ {
+ global::Stetic.Gui.Initialize (this);
+ // Widget LongoMatch.Gui.Component.Stats.SubCategoryViewer
+ global::Stetic.BinContainer.Attach (this);
+ this.Name = "LongoMatch.Gui.Component.Stats.SubCategoryViewer";
+ // Container child
LongoMatch.Gui.Component.Stats.SubCategoryViewer.Gtk.Container+ContainerChild
+ this.frame2 = new global::Gtk.Frame ();
+ this.frame2.Name = "frame2";
+ this.frame2.ShadowType = ((global::Gtk.ShadowType)(0));
+ // Container child frame2.Gtk.Container+ContainerChild
+ this.GtkAlignment = new global::Gtk.Alignment (0F, 0F, 1F, 1F);
+ this.GtkAlignment.Name = "GtkAlignment";
+ this.GtkAlignment.LeftPadding = ((uint)(12));
+ // Container child GtkAlignment.Gtk.Container+ContainerChild
+ this.hbox1 = new global::Gtk.HBox ();
+ this.hbox1.Name = "hbox1";
+ this.hbox1.Spacing = 6;
+ // Container child hbox1.Gtk.Box+BoxChild
+ this.GtkScrolledWindow = new global::Gtk.ScrolledWindow ();
+ this.GtkScrolledWindow.Name = "GtkScrolledWindow";
+ this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
+ // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
+ this.treeview = new global::Gtk.TreeView ();
+ this.treeview.CanFocus = true;
+ this.treeview.Name = "treeview";
+ this.GtkScrolledWindow.Add (this.treeview);
+ this.hbox1.Add (this.GtkScrolledWindow);
+ global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1
[this.GtkScrolledWindow]));
+ w2.Position = 0;
+ // Container child hbox1.Gtk.Box+BoxChild
+ this.plotter = new global::LongoMatch.Gui.Component.Stats.Plotter ();
+ this.plotter.Events = ((global::Gdk.EventMask)(256));
+ this.plotter.Name = "plotter";
+ this.hbox1.Add (this.plotter);
+ global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.plotter]));
+ w3.Position = 1;
+ w3.Expand = false;
+ this.GtkAlignment.Add (this.hbox1);
+ this.frame2.Add (this.GtkAlignment);
+ this.gtkframe = new global::Gtk.Label ();
+ this.gtkframe.Name = "gtkframe";
+ this.gtkframe.LabelProp = global::Mono.Unix.Catalog.GetString ("<b></b>");
+ this.gtkframe.UseMarkup = true;
+ this.frame2.LabelWidget = this.gtkframe;
+ this.Add (this.frame2);
+ if ((this.Child != null)) {
+ this.Child.ShowAll ();
+ }
+ this.Hide ();
+ }
+ }
+}
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.StatsViewer.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.StatsViewer.cs
new file mode 100644
index 0000000..0bdd78e
--- /dev/null
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.StatsViewer.cs
@@ -0,0 +1,67 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace LongoMatch.Gui.Dialog
+{
+ public partial class StatsViewer
+ {
+ private global::LongoMatch.Gui.Component.Stats.CategoriesViewer categoriesviewer;
+ private global::Gtk.Button buttonCancel;
+ private global::Gtk.Button buttonOk;
+
+ protected virtual void Build ()
+ {
+ global::Stetic.Gui.Initialize (this);
+ // Widget LongoMatch.Gui.Dialog.StatsViewer
+ this.Name = "LongoMatch.Gui.Dialog.StatsViewer";
+ this.WindowPosition = ((global::Gtk.WindowPosition)(4));
+ // Internal child LongoMatch.Gui.Dialog.StatsViewer.VBox
+ global::Gtk.VBox w1 = this.VBox;
+ w1.Name = "dialog1_VBox";
+ w1.BorderWidth = ((uint)(2));
+ // Container child dialog1_VBox.Gtk.Box+BoxChild
+ this.categoriesviewer = new global::LongoMatch.Gui.Component.Stats.CategoriesViewer
();
+ this.categoriesviewer.Events = ((global::Gdk.EventMask)(256));
+ this.categoriesviewer.Name = "categoriesviewer";
+ w1.Add (this.categoriesviewer);
+ global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(w1
[this.categoriesviewer]));
+ w2.Position = 0;
+ // Internal child LongoMatch.Gui.Dialog.StatsViewer.ActionArea
+ global::Gtk.HButtonBox w3 = this.ActionArea;
+ w3.Name = "dialog1_ActionArea";
+ w3.Spacing = 10;
+ w3.BorderWidth = ((uint)(5));
+ w3.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
+ // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
+ this.buttonCancel = new global::Gtk.Button ();
+ this.buttonCancel.CanDefault = true;
+ this.buttonCancel.CanFocus = true;
+ this.buttonCancel.Name = "buttonCancel";
+ this.buttonCancel.UseStock = true;
+ this.buttonCancel.UseUnderline = true;
+ this.buttonCancel.Label = "gtk-cancel";
+ this.AddActionWidget (this.buttonCancel, -6);
+ global::Gtk.ButtonBox.ButtonBoxChild w4 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w3
[this.buttonCancel]));
+ w4.Expand = false;
+ w4.Fill = false;
+ // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
+ this.buttonOk = new global::Gtk.Button ();
+ this.buttonOk.CanDefault = true;
+ this.buttonOk.CanFocus = true;
+ this.buttonOk.Name = "buttonOk";
+ this.buttonOk.UseStock = true;
+ this.buttonOk.UseUnderline = true;
+ this.buttonOk.Label = "gtk-ok";
+ this.AddActionWidget (this.buttonOk, -5);
+ global::Gtk.ButtonBox.ButtonBoxChild w5 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w3
[this.buttonOk]));
+ w5.Position = 1;
+ w5.Expand = false;
+ w5.Fill = false;
+ if ((this.Child != null)) {
+ this.Child.ShowAll ();
+ }
+ this.DefaultWidth = 1167;
+ this.DefaultHeight = 619;
+ this.Show ();
+ }
+ }
+}
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs
index 61093a7..4081975 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs
@@ -39,6 +39,7 @@ namespace LongoMatch.Gui
private global::Gtk.Action VideoConverterToolAction;
private global::Gtk.Action DatabasesManagerAction;
private global::Gtk.Action PreferencesAction;
+ private global::Gtk.Action ShowProjectStatsAction;
private global::Gtk.VBox vbox1;
private global::Gtk.VBox menubox;
private global::Gtk.MenuBar menubar1;
@@ -145,12 +146,12 @@ namespace LongoMatch.Gui
this.ImportProjectAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Import
Project");
w1.Add (this.ImportProjectAction, "<Control>i");
this.ManualTaggingViewAction = new global::Gtk.RadioAction
("ManualTaggingViewAction", global::Mono.Unix.Catalog.GetString ("Manual tagging view"), null, null, 0);
- this.ManualTaggingViewAction.Group = this.TimelineViewAction.Group;
+ this.ManualTaggingViewAction.Group = this.TaggingViewAction.Group;
this.ManualTaggingViewAction.Sensitive = false;
this.ManualTaggingViewAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Free
Capture Mode");
w1.Add (this.ManualTaggingViewAction, "<Control>f");
this.GameUnitsViewAction = new global::Gtk.RadioAction ("GameUnitsViewAction",
global::Mono.Unix.Catalog.GetString ("Game units view"), null, null, 0);
- this.GameUnitsViewAction.Group = this.TimelineViewAction.Group;
+ this.GameUnitsViewAction.Group = this.TaggingViewAction.Group;
this.GameUnitsViewAction.Sensitive = false;
this.GameUnitsViewAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Game
units view");
w1.Add (this.GameUnitsViewAction, null);
@@ -185,6 +186,9 @@ namespace LongoMatch.Gui
this.PreferencesAction = new global::Gtk.Action ("PreferencesAction",
global::Mono.Unix.Catalog.GetString ("Preferences"), null, null);
this.PreferencesAction.ShortLabel = global::Mono.Unix.Catalog.GetString
("Preferences");
w1.Add (this.PreferencesAction, null);
+ this.ShowProjectStatsAction = new global::Gtk.Action ("ShowProjectStatsAction",
global::Mono.Unix.Catalog.GetString ("Show project stats"), null, null);
+ this.ShowProjectStatsAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Show
project stats");
+ w1.Add (this.ShowProjectStatsAction, null);
this.UIManager.InsertActionGroup (w1, 0);
this.AddAccelGroup (this.UIManager.AccelGroup);
this.Name = "LongoMatch.Gui.MainWindow";
@@ -201,7 +205,7 @@ namespace LongoMatch.Gui
this.menubox.Name = "menubox";
this.menubox.Spacing = 6;
// Container child menubox.Gtk.Box+BoxChild
- this.UIManager.AddUiFromString ("<ui><menubar name='menubar1'><menu name='FileAction'
action='FileAction'><menuitem name='NewPojectAction' action='NewPojectAction'/><menuitem name='openAction'
action='openAction'/><menuitem name='SaveProjectAction' action='SaveProjectAction'/><menuitem
name='CloseProjectAction' action='CloseProjectAction'/><separator/><menu name='ImportProjectAction'
action='ImportProjectAction'/><separator/><menuitem name='PreferencesAction'
action='PreferencesAction'/><separator/><menuitem name='QuitAction' action='QuitAction'/></menu><menu
name='ToolsAction' action='ToolsAction'><menuitem name='ProjectsManagerAction'
action='ProjectsManagerAction'/><menuitem name='CategoriesTemplatesManagerAction'
action='CategoriesTemplatesManagerAction'/><menuitem name='TeamsTemplatesManagerAction'
action='TeamsTemplatesManagerAction'/><menuitem name='DatabasesManagerAction'
action='DatabasesManagerAction'/><separator/><menu name='ExportProjectAction1' action='Export
ProjectAction1'><menuitem name='ExportToProjectFileAction'
action='ExportToProjectFileAction'/></menu><separator/><menuitem name='VideoConverterToolAction'
action='VideoConverterToolAction'/></menu><menu name='ViewAction' action='ViewAction'><menuitem
name='FullScreenAction' action='FullScreenAction'/><menuitem name='HideAllWidgetsAction'
action='HideAllWidgetsAction'/><separator/><menuitem name='PlaylistAction'
action='PlaylistAction'/><separator/><menuitem name='TagSubcategoriesAction'
action='TagSubcategoriesAction'/><menuitem name='TaggingViewAction' action='TaggingViewAction'/><menuitem
name='ManualTaggingViewAction' action='ManualTaggingViewAction'/><menuitem name='TimelineViewAction'
action='TimelineViewAction'/><menuitem name='GameUnitsViewAction' action='GameUnitsViewAction'/></menu><menu
name='HelpAction' action='HelpAction'><menuitem name='AboutAction' action='AboutAction'/><menuitem
name='HelpAction1' action='HelpAction1'/><menuitem name='dialogInfoAction' action
='dialogInfoAction'/></menu></menubar></ui>");
+ this.UIManager.AddUiFromString ("<ui><menubar name='menubar1'><menu name='FileAction'
action='FileAction'><menuitem name='NewPojectAction' action='NewPojectAction'/><menuitem name='openAction'
action='openAction'/><menuitem name='SaveProjectAction' action='SaveProjectAction'/><menuitem
name='CloseProjectAction' action='CloseProjectAction'/><separator/><menu name='ImportProjectAction'
action='ImportProjectAction'/><separator/><menuitem name='PreferencesAction'
action='PreferencesAction'/><separator/><menuitem name='QuitAction' action='QuitAction'/></menu><menu
name='ToolsAction' action='ToolsAction'><menuitem name='ProjectsManagerAction'
action='ProjectsManagerAction'/><menuitem name='CategoriesTemplatesManagerAction'
action='CategoriesTemplatesManagerAction'/><menuitem name='TeamsTemplatesManagerAction'
action='TeamsTemplatesManagerAction'/><menuitem name='DatabasesManagerAction'
action='DatabasesManagerAction'/><separator/><menuitem name='ShowProjectStatsAction' action='
ShowProjectStatsAction'/><menu name='ExportProjectAction1' action='ExportProjectAction1'><menuitem
name='ExportToProjectFileAction' action='ExportToProjectFileAction'/></menu><separator/><menuitem
name='VideoConverterToolAction' action='VideoConverterToolAction'/></menu><menu name='ViewAction'
action='ViewAction'><menuitem name='FullScreenAction' action='FullScreenAction'/><menuitem
name='HideAllWidgetsAction' action='HideAllWidgetsAction'/><separator/><menuitem name='PlaylistAction'
action='PlaylistAction'/><separator/><menuitem name='TagSubcategoriesAction'
action='TagSubcategoriesAction'/><menuitem name='TaggingViewAction' action='TaggingViewAction'/><menuitem
name='ManualTaggingViewAction' action='ManualTaggingViewAction'/><menuitem name='TimelineViewAction'
action='TimelineViewAction'/><menuitem name='GameUnitsViewAction' action='GameUnitsViewAction'/></menu><menu
name='HelpAction' action='HelpAction'><menuitem name='AboutAction' action='AboutAction'/><menuitem name='He
lpAction1' action='HelpAction1'/><menuitem name='dialogInfoAction'
action='dialogInfoAction'/></menu></menubar></ui>");
this.menubar1 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget ("/menubar1")));
this.menubar1.Name = "menubar1";
this.menubox.Add (this.menubar1);
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index 0bd3947..fbe50f0 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -1831,6 +1831,11 @@
<property name="Label" translatable="yes">Preferences</property>
<property name="ShortLabel" translatable="yes">Preferences</property>
</action>
+ <action id="ShowProjectStatsAction">
+ <property name="Type">Action</property>
+ <property name="Label" translatable="yes">Show project stats</property>
+ <property name="ShortLabel" translatable="yes">Show project stats</property>
+ </action>
</action-group>
<property name="MemberName" />
<property name="Title" translatable="yes">LongoMatch</property>
@@ -1867,6 +1872,7 @@
<node type="Menuitem" action="TeamsTemplatesManagerAction" />
<node type="Menuitem" action="DatabasesManagerAction" />
<node type="Separator" />
+ <node type="Menuitem" action="ShowProjectStatsAction" />
<node type="Menu" action="ExportProjectAction1">
<node type="Menuitem" action="ExportToProjectFileAction" />
</node>
@@ -8662,4 +8668,302 @@ Defining <b> Game Units </b> will help you during the analysis to in
</widget>
</child>
</widget>
+ <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.Stats.CategoryViewer" design-size="720 598">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="LongoMatch.Gui.Component.PlaysCoordinatesTagger"
id="playscoordinatestagger1">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.Stats.Plotter" design-size="258 181">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox4">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.RadioButton" id="historadiobutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Histogram</property>
+ <property name="Active">True</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.RadioButton" id="pieradiobutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Label" translatable="yes">Pie chart</property>
+ <property name="DrawIndicator">True</property>
+ <property name="HasLabel">True</property>
+ <property name="UseUnderline">True</property>
+ <property name="Group">group1</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HBox" id="hbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Image" id="imageall">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Image" id="imagehome">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Image" id="imageaway">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.Stats.SubCategoryViewer" design-size="461 270">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.Frame" id="frame2">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Gtk.Alignment" id="GtkAlignment">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeview">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="LongoMatch.Gui.Component.Stats.Plotter" id="plotter">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="gtkframe">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes"><b></b></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.Stats.CategoriesViewer" design-size="812 461">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.HPaned" id="hpaned1">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Position">185</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="treeview">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="Resize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="scrolledwindow3">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.Viewport" id="GtkViewport">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="LongoMatch.Gui.Component.Stats.CategoryViewer" id="categoryviewer1">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.StatsViewer" design-size="1167 619">
+ <property name="MemberName" />
+ <property name="WindowPosition">CenterOnParent</property>
+ <property name="Buttons">2</property>
+ <property name="HelpButton">False</property>
+ <child internal-child="VBox">
+ <widget class="Gtk.VBox" id="dialog1_VBox">
+ <property name="MemberName" />
+ <property name="BorderWidth">2</property>
+ <child>
+ <widget class="LongoMatch.Gui.Component.Stats.CategoriesViewer" id="categoriesviewer">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child internal-child="ActionArea">
+ <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
+ <property name="MemberName" />
+ <property name="Spacing">10</property>
+ <property name="BorderWidth">5</property>
+ <property name="Size">2</property>
+ <property name="LayoutStyle">End</property>
+ <child>
+ <widget class="Gtk.Button" id="buttonCancel">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-cancel</property>
+ <property name="ResponseId">-6</property>
+ <property name="label">gtk-cancel</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="buttonOk">
+ <property name="MemberName" />
+ <property name="CanDefault">True</property>
+ <property name="CanFocus">True</property>
+ <property name="UseStock">True</property>
+ <property name="Type">StockItem</property>
+ <property name="StockId">gtk-ok</property>
+ <property name="ResponseId">-5</property>
+ <property name="label">gtk-ok</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
</stetic-interface>
\ No newline at end of file
diff --git a/LongoMatch.GUI/gtk-gui/objects.xml b/LongoMatch.GUI/gtk-gui/objects.xml
index 230d257..b8f1025 100644
--- a/LongoMatch.GUI/gtk-gui/objects.xml
+++ b/LongoMatch.GUI/gtk-gui/objects.xml
@@ -1,74 +1,102 @@
<objects attr-sync="on">
- <object type="LongoMatch.Gui.Component.PlayerPropertiesTreeView" palette-category="LongoMatch"
allow-children="false" base-type="Gtk.TreeView">
+ <object type="LongoMatch.Gui.Component.PlayersFilterTreeView" palette-category="General"
allow-children="false" base-type="Gtk.TreeView">
<itemgroups />
- <signals>
- <itemgroup label="PlayerPropertiesTreeView Signals">
- <signal name="PlayerClicked" />
- <signal name="PlayersSelected" />
- </itemgroup>
- </signals>
+ <signals />
</object>
- <object type="LongoMatch.Gui.Component.PlayListTreeView" palette-category="LongoMatch"
allow-children="false" base-type="Gtk.TreeView">
+ <object type="LongoMatch.Gui.Popup.TransparentDrawingArea" palette-category="General"
allow-children="false" base-type="Gtk.Window">
<itemgroups />
+ <signals />
+ </object>
+ <object type="LongoMatch.Gui.Component.ProjectDetailsWidget" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
+ <itemgroups>
+ <itemgroup label="ProjectDetailsWidget Properties">
+ <property name="Edited" />
+ <property name="Season" />
+ <property name="Competition" />
+ <property name="LocalGoals" />
+ <property name="VisitorGoals" />
+ <property name="Date" />
+ </itemgroup>
+ </itemgroups>
<signals>
+ <itemgroup label="ProjectDetailsWidget Signals">
+ <signal name="EditedEvent" />
+ </itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.CategoriesTreeView" palette-category="LongoMatch"
allow-children="false" base-type="Gtk.TreeView">
+ <object type="LongoMatch.Gui.Component.ButtonsWidget" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
<itemgroups />
<signals>
- <itemgroup label="CategoriesTreeView Signals">
- <signal name="CategoryClicked" />
- <signal name="CategoriesSelected" />
+ <itemgroup label="ButtonsWidget Signals">
+ <signal name="NewMarkEvent" />
+ <signal name="NewMarkStartEvent" />
+ <signal name="NewMarkStopEvent" />
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.TimeReferenceWidget" palette-category="LongoMatch"
allow-children="false" base-type="Gtk.DrawingArea">
- <itemgroups>
- <itemgroup label="TimeReferenceWidget Properties">
- <property name="CurrentFrame" />
- <property name="PixelRatio" />
- <property name="Scroll" />
- <property name="FrameRate" />
- </itemgroup>
- </itemgroups>
- <signals />
- </object>
- <object type="LongoMatch.Gui.Component.RenderingJobsTreeView" palette-category="General"
allow-children="false" base-type="Gtk.TreeView">
+ <object type="LongoMatch.Gui.Component.DrawingToolBox" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
<itemgroups />
<signals>
+ <itemgroup label="DrawingToolBox Signals">
+ <signal name="LineWidthChanged" />
+ <signal name="DrawToolChanged" />
+ <signal name="ColorChanged" />
+ <signal name="VisibilityChanged" />
+ <signal name="ClearDrawing" />
+ <signal name="TransparencyChanged" />
+ </itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.ButtonsWidget" palette-category="LongoMatch" allow-children="false"
base-type="Gtk.Bin">
+ <object type="LongoMatch.Gui.Component.NotesWidget" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
<itemgroups />
<signals>
- <itemgroup label="ButtonsWidget Signals">
- <signal name="NewMarkEvent" />
- <signal name="NewMarkStartEvent" />
- <signal name="NewMarkStopEvent" />
+ <itemgroup label="NotesWidget Signals">
+ <signal name="TimeNodeChanged" />
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.PlayersTaggerWidget" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
+ <object type="LongoMatch.Gui.Component.PlayerProperties" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
<itemgroups />
<signals />
</object>
- <object type="LongoMatch.Gui.Component.TeamTaggerWidget" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
+ <object type="LongoMatch.Gui.Component.PlayersTreeView" palette-category="General" allow-children="false"
base-type="Gtk.TreeView">
<itemgroups />
<signals />
</object>
- <object type="LongoMatch.Gui.Popup.TransparentDrawingArea" palette-category="General"
allow-children="false" base-type="Gtk.Window">
+ <object type="LongoMatch.Gui.Component.PlayerPropertiesTreeView" palette-category="General"
allow-children="false" base-type="Gtk.TreeView">
+ <itemgroups />
+ <signals>
+ <itemgroup label="PlayerPropertiesTreeView Signals">
+ <signal name="PlayerClicked" />
+ <signal name="PlayersSelected" />
+ </itemgroup>
+ </signals>
+ </object>
+ <object type="LongoMatch.Gui.Component.PlayListTreeView" palette-category="General" allow-children="false"
base-type="Gtk.TreeView">
<itemgroups />
<signals />
</object>
- <object type="LongoMatch.Gui.Component.NotesWidget" palette-category="LongoMatch" allow-children="false"
base-type="Gtk.Bin">
+ <object type="LongoMatch.Gui.Component.PlaysTreeView" palette-category="General" allow-children="false"
base-type="Gtk.TreeView">
<itemgroups />
<signals>
- <itemgroup label="NotesWidget Signals">
+ <itemgroup label="PlaysTreeView Signals">
+ <signal name="EditProperties" />
+ </itemgroup>
+ </signals>
+ </object>
+ <object type="LongoMatch.Gui.Component.PlayersListTreeWidget" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
+ <itemgroups />
+ <signals>
+ <itemgroup label="PlayersListTreeWidget Signals">
+ <signal name="TimeNodeSelected" />
<signal name="TimeNodeChanged" />
+ <signal name="PlayListNodeAdded" />
+ <signal name="SnapshotSeriesEvent" />
+ <signal name="RenderPlaylistEvent" />
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.PlayListWidget" palette-category="LongoMatch"
allow-children="false" base-type="Gtk.Bin">
+ <object type="LongoMatch.Gui.Component.PlayListWidget" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
<itemgroups />
<signals>
<itemgroup label="PlayListWidget Signals">
@@ -80,82 +108,73 @@
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.GameUnitsTagger" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
+ <object type="LongoMatch.Gui.Component.ProjectListWidget" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
<itemgroups />
<signals>
- <itemgroup label="GameUnitsTagger Signals">
- <signal name="GameUnitEvent" />
+ <itemgroup label="ProjectListWidget Signals">
+ <signal name="ProjectsSelected" />
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.GameUnitsEditor" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
+ <object type="LongoMatch.Gui.Component.CategoriesTreeView" palette-category="General"
allow-children="false" base-type="Gtk.TreeView">
<itemgroups />
- <signals />
+ <signals>
+ <itemgroup label="CategoriesTreeView Signals">
+ <signal name="CategoryClicked" />
+ <signal name="CategoriesSelected" />
+ </itemgroup>
+ </signals>
</object>
- <object type="LongoMatch.Gui.Component.GameUnitWidget" palette-category="General" allow-children="false"
base-type="Gtk.Frame">
+ <object type="LongoMatch.Gui.Component.TimeScale" palette-category="General" allow-children="false"
base-type="Gtk.DrawingArea">
<itemgroups />
<signals>
- <itemgroup label="GameUnitWidget Signals">
- <signal name="GameUnitEvent" />
+ <itemgroup label="TimeScale Signals">
+ <signal name="NewMarkAtFrameEvent" />
+ <signal name="TimeNodeChanged" />
+ <signal name="TimeNodeSelected" />
+ <signal name="TimeNodeDeleted" />
+ <signal name="PlayListNodeAdded" />
+ <signal name="SnapshotSeries" />
+ <signal name="TagPlay" />
+ <signal name="RenderPlaylist" />
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Base.TimeScaleBase" palette-category="LongoMatch" allow-children="false"
base-type="Gtk.DrawingArea">
+ <object type="LongoMatch.Gui.Component.TimeReferenceWidget" palette-category="General"
allow-children="false" base-type="Gtk.DrawingArea">
<itemgroups>
- <itemgroup label="TimeScaleBase Properties">
- <property name="PixelRatio" />
+ <itemgroup label="TimeReferenceWidget Properties">
<property name="CurrentFrame" />
+ <property name="FrameRate" />
+ <property name="Scroll" />
+ <property name="PixelRatio" />
</itemgroup>
</itemgroups>
<signals />
</object>
- <object type="LongoMatch.Gui.Base.TemplatesEditorWidget" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
- <itemgroups>
- <itemgroup label="ITemplateWidget Properties">
- <property name="Edited" />
- <property name="CanExport" />
- </itemgroup>
- </itemgroups>
- <signals />
- </object>
- <object type="LongoMatch.Gui.Component.GameUnitTimeScale" palette-category="LongoMatch"
allow-children="false" base-type="Gtk.DrawingArea">
- <itemgroups>
- </itemgroups>
- <signals>
- <itemgroup label="GameUnitTimeScale Signals">
- <signal name="UnitChanged" />
- <signal name="UnitSelected" />
- <signal name="UnitDeleted" />
- <signal name="UnitAdded" />
- </itemgroup>
- </signals>
- </object>
- <object type="LongoMatch.Gui.Component.RenderingStateBar" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
- <itemgroups>
- <itemgroup label="RenderingStateBar Properties">
- <property name="Fraction" />
- </itemgroup>
- </itemgroups>
+ <object type="LongoMatch.Gui.Component.CategoryProperties" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
+ <itemgroups />
<signals>
- <itemgroup label="RenderingStateBar Signals">
- <signal name="Cancel" />
- <signal name="ManageJobs" />
+ <itemgroup label="CategoryProperties Signals">
+ <signal name="HotKeyChanged" />
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.DrawingWidget" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
- <itemgroups />
- <signals />
- </object>
- <object type="LongoMatch.Gui.Component.ProjectListWidget" palette-category="LongoMatch"
allow-children="false" base-type="Gtk.Bin">
+ <object type="LongoMatch.Gui.Component.PlaysListTreeWidget" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
<itemgroups />
<signals>
- <itemgroup label="ProjectListWidget Signals">
- <signal name="ProjectsSelected" />
+ <itemgroup label="PlaysListTreeWidget Signals">
+ <signal name="TimeNodeSelected" />
+ <signal name="TimeNodeChanged" />
+ <signal name="TimeNodeDeleted" />
+ <signal name="PlayListNodeAdded" />
+ <signal name="PlayCategoryChanged" />
+ <signal name="SnapshotSeriesEvent" />
+ <signal name="TagPlay" />
+ <signal name="RenderPlaylist" />
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.PlayerProperties" palette-category="General" allow-children="false"
base-type="Gtk.Widget">
+ <object type="LongoMatch.Gui.Component.DrawingWidget" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
<itemgroups />
<signals />
</object>
@@ -163,11 +182,7 @@
<itemgroups />
<signals />
</object>
- <object type="LongoMatch.Gui.Component.PlayersTagger" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
- <itemgroups />
- <signals />
- </object>
- <object type="LongoMatch.Gui.SubCategoriesTreeView" palette-category="LongoMatch" allow-children="false"
base-type="Gtk.TreeView">
+ <object type="LongoMatch.Gui.SubCategoriesTreeView" palette-category="General" allow-children="false"
base-type="Gtk.TreeView">
<itemgroups />
<signals>
<itemgroup label="SubCategoriesTreeView Signals">
@@ -176,84 +191,105 @@
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.CategoriesFilterTreeView" palette-category="LongoMatch"
allow-children="false" base-type="Gtk.TreeView">
+ <object type="LongoMatch.Gui.Component.PlayersTaggerWidget" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
<itemgroups />
<signals />
</object>
- <object type="LongoMatch.Gui.Component.DrawingToolBox" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
+ <object type="LongoMatch.Gui.Component.StringTaggerWidget" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
<itemgroups />
- <signals>
- <itemgroup label="DrawingToolBox Signals">
- <signal name="LineWidthChanged" />
- <signal name="DrawToolChanged" />
- <signal name="ColorChanged" />
- <signal name="VisibilityChanged" />
- <signal name="ClearDrawing" />
- <signal name="TransparencyChanged" />
- </itemgroup>
- </signals>
+ <signals />
</object>
- <object type="LongoMatch.Gui.Component.PlayersFilterTreeView" palette-category="LongoMatch"
allow-children="false" base-type="Gtk.TreeView">
+ <object type="LongoMatch.Gui.Component.TeamTaggerWidget" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
<itemgroups />
<signals />
</object>
- <object type="LongoMatch.Gui.Component.TeamTemplateEditorWidget" palette-category="General"
allow-children="false" base-type="LongoMatch.Gui.Base.TemplatesEditorBase">
- <itemgroups>
- </itemgroups>
+ <object type="LongoMatch.Gui.Component.CategoriesTemplateEditorWidget" palette-category="General"
allow-children="false" base-type="LongoMatch.Gui.Base.TemplatesEditorBase">
+ <itemgroups />
<signals />
</object>
- <object type="LongoMatch.Gui.Component.StringTaggerWidget" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
+ <object type="LongoMatch.Gui.Component.TeamTemplateEditorWidget" palette-category="General"
allow-children="false" base-type="LongoMatch.Gui.Base.TemplatesEditorBase">
<itemgroups />
<signals />
</object>
- <object type="LongoMatch.Gui.Component.TimeScale" palette-category="LongoMatch" allow-children="false"
base-type="Gtk.DrawingArea">
+ <object type="LongoMatch.Gui.Component.RenderingStateBar" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
<itemgroups>
+ <itemgroup label="IRenderingStateBar Properties">
+ <property name="Fraction" />
+ </itemgroup>
</itemgroups>
<signals>
- <itemgroup label="TimeScale Signals">
- <signal name="NewMarkAtFrameEvent" />
- <signal name="TimeNodeChanged" />
- <signal name="TimeNodeSelected" />
- <signal name="TimeNodeDeleted" />
- <signal name="PlayListNodeAdded" />
- <signal name="TagPlay" />
- <signal name="SnapshotSeries" />
- <signal name="RenderPlaylist" />
+ <itemgroup label="IRenderingStateBar Signals">
+ <signal name="Cancel" />
+ <signal name="ManageJobs" />
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.PlaysTreeView" palette-category="LongoMatch" allow-children="false"
base-type="Gtk.TreeView">
- <itemgroups>
- </itemgroups>
+ <object type="LongoMatch.Gui.Component.RenderingJobsTreeView" palette-category="General"
allow-children="false" base-type="Gtk.TreeView">
+ <itemgroups />
+ <signals />
+ </object>
+ <object type="LongoMatch.Gui.Component.GameUnitsEditor" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
+ <itemgroups />
+ <signals />
+ </object>
+ <object type="LongoMatch.Gui.Component.GameUnitWidget" palette-category="General" allow-children="false"
base-type="Gtk.Frame">
+ <itemgroups />
<signals>
- <itemgroup label="PlaysTreeView Signals">
- <signal name="EditProperties" />
+ <itemgroup label="GameUnitWidget Signals">
+ <signal name="GameUnitEvent" />
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.PlayersListTreeWidget" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
+ <object type="LongoMatch.Gui.Component.GameUnitsTagger" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
<itemgroups />
<signals>
- <itemgroup label="PlayersListTreeWidget Signals">
- <signal name="TimeNodeSelected" />
- <signal name="TimeNodeChanged" />
- <signal name="PlayListNodeAdded" />
- <signal name="SnapshotSeriesEvent" />
- <signal name="RenderPlaylistEvent" />
+ <itemgroup label="GameUnitsTagger Signals">
+ <signal name="GameUnitEvent" />
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.CategoriesTemplateEditorWidget" palette-category="General"
allow-children="false" base-type="LongoMatch.Gui.Base.TemplatesEditorBase">
+ <object type="LongoMatch.Gui.Base.TimeScaleBase" palette-category="General" allow-children="false"
base-type="Gtk.DrawingArea">
<itemgroups>
+ <itemgroup label="TimeScaleBase Properties">
+ <property name="PixelRatio" />
+ <property name="CurrentFrame" />
+ </itemgroup>
</itemgroups>
<signals />
</object>
- <object type="LongoMatch.Gui.Component.PlayersTreeView" palette-category="LongoMatch"
allow-children="false" base-type="Gtk.TreeView">
+ <object type="LongoMatch.Gui.Base.TemplatesEditorBase" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
<itemgroups>
+ <itemgroup label="TemplatesEditorBase Properties">
+ <property name="CanExport" />
+ <property name="Edited" />
+ </itemgroup>
</itemgroups>
+ <signals />
+ </object>
+ <object type="LongoMatch.Gui.Base.TemplatesEditorWidget" palette-category="General" allow-children="false"
base-type="LongoMatch.Gui.Base.TemplatesEditorBase">
+ <itemgroups>
+ <itemgroup label="ITemplateWidget Properties">
+ <property name="Edited" />
+ <property name="CanExport" />
+ </itemgroup>
+ </itemgroups>
+ <signals />
+ </object>
+ <object type="LongoMatch.Gui.Component.GameUnitTimeScale" palette-category="General"
allow-children="false" base-type="Gtk.DrawingArea">
+ <itemgroups />
<signals>
+ <itemgroup label="GameUnitTimeScale Signals">
+ <signal name="UnitChanged" />
+ <signal name="UnitSelected" />
+ <signal name="UnitDeleted" />
+ <signal name="UnitAdded" />
+ </itemgroup>
</signals>
</object>
+ <object type="LongoMatch.Gui.Component.PlayersTagger" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
+ <itemgroups />
+ <signals />
+ </object>
<object type="LongoMatch.Gui.Component.PlaysSelectionWidget" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
<itemgroups />
<signals>
@@ -268,53 +304,28 @@
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.PlaysListTreeWidget" palette-category="LongoMatch"
allow-children="false" base-type="Gtk.Bin">
+ <object type="LongoMatch.Gui.Component.CategoriesFilterTreeView" palette-category="General"
allow-children="false" base-type="Gtk.TreeView">
<itemgroups />
- <signals>
- <itemgroup label="PlaysListTreeWidget Signals">
- <signal name="TimeNodeSelected" />
- <signal name="TimeNodeChanged" />
- <signal name="TimeNodeDeleted" />
- <signal name="PlayListNodeAdded" />
- <signal name="PlayCategoryChanged" />
- <signal name="SnapshotSeriesEvent" />
- <signal name="TagPlay" />
- <signal name="RenderPlaylist" />
- </itemgroup>
- </signals>
+ <signals />
</object>
- <object type="LongoMatch.Gui.Component.ProjectDetailsWidget" palette-category="LongoMatch"
allow-children="false" base-type="Gtk.Bin">
- <itemgroups>
- <itemgroup label="ProjectDetailsWidget Properties">
- <property name="Edited" />
- <property name="Season" />
- <property name="Competition" />
- <property name="LocalGoals" />
- <property name="VisitorGoals" />
- <property name="Date" />
- </itemgroup>
- </itemgroups>
- <signals>
- <itemgroup label="ProjectDetailsWidget Signals">
- <signal name="EditedEvent" />
- </itemgroup>
- </signals>
+ <object type="LongoMatch.Gui.Component.CoordinatesTagger" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
+ <itemgroups />
+ <signals />
</object>
- <object type="LongoMatch.Gui.Component.CategoryProperties" palette-category="LongoMatch"
allow-children="false" base-type="Gtk.Bin">
+ <object type="LongoMatch.Gui.Component.GeneralPreferencesPanel" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
<itemgroups />
- <signals>
- <itemgroup label="CategoryProperties Signals">
- <signal name="HotKeyChanged" />
- </itemgroup>
- </signals>
+ <signals />
</object>
- <object type="LongoMatch.Gui.Base.TemplatesEditorBase" palette-category="LongoMatch"
allow-children="false" base-type="Gtk.Bin">
- <itemgroups>
- <itemgroup label="TemplatesEditorBase Properties">
- <property name="CanExport" />
- <property name="Edited" />
- </itemgroup>
- </itemgroups>
+ <object type="LongoMatch.Gui.Component.VideoPreferencesPanel" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
+ <itemgroups />
+ <signals />
+ </object>
+ <object type="LongoMatch.Gui.Component.LiveAnalysisPreferences" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
+ <itemgroups />
+ <signals />
+ </object>
+ <object type="LongoMatch.Gui.Component.PlaysCoordinatesTagger" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
+ <itemgroups />
<signals />
</object>
<object type="LongoMatch.Gui.CapturerBin" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
@@ -373,23 +384,19 @@
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.CoordinatesTagger" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
+ <object type="LongoMatch.Gui.Component.Stats.Plotter" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
<itemgroups />
<signals />
</object>
- <object type="LongoMatch.Gui.Component.GeneralPreferencesPanel" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
+ <object type="LongoMatch.Gui.Component.Stats.CategoryViewer" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
<itemgroups />
<signals />
</object>
- <object type="LongoMatch.Gui.Component.VideoPreferencesPanel" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
+ <object type="LongoMatch.Gui.Component.Stats.SubCategoryViewer" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
<itemgroups />
<signals />
</object>
- <object type="LongoMatch.Gui.Component.LiveAnalysisPreferences" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
- <itemgroups />
- <signals />
- </object>
- <object type="LongoMatch.Gui.Component.PlaysCoordinatesTagger" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
+ <object type="LongoMatch.Gui.Component.Stats.CategoriesViewer" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
<itemgroups />
<signals />
</object>
diff --git a/LongoMatch.Services/Services/EventsManager.cs b/LongoMatch.Services/Services/EventsManager.cs
index ea14e32..8b7e486 100644
--- a/LongoMatch.Services/Services/EventsManager.cs
+++ b/LongoMatch.Services/Services/EventsManager.cs
@@ -27,6 +27,7 @@ using LongoMatch.Interfaces.GUI;
using LongoMatch.Store;
using Mono.Unix;
using System.IO;
+using LongoMatch.Stats;
namespace LongoMatch.Services
{
@@ -97,6 +98,8 @@ namespace LongoMatch.Services
/* Connect SnapshotSeries events */
mainWindow.SnapshotSeriesEvent += OnSnapshotSeries;
+ mainWindow.ShowProjectStatsEvent += HandleShowProjectStatsEvent;
+
/* Connect player events */
player.Prev += OnPrev;
player.SegmentClosedEvent += OnSegmentClosedEvent;
@@ -104,6 +107,11 @@ namespace LongoMatch.Services
player.PlaybackRateChanged += HandlePlaybackRateChanged;
}
+ void HandleShowProjectStatsEvent (Project project)
+ {
+ guiToolkit.ShowProjectStats (project);
+ }
+
void RenderPlay (Project project, Play play, MediaFile file) {
PlayList playlist;
EncodingSettings settings;
diff --git a/LongoMatch.mds b/LongoMatch.mds
index a726099..c267a23 100644
--- a/LongoMatch.mds
+++ b/LongoMatch.mds
@@ -27,6 +27,7 @@
<Entry build="True" name="LongoMatch.GUI.Multimedia" configuration="Debug" />
<Entry build="True" name="LongoMatch.Addins" configuration="Debug" />
<Entry build="True" name="LongoMatch.Plugins" configuration="Debug" />
+ <Entry build="True" name="OxyPlotMono" configuration="Debug" />
</Configuration>
<Configuration name="Release" ctype="CombineConfiguration">
<Entry build="True" name="LongoMatch.GUI" configuration="Release" />
@@ -38,6 +39,7 @@
<Entry build="True" name="LongoMatch.GUI.Multimedia" configuration="Release" />
<Entry build="True" name="LongoMatch.Addins" configuration="Release" />
<Entry build="True" name="LongoMatch.Plugins" configuration="Release" />
+ <Entry build="True" name="OxyPlotMono" configuration="Release" />
</Configuration>
</Configurations>
<StartMode startupentry="LongoMatchGtk" single="True">
@@ -50,6 +52,7 @@
<Execute type="None" entry="LongoMatch.GUI.Multimedia" />
<Execute type="None" entry="LongoMatch.Addins" />
<Execute type="None" entry="LongoMatch.Plugins" />
+ <Execute type="None" entry="OxyPlotMono" />
</StartMode>
<Entries>
<Entry filename="LongoMatch.GUI/LongoMatch.GUI.mdp" />
@@ -61,5 +64,6 @@
<Entry filename="LongoMatch.GUI.Multimedia/LongoMatch.GUI.Multimedia.mdp" />
<Entry filename="LongoMatch.Addins/LongoMatch.Addins.mdp" />
<Entry filename="LongoMatch.Plugins/LongoMatch.Plugins.mdp" />
+ <Entry filename="oxyplot/OxyPlotMono/OxyPlotMono.csproj" />
</Entries>
</Combine>
\ No newline at end of file
diff --git a/oxyplot/OxyPlot/Render/IRenderContext.cs b/oxyplot/OxyPlot/Render/IRenderContext.cs
index 2bebb80..2544c36 100644
--- a/oxyplot/OxyPlot/Render/IRenderContext.cs
+++ b/oxyplot/OxyPlot/Render/IRenderContext.cs
@@ -34,7 +34,7 @@ namespace OxyPlot
/// <summary>
/// Defines rendering functionality.
/// </summary>
- public interface IRenderContext
+ public interface IRenderContext: ITextMeasurer
{
/// <summary>
/// Gets a value indicating whether the context renders to screen.
@@ -286,26 +286,6 @@ namespace OxyPlot
OxySize? maxSize = null);
/// <summary>
- /// Measures the text.
- /// </summary>
- /// <param name="text">
- /// The text.
- /// </param>
- /// <param name="fontFamily">
- /// The font family.
- /// </param>
- /// <param name="fontSize">
- /// Size of the font.
- /// </param>
- /// <param name="fontWeight">
- /// The font weight.
- /// </param>
- /// <returns>
- /// The text size.
- /// </returns>
- OxySize MeasureText(string text, string fontFamily = null, double fontSize = 10, double fontWeight =
500);
-
- /// <summary>
/// Sets the tool tip for the following items.
/// </summary>
/// <params>
@@ -397,4 +377,8 @@ namespace OxyPlot
/// </value>
public double DpiY { get; set; }
}
+
+ public interface ITextMeasurer {
+ OxySize MeasureText(string text, string fontFamily = null, double fontSize = 10, double
fontWeight = 500);
+ }
}
\ No newline at end of file
diff --git a/oxyplot/OxyPlot/Svg/SvgExporter.cs b/oxyplot/OxyPlot/Svg/SvgExporter.cs
index ef733e6..392e13c 100644
--- a/oxyplot/OxyPlot/Svg/SvgExporter.cs
+++ b/oxyplot/OxyPlot/Svg/SvgExporter.cs
@@ -45,7 +45,7 @@ namespace OxyPlot
/// <param name="height">The height (points).</param>
/// <param name="isDocument">if set to <c>true</c>, the xml headers will be included (?xml and
!DOCTYPE).</param>
/// <param name="textMeasurer">The text measurer.</param>
- public static void Export(PlotModel model, Stream stream, double width, double height, bool
isDocument, IRenderContext textMeasurer)
+ public static void Export(PlotModel model, Stream stream, double width, double height, bool
isDocument, ITextMeasurer textMeasurer)
{
using (var rc = new SvgRenderContext(stream, width, height, true, textMeasurer,
model.Background))
{
diff --git a/oxyplot/OxyPlot/Svg/SvgRenderContext.cs b/oxyplot/OxyPlot/Svg/SvgRenderContext.cs
index 9aa03ae..d3a1357 100644
--- a/oxyplot/OxyPlot/Svg/SvgRenderContext.cs
+++ b/oxyplot/OxyPlot/Svg/SvgRenderContext.cs
@@ -58,7 +58,7 @@ namespace OxyPlot
/// <param name="isDocument">Create an SVG document if set to <c>true</c>.</param>
/// <param name="textMeasurer">The text measurer.</param>
/// <param name="background">The background.</param>
- public SvgRenderContext(Stream s, double width, double height, bool isDocument, IRenderContext
textMeasurer, OxyColor background)
+ public SvgRenderContext(Stream s, double width, double height, bool isDocument, ITextMeasurer
textMeasurer, OxyColor background)
{
if (textMeasurer == null)
{
@@ -79,7 +79,7 @@ namespace OxyPlot
/// <value>
/// The text measurer.
/// </value>
- public IRenderContext TextMeasurer { get; set; }
+ public ITextMeasurer TextMeasurer { get; set; }
/// <summary>
/// Closes the svg writer.
@@ -221,11 +221,11 @@ namespace OxyPlot
{
foreach (var line in lines)
{
+ // p.X -= Math.Sin(rotate / 180.0 * Math.PI) * size.Height;
var size = this.MeasureText(line, fontFamily, fontSize, fontWeight);
+ p.Y += Math.Cos(rotate / 180.0 * Math.PI) * size.Height;
this.w.WriteText(p, line, c, fontFamily, fontSize, fontWeight, rotate, halign, valign);
- p.X -= Math.Sin(rotate / 180.0 * Math.PI) * size.Height;
- p.Y += Math.Cos(rotate / 180.0 * Math.PI) * size.Height;
}
}
}
diff --git a/oxyplot/OxyPlotMono/OxyPlotMono.csproj b/oxyplot/OxyPlotMono/OxyPlotMono.csproj
index 3aa832b..d061e95 100644
--- a/oxyplot/OxyPlotMono/OxyPlotMono.csproj
+++ b/oxyplot/OxyPlotMono/OxyPlotMono.csproj
@@ -14,7 +14,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <OutputPath>bin\Debug</OutputPath>
+ <OutputPath>..\..\bin</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -23,7 +23,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
- <OutputPath>bin\Release</OutputPath>
+ <OutputPath>..\..\bin</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]