Changes in ForumsDialog:

- modal window for creating new forum
- refill forum and thread tree
- enabled next and previous button
- set enable/disable state of menu items

Open problem:
- last post time not updated

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2822 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-05-01 19:03:35 +00:00
parent 401dac86e9
commit 9cf20fd9fd
4 changed files with 491 additions and 261 deletions

File diff suppressed because it is too large Load Diff

View File

@ -51,13 +51,8 @@ private slots:
void checkUpdate(); void checkUpdate();
void changedForum( QTreeWidgetItem *curr, QTreeWidgetItem *prev ); void changedForum( QTreeWidgetItem *curr, QTreeWidgetItem *prev );
void changedThread( QTreeWidgetItem *curr, QTreeWidgetItem *prev ); void changedThread();
void changedThread2();
void changeBox( int newrow );
void updateMessages ( QTreeWidgetItem * item, int column );
void newmessage();
void replytomessage(); void replytomessage();
//void print(); //void print();
@ -76,18 +71,31 @@ private slots:
void unsubscribeToForum(); void unsubscribeToForum();
void showForumDetails(); void showForumDetails();
void previousMessage ();
void nextMessage ();
private: private:
void forumSubscribe(bool subscribe); void forumSubscribe(bool subscribe);
bool getCurrentMsg(std::string &cid, std::string &mid); bool getCurrentMsg(std::string &cid, std::string &mid);
void FillForums(QTreeWidgetItem *Forum, QList<QTreeWidgetItem *> &ChildList);
void FillThreads(QList<QTreeWidgetItem *> &ThreadList);
void FillChildren(QTreeWidgetItem *Parent, QTreeWidgetItem *NewParent);
QTreeWidgetItem *YourForums;
QTreeWidgetItem *SubscribedForums;
QTreeWidgetItem *PopularForums;
QTreeWidgetItem *OtherForums;
std::string mCurrForumId; std::string mCurrForumId;
std::string mCurrThreadId; std::string mCurrThreadId;
std::string mCurrPostId; std::string mCurrPostId;
QFont mForumNameFont; QFont m_ForumNameFont;
QFont itemFont; QFont m_ItemFont;
int m_LastViewType;
std::string m_LastForumID;
QHash<QString, QString> smileys; QHash<QString, QString> smileys;

View File

@ -960,7 +960,10 @@ background: white;}</string>
</widget> </widget>
</item> </item>
<item row="0" column="3"> <item row="0" column="3">
<widget class="QPushButton" name="pushButton_2"> <widget class="QPushButton" name="previousButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -989,7 +992,10 @@ background: white;}</string>
</widget> </widget>
</item> </item>
<item row="0" column="4"> <item row="0" column="4">
<widget class="QPushButton" name="pushButton"> <widget class="QPushButton" name="nextButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>

View File

@ -59,7 +59,8 @@ CreateForumMsg::CreateForumMsg(std::string fId, std::string pId)
{ {
/* Invoke the Qt Designer generated object setup routine */ /* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this); ui.setupUi(this);
setAttribute(Qt::WA_DeleteOnClose, true);
RshareSettings config; RshareSettings config;
config.loadWidgetInformation(this); config.loadWidgetInformation(this);