-added systray menu function for can start SMPlayer .

-added for MessagesDialog/ New Message Dialog needed items for File Name,Size, Sources if correct?, Hash
-added resizesection/resizemode to see the complete Message Timestamp/Date item for MessagesDialog.
-added WidgetInformation function for MessengerWindow/New Message Dialog to save the Widget Position and Size.


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@258 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2007-11-18 23:35:53 +00:00
parent 5c56857a99
commit 6490d67e84
9 changed files with 97 additions and 7 deletions

View File

@ -237,12 +237,14 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
menu->addAction(QIcon(IMAGE_RETROSHARE), tr("Show/Hide"), this, SLOT(toggleVisibilitycontextmenu())); menu->addAction(QIcon(IMAGE_RETROSHARE), tr("Show/Hide"), this, SLOT(toggleVisibilitycontextmenu()));
menu->addSeparator(); menu->addSeparator();
menu->addAction(_messengerwindowAct); menu->addAction(_messengerwindowAct);
/* bandwidth only in development version */ /* bandwidth only in development version */
#ifdef RS_RELEASE_VERSION #ifdef RS_RELEASE_VERSION
#else #else
menu->addAction(_bandwidthAct); menu->addAction(_bandwidthAct);
#endif #endif
menu->addAction(_prefsAct); menu->addAction(_prefsAct);
menu->addAction(_smplayerAct);
menu->addSeparator(); menu->addSeparator();
menu->addAction(tr("Minimize"), this, SLOT(showMinimized())); menu->addAction(tr("Minimize"), this, SLOT(showMinimized()));
menu->addAction(tr("Maximize"), this, SLOT(showMaximized())); menu->addAction(tr("Maximize"), this, SLOT(showMaximized()));
@ -404,6 +406,7 @@ MainWindow::~MainWindow()
delete _prefsAct; delete _prefsAct;
delete _bandwidthGraph; delete _bandwidthGraph;
delete _messengerwindowAct; delete _messengerwindowAct;
delete _smplayerAct;
} }
/** Create and bind actions to events. Setup for initial /** Create and bind actions to events. Setup for initial
@ -421,6 +424,9 @@ void MainWindow::createActions()
_messengerwindowAct = new QAction(QIcon(IMAGE_RSM16), tr("Open Messenger"), this); _messengerwindowAct = new QAction(QIcon(IMAGE_RSM16), tr("Open Messenger"), this);
connect(_messengerwindowAct, SIGNAL(triggered()),this, SLOT(showMessengerWindow())); connect(_messengerwindowAct, SIGNAL(triggered()),this, SLOT(showMessengerWindow()));
_smplayerAct = new QAction(QIcon(IMAGE_SMPLAYER), tr("SMPlayer"), this);
connect(_smplayerAct, SIGNAL(triggered()),this, SLOT(showsmplayer()));
connect(ui.btntoggletoolbox, SIGNAL(toggled(bool)), this, SLOT(showToolboxFrame(bool))); connect(ui.btntoggletoolbox, SIGNAL(toggled(bool)), this, SLOT(showToolboxFrame(bool)));

View File

@ -154,6 +154,7 @@ private:
QAction* _prefsAct; QAction* _prefsAct;
QAction* _bandwidthAct; QAction* _bandwidthAct;
QAction* _messengerwindowAct; QAction* _messengerwindowAct;
QAction* _smplayerAct;
/** A BandwidthGraph object which handles monitoring RetroShare bandwidth usage */ /** A BandwidthGraph object which handles monitoring RetroShare bandwidth usage */
BandwidthGraph* _bandwidthGraph; BandwidthGraph* _bandwidthGraph;

View File

@ -36,6 +36,8 @@
#include <QMouseEvent> #include <QMouseEvent>
#include <QPixmap> #include <QPixmap>
#include <QDateTime> #include <QDateTime>
#include <QHeaderView>
/* Images for context menu icons */ /* Images for context menu icons */
#define IMAGE_MESSAGE ":/images/folder-draft.png" #define IMAGE_MESSAGE ":/images/folder-draft.png"
@ -66,7 +68,26 @@ MessagesDialog::MessagesDialog(QWidget *parent)
mCurrMsgId = ""; mCurrMsgId = "";
/* hide the Tree +/- */ /* hide the Tree +/- */
ui.msgList -> setRootIsDecorated( false ); ui.msgList->setRootIsDecorated( false );
/* Set header resize modes and initial section sizes */
QHeaderView * msgwheader = ui.msgWidget->header () ;
msgwheader->setResizeMode (0, QHeaderView::Interactive);
msgwheader->resizeSection ( 0, 125 );
/* Set header resize modes and initial section sizes */
QHeaderView * msglheader = ui.msgList->header () ;
msglheader->setResizeMode (0, QHeaderView::Interactive);
msglheader->setResizeMode (1, QHeaderView::Interactive);
msglheader->setResizeMode (2, QHeaderView::Interactive);
msglheader->setResizeMode (3, QHeaderView::Interactive);
msglheader->resizeSection ( 0, 125 );
msglheader->resizeSection ( 1, 100 );
msglheader->resizeSection ( 2, 100 );
msglheader->resizeSection ( 3, 200 );
/* Hide platform specific features */ /* Hide platform specific features */
@ -127,6 +148,8 @@ void MessagesDialog::newmessage()
//std::cerr << "MessagesDialog::newmessage()" << std::endl; //std::cerr << "MessagesDialog::newmessage()" << std::endl;
nMsgDialog->newMsg(); nMsgDialog->newMsg();
nMsgDialog->show(); nMsgDialog->show();
nMsgDialog->activateWindow();
/* window will destroy itself! */ /* window will destroy itself! */
} }

View File

@ -693,6 +693,29 @@ border-image: url(:/images/deletemail-pressed.png);
<property name="contextMenuPolicy" > <property name="contextMenuPolicy" >
<enum>Qt::CustomContextMenu</enum> <enum>Qt::CustomContextMenu</enum>
</property> </property>
<property name="sortingEnabled" >
<bool>true</bool>
</property>
<column>
<property name="text" >
<string>File Name</string>
</property>
</column>
<column>
<property name="text" >
<string>Size</string>
</property>
</column>
<column>
<property name="text" >
<string>Sources</string>
</property>
</column>
<column>
<property name="text" >
<string>Hash</string>
</property>
</column>
</widget> </widget>
</item> </item>
<item row="0" column="0" > <item row="0" column="0" >

View File

@ -69,6 +69,8 @@ MessengerWindow::MessengerWindow(QWidget * parent)
/* Invoke the Qt Designer generated object setup routine */ /* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this); ui.setupUi(this);
RshareSettings config;
config.loadWidgetInformation(this);
connect( ui.messengertreeWidget, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( messengertreeWidgetCostumPopupMenu( QPoint ) ) ); connect( ui.messengertreeWidget, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( messengertreeWidgetCostumPopupMenu( QPoint ) ) );
@ -327,6 +329,9 @@ void MessengerWindow::show()
void MessengerWindow::closeEvent (QCloseEvent * event) void MessengerWindow::closeEvent (QCloseEvent * event)
{ {
RshareSettings config;
config.saveWidgetInformation(this);
hide(); hide();
event->ignore(); event->ignore();
} }

View File

@ -1,7 +1,7 @@
/**************************************************************** /****************************************************************
* RetroShare is distributed under the following license: * RetroShare is distributed under the following license:
* *
* Copyright (C) 2006, crypton * Copyright (C) 2007, RetroShare Team
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -26,7 +26,7 @@
#include "mainpage.h" #include "mainpage.h"
#include "ui_MessengerWindow.h" #include "ui_MessengerWindow.h"
#include "NetworkDialog.h" #include "NetworkDialog.h"
#include <config/rsharesettings.h>
class LogoBar; class LogoBar;
class ChatDialog; class ChatDialog;

View File

@ -1,7 +1,7 @@
/**************************************************************** /****************************************************************
* RetroShare is distributed under the following license: * RetroShare is distributed under the following license:
* *
* Copyright (C) 2006, crypton * Copyright (C) 2006,2007 RetroShare Team
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -41,6 +41,9 @@ ChanMsgDialog::ChanMsgDialog(bool msg, QWidget *parent, Qt::WFlags flags)
/* Invoke the Qt Designer generated object setup routine */ /* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this); ui.setupUi(this);
RshareSettings config;
config.loadWidgetInformation(this);
setAttribute ( Qt::WA_DeleteOnClose, true ); setAttribute ( Qt::WA_DeleteOnClose, true );
//connect( ui.channelstreeView, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( channelstreeViewCostumPopupMenu( QPoint ) ) ); //connect( ui.channelstreeView, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( channelstreeViewCostumPopupMenu( QPoint ) ) );
@ -98,6 +101,15 @@ void ChanMsgDialog::channelstreeViewCostumPopupMenu( QPoint point )
contextMnu.exec( mevent->globalPos() ); contextMnu.exec( mevent->globalPos() );
} }
void ChanMsgDialog::closeEvent (QCloseEvent * event)
{
RshareSettings config;
config.saveWidgetInformation(this);
hide();
event->ignore();
}
void ChanMsgDialog::deletechannel() void ChanMsgDialog::deletechannel()
{ {

View File

@ -1,7 +1,7 @@
/**************************************************************** /****************************************************************
* RetroShare is distributed under the following license: * RetroShare is distributed under the following license:
* *
* Copyright (C) 2006, crypton * Copyright (C) 2007, RetroShare Team
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -24,6 +24,8 @@
#define _CHAN_MSG_DIALOG_H #define _CHAN_MSG_DIALOG_H
#include <QMainWindow> #include <QMainWindow>
#include <config/rsharesettings.h>
#include "ui_ChanMsgDialog.h" #include "ui_ChanMsgDialog.h"
@ -52,6 +54,9 @@ public slots:
void sendMessage(); void sendMessage();
void cancelMessage(); void cancelMessage();
protected:
void closeEvent (QCloseEvent * event);
private slots: private slots:
/** Create the context popup menu and it's submenus */ /** Create the context popup menu and it's submenus */

View File

@ -165,7 +165,22 @@ p, li { white-space: pre-wrap; }
</property> </property>
<column> <column>
<property name="text" > <property name="text" >
<string>1</string> <string>File Name</string>
</property>
</column>
<column>
<property name="text" >
<string>Size</string>
</property>
</column>
<column>
<property name="text" >
<string>Sources</string>
</property>
</column>
<column>
<property name="text" >
<string>Hash</string>
</property> </property>
</column> </column>
</widget> </widget>