Ver Código Fonte

Work on GUI

- Move main window to QMainWindow
- Make NameButtons use as much space as possible via QSizePolicy
- Add toolbar with placeholder buttons with icons
- Make client Pylint-clean
	- E0611 locally disabled due to import hackery in PySide2
	- too-few-public-methods disabled due to stfu
Maarten van den Berg 6 anos atrás
pai
commit
cbe3881065

+ 559 - 0
.pylintrc

@@ -0,0 +1,559 @@
1
+[MASTER]
2
+
3
+# A comma-separated list of package or module names from where C extensions may
4
+# be loaded. Extensions are loading into the active Python interpreter and may
5
+# run arbitrary code.
6
+extension-pkg-whitelist=
7
+
8
+# Add files or directories to the blacklist. They should be base names, not
9
+# paths.
10
+ignore=CVS
11
+
12
+# Add files or directories matching the regex patterns to the blacklist. The
13
+# regex matches against base names, not paths.
14
+ignore-patterns=
15
+
16
+# Python code to execute, usually for sys.path manipulation such as
17
+# pygtk.require().
18
+#init-hook=
19
+
20
+# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
21
+# number of processors available to use.
22
+jobs=1
23
+
24
+# Control the amount of potential inferred values when inferring a single
25
+# object. This can help the performance when dealing with large functions or
26
+# complex, nested conditions.
27
+limit-inference-results=100
28
+
29
+# List of plugins (as comma separated values of python modules names) to load,
30
+# usually to register additional checkers.
31
+load-plugins=
32
+
33
+# Pickle collected data for later comparisons.
34
+persistent=yes
35
+
36
+# Specify a configuration file.
37
+#rcfile=
38
+
39
+# When enabled, pylint would attempt to guess common misconfiguration and emit
40
+# user-friendly hints instead of false-positive error messages.
41
+suggestion-mode=yes
42
+
43
+# Allow loading of arbitrary C extensions. Extensions are imported into the
44
+# active Python interpreter and may run arbitrary code.
45
+unsafe-load-any-extension=no
46
+
47
+
48
+[MESSAGES CONTROL]
49
+
50
+# Only show warnings with the listed confidence levels. Leave empty to show
51
+# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
52
+confidence=
53
+
54
+# Disable the message, report, category or checker with the given id(s). You
55
+# can either give multiple identifiers separated by comma (,) or put this
56
+# option multiple times (only on the command line, not in the configuration
57
+# file where it should appear only once). You can also use "--disable=all" to
58
+# disable everything first and then reenable specific checks. For example, if
59
+# you want to run only the similarities checker, you can use "--disable=all
60
+# --enable=similarities". If you want to run only the classes checker, but have
61
+# no Warning level messages displayed, use "--disable=all --enable=classes
62
+# --disable=W".
63
+disable=print-statement,
64
+        parameter-unpacking,
65
+        unpacking-in-except,
66
+        old-raise-syntax,
67
+        backtick,
68
+        long-suffix,
69
+        old-ne-operator,
70
+        old-octal-literal,
71
+        import-star-module-level,
72
+        non-ascii-bytes-literal,
73
+        raw-checker-failed,
74
+        bad-inline-option,
75
+        locally-disabled,
76
+        locally-enabled,
77
+        file-ignored,
78
+        suppressed-message,
79
+        useless-suppression,
80
+        deprecated-pragma,
81
+        use-symbolic-message-instead,
82
+        apply-builtin,
83
+        basestring-builtin,
84
+        buffer-builtin,
85
+        cmp-builtin,
86
+        coerce-builtin,
87
+        execfile-builtin,
88
+        file-builtin,
89
+        long-builtin,
90
+        raw_input-builtin,
91
+        reduce-builtin,
92
+        standarderror-builtin,
93
+        unicode-builtin,
94
+        xrange-builtin,
95
+        coerce-method,
96
+        delslice-method,
97
+        getslice-method,
98
+        setslice-method,
99
+        no-absolute-import,
100
+        old-division,
101
+        dict-iter-method,
102
+        dict-view-method,
103
+        next-method-called,
104
+        metaclass-assignment,
105
+        indexing-exception,
106
+        raising-string,
107
+        reload-builtin,
108
+        oct-method,
109
+        hex-method,
110
+        nonzero-method,
111
+        cmp-method,
112
+        input-builtin,
113
+        round-builtin,
114
+        intern-builtin,
115
+        unichr-builtin,
116
+        map-builtin-not-iterating,
117
+        zip-builtin-not-iterating,
118
+        range-builtin-not-iterating,
119
+        filter-builtin-not-iterating,
120
+        using-cmp-argument,
121
+        eq-without-hash,
122
+        div-method,
123
+        idiv-method,
124
+        rdiv-method,
125
+        exception-message-attribute,
126
+        invalid-str-codec,
127
+        sys-max-int,
128
+        bad-python3-import,
129
+        deprecated-string-function,
130
+        deprecated-str-translate-call,
131
+        deprecated-itertools-function,
132
+        deprecated-types-field,
133
+        next-method-defined,
134
+        dict-items-not-iterating,
135
+        dict-keys-not-iterating,
136
+        dict-values-not-iterating,
137
+        deprecated-operator-function,
138
+        deprecated-urllib-function,
139
+        xreadlines-attribute,
140
+        deprecated-sys-function,
141
+        exception-escape,
142
+        comprehension-escape,
143
+		too-few-public-methods
144
+
145
+# Enable the message, report, category or checker with the given id(s). You can
146
+# either give multiple identifier separated by comma (,) or put this option
147
+# multiple time (only on the command line, not in the configuration file where
148
+# it should appear only once). See also the "--disable" option for examples.
149
+enable=c-extension-no-member
150
+
151
+
152
+[REPORTS]
153
+
154
+# Python expression which should return a note less than 10 (10 is the highest
155
+# note). You have access to the variables errors warning, statement which
156
+# respectively contain the number of errors / warnings messages and the total
157
+# number of statements analyzed. This is used by the global evaluation report
158
+# (RP0004).
159
+evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
160
+
161
+# Template used to display messages. This is a python new-style format string
162
+# used to format the message information. See doc for all details.
163
+#msg-template=
164
+
165
+# Set the output format. Available formats are text, parseable, colorized, json
166
+# and msvs (visual studio). You can also give a reporter class, e.g.
167
+# mypackage.mymodule.MyReporterClass.
168
+output-format=text
169
+
170
+# Tells whether to display a full report or only the messages.
171
+reports=no
172
+
173
+# Activate the evaluation score.
174
+score=yes
175
+
176
+
177
+[REFACTORING]
178
+
179
+# Maximum number of nested blocks for function / method body
180
+max-nested-blocks=5
181
+
182
+# Complete name of functions that never returns. When checking for
183
+# inconsistent-return-statements if a never returning function is called then
184
+# it will be considered as an explicit return statement and no message will be
185
+# printed.
186
+never-returning-functions=sys.exit
187
+
188
+
189
+[TYPECHECK]
190
+
191
+# List of decorators that produce context managers, such as
192
+# contextlib.contextmanager. Add to this list to register other decorators that
193
+# produce valid context managers.
194
+contextmanager-decorators=contextlib.contextmanager
195
+
196
+# List of members which are set dynamically and missed by pylint inference
197
+# system, and so shouldn't trigger E1101 when accessed. Python regular
198
+# expressions are accepted.
199
+generated-members=
200
+
201
+# Tells whether missing members accessed in mixin class should be ignored. A
202
+# mixin class is detected if its name ends with "mixin" (case insensitive).
203
+ignore-mixin-members=yes
204
+
205
+# Tells whether to warn about missing members when the owner of the attribute
206
+# is inferred to be None.
207
+ignore-none=yes
208
+
209
+# This flag controls whether pylint should warn about no-member and similar
210
+# checks whenever an opaque object is returned when inferring. The inference
211
+# can return multiple potential results while evaluating a Python object, but
212
+# some branches might not be evaluated, which results in partial inference. In
213
+# that case, it might be useful to still emit no-member and other checks for
214
+# the rest of the inferred objects.
215
+ignore-on-opaque-inference=yes
216
+
217
+# List of class names for which member attributes should not be checked (useful
218
+# for classes with dynamically set attributes). This supports the use of
219
+# qualified names.
220
+ignored-classes=optparse.Values,thread._local,_thread._local
221
+
222
+# List of module names for which member attributes should not be checked
223
+# (useful for modules/projects where namespaces are manipulated during runtime
224
+# and thus existing member attributes cannot be deduced by static analysis. It
225
+# supports qualified module names, as well as Unix pattern matching.
226
+ignored-modules=
227
+
228
+# Show a hint with possible names when a member name was not found. The aspect
229
+# of finding the hint is based on edit distance.
230
+missing-member-hint=yes
231
+
232
+# The minimum edit distance a name should have in order to be considered a
233
+# similar match for a missing member name.
234
+missing-member-hint-distance=1
235
+
236
+# The total number of similar names that should be taken in consideration when
237
+# showing a hint for a missing member.
238
+missing-member-max-choices=1
239
+
240
+
241
+[LOGGING]
242
+
243
+# Logging modules to check that the string format arguments are in logging
244
+# function parameter format.
245
+logging-modules=logging
246
+
247
+
248
+[MISCELLANEOUS]
249
+
250
+# List of note tags to take in consideration, separated by a comma.
251
+notes=FIXME,
252
+      XXX,
253
+      TODO
254
+
255
+
256
+[FORMAT]
257
+
258
+# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
259
+expected-line-ending-format=
260
+
261
+# Regexp for a line that is allowed to be longer than the limit.
262
+ignore-long-lines=^\s*(# )?<?https?://\S+>?$
263
+
264
+# Number of spaces of indent required inside a hanging  or continued line.
265
+indent-after-paren=4
266
+
267
+# String used as indentation unit. This is usually "    " (4 spaces) or "\t" (1
268
+# tab).
269
+indent-string='    '
270
+
271
+# Maximum number of characters on a single line.
272
+max-line-length=100
273
+
274
+# Maximum number of lines in a module.
275
+max-module-lines=1000
276
+
277
+# List of optional constructs for which whitespace checking is disabled. `dict-
278
+# separator` is used to allow tabulation in dicts, etc.: {1  : 1,\n222: 2}.
279
+# `trailing-comma` allows a space between comma and closing bracket: (a, ).
280
+# `empty-line` allows space-only lines.
281
+no-space-check=trailing-comma,
282
+               dict-separator
283
+
284
+# Allow the body of a class to be on the same line as the declaration if body
285
+# contains single statement.
286
+single-line-class-stmt=no
287
+
288
+# Allow the body of an if to be on the same line as the test if there is no
289
+# else.
290
+single-line-if-stmt=no
291
+
292
+
293
+[BASIC]
294
+
295
+# Naming style matching correct argument names.
296
+argument-naming-style=snake_case
297
+
298
+# Regular expression matching correct argument names. Overrides argument-
299
+# naming-style.
300
+#argument-rgx=
301
+
302
+# Naming style matching correct attribute names.
303
+attr-naming-style=snake_case
304
+
305
+# Regular expression matching correct attribute names. Overrides attr-naming-
306
+# style.
307
+#attr-rgx=
308
+
309
+# Bad variable names which should always be refused, separated by a comma.
310
+bad-names=foo,
311
+          bar,
312
+          baz,
313
+          toto,
314
+          tutu,
315
+          tata
316
+
317
+# Naming style matching correct class attribute names.
318
+class-attribute-naming-style=any
319
+
320
+# Regular expression matching correct class attribute names. Overrides class-
321
+# attribute-naming-style.
322
+#class-attribute-rgx=
323
+
324
+# Naming style matching correct class names.
325
+class-naming-style=PascalCase
326
+
327
+# Regular expression matching correct class names. Overrides class-naming-
328
+# style.
329
+#class-rgx=
330
+
331
+# Naming style matching correct constant names.
332
+const-naming-style=UPPER_CASE
333
+
334
+# Regular expression matching correct constant names. Overrides const-naming-
335
+# style.
336
+#const-rgx=
337
+
338
+# Minimum line length for functions/classes that require docstrings, shorter
339
+# ones are exempt.
340
+docstring-min-length=-1
341
+
342
+# Naming style matching correct function names.
343
+function-naming-style=snake_case
344
+
345
+# Regular expression matching correct function names. Overrides function-
346
+# naming-style.
347
+#function-rgx=
348
+
349
+# Good variable names which should always be accepted, separated by a comma.
350
+good-names=i,
351
+           j,
352
+           k,
353
+           ex,
354
+           Run,
355
+           _
356
+
357
+# Include a hint for the correct naming format with invalid-name.
358
+include-naming-hint=no
359
+
360
+# Naming style matching correct inline iteration names.
361
+inlinevar-naming-style=any
362
+
363
+# Regular expression matching correct inline iteration names. Overrides
364
+# inlinevar-naming-style.
365
+#inlinevar-rgx=
366
+
367
+# Naming style matching correct method names.
368
+method-naming-style=snake_case
369
+
370
+# Regular expression matching correct method names. Overrides method-naming-
371
+# style.
372
+#method-rgx=
373
+
374
+# Naming style matching correct module names.
375
+module-naming-style=snake_case
376
+
377
+# Regular expression matching correct module names. Overrides module-naming-
378
+# style.
379
+#module-rgx=
380
+
381
+# Colon-delimited sets of names that determine each other's naming style when
382
+# the name regexes allow several styles.
383
+name-group=
384
+
385
+# Regular expression which should only match function or class names that do
386
+# not require a docstring.
387
+no-docstring-rgx=^_
388
+
389
+# List of decorators that produce properties, such as abc.abstractproperty. Add
390
+# to this list to register other decorators that produce valid properties.
391
+# These decorators are taken in consideration only for invalid-name.
392
+property-classes=abc.abstractproperty
393
+
394
+# Naming style matching correct variable names.
395
+variable-naming-style=snake_case
396
+
397
+# Regular expression matching correct variable names. Overrides variable-
398
+# naming-style.
399
+#variable-rgx=
400
+
401
+
402
+[SPELLING]
403
+
404
+# Limits count of emitted suggestions for spelling mistakes.
405
+max-spelling-suggestions=4
406
+
407
+# Spelling dictionary name. Available dictionaries: none. To make it working
408
+# install python-enchant package..
409
+spelling-dict=
410
+
411
+# List of comma separated words that should not be checked.
412
+spelling-ignore-words=
413
+
414
+# A path to a file that contains private dictionary; one word per line.
415
+spelling-private-dict-file=
416
+
417
+# Tells whether to store unknown words to indicated private dictionary in
418
+# --spelling-private-dict-file option instead of raising a message.
419
+spelling-store-unknown-words=no
420
+
421
+
422
+[VARIABLES]
423
+
424
+# List of additional names supposed to be defined in builtins. Remember that
425
+# you should avoid to define new builtins when possible.
426
+additional-builtins=
427
+
428
+# Tells whether unused global variables should be treated as a violation.
429
+allow-global-unused-variables=yes
430
+
431
+# List of strings which can identify a callback function by name. A callback
432
+# name must start or end with one of those strings.
433
+callbacks=cb_,
434
+          _cb
435
+
436
+# A regular expression matching the name of dummy variables (i.e. expected to
437
+# not be used).
438
+dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
439
+
440
+# Argument names that match this expression will be ignored. Default to name
441
+# with leading underscore.
442
+ignored-argument-names=_.*|^ignored_|^unused_
443
+
444
+# Tells whether we should check for unused import in __init__ files.
445
+init-import=no
446
+
447
+# List of qualified module names which can have objects that can redefine
448
+# builtins.
449
+redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
450
+
451
+
452
+[SIMILARITIES]
453
+
454
+# Ignore comments when computing similarities.
455
+ignore-comments=yes
456
+
457
+# Ignore docstrings when computing similarities.
458
+ignore-docstrings=yes
459
+
460
+# Ignore imports when computing similarities.
461
+ignore-imports=no
462
+
463
+# Minimum lines number of a similarity.
464
+min-similarity-lines=4
465
+
466
+
467
+[IMPORTS]
468
+
469
+# Allow wildcard imports from modules that define __all__.
470
+allow-wildcard-with-all=no
471
+
472
+# Analyse import fallback blocks. This can be used to support both Python 2 and
473
+# 3 compatible code, which means that the block might have code that exists
474
+# only in one or another interpreter, leading to false positives when analysed.
475
+analyse-fallback-blocks=no
476
+
477
+# Deprecated modules which should not be used, separated by a comma.
478
+deprecated-modules=optparse,tkinter.tix
479
+
480
+# Create a graph of external dependencies in the given file (report RP0402 must
481
+# not be disabled).
482
+ext-import-graph=
483
+
484
+# Create a graph of every (i.e. internal and external) dependencies in the
485
+# given file (report RP0402 must not be disabled).
486
+import-graph=
487
+
488
+# Create a graph of internal dependencies in the given file (report RP0402 must
489
+# not be disabled).
490
+int-import-graph=
491
+
492
+# Force import order to recognize a module as part of the standard
493
+# compatibility libraries.
494
+known-standard-library=
495
+
496
+# Force import order to recognize a module as part of a third party library.
497
+known-third-party=enchant
498
+
499
+
500
+[DESIGN]
501
+
502
+# Maximum number of arguments for function / method.
503
+max-args=5
504
+
505
+# Maximum number of attributes for a class (see R0902).
506
+max-attributes=7
507
+
508
+# Maximum number of boolean expressions in an if statement.
509
+max-bool-expr=5
510
+
511
+# Maximum number of branch for function / method body.
512
+max-branches=12
513
+
514
+# Maximum number of locals for function / method body.
515
+max-locals=15
516
+
517
+# Maximum number of parents for a class (see R0901).
518
+max-parents=7
519
+
520
+# Maximum number of public methods for a class (see R0904).
521
+max-public-methods=20
522
+
523
+# Maximum number of return / yield for function / method body.
524
+max-returns=6
525
+
526
+# Maximum number of statements in function / method body.
527
+max-statements=50
528
+
529
+# Minimum number of public methods for a class (see R0903).
530
+min-public-methods=2
531
+
532
+
533
+[CLASSES]
534
+
535
+# List of method names used to declare (i.e. assign) instance attributes.
536
+defining-attr-methods=__init__,
537
+                      __new__,
538
+                      setUp
539
+
540
+# List of member names, which should be excluded from the protected access
541
+# warning.
542
+exclude-protected=_asdict,
543
+                  _fields,
544
+                  _replace,
545
+                  _source,
546
+                  _make
547
+
548
+# List of valid names for the first argument in a class method.
549
+valid-classmethod-first-arg=cls
550
+
551
+# List of valid names for the first argument in a metaclass class method.
552
+valid-metaclass-classmethod-first-arg=cls
553
+
554
+
555
+[EXCEPTIONS]
556
+
557
+# Exceptions that will emit a warning when being caught. Defaults to
558
+# "Exception".
559
+overgeneral-exceptions=Exception

+ 83 - 9
piket_client/gui.py

@@ -1,11 +1,23 @@
1 1
 """
2 2
 Provides the graphical front-end for Piket.
3 3
 """
4
+import os
4 5
 import sys
5 6
 from urllib.parse import urljoin
6 7
 
7
-from PySide2.QtWidgets import QApplication, QPushButton, QGridLayout, QWidget
8
-from PySide2.QtGui import QFont
8
+# pylint: disable=E0611
9
+from PySide2.QtWidgets import (
10
+    QApplication,
11
+    QPushButton,
12
+    QGridLayout,
13
+    QWidget,
14
+    QMainWindow,
15
+    QSizePolicy,
16
+    QToolBar,
17
+)
18
+from PySide2.QtGui import QIcon
19
+from PySide2.QtCore import QSize
20
+# pylint: enable=E0611
9 21
 import requests
10 22
 
11 23
 from piket_client.sound import PLOP_WAVE
@@ -19,7 +31,8 @@ def plop() -> None:
19 31
 SERVER_URL = "http://127.0.0.1:5000"
20 32
 
21 33
 
22
-def get_people():
34
+def get_people() -> [dict]:
35
+    ''' Request list of active people from the server. '''
23 36
     request = requests.get(urljoin(SERVER_URL, "/people"))
24 37
     return request.json()["people"]
25 38
 
@@ -33,19 +46,22 @@ class NameButton(QPushButton):
33 46
         self.count = person["count"]
34 47
 
35 48
         super().__init__(self.current_label, *args, **kwargs)
49
+        self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
36 50
 
37 51
         self.clicked.connect(self.plop)
38 52
 
39 53
     @property
40 54
     def current_label(self) -> str:
55
+        ''' Return the label to show on the button. '''
41 56
         return f"{self.name} ({self.count})"
42 57
 
43 58
     def plop(self) -> None:
44
-        r = requests.post(
59
+        ''' Process a click on this button. '''
60
+        req = requests.post(
45 61
             urljoin(SERVER_URL, f"people/{self.person_id}/add_consumption")
46 62
         )
47
-        if r.status_code == 200:
48
-            json = r.json()
63
+        if req.status_code == 200:
64
+            json = req.json()
49 65
             person = json["person"]
50 66
             self.count = person["count"]
51 67
             self.setText(self.current_label)
@@ -55,6 +71,8 @@ class NameButton(QPushButton):
55 71
 
56 72
 
57 73
 class NameButtons(QWidget):
74
+    ''' Main widget responsible for capturing presses and registering them.
75
+    '''
58 76
     def __init__(self) -> None:
59 77
         super().__init__()
60 78
 
@@ -62,6 +80,8 @@ class NameButtons(QWidget):
62 80
         self.init_ui()
63 81
 
64 82
     def init_ui(self) -> None:
83
+        ''' Initialize UI: build GridLayout, retrieve People and build a button
84
+        for each. '''
65 85
         self.layout = QGridLayout()
66 86
 
67 87
         for index, person in enumerate(get_people()):
@@ -71,14 +91,68 @@ class NameButtons(QWidget):
71 91
         self.setLayout(self.layout)
72 92
 
73 93
 
74
-if __name__ == "__main__":
94
+class PiketMainWindow(QMainWindow):
95
+    ''' QMainWindow subclass responsible for showing the main application
96
+    window. '''
97
+    def __init__(self) -> None:
98
+        super().__init__()
99
+
100
+        self.main_widget = None
101
+        self.toolbar = None
102
+        self.init_ui()
103
+
104
+    def init_ui(self) -> None:
105
+        ''' Initialize the UI: construct main widget and toolbar. '''
106
+        self.main_widget = NameButtons()
107
+        self.setCentralWidget(self.main_widget)
108
+
109
+        font_metrics = self.fontMetrics()
110
+        icon_size = font_metrics.height() * 2.5
111
+
112
+        # Initialize toolbar
113
+        self.toolbar = QToolBar()
114
+        self.toolbar.setIconSize(QSize(icon_size, icon_size))
115
+
116
+        # Left
117
+        self.toolbar.addAction(self.load_icon("add_person.svg"), "Nieuw persoon")
118
+        self.toolbar.addAction(self.load_icon("undo.svg"), "Heydrich")
119
+
120
+        self.toolbar.addWidget(self.create_spacer())
121
+
122
+        # Right
123
+        self.toolbar.addAction(self.load_icon("beer_bottle.svg"), "Bierrr")
124
+        self.addToolBar(self.toolbar)
125
+
126
+    @staticmethod
127
+    def create_spacer() -> QWidget:
128
+        """ Return an empty QWidget that automatically expands. """
129
+        spacer = QWidget()
130
+        spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred)
131
+        return spacer
132
+
133
+    icons_dir = os.path.join(os.path.dirname(__file__), "icons")
134
+
135
+    @classmethod
136
+    def load_icon(cls, filename: str) -> QIcon:
137
+        """ Return a QtIcon loaded from the given `filename` in the icons
138
+        directory. """
139
+
140
+        return QIcon(os.path.join(cls.icons_dir, filename))
141
+
142
+
143
+def main() -> None:
144
+    ''' Main entry point of GUI client. '''
75 145
     app = QApplication(sys.argv)
76 146
     font = app.font()
77 147
     size = font.pointSize()
78 148
     font.setPointSize(size * 1.75)
79 149
     app.setFont(font)
80 150
 
81
-    name_buttons = NameButtons()
82
-    name_buttons.show()
151
+    main_window = PiketMainWindow()
152
+    main_window.show()
83 153
 
84 154
     app.exec_()
155
+
156
+
157
+if __name__ == "__main__":
158
+    main()

+ 90 - 0
piket_client/icons/add_person.svg

@@ -0,0 +1,90 @@
1
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+<svg
5
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
6
+   xmlns:cc="http://creativecommons.org/ns#"
7
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
+   xmlns:svg="http://www.w3.org/2000/svg"
9
+   xmlns="http://www.w3.org/2000/svg"
10
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
+   width="100"
13
+   height="100"
14
+   viewBox="0 0 26.458333 26.458334"
15
+   version="1.1"
16
+   id="svg8"
17
+   inkscape:version="0.92.2 2405546, 2018-03-11"
18
+   sodipodi:docname="add_person.svg">
19
+  <defs
20
+     id="defs2" />
21
+  <sodipodi:namedview
22
+     id="base"
23
+     pagecolor="#ffffff"
24
+     bordercolor="#666666"
25
+     borderopacity="1.0"
26
+     inkscape:pageopacity="0.0"
27
+     inkscape:pageshadow="2"
28
+     inkscape:zoom="5.6"
29
+     inkscape:cx="22.286602"
30
+     inkscape:cy="52.002305"
31
+     inkscape:document-units="px"
32
+     inkscape:current-layer="layer1"
33
+     showgrid="true"
34
+     units="px"
35
+     inkscape:pagecheckerboard="false"
36
+     showguides="true"
37
+     inkscape:guide-bbox="true"
38
+     inkscape:window-width="1596"
39
+     inkscape:window-height="861"
40
+     inkscape:window-x="1280"
41
+     inkscape:window-y="18"
42
+     inkscape:window-maximized="0">
43
+    <inkscape:grid
44
+       type="xygrid"
45
+       id="grid5069"
46
+       dotted="false" />
47
+    <sodipodi:guide
48
+       position="13.229167,0"
49
+       orientation="1,0"
50
+       id="guide5075"
51
+       inkscape:locked="true"
52
+       inkscape:label=""
53
+       inkscape:color="rgb(0,0,255)" />
54
+  </sodipodi:namedview>
55
+  <metadata
56
+     id="metadata5">
57
+    <rdf:RDF>
58
+      <cc:Work
59
+         rdf:about="">
60
+        <dc:format>image/svg+xml</dc:format>
61
+        <dc:type
62
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
63
+        <dc:title></dc:title>
64
+      </cc:Work>
65
+    </rdf:RDF>
66
+  </metadata>
67
+  <g
68
+     inkscape:label="Layer 1"
69
+     inkscape:groupmode="layer"
70
+     id="layer1"
71
+     transform="translate(0,-270.54165)">
72
+    <path
73
+       style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
74
+       d="m 6.6145834,296.99998 h 6.6145836 6.614583 c 0,0 -2.645827,-14.45816 -6.590959,-14.50484 -3.9923743,-0.0472 -6.6382076,14.50484 -6.6382076,14.50484 z"
75
+       id="path5077"
76
+       inkscape:connector-curvature="0"
77
+       sodipodi:nodetypes="cccsc" />
78
+    <circle
79
+       style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.52916664;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
80
+       id="path5082"
81
+       cx="13.229166"
82
+       cy="277.4397"
83
+       r="3.9687498" />
84
+    <path
85
+       style="fill:#000000;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
86
+       d="m 22.489583,271.86457 v 1.32291 H 23.8125 v 1.32292 h -1.322917 v 1.32292 H 21.166666 V 274.5104 H 19.84375 v -1.32292 h 1.322916 v -1.32291 z"
87
+       id="path5084"
88
+       inkscape:connector-curvature="0" />
89
+  </g>
90
+</svg>

Diferenças do arquivo suprimidas por serem muito extensas
+ 82 - 0
piket_client/icons/beer_bottle.svg


+ 68 - 0
piket_client/icons/undo.svg

@@ -0,0 +1,68 @@
1
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+<svg
5
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
6
+   xmlns:cc="http://creativecommons.org/ns#"
7
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
+   xmlns:svg="http://www.w3.org/2000/svg"
9
+   xmlns="http://www.w3.org/2000/svg"
10
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
+   width="100"
13
+   height="100"
14
+   viewBox="0 0 26.458333 26.458334"
15
+   version="1.1"
16
+   id="svg5111"
17
+   inkscape:version="0.92.2 2405546, 2018-03-11"
18
+   sodipodi:docname="undo.svg">
19
+  <defs
20
+     id="defs5105" />
21
+  <sodipodi:namedview
22
+     id="base"
23
+     pagecolor="#ffffff"
24
+     bordercolor="#666666"
25
+     borderopacity="1.0"
26
+     inkscape:pageopacity="0.0"
27
+     inkscape:pageshadow="2"
28
+     inkscape:zoom="5.6"
29
+     inkscape:cx="52.785727"
30
+     inkscape:cy="59.399093"
31
+     inkscape:document-units="px"
32
+     inkscape:current-layer="layer1"
33
+     showgrid="true"
34
+     units="px"
35
+     inkscape:window-width="1596"
36
+     inkscape:window-height="861"
37
+     inkscape:window-x="1280"
38
+     inkscape:window-y="18"
39
+     inkscape:window-maximized="0">
40
+    <inkscape:grid
41
+       type="xygrid"
42
+       id="grid5656" />
43
+  </sodipodi:namedview>
44
+  <metadata
45
+     id="metadata5108">
46
+    <rdf:RDF>
47
+      <cc:Work
48
+         rdf:about="">
49
+        <dc:format>image/svg+xml</dc:format>
50
+        <dc:type
51
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
52
+        <dc:title></dc:title>
53
+      </cc:Work>
54
+    </rdf:RDF>
55
+  </metadata>
56
+  <g
57
+     inkscape:label="Layer 1"
58
+     inkscape:groupmode="layer"
59
+     id="layer1"
60
+     transform="translate(0,-270.54165)">
61
+    <path
62
+       style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
63
+       d="m 17.197917,295.67707 c 0,-6.61458 -2.645834,-11.90625 -10.5833336,-11.90625 v 5.29166 l -5.2916667,-7.9375 5.2916667,-7.9375 v 5.29167 c 7.9374996,0 18.5208336,9.26042 18.5208336,17.19792 z"
64
+       id="path5666"
65
+       inkscape:connector-curvature="0"
66
+       sodipodi:nodetypes="cccccccc" />
67
+  </g>
68
+</svg>