mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-18 20:02:32 +12:00
Adds: cork view. Great, except that drag n drop doesn't work...
This commit is contained in:
parent
7e8a4fd045
commit
e27ff93a9b
|
@ -219,6 +219,9 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||
self.treePlanOutline.selectionModel().currentChanged.connect(self.outlineSelectionChanged)
|
||||
self.treePlanOutline.selectionModel().currentChanged.connect(self.outlineSelectionChanged)
|
||||
|
||||
self.sldCorkSizeFactor.valueChanged.connect(self.redacEditor.setCorkSizeFactor)
|
||||
self.btnRedacFolderCork.toggled.connect(self.sldCorkSizeFactor.setVisible)
|
||||
self.btnRedacFolderText.toggled.connect(lambda v: self.redacEditor.setFolderView("text" if v else "cork"))
|
||||
|
||||
#Debug
|
||||
self.mdlFlatData.setVerticalHeaderLabels(["Infos générales", "Summary"])
|
||||
|
@ -244,6 +247,9 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||
self.cmbRedacPOV.setHidden(idx.internalPointer().isFolder())
|
||||
self.lblPlanPOV.setHidden(idx.internalPointer().isFolder())
|
||||
self.cmbPlanPOV.setHidden(idx.internalPointer().isFolder())
|
||||
self.btnRedacFolderText.setHidden(not idx.internalPointer().isFolder())
|
||||
self.btnRedacFolderCork.setHidden(not idx.internalPointer().isFolder())
|
||||
self.sldCorkSizeFactor.setHidden(not idx.internalPointer().isFolder())
|
||||
|
||||
def outlineAddItem(self, type="folder"):
|
||||
if len(self.treeRedacOutline.selectedIndexes()) == 0:
|
||||
|
|
|
@ -138,7 +138,6 @@ class outlineModel(QAbstractItemModel):
|
|||
|
||||
flags = QAbstractItemModel.flags(self, index) | Qt.ItemIsEditable
|
||||
|
||||
|
||||
if index.isValid() and index.internalPointer().isFolder() and index.column() == 0:
|
||||
flags |= Qt.ItemIsDragEnabled | Qt.ItemIsDropEnabled
|
||||
|
||||
|
@ -177,8 +176,8 @@ class outlineModel(QAbstractItemModel):
|
|||
|
||||
def supportedDropActions(self):
|
||||
|
||||
#return Qt.MoveAction # Qt.CopyAction |
|
||||
return Qt.CopyAction | Qt.MoveAction
|
||||
return Qt.MoveAction # Qt.CopyAction |
|
||||
#return Qt.CopyAction | Qt.MoveAction
|
||||
|
||||
#def canDropMimeData(self, data, action, row, column, parent):
|
||||
#if not data.hasFormat("application/xml"):
|
||||
|
@ -277,6 +276,7 @@ class outlineModel(QAbstractItemModel):
|
|||
return self.removeRows(row, 1, parent)
|
||||
|
||||
def removeRows(self, row, count, parent=QModelIndex()):
|
||||
print("Removing")
|
||||
if not parent.isValid():
|
||||
parentItem = self.rootItem
|
||||
else:
|
||||
|
|
299
src/ui/editors/corkDelegate.py
Normal file
299
src/ui/editors/corkDelegate.py
Normal file
|
@ -0,0 +1,299 @@
|
|||
#!/usr/bin/env python
|
||||
#--!-- coding: utf8 --!--
|
||||
|
||||
|
||||
|
||||
|
||||
from qt import *
|
||||
from enums import *
|
||||
from functions import *
|
||||
from random import randint
|
||||
|
||||
class corkDelegate(QStyledItemDelegate):
|
||||
|
||||
def __init__(self, parent=None):
|
||||
QStyledItemDelegate.__init__(self, parent)
|
||||
self.factor = 1
|
||||
self.defaultSize = QSize(300, 200)
|
||||
self.lastPos = None
|
||||
self.editing = None
|
||||
self.margin = 5
|
||||
|
||||
def setCorkSizeFactor(self, v):
|
||||
self.factor = v / 100.
|
||||
|
||||
def sizeHint(self, option, index):
|
||||
return self.defaultSize * self.factor
|
||||
|
||||
def editorEvent(self, event, model, option, index):
|
||||
# We catch the mouse position in the widget to know which part to edit
|
||||
if type(event) == QMouseEvent:
|
||||
self.lastPos = event.pos() # - option.rect.topLeft()
|
||||
return QStyledItemDelegate.editorEvent(self, event, model, option, index)
|
||||
|
||||
def createEditor(self, parent, option, index):
|
||||
self.updateRects(option, index)
|
||||
|
||||
if self.mainLineRect.contains(self.lastPos):
|
||||
# One line summary
|
||||
self.editing = Outline.summarySentance
|
||||
edt = QLineEdit(parent)
|
||||
edt.setFocusPolicy(Qt.StrongFocus)
|
||||
edt.setFrame(False)
|
||||
edt.setAlignment(Qt.AlignCenter)
|
||||
edt.setPlaceholderText(self.tr("One line summary"))
|
||||
f = QFont(option.font)
|
||||
f.setItalic(True)
|
||||
edt.setFont(f)
|
||||
return edt
|
||||
|
||||
elif self.titleRect.contains(self.lastPos):
|
||||
# Title
|
||||
self.editing = Outline.title
|
||||
edt = QLineEdit(parent)
|
||||
edt.setFocusPolicy(Qt.StrongFocus)
|
||||
edt.setFrame(False)
|
||||
f = QFont(option.font)
|
||||
#f.setPointSize(f.pointSize() + 1)
|
||||
f.setBold(True)
|
||||
edt.setFont(f)
|
||||
edt.setAlignment(Qt.AlignCenter)
|
||||
#edt.setGeometry(self.titleRect)
|
||||
return edt
|
||||
|
||||
else: # self.mainTextRect.contains(self.lastPos):
|
||||
# Summary
|
||||
self.editing = Outline.summaryFull
|
||||
edt = QPlainTextEdit(parent)
|
||||
edt.setFocusPolicy(Qt.StrongFocus)
|
||||
edt.setFrameShape(QFrame.NoFrame)
|
||||
edt.setPlaceholderText(self.tr("Full summary"))
|
||||
return edt
|
||||
|
||||
|
||||
def updateEditorGeometry(self, editor, option, index):
|
||||
|
||||
if self.editing == Outline.summarySentance:
|
||||
# One line summary
|
||||
editor.setGeometry(self.mainLineRect)
|
||||
|
||||
elif self.editing == Outline.title:
|
||||
# Title
|
||||
editor.setGeometry(self.titleRect)
|
||||
|
||||
elif self.editing == Outline.summaryFull:
|
||||
# Summary
|
||||
editor.setGeometry(self.mainTextRect)
|
||||
|
||||
def setEditorData(self, editor, index):
|
||||
item = index.internalPointer()
|
||||
|
||||
if self.editing == Outline.summarySentance:
|
||||
# One line summary
|
||||
editor.setText(item.data(Outline.summarySentance.value))
|
||||
|
||||
elif self.editing == Outline.title:
|
||||
# Title
|
||||
editor.setText(index.data())
|
||||
|
||||
elif self.editing == Outline.summaryFull:
|
||||
# Summary
|
||||
editor.setPlainText(item.data(Outline.summaryFull.value))
|
||||
|
||||
def setModelData(self, editor, model, index):
|
||||
|
||||
if self.editing == Outline.summarySentance:
|
||||
# One line summary
|
||||
model.setData(index.sibling(index.row(), Outline.summarySentance.value), editor.text())
|
||||
|
||||
elif self.editing == Outline.title:
|
||||
# Title
|
||||
model.setData(index, editor.text(), Outline.title.value)
|
||||
|
||||
elif self.editing == Outline.summaryFull:
|
||||
# Summary
|
||||
model.setData(index.sibling(index.row(), Outline.summaryFull.value), editor.toPlainText())
|
||||
print(editor.toPlainText())
|
||||
|
||||
def updateRects(self, option, index):
|
||||
margin = self.margin
|
||||
iconSize = max(16*self.factor, 12)
|
||||
item = index.internalPointer()
|
||||
self.itemRect = option.rect.adjusted(margin, margin, -margin, -margin)
|
||||
self.iconRect = QRect(self.itemRect.topLeft() + QPoint(margin, margin), QSize(iconSize, iconSize))
|
||||
self.titleRect = QRect(self.iconRect.topRight().x() + margin, self.iconRect.top(),
|
||||
self.itemRect.topRight().x() - self.iconRect.right() - 2 * margin,
|
||||
self.iconRect.height())
|
||||
self.bottomRect = QRect(QPoint(self.itemRect.x(), self.iconRect.bottom() + margin),
|
||||
QPoint(self.itemRect.right(), self.itemRect.bottom()))
|
||||
self.topRect = QRect(self.itemRect.topLeft(), self.bottomRect.topRight())
|
||||
self.mainRect = self.bottomRect.adjusted(margin, margin, -margin, -margin)
|
||||
self.mainLineRect = QRect(self.mainRect.topLeft(),
|
||||
self.mainRect.topRight() + QPoint(0, iconSize))
|
||||
self.mainTextRect = QRect(self.mainLineRect.bottomLeft() + QPoint(0, margin),
|
||||
self.mainRect.bottomRight())
|
||||
if not item.data(Outline.summarySentance.value) :
|
||||
self.mainTextRect.setTopLeft(self.mainLineRect.topLeft())
|
||||
|
||||
|
||||
def paint(self, p, option, index):
|
||||
#QStyledItemDelegate.paint(self, p, option, index)
|
||||
if not index.isValid():
|
||||
return
|
||||
|
||||
item = index.internalPointer()
|
||||
self.updateRects(option, index)
|
||||
|
||||
style = qApp.style()
|
||||
|
||||
def _rotate(angle):
|
||||
p.translate(self.mainRect.center())
|
||||
p.rotate(angle)
|
||||
p.translate(-self.mainRect.center())
|
||||
|
||||
# Draw background
|
||||
cg = QPalette.ColorGroup(QPalette.Normal if option.state & QStyle.State_Enabled else QPalette.Disabled)
|
||||
if cg == QPalette.Normal and not option.state & QStyle.State_Active:
|
||||
cg = QPalette.Inactive
|
||||
|
||||
# Selection
|
||||
if option.state & QStyle.State_Selected:
|
||||
p.save()
|
||||
p.setBrush(option.palette.brush(cg, QPalette.Highlight))
|
||||
p.setPen(Qt.NoPen)
|
||||
p.drawRoundedRect(option.rect, 12, 12)
|
||||
p.restore()
|
||||
|
||||
# Stack
|
||||
if item.isFolder() and item.childCount() > 0:
|
||||
p.save()
|
||||
angle = [-3, 5, 3]
|
||||
p.setBrush(Qt.white)
|
||||
for i in reversed(range(3)):
|
||||
p.drawRoundedRect(self.itemRect.translated(3*i, 3*i), 10, 10)
|
||||
p.restore()
|
||||
|
||||
# Background
|
||||
itemRect = self.itemRect
|
||||
p.save()
|
||||
p.setBrush(Qt.white)
|
||||
pen = p.pen()
|
||||
pen.setWidth(2)
|
||||
p.setPen(pen)
|
||||
p.drawRoundedRect(itemRect, 10, 10)
|
||||
p.restore()
|
||||
|
||||
# Title bar
|
||||
topRect = self.topRect
|
||||
p.save()
|
||||
if item.isFolder():
|
||||
color = QColor(Qt.darkGreen)
|
||||
else:
|
||||
color = QColor(Qt.blue).lighter(175)
|
||||
p.setPen(Qt.NoPen)
|
||||
p.setBrush(color)
|
||||
p.setClipRegion(QRegion(topRect))
|
||||
p.drawRoundedRect(itemRect, 10, 10)
|
||||
#p.drawRect(topRect)
|
||||
p.restore()
|
||||
|
||||
# One line summary background
|
||||
lineSummary = item.data(Outline.summarySentance.value)
|
||||
fullSummary = item.data(Outline.summaryFull.value)
|
||||
if lineSummary or not fullSummary:
|
||||
m = self.margin
|
||||
r = self.mainLineRect.adjusted(-m, -m, m, m/2)
|
||||
p.save()
|
||||
p.setPen(Qt.NoPen)
|
||||
p.setBrush(QColor("#EEE"))
|
||||
p.drawRect(r)
|
||||
p.restore()
|
||||
|
||||
# Border
|
||||
p.save()
|
||||
p.setBrush(Qt.NoBrush)
|
||||
pen = p.pen()
|
||||
pen.setWidth(2)
|
||||
p.setPen(pen)
|
||||
p.drawRoundedRect(itemRect, 10, 10)
|
||||
p.restore()
|
||||
|
||||
|
||||
# Draw the icon
|
||||
iconRect = self.iconRect
|
||||
mode = QIcon.Normal
|
||||
if not option.state & style.State_Enabled:
|
||||
mode = QIcon.Disabled
|
||||
elif option.state & style.State_Selected:
|
||||
mode = QIcon.Selected
|
||||
index.data(Qt.DecorationRole).paint(p, iconRect, option.decorationAlignment, mode)
|
||||
|
||||
# Draw title
|
||||
p.save()
|
||||
text = index.data()
|
||||
titleRect = self.titleRect
|
||||
if text:
|
||||
f = QFont(option.font)
|
||||
#f.setPointSize(f.pointSize() + 1)
|
||||
f.setBold(True)
|
||||
p.setFont(f)
|
||||
fm = QFontMetrics(f)
|
||||
elidedText = fm.elidedText(text, Qt.ElideRight, titleRect.width())
|
||||
p.drawText(titleRect, Qt.AlignCenter, elidedText)
|
||||
p.restore()
|
||||
|
||||
# Draw the line
|
||||
bottomRect = self.bottomRect
|
||||
p.save()
|
||||
#p.drawLine(itemRect.x(), iconRect.bottom() + margin,
|
||||
#itemRect.right(), iconRect.bottom() + margin)
|
||||
p.drawLine(bottomRect.topLeft(), bottomRect.topRight())
|
||||
p.restore()
|
||||
|
||||
# Draw status
|
||||
mainRect = self.mainRect
|
||||
status = item.data(Outline.status.value)
|
||||
if status:
|
||||
p.save()
|
||||
p.setClipRegion(QRegion(mainRect))
|
||||
f = p.font()
|
||||
f.setPointSize(f.pointSize() + 12)
|
||||
f.setBold(True)
|
||||
p.setFont(f)
|
||||
p.setPen(QColor(Qt.red).lighter(175))
|
||||
_rotate(-35)
|
||||
p.drawText(mainRect, Qt.AlignCenter, status)
|
||||
p.restore()
|
||||
|
||||
# Draw Summary
|
||||
# One line
|
||||
if lineSummary:
|
||||
p.save()
|
||||
f = QFont(option.font)
|
||||
f.setItalic(True)
|
||||
p.setFont(f)
|
||||
fm = QFontMetrics(f)
|
||||
elidedText = fm.elidedText(lineSummary, Qt.ElideRight, self.mainLineRect.width())
|
||||
p.drawText(self.mainLineRect, Qt.AlignCenter, elidedText)
|
||||
p.restore()
|
||||
|
||||
# Full summary
|
||||
if fullSummary:
|
||||
p.setFont(option.font)
|
||||
p.drawText(self.mainTextRect, Qt.TextWordWrap, fullSummary)
|
||||
|
||||
# Lines
|
||||
if True:
|
||||
p.save()
|
||||
p.setPen(QColor("#EEE"))
|
||||
fm = QFontMetrics(option.font)
|
||||
h = fm.lineSpacing()
|
||||
l = self.mainTextRect.topLeft() + QPoint(0, h)
|
||||
while self.mainTextRect.contains(l):
|
||||
p.drawLine(l, QPoint(self.mainTextRect.right(), l.y()))
|
||||
l.setY(l.y() + h)
|
||||
p.restore()
|
||||
|
||||
#Debug
|
||||
#for r in [self.itemRect, self.iconRect, self.titleRect, self.bottomRect, self.mainLineRect, self.mainTextRect]:
|
||||
#p.drawRect(r)
|
|
@ -8,6 +8,7 @@ from qt import *
|
|||
from enums import *
|
||||
from ui.editors.editorWidget_ui import *
|
||||
from ui.editors.customTextEdit import *
|
||||
from ui.editors.corkDelegate import *
|
||||
from functions import *
|
||||
|
||||
class editorWidget(QWidget, Ui_editorWidget_ui):
|
||||
|
@ -25,6 +26,31 @@ class editorWidget(QWidget, Ui_editorWidget_ui):
|
|||
self.dictChanged.connect(self.txtRedacText.setDict)
|
||||
self.currentDict = ""
|
||||
self.spellcheck = True
|
||||
self.folderView = "cork"
|
||||
|
||||
self.corkView.setResizeMode(QListView.Adjust)
|
||||
self.corkView.setWrapping(True)
|
||||
self.corkView.setItemDelegate(corkDelegate())
|
||||
self.corkView.setSpacing(5)
|
||||
self.corkView.setStyleSheet("""QListView {
|
||||
background:#926239;
|
||||
}""")
|
||||
|
||||
def setFolderView(self, v):
|
||||
oldV = self.folderView
|
||||
if v == "cork":
|
||||
self.folderView = "cork"
|
||||
else:
|
||||
self.folderView = "text"
|
||||
|
||||
if oldV != self.folderView and self.currentIndex:
|
||||
self.setCurrentModelIndex(self.currentIndex)
|
||||
|
||||
def setCorkSizeFactor(self, v):
|
||||
self.corkView.itemDelegate().setCorkSizeFactor(v)
|
||||
r = self.corkView.rootIndex()
|
||||
for c in range(r.row()):
|
||||
self.corkView.itemDelegate().sizeHintChanged.emit(r.child(c, 0))
|
||||
|
||||
def setCurrentModelIndex(self, index):
|
||||
|
||||
|
@ -35,7 +61,7 @@ class editorWidget(QWidget, Ui_editorWidget_ui):
|
|||
|
||||
item = index.internalPointer()
|
||||
|
||||
if item.isFolder():
|
||||
if item.isFolder() and self.folderView == "text":
|
||||
self.stack.setCurrentIndex(1)
|
||||
|
||||
w = QWidget()
|
||||
|
@ -84,7 +110,11 @@ class editorWidget(QWidget, Ui_editorWidget_ui):
|
|||
l.addItem(QSpacerItem(10, 1000, QSizePolicy.Minimum, QSizePolicy.Expanding))
|
||||
self.scroll.setWidget(w)
|
||||
|
||||
|
||||
elif item.isFolder() and self.folderView == "cork":
|
||||
self.stack.setCurrentIndex(2)
|
||||
self.corkView.setModel(self._model)
|
||||
self.corkView.setRootIndex(self.currentIndex)
|
||||
|
||||
else:
|
||||
self.stack.setCurrentIndex(0)
|
||||
|
||||
|
@ -95,6 +125,8 @@ class editorWidget(QWidget, Ui_editorWidget_ui):
|
|||
self.currentIndex = None
|
||||
|
||||
def modelDataChanged(self, topLeft, bottomRight):
|
||||
if not self.currentIndex:
|
||||
return
|
||||
if topLeft.row() <= self.currentIndex.row() <= bottomRight.row():
|
||||
self.updateStatusBar()
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@ class Ui_editorWidget_ui(object):
|
|||
def setupUi(self, editorWidget_ui):
|
||||
editorWidget_ui.setObjectName("editorWidget_ui")
|
||||
editorWidget_ui.resize(400, 300)
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout(editorWidget_ui)
|
||||
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.verticalLayout_2 = QtWidgets.QVBoxLayout(editorWidget_ui)
|
||||
self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
|
||||
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
||||
self.stack = QtWidgets.QStackedWidget(editorWidget_ui)
|
||||
self.stack.setObjectName("stack")
|
||||
self.scene = QtWidgets.QWidget()
|
||||
|
@ -42,10 +42,24 @@ class Ui_editorWidget_ui(object):
|
|||
self.scroll.setWidget(self.scrollAreaWidgetContents)
|
||||
self.verticalLayout.addWidget(self.scroll)
|
||||
self.stack.addWidget(self.folder)
|
||||
self.horizontalLayout.addWidget(self.stack)
|
||||
self.cork = QtWidgets.QWidget()
|
||||
self.cork.setObjectName("cork")
|
||||
self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.cork)
|
||||
self.horizontalLayout_3.setContentsMargins(0, 0, 0, 0)
|
||||
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
||||
self.corkView = QtWidgets.QListView(self.cork)
|
||||
self.corkView.setDragDropMode(QtWidgets.QAbstractItemView.DragDrop)
|
||||
self.corkView.setDefaultDropAction(QtCore.Qt.MoveAction)
|
||||
self.corkView.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
|
||||
self.corkView.setVerticalScrollMode(QtWidgets.QAbstractItemView.ScrollPerPixel)
|
||||
self.corkView.setFlow(QtWidgets.QListView.LeftToRight)
|
||||
self.corkView.setObjectName("corkView")
|
||||
self.horizontalLayout_3.addWidget(self.corkView)
|
||||
self.stack.addWidget(self.cork)
|
||||
self.verticalLayout_2.addWidget(self.stack)
|
||||
|
||||
self.retranslateUi(editorWidget_ui)
|
||||
self.stack.setCurrentIndex(0)
|
||||
self.stack.setCurrentIndex(2)
|
||||
QtCore.QMetaObject.connectSlotsByName(editorWidget_ui)
|
||||
|
||||
def retranslateUi(self, editorWidget_ui):
|
||||
|
|
|
@ -13,14 +13,14 @@
|
|||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="stack">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="scene">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
|
@ -62,6 +62,32 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="cork">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QListView" name="corkView">
|
||||
<property name="dragDropMode">
|
||||
<enum>QAbstractItemView::DragDrop</enum>
|
||||
</property>
|
||||
<property name="defaultDropAction">
|
||||
<enum>Qt::MoveAction</enum>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::ExtendedSelection</enum>
|
||||
</property>
|
||||
<property name="verticalScrollMode">
|
||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
||||
</property>
|
||||
<property name="flow">
|
||||
<enum>QListView::LeftToRight</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -857,6 +857,28 @@ class Ui_MainWindow(object):
|
|||
self.btnRedacShowOutline.setChecked(True)
|
||||
self.btnRedacShowOutline.setObjectName("btnRedacShowOutline")
|
||||
self.horizontalLayout_19.addWidget(self.btnRedacShowOutline)
|
||||
self.btnRedacFolderText = QtWidgets.QPushButton(self.layoutWidget1)
|
||||
self.btnRedacFolderText.setCheckable(True)
|
||||
self.btnRedacFolderText.setObjectName("btnRedacFolderText")
|
||||
self.buttonGroup = QtWidgets.QButtonGroup(MainWindow)
|
||||
self.buttonGroup.setObjectName("buttonGroup")
|
||||
self.buttonGroup.addButton(self.btnRedacFolderText)
|
||||
self.horizontalLayout_19.addWidget(self.btnRedacFolderText)
|
||||
self.btnRedacFolderCork = QtWidgets.QPushButton(self.layoutWidget1)
|
||||
self.btnRedacFolderCork.setCheckable(True)
|
||||
self.btnRedacFolderCork.setChecked(True)
|
||||
self.btnRedacFolderCork.setObjectName("btnRedacFolderCork")
|
||||
self.buttonGroup.addButton(self.btnRedacFolderCork)
|
||||
self.horizontalLayout_19.addWidget(self.btnRedacFolderCork)
|
||||
self.sldCorkSizeFactor = QtWidgets.QSlider(self.layoutWidget1)
|
||||
self.sldCorkSizeFactor.setMinimumSize(QtCore.QSize(100, 0))
|
||||
self.sldCorkSizeFactor.setMaximumSize(QtCore.QSize(200, 16777215))
|
||||
self.sldCorkSizeFactor.setMinimum(50)
|
||||
self.sldCorkSizeFactor.setMaximum(200)
|
||||
self.sldCorkSizeFactor.setProperty("value", 100)
|
||||
self.sldCorkSizeFactor.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.sldCorkSizeFactor.setObjectName("sldCorkSizeFactor")
|
||||
self.horizontalLayout_19.addWidget(self.sldCorkSizeFactor)
|
||||
spacerItem11 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.horizontalLayout_19.addItem(spacerItem11)
|
||||
self.lblRedacWC = QtWidgets.QLabel(self.layoutWidget1)
|
||||
|
@ -1252,6 +1274,8 @@ class Ui_MainWindow(object):
|
|||
self.txtPlanSummarySentance.setPlaceholderText(_translate("MainWindow", "One line scene summary"))
|
||||
self.label_9.setText(_translate("MainWindow", "Few sentences summary:"))
|
||||
self.tabMain.setTabText(self.tabMain.indexOf(self.lytTabOutline), _translate("MainWindow", "Outline"))
|
||||
self.btnRedacFolderText.setText(_translate("MainWindow", "Text"))
|
||||
self.btnRedacFolderCork.setText(_translate("MainWindow", "Cork"))
|
||||
self.btnRedacFullscreen.setShortcut(_translate("MainWindow", "F11"))
|
||||
self.groupBox_4.setTitle(_translate("MainWindow", "Properties"))
|
||||
self.lblRedacPOV.setText(_translate("MainWindow", "POV"))
|
||||
|
@ -1305,9 +1329,9 @@ class Ui_MainWindow(object):
|
|||
self.actSpellcheck.setText(_translate("MainWindow", "Spellcheck"))
|
||||
self.actSpellcheck.setShortcut(_translate("MainWindow", "F8"))
|
||||
|
||||
from ui.collapsibleGroupBox2 import collapsibleGroupBox2
|
||||
from ui.sldImportance import sldImportance
|
||||
from ui.cmbOutlineStatusChoser import cmbOutlineStatusChoser
|
||||
from ui.chkOutlineCompile import chkOutlineCompile
|
||||
from ui.collapsibleGroupBox2 import collapsibleGroupBox2
|
||||
from ui.cmbOutlinePersoChoser import cmbOutlinePersoChoser
|
||||
from ui.sldImportance import sldImportance
|
||||
from ui.editors.editorWidget import editorWidget
|
||||
|
|
|
@ -1660,6 +1660,63 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnRedacFolderText">
|
||||
<property name="text">
|
||||
<string>Text</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">buttonGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnRedacFolderCork">
|
||||
<property name="text">
|
||||
<string>Cork</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">buttonGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSlider" name="sldCorkSizeFactor">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>200</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
|
@ -2367,4 +2424,7 @@
|
|||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<buttongroups>
|
||||
<buttongroup name="buttonGroup"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<outlineItem title="root" type="folder" compile="2" wordCount="565" setGoal="112">
|
||||
<outlineItem title="root" type="folder" compile="2" wordCount="1290" setGoal="112">
|
||||
<outlineItem title="Nouveau" type="folder" compile="2" wordCount="15">
|
||||
<outlineItem title="Nouveau" type="scene" compile="2" text="return QTextEdit.resizeEvent(self, e) ad ad ad ad adaasd ad adsdasd ad e drset" wordCount="15"/>
|
||||
</outlineItem>
|
||||
<outlineItem title="Parent" type="folder" status="TODO" compile="2" wordCount="275">
|
||||
<outlineItem title="Nouveau" type="folder" summarySentance="asd asd asd " status="First draft" compile="2" wordCount="27">
|
||||
<outlineItem title="Parent" type="folder" status="TODO" compile="2" wordCount="579">
|
||||
<outlineItem title="Nouveau" type="folder" summarySentance="Résumé de la scène en une phrase" status="First draft" compile="2" wordCount="27">
|
||||
<outlineItem title="A" type="scene" compile="2" text="§Du texteDu texteDu text ad ad ad ad a Du texteDu te asd " wordCount="13" setGoal="10"/>
|
||||
<outlineItem title="B" type="scene" compile="2" setGoal="3"/>
|
||||
<outlineItem title="C" type="scene" compile="2" text="adasd ad ad asdasd asdasdasdasd asdad asd asd asd asd asd as as " wordCount="13" setGoal="3"/>
|
||||
|
@ -13,20 +13,38 @@
|
|||
<outlineItem title="Nouveau" type="scene" compile="2"/>
|
||||
</outlineItem>
|
||||
</outlineItem>
|
||||
<outlineItem title="Nouveau" type="folder" summarySentance="Résumé de la scène en une phrase" summaryFull="asdasd asd " compile="2"/>
|
||||
<outlineItem title="B" type="scene" compile="2" text="asd asd asd asd asd asd asd asd asd asd asd" wordCount="12" setGoal="10"/>
|
||||
<outlineItem title="Nouveau" type="folder" compile="2" wordCount="247">
|
||||
<outlineItem title="Nouveau" type="folder" compile="2"/>
|
||||
<outlineItem title="Nouveau" type="scene" compile="2" text="ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD **ASDASd** ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd " wordCount="199" setGoal="100"/>
|
||||
<outlineItem title="B" type="scene" compile="2" text="asd asd asd asd asd asd asd asd asd asd asd" wordCount="12" setGoal="10"/>
|
||||
<outlineItem title="B" type="scene" compile="2" text="asd asd asd asd asd asd asd asd asd asd asd" wordCount="12" setGoal="10"/>
|
||||
<outlineItem title="B" type="scene" compile="2" text="asd asd asd asd asd asd asd asd asd asd asd" wordCount="12" setGoal="10"/>
|
||||
<outlineItem title="B" type="scene" compile="2" text="asd asd asd asd asd asd asd asd asd asd asd" wordCount="12" setGoal="10"/>
|
||||
</outlineItem>
|
||||
<outlineItem title="MOIMOIMOI" type="scene" summarySentance="Résumé" summaryFull="Là ça joue, et on est content. Pas de raison de se plaindre. **OK**? Là ça joue, et on est content. Pas de raison de se plaindre. **OK**? Là ça joue, et on est content. Pas de raison de se plaindre. **OK**? Là ça joue, et on est content. Pas de raison de se plaindre. **OK**? Là ça joue, et on est content. Pas de raison de se plaindre. **OK**? Là ça joue, et on est content. Pas de raison de se plaindre. **OK**? Là ça joue, et on est content. Pas de raison de se plaindre. **OK**?" status="Second draft" compile="2" text="Là ça joue, et on est content. Pas de raison de se plaindre. **OK**? Ben voilà, suffisait de demander ! " wordCount="21" setGoal="250"/>
|
||||
<outlineItem title="Nouveau s" type="scene" summaryFull="asd asdasd asaa asd asd " POV="1" compile="2" text="ASDASd ASD ASDASd ASD asd sss ad ad ssss" wordCount="9" setGoal="10"/>
|
||||
<outlineItem title="MOIMOIMOI" type="scene" POV="1" compile="2" text="ASDASd ASD ASDASd ASD ASDASd ASD **ssss**" wordCount="7" setGoal="10"/>
|
||||
<outlineItem title="Nouveau s" type="scene" POV="1" compile="2" text="ASDASd ASD ASDASd ASD asd sss ad ad ssss" wordCount="9" setGoal="10"/>
|
||||
<outlineItem title="Nouveau" type="scene" compile="2" text="ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD **ASDASd** ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd ASDASd ASD ASDASd ASD asd asd " wordCount="199" setGoal="100"/>
|
||||
<outlineItem title="B" type="scene" compile="2" text="asd asd asd asd asd asd asd asd asd asd asd" wordCount="12" setGoal="10"/>
|
||||
<outlineItem title="Nouveau" type="folder" compile="2"/>
|
||||
<outlineItem title="MOIMOIMOI" type="scene" summaryFull="Là ça joue, et on est content. Pas de raison de se plaindre. **OK**?" status="Second draft" compile="2" text="Là ça joue, et on est content. Pas de raison de se plaindre. **OK**? Ben voilà, suffisait de demander ! " wordCount="21" setGoal="250"/>
|
||||
<outlineItem title="B" type="scene" compile="2" text="asd asd asd asd asd asd asd asd asd asd asd" wordCount="12" setGoal="10"/>
|
||||
<outlineItem title="B" type="scene" compile="2" text="asd asd asd asd asd asd asd asd asd asd asd" wordCount="12" setGoal="10"/>
|
||||
<outlineItem title="B" type="scene" compile="2" text="asd asd asd asd asd asd asd asd asd asd asd" wordCount="12" setGoal="10"/>
|
||||
</outlineItem>
|
||||
<outlineItem title="A" type="scene" compile="2" text="asdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasd asd aasdasd asd asd asd asd asdasd asdaasd " wordCount="58" setGoal="50"/>
|
||||
<outlineItem title="Nouveau A" type="folder" compile="2" wordCount="217" setGoal="250">
|
||||
<outlineItem title="Nouveau" type="scene" compile="2" text="ASDASd ASD ASDASd ASD " wordCount="4"/>
|
||||
<outlineItem title="Nouveau" type="scene" compile="2" text="ASDASd ASD " wordCount="2"/>
|
||||
<outlineItem title="Nouveau A" type="folder" compile="2" wordCount="684" setGoal="250">
|
||||
<outlineItem title="Nouveau Avec un nom franchement très long et on est mal barré pour l'imprimer correctement" type="scene" compile="2" text="ASDASd ASD ASDASd ASD " wordCount="4"/>
|
||||
<outlineItem title="Titre cool" type="scene" compile="2" text="asdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasd asd aasdasd asd asd asd asd asdasd asdaasd " wordCount="58" setGoal="50"/>
|
||||
<outlineItem title="Nouveau" type="scene" status="First draft" compile="2" text="ASDASd ASD " wordCount="2"/>
|
||||
<outlineItem title="A" type="scene" compile="2" text="asdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasd asd aasdasd asd asd asd asd asdasd asdaasd " wordCount="58" setGoal="50"/>
|
||||
<outlineItem title="A" type="scene" status="TODO" compile="2" text="asdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasd asd aasdasd asd asd asd asd asdasd asdaasd " wordCount="58" setGoal="50"/>
|
||||
<outlineItem title="Nouveau" type="scene" compile="2"/>
|
||||
<outlineItem title="A" type="scene" status="Final" compile="2" text="asdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasdasdasd asd asd asd asd asdasd asdaasd asdasd asd aasdasd asd asd asd asd asdasd asdaasd " wordCount="58" setGoal="50"/>
|
||||
<outlineItem title="Nouveau" type="scene" compile="2" text="ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD adasaas adasds adssdawdas saasdASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD adasaas adasds adssdawdas saasdASDASd ASD ASDASd ASD ASDASd ASD aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" wordCount="211"/>
|
||||
<outlineItem title="Nouveau" type="scene" compile="2"/>
|
||||
<outlineItem title="Nouveau" type="scene" compile="2"/>
|
||||
<outlineItem title="B" type="scene" compile="2" text="asd asd asd asd asd asd asd asd asd asd asd" wordCount="12" setGoal="10"/>
|
||||
<outlineItem title="Nouveau" type="scene" compile="2" text="ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD adasaas adasds adssdawdas saasdASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD ASDASd ASD adasaas adasds adssdawdas saasdASDASd ASD ASDASd ASD ASDASd ASD aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" wordCount="211"/>
|
||||
<outlineItem title="B" type="scene" compile="2" text="asd asd asd asd asd asd asd asd asd asd asd" wordCount="12" setGoal="10"/>
|
||||
</outlineItem>
|
||||
<outlineItem title="B" type="scene" compile="2" text="asd asd asd asd asd asd asd asd asd asd asd" wordCount="12" setGoal="10"/>
|
||||
</outlineItem>
|
||||
|
|
Loading…
Reference in a new issue