summaryrefslogtreecommitdiffstats
path: root/app_templates/kdeapp/src/prefdialog.py
blob: 0a6c96a89284b92f1bbd88e3cab20ab195d64b8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/python
###########################################################################
# testapp - description                                                   #
# ------------------------------                                          #
# begin     : Fri Jun 27 2005                                             #
# copyright : (C) 2005 by AUTHOR                                          #
# email     : your@email.com                                              #
#                                                                         #
###########################################################################
#                                                                         #
#   This program is free software; you can redistribute it and/or modify  #
#   it under the terms of the GNU General Public License as published by  #
#   the Free Software Foundation; either version 2 of the License, or     #
#   (at your option) any later version.                                   #
#                                                                         #
###########################################################################

from qt import *
from tdecore import *
from tdeui import *

class TestAppPrefDialog(KDialogBase):
    def __init__(self):
        KDialogBase.__init__(TreeList, i18n("TestApp Preferences"),
                  KDialogBase.Help|KDialogBase.Default|KDialogBase.Ok|KDialogBase.Apply|KDialogBase.Cancel, Ok)

        # this is the base class for your preferences dialog.  it is now
        # a Treelist dialog.. but there are a number of other
        # possibilities (including Tab, Swallow, and just Plain)
        frame = self.addPage(i18n("First Page"), i18n("Page One Options"))
        self._pageOne = TestAppPrefPageOne(frame)
    
        frame = self.addPage(i18n("Second Page"), i18n("Page Two Options"))
        self._pageTwo = TestAppPrefPageTwo(frame)

class TestAppPrefPageOne(QFrame):
    def __init__(self,parent):
        QFrame.__init__(self,parent)

        layout = QHBoxLayout(self)
        layout.setAutoAdd(True)
    
        QLabel(i18n("Add something here"), self)

class TestAppPrefPageTwo(QFrame):
    def __init__(self,parent):
        QFrame.__init__(self,parent)

        layout = QHBoxLayout(self)
        layout.setAutoAdd(True)

        QLabel(i18n("Add something here"), self)