summaryrefslogtreecommitdiffstats
path: root/examples/pykde-sampler/dialogs/font.py
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-05 00:17:19 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-05 00:17:19 -0600
commitd070aee4c277d331e54b81ac2881977a8d8cb7c0 (patch)
tree81fc5f857e6f4eafafd48f2ae70a787e02d10c5d /examples/pykde-sampler/dialogs/font.py
parent01bd7e2ffdc3caa95228e03ad501d778b05270a9 (diff)
downloadpytde-d070aee4c277d331e54b81ac2881977a8d8cb7c0.tar.gz
pytde-d070aee4c277d331e54b81ac2881977a8d8cb7c0.zip
Finish pykde to pytde rename
Diffstat (limited to 'examples/pykde-sampler/dialogs/font.py')
-rw-r--r--examples/pykde-sampler/dialogs/font.py53
1 files changed, 0 insertions, 53 deletions
diff --git a/examples/pykde-sampler/dialogs/font.py b/examples/pykde-sampler/dialogs/font.py
deleted file mode 100644
index 194524c..0000000
--- a/examples/pykde-sampler/dialogs/font.py
+++ /dev/null
@@ -1,53 +0,0 @@
-
-from qt import TQFrame, TQHBoxLayout, TQVBoxLayout, TQTimer, SIGNAL, TQFont, TQString
-from tdecore import i18n
-from tdeui import KPushButton, KFontDialog, KTextEdit
-
-iconName = 'fonts'
-labelText = 'KFontDialog'
-docParts = ('tdeui', 'KFontDialog')
-helpText = ("KDE provides a font dialog box for users to select (can you "
- "guess??) fonts. The button below displays a font dialog box. "
- "The font of this widget (the text widget you're reading) is used "
- "as the default. If the dialog is accepted, the font of this "
- "widget is change to match the selection.")
-
-
-fontText = """Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam
-ante. Nam in mauris. Vestibulum ante velit, condimentum vel, congue
-sit amet, lobortis a, dui. Fusce auctor, quam non pretium nonummy, leo
-ante imperdiet libero, id lobortis erat erat tquis eros. Pellentesque
-habitant morbi tristique senectus et netus et malesuada fames ac
-turpis egestas. Cras ut metus. Vivamus suscipit, sapien id tempor
-elementum, nunc quam malesuada dolor, sit amet luctus sapien odio vel
-ligula. Integer scelerisque, risus a interdum vestibulum, felis ipsum
-pharetra eros, nec nonummy libero justo tquis risus. Vestibulum
-tincidunt, augue vitae suscipit congue, sem dui adipiscing nulla, ut
-nonummy arcu quam ac sem. Nulla in metus. Phasellus neque.
-"""
-
-
-class MainFrame(TQFrame):
- def __init__(self, parent=None):
- TQFrame.__init__(self, parent)
- self.button = KPushButton(i18n('Show Font Dialog'), self)
- self.help = KTextEdit(helpText, '', self)
- self.example = KTextEdit(fontText, '', self)
-
- layout = TQVBoxLayout(self, 4)
- layout.addWidget(self.help)
- buttonlayout = TQHBoxLayout(layout, 4)
- buttonlayout.addWidget(self.button)
- buttonlayout.addStretch(1)
- layout.addWidget(self.example, 10)
- layout.addStretch(1)
- self.connect(self.button, SIGNAL('clicked()'), self.showFontDialog)
-
-
- def showFontDialog(self):
- font = TQFont(self.example.font())
- string = TQString()
- accepted, other = KFontDialog.getFontAndText(font, string, False, self)
- if accepted:
- self.example.setFont(font)
- self.example.setText(string)