1
# -*- coding: utf-8 -*-
3
# Copyright (c) 2006 - 2007 Detlev Offenbach <detlev@die-offenbachs.de>
7
Module implementing the EditorCalltips configuration page.
10
from PyQt4.Qsci import QsciScintilla
12
from ConfigurationPageBase import ConfigurationPageBase
13
from Ui_EditorCalltipsPage import Ui_EditorCalltipsPage
17
class EditorCalltipsPage(ConfigurationPageBase, Ui_EditorCalltipsPage):
19
Class implementing the EditorCalltips configuration page.
25
ConfigurationPageBase.__init__(self)
27
self.setObjectName("EditorCalltipsPage")
30
self.ctEnabledCheckBox.setChecked(\
31
Preferences.getEditor("CallTipsEnabled"))
32
self.ctVisibleSlider.setValue(\
33
Preferences.getEditor("CallTipsVisible"))
35
ctContext = Preferences.getEditor("CallTipsStyle")
36
if ctContext == QsciScintilla.CallTipsNoContext:
37
self.ctNoContextButton.setChecked(True)
38
elif ctContext == QsciScintilla.CallTipsNoAutoCompletionContext:
39
self.ctNoAutoCompletionButton.setChecked(True)
40
elif ctContext == QsciScintilla.CallTipsContext:
41
self.ctContextButton.setChecked(True)
45
Public slot to save the EditorCalltips configuration.
47
Preferences.setEditor("CallTipsEnabled",
48
int(self.ctEnabledCheckBox.isChecked()))
49
Preferences.setEditor("CallTipsVisible",
50
self.ctVisibleSlider.value())
52
if self.ctNoContextButton.isChecked():
53
Preferences.setEditor("CallTipsStyle",
54
QsciScintilla.CallTipsNoContext)
55
elif self.ctNoAutoCompletionButton.isChecked():
56
Preferences.setEditor("CallTipsStyle",
57
QsciScintilla.CallTipsNoAutoCompletionContext)
58
elif self.ctContextButton.isChecked():
59
Preferences.setEditor("CallTipsStyle",
60
QsciScintilla.CallTipsContext)
64
Module function to create the configuration page.
66
@param dlg reference to the configuration dialog
68
page = EditorCalltipsPage()