SqlBrowser/SqlBrowser.py

changeset 3030
4a0a82ddd9d2
parent 3020
542e97d4ecb3
child 3039
8dd0165d805d
child 3058
0a02c433f52d
equal deleted inserted replaced
3029:4055a15ce0f2 3030:4a0a82ddd9d2
92 Private method to define the user interface actions. 92 Private method to define the user interface actions.
93 """ 93 """
94 # list of all actions 94 # list of all actions
95 self.__actions = [] 95 self.__actions = []
96 96
97 self.addConnectionAct = E5Action(self.trUtf8('Add Connection'), 97 self.addConnectionAct = E5Action(
98 self.trUtf8('Add Connection'),
98 UI.PixmapCache.getIcon("databaseConnection.png"), 99 UI.PixmapCache.getIcon("databaseConnection.png"),
99 self.trUtf8('Add &Connection...'), 100 self.trUtf8('Add &Connection...'),
100 0, 0, self, 'sql_file_add_connection') 101 0, 0, self, 'sql_file_add_connection')
101 self.addConnectionAct.setStatusTip(self.trUtf8( 102 self.addConnectionAct.setStatusTip(self.trUtf8(
102 'Open a dialog to add a new database connection')) 103 'Open a dialog to add a new database connection'))
107 )) 108 ))
108 self.addConnectionAct.triggered[()].connect( 109 self.addConnectionAct.triggered[()].connect(
109 self.__browser.addConnectionByDialog) 110 self.__browser.addConnectionByDialog)
110 self.__actions.append(self.addConnectionAct) 111 self.__actions.append(self.addConnectionAct)
111 112
112 self.exitAct = E5Action(self.trUtf8('Quit'), 113 self.exitAct = E5Action(
114 self.trUtf8('Quit'),
113 UI.PixmapCache.getIcon("exit.png"), 115 UI.PixmapCache.getIcon("exit.png"),
114 self.trUtf8('&Quit'), 116 self.trUtf8('&Quit'),
115 QKeySequence(self.trUtf8("Ctrl+Q", "File|Quit")), 117 QKeySequence(self.trUtf8("Ctrl+Q", "File|Quit")),
116 0, self, 'sql_file_quit') 118 0, self, 'sql_file_quit')
117 self.exitAct.setStatusTip(self.trUtf8('Quit the SQL browser')) 119 self.exitAct.setStatusTip(self.trUtf8('Quit the SQL browser'))
119 """<b>Quit</b>""" 121 """<b>Quit</b>"""
120 """<p>Quit the SQL browser.</p>""" 122 """<p>Quit the SQL browser.</p>"""
121 )) 123 ))
122 self.exitAct.triggered[()].connect(qApp.closeAllWindows) 124 self.exitAct.triggered[()].connect(qApp.closeAllWindows)
123 125
124 self.aboutAct = E5Action(self.trUtf8('About'), 126 self.aboutAct = E5Action(
127 self.trUtf8('About'),
125 self.trUtf8('&About'), 128 self.trUtf8('&About'),
126 0, 0, self, 'sql_help_about') 129 0, 0, self, 'sql_help_about')
127 self.aboutAct.setStatusTip(self.trUtf8( 130 self.aboutAct.setStatusTip(self.trUtf8(
128 'Display information about this software')) 131 'Display information about this software'))
129 self.aboutAct.setWhatsThis(self.trUtf8( 132 self.aboutAct.setWhatsThis(self.trUtf8(
131 """<p>Display some information about this software.</p>""" 134 """<p>Display some information about this software.</p>"""
132 )) 135 ))
133 self.aboutAct.triggered[()].connect(self.__about) 136 self.aboutAct.triggered[()].connect(self.__about)
134 self.__actions.append(self.aboutAct) 137 self.__actions.append(self.aboutAct)
135 138
136 self.aboutQtAct = E5Action(self.trUtf8('About Qt'), 139 self.aboutQtAct = E5Action(
140 self.trUtf8('About Qt'),
137 self.trUtf8('About &Qt'), 141 self.trUtf8('About &Qt'),
138 0, 0, self, 'sql_help_about_qt') 142 0, 0, self, 'sql_help_about_qt')
139 self.aboutQtAct.setStatusTip( 143 self.aboutQtAct.setStatusTip(
140 self.trUtf8('Display information about the Qt toolkit')) 144 self.trUtf8('Display information about the Qt toolkit'))
141 self.aboutQtAct.setWhatsThis(self.trUtf8( 145 self.aboutQtAct.setWhatsThis(self.trUtf8(

eric ide

mercurial