Small things

This commit is contained in:
Olivier Keshavjee 2015-06-24 20:41:23 +02:00
parent 38b055081e
commit ef85e48916
4 changed files with 9 additions and 4 deletions

View file

@ -161,7 +161,7 @@ class plotModel(QStandardItemModel):
parentItem.takeRow(index.row()) parentItem.takeRow(index.row())
def updatePlotPersoButton(self): def updatePlotPersoButton(self):
menu = QMenu() menu = QMenu(self.mw)
menus = [] menus = []
for i in [self.tr("Main"), self.tr("Secondary"), self.tr("Minor")]: for i in [self.tr("Main"), self.tr("Secondary"), self.tr("Minor")]:

View file

@ -42,7 +42,7 @@ class fullScreenEditor(QWidget):
#self.topPanel.layout().addStretch(1) #self.topPanel.layout().addStretch(1)
# Spell checking # Spell checking
self.btnSpellCheck = QPushButton() self.btnSpellCheck = QPushButton(self)
self.btnSpellCheck.setFlat(True) self.btnSpellCheck.setFlat(True)
self.btnSpellCheck.setIcon(QIcon.fromTheme("tools-check-spelling")) self.btnSpellCheck.setIcon(QIcon.fromTheme("tools-check-spelling"))
self.btnSpellCheck.setCheckable(True) self.btnSpellCheck.setCheckable(True)

View file

@ -26,7 +26,7 @@ class outlineBasics(QAbstractItemView):
sel = self.getSelection() sel = self.getSelection()
clipboard = qApp.clipboard() clipboard = qApp.clipboard()
self.menu = QMenu() self.menu = QMenu(self)
# Add / remove items # Add / remove items
self.actAddFolder = QAction(QIcon.fromTheme("folder-new"), qApp.translate("outlineBasics", "New Folder"), self.menu) self.actAddFolder = QAction(QIcon.fromTheme("folder-new"), qApp.translate("outlineBasics", "New Folder"), self.menu)
@ -150,7 +150,6 @@ class outlineBasics(QAbstractItemView):
if _type == "text": if _type == "text":
_type = self.model()._defaultTextType _type = self.model()._defaultTextType
print(_type)
item = outlineItem(title=qApp.translate("outlineBasics", "New"), _type=_type) item = outlineItem(title=qApp.translate("outlineBasics", "New"), _type=_type)
self.model().appendItem(item, parent) self.model().appendItem(item, parent)

View file

@ -367,6 +367,11 @@ class textEditView(QTextEdit):
# FORMATTING # FORMATTING
############################################################################### ###############################################################################
def focusOutEvent(self, event):
"Submit changes just before focusing out."
QTextEdit.focusOutEvent(self, event)
self.submit()
def focusInEvent(self, event): def focusInEvent(self, event):
"Finds textFormatter and attach them to that view." "Finds textFormatter and attach them to that view."
QTextEdit.focusInEvent(self, event) QTextEdit.focusInEvent(self, event)
@ -381,4 +386,5 @@ class textEditView(QTextEdit):
tF.setTextEdit(self) tF.setTextEdit(self)
def applyFormat(self, _format): def applyFormat(self, _format):
#FIXME
print(_format) print(_format)