redesign MessengerWindow
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2175 b45a01b8-16f6-495d-af2f-9b41ad6348cc
@ -214,9 +214,6 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
|
||||
/* Select the first action */
|
||||
grp->actions()[0]->setChecked(true);
|
||||
|
||||
/* also an empty list of chat windows */
|
||||
messengerWindow->setChatDialog(peersDialog);
|
||||
|
||||
/** StatusBar section ********/
|
||||
peerstatus = new PeerStatus();
|
||||
statusBar()->addWidget(peerstatus);
|
||||
|
@ -25,13 +25,14 @@
|
||||
|
||||
#include "mainpage.h"
|
||||
#include "ui_MessengerWindow.h"
|
||||
#include "NetworkDialog.h"
|
||||
|
||||
#include <gui/settings/rsharesettings.h>
|
||||
#include <gui/common/rwindow.h>
|
||||
#include "chat/PopupChatDialog.h"
|
||||
|
||||
|
||||
class LogoBar;
|
||||
class PeersDialog;
|
||||
//class MainWindow;
|
||||
|
||||
class MessengerWindow : public RWindow
|
||||
{
|
||||
@ -39,21 +40,22 @@ class MessengerWindow : public RWindow
|
||||
|
||||
public:
|
||||
|
||||
void setChatDialog(PeersDialog *cd);
|
||||
|
||||
|
||||
NetworkDialog *networkDialog2;
|
||||
PopupChatDialog *getPrivateChat(std::string id, std::string name, uint chatflags);
|
||||
|
||||
QPixmap picture;
|
||||
|
||||
static MessengerWindow* getInstance();
|
||||
static void releaseInstance();
|
||||
|
||||
virtual void updateMessengerDisplay() ; // overloaded from RsAutoUpdatePage
|
||||
|
||||
public slots:
|
||||
void insertPeers();
|
||||
/** Called when this dialog is to be displayed */
|
||||
void show();
|
||||
|
||||
void updatePeersAvatar(const QString& peer_id);
|
||||
|
||||
LogoBar & getLogoBar() const;
|
||||
|
||||
protected:
|
||||
@ -68,37 +70,42 @@ private slots:
|
||||
/** Create the context popup menu and it's submenus */
|
||||
void messengertreeWidgetCostumPopupMenu( QPoint point );
|
||||
|
||||
/** Export friend in Friends Dialog */
|
||||
void exportfriend2();
|
||||
/** Add a new friend */
|
||||
void addFriend();
|
||||
/** Export friend */
|
||||
void exportfriend();
|
||||
/** Remove friend */
|
||||
void removefriend2();
|
||||
void removefriend();
|
||||
/** start a chat with a friend **/
|
||||
void chatfriend2();
|
||||
|
||||
void chatfriend();
|
||||
/** start Messages Composer **/
|
||||
void sendMessage();
|
||||
/** start to connect to a friend **/
|
||||
void connectfriend();
|
||||
/** show peers details for each friend **/
|
||||
void configurefriend();
|
||||
|
||||
void configurefriend2();
|
||||
|
||||
void addFriend2();
|
||||
|
||||
void getAvatar();
|
||||
|
||||
/** Open Shared Manager **/
|
||||
void openShareManager();
|
||||
|
||||
void showMessagesPopup();
|
||||
|
||||
//void showMessages(MainWindow::Page page = MainWindow::Messages);
|
||||
|
||||
/** RsServer Friend Calls */
|
||||
void allowfriend2();
|
||||
void connectfriend2();
|
||||
void setaddressfriend2();
|
||||
void trustfriend2();
|
||||
/** get own last stored Avatar**/
|
||||
void getAvatar();
|
||||
|
||||
void changeAvatarClicked();
|
||||
void updateAvatar();
|
||||
|
||||
void loadmystatus();
|
||||
void loadstatus();
|
||||
|
||||
void on_actionSort_Peers_Descending_Order_activated();
|
||||
void on_actionSort_Peers_Ascending_Order_activated();
|
||||
void on_actionRoot_is_decorated_activated();
|
||||
void on_actionRoot_isnot_decorated_activated();
|
||||
|
||||
void displayMenu();
|
||||
|
||||
signals:
|
||||
void friendsUpdated() ;
|
||||
|
||||
private:
|
||||
|
||||
@ -107,12 +114,14 @@ private:
|
||||
/* (1) Update Display */
|
||||
|
||||
/* (2) Utility Fns */
|
||||
QTreeWidgetItem *getCurrentPeer(bool &isOnline);
|
||||
QTreeWidgetItem *getCurrentPeer();
|
||||
|
||||
PeersDialog *chatDialog;
|
||||
|
||||
//MainWindow* mainWindow;
|
||||
std::map<std::string, PopupChatDialog *> chatDialogs;
|
||||
|
||||
class QLabel *iconLabel, *textLabel;
|
||||
class QWidget *widget;
|
||||
class QWidgetAction *widgetAction;
|
||||
class QSpacerItem *spacerItem;
|
||||
|
||||
/** Define the popup menus for the Context menu */
|
||||
QMenu* contextMnu;
|
||||
@ -122,7 +131,7 @@ private:
|
||||
QAction* connectfriendAct;
|
||||
QAction* configurefriendAct;
|
||||
QAction* exportfriendAct;
|
||||
QAction* removefriend2Act;
|
||||
QAction* removefriendAct;
|
||||
|
||||
QTreeView *messengertreeWidget;
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>270</width>
|
||||
<width>295</width>
|
||||
<height>511</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -58,7 +58,7 @@ stop: 0.9 #4c4c4c, stop: 1 #333333);
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<item row="0" column="0" colspan="4">
|
||||
<layout class="QGridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QToolButton" name="avatarButton">
|
||||
@ -130,7 +130,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/donline.png</normaloff>:/images/donline.png</iconset>
|
||||
<normaloff>:/images/im-user.png</normaloff>:/images/im-user.png</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
@ -139,16 +139,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/dbusy.png</normaloff>:/images/dbusy.png</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Be right Back</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/dbrb.png</normaloff>:/images/dbrb.png</iconset>
|
||||
<normaloff>:/images/im-user-busy.png</normaloff>:/images/im-user-busy.png</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
@ -157,25 +148,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/daway.png</normaloff>:/images/daway.png</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>In a Call</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/dphone.png</normaloff>:/images/dphone.png</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Out of lunch</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/dlunch.png</normaloff>:/images/dlunch.png</iconset>
|
||||
<normaloff>:/images/im-user-away.png</normaloff>:/images/im-user-away.png</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
@ -184,7 +157,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/dhidden.png</normaloff>:/images/dhidden.png</iconset>
|
||||
<normaloff>:/images/im-user-offline.png</normaloff>:/images/im-user-offline.png</iconset>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
@ -222,7 +195,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<item row="1" column="3">
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
@ -235,37 +208,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QGridLayout">
|
||||
<property name="margin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QTreeWidget" name="messengertreeWidget">
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>18</width>
|
||||
<height>18</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="columnCount">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLineEdit" name="searchlineEdit"/>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<item row="1" column="2">
|
||||
<widget class="QToolButton" name="addIMAccountButton">
|
||||
<property name="toolTip">
|
||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
@ -294,7 +237,36 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="displaypushButton">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton::menu-indicator {
|
||||
subcontrol-origin: padding;
|
||||
subcontrol-position: bottom right;
|
||||
}
|
||||
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/looknfeel.png</normaloff>:/images/looknfeel.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QFrame" name="logoframe">
|
||||
@ -306,6 +278,38 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QGridLayout">
|
||||
<property name="margin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QTreeWidget" name="messengertreeWidget">
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>18</width>
|
||||
<height>18</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="indentation">
|
||||
<number>22</number>
|
||||
</property>
|
||||
<property name="columnCount">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<attribute name="headerShowSortIndicator" stdset="0">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
@ -313,11 +317,56 @@ p, li { white-space: pre-wrap; }
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>270</width>
|
||||
<width>295</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<action name="actionSort_Peers_Descending_Order">
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/sort_decrease.png</normaloff>:/images/sort_decrease.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sort Descending Order</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Sort Descending Order</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSort_Peers_Ascending_Order">
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<normaloff>:/images/sort_incr.png</normaloff>:/images/sort_incr.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sort Ascending Order</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Sort Ascending Order</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionRoot_is_decorated">
|
||||
<property name="text">
|
||||
<string>Set root is Decorated</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set Root Decorated</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionRoot_isnot_decorated">
|
||||
<property name="text">
|
||||
<string>Set Root is not Decorated</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionHide_Offline_Friends">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide Offline Friends</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="images.qrc"/>
|
||||
|
@ -55,6 +55,9 @@
|
||||
<file>images/Client2.png</file>
|
||||
<file>images/Client3.png</file>
|
||||
<file>images/Client4.png</file>
|
||||
<file>images/closenormal.png</file>
|
||||
<file>images/closehover.png</file>
|
||||
<file>images/closepressed.png</file>
|
||||
<file>images/denied16.png</file>
|
||||
<file>images/filetype-association.png</file>
|
||||
<file>images/FileTypeAny.png</file>
|
||||
@ -216,6 +219,8 @@
|
||||
<file>images/info16.png</file>
|
||||
<file>images/im-user.png</file>
|
||||
<file>images/im-user-offline.png</file>
|
||||
<file>images/im-user-away.png</file>
|
||||
<file>images/im-user-busy.png</file>
|
||||
<file>images/informations_24x24.png</file>
|
||||
<file>images/invite-friend24.png</file>
|
||||
<file>images/invitefriendlabel.png</file>
|
||||
@ -271,6 +276,7 @@
|
||||
<file>images/message-mail-forwarded.png</file>
|
||||
<file>images/message-news.png</file>
|
||||
<file>images/message.png</file>
|
||||
<file>images/messages_new.png</file>
|
||||
<file>images/messenger.png</file>
|
||||
<file>images/mystatus_bg.png</file>
|
||||
<file>images/network.png</file>
|
||||
@ -281,6 +287,7 @@
|
||||
<file>images/new-mail-alert.png</file>
|
||||
<file>images/new_forum16.png</file>
|
||||
<file>images/nopic.png</file>
|
||||
<file>images/no_avatar.png</file>
|
||||
<file>images/pasterslink.png</file>
|
||||
<file>images/package_games1.png</file>
|
||||
<file>images/peerdetails_16x16.png</file>
|
||||
@ -336,6 +343,8 @@
|
||||
<file>images/status_unknown.png</file>
|
||||
<file>images/startall.png</file>
|
||||
<file>images/server_24x24.png</file>
|
||||
<file>images/sort_incr.png</file>
|
||||
<file>images/sort_decrease.png</file>
|
||||
<file>images/sound.png</file>
|
||||
<file>images/transferupdown.png</file>
|
||||
<file>images/tools_wizard.png</file>
|
||||
|
BIN
retroshare-gui/src/gui/images/closehover.png
Normal file
After Width: | Height: | Size: 725 B |
BIN
retroshare-gui/src/gui/images/closenormal.png
Normal file
After Width: | Height: | Size: 420 B |
BIN
retroshare-gui/src/gui/images/closepressed.png
Normal file
After Width: | Height: | Size: 726 B |
BIN
retroshare-gui/src/gui/images/messages_new.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
retroshare-gui/src/gui/images/no_avatar.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
retroshare-gui/src/gui/images/sort_decrease.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
retroshare-gui/src/gui/images/sort_incr.png
Normal file
After Width: | Height: | Size: 2.9 KiB |