~ubuntu-branches/ubuntu/quantal/ubuntuone-control-panel/quantal-proposed

« back to all changes in this revision

Viewing changes to ubuntuone/controlpanel/gui/qt/main/windows.py

  • Committer: Package Import Robot
  • Author(s): Rodney Dawes
  • Date: 2012-06-20 16:42:13 UTC
  • mto: This revision was merged to the branch mainline in revision 50.
  • Revision ID: package-import@ubuntu.com-20120620164213-6z7q5pqc0ydjrp19
Tags: upstream-3.99.0
ImportĀ upstreamĀ versionĀ 3.99.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- coding: utf-8 -*-
2
 
#
3
 
# Copyright 2011 Canonical Ltd.
4
 
#
5
 
# This program is free software: you can redistribute it and/or modify it
6
 
# under the terms of the GNU General Public License version 3, as published
7
 
# by the Free Software Foundation.
8
 
#
9
 
# This program is distributed in the hope that it will be useful, but
10
 
# WITHOUT ANY WARRANTY; without even the implied warranties of
11
 
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
12
 
# PURPOSE.  See the GNU General Public License for more details.
13
 
#
14
 
# You should have received a copy of the GNU General Public License along
15
 
# with this program.  If not, see <http://www.gnu.org/licenses/>.
16
 
 
17
 
"""Main method to be used on windows."""
18
 
 
19
 
from PyQt4 import QtGui
20
 
 
21
 
 
22
 
def main(app):
23
 
    """Apply style sheet and fonts."""
24
 
    # Apply font to the entire application
25
 
    QtGui.QFontDatabase.addApplicationFont(':/Ubuntu-R.ttf')
26
 
    QtGui.QFontDatabase.addApplicationFont(':/Ubuntu-B.ttf')
27
 
 
28
 
 
29
 
# Module 'reactor' has no 'run'/'stop' member, pylint: disable=E1101
30
 
 
31
 
 
32
 
def main_start(app):
33
 
    """Start the mainloop."""
34
 
    from twisted.internet import reactor
35
 
    reactor.run()
36
 
 
37
 
 
38
 
def main_quit(app):
39
 
    """Stop the mainloop."""
40
 
    from twisted.internet import reactor
41
 
    reactor.stop()
42
 
 
43
 
 
44
 
# pylint: enable=E1101
45
 
 
46
 
PLATFORM_QSS = ":/windows.qss"