mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 07:29:33 -05:00
Added Font Button
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@425 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
8133109c30
commit
6a6299046c
@ -65,7 +65,9 @@ ChatDialog::ChatDialog(QWidget *parent)
|
|||||||
connect(ui.textunderlineChatButton, SIGNAL(clicked()), this, SLOT(insertUnderline()));
|
connect(ui.textunderlineChatButton, SIGNAL(clicked()), this, SLOT(insertUnderline()));
|
||||||
connect(ui.textitalicChatButton, SIGNAL(clicked()), this, SLOT(insertItalic()));
|
connect(ui.textitalicChatButton, SIGNAL(clicked()), this, SLOT(insertItalic()));
|
||||||
#endif
|
#endif
|
||||||
|
connect(ui.fontsButton, SIGNAL(clicked()), this, SLOT(setFont()));
|
||||||
|
|
||||||
|
ui.fontsButton->setIcon(QIcon(QString(":/images/fonts.png")));
|
||||||
|
|
||||||
// connect(ui.msgSendList, SIGNAL(itemChanged( QTreeWidgetItem *, int ) ),
|
// connect(ui.msgSendList, SIGNAL(itemChanged( QTreeWidgetItem *, int ) ),
|
||||||
// this, SLOT(toggleSendItem( QTreeWidgetItem *, int ) ));
|
// this, SLOT(toggleSendItem( QTreeWidgetItem *, int ) ));
|
||||||
@ -380,3 +382,12 @@ void ChatDialog::insertAutour(QString leftTruc,QString rightTruc)
|
|||||||
//ui.lineEdit->setCursorPosition(p0 + leftTruc.size());
|
//ui.lineEdit->setCursorPosition(p0 + leftTruc.size());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ChatDialog::setFont()
|
||||||
|
{
|
||||||
|
bool ok;
|
||||||
|
QFont font = QFontDialog::getFont(&ok, QFont(ui.lineEdit->toHtml()), this);
|
||||||
|
if (ok) {
|
||||||
|
ui.lineEdit->setFont(font);
|
||||||
|
}
|
||||||
|
}
|
@ -64,6 +64,8 @@ void toggleSendItem( QTreeWidgetItem *item, int col );
|
|||||||
void insertStrike();
|
void insertStrike();
|
||||||
void insertAutour(QString leftTruc,QString rightTruc);
|
void insertAutour(QString leftTruc,QString rightTruc);
|
||||||
|
|
||||||
|
void setFont();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -892,7 +892,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="4" >
|
<item row="0" column="5" >
|
||||||
<widget class="QPushButton" name="colorChatButton" >
|
<widget class="QPushButton" name="colorChatButton" >
|
||||||
<property name="minimumSize" >
|
<property name="minimumSize" >
|
||||||
<size>
|
<size>
|
||||||
@ -911,6 +911,25 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="4" >
|
||||||
|
<widget class="QPushButton" name="fontsButton" >
|
||||||
|
<property name="minimumSize" >
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize" >
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" >
|
<item row="1" column="0" >
|
||||||
|
Loading…
Reference in New Issue
Block a user