create superclasses for Gui*PlayerStats and *Filters
This commit is contained in:
parent
e526501384
commit
be671859e7
22
pyfpdb/Filters.py
Normal file
22
pyfpdb/Filters.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
#!/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
|
||||
|
||||
class Filters(threading.Thread):
|
||||
pass
|
||||
#end class Filters
|
22
pyfpdb/GuiPlayerStats.py
Normal file
22
pyfpdb/GuiPlayerStats.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
#!/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
|
||||
|
||||
class GuiPlayerStats(threading.Thread):
|
||||
pass
|
||||
#end class GuiPlayerStats
|
|
@ -29,11 +29,12 @@ import fpdb_import
|
|||
import Database
|
||||
import RingFilters
|
||||
import Charset
|
||||
import GuiPlayerStats
|
||||
|
||||
colalias,colshow,colheading,colxalign,colformat,coltype = 0,1,2,3,4,5
|
||||
ranks = {'x':0, '2':2, '3':3, '4':4, '5':5, '6':6, '7':7, '8':8, '9':9, 'T':10, 'J':11, 'Q':12, 'K':13, 'A':14}
|
||||
|
||||
class GuiRingPlayerStats (threading.Thread):
|
||||
class GuiRingPlayerStats (GuiPlayerStats.GuiPlayerStats):
|
||||
|
||||
def __init__(self, config, querylist, mainwin, debug=True):
|
||||
self.debug = debug
|
||||
|
|
|
@ -29,10 +29,11 @@ from time import time, strftime
|
|||
#import Database
|
||||
import Charset
|
||||
import TourneyFilters
|
||||
import GuiPlayerStats
|
||||
|
||||
colalias,colshow,colheading,colxalign,colformat,coltype = 0,1,2,3,4,5
|
||||
|
||||
class GuiTourneyPlayerStats (threading.Thread):
|
||||
class GuiTourneyPlayerStats (GuiPlayerStats.GuiPlayerStats):
|
||||
def __init__(self, config, db, sql, mainwin, debug=True):
|
||||
self.conf = config
|
||||
self.db = db
|
||||
|
|
|
@ -35,9 +35,9 @@ import Configuration
|
|||
import Database
|
||||
import SQL
|
||||
import Charset
|
||||
import Filters
|
||||
|
||||
|
||||
class RingFilters(threading.Thread):
|
||||
class RingFilters(Filters.Filters):
|
||||
def __init__(self, db, config, qdict, display = {}, debug=True):
|
||||
# config and qdict are now redundant
|
||||
self.debug = debug
|
||||
|
|
|
@ -34,8 +34,9 @@ log = logging.getLogger("filter")
|
|||
#import Database
|
||||
#import SQL
|
||||
import Charset
|
||||
import Filters
|
||||
|
||||
class TourneyFilters(threading.Thread):
|
||||
class TourneyFilters(Filters.Filters):
|
||||
def __init__(self, db, config, qdict, display = {}, debug=True):
|
||||
self.debug = debug
|
||||
self.db = db
|
||||
|
|
Loading…
Reference in New Issue
Block a user