Drop the Outline settings from teh main Preferences

This commit is contained in:
Veronica K. B. Olsen
2020-04-11 17:57:40 +02:00
parent 8d34c68be0
commit 9678a49f22
+1 -68
View File
@@ -20,8 +20,7 @@ from PyQt5.QtGui import QFont
from PyQt5.QtWidgets import (
QDialog, QHBoxLayout, QVBoxLayout, QLineEdit, QLabel, QWidget, QTabWidget,
QDialogButtonBox, QSpinBox, QGroupBox, QComboBox, QMessageBox, QCheckBox,
QGridLayout, QFontComboBox, QPushButton, QFileDialog, QListWidget,
QSizePolicy, QRadioButton, QButtonGroup
QGridLayout, QFontComboBox, QPushButton, QFileDialog
)
from nw.tools import NWSpellCheck, NWSpellSimple, NWSpellEnchant
@@ -47,12 +46,10 @@ class GuiConfigEditor(QDialog):
self.tabMain = GuiConfigEditGeneral(self.theParent)
self.tabEditor = GuiConfigEditEditor(self.theParent)
self.tabOutline = GuiConfigEditOutline(self.theParent)
self.tabWidget = QTabWidget()
self.tabWidget.addTab(self.tabMain, "General")
self.tabWidget.addTab(self.tabEditor, "Editor")
self.tabWidget.addTab(self.tabOutline, "Outline")
self.setLayout(self.outerBox)
self.outerBox.addWidget(self.guiDeco, 0, Qt.AlignTop)
@@ -90,10 +87,6 @@ class GuiConfigEditor(QDialog):
validEntries &= retA
needsRestart |= retB
retA, retB = self.tabOutline.saveValues()
validEntries &= retA
needsRestart |= retB
if needsRestart:
msgBox = QMessageBox()
msgBox.information(
@@ -668,63 +661,3 @@ class GuiConfigEditEditor(QWidget):
return False
# END Class GuiConfigEditEditor
class GuiConfigEditOutline(QWidget):
def __init__(self, theParent):
QWidget.__init__(self, theParent)
self.mainConf = nw.CONFIG
self.theParent = theParent
self.outerBox = QVBoxLayout()
self.innerBox = QHBoxLayout()
self.selectBox = QVBoxLayout()
self.selectList = QListWidget()
self.selectList.setMaximumWidth(180)
self.selectBox.addWidget(QLabel("Selected"))
self.selectBox.addWidget(self.selectList)
self.availBox = QVBoxLayout()
self.availList = QListWidget()
self.availList.setMaximumWidth(180)
self.availBox.addWidget(QLabel("Available"))
self.availBox.addWidget(self.availList)
self.buttonBox = QVBoxLayout()
self.upButton = QPushButton("Move Up")
self.addButton = QPushButton("< Add")
self.delButton = QPushButton("Remove >")
self.downButton = QPushButton("Move Down")
self.buttonBox.addStretch(1)
self.buttonBox.addWidget(self.upButton)
self.buttonBox.addWidget(self.addButton)
self.buttonBox.addWidget(self.delButton)
self.buttonBox.addWidget(self.downButton)
self.buttonBox.addStretch(1)
self.projectOnly = QCheckBox("Use these settings for the current project only", self)
# Assemble
self.innerBox.addLayout(self.selectBox)
self.innerBox.addStretch(1)
self.innerBox.addLayout(self.buttonBox)
self.innerBox.addStretch(1)
self.innerBox.addLayout(self.availBox)
self.outerBox.addLayout(self.innerBox)
self.outerBox.addWidget(self.projectOnly)
self.setLayout(self.outerBox)
return
def saveValues(self):
validEntries = True
return validEntries, False
# END Class GuiConfigEditOutline