improved ForumsDialog:

- new filter for threads tree
- saved layout of dialog

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2954 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-05-19 20:17:43 +00:00
parent 4b9b15be27
commit c2f7f7935e
3 changed files with 656 additions and 393 deletions

File diff suppressed because it is too large Load Diff

View File

@ -31,6 +31,7 @@ class ForumsDialog : public MainPage
public:
ForumsDialog(QWidget *parent = 0);
~ForumsDialog();
void insertForums();
void insertPost();
@ -53,7 +54,6 @@ private slots:
void changedForum( QTreeWidgetItem *curr, QTreeWidgetItem *prev );
void changedThread();
void replytomessage();
//void print();
//void printpreview();
@ -62,7 +62,7 @@ private slots:
void markMsgAsRead();
/* handle splitter */
void togglefileview();
void togglethreadview();
void showthread();
void createmessage();
@ -75,6 +75,12 @@ private slots:
void previousMessage ();
void nextMessage ();
void changedViewBox();
void filterColumnChanged();
void filterRegExpChanged();
void clearFilter();
private:
void forumSubscribe(bool subscribe);
@ -83,6 +89,12 @@ private:
void FillThreads(QList<QTreeWidgetItem *> &ThreadList);
void FillChildren(QTreeWidgetItem *Parent, QTreeWidgetItem *NewParent);
void processSettings(bool bLoad);
void togglethreadview_internal();
void FilterItems();
bool FilterItem(QTreeWidgetItem *pItem, QString &sPattern, int nFilterColumn);
QTreeWidgetItem *YourForums;
QTreeWidgetItem *SubscribedForums;
QTreeWidgetItem *PopularForums;
@ -91,14 +103,14 @@ private:
std::string mCurrForumId;
std::string mCurrThreadId;
std::string mCurrPostId;
QFont m_ForumNameFont;
QFont m_ItemFont;
int m_LastViewType;
std::string m_LastForumID;
QHash<QString, QString> smileys;
std::string fId;
std::string pId;

View File

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>600</width>
<width>732</width>
<height>420</height>
</rect>
</property>
@ -792,7 +792,7 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</widget>
<widget class="QSplitter" name="msgSplitter">
<widget class="QSplitter" name="threadSplitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
@ -866,6 +866,90 @@ background: white;}</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>1</number>
</property>
<item>
<widget class="QLineEdit" name="filterPatternLineEdit"/>
</item>
<item>
<widget class="QPushButton" name="clearButton">
<property name="minimumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="font">
<font>
<family>MS Shell Dlg 2</family>
</font>
</property>
<property name="toolTip">
<string>Reset</string>
</property>
<property name="styleSheet">
<string notr="true">QPushButton
{
border-image: url(:/images/closenormal.png)
}
QPushButton:hover
{
border-image: url(:/images/closehover.png)
}
QPushButton:pressed {
border-image: url(:/images/closepressed.png)
}</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="filterColumnComboBox">
<property name="font">
<font>
<family>MS Shell Dlg 2</family>
</font>
</property>
<property name="currentIndex">
<number>1</number>
</property>
<item>
<property name="text">
<string>Date</string>
</property>
</item>
<item>
<property name="text">
<string>Title</string>
</property>
</item>
<item>
<property name="text">
<string>Author</string>
</property>
</item>
<item>
<property name="text">
<string>Content</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QComboBox" name="viewBox">
<item>
@ -1044,6 +1128,12 @@ background: white;}</string>
<iconset resource="images.qrc">
<normaloff>:/images/edit_remove24.png</normaloff>:/images/edit_remove24.png</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>