-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->addSeparator();
menu->addAction(_messengerwindowAct);
/* bandwidth only in development version */
#ifdef RS_RELEASE_VERSION
#else
menu->addAction(_bandwidthAct);
#endif
menu->addAction(_prefsAct);
menu->addAction(_smplayerAct);
menu->addSeparator();
menu->addAction(tr("Minimize"), this, SLOT(showMinimized()));
menu->addAction(tr("Maximize"), this, SLOT(showMaximized()));
@ -404,6 +406,7 @@ MainWindow::~MainWindow()
delete _prefsAct;
delete _bandwidthGraph;
delete _messengerwindowAct;
delete _smplayerAct;
}
/** Create and bind actions to events. Setup for initial
@ -420,6 +423,9 @@ void MainWindow::createActions()
_messengerwindowAct = new QAction(QIcon(IMAGE_RSM16), tr("Open Messenger"), this);
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)));

View File

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

View File

@ -36,6 +36,8 @@
#include <QMouseEvent>
#include <QPixmap>
#include <QDateTime>
#include <QHeaderView>
/* Images for context menu icons */
#define IMAGE_MESSAGE ":/images/folder-draft.png"
@ -66,7 +68,26 @@ MessagesDialog::MessagesDialog(QWidget *parent)
mCurrMsgId = "";
/* 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 */
@ -127,6 +148,8 @@ void MessagesDialog::newmessage()
//std::cerr << "MessagesDialog::newmessage()" << std::endl;
nMsgDialog->newMsg();
nMsgDialog->show();
nMsgDialog->activateWindow();
/* window will destroy itself! */
}

View File

@ -693,6 +693,29 @@ border-image: url(:/images/deletemail-pressed.png);
<property name="contextMenuPolicy" >
<enum>Qt::CustomContextMenu</enum>
</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>
</item>
<item row="0" column="0" >

View File

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

View File

@ -1,7 +1,7 @@
/****************************************************************
* 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
* modify it under the terms of the GNU General Public License
@ -26,7 +26,7 @@
#include "mainpage.h"
#include "ui_MessengerWindow.h"
#include "NetworkDialog.h"
#include <config/rsharesettings.h>
class LogoBar;
class ChatDialog;

View File

@ -1,7 +1,7 @@
/****************************************************************
* 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
* modify it under the terms of the GNU General Public License
@ -40,6 +40,9 @@ ChanMsgDialog::ChanMsgDialog(bool msg, QWidget *parent, Qt::WFlags flags)
{
/* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this);
RshareSettings config;
config.loadWidgetInformation(this);
setAttribute ( Qt::WA_DeleteOnClose, true );
@ -98,6 +101,15 @@ void ChanMsgDialog::channelstreeViewCostumPopupMenu( QPoint point )
contextMnu.exec( mevent->globalPos() );
}
void ChanMsgDialog::closeEvent (QCloseEvent * event)
{
RshareSettings config;
config.saveWidgetInformation(this);
hide();
event->ignore();
}
void ChanMsgDialog::deletechannel()
{

View File

@ -1,7 +1,7 @@
/****************************************************************
* 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
* modify it under the terms of the GNU General Public License
@ -24,6 +24,8 @@
#define _CHAN_MSG_DIALOG_H
#include <QMainWindow>
#include <config/rsharesettings.h>
#include "ui_ChanMsgDialog.h"
@ -52,6 +54,9 @@ public slots:
void sendMessage();
void cancelMessage();
protected:
void closeEvent (QCloseEvent * event);
private slots:
/** Create the context popup menu and it's submenus */

View File

@ -165,7 +165,22 @@ p, li { white-space: pre-wrap; }
</property>
<column>
<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>
</column>
</widget>