create superclasses for Gui*PlayerStats and *Filters

This commit is contained in:
steffen123 2010-07-11 05:58:00 +02:00
parent e526501384
commit be671859e7
6 changed files with 52 additions and 5 deletions

22
pyfpdb/Filters.py Normal file
View 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
View 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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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