create subclasses for guiplayerstats and filters
This commit is contained in:
parent
a97342ec2e
commit
d138c3b4e1
36
pyfpdb/GuiRingPlayerStats.py
Normal file
36
pyfpdb/GuiRingPlayerStats.py
Normal file
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#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
|
36
pyfpdb/GuiTourneyPlayerStats.py
Normal file
36
pyfpdb/GuiTourneyPlayerStats.py
Normal file
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#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
|
42
pyfpdb/RingFilters.py
Normal file
42
pyfpdb/RingFilters.py
Normal file
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#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
|
42
pyfpdb/TourneyFilters.py
Normal file
42
pyfpdb/TourneyFilters.py
Normal file
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#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
|
|
@ -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:
|
|||
<menuitem action="graphs"/>
|
||||
<menuitem action="handreplay"/>
|
||||
<menuitem action="playerdetails"/>
|
||||
<menuitem action="playerstats"/>
|
||||
<menuitem action="ringplayerstats"/>
|
||||
<menuitem action="tourneyplayerstats"/>
|
||||
<menuitem action="posnstats"/>
|
||||
<menuitem action="sessionstats"/>
|
||||
<menuitem action="sessionreplay"/>
|
||||
|
@ -710,7 +712,8 @@ class fpdb:
|
|||
('graphs', None, '_Graphs', '<control>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)', '<control>P', 'Player Stats (tabulated view)', self.tab_player_stats),
|
||||
('ringplayerstats', None, 'Ring _Player Stats (tabulated view)', '<control>P', 'Ring Player Stats (tabulated view)', self.tab_ring_player_stats),
|
||||
('tourneyplayerstats', None, '_Tourney Player Stats (tabulated view)', '<control>T', 'Tourney Player Stats (tabulated view)', self.tab_tourney_player_stats),
|
||||
('posnstats', None, 'P_ositional Stats (tabulated view)', '<control>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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user