added new Toasters

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1222 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2009-05-12 00:37:25 +00:00
parent 5a5ad509aa
commit 99828dfa41
14 changed files with 822 additions and 0 deletions

View File

@ -193,6 +193,7 @@
<file>images/konqsidebar_news24.png</file>
<file>images/konversation.png</file>
<file>images/konversation16.png</file>
<file>images/konversation128.png</file>
<file>images/ksysguard.png</file>
<file>images/ksysguard32.png</file>
<file>images/ktorrent.png</file>
@ -324,6 +325,7 @@
<file>images/user/add_user16.png</file>
<file>images/user/personal64.png</file>
<file>images/user/kuser24.png</file>
<file>images/user/agt_forum128.png</file>
<file>images/up.png</file>
<file>images/up0down0.png</file>
<file>images/up0down1.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -0,0 +1,67 @@
/*
* RetroShare
* Copyright (C) 2006,2007 crypton
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "ForumsToaster.h"
#include "ui_ForumsToaster.h"
#include "QtToaster.h"
#include <QtGui/QtGui>
ForumsToaster::ForumsToaster()
: QObject(NULL) {
_ForumsToasterWidget = new QWidget(NULL);
_ui = new Ui::ForumsToaster();
_ui->setupUi(_ForumsToasterWidget);
connect(_ui->messageButton, SIGNAL(clicked()), SLOT(chatButtonSlot()));
connect(_ui->closeButton, SIGNAL(clicked()), SLOT(close()));
_toaster = new QtToaster(_ForumsToasterWidget, _ui->windowFrame);
_toaster->setTimeOnTop(5000);
}
ForumsToaster::~ForumsToaster() {
delete _ui;
}
void ForumsToaster::setMessage(const QString & message) {
_ui->messageLabel->setText(message);
}
void ForumsToaster::setPixmap(const QPixmap & pixmap) {
_ui->pixmaplabel->setPixmap(pixmap);
}
void ForumsToaster::show() {
_toaster->show();
}
void ForumsToaster::close() {
_toaster->close();
}
void ForumsToaster::chatButtonSlot() {
chatButtonClicked();
close();
}

View File

@ -0,0 +1,72 @@
/*
* RetroShare
* Copyright (C) 2006 crypton
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef FORUMSTOASTER_H
#define FORUMSTOASTER_H
#include "IQtToaster.h"
#include <QtCore/QObject>
class QtToaster;
class QWidget;
class QString;
class QPixmap;
namespace Ui { class ForumsToaster; }
/**
* Shows a toaster when friend is Forums .
*
*
*/
class ForumsToaster : public QObject, public IQtToaster {
Q_OBJECT
public:
ForumsToaster();
~ForumsToaster();
void setMessage(const QString & message);
void setPixmap(const QPixmap & pixmap);
void show();
Q_SIGNALS:
void chatButtonClicked();
private Q_SLOTS:
void chatButtonSlot();
void close();
private:
Ui::ForumsToaster * _ui;
QWidget * _ForumsToasterWidget;
QtToaster * _toaster;
};
#endif //FORUMSTOASTER_H

View File

@ -0,0 +1,274 @@
<ui version="4.0" >
<class>GroupChatToaster</class>
<widget class="QWidget" name="GroupChatToaster" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>388</width>
<height>168</height>
</rect>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<property name="horizontalSpacing" >
<number>0</number>
</property>
<property name="verticalSpacing" >
<number>0</number>
</property>
<item row="0" column="0" >
<widget class="QFrame" name="windowFrame" >
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<property name="horizontalSpacing" >
<number>0</number>
</property>
<property name="verticalSpacing" >
<number>0</number>
</property>
<item row="0" column="0" >
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<property name="horizontalSpacing" >
<number>0</number>
</property>
<property name="verticalSpacing" >
<number>0</number>
</property>
<item row="0" column="2" >
<widget class="QPushButton" name="closeButton" >
<property name="minimumSize" >
<size>
<width>18</width>
<height>18</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>18</width>
<height>18</height>
</size>
</property>
<property name="icon" >
<iconset resource="../images.qrc" >:/images/close-down.png</iconset>
</property>
<property name="iconSize" >
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="flat" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>225</width>
<height>22</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="1" column="0" >
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>4</number>
</property>
<property name="rightMargin" >
<number>4</number>
</property>
<property name="horizontalSpacing" >
<number>0</number>
</property>
<property name="verticalSpacing" >
<number>0</number>
</property>
<item rowspan="3" row="0" column="0" >
<widget class="QLabel" name="pixmaplabel" >
<property name="minimumSize" >
<size>
<width>74</width>
<height>74</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>74</width>
<height>74</height>
</size>
</property>
<property name="styleSheet" >
<string>border-image: url(:/images/avatar_background.png);</string>
</property>
<property name="text" >
<string/>
</property>
<property name="pixmap" >
<pixmap resource="../images.qrc" >:/images/konversation128.png</pixmap>
</property>
<property name="scaledContents" >
<bool>true</bool>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>121</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1" >
<widget class="QPushButton" name="messageButton" >
<property name="font" >
<font/>
</property>
<property name="styleSheet" >
<string>color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #49881F, stop: 1 #49881F );</string>
</property>
<property name="text" >
<string>New Forum Message</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>121</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="2" column="0" >
<layout class="QGridLayout" >
<property name="topMargin" >
<number>6</number>
</property>
<item row="0" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>81</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1" >
<widget class="QLabel" name="messageLabel" >
<property name="text" >
<string/>
</property>
</widget>
</item>
<item row="0" column="2" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>131</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="3" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>384</width>
<height>61</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<tabstops>
<tabstop>messageButton</tabstop>
<tabstop>closeButton</tabstop>
</tabstops>
<resources>
<include location="../images.qrc" />
</resources>
<connections/>
</ui>

View File

@ -0,0 +1,67 @@
/*
* RetroShare
* Copyright (C) 2006,2007 crypton
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "GroupChatToaster.h"
#include "ui_GroupChatToaster.h"
#include "QtToaster.h"
#include <QtGui/QtGui>
GroupChatToaster::GroupChatToaster()
: QObject(NULL) {
_GroupChatToasterWidget = new QWidget(NULL);
_ui = new Ui::GroupChatToaster();
_ui->setupUi(_GroupChatToasterWidget);
connect(_ui->messageButton, SIGNAL(clicked()), SLOT(chatButtonSlot()));
connect(_ui->closeButton, SIGNAL(clicked()), SLOT(close()));
_toaster = new QtToaster(_GroupChatToasterWidget, _ui->windowFrame);
_toaster->setTimeOnTop(5000);
}
GroupChatToaster::~GroupChatToaster() {
delete _ui;
}
void GroupChatToaster::setMessage(const QString & message) {
_ui->messageLabel->setText(message);
}
void GroupChatToaster::setPixmap(const QPixmap & pixmap) {
_ui->pixmaplabel->setPixmap(pixmap);
}
void GroupChatToaster::show() {
_toaster->show();
}
void GroupChatToaster::close() {
_toaster->close();
}
void GroupChatToaster::chatButtonSlot() {
chatButtonClicked();
close();
}

View File

@ -0,0 +1,72 @@
/*
* RetroShare
* Copyright (C) 2006 crypton
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef GROUPCHATTOASTER_H
#define GROUPCHATTOASTER_H
#include "IQtToaster.h"
#include <QtCore/QObject>
class QtToaster;
class QWidget;
class QString;
class QPixmap;
namespace Ui { class GroupChatToaster; }
/**
* Shows a toaster when friend is GroupChat .
*
*
*/
class GroupChatToaster : public QObject, public IQtToaster {
Q_OBJECT
public:
GroupChatToaster();
~GroupChatToaster();
void setMessage(const QString & message);
void setPixmap(const QPixmap & pixmap);
void show();
Q_SIGNALS:
void chatButtonClicked();
private Q_SLOTS:
void chatButtonSlot();
void close();
private:
Ui::GroupChatToaster * _ui;
QWidget * _GroupChatToasterWidget;
QtToaster * _toaster;
};
#endif //GROUPCHATTOASTER_H

View File

@ -0,0 +1,268 @@
<ui version="4.0" >
<class>GroupChatToaster</class>
<widget class="QWidget" name="GroupChatToaster" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>388</width>
<height>168</height>
</rect>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<property name="horizontalSpacing" >
<number>0</number>
</property>
<property name="verticalSpacing" >
<number>0</number>
</property>
<item row="0" column="0" >
<widget class="QFrame" name="windowFrame" >
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<property name="horizontalSpacing" >
<number>0</number>
</property>
<property name="verticalSpacing" >
<number>0</number>
</property>
<item row="0" column="0" >
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<property name="horizontalSpacing" >
<number>0</number>
</property>
<property name="verticalSpacing" >
<number>0</number>
</property>
<item row="0" column="2" >
<widget class="QPushButton" name="closeButton" >
<property name="minimumSize" >
<size>
<width>18</width>
<height>18</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>18</width>
<height>18</height>
</size>
</property>
<property name="icon" >
<iconset resource="../images.qrc" >:/images/close-down.png</iconset>
</property>
<property name="flat" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>225</width>
<height>22</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="1" column="0" >
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>4</number>
</property>
<property name="rightMargin" >
<number>4</number>
</property>
<property name="horizontalSpacing" >
<number>0</number>
</property>
<property name="verticalSpacing" >
<number>0</number>
</property>
<item rowspan="3" row="0" column="0" >
<widget class="QLabel" name="pixmaplabel" >
<property name="minimumSize" >
<size>
<width>74</width>
<height>74</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>74</width>
<height>74</height>
</size>
</property>
<property name="styleSheet" >
<string>border-image: url(:/images/avatar_background.png);</string>
</property>
<property name="text" >
<string/>
</property>
<property name="pixmap" >
<pixmap resource="../images.qrc" >:/images/user/agt_forum128.png</pixmap>
</property>
<property name="scaledContents" >
<bool>true</bool>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>121</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1" >
<widget class="QPushButton" name="messageButton" >
<property name="font" >
<font/>
</property>
<property name="styleSheet" >
<string>color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #49881F, stop: 1 #49881F );</string>
</property>
<property name="text" >
<string>New GroupChat Message</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>121</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="2" column="0" >
<layout class="QGridLayout" >
<property name="topMargin" >
<number>6</number>
</property>
<item row="0" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>81</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1" >
<widget class="QLabel" name="messageLabel" >
<property name="text" >
<string/>
</property>
</widget>
</item>
<item row="0" column="2" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>131</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="3" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>384</width>
<height>61</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<tabstops>
<tabstop>messageButton</tabstop>
<tabstop>closeButton</tabstop>
</tabstops>
<resources>
<include location="../images.qrc" />
</resources>
<connections/>
</ui>