~ubuntu-branches/ubuntu/karmic/eric/karmic

« back to all changes in this revision

Viewing changes to eric/Preferences/IconsPreviewForm.py

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2008-01-28 18:02:25 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080128180225-6nrox6yrworh2c4v
Tags: 4.0.4-1ubuntu1
* Add python-qt3 to build-depends becuase that's where Ubuntu puts 
  pyqtconfig
* Change maintainer to MOTU

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- coding: utf-8 -*-
2
 
 
3
 
# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_9/eric3/Preferences/IconsPreviewForm.ui'
4
 
#
5
 
# Created: So Nov 27 16:13:12 2005
6
 
#      by: The PyQt User Interface Compiler (pyuic) 3.15
7
 
#
8
 
# WARNING! All changes made in this file will be lost!
9
 
 
10
 
 
11
 
import sys
12
 
from qt import *
13
 
 
14
 
 
15
 
class IconsPreviewForm(QDialog):
16
 
    def __init__(self,parent = None,name = None,modal = 0,fl = 0):
17
 
        QDialog.__init__(self,parent,name,modal,fl)
18
 
 
19
 
        if not name:
20
 
            self.setName("IconsPreviewForm")
21
 
 
22
 
 
23
 
        IconsPreviewFormLayout = QVBoxLayout(self,6,6,"IconsPreviewFormLayout")
24
 
 
25
 
        self.iconView = QIconView(self,"iconView")
26
 
        self.iconView.setGridX(100)
27
 
        IconsPreviewFormLayout.addWidget(self.iconView)
28
 
 
29
 
        layout1 = QHBoxLayout(None,0,6,"layout1")
30
 
        spacer1 = QSpacerItem(40,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
31
 
        layout1.addItem(spacer1)
32
 
 
33
 
        self.okButton = QPushButton(self,"okButton")
34
 
        layout1.addWidget(self.okButton)
35
 
        spacer2 = QSpacerItem(40,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
36
 
        layout1.addItem(spacer2)
37
 
        IconsPreviewFormLayout.addLayout(layout1)
38
 
 
39
 
        self.languageChange()
40
 
 
41
 
        self.resize(QSize(600,480).expandedTo(self.minimumSizeHint()))
42
 
        self.clearWState(Qt.WState_Polished)
43
 
 
44
 
        self.connect(self.okButton,SIGNAL("clicked()"),self.accept)
45
 
 
46
 
 
47
 
    def languageChange(self):
48
 
        self.setCaption(self.__tr("Icons Preview"))
49
 
        self.okButton.setText(self.__tr("&OK"))
50
 
        self.okButton.setAccel(self.__tr("Alt+O"))
51
 
 
52
 
 
53
 
    def __tr(self,s,c = None):
54
 
        return qApp.translate("IconsPreviewForm",s,c)
55
 
 
56
 
if __name__ == "__main__":
57
 
    a = QApplication(sys.argv)
58
 
    QObject.connect(a,SIGNAL("lastWindowClosed()"),a,SLOT("quit()"))
59
 
    w = IconsPreviewForm()
60
 
    a.setMainWidget(w)
61
 
    w.show()
62
 
    a.exec_loop()