up and down feature, editor and text selection popup will not disturb the live text anymore, better layout

This commit is contained in:
Stefan Kögl 2014-04-16 02:23:36 +02:00
parent 155b2ececd
commit e78c7f41a0
8 changed files with 580 additions and 242 deletions

6
TODO
View File

@ -3,4 +3,8 @@
* install netplug on all servers * install netplug on all servers
* verkabelungsanleitung für die sensoren schreiben * verkabelungsanleitung für die sensoren schreiben
* server restartsicher machen * server restartsicher machen
* anne texter erklären und installieren
*
11:30 Termin

View File

@ -2,16 +2,16 @@ Port 8090
BindAddress 0.0.0.0 BindAddress 0.0.0.0
MaxClients 10 MaxClients 10
MaxBandwidth 1000000 MaxBandwidth 1000000
CustomLog - CustomLog /tmp/ffserver.log
<Feed webcam.ffm> <Feed textcast.ffm>
file /tmp/webcam.ffm file /tmp/textcast.ffm
FileMaxSize 10M FileMaxSize 10M
ACL allow 127.0.0.1 ACL allow 127.0.0.1
</Feed> </Feed>
<Stream webcam.mjpeg> <Stream textcast.mjpeg>
Feed webcam.ffm Feed textcast.ffm
Format mjpeg Format mjpeg
VideoFrameRate 25 VideoFrameRate 25
VideoSize 768x576 VideoSize 768x576

View File

@ -6,6 +6,7 @@ import os.path
import re import re
import subprocess import subprocess
import sys import sys
from math import pow
from operator import itemgetter from operator import itemgetter
@ -41,41 +42,68 @@ class TextSorterDialog(QtGui.QWidget, Ui_TextSorterDialog):
def __init__(self, parent = None): def __init__(self, parent = None):
super(TextSorterDialog, self).__init__(parent) super(TextSorterDialog, self).__init__(parent)
## setup the ui
self.setupUi(self) self.setupUi(self)
#self.setModal(False)
self.fill_list() self.fill_list()
self.text_list.clicked.connect(self.slot_show_text) self.text_list.clicked.connect(self.slot_show_text)
#self.accepted.connect(self.slot_saveToDb)
self.remove_button.clicked.connect(self.slot_removeItem) self.remove_button.clicked.connect(self.slot_removeItem)
self.move_up_button.clicked.connect(self.slot_text_up)
self.move_down_button.clicked.connect(self.slot_text_down)
self.text_list.clicked.connect(self.slot_toggle_buttons)
self.move_up_button.setEnabled(False)
self.move_down_button.setEnabled(False)
def slot_toggle_buttons(self, index):
row = index.row()
if row <= 0:
self.move_up_button.setEnabled(False)
else:
self.move_up_button.setEnabled(True)
if row >= len(self.model.text_db) - 1:
self.move_down_button.setEnabled(False)
else:
self.move_down_button.setEnabled(True)
def fill_list(self): def fill_list(self):
self.model = self.parent().parent().model self.model = self.parent().parent().model
self.text_list.setModel(self.model) self.text_list.setModel(self.model)
#for preview, text in self.parent().text_db:
#self.text_list.insertItem(preview)
def slot_text_up(self): def slot_text_up(self):
pass row = self.text_list.currentIndex().row()
if row <= 0:
return False
text_db = self.model.text_db
text_db[row-1], text_db[row] = text_db[row], text_db[row-1]
self.text_list.setCurrentIndex(self.model.index(row - 1, 0))
self.text_list.clicked.emit(self.model.index(row - 1, 0))
return True
def slot_text_down(self): def slot_text_down(self):
pass text_db = self.model.text_db
row = self.text_list.currentIndex().row()
if row >= len(text_db) - 1:
return False
text_db[row], text_db[row+1] = text_db[row+1], text_db[row]
index = self.model.index(row + 1, 0)
self.text_list.setCurrentIndex(index)
self.text_list.clicked.emit(index)
return True
def slot_show_text(self, model_index): def slot_show_text(self, model_index):
self.text_preview.setTextOrHtml(self.parent().parent().model.text_db[model_index.row()][1]) self.text_preview.setTextOrHtml(self.parent().parent().model.text_db[model_index.row()][1])
def slot_saveToDb(self):
data = list()
pass
def slot_removeItem(self): def slot_removeItem(self):
index = self.text_list.currentIndex().row() index = self.text_list.currentIndex().row()
print "remote index", index print "remote index", index
self.model.removeRows(index, 1) self.model.removeRows(index, 1)
index = self.model.index(0, 0)
self.text_list.setCurrentIndex(index)
self.text_list.clicked.emit(index)
class MainWindow(KMainWindow, Ui_MainWindow): class MainWindow(KMainWindow, Ui_MainWindow):
@ -109,13 +137,13 @@ class MainWindow(KMainWindow, Ui_MainWindow):
self.toolbar.setAllowedAreas(QtCore.Qt.BottomToolBarArea) self.toolbar.setAllowedAreas(QtCore.Qt.BottomToolBarArea)
self.toolbar.setMovable(False) self.toolbar.setMovable(False)
self.toolbar.setFloatable(False) self.toolbar.setFloatable(False)
self.toolbar.setToolButtonStyle(QtCore.Qt.ToolButtonTextUnderIcon)
self.addToolBar(QtCore.Qt.BottomToolBarArea, self.toolbar) self.addToolBar(QtCore.Qt.BottomToolBarArea, self.toolbar)
self.createLiveActions() self.createLiveActions()
self.createPreviewActions() self.createPreviewActions()
self.slot_load() self.slot_load()
self.preview_text.document().setDefaultFont(self.font) self.preview_text.document().setDefaultFont(self.font)
self.preview_text.setFont(self.font) self.preview_text.setFont(self.font)
self.preview_text.setRichTextSupport(KRichTextWidget.RichTextSupport(0xffffffff)) self.preview_text.setRichTextSupport(KRichTextWidget.RichTextSupport(0xffffffff))
@ -133,9 +161,8 @@ class MainWindow(KMainWindow, Ui_MainWindow):
self.show() self.show()
self.save_action.triggered.connect(self.slot_save) self.save_action.triggered.connect(self.slot_save)
self.valign_action.triggered.connect(self.slot_valign) #self.valign_action.triggered.connect(self.slot_valign)
self.publish_action.triggered.connect(self.slot_publish) self.publish_action.triggered.connect(self.slot_publish)
self.clear_live_action.triggered.connect(self.slot_clear_live) self.clear_live_action.triggered.connect(self.slot_clear_live)
self.clear_preview_action.triggered.connect(self.slot_clear_preview) self.clear_preview_action.triggered.connect(self.slot_clear_preview)
@ -148,13 +175,15 @@ class MainWindow(KMainWindow, Ui_MainWindow):
self.save_preview_action.triggered.connect(self.slot_save_preview_text) self.save_preview_action.triggered.connect(self.slot_save_preview_text)
self.streaming_action.triggered.connect(self.slot_toggle_streaming) self.streaming_action.triggered.connect(self.slot_toggle_streaming)
self.auto_publish_action.toggled.connect(self.slot_auto_publish) self.auto_publish_action.toggled.connect(self.slot_auto_publish)
self.preview_size_action.triggered[QtGui.QAction].connect(self.slot_preview_font_size)
self.live_size_action.triggered[QtGui.QAction].connect(self.slot_live_font_size)
self.next_action.triggered.connect(self.slot_next_item) self.next_action.triggered.connect(self.slot_next_item)
self.previous_action.triggered.connect(self.slot_previous_item) self.previous_action.triggered.connect(self.slot_previous_item)
app.aboutToQuit.connect(self.kill_streaming) app.aboutToQuit.connect(self.kill_streaming)
self.getLiveCoords() self.getLiveCoords()
print "desktop", app.desktop().availableGeometry()
def getLiveCoords(self): def getLiveCoords(self):
@ -164,6 +193,11 @@ class MainWindow(KMainWindow, Ui_MainWindow):
y = global_rect.y() y = global_rect.y()
self.statusBar().showMessage("live text editor dimensions: x=%r, y=%r, width=%r, height=%r" % (x, y, global_rect.width(), global_rect.height())) self.statusBar().showMessage("live text editor dimensions: x=%r, y=%r, width=%r, height=%r" % (x, y, global_rect.width(), global_rect.height()))
def getPreviewCoords(self):
public_rect = self.preview_text.geometry()
global_rect = QtCore.QRect(self.mapToGlobal(public_rect.topLeft()), self.mapToGlobal(public_rect.bottomRight()))
return global_rect.x(), global_rect.y()
def filter_editor_actions(self): def filter_editor_actions(self):
@ -173,7 +207,7 @@ class MainWindow(KMainWindow, Ui_MainWindow):
"direction_ltr", "direction_ltr",
"direction_rtl", "direction_rtl",
"format_font_family", "format_font_family",
"format_font_size", #"format_font_size",
"format_text_background_color", "format_text_background_color",
"format_list_indent_more", "format_list_indent_more",
"format_list_indent_less", "format_list_indent_less",
@ -213,7 +247,6 @@ class MainWindow(KMainWindow, Ui_MainWindow):
elif text == "format_font_family": elif text == "format_font_family":
self.preview_font_action = action self.preview_font_action = action
self.slot_set_preview_defaults() self.slot_set_preview_defaults()
self.slot_set_live_defaults() self.slot_set_live_defaults()
@ -236,8 +269,6 @@ class MainWindow(KMainWindow, Ui_MainWindow):
self.save_live_action.setIconText("save live") self.save_live_action.setIconText("save live")
self.save_live_action.setShortcut(KShortcut(QtGui.QKeySequence(QtCore.Qt.ALT + QtCore.Qt.Key_W)), KAction.ShortcutTypes(KAction.ActiveShortcut | KAction.DefaultShortcut)) self.save_live_action.setShortcut(KShortcut(QtGui.QKeySequence(QtCore.Qt.ALT + QtCore.Qt.Key_W)), KAction.ShortcutTypes(KAction.ActiveShortcut | KAction.DefaultShortcut))
def createPreviewActions(self): def createPreviewActions(self):
self.toolbar.show() self.toolbar.show()
self.preview_text_collection = KActionCollection(self) self.preview_text_collection = KActionCollection(self)
@ -272,15 +303,6 @@ class MainWindow(KMainWindow, Ui_MainWindow):
self.previous_action.setIconText("previous") self.previous_action.setIconText("previous")
self.previous_action.setShortcut(KShortcut(QtGui.QKeySequence(QtCore.Qt.ALT + QtCore.Qt.Key_Left)), KAction.ShortcutTypes(KAction.ActiveShortcut | KAction.DefaultShortcut)) self.previous_action.setShortcut(KShortcut(QtGui.QKeySequence(QtCore.Qt.ALT + QtCore.Qt.Key_Left)), KAction.ShortcutTypes(KAction.ActiveShortcut | KAction.DefaultShortcut))
self.text_combo = KSelectAction(self.preview_text_collection)
self.text_combo.setEditable(False)
self.text_combo.setComboWidth(100)
icon = QtGui.QIcon.fromTheme(_fromUtf8("document-open-recent"))
self.text_combo.setIcon(icon)
self.text_combo.setIconText("saved texts")
self.text_combo.setObjectName("text_combo")
self.preview_text_collection.addAction("saved texts", self.text_combo)
self.next_action = self.preview_text_collection.addAction("next_action") self.next_action = self.preview_text_collection.addAction("next_action")
icon = QtGui.QIcon.fromTheme(_fromUtf8("media-skip-forward")) icon = QtGui.QIcon.fromTheme(_fromUtf8("media-skip-forward"))
self.next_action.setIcon(icon) self.next_action.setIcon(icon)
@ -308,21 +330,30 @@ class MainWindow(KMainWindow, Ui_MainWindow):
self.save_action.setIconText("save") self.save_action.setIconText("save")
self.save_action.setShortcut(KShortcut(QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.Key_S)), KAction.ShortcutTypes(KAction.ActiveShortcut | KAction.DefaultShortcut)) self.save_action.setShortcut(KShortcut(QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.Key_S)), KAction.ShortcutTypes(KAction.ActiveShortcut | KAction.DefaultShortcut))
self.streaming_action = KToggleAction(self.live_text_collection) self.streaming_action = KToggleAction(self.preview_text_collection)
icon = QtGui.QIcon.fromTheme(_fromUtf8("media-record")) icon = QtGui.QIcon.fromTheme(_fromUtf8("media-record"))
self.streaming_action.setIcon(icon) self.streaming_action.setIcon(icon)
self.streaming_action.setIconText("stream") self.streaming_action.setIconText("stream")
self.streaming_action.setObjectName("stream") self.streaming_action.setObjectName("stream")
self.streaming_action.setShortcut(KShortcut(QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.Key_1)), KAction.ShortcutTypes(KAction.ActiveShortcut | KAction.DefaultShortcut)) self.streaming_action.setShortcut(KShortcut(QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.Key_1)), KAction.ShortcutTypes(KAction.ActiveShortcut | KAction.DefaultShortcut))
self.live_text_collection.addAction("stream", self.streaming_action) self.preview_text_collection.addAction("stream", self.streaming_action)
self.valign_action = self.preview_text_collection.addAction("valign_action") #self.valign_action = self.preview_text_collection.addAction("valign_action")
icon = QtGui.QIcon.fromTheme(_fromUtf8("media-stop")) #icon = QtGui.QIcon.fromTheme(_fromUtf8("media-stop"))
self.valign_action.setIcon(icon) #self.valign_action.setIcon(icon)
self.valign_action.setIconText("valign") #self.valign_action.setIconText("valign")
self.valign_action.setShortcut(KShortcut(QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.Key_Plus)), KAction.ShortcutTypes(KAction.ActiveShortcut | KAction.DefaultShortcut)) #self.valign_action.setShortcut(KShortcut(QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.Key_Plus)), KAction.ShortcutTypes(KAction.ActiveShortcut | KAction.DefaultShortcut))
self.spacer = KToolBarSpacerAction(self.preview_text_collection)
self.preview_text_collection.addAction("spacer", self.spacer)
self.text_combo = KSelectAction(self.preview_text_collection)
self.text_combo.setEditable(False)
icon = QtGui.QIcon.fromTheme(_fromUtf8("document-open-recent"))
self.text_combo.setIcon(icon)
self.text_combo.setIconText("saved texts")
self.text_combo.setObjectName("text_combo")
self.preview_text_collection.addAction("saved texts", self.text_combo)
def slot_auto_publish(self, state): def slot_auto_publish(self, state):
self.is_auto_publish = bool(state) self.is_auto_publish = bool(state)
@ -400,6 +431,19 @@ class MainWindow(KMainWindow, Ui_MainWindow):
def slot_publish(self): def slot_publish(self):
self.live_text.setTextOrHtml(self.preview_text.textOrHtml()) self.live_text.setTextOrHtml(self.preview_text.textOrHtml())
def slot_live_font_size(self, action):
print "font_size"
self.default_size = self.live_size_action.fontSize()
self.slot_set_preview_defaults()
self.slot_set_live_defaults()
def slot_preview_font_size(self, action):
print "font_size"
self.default_size = self.preview_size_action.fontSize()
self.slot_set_live_defaults()
self.slot_set_preview_defaults()
def slot_toggle_publish(self, state=None): def slot_toggle_publish(self, state=None):
@ -413,8 +457,8 @@ class MainWindow(KMainWindow, Ui_MainWindow):
self.preview_center_action.setChecked(True) self.preview_center_action.setChecked(True)
self.preview_text.alignCenter() self.preview_text.alignCenter()
self.font.setPointSize(self.default_size) self.font.setPointSize(self.default_size)
self.preview_text.setFont(self.font)
self.preview_text.setFontSize(self.default_size) self.preview_text.setFontSize(self.default_size)
self.preview_text.setFont(self.font)
self.preview_size_action.setFontSize(self.default_size) self.preview_size_action.setFontSize(self.default_size)
self.preview_text.document().setDefaultFont(self.font) self.preview_text.document().setDefaultFont(self.font)
@ -423,25 +467,18 @@ class MainWindow(KMainWindow, Ui_MainWindow):
self.live_center_action.setChecked(True) self.live_center_action.setChecked(True)
self.live_text.alignCenter() self.live_text.alignCenter()
self.font.setPointSize(self.default_size) self.font.setPointSize(self.default_size)
self.live_text.setFont(self.font)
self.live_text.setFontSize(self.default_size) self.live_text.setFontSize(self.default_size)
self.live_text.setFont(self.font)
self.live_size_action.setFontSize(self.default_size) self.live_size_action.setFontSize(self.default_size)
self.live_text.document().setDefaultFont(self.font) self.live_text.document().setDefaultFont(self.font)
def slot_clear_live(self): def slot_clear_live(self):
#self.default_size = self.live_size_action.fontSize()
#cursor = self.live_text.textCursor()
#self.custom_clear(cursor)
self.live_text.clear() self.live_text.clear()
self.slot_set_live_defaults() self.slot_set_live_defaults()
def slot_clear_preview(self): def slot_clear_preview(self):
#self.preview_text.document().clear()
#self.default_size = self.preview_size_action.fontSize()
#cursor = self.preview_text.textCursor()
#self.custom_clear(cursor)
self.preview_text.clear() self.preview_text.clear()
self.slot_set_preview_defaults() self.slot_set_preview_defaults()
@ -512,7 +549,7 @@ class MainWindow(KMainWindow, Ui_MainWindow):
suffix = 1 suffix = 1
while 1: while 1:
tmp_preview = "%s_%d" % (preview, suffix) tmp_preview = "%s_%d" % (preview, suffix)
tmp = self.text_by_preview(tmp_preview) tmp = self.model.text_by_preview(tmp_preview)
if tmp is None: if tmp is None:
preview = tmp_preview preview = tmp_preview
break break
@ -521,8 +558,8 @@ class MainWindow(KMainWindow, Ui_MainWindow):
self.model.text_db.append([preview, text]) self.model.text_db.append([preview, text])
self.model.modelReset.emit() self.model.modelReset.emit()
#action = self.text_combo.addAction(preview) action = self.text_combo.addAction(preview)
#self.text_combo.setCurrentAction(action) self.text_combo.setCurrentAction(action)
def slot_save(self): def slot_save(self):
path = os.path.expanduser("~/.texter") path = os.path.expanduser("~/.texter")
@ -535,21 +572,69 @@ class MainWindow(KMainWindow, Ui_MainWindow):
else: else:
cPickle.dump(self.model.text_db, f, cPickle.HIGHEST_PROTOCOL) cPickle.dump(self.model.text_db, f, cPickle.HIGHEST_PROTOCOL)
def slot_valign(self): #def slot_valign(self):
fn = QtGui.QFontMetrics(self.font) #fm = QtGui.QFontMetrics(self.font)
h = fn.height() ##h = fn.height()
max_lines = 576 / h ##max_lines = 576 / h
text = unicode(self.preview_text.toPlainText()) ##text = unicode(self.preview_text.toPlainText())
text = text.strip().strip("\n") ##text = text.strip().strip("\n")
lines = text.count("\n") + 1 ##lines = text.count("\n") + 1
self.preview_text.setTextOrHtml("\n" * ((max_lines - lines) / 2) + text) ##self.preview_text.setTextOrHtml("\n" * ((max_lines - lines) / 2) + text)
self.statusBar().showMessage("text lines = %d, line height = %d, max lines = %d" % (lines, h, max_lines)) ##self.statusBar().showMessage("text lines = %d, line height = %d, max lines = %d" % (lines, h, max_lines))
#text_layout = QtGui.QTextLayout(self.preview_text.textOrHtml(), self.font, self.preview_text)
##self.text_combo.setCurrentAction(action)
#margin = 10.
#radius = min(self.preview_text.width()/2.0, self.preview_text.height()/2.0) - margin
#print "radius", type(radius), radius
#lineHeight = float(fm.height())
#print "lineHeight", type(lineHeight), lineHeight
#y = 0.
#text_layout.beginLayout()
#while 1:
#line = text_layout.createLine()
#if not line.isValid():
#break
#x1 = max(0.0, pow(pow(radius,2)-pow(radius-y,2), 0.5))
#x2 = max(0.0, pow(pow(radius,2)-pow(radius-(y+lineHeight),2), 0.5))
#x = max(x1, x2) + margin
#lineWidth = (self.preview_text.width() - margin) - x
#line.setLineWidth(lineWidth)
#line.setPosition(QtCore.QPointF(x, margin+y))
#y += line.height()
#text_layout.endLayout()
#painter = QtGui.QPainter()
#painter.begin(self.preview_text)
#painter.setRenderHint(QtGui.QPainter.Antialiasing)
#painter.fillRect(self.rect(), QtCore.Qt.black)
#painter.setBrush(QtGui.QBrush(QtCore.Qt.white))
#painter.setPen(QtGui.QPen(QtCore.Qt.white))
#text_layout.draw(painter, QtCore.QPoint(0,0))
#painter.setBrush(QtGui.QBrush(QtGui.QColor("#a6ce39")))
#painter.setPen(QtGui.QPen(QtCore.Qt.black))
#painter.drawEllipse(QtCore.QRectF(-radius, margin, 2*radius, 2*radius))
#painter.end()
def slot_open_dialog(self): def slot_open_dialog(self):
self.dialog = KDialog(self) self.dialog = KDialog(self)
self.dialog_widget = TextSorterDialog(self.dialog) self.dialog_widget = TextSorterDialog(self.dialog)
self.dialog.setMainWidget(self.dialog_widget) self.dialog.setMainWidget(self.dialog_widget)
self.dialog.move(800, 0) pos_x, pos_y = self.getPreviewCoords()
self.dialog.move(pos_x, 0)
rect = app.desktop().availableGeometry()
global_width = rect.width()
global_height = rect.height()
x = global_width - pos_x - 10
self.dialog.setFixedSize(x, global_height-40);
self.dialog.exec_() self.dialog.exec_()
self.fill_combo_box() self.fill_combo_box()

View File

@ -48,7 +48,10 @@ class TextModel(QtCore.QAbstractTableModel):
return True return True
def flags(self, index): def flags(self, index):
return QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEditable | QtCore.Qt.ItemIsEnabled return QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEditable | QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsDragEnabled | QtCore.Qt.ItemIsDropEnabled
def supportedDropActions(self):
return QtCore.Qt.MoveAction
def insertRows(self, row, count, parent=QtCore.QModelIndex()): def insertRows(self, row, count, parent=QtCore.QModelIndex()):
self.beginInsertRows(parent, row, row+count+1) self.beginInsertRows(parent, row, row+count+1)

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
# coding=UTF-8 # coding=UTF-8
# #
# Generated by pykdeuic4 from texter4.ui on Tue Apr 15 17:09:47 2014 # Generated by pykdeuic4 from texter4.ui on Wed Apr 16 00:27:54 2014
# #
# WARNING! All changes to this file will be lost. # WARNING! All changes to this file will be lost.
from PyKDE4 import kdecore from PyKDE4 import kdecore
@ -25,38 +25,73 @@ except AttributeError:
class Ui_TextSorterDialog(object): class Ui_TextSorterDialog(object):
def setupUi(self, TextSorterDialog): def setupUi(self, TextSorterDialog):
TextSorterDialog.setObjectName(_fromUtf8("TextSorterDialog")) TextSorterDialog.setObjectName(_fromUtf8("TextSorterDialog"))
TextSorterDialog.resize(588, 584) TextSorterDialog.resize(662, 716)
self.horizontalLayout = QtGui.QHBoxLayout(TextSorterDialog) self.verticalLayout = QtGui.QVBoxLayout(TextSorterDialog)
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.horizontalLayout_2 = QtGui.QHBoxLayout()
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
self.text_list = QtGui.QListView(TextSorterDialog) self.text_list = QtGui.QListView(TextSorterDialog)
self.text_list.setMinimumSize(QtCore.QSize(0, 576)) self.text_list.setMinimumSize(QtCore.QSize(0, 576))
self.text_list.setMaximumSize(QtCore.QSize(16777215, 576)) self.text_list.setMaximumSize(QtCore.QSize(16777215, 576))
palette = QtGui.QPalette()
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
brush = QtGui.QBrush(QtGui.QColor(128, 125, 123))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
self.text_list.setPalette(palette)
self.text_list.setObjectName(_fromUtf8("text_list")) self.text_list.setObjectName(_fromUtf8("text_list"))
self.horizontalLayout.addWidget(self.text_list) self.horizontalLayout_2.addWidget(self.text_list)
self.text_preview = KRichTextWidget(TextSorterDialog)
self.text_preview.setMinimumSize(QtCore.QSize(0, 576))
self.text_preview.setMaximumSize(QtCore.QSize(16777215, 576))
palette = QtGui.QPalette()
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
self.text_preview.setPalette(palette)
self.text_preview.setReadOnly(True)
self.text_preview.setObjectName(_fromUtf8("text_preview"))
self.horizontalLayout_2.addWidget(self.text_preview)
self.verticalLayout.addLayout(self.horizontalLayout_2)
self.kbuttongroup = KButtonGroup(TextSorterDialog) self.kbuttongroup = KButtonGroup(TextSorterDialog)
self.kbuttongroup.setObjectName(_fromUtf8("kbuttongroup")) self.kbuttongroup.setObjectName(_fromUtf8("kbuttongroup"))
self.verticalLayout = QtGui.QVBoxLayout(self.kbuttongroup) self.horizontalLayout = QtGui.QHBoxLayout(self.kbuttongroup)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.move_down_button = KArrowButton(self.kbuttongroup)
self.move_down_button.setProperty("arrowType", 2)
self.move_down_button.setObjectName(_fromUtf8("move_down_button"))
self.horizontalLayout.addWidget(self.move_down_button)
self.move_up_button = KArrowButton(self.kbuttongroup)
self.move_up_button.setObjectName(_fromUtf8("move_up_button"))
self.horizontalLayout.addWidget(self.move_up_button)
self.remove_button = KPushButton(self.kbuttongroup) self.remove_button = KPushButton(self.kbuttongroup)
icon = QtGui.QIcon.fromTheme(_fromUtf8("edit-delete")) icon = QtGui.QIcon.fromTheme(_fromUtf8("edit-delete"))
self.remove_button.setIcon(icon) self.remove_button.setIcon(icon)
self.remove_button.setObjectName(_fromUtf8("remove_button")) self.remove_button.setObjectName(_fromUtf8("remove_button"))
self.verticalLayout.addWidget(self.remove_button) self.horizontalLayout.addWidget(self.remove_button)
self.move_up_button = KArrowButton(self.kbuttongroup) self.verticalLayout.addWidget(self.kbuttongroup)
self.move_up_button.setObjectName(_fromUtf8("move_up_button"))
self.verticalLayout.addWidget(self.move_up_button)
self.move_down_button = KArrowButton(self.kbuttongroup)
self.move_down_button.setProperty("arrowType", 2)
self.move_down_button.setObjectName(_fromUtf8("move_down_button"))
self.verticalLayout.addWidget(self.move_down_button)
spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.verticalLayout.addItem(spacerItem) self.verticalLayout.addItem(spacerItem)
self.horizontalLayout.addWidget(self.kbuttongroup)
self.text_preview = KRichTextWidget(TextSorterDialog)
self.text_preview.setMinimumSize(QtCore.QSize(0, 576))
self.text_preview.setMaximumSize(QtCore.QSize(16777215, 576))
self.text_preview.setObjectName(_fromUtf8("text_preview"))
self.horizontalLayout.addWidget(self.text_preview)
self.retranslateUi(TextSorterDialog) self.retranslateUi(TextSorterDialog)
QtCore.QMetaObject.connectSlotsByName(TextSorterDialog) QtCore.QMetaObject.connectSlotsByName(TextSorterDialog)

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1554</width> <width>1475</width>
<height>584</height> <height>651</height>
</rect> </rect>
</property> </property>
<property name="palette"> <property name="palette">
@ -82,95 +82,177 @@
<normaloff>:/texter/icon.png</normaloff>:/texter/icon.png</iconset> <normaloff>:/texter/icon.png</normaloff>:/texter/icon.png</iconset>
</property> </property>
<widget class="QWidget" name="centralwidget"> <widget class="QWidget" name="centralwidget">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="KRichTextWidget" name="live_text"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="minimumSize"> <item>
<size> <widget class="KRichTextWidget" name="live_text">
<width>768</width> <property name="minimumSize">
<height>576</height> <size>
</size> <width>769</width>
</property> <height>577</height>
<property name="maximumSize"> </size>
<size> </property>
<width>768</width> <property name="maximumSize">
<height>576</height> <size>
</size> <width>769</width>
</property> <height>577</height>
<property name="font"> </size>
<font> </property>
<family>Monospace</family> <property name="palette">
<pointsize>22</pointsize> <palette>
</font> <active>
</property> <colorrole role="Highlight">
<property name="cursor" stdset="0"> <brush brushstyle="SolidPattern">
<cursorShape>BlankCursor</cursorShape> <color alpha="255">
</property> <red>0</red>
<property name="toolTip"> <green>0</green>
<string/> <blue>0</blue>
</property> </color>
<property name="statusTip"> </brush>
<string/> </colorrole>
</property> <colorrole role="Link">
<property name="whatsThis"> <brush brushstyle="SolidPattern">
<string/> <color alpha="255">
</property> <red>255</red>
<property name="autoFillBackground"> <green>255</green>
<bool>false</bool> <blue>255</blue>
</property> </color>
<property name="acceptRichText"> </brush>
<bool>true</bool> </colorrole>
</property> </active>
<property name="textInteractionFlags"> <inactive>
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextEditable|Qt::TextEditorInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> <colorrole role="Highlight">
</property> <brush brushstyle="SolidPattern">
<property name="richTextSupport"> <color alpha="255">
<set>KRichTextWidget::SupportAlignment|KRichTextWidget::SupportChangeListStyle|KRichTextWidget::SupportFontFamily|KRichTextWidget::SupportFontSize|KRichTextWidget::SupportIndentLists|KRichTextWidget::SupportTextForegroundColor</set> <red>0</red>
</property> <green>0</green>
</widget> <blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="Highlight">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="cursor" stdset="0">
<cursorShape>BlankCursor</cursorShape>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="acceptRichText">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextEditable|Qt::TextEditorInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
<property name="richTextSupport">
<set>KRichTextWidget::SupportAlignment|KRichTextWidget::SupportChangeListStyle|KRichTextWidget::SupportFontFamily|KRichTextWidget::SupportFontSize|KRichTextWidget::SupportIndentLists|KRichTextWidget::SupportTextForegroundColor</set>
</property>
</widget>
</item>
<item>
<widget class="KRichTextWidget" name="preview_text">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>10</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>300</width>
<height>577</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>769</width>
<height>577</height>
</size>
</property>
<property name="contextMenuPolicy">
<enum>Qt::ActionsContextMenu</enum>
</property>
<property name="toolTip">
<string>preview text</string>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="acceptRichText">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextEditable|Qt::TextEditorInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
<property name="richTextSupport">
<set>KRichTextWidget::SupportAlignment|KRichTextWidget::SupportChangeListStyle|KRichTextWidget::SupportFontFamily|KRichTextWidget::SupportFontSize|KRichTextWidget::SupportTextForegroundColor</set>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item> </item>
<item> <item>
<widget class="KRichTextWidget" name="preview_text"> <spacer name="verticalSpacer">
<property name="minimumSize"> <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size> <size>
<width>400</width> <width>20</width>
<height>576</height> <height>40</height>
</size> </size>
</property> </property>
<property name="maximumSize"> </spacer>
<size>
<width>768</width>
<height>576</height>
</size>
</property>
<property name="font">
<font>
<family>Monospace</family>
<pointsize>22</pointsize>
</font>
</property>
<property name="contextMenuPolicy">
<enum>Qt::ActionsContextMenu</enum>
</property>
<property name="toolTip">
<string>preview text</string>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="acceptRichText">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextEditable|Qt::TextEditorInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
<property name="richTextSupport">
<set>KRichTextWidget::SupportAlignment|KRichTextWidget::SupportChangeListStyle|KRichTextWidget::SupportFontFamily|KRichTextWidget::SupportFontSize|KRichTextWidget::SupportTextForegroundColor</set>
</property>
</widget>
</item> </item>
</layout> </layout>
</widget> </widget>

View File

@ -6,33 +6,167 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>588</width> <width>662</width>
<height>584</height> <height>716</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QListView" name="text_list"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="minimumSize"> <item>
<size> <widget class="QListView" name="text_list">
<width>0</width> <property name="minimumSize">
<height>576</height> <size>
</size> <width>0</width>
</property> <height>576</height>
<property name="maximumSize"> </size>
<size> </property>
<width>16777215</width> <property name="maximumSize">
<height>576</height> <size>
</size> <width>16777215</width>
</property> <height>576</height>
</widget> </size>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>128</red>
<green>125</green>
<blue>123</blue>
</color>
</brush>
</colorrole>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
</widget>
</item>
<item>
<widget class="KRichTextWidget" name="text_preview">
<property name="minimumSize">
<size>
<width>0</width>
<height>576</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>576</height>
</size>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item> </item>
<item> <item>
<widget class="KButtonGroup" name="kbuttongroup"> <widget class="KButtonGroup" name="kbuttongroup">
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="KArrowButton" name="move_down_button">
<property name="arrowType" stdset="0">
<number>2</number>
</property>
</widget>
</item>
<item>
<widget class="KArrowButton" name="move_up_button"/>
</item>
<item> <item>
<widget class="KPushButton" name="remove_button"> <widget class="KPushButton" name="remove_button">
<property name="text"> <property name="text">
@ -44,47 +178,21 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="KArrowButton" name="move_up_button"/>
</item>
<item>
<widget class="KArrowButton" name="move_down_button">
<property name="arrowType" stdset="0">
<number>2</number>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="KRichTextWidget" name="text_preview"> <spacer name="verticalSpacer">
<property name="minimumSize"> <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size> <size>
<width>0</width> <width>20</width>
<height>576</height> <height>40</height>
</size> </size>
</property> </property>
<property name="maximumSize"> </spacer>
<size>
<width>16777215</width>
<height>576</height>
</size>
</property>
</widget>
</item> </item>
</layout> </layout>
</widget> </widget>

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
# coding=UTF-8 # coding=UTF-8
# #
# Generated by pykdeuic4 from texter3.ui on Tue Apr 15 16:21:39 2014 # Generated by pykdeuic4 from texter3.ui on Wed Apr 16 00:07:33 2014
# #
# WARNING! All changes to this file will be lost. # WARNING! All changes to this file will be lost.
from PyKDE4 import kdecore from PyKDE4 import kdecore
@ -25,7 +25,7 @@ except AttributeError:
class Ui_MainWindow(object): class Ui_MainWindow(object):
def setupUi(self, MainWindow): def setupUi(self, MainWindow):
MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.setObjectName(_fromUtf8("MainWindow"))
MainWindow.resize(1554, 584) MainWindow.resize(1475, 651)
palette = QtGui.QPalette() palette = QtGui.QPalette()
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255)) brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern) brush.setStyle(QtCore.Qt.SolidPattern)
@ -51,19 +51,34 @@ class Ui_MainWindow(object):
MainWindow.setWindowIcon(icon) MainWindow.setWindowIcon(icon)
self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget = QtGui.QWidget(MainWindow)
self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
self.horizontalLayout = QtGui.QHBoxLayout(self.centralwidget) self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.live_text = KRichTextWidget(self.centralwidget) self.live_text = KRichTextWidget(self.centralwidget)
self.live_text.setMinimumSize(QtCore.QSize(768, 576)) self.live_text.setMinimumSize(QtCore.QSize(769, 577))
self.live_text.setMaximumSize(QtCore.QSize(768, 576)) self.live_text.setMaximumSize(QtCore.QSize(769, 577))
font = QtGui.QFont() palette = QtGui.QPalette()
font.setFamily(_fromUtf8("Monospace")) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
font.setPointSize(22) brush.setStyle(QtCore.Qt.SolidPattern)
self.live_text.setFont(font) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Highlight, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Link, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Highlight, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Link, brush)
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Highlight, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Link, brush)
self.live_text.setPalette(palette)
self.live_text.viewport().setProperty("cursor", QtGui.QCursor(QtCore.Qt.BlankCursor)) self.live_text.viewport().setProperty("cursor", QtGui.QCursor(QtCore.Qt.BlankCursor))
self.live_text.setToolTip(_fromUtf8(""))
self.live_text.setStatusTip(_fromUtf8(""))
self.live_text.setWhatsThis(_fromUtf8(""))
self.live_text.setAutoFillBackground(False) self.live_text.setAutoFillBackground(False)
self.live_text.setAcceptRichText(True) self.live_text.setAcceptRichText(True)
self.live_text.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByKeyboard|QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextBrowserInteraction|QtCore.Qt.TextEditable|QtCore.Qt.TextEditorInteraction|QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse) self.live_text.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByKeyboard|QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextBrowserInteraction|QtCore.Qt.TextEditable|QtCore.Qt.TextEditorInteraction|QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse)
@ -71,12 +86,13 @@ class Ui_MainWindow(object):
self.live_text.setObjectName(_fromUtf8("live_text")) self.live_text.setObjectName(_fromUtf8("live_text"))
self.horizontalLayout.addWidget(self.live_text) self.horizontalLayout.addWidget(self.live_text)
self.preview_text = KRichTextWidget(self.centralwidget) self.preview_text = KRichTextWidget(self.centralwidget)
self.preview_text.setMinimumSize(QtCore.QSize(400, 576)) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
self.preview_text.setMaximumSize(QtCore.QSize(768, 576)) sizePolicy.setHorizontalStretch(10)
font = QtGui.QFont() sizePolicy.setVerticalStretch(0)
font.setFamily(_fromUtf8("Monospace")) sizePolicy.setHeightForWidth(self.preview_text.sizePolicy().hasHeightForWidth())
font.setPointSize(22) self.preview_text.setSizePolicy(sizePolicy)
self.preview_text.setFont(font) self.preview_text.setMinimumSize(QtCore.QSize(300, 577))
self.preview_text.setMaximumSize(QtCore.QSize(769, 577))
self.preview_text.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu) self.preview_text.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
self.preview_text.setAutoFillBackground(False) self.preview_text.setAutoFillBackground(False)
self.preview_text.setFrameShape(QtGui.QFrame.StyledPanel) self.preview_text.setFrameShape(QtGui.QFrame.StyledPanel)
@ -85,6 +101,11 @@ class Ui_MainWindow(object):
self.preview_text.setRichTextSupport(KRichTextWidget.RichTextSupportValues(KRichTextWidget.SupportAlignment|KRichTextWidget.SupportChangeListStyle|KRichTextWidget.SupportFontFamily|KRichTextWidget.SupportFontSize|KRichTextWidget.SupportTextForegroundColor)) self.preview_text.setRichTextSupport(KRichTextWidget.RichTextSupportValues(KRichTextWidget.SupportAlignment|KRichTextWidget.SupportChangeListStyle|KRichTextWidget.SupportFontFamily|KRichTextWidget.SupportFontSize|KRichTextWidget.SupportTextForegroundColor))
self.preview_text.setObjectName(_fromUtf8("preview_text")) self.preview_text.setObjectName(_fromUtf8("preview_text"))
self.horizontalLayout.addWidget(self.preview_text) self.horizontalLayout.addWidget(self.preview_text)
spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem)
self.verticalLayout.addLayout(self.horizontalLayout)
spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.verticalLayout.addItem(spacerItem1)
MainWindow.setCentralWidget(self.centralwidget) MainWindow.setCentralWidget(self.centralwidget)
self.retranslateUi(MainWindow) self.retranslateUi(MainWindow)