From d138c3b4e1cb87c4243134156cdcddeb2890cc3a Mon Sep 17 00:00:00 2001 From: steffen123 Date: Fri, 9 Jul 2010 04:47:33 +0200 Subject: [PATCH] create subclasses for guiplayerstats and filters --- pyfpdb/GuiRingPlayerStats.py | 36 ++++++++++++++++++++++++++++ pyfpdb/GuiTourneyPlayerStats.py | 36 ++++++++++++++++++++++++++++ pyfpdb/RingFilters.py | 42 +++++++++++++++++++++++++++++++++ pyfpdb/TourneyFilters.py | 42 +++++++++++++++++++++++++++++++++ pyfpdb/fpdb.pyw | 21 ++++++++++++----- 5 files changed, 171 insertions(+), 6 deletions(-) create mode 100644 pyfpdb/GuiRingPlayerStats.py create mode 100644 pyfpdb/GuiTourneyPlayerStats.py create mode 100644 pyfpdb/RingFilters.py create mode 100644 pyfpdb/TourneyFilters.py diff --git a/pyfpdb/GuiRingPlayerStats.py b/pyfpdb/GuiRingPlayerStats.py new file mode 100644 index 00000000..11e8a1b1 --- /dev/null +++ b/pyfpdb/GuiRingPlayerStats.py @@ -0,0 +1,36 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +#Copyright 2010 Steffen Schaumburg +#This program is free software: you can redistribute it and/or modify +#it under the terms of the GNU Affero General Public License as published by +#the Free Software Foundation, version 3 of the License. +# +#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 Affero General Public License +#along with this program. If not, see . +#In the "official" distribution you can find the license in agpl-3.0.txt. + +#import traceback +#import threading +#import pygtk +#pygtk.require('2.0') +#import gtk +#import os +#import sys +#from time import time, strftime + +#import Card +#import fpdb_import +#import Database +import RingFilters +import GuiPlayerStats +#import Charset + +class GuiRingPlayerStats (GuiPlayerStats.GuiPlayerStats): + pass +#end class GuiRingPlayerStats \ No newline at end of file diff --git a/pyfpdb/GuiTourneyPlayerStats.py b/pyfpdb/GuiTourneyPlayerStats.py new file mode 100644 index 00000000..585b67f2 --- /dev/null +++ b/pyfpdb/GuiTourneyPlayerStats.py @@ -0,0 +1,36 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +#Copyright 2010 Steffen Schaumburg +#This program is free software: you can redistribute it and/or modify +#it under the terms of the GNU Affero General Public License as published by +#the Free Software Foundation, version 3 of the License. +# +#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 Affero General Public License +#along with this program. If not, see . +#In the "official" distribution you can find the license in agpl-3.0.txt. + +#import traceback +#import threading +#import pygtk +#pygtk.require('2.0') +#import gtk +#import os +#import sys +#from time import time, strftime + +#import Card +#import fpdb_import +#import Database +import TourneyFilters +import GuiPlayerStats +#import Charset + +class GuiTourneyPlayerStats (GuiPlayerStats.GuiPlayerStats): + pass +#end class GuiTourneyPlayerStats \ No newline at end of file diff --git a/pyfpdb/RingFilters.py b/pyfpdb/RingFilters.py new file mode 100644 index 00000000..4780b131 --- /dev/null +++ b/pyfpdb/RingFilters.py @@ -0,0 +1,42 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +#Copyright 2010 Steffen Schaumburg +#This program is free software: you can redistribute it and/or modify +#it under the terms of the GNU Affero General Public License as published by +#the Free Software Foundation, version 3 of the License. +# +#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 Affero General Public License +#along with this program. If not, see . +#In the "official" distribution you can find the license in agpl-3.0.txt. + +#import threading +#import pygtk +#pygtk.require('2.0') +#import gtk +#import os +#import sys +#from optparse import OptionParser +#from time import * +#import gobject +#import pokereval + +#import logging +# logging has been set up in fpdb.py or HUD_main.py, use their settings: +#log = logging.getLogger("filter") + + +#import Configuration +#import Database +#import SQL +#import Charset +import Filters + +class RingFilters(Filters.Filters): + pass +#end class RingFilters \ No newline at end of file diff --git a/pyfpdb/TourneyFilters.py b/pyfpdb/TourneyFilters.py new file mode 100644 index 00000000..dcddba82 --- /dev/null +++ b/pyfpdb/TourneyFilters.py @@ -0,0 +1,42 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +#Copyright 2010 Steffen Schaumburg +#This program is free software: you can redistribute it and/or modify +#it under the terms of the GNU Affero General Public License as published by +#the Free Software Foundation, version 3 of the License. +# +#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 Affero General Public License +#along with this program. If not, see . +#In the "official" distribution you can find the license in agpl-3.0.txt. + +#import threading +#import pygtk +#pygtk.require('2.0') +#import gtk +#import os +#import sys +#from optparse import OptionParser +#from time import * +#import gobject +#import pokereval + +#import logging +# logging has been set up in fpdb.py or HUD_main.py, use their settings: +#log = logging.getLogger("filter") + + +#import Configuration +#import Database +#import SQL +#import Charset +import Filters + +class TourneyFilters(Filters.Filters): + pass +#end class TourneyFilters \ No newline at end of file diff --git a/pyfpdb/fpdb.pyw b/pyfpdb/fpdb.pyw index 5a4f8e58..e2e3f54e 100755 --- a/pyfpdb/fpdb.pyw +++ b/pyfpdb/fpdb.pyw @@ -103,7 +103,8 @@ import GuiLogView import GuiDatabase import GuiBulkImport import ImapSummaries -import GuiPlayerStats +import GuiRingPlayerStats +import GuiTourneyPlayerStats import GuiPositionalStats import GuiTableViewer import GuiAutoImport @@ -665,7 +666,8 @@ class fpdb: - + + @@ -710,7 +712,8 @@ class fpdb: ('graphs', None, '_Graphs', 'G', 'Graphs', self.tabGraphViewer), ('handreplay', None, 'Hand _Replayer (todo)', None, 'Hand Replayer (todo)', self.not_implemented), ('playerdetails', None, 'Player _Details (todo)', None, 'Player Details (todo)', self.not_implemented), - ('playerstats', None, '_Player Stats (tabulated view)', 'P', 'Player Stats (tabulated view)', self.tab_player_stats), + ('ringplayerstats', None, 'Ring _Player Stats (tabulated view)', 'P', 'Ring Player Stats (tabulated view)', self.tab_ring_player_stats), + ('tourneyplayerstats', None, '_Tourney Player Stats (tabulated view)', 'T', 'Tourney Player Stats (tabulated view)', self.tab_tourney_player_stats), ('posnstats', None, 'P_ositional Stats (tabulated view)', 'O', 'Positional Stats (tabulated view)', self.tab_positional_stats), ('sessionstats', None, 'Session Stats', None, 'Session Stats', self.tab_session_stats), ('sessionreplay', None, '_Session Replayer (todo)', None, 'Session Replayer (todo)', self.not_implemented), @@ -893,11 +896,17 @@ class fpdb: bulk_tab=new_import_thread.get_vbox() self.add_and_display_tab(bulk_tab, "Bulk Import") - def tab_player_stats(self, widget, data=None): - new_ps_thread = GuiPlayerStats.GuiPlayerStats(self.config, self.sql, self.window) + def tab_ring_player_stats(self, widget, data=None): + new_ps_thread = GuiRingPlayerStats.GuiRingPlayerStats(self.config, self.sql, self.window) self.threads.append(new_ps_thread) ps_tab=new_ps_thread.get_vbox() - self.add_and_display_tab(ps_tab, "Player Stats") + self.add_and_display_tab(ps_tab, "Ring Player Stats") + + def tab_tourney_player_stats(self, widget, data=None): + new_ps_thread = GuiTourneyPlayerStats.GuiTourneyPlayerStats(self.config, self.sql, self.window) + self.threads.append(new_ps_thread) + ps_tab=new_ps_thread.get_vbox() + self.add_and_display_tab(ps_tab, "Tourney Player Stats") def tab_positional_stats(self, widget, data=None): new_ps_thread = GuiPositionalStats.GuiPositionalStats(self.config, self.sql)