redesign MessengerWindow

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2175 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2010-02-03 17:39:30 +00:00
parent e08d13397a
commit 8d74bb0e6b
12 changed files with 809 additions and 392 deletions

View File

@ -214,9 +214,6 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
/* Select the first action */ /* Select the first action */
grp->actions()[0]->setChecked(true); grp->actions()[0]->setChecked(true);
/* also an empty list of chat windows */
messengerWindow->setChatDialog(peersDialog);
/** StatusBar section ********/ /** StatusBar section ********/
peerstatus = new PeerStatus(); peerstatus = new PeerStatus();
statusBar()->addWidget(peerstatus); statusBar()->addWidget(peerstatus);

File diff suppressed because it is too large Load Diff

View File

@ -25,13 +25,14 @@
#include "mainpage.h" #include "mainpage.h"
#include "ui_MessengerWindow.h" #include "ui_MessengerWindow.h"
#include "NetworkDialog.h"
#include <gui/settings/rsharesettings.h> #include <gui/settings/rsharesettings.h>
#include <gui/common/rwindow.h> #include <gui/common/rwindow.h>
#include "chat/PopupChatDialog.h"
class LogoBar; class LogoBar;
class PeersDialog; class PeersDialog;
//class MainWindow;
class MessengerWindow : public RWindow class MessengerWindow : public RWindow
{ {
@ -39,21 +40,22 @@ class MessengerWindow : public RWindow
public: public:
void setChatDialog(PeersDialog *cd); PopupChatDialog *getPrivateChat(std::string id, std::string name, uint chatflags);
NetworkDialog *networkDialog2;
QPixmap picture; QPixmap picture;
static MessengerWindow* getInstance(); static MessengerWindow* getInstance();
static void releaseInstance(); static void releaseInstance();
virtual void updateMessengerDisplay() ; // overloaded from RsAutoUpdatePage
public slots: public slots:
void insertPeers(); void insertPeers();
/** Called when this dialog is to be displayed */ /** Called when this dialog is to be displayed */
void show(); void show();
void updatePeersAvatar(const QString& peer_id);
LogoBar & getLogoBar() const; LogoBar & getLogoBar() const;
protected: protected:
@ -68,37 +70,42 @@ private slots:
/** Create the context popup menu and it's submenus */ /** Create the context popup menu and it's submenus */
void messengertreeWidgetCostumPopupMenu( QPoint point ); void messengertreeWidgetCostumPopupMenu( QPoint point );
/** Export friend in Friends Dialog */ /** Add a new friend */
void exportfriend2(); void addFriend();
/** Export friend */
void exportfriend();
/** Remove friend */ /** Remove friend */
void removefriend2(); void removefriend();
/** start a chat with a friend **/ /** start a chat with a friend **/
void chatfriend2(); void chatfriend();
/** start Messages Composer **/
void sendMessage(); void sendMessage();
/** start to connect to a friend **/
void configurefriend2(); void connectfriend();
/** show peers details for each friend **/
void addFriend2(); void configurefriend();
void getAvatar();
/** Open Shared Manager **/
void openShareManager(); void openShareManager();
void showMessagesPopup(); /** get own last stored Avatar**/
void getAvatar();
//void showMessages(MainWindow::Page page = MainWindow::Messages);
/** RsServer Friend Calls */
void allowfriend2();
void connectfriend2();
void setaddressfriend2();
void trustfriend2();
void changeAvatarClicked(); void changeAvatarClicked();
void updateAvatar(); void updateAvatar();
void loadmystatus(); 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: private:
@ -107,12 +114,14 @@ private:
/* (1) Update Display */ /* (1) Update Display */
/* (2) Utility Fns */ /* (2) Utility Fns */
QTreeWidgetItem *getCurrentPeer(bool &isOnline); QTreeWidgetItem *getCurrentPeer();
PeersDialog *chatDialog; std::map<std::string, PopupChatDialog *> chatDialogs;
//MainWindow* mainWindow;
class QLabel *iconLabel, *textLabel;
class QWidget *widget;
class QWidgetAction *widgetAction;
class QSpacerItem *spacerItem;
/** Define the popup menus for the Context menu */ /** Define the popup menus for the Context menu */
QMenu* contextMnu; QMenu* contextMnu;
@ -122,7 +131,7 @@ private:
QAction* connectfriendAct; QAction* connectfriendAct;
QAction* configurefriendAct; QAction* configurefriendAct;
QAction* exportfriendAct; QAction* exportfriendAct;
QAction* removefriend2Act; QAction* removefriendAct;
QTreeView *messengertreeWidget; QTreeView *messengertreeWidget;

View File

@ -6,7 +6,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>270</width> <width>295</width>
<height>511</height> <height>511</height>
</rect> </rect>
</property> </property>
@ -58,7 +58,7 @@ stop: 0.9 #4c4c4c, stop: 1 #333333);
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<item row="0" column="0" colspan="2"> <item row="0" column="0" colspan="4">
<layout class="QGridLayout"> <layout class="QGridLayout">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QToolButton" name="avatarButton"> <widget class="QToolButton" name="avatarButton">
@ -130,7 +130,7 @@ p, li { white-space: pre-wrap; }
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="images.qrc"> <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> </property>
</item> </item>
<item> <item>
@ -139,16 +139,7 @@ p, li { white-space: pre-wrap; }
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="images.qrc"> <iconset resource="images.qrc">
<normaloff>:/images/dbusy.png</normaloff>:/images/dbusy.png</iconset> <normaloff>:/images/im-user-busy.png</normaloff>:/images/im-user-busy.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>
</property> </property>
</item> </item>
<item> <item>
@ -157,25 +148,7 @@ p, li { white-space: pre-wrap; }
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="images.qrc"> <iconset resource="images.qrc">
<normaloff>:/images/daway.png</normaloff>:/images/daway.png</iconset> <normaloff>:/images/im-user-away.png</normaloff>:/images/im-user-away.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>
</property> </property>
</item> </item>
<item> <item>
@ -184,7 +157,7 @@ p, li { white-space: pre-wrap; }
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="images.qrc"> <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> </property>
</item> </item>
</widget> </widget>
@ -222,7 +195,7 @@ p, li { white-space: pre-wrap; }
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="3">
<spacer> <spacer>
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@ -235,9 +208,76 @@ p, li { white-space: pre-wrap; }
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="1" column="2">
<widget class="QToolButton" name="addIMAccountButton">
<property name="toolTip">
<string>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Add a Friend&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/user/add_user24.png</normaloff>:/images/user/add_user24.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</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> </layout>
</widget> </widget>
</item> </item>
<item row="2" column="0">
<widget class="QFrame" name="logoframe">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
<item row="1" column="0"> <item row="1" column="0">
<layout class="QGridLayout"> <layout class="QGridLayout">
<property name="margin"> <property name="margin">
@ -257,55 +297,19 @@ p, li { white-space: pre-wrap; }
<height>18</height> <height>18</height>
</size> </size>
</property> </property>
<property name="indentation">
<number>22</number>
</property>
<property name="columnCount"> <property name="columnCount">
<number>0</number> <number>0</number>
</property> </property>
</widget> <attribute name="headerShowSortIndicator" stdset="0">
</item> <bool>false</bool>
<item row="0" column="0"> </attribute>
<widget class="QLineEdit" name="searchlineEdit"/>
</item>
<item row="0" column="1">
<widget class="QToolButton" name="addIMAccountButton">
<property name="toolTip">
<string>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Add a Friend&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/user/add_user24.png</normaloff>:/images/user/add_user24.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item row="2" column="0">
<widget class="QFrame" name="logoframe">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<widget class="QMenuBar" name="menubar"> <widget class="QMenuBar" name="menubar">
@ -313,11 +317,56 @@ p, li { white-space: pre-wrap; }
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>270</width> <width>295</width>
<height>21</height> <height>21</height>
</rect> </rect>
</property> </property>
</widget> </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> </widget>
<resources> <resources>
<include location="images.qrc"/> <include location="images.qrc"/>

View File

@ -55,6 +55,9 @@
<file>images/Client2.png</file> <file>images/Client2.png</file>
<file>images/Client3.png</file> <file>images/Client3.png</file>
<file>images/Client4.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/denied16.png</file>
<file>images/filetype-association.png</file> <file>images/filetype-association.png</file>
<file>images/FileTypeAny.png</file> <file>images/FileTypeAny.png</file>
@ -216,6 +219,8 @@
<file>images/info16.png</file> <file>images/info16.png</file>
<file>images/im-user.png</file> <file>images/im-user.png</file>
<file>images/im-user-offline.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/informations_24x24.png</file>
<file>images/invite-friend24.png</file> <file>images/invite-friend24.png</file>
<file>images/invitefriendlabel.png</file> <file>images/invitefriendlabel.png</file>
@ -271,6 +276,7 @@
<file>images/message-mail-forwarded.png</file> <file>images/message-mail-forwarded.png</file>
<file>images/message-news.png</file> <file>images/message-news.png</file>
<file>images/message.png</file> <file>images/message.png</file>
<file>images/messages_new.png</file>
<file>images/messenger.png</file> <file>images/messenger.png</file>
<file>images/mystatus_bg.png</file> <file>images/mystatus_bg.png</file>
<file>images/network.png</file> <file>images/network.png</file>
@ -281,6 +287,7 @@
<file>images/new-mail-alert.png</file> <file>images/new-mail-alert.png</file>
<file>images/new_forum16.png</file> <file>images/new_forum16.png</file>
<file>images/nopic.png</file> <file>images/nopic.png</file>
<file>images/no_avatar.png</file>
<file>images/pasterslink.png</file> <file>images/pasterslink.png</file>
<file>images/package_games1.png</file> <file>images/package_games1.png</file>
<file>images/peerdetails_16x16.png</file> <file>images/peerdetails_16x16.png</file>
@ -336,6 +343,8 @@
<file>images/status_unknown.png</file> <file>images/status_unknown.png</file>
<file>images/startall.png</file> <file>images/startall.png</file>
<file>images/server_24x24.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/sound.png</file>
<file>images/transferupdown.png</file> <file>images/transferupdown.png</file>
<file>images/tools_wizard.png</file> <file>images/tools_wizard.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB