mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-01 18:56:23 -04:00
-Removed the status dropdown from BlogDialog.ui
Added a button to set the users status -Changed the setStatus code for testing (just prints the users status) -Fixed a typo in one of the comments in rsQblog.h -Renamed a few of the Qt objects and a few of the variables/functions in the code so that they made more logical sense. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@542 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ae96b742b1
commit
4450f1e911
4 changed files with 53 additions and 107 deletions
|
@ -21,6 +21,7 @@
|
||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
|
|
||||||
#include "BlogDialog.h"
|
#include "BlogDialog.h"
|
||||||
|
#include "rsiface/rsQblog.h"
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
BlogDialog::BlogDialog(QWidget *parent)
|
BlogDialog::BlogDialog(QWidget *parent)
|
||||||
|
@ -30,27 +31,23 @@ BlogDialog::BlogDialog(QWidget *parent)
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
|
||||||
connect(sendBtn, SIGNAL(clicked()), this, SLOT(sendBlog()));
|
connect(sendBtn, SIGNAL(clicked()), this, SLOT(sendBlog()));
|
||||||
|
connect(statusBtn, SIGNAL(clicked()), this, SLOT(setStatus()));
|
||||||
connect(boldBtn, SIGNAL(clicked()), this, SLOT(setFont()));
|
connect(boldBtn, SIGNAL(clicked()), this, SLOT(setFont()));
|
||||||
connect(underlineBtn, SIGNAL(clicked()), this, SLOT(setFont()));
|
connect(underlineBtn, SIGNAL(clicked()), this, SLOT(setFont()));
|
||||||
connect(italicBtn, SIGNAL(clicked()), this, SLOT(setFont()));
|
connect(italicBtn, SIGNAL(clicked()), this, SLOT(setFont()));
|
||||||
connect(statusBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setStatus()));
|
|
||||||
|
|
||||||
/* Current Font */
|
/* Current Font */
|
||||||
mCurrentFont = QFont("Comic Sans MS", 8);
|
mCurrentFont = QFont("Comic Sans MS", 8);
|
||||||
|
|
||||||
/* Current user status - online by default */
|
|
||||||
currentStatus = "Online";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BlogDialog::sendBlog()
|
void BlogDialog::sendBlog()
|
||||||
{
|
{
|
||||||
QString msg = lineEdit->toPlainText();
|
QString blogMsg = lineEdit->toPlainText();
|
||||||
|
|
||||||
msgText->setCurrentFont(mCurrentFont);
|
blogText->setCurrentFont(mCurrentFont);
|
||||||
|
|
||||||
/* Write text into windows */
|
/* Write blog message to window */
|
||||||
msgText->append(msg);
|
blogText->append(blogMsg);
|
||||||
|
|
||||||
/* Clear lineEdit */
|
/* Clear lineEdit */
|
||||||
lineEdit->clear();
|
lineEdit->clear();
|
||||||
|
@ -69,10 +66,16 @@ void BlogDialog::setFont()
|
||||||
|
|
||||||
void BlogDialog::setStatus()
|
void BlogDialog::setStatus()
|
||||||
{
|
{
|
||||||
currentStatus = statusBox->currentText();
|
QString statusMsg = lineEdit->toPlainText();
|
||||||
|
|
||||||
|
blogText->setCurrentFont(mCurrentFont);
|
||||||
|
|
||||||
|
/* Write status to window */
|
||||||
|
blogText->append(statusMsg);
|
||||||
|
|
||||||
|
/* Clear lineEdit */
|
||||||
|
lineEdit->clear();
|
||||||
|
|
||||||
/* for testing */
|
|
||||||
/* msgText->append(currentStatus); */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -50,10 +50,6 @@ private:
|
||||||
/* Current Font */
|
/* Current Font */
|
||||||
QFont mCurrentFont;
|
QFont mCurrentFont;
|
||||||
|
|
||||||
/* Current status, online by default */
|
|
||||||
QString currentStatus;
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>757</width>
|
<width>618</width>
|
||||||
<height>494</height>
|
<height>424</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
|
@ -509,8 +509,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>460</x>
|
<x>460</x>
|
||||||
<y>6</y>
|
<y>6</y>
|
||||||
<width>211</width>
|
<width>151</width>
|
||||||
<height>356</height>
|
<height>389</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout" >
|
||||||
|
@ -604,7 +604,7 @@
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>User status:</string>
|
<string>Users:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -653,11 +653,6 @@
|
||||||
<string>User</string>
|
<string>User</string>
|
||||||
</property>
|
</property>
|
||||||
</column>
|
</column>
|
||||||
<column>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Status</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -763,7 +758,7 @@
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" >
|
<item row="1" column="0" >
|
||||||
<widget class="QTextBrowser" name="msgText" >
|
<widget class="QTextBrowser" name="blogText" >
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
|
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
@ -783,65 +778,7 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QComboBox" name="statusBox" >
|
<widget class="QWidget" name="layoutWidget" >
|
||||||
<property name="geometry" >
|
|
||||||
<rect>
|
|
||||||
<x>600</x>
|
|
||||||
<y>368</y>
|
|
||||||
<width>71</width>
|
|
||||||
<height>27</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="font" >
|
|
||||||
<font>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="currentIndex" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Online</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Away</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Busy</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Offline</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
<widget class="QLabel" name="label_3" >
|
|
||||||
<property name="geometry" >
|
|
||||||
<rect>
|
|
||||||
<x>503</x>
|
|
||||||
<y>371</y>
|
|
||||||
<width>101</width>
|
|
||||||
<height>20</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="font" >
|
|
||||||
<font>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Current Status:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="" >
|
|
||||||
<property name="geometry" >
|
<property name="geometry" >
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
|
@ -857,7 +794,7 @@
|
||||||
<property name="verticalSpacing" >
|
<property name="verticalSpacing" >
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0" colspan="2" >
|
||||||
<spacer>
|
<spacer>
|
||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
|
@ -870,7 +807,7 @@
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1" >
|
<item row="0" column="2" >
|
||||||
<widget class="QPushButton" name="boldBtn" >
|
<widget class="QPushButton" name="boldBtn" >
|
||||||
<property name="minimumSize" >
|
<property name="minimumSize" >
|
||||||
<size>
|
<size>
|
||||||
|
@ -898,7 +835,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2" >
|
<item row="0" column="3" >
|
||||||
<widget class="QPushButton" name="underlineBtn" >
|
<widget class="QPushButton" name="underlineBtn" >
|
||||||
<property name="minimumSize" >
|
<property name="minimumSize" >
|
||||||
<size>
|
<size>
|
||||||
|
@ -926,7 +863,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="3" >
|
<item row="0" column="4" >
|
||||||
<widget class="QPushButton" name="italicBtn" >
|
<widget class="QPushButton" name="italicBtn" >
|
||||||
<property name="minimumSize" >
|
<property name="minimumSize" >
|
||||||
<size>
|
<size>
|
||||||
|
@ -954,7 +891,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" colspan="4" >
|
<item row="1" column="0" colspan="5" >
|
||||||
<widget class="QTextEdit" name="lineEdit" >
|
<widget class="QTextEdit" name="lineEdit" >
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy vsizetype="Maximum" hsizetype="Expanding" >
|
<sizepolicy vsizetype="Maximum" hsizetype="Expanding" >
|
||||||
|
@ -982,26 +919,36 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" >
|
<item row="2" column="2" colspan="3" >
|
||||||
<spacer>
|
|
||||||
<property name="orientation" >
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" >
|
|
||||||
<size>
|
|
||||||
<width>360</width>
|
|
||||||
<height>16</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1" colspan="3" >
|
|
||||||
<widget class="QPushButton" name="sendBtn" >
|
<widget class="QPushButton" name="sendBtn" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>Send</string>
|
<string>Send</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="1" >
|
||||||
|
<widget class="QPushButton" name="statusBtn" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Set Status</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" >
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation" >
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType" >
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" >
|
||||||
|
<size>
|
||||||
|
<width>245</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<action name="actionSend" >
|
<action name="actionSend" >
|
||||||
|
@ -1016,7 +963,7 @@
|
||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>msgText</tabstop>
|
<tabstop>blogText</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="images.qrc" />
|
<include location="images.qrc" />
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
|
|
||||||
/* delcare interafce for everyone o use */
|
/* delcare interface for everyone to use */
|
||||||
class RsQblog;
|
class RsQblog;
|
||||||
extern RsQblog *rsQblog;
|
extern RsQblog *rsQblog;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue