mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-06-16 18:04:33 +12:00
View mode working
This commit is contained in:
parent
ccaa302616
commit
7bb52c80a5
|
@ -4,7 +4,7 @@
|
||||||
import os
|
import os
|
||||||
from random import *
|
from random import *
|
||||||
|
|
||||||
from PyQt5.QtCore import Qt, QRect, QStandardPaths, QObject
|
from PyQt5.QtCore import Qt, QRect, QStandardPaths, QObject, QRegExp
|
||||||
|
|
||||||
# Used to detect multiple connections
|
# Used to detect multiple connections
|
||||||
from PyQt5.QtGui import QBrush, QIcon, QPainter
|
from PyQt5.QtGui import QBrush, QIcon, QPainter
|
||||||
|
@ -18,27 +18,32 @@ from manuskript.enums import Outline
|
||||||
AUC = Qt.AutoConnection | Qt.UniqueConnection
|
AUC = Qt.AutoConnection | Qt.UniqueConnection
|
||||||
MW = None
|
MW = None
|
||||||
|
|
||||||
|
|
||||||
def wordCount(text):
|
def wordCount(text):
|
||||||
return len(text.strip().replace(" ", "\n").split("\n")) if text else 0
|
return len(text.strip().replace(" ", "\n").split("\n")) if text else 0
|
||||||
|
|
||||||
|
|
||||||
def toInt(text):
|
def toInt(text):
|
||||||
if text:
|
if text:
|
||||||
return int(text)
|
return int(text)
|
||||||
else:
|
else:
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
def toFloat(text):
|
def toFloat(text):
|
||||||
if text:
|
if text:
|
||||||
return float(text)
|
return float(text)
|
||||||
else:
|
else:
|
||||||
return 0.
|
return 0.
|
||||||
|
|
||||||
|
|
||||||
def toString(text):
|
def toString(text):
|
||||||
if text in [None, "None"]:
|
if text in [None, "None"]:
|
||||||
return ""
|
return ""
|
||||||
else:
|
else:
|
||||||
return str(text)
|
return str(text)
|
||||||
|
|
||||||
|
|
||||||
def drawProgress(painter, rect, progress, radius=0):
|
def drawProgress(painter, rect, progress, radius=0):
|
||||||
painter.setPen(Qt.NoPen)
|
painter.setPen(Qt.NoPen)
|
||||||
painter.setBrush(QColor("#dddddd"))
|
painter.setBrush(QColor("#dddddd"))
|
||||||
|
@ -50,6 +55,7 @@ def drawProgress(painter, rect, progress, radius=0):
|
||||||
r2.setWidth(r2.width() * min(progress, 1))
|
r2.setWidth(r2.width() * min(progress, 1))
|
||||||
painter.drawRoundedRect(r2, radius, radius)
|
painter.drawRoundedRect(r2, radius, radius)
|
||||||
|
|
||||||
|
|
||||||
def colorFromProgress(progress):
|
def colorFromProgress(progress):
|
||||||
progress = toFloat(progress)
|
progress = toFloat(progress)
|
||||||
c1 = QColor(Qt.red)
|
c1 = QColor(Qt.red)
|
||||||
|
@ -66,6 +72,7 @@ def colorFromProgress(progress):
|
||||||
else:
|
else:
|
||||||
return c3
|
return c3
|
||||||
|
|
||||||
|
|
||||||
def mainWindow():
|
def mainWindow():
|
||||||
global MW
|
global MW
|
||||||
if not MW:
|
if not MW:
|
||||||
|
@ -77,6 +84,7 @@ def mainWindow():
|
||||||
else:
|
else:
|
||||||
return MW
|
return MW
|
||||||
|
|
||||||
|
|
||||||
def iconColor(icon):
|
def iconColor(icon):
|
||||||
"""Returns a QRgb from a QIcon, assuming its all the same color"""
|
"""Returns a QRgb from a QIcon, assuming its all the same color"""
|
||||||
px = icon.pixmap(5, 5)
|
px = icon.pixmap(5, 5)
|
||||||
|
@ -85,14 +93,17 @@ def iconColor(icon):
|
||||||
else:
|
else:
|
||||||
return QColor(Qt.transparent)
|
return QColor(Qt.transparent)
|
||||||
|
|
||||||
|
|
||||||
def iconFromColor(color):
|
def iconFromColor(color):
|
||||||
px = QPixmap(32, 32)
|
px = QPixmap(32, 32)
|
||||||
px.fill(color)
|
px.fill(color)
|
||||||
return QIcon(px)
|
return QIcon(px)
|
||||||
|
|
||||||
|
|
||||||
def iconFromColorString(string):
|
def iconFromColorString(string):
|
||||||
return iconFromColor(QColor(string))
|
return iconFromColor(QColor(string))
|
||||||
|
|
||||||
|
|
||||||
def randomColor(mix=None):
|
def randomColor(mix=None):
|
||||||
"""Generates a random color. If mix (QColor) is given, mixes the random color and mix."""
|
"""Generates a random color. If mix (QColor) is given, mixes the random color and mix."""
|
||||||
r = randint(0, 255)
|
r = randint(0, 255)
|
||||||
|
@ -106,6 +117,7 @@ def randomColor(mix=None):
|
||||||
|
|
||||||
return QColor(r, g, b)
|
return QColor(r, g, b)
|
||||||
|
|
||||||
|
|
||||||
def mixColors(col1, col2, f=.5):
|
def mixColors(col1, col2, f=.5):
|
||||||
f2 = 1-f
|
f2 = 1-f
|
||||||
r = col1.red() * f + col2.red() * f2
|
r = col1.red() * f + col2.red() * f2
|
||||||
|
@ -113,6 +125,7 @@ def mixColors(col1, col2, f=.5):
|
||||||
b = col1.blue() * f + col2.blue() * f2
|
b = col1.blue() * f + col2.blue() * f2
|
||||||
return QColor(r, g, b)
|
return QColor(r, g, b)
|
||||||
|
|
||||||
|
|
||||||
def outlineItemColors(item):
|
def outlineItemColors(item):
|
||||||
"""Takes an OutlineItem and returns a dict of colors."""
|
"""Takes an OutlineItem and returns a dict of colors."""
|
||||||
colors = {}
|
colors = {}
|
||||||
|
@ -145,6 +158,7 @@ def outlineItemColors(item):
|
||||||
|
|
||||||
return colors
|
return colors
|
||||||
|
|
||||||
|
|
||||||
def colorifyPixmap(pixmap, color):
|
def colorifyPixmap(pixmap, color):
|
||||||
# FIXME: ugly
|
# FIXME: ugly
|
||||||
p = QPainter(pixmap)
|
p = QPainter(pixmap)
|
||||||
|
@ -152,12 +166,14 @@ def colorifyPixmap(pixmap, color):
|
||||||
p.fillRect(pixmap.rect(), color)
|
p.fillRect(pixmap.rect(), color)
|
||||||
return pixmap
|
return pixmap
|
||||||
|
|
||||||
|
|
||||||
def appPath(suffix=None):
|
def appPath(suffix=None):
|
||||||
p = os.path.realpath(os.path.join(os.path.split(__file__)[0], ".."))
|
p = os.path.realpath(os.path.join(os.path.split(__file__)[0], ".."))
|
||||||
if suffix:
|
if suffix:
|
||||||
p = os.path.join(p, suffix)
|
p = os.path.join(p, suffix)
|
||||||
return p
|
return p
|
||||||
|
|
||||||
|
|
||||||
def writablePath(suffix=None):
|
def writablePath(suffix=None):
|
||||||
if hasattr(QStandardPaths, "AppLocalDataLocation"):
|
if hasattr(QStandardPaths, "AppLocalDataLocation"):
|
||||||
p = QStandardPaths.writableLocation(QStandardPaths.AppLocalDataLocation)
|
p = QStandardPaths.writableLocation(QStandardPaths.AppLocalDataLocation)
|
||||||
|
@ -170,6 +186,7 @@ def writablePath(suffix=None):
|
||||||
os.makedirs(p)
|
os.makedirs(p)
|
||||||
return p
|
return p
|
||||||
|
|
||||||
|
|
||||||
def allPaths(suffix=None):
|
def allPaths(suffix=None):
|
||||||
paths = []
|
paths = []
|
||||||
# src directory
|
# src directory
|
||||||
|
@ -178,6 +195,7 @@ def allPaths(suffix=None):
|
||||||
paths.append(writablePath(suffix))
|
paths.append(writablePath(suffix))
|
||||||
return paths
|
return paths
|
||||||
|
|
||||||
|
|
||||||
def lightBlue():
|
def lightBlue():
|
||||||
"""
|
"""
|
||||||
A light blue used in several places in manuskript.
|
A light blue used in several places in manuskript.
|
||||||
|
@ -185,8 +203,19 @@ def lightBlue():
|
||||||
"""
|
"""
|
||||||
return QColor(Qt.blue).lighter(190)
|
return QColor(Qt.blue).lighter(190)
|
||||||
|
|
||||||
|
|
||||||
def totalObjects():
|
def totalObjects():
|
||||||
return len(mainWindow().findChildren(QObject))
|
return len(mainWindow().findChildren(QObject))
|
||||||
|
|
||||||
|
|
||||||
def printObjects():
|
def printObjects():
|
||||||
print("Objects:", str(totalObjects()))
|
print("Objects:", str(totalObjects()))
|
||||||
|
|
||||||
|
|
||||||
|
def findWidgetsOfClass(cls):
|
||||||
|
"""
|
||||||
|
Returns all widgets, children of MainWindow, whose class is cls.
|
||||||
|
@param cls: a class
|
||||||
|
@return: list of QWidgets
|
||||||
|
"""
|
||||||
|
return mainWindow().findChildren(cls, QRegExp())
|
||||||
|
|
|
@ -9,8 +9,8 @@ from PyQt5.QtWidgets import QMainWindow, QHeaderView, qApp, QMenu, QActionGroup,
|
||||||
QLabel
|
QLabel
|
||||||
|
|
||||||
from manuskript import settings
|
from manuskript import settings
|
||||||
from manuskript.enums import Character, PlotStep, Plot, World
|
from manuskript.enums import Character, PlotStep, Plot, World, Outline
|
||||||
from manuskript.functions import AUC, wordCount, appPath
|
from manuskript.functions import AUC, wordCount, appPath, findWidgetsOfClass
|
||||||
from manuskript import loadSave
|
from manuskript import loadSave
|
||||||
from manuskript.models.characterModel import characterModel
|
from manuskript.models.characterModel import characterModel
|
||||||
from manuskript.models.outlineModel import outlineModel
|
from manuskript.models.outlineModel import outlineModel
|
||||||
|
@ -93,8 +93,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
||||||
|
|
||||||
# Main Menu
|
# Main Menu
|
||||||
for i in [self.actSave, self.actSaveAs, self.actCloseProject,
|
for i in [self.actSave, self.actSaveAs, self.actCloseProject,
|
||||||
self.menuEdit, self.menuMode, self.menuView, self.menuTools,
|
self.menuEdit, self.menuView, self.menuTools, self.menuHelp]:
|
||||||
self.menuHelp]:
|
|
||||||
i.setEnabled(False)
|
i.setEnabled(False)
|
||||||
|
|
||||||
self.actOpen.triggered.connect(self.welcome.openFile)
|
self.actOpen.triggered.connect(self.welcome.openFile)
|
||||||
|
@ -109,6 +108,14 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
||||||
self.actToolFrequency.triggered.connect(self.frequencyAnalyzer)
|
self.actToolFrequency.triggered.connect(self.frequencyAnalyzer)
|
||||||
self.generateViewMenu()
|
self.generateViewMenu()
|
||||||
|
|
||||||
|
self.actModeGroup = QActionGroup(self)
|
||||||
|
self.actModeSimple.setActionGroup(self.actModeGroup)
|
||||||
|
self.actModeFiction.setActionGroup(self.actModeGroup)
|
||||||
|
self.actModeSnowflake.setActionGroup(self.actModeGroup)
|
||||||
|
self.actModeSimple.triggered.connect(self.setViewModeSimple)
|
||||||
|
self.actModeFiction.triggered.connect(self.setViewModeFiction)
|
||||||
|
self.actModeSnowflake.setEnabled(False)
|
||||||
|
|
||||||
self.makeUIConnections()
|
self.makeUIConnections()
|
||||||
|
|
||||||
# self.loadProject(os.path.join(appPath(), "test_project.zip"))
|
# self.loadProject(os.path.join(appPath(), "test_project.zip"))
|
||||||
|
@ -322,6 +329,10 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
||||||
# We force to emit even if it opens on the current tab
|
# We force to emit even if it opens on the current tab
|
||||||
self.tabMain.currentChanged.emit(settings.lastTab)
|
self.tabMain.currentChanged.emit(settings.lastTab)
|
||||||
self.mainEditor.updateCorkBackground()
|
self.mainEditor.updateCorkBackground()
|
||||||
|
if settings.viewMode == "simple":
|
||||||
|
self.setViewModeSimple()
|
||||||
|
else:
|
||||||
|
self.setViewModeFiction()
|
||||||
|
|
||||||
# Set autosave
|
# Set autosave
|
||||||
self.saveTimer = QTimer()
|
self.saveTimer = QTimer()
|
||||||
|
@ -349,8 +360,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
||||||
|
|
||||||
# UI
|
# UI
|
||||||
for i in [self.actSave, self.actSaveAs, self.actCloseProject,
|
for i in [self.actSave, self.actSaveAs, self.actCloseProject,
|
||||||
self.menuEdit, self.menuMode, self.menuView, self.menuTools,
|
self.menuEdit, self.menuView, self.menuTools, self.menuHelp]:
|
||||||
self.menuHelp]:
|
|
||||||
i.setEnabled(True)
|
i.setEnabled(True)
|
||||||
# FIXME: set Window's name: project name
|
# FIXME: set Window's name: project name
|
||||||
|
|
||||||
|
@ -379,8 +389,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
||||||
|
|
||||||
# UI
|
# UI
|
||||||
for i in [self.actSave, self.actSaveAs, self.actCloseProject,
|
for i in [self.actSave, self.actSaveAs, self.actCloseProject,
|
||||||
self.menuEdit, self.menuMode, self.menuView, self.menuTools,
|
self.menuEdit, self.menuView, self.menuTools, self.menuHelp]:
|
||||||
self.menuHelp]:
|
|
||||||
i.setEnabled(False)
|
i.setEnabled(False)
|
||||||
|
|
||||||
# Reload recent files
|
# Reload recent files
|
||||||
|
@ -979,6 +988,8 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
||||||
}
|
}
|
||||||
|
|
||||||
self.menuView.clear()
|
self.menuView.clear()
|
||||||
|
self.menuView.addMenu(self.menuMode)
|
||||||
|
self.menuView.addSeparator()
|
||||||
|
|
||||||
# print("Generating menus with", settings.viewSettings)
|
# print("Generating menus with", settings.viewSettings)
|
||||||
|
|
||||||
|
@ -1014,6 +1025,48 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
||||||
if item == "Tree":
|
if item == "Tree":
|
||||||
self.treeRedacOutline.viewport().update()
|
self.treeRedacOutline.viewport().update()
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# VIEW MODES
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
def setViewModeSimple(self):
|
||||||
|
settings.viewMode = "simple"
|
||||||
|
self.tabMain.setCurrentIndex(self.TabRedac)
|
||||||
|
self.viewModeFictionVisibilitySwitch(False)
|
||||||
|
self.actModeSimple.setChecked(True)
|
||||||
|
|
||||||
|
def setViewModeFiction(self):
|
||||||
|
settings.viewMode = "fiction"
|
||||||
|
self.viewModeFictionVisibilitySwitch(True)
|
||||||
|
self.actModeFiction.setChecked(True)
|
||||||
|
|
||||||
|
def viewModeFictionVisibilitySwitch(self, val):
|
||||||
|
"""
|
||||||
|
Swtiches the visibility of some UI components useful for fiction only
|
||||||
|
@param val: sets visibility to val
|
||||||
|
"""
|
||||||
|
|
||||||
|
# Menu navigation & boutton in toolbar
|
||||||
|
self.toolbar.setDockVisibility(self.dckNavigation, val)
|
||||||
|
|
||||||
|
# POV in metadatas
|
||||||
|
from manuskript.ui.views.propertiesView import propertiesView
|
||||||
|
for w in findWidgetsOfClass(propertiesView):
|
||||||
|
w.lblPOV.setVisible(val)
|
||||||
|
w.cmbPOV.setVisible(val)
|
||||||
|
|
||||||
|
# POV in outline view
|
||||||
|
if Outline.POV.value in settings.outlineViewColumns:
|
||||||
|
settings.outlineViewColumns.remove(Outline.POV.value)
|
||||||
|
|
||||||
|
from manuskript.ui.views.outlineView import outlineView
|
||||||
|
for w in findWidgetsOfClass(outlineView):
|
||||||
|
w.hideColumns()
|
||||||
|
|
||||||
|
# TODO: clean up all other fiction things in non-fiction view mode
|
||||||
|
# Character in search widget
|
||||||
|
# POV in settings / views
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# COMPILE
|
# COMPILE
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
|
@ -86,11 +86,13 @@ frequencyAnalyzer = {
|
||||||
"phraseMax": 5
|
"phraseMax": 5
|
||||||
}
|
}
|
||||||
|
|
||||||
|
viewMode = "fiction"
|
||||||
|
|
||||||
def save(filename=None, protocol=None):
|
def save(filename=None, protocol=None):
|
||||||
|
|
||||||
global spellcheck, dict, corkSliderFactor, viewSettings, corkSizeFactor, folderView, lastTab, openIndexes, \
|
global spellcheck, dict, corkSliderFactor, viewSettings, corkSizeFactor, folderView, lastTab, openIndexes, \
|
||||||
autoSave, autoSaveDelay, saveOnQuit, autoSaveNoChanges, autoSaveNoChangesDelay, outlineViewColumns, \
|
autoSave, autoSaveDelay, saveOnQuit, autoSaveNoChanges, autoSaveNoChangesDelay, outlineViewColumns, \
|
||||||
corkBackground, fullScreenTheme, defaultTextType, textEditor, revisions, frequencyAnalyzer
|
corkBackground, fullScreenTheme, defaultTextType, textEditor, revisions, frequencyAnalyzer, viewMode
|
||||||
|
|
||||||
allSettings = {
|
allSettings = {
|
||||||
"viewSettings": viewSettings,
|
"viewSettings": viewSettings,
|
||||||
|
@ -111,7 +113,8 @@ def save(filename=None, protocol=None):
|
||||||
"defaultTextType":defaultTextType,
|
"defaultTextType":defaultTextType,
|
||||||
"textEditor":textEditor,
|
"textEditor":textEditor,
|
||||||
"revisions":revisions,
|
"revisions":revisions,
|
||||||
"frequencyAnalyzer": frequencyAnalyzer
|
"frequencyAnalyzer": frequencyAnalyzer,
|
||||||
|
"viewMode": viewMode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#pp=pprint.PrettyPrinter(indent=4, compact=False)
|
#pp=pprint.PrettyPrinter(indent=4, compact=False)
|
||||||
|
@ -244,3 +247,7 @@ def load(string, fromString=False, protocol=None):
|
||||||
global frequencyAnalyzer
|
global frequencyAnalyzer
|
||||||
frequencyAnalyzer = allSettings["frequencyAnalyzer"]
|
frequencyAnalyzer = allSettings["frequencyAnalyzer"]
|
||||||
|
|
||||||
|
if "viewMode" in allSettings:
|
||||||
|
global viewMode
|
||||||
|
viewMode = allSettings["viewMode"]
|
||||||
|
|
||||||
|
|
|
@ -11,12 +11,13 @@ from PyQt5.QtWidgets import qApp
|
||||||
# Spell checker support
|
# Spell checker support
|
||||||
from manuskript import settings
|
from manuskript import settings
|
||||||
from manuskript.enums import Outline
|
from manuskript.enums import Outline
|
||||||
from manuskript.functions import allPaths, iconColor, writablePath, appPath
|
from manuskript.functions import allPaths, iconColor, writablePath, appPath, findWidgetsOfClass
|
||||||
from manuskript.functions import mainWindow
|
from manuskript.functions import mainWindow
|
||||||
from manuskript.ui.editors.themes import createThemePreview
|
from manuskript.ui.editors.themes import createThemePreview
|
||||||
from manuskript.ui.editors.themes import getThemeName
|
from manuskript.ui.editors.themes import getThemeName
|
||||||
from manuskript.ui.editors.themes import loadThemeDatas
|
from manuskript.ui.editors.themes import loadThemeDatas
|
||||||
from manuskript.ui.settings_ui import Ui_Settings
|
from manuskript.ui.settings_ui import Ui_Settings
|
||||||
|
from manuskript.ui.views.outlineView import outlineView
|
||||||
from manuskript.ui.views.textEditView import textEditView
|
from manuskript.ui.views.textEditView import textEditView
|
||||||
from manuskript.ui.welcome import welcome
|
from manuskript.ui.welcome import welcome
|
||||||
|
|
||||||
|
@ -99,6 +100,8 @@ class settingsWindow(QWidget, Ui_Settings):
|
||||||
chk.setChecked(col in settings.outlineViewColumns)
|
chk.setChecked(col in settings.outlineViewColumns)
|
||||||
chk.stateChanged.connect(self.outlineColumnsChanged)
|
chk.stateChanged.connect(self.outlineColumnsChanged)
|
||||||
|
|
||||||
|
self.chkOutlinePOV.setVisible(settings.viewMode != "simple") # Hides checkbox if non-fiction view mode
|
||||||
|
|
||||||
for item, what, value in [
|
for item, what, value in [
|
||||||
(self.rdoTreeItemCount, "InfoFolder", "Count"),
|
(self.rdoTreeItemCount, "InfoFolder", "Count"),
|
||||||
(self.rdoTreeWC, "InfoFolder", "WC"),
|
(self.rdoTreeWC, "InfoFolder", "WC"),
|
||||||
|
@ -264,6 +267,7 @@ class settingsWindow(QWidget, Ui_Settings):
|
||||||
item, part = self.viewSettingsDatas()[cmb]
|
item, part = self.viewSettingsDatas()[cmb]
|
||||||
element = lst[cmb.currentIndex()]
|
element = lst[cmb.currentIndex()]
|
||||||
self.mw.setViewSettings(item, part, element)
|
self.mw.setViewSettings(item, part, element)
|
||||||
|
self.mw.generateViewMenu()
|
||||||
|
|
||||||
def outlineColumnsData(self):
|
def outlineColumnsData(self):
|
||||||
return {
|
return {
|
||||||
|
@ -287,8 +291,8 @@ class settingsWindow(QWidget, Ui_Settings):
|
||||||
settings.outlineViewColumns.remove(col)
|
settings.outlineViewColumns.remove(col)
|
||||||
|
|
||||||
# Update views
|
# Update views
|
||||||
self.mw.redacEditor.outlineView.hideColumns()
|
for w in findWidgetsOfClass(outlineView):
|
||||||
self.mw.treePlanOutline.hideColumns()
|
w.hideColumns()
|
||||||
|
|
||||||
def treeViewSettignsChanged(self):
|
def treeViewSettignsChanged(self):
|
||||||
for item, what, value in [
|
for item, what, value in [
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# --!-- coding: utf8 --!--
|
# --!-- coding: utf8 --!--
|
||||||
from PyQt5.QtCore import Qt
|
from PyQt5.QtCore import Qt
|
||||||
from PyQt5.QtWidgets import QToolBar, QDockWidget, QAction, QToolButton, QSizePolicy, QStylePainter, \
|
from PyQt5.QtWidgets import QToolBar, QDockWidget, QAction, QToolButton, QSizePolicy, QStylePainter, \
|
||||||
QStyleOptionButton, QStyle, QLabel
|
QStyleOptionButton, QStyle
|
||||||
|
|
||||||
|
|
||||||
class collapsibleDockWidgets(QToolBar):
|
class collapsibleDockWidgets(QToolBar):
|
||||||
|
@ -31,6 +31,8 @@ class collapsibleDockWidgets(QToolBar):
|
||||||
# self.setAllowedAreas(self.TRANSPOSED_AREA[self._area])
|
# self.setAllowedAreas(self.TRANSPOSED_AREA[self._area])
|
||||||
self.parent().addToolBar(self.TRANSPOSED_AREA[self._area], self)
|
self.parent().addToolBar(self.TRANSPOSED_AREA[self._area], self)
|
||||||
|
|
||||||
|
self._dockToButtonAction = {}
|
||||||
|
|
||||||
# Dock widgets
|
# Dock widgets
|
||||||
for d in self._dockWidgets():
|
for d in self._dockWidgets():
|
||||||
b = verticalButton(self)
|
b = verticalButton(self)
|
||||||
|
@ -48,7 +50,8 @@ class collapsibleDockWidgets(QToolBar):
|
||||||
background: lightBlue;
|
background: lightBlue;
|
||||||
}
|
}
|
||||||
""")
|
""")
|
||||||
self.addWidget(b)
|
a = self.addWidget(b)
|
||||||
|
self._dockToButtonAction[d] = a
|
||||||
|
|
||||||
self.addSeparator()
|
self.addSeparator()
|
||||||
|
|
||||||
|
@ -88,6 +91,10 @@ class collapsibleDockWidgets(QToolBar):
|
||||||
else:
|
else:
|
||||||
action.setVisible(True)
|
action.setVisible(True)
|
||||||
|
|
||||||
|
def setDockVisibility(self, dock, val):
|
||||||
|
dock.setVisible(val)
|
||||||
|
self._dockToButtonAction[dock].setVisible(val)
|
||||||
|
|
||||||
def saveState(self):
|
def saveState(self):
|
||||||
# We just need to save states of the custom widgets.
|
# We just need to save states of the custom widgets.
|
||||||
state = []
|
state = []
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
# Form implementation generated from reading ui file 'manuskript/ui/mainWindow.ui'
|
# Form implementation generated from reading ui file 'manuskript/ui/mainWindow.ui'
|
||||||
#
|
#
|
||||||
# Created: Thu Mar 3 18:52:22 2016
|
# Created by: PyQt5 UI code generator 5.4.2
|
||||||
# by: PyQt5 UI code generator 5.2.1
|
|
||||||
#
|
#
|
||||||
# WARNING! All changes made in this file will be lost!
|
# WARNING! All changes made in this file will be lost!
|
||||||
|
|
||||||
|
@ -17,8 +16,8 @@ class Ui_MainWindow(object):
|
||||||
self.centralwidget = QtWidgets.QWidget(MainWindow)
|
self.centralwidget = QtWidgets.QWidget(MainWindow)
|
||||||
self.centralwidget.setObjectName("centralwidget")
|
self.centralwidget.setObjectName("centralwidget")
|
||||||
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.centralwidget)
|
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.centralwidget)
|
||||||
self.horizontalLayout_2.setSpacing(0)
|
|
||||||
self.horizontalLayout_2.setContentsMargins(0, 6, 0, 0)
|
self.horizontalLayout_2.setContentsMargins(0, 6, 0, 0)
|
||||||
|
self.horizontalLayout_2.setSpacing(0)
|
||||||
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
||||||
self.stack = QtWidgets.QStackedWidget(self.centralwidget)
|
self.stack = QtWidgets.QStackedWidget(self.centralwidget)
|
||||||
self.stack.setObjectName("stack")
|
self.stack.setObjectName("stack")
|
||||||
|
@ -809,7 +808,6 @@ class Ui_MainWindow(object):
|
||||||
self.layoutWidget = QtWidgets.QWidget(self.splitterOutlineH)
|
self.layoutWidget = QtWidgets.QWidget(self.splitterOutlineH)
|
||||||
self.layoutWidget.setObjectName("layoutWidget")
|
self.layoutWidget.setObjectName("layoutWidget")
|
||||||
self.verticalLayout_14 = QtWidgets.QVBoxLayout(self.layoutWidget)
|
self.verticalLayout_14 = QtWidgets.QVBoxLayout(self.layoutWidget)
|
||||||
self.verticalLayout_14.setContentsMargins(0, 0, 0, 0)
|
|
||||||
self.verticalLayout_14.setObjectName("verticalLayout_14")
|
self.verticalLayout_14.setObjectName("verticalLayout_14")
|
||||||
self.splitterOutlineV = QtWidgets.QSplitter(self.layoutWidget)
|
self.splitterOutlineV = QtWidgets.QSplitter(self.layoutWidget)
|
||||||
self.splitterOutlineV.setOrientation(QtCore.Qt.Vertical)
|
self.splitterOutlineV.setOrientation(QtCore.Qt.Vertical)
|
||||||
|
@ -996,7 +994,7 @@ class Ui_MainWindow(object):
|
||||||
self.horizontalLayout_2.addWidget(self.stack)
|
self.horizontalLayout_2.addWidget(self.stack)
|
||||||
MainWindow.setCentralWidget(self.centralwidget)
|
MainWindow.setCentralWidget(self.centralwidget)
|
||||||
self.menubar = QtWidgets.QMenuBar(MainWindow)
|
self.menubar = QtWidgets.QMenuBar(MainWindow)
|
||||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 1112, 20))
|
self.menubar.setGeometry(QtCore.QRect(0, 0, 1112, 30))
|
||||||
self.menubar.setObjectName("menubar")
|
self.menubar.setObjectName("menubar")
|
||||||
self.menuFile = QtWidgets.QMenu(self.menubar)
|
self.menuFile = QtWidgets.QMenu(self.menubar)
|
||||||
self.menuFile.setObjectName("menuFile")
|
self.menuFile.setObjectName("menuFile")
|
||||||
|
@ -1004,8 +1002,6 @@ class Ui_MainWindow(object):
|
||||||
icon = QtGui.QIcon.fromTheme("folder-recent")
|
icon = QtGui.QIcon.fromTheme("folder-recent")
|
||||||
self.menuRecents.setIcon(icon)
|
self.menuRecents.setIcon(icon)
|
||||||
self.menuRecents.setObjectName("menuRecents")
|
self.menuRecents.setObjectName("menuRecents")
|
||||||
self.menuMode = QtWidgets.QMenu(self.menubar)
|
|
||||||
self.menuMode.setObjectName("menuMode")
|
|
||||||
self.menuHelp = QtWidgets.QMenu(self.menubar)
|
self.menuHelp = QtWidgets.QMenu(self.menubar)
|
||||||
self.menuHelp.setObjectName("menuHelp")
|
self.menuHelp.setObjectName("menuHelp")
|
||||||
self.menuTools = QtWidgets.QMenu(self.menubar)
|
self.menuTools = QtWidgets.QMenu(self.menubar)
|
||||||
|
@ -1014,6 +1010,8 @@ class Ui_MainWindow(object):
|
||||||
self.menuEdit.setObjectName("menuEdit")
|
self.menuEdit.setObjectName("menuEdit")
|
||||||
self.menuView = QtWidgets.QMenu(self.menubar)
|
self.menuView = QtWidgets.QMenu(self.menubar)
|
||||||
self.menuView.setObjectName("menuView")
|
self.menuView.setObjectName("menuView")
|
||||||
|
self.menuMode = QtWidgets.QMenu(self.menuView)
|
||||||
|
self.menuMode.setObjectName("menuMode")
|
||||||
MainWindow.setMenuBar(self.menubar)
|
MainWindow.setMenuBar(self.menubar)
|
||||||
self.statusbar = QtWidgets.QStatusBar(MainWindow)
|
self.statusbar = QtWidgets.QStatusBar(MainWindow)
|
||||||
self.statusbar.setObjectName("statusbar")
|
self.statusbar.setObjectName("statusbar")
|
||||||
|
@ -1113,16 +1111,16 @@ class Ui_MainWindow(object):
|
||||||
self.actStatus.setObjectName("actStatus")
|
self.actStatus.setObjectName("actStatus")
|
||||||
self.actViewTree = QtWidgets.QAction(MainWindow)
|
self.actViewTree = QtWidgets.QAction(MainWindow)
|
||||||
self.actViewTree.setObjectName("actViewTree")
|
self.actViewTree.setObjectName("actViewTree")
|
||||||
self.actModeNorma = QtWidgets.QAction(MainWindow)
|
|
||||||
self.actModeNorma.setCheckable(True)
|
|
||||||
self.actModeNorma.setChecked(True)
|
|
||||||
self.actModeNorma.setObjectName("actModeNorma")
|
|
||||||
self.actModeSimple = QtWidgets.QAction(MainWindow)
|
self.actModeSimple = QtWidgets.QAction(MainWindow)
|
||||||
self.actModeSimple.setCheckable(True)
|
self.actModeSimple.setCheckable(True)
|
||||||
|
self.actModeSimple.setChecked(True)
|
||||||
self.actModeSimple.setObjectName("actModeSimple")
|
self.actModeSimple.setObjectName("actModeSimple")
|
||||||
self.actModeFractal = QtWidgets.QAction(MainWindow)
|
self.actModeFiction = QtWidgets.QAction(MainWindow)
|
||||||
self.actModeFractal.setCheckable(True)
|
self.actModeFiction.setCheckable(True)
|
||||||
self.actModeFractal.setObjectName("actModeFractal")
|
self.actModeFiction.setObjectName("actModeFiction")
|
||||||
|
self.actModeSnowflake = QtWidgets.QAction(MainWindow)
|
||||||
|
self.actModeSnowflake.setCheckable(True)
|
||||||
|
self.actModeSnowflake.setObjectName("actModeSnowflake")
|
||||||
self.actViewCork = QtWidgets.QAction(MainWindow)
|
self.actViewCork = QtWidgets.QAction(MainWindow)
|
||||||
self.actViewCork.setObjectName("actViewCork")
|
self.actViewCork.setObjectName("actViewCork")
|
||||||
self.actViewOutline = QtWidgets.QAction(MainWindow)
|
self.actViewOutline = QtWidgets.QAction(MainWindow)
|
||||||
|
@ -1139,6 +1137,8 @@ class Ui_MainWindow(object):
|
||||||
self.actCompile.setObjectName("actCompile")
|
self.actCompile.setObjectName("actCompile")
|
||||||
self.actToolFrequency = QtWidgets.QAction(MainWindow)
|
self.actToolFrequency = QtWidgets.QAction(MainWindow)
|
||||||
self.actToolFrequency.setObjectName("actToolFrequency")
|
self.actToolFrequency.setObjectName("actToolFrequency")
|
||||||
|
self.actionTest = QtWidgets.QAction(MainWindow)
|
||||||
|
self.actionTest.setObjectName("actionTest")
|
||||||
self.menuFile.addAction(self.actOpen)
|
self.menuFile.addAction(self.actOpen)
|
||||||
self.menuFile.addAction(self.menuRecents.menuAction())
|
self.menuFile.addAction(self.menuRecents.menuAction())
|
||||||
self.menuFile.addAction(self.actSave)
|
self.menuFile.addAction(self.actSave)
|
||||||
|
@ -1148,25 +1148,26 @@ class Ui_MainWindow(object):
|
||||||
self.menuFile.addAction(self.actCompile)
|
self.menuFile.addAction(self.actCompile)
|
||||||
self.menuFile.addSeparator()
|
self.menuFile.addSeparator()
|
||||||
self.menuFile.addAction(self.actQuit)
|
self.menuFile.addAction(self.actQuit)
|
||||||
self.menuMode.addAction(self.actModeNorma)
|
|
||||||
self.menuMode.addAction(self.actModeSimple)
|
|
||||||
self.menuMode.addAction(self.actModeFractal)
|
|
||||||
self.menuHelp.addAction(self.actShowHelp)
|
self.menuHelp.addAction(self.actShowHelp)
|
||||||
self.menuTools.addAction(self.actSpellcheck)
|
self.menuTools.addAction(self.actSpellcheck)
|
||||||
self.menuTools.addAction(self.actToolFrequency)
|
self.menuTools.addAction(self.actToolFrequency)
|
||||||
self.menuEdit.addAction(self.actLabels)
|
self.menuEdit.addAction(self.actLabels)
|
||||||
self.menuEdit.addAction(self.actStatus)
|
self.menuEdit.addAction(self.actStatus)
|
||||||
self.menuEdit.addAction(self.actSettings)
|
self.menuEdit.addAction(self.actSettings)
|
||||||
|
self.menuMode.addAction(self.actModeSimple)
|
||||||
|
self.menuMode.addAction(self.actModeFiction)
|
||||||
|
self.menuMode.addAction(self.actModeSnowflake)
|
||||||
|
self.menuView.addAction(self.menuMode.menuAction())
|
||||||
|
self.menuView.addSeparator()
|
||||||
self.menubar.addAction(self.menuFile.menuAction())
|
self.menubar.addAction(self.menuFile.menuAction())
|
||||||
self.menubar.addAction(self.menuEdit.menuAction())
|
self.menubar.addAction(self.menuEdit.menuAction())
|
||||||
self.menubar.addAction(self.menuMode.menuAction())
|
|
||||||
self.menubar.addAction(self.menuView.menuAction())
|
self.menubar.addAction(self.menuView.menuAction())
|
||||||
self.menubar.addAction(self.menuTools.menuAction())
|
self.menubar.addAction(self.menuTools.menuAction())
|
||||||
self.menubar.addAction(self.menuHelp.menuAction())
|
self.menubar.addAction(self.menuHelp.menuAction())
|
||||||
|
|
||||||
self.retranslateUi(MainWindow)
|
self.retranslateUi(MainWindow)
|
||||||
self.stack.setCurrentIndex(1)
|
self.stack.setCurrentIndex(1)
|
||||||
self.tabMain.setCurrentIndex(2)
|
self.tabMain.setCurrentIndex(4)
|
||||||
self.tabSummary.setCurrentIndex(0)
|
self.tabSummary.setCurrentIndex(0)
|
||||||
self.tabPersos.setCurrentIndex(0)
|
self.tabPersos.setCurrentIndex(0)
|
||||||
self.tabPlot.setCurrentIndex(0)
|
self.tabPlot.setCurrentIndex(0)
|
||||||
|
@ -1268,11 +1269,11 @@ class Ui_MainWindow(object):
|
||||||
self.tabMain.setTabText(self.tabMain.indexOf(self.lytTabDebug), _translate("MainWindow", "Debug"))
|
self.tabMain.setTabText(self.tabMain.indexOf(self.lytTabDebug), _translate("MainWindow", "Debug"))
|
||||||
self.menuFile.setTitle(_translate("MainWindow", "Fi&le"))
|
self.menuFile.setTitle(_translate("MainWindow", "Fi&le"))
|
||||||
self.menuRecents.setTitle(_translate("MainWindow", "&Recents"))
|
self.menuRecents.setTitle(_translate("MainWindow", "&Recents"))
|
||||||
self.menuMode.setTitle(_translate("MainWindow", "&Mode"))
|
|
||||||
self.menuHelp.setTitle(_translate("MainWindow", "Help"))
|
self.menuHelp.setTitle(_translate("MainWindow", "Help"))
|
||||||
self.menuTools.setTitle(_translate("MainWindow", "&Tools"))
|
self.menuTools.setTitle(_translate("MainWindow", "&Tools"))
|
||||||
self.menuEdit.setTitle(_translate("MainWindow", "E&dit"))
|
self.menuEdit.setTitle(_translate("MainWindow", "E&dit"))
|
||||||
self.menuView.setTitle(_translate("MainWindow", "&View"))
|
self.menuView.setTitle(_translate("MainWindow", "&View"))
|
||||||
|
self.menuMode.setTitle(_translate("MainWindow", "&Mode"))
|
||||||
self.dckCheatSheet.setWindowTitle(_translate("MainWindow", "&Cheat sheet"))
|
self.dckCheatSheet.setWindowTitle(_translate("MainWindow", "&Cheat sheet"))
|
||||||
self.dckSearch.setWindowTitle(_translate("MainWindow", "Sea&rch"))
|
self.dckSearch.setWindowTitle(_translate("MainWindow", "Sea&rch"))
|
||||||
self.dckNavigation.setWindowTitle(_translate("MainWindow", "&Navigation"))
|
self.dckNavigation.setWindowTitle(_translate("MainWindow", "&Navigation"))
|
||||||
|
@ -1291,9 +1292,9 @@ class Ui_MainWindow(object):
|
||||||
self.actLabels.setText(_translate("MainWindow", "&Labels..."))
|
self.actLabels.setText(_translate("MainWindow", "&Labels..."))
|
||||||
self.actStatus.setText(_translate("MainWindow", "&Status..."))
|
self.actStatus.setText(_translate("MainWindow", "&Status..."))
|
||||||
self.actViewTree.setText(_translate("MainWindow", "Tree"))
|
self.actViewTree.setText(_translate("MainWindow", "Tree"))
|
||||||
self.actModeNorma.setText(_translate("MainWindow", "&Normal"))
|
|
||||||
self.actModeSimple.setText(_translate("MainWindow", "&Simple"))
|
self.actModeSimple.setText(_translate("MainWindow", "&Simple"))
|
||||||
self.actModeFractal.setText(_translate("MainWindow", "&Fractal"))
|
self.actModeFiction.setText(_translate("MainWindow", "&Fiction"))
|
||||||
|
self.actModeSnowflake.setText(_translate("MainWindow", "&Snowflake"))
|
||||||
self.actViewCork.setText(_translate("MainWindow", "Index cards"))
|
self.actViewCork.setText(_translate("MainWindow", "Index cards"))
|
||||||
self.actViewOutline.setText(_translate("MainWindow", "Outline"))
|
self.actViewOutline.setText(_translate("MainWindow", "Outline"))
|
||||||
self.actSettings.setText(_translate("MainWindow", "S&ettings"))
|
self.actSettings.setText(_translate("MainWindow", "S&ettings"))
|
||||||
|
@ -1302,19 +1303,20 @@ class Ui_MainWindow(object):
|
||||||
self.actCompile.setText(_translate("MainWindow", "Co&mpile"))
|
self.actCompile.setText(_translate("MainWindow", "Co&mpile"))
|
||||||
self.actCompile.setShortcut(_translate("MainWindow", "F6"))
|
self.actCompile.setShortcut(_translate("MainWindow", "F6"))
|
||||||
self.actToolFrequency.setText(_translate("MainWindow", "&Frequency Analyzer"))
|
self.actToolFrequency.setText(_translate("MainWindow", "&Frequency Analyzer"))
|
||||||
|
self.actionTest.setText(_translate("MainWindow", "test"))
|
||||||
|
|
||||||
from manuskript.ui.views.outlineView import outlineView
|
|
||||||
from manuskript.ui.views.textEditView import textEditView
|
|
||||||
from manuskript.ui.views.basicItemView import basicItemView
|
|
||||||
from manuskript.ui.views.plotTreeView import plotTreeView
|
|
||||||
from manuskript.ui.cheatSheet import cheatSheet
|
from manuskript.ui.cheatSheet import cheatSheet
|
||||||
from manuskript.ui.views.sldImportance import sldImportance
|
|
||||||
from manuskript.ui.views.metadataView import metadataView
|
|
||||||
from manuskript.ui.views.characterTreeView import characterTreeView
|
|
||||||
from manuskript.ui.editors.mainEditor import mainEditor
|
from manuskript.ui.editors.mainEditor import mainEditor
|
||||||
from manuskript.ui.search import search
|
from manuskript.ui.search import search
|
||||||
|
from manuskript.ui.views.basicItemView import basicItemView
|
||||||
|
from manuskript.ui.views.characterTreeView import characterTreeView
|
||||||
from manuskript.ui.views.lineEditView import lineEditView
|
from manuskript.ui.views.lineEditView import lineEditView
|
||||||
from manuskript.ui.welcome import welcome
|
from manuskript.ui.views.metadataView import metadataView
|
||||||
from manuskript.ui.views.treeView import treeView
|
from manuskript.ui.views.outlineView import outlineView
|
||||||
from manuskript.ui.views.textEditCompleter import textEditCompleter
|
from manuskript.ui.views.plotTreeView import plotTreeView
|
||||||
|
from manuskript.ui.views.sldImportance import sldImportance
|
||||||
from manuskript.ui.views.storylineView import storylineView
|
from manuskript.ui.views.storylineView import storylineView
|
||||||
|
from manuskript.ui.views.textEditCompleter import textEditCompleter
|
||||||
|
from manuskript.ui.views.textEditView import textEditView
|
||||||
|
from manuskript.ui.views.treeView import treeView
|
||||||
|
from manuskript.ui.welcome import welcome
|
||||||
|
|
|
@ -124,7 +124,7 @@
|
||||||
<enum>QTabWidget::Rounded</enum>
|
<enum>QTabWidget::Rounded</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>2</number>
|
<number>4</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="documentMode">
|
<property name="documentMode">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
@ -1979,7 +1979,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1112</width>
|
<width>1112</width>
|
||||||
<height>20</height>
|
<height>30</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuFile">
|
<widget class="QMenu" name="menuFile">
|
||||||
|
@ -2006,14 +2006,6 @@
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actQuit"/>
|
<addaction name="actQuit"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menuMode">
|
|
||||||
<property name="title">
|
|
||||||
<string>&Mode</string>
|
|
||||||
</property>
|
|
||||||
<addaction name="actModeNorma"/>
|
|
||||||
<addaction name="actModeSimple"/>
|
|
||||||
<addaction name="actModeFractal"/>
|
|
||||||
</widget>
|
|
||||||
<widget class="QMenu" name="menuHelp">
|
<widget class="QMenu" name="menuHelp">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Help</string>
|
<string>Help</string>
|
||||||
|
@ -2039,10 +2031,19 @@
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>&View</string>
|
<string>&View</string>
|
||||||
</property>
|
</property>
|
||||||
|
<widget class="QMenu" name="menuMode">
|
||||||
|
<property name="title">
|
||||||
|
<string>&Mode</string>
|
||||||
|
</property>
|
||||||
|
<addaction name="actModeSimple"/>
|
||||||
|
<addaction name="actModeFiction"/>
|
||||||
|
<addaction name="actModeSnowflake"/>
|
||||||
|
</widget>
|
||||||
|
<addaction name="menuMode"/>
|
||||||
|
<addaction name="separator"/>
|
||||||
</widget>
|
</widget>
|
||||||
<addaction name="menuFile"/>
|
<addaction name="menuFile"/>
|
||||||
<addaction name="menuEdit"/>
|
<addaction name="menuEdit"/>
|
||||||
<addaction name="menuMode"/>
|
|
||||||
<addaction name="menuView"/>
|
<addaction name="menuView"/>
|
||||||
<addaction name="menuTools"/>
|
<addaction name="menuTools"/>
|
||||||
<addaction name="menuHelp"/>
|
<addaction name="menuHelp"/>
|
||||||
|
@ -2266,31 +2267,31 @@ QListView::item:hover {
|
||||||
<string>Tree</string>
|
<string>Tree</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actModeNorma">
|
<action name="actModeSimple">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
|
||||||
<string>&Normal</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="actModeSimple">
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Simple</string>
|
<string>&Simple</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actModeFractal">
|
<action name="actModeFiction">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Fractal</string>
|
<string>&Fiction</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actModeSnowflake">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>&Snowflake</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actViewCork">
|
<action name="actViewCork">
|
||||||
|
@ -2338,6 +2339,11 @@ QListView::item:hover {
|
||||||
<string>&Frequency Analyzer</string>
|
<string>&Frequency Analyzer</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionTest">
|
||||||
|
<property name="text">
|
||||||
|
<string>test</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
|
|
@ -65,6 +65,10 @@ class outlineView(QTreeView, dndView, outlineBasics):
|
||||||
self.header().setSectionResizeMode(Outline.goalPercentage.value, QHeaderView.ResizeToContents)
|
self.header().setSectionResizeMode(Outline.goalPercentage.value, QHeaderView.ResizeToContents)
|
||||||
|
|
||||||
def hideColumns(self):
|
def hideColumns(self):
|
||||||
|
if not self.model():
|
||||||
|
# outlineView is probably not initialized, because editorWidgets shows index cards or text.
|
||||||
|
return
|
||||||
|
|
||||||
for c in range(self.model().columnCount()):
|
for c in range(self.model().columnCount()):
|
||||||
self.hideColumn(c)
|
self.hideColumn(c)
|
||||||
for c in settings.outlineViewColumns:
|
for c in settings.outlineViewColumns:
|
||||||
|
|
Loading…
Reference in a new issue