mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-11 07:40:21 -04:00
FriendList:
- Removed avatar column - Removed state column - Added combined avatar and status icon - Added status icons in 64px - Renamed "Hide state" to "Show state" - Added sort by name and state RSTreeWidget: - Added version for load/save state - Added method setColumnCustomizable
This commit is contained in:
parent
ec67ee0e00
commit
87f2e6da37
24 changed files with 619 additions and 596 deletions
|
@ -52,10 +52,14 @@ public:
|
|||
enum Column
|
||||
{
|
||||
COLUMN_NAME = 0,
|
||||
COLUMN_AVATAR = 1,
|
||||
COLUMN_STATE = 2,
|
||||
COLUMN_LAST_CONTACT = 3,
|
||||
COLUMN_IP = 4
|
||||
COLUMN_LAST_CONTACT = 1,
|
||||
COLUMN_IP = 2
|
||||
};
|
||||
|
||||
enum SortMode
|
||||
{
|
||||
SORT_MODE_NAME = 1,
|
||||
SORT_MODE_STATE = 2
|
||||
};
|
||||
|
||||
public:
|
||||
|
@ -74,7 +78,9 @@ public:
|
|||
|
||||
virtual void updateDisplay();
|
||||
void setColumnVisible(Column column, bool visible);
|
||||
void sortByColumn(Column column, Qt::SortOrder sortOrder);
|
||||
|
||||
void setSortMode(SortMode sortMode);
|
||||
SortMode sortMode();
|
||||
|
||||
QColor textColorGroup() const { return mTextColorGroup; }
|
||||
QColor textColorStatusOffline() const { return mTextColorStatus[RS_STATUS_OFFLINE]; }
|
||||
|
@ -92,11 +98,12 @@ public:
|
|||
|
||||
public slots:
|
||||
void filterItems(const QString &text);
|
||||
void setSortByName();
|
||||
void setSortByState();
|
||||
|
||||
void setBigName(bool bigName); // show customStateString in second line of the name cell
|
||||
void setShowGroups(bool show);
|
||||
void setHideUnconnected(bool hidden);
|
||||
void setHideState(bool hidden);
|
||||
void setShowState(bool show);
|
||||
|
||||
private slots:
|
||||
void peerTreeColumnVisibleChanged(int column, bool visible);
|
||||
|
@ -107,12 +114,11 @@ protected:
|
|||
|
||||
private:
|
||||
Ui::FriendList *ui;
|
||||
RSTreeWidgetItemCompareRole *m_compareRole;
|
||||
RSTreeWidgetItemCompareRole *mCompareRole;
|
||||
|
||||
// Settings for peer list display
|
||||
bool mBigName;
|
||||
bool mShowGroups;
|
||||
bool mHideState;
|
||||
bool mShowState;
|
||||
bool mHideUnconnected;
|
||||
|
||||
QString mFilterText;
|
||||
|
@ -126,14 +132,12 @@ private:
|
|||
QColor mTextColorStatus[RS_STATUS_COUNT];
|
||||
|
||||
QTreeWidgetItem *getCurrentPeer() const;
|
||||
void initializeHeader(bool afterLoadSettings);
|
||||
void getSslIdsFromItem(QTreeWidgetItem *item, std::list<RsPeerId> &sslIds);
|
||||
|
||||
private slots:
|
||||
void groupsChanged();
|
||||
void insertPeers();
|
||||
void peerTreeWidgetCustomPopupMenu();
|
||||
void updateAvatar(const QString &);
|
||||
void updateMenu();
|
||||
|
||||
void pastePerson();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue