mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Added Split Text for Compose Message
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2125 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
bb3a1ba8b1
commit
777b52753a
@ -366,6 +366,7 @@
|
||||
<file>images/textedit/format_font_size_less.png</file>
|
||||
<file>images/textedit/hi22-action-format-text-blockquote.png</file>
|
||||
<file>images/textedit/hi22-action-format-text-code.png</file>
|
||||
<file>images/textedit/hi22-action-insert-more-mark.png</file>
|
||||
<file>images/toaster/chat.png</file>
|
||||
<file>images/toaster/hangup.png</file>
|
||||
<file>images/toaster/pickup.png</file>
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
@ -92,6 +92,8 @@ ChanMsgDialog::ChanMsgDialog(bool msg, QWidget *parent, Qt::WFlags flags)
|
||||
connect(ui.sizedecreaseButton, SIGNAL (clicked()), this, SLOT (fontSizeDecrease()));
|
||||
connect(ui.blockquoteButton, SIGNAL (clicked()), this, SLOT (blockQuote()));
|
||||
connect(ui.codeButton, SIGNAL (clicked()), this, SLOT (toggleCode()));
|
||||
connect(ui.splitPostButton, SIGNAL (clicked()), this, SLOT (addPostSplitter()));
|
||||
|
||||
|
||||
connect(ui.msgText, SIGNAL(currentCharFormatChanged(const QTextCharFormat &)),
|
||||
this, SLOT(currentCharFormatChanged(const QTextCharFormat &)));
|
||||
@ -1141,6 +1143,22 @@ void ChanMsgDialog::toggleCode()
|
||||
ui.msgText->setFocus( Qt::OtherFocusReason );
|
||||
}
|
||||
|
||||
void ChanMsgDialog::addPostSplitter()
|
||||
{
|
||||
QTextBlockFormat f = ui.msgText->textCursor().blockFormat();
|
||||
QTextBlockFormat f1 = f;
|
||||
|
||||
f.setProperty( TextFormat::IsHtmlTagSign, true );
|
||||
f.setProperty( QTextFormat::BlockTrailingHorizontalRulerWidth,
|
||||
QTextLength( QTextLength::PercentageLength, 80 ) );
|
||||
if ( ui.msgText->textCursor().block().text().isEmpty() ) {
|
||||
ui.msgText->textCursor().mergeBlockFormat( f );
|
||||
} else {
|
||||
ui.msgText->textCursor().insertBlock( f );
|
||||
}
|
||||
ui.msgText->textCursor().insertBlock( f1 );
|
||||
}
|
||||
|
||||
void ChanMsgDialog::attachFile()
|
||||
{
|
||||
// select a file
|
||||
|
@ -19,7 +19,6 @@
|
||||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
|
||||
|
||||
#ifndef _CHAN_MSG_DIALOG_H
|
||||
#define _CHAN_MSG_DIALOG_H
|
||||
|
||||
@ -116,6 +115,7 @@ private slots:
|
||||
void fontSizeDecrease();
|
||||
void blockQuote();
|
||||
void toggleCode();
|
||||
void addPostSplitter();
|
||||
|
||||
|
||||
private:
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>874</width>
|
||||
<height>528</height>
|
||||
<width>769</width>
|
||||
<height>485</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
@ -151,17 +151,34 @@ border: 1px solid #CCCCCC;}</string>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<property name="margin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout">
|
||||
<property name="horizontalSpacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QComboBox" name="comboStyle"/>
|
||||
<widget class="QComboBox" name="comboStyle">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>75</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QFontComboBox" name="comboFont"/>
|
||||
<widget class="QFontComboBox" name="comboFont">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QComboBox" name="comboSize">
|
||||
@ -176,19 +193,6 @@ border: 1px solid #CCCCCC;}</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="15">
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QToolButton" name="blockquoteButton">
|
||||
<property name="toolTip">
|
||||
@ -384,7 +388,7 @@ border: 1px solid #CCCCCC;}</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="10">
|
||||
<item row="0" column="11">
|
||||
<widget class="QToolButton" name="colorbtn">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@ -409,7 +413,7 @@ border: 1px solid #CCCCCC;}</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="11">
|
||||
<item row="0" column="12">
|
||||
<widget class="QToolButton" name="textalignmentbtn">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@ -443,7 +447,7 @@ border: 1px solid #CCCCCC;}</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="12">
|
||||
<item row="0" column="13">
|
||||
<widget class="QToolButton" name="imagebtn">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@ -501,6 +505,42 @@ border: 1px solid #CCCCCC;}</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="16">
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="10">
|
||||
<widget class="QToolButton" name="splitPostButton">
|
||||
<property name="toolTip">
|
||||
<string>Split text</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/textedit/hi22-action-insert-more-mark.png</normaloff>:/images/textedit/hi22-action-insert-more-mark.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>22</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
@ -521,7 +561,7 @@ border: 1px solid #CCCCCC;}</string>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<widget class="QWidget" name="layoutWidget_1">
|
||||
<layout class="QGridLayout" name="layoutrecommended">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
@ -597,7 +637,7 @@ border: 1px solid #CCCCCC;}</string>
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>874</width>
|
||||
<width>769</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
Loading…
Reference in New Issue
Block a user