added InfoDialog

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1669 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2009-09-22 17:23:41 +00:00
parent 10f5f474e2
commit c9f295a760
11 changed files with 915 additions and 683 deletions

View File

@ -155,6 +155,7 @@ HEADERS += rshare.h \
gui/StatisticDialog.h \
gui/SoundManager.h \
gui/HelpDialog.h \
gui/InfoDialog.h \
gui/LogoBar.h \
gui/xprogressbar.h \
gui/plugins/PluginInterface.h \
@ -294,6 +295,7 @@ FORMS += gui/BlogDialog.ui \
gui/MessagesPopupDialog.ui \
gui/help/browser/helpbrowser.ui \
gui/HelpDialog.ui \
gui/InfoDialog.ui \
gui/bwgraph/bwgraph.ui \
gui/profile/ProfileView.ui \
gui/profile/ProfileEdit.ui \
@ -387,6 +389,7 @@ SOURCES += main.cpp \
gui/help/browser/helpbrowser.cpp \
gui/help/browser/helptextbrowser.cpp \
gui/HelpDialog.cpp \
gui/InfoDialog.cpp \
gui/LogoBar.cpp \
gui/xprogressbar.cpp \
lang/languagesupport.cpp \

View File

@ -23,6 +23,7 @@
#include <rshare.h>
#include <rsiface/rsinit.h>
#include "GenCertDialog.h"
#include "InfoDialog.h"
#include "gui/Preferences/rsharesettings.h"
#include <QFileDialog>
#include <QMessageBox>
@ -43,6 +44,7 @@ GenCertDialog::GenCertDialog(QWidget *parent, Qt::WFlags flags)
connect(ui.genButton, SIGNAL(clicked()), this, SLOT(genPerson()));
connect(ui.infopushButton,SIGNAL(clicked()), this, SLOT(infodlg()));
//connect(ui.selectButton, SIGNAL(clicked()), this, SLOT(selectFriend()));
//connect(ui.friendBox, SIGNAL(stateChanged(int)), this, SLOT(checkChanged(int)));
@ -248,3 +250,8 @@ void GenCertDialog::loadCertificates()
}
}
void GenCertDialog::infodlg()
{
static InfoDialog *infodialog = new InfoDialog();
infodialog->show();
}

View File

@ -54,6 +54,7 @@ private slots:
//void loadPerson();
void selectFriend();
void checkChanged(int i);
void infodlg();
private:

View File

@ -6,10 +6,22 @@
<rect>
<x>0</x>
<y>0</y>
<width>486</width>
<height>427</height>
<width>437</width>
<height>350</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>167777</width>
<height>167777</height>
</size>
</property>
<property name="palette">
<palette>
<active>
@ -500,9 +512,23 @@
<iconset resource="images.qrc">
<normaloff>:/images/rstray3.png</normaloff>:/images/rstray3.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="loginLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>116</height>
</size>
</property>
<property name="palette">
<palette>
<active>
@ -988,10 +1014,10 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item>
<item row="1" column="0">
<layout class="QGridLayout">
<property name="margin">
<number>0</number>
<number>9</number>
</property>
<property name="spacing">
<number>6</number>
@ -1050,26 +1076,6 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="10" column="2">
<widget class="QPushButton" name="genButton">
<property name="text">
<string>Generate New Profil</string>
</property>
</widget>
</item>
<item row="10" column="0" colspan="2">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>211</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1" colspan="2">
<widget class="QComboBox" name="genPGPuser"/>
</item>
@ -1110,19 +1116,48 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</item>
<item>
<item row="2" column="0">
<layout class="QGridLayout" name="gridLayout">
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
<property name="leftMargin">
<number>9</number>
</property>
<property name="rightMargin">
<number>9</number>
</property>
<item row="0" column="0">
<widget class="QPushButton" name="infopushButton">
<property name="text">
<string>Info</string>
</property>
</widget>
</item>
<item row="0" column="1">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
<width>206</width>
<height>22</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="genButton">
<property name="text">
<string>Generate New Profil</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<tabstops>
@ -1132,7 +1167,6 @@ p, li { white-space: pre-wrap; }
<tabstop>genOrg</tabstop>
<tabstop>genLoc</tabstop>
<tabstop>genCountry</tabstop>
<tabstop>genButton</tabstop>
</tabstops>
<resources>
<include location="images.qrc"/>

View File

@ -0,0 +1,58 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2009, RetroShare Team
*
* 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., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
****************************************************************/
#include "InfoDialog.h"
#include "rsiface/rsiface.h"
#include <iostream>
#include <sstream>
#include <QtCore/QFile>
#include <QtCore/QTextStream>
#include <QContextMenuEvent>
#include <QMenu>
#include <QCursor>
#include <QPoint>
#include <QMouseEvent>
#include <QPixmap>
/* Images for context menu icons */
#define IMAGE_DOWNLOAD ":/images/start.png"
/** Constructor */
InfoDialog::InfoDialog(QWidget *parent)
:QDialog(parent)
{
/* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this);
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
/* Hide platform specific features */
#ifdef Q_WS_WIN
#endif
}

View File

@ -0,0 +1,49 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* 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., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
****************************************************************/
#ifndef _INFODIALOG_H
#define _INFODIALOG_H
#include <QFileDialog>
#include "ui_InfoDialog.h"
#include "rsiface/rstypes.h"
class InfoDialog : public QDialog
{
Q_OBJECT
public:
/** Default Constructor */
InfoDialog(QWidget *parent = 0);
/** Default Destructor */
private slots:
private:
/** Qt Designer generated object */
Ui::InfoDialog ui;
};
#endif

View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>InfoDialog</class>
<widget class="QDialog" name="InfoDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>595</width>
<height>227</height>
</rect>
</property>
<property name="windowTitle">
<string>Info</string>
</property>
<property name="windowIcon">
<iconset resource="images.qrc">
<normaloff>:/images/info16.png</normaloff>:/images/info16.png</iconset>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="3">
<widget class="QLabel" name="label">
<property name="styleSheet">
<string notr="true">background: white;
border: 2px solid black;
border-radius: 10px;
</string>
</property>
<property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&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:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&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;&lt;span style=&quot; font-size:9pt; font-weight:600;&quot;&gt;You must create for RetroShare a GPG key, this is required for creating a RetroShare Profile.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;&quot;&gt;&lt;/p&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;&lt;span style=&quot; font-size:8pt; font-weight:600;&quot;&gt;1. On Linux must install GPA :&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt; font-weight:600;&quot;&gt;&lt;/p&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;&lt;span style=&quot; font-size:8pt; color:#0000ff;&quot;&gt;sudo apt-get install gpa&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt; color:#0000ff;&quot;&gt;&lt;/p&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;&lt;span style=&quot; font-size:8pt; font-weight:600;&quot;&gt;2. On Windows must install gpg4win package:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt; font-weight:600;&quot;&gt;&lt;/p&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;&lt;a href=&quot;http://ftp.gpg4win.org/gpg4win-1.1.4.exe&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://ftp.gpg4win.org/gpg4win-1.1.4.exe&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="1" column="0">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>502</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="images.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -23,6 +23,7 @@
#include <rsiface/rsinit.h>
#include "StartDialog.h"
#include "GenCertDialog.h"
#include "InfoDialog.h"
#include "LogoBar.h"
#include <QFileDialog>
#include <QMessageBox>
@ -67,6 +68,7 @@ StartDialog::StartDialog(QWidget *parent, Qt::WFlags flags)
//connect(ui.selectButton, SIGNAL(clicked()), this, SLOT(selectFriend()));
//connect(ui.friendBox, SIGNAL(stateChanged(int)), this, SLOT(checkChanged(int)));
connect(ui.createaccountButton, SIGNAL(clicked()), this, SLOT(createnewaccount()));
connect(ui.infoButton,SIGNAL(clicked()), this, SLOT(infodlg()));
/* load the Certificate File name */
std::string userName;
@ -259,6 +261,15 @@ void StartDialog::createnewaccount()
}
}
void StartDialog::infodlg()
{
static InfoDialog *infodialog = new InfoDialog();
infodialog->show();
}
bool StartDialog::requestedNewCert()
{
return reqNewCert;

View File

@ -61,6 +61,8 @@ private slots:
void closeinfodlg();
void loadPerson();
void createnewaccount();
void infodlg();
private:

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>268</width>
<height>627</height>
<width>244</width>
<height>529</height>
</rect>
</property>
<property name="palette">
@ -581,71 +581,6 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</item>
<item row="2" column="0" rowspan="3">
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>25</width>
<height>208</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="1" colspan="2">
<widget class="QLabel" name="label_2">
<property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&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:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;&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;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt;&quot;&gt;You can login with your&lt;/span&gt;&lt;/p&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;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt;&quot;&gt;RetroShare profile.&lt;/span&gt;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt;&quot;&gt;You want a new Profile?&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="2" column="3" rowspan="3">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>24</width>
<height>198</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="1">
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>75</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="2">
<widget class="QPushButton" name="createaccountButton">
<property name="toolTip">
<string>Generate now a Profile</string>
</property>
<property name="text">
<string>generate new a profile</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
<item row="4" column="1" colspan="2">
<widget class="QGroupBox" name="groupBox">
<property name="title">
@ -787,7 +722,7 @@ p, li { white-space: pre-wrap; }
</property>
</spacer>
</item>
<item row="7" column="0" colspan="4">
<item row="8" column="0" colspan="4">
<widget class="QFrame" name="callBarFrame">
<property name="minimumSize">
<size>
@ -803,11 +738,69 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="2" column="3" rowspan="3">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>24</width>
<height>198</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0" rowspan="3">
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>25</width>
<height>208</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="1" colspan="2">
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>75</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="7" column="1">
<widget class="QPushButton" name="createaccountButton">
<property name="toolTip">
<string>Generate now a Profile</string>
</property>
<property name="text">
<string>new profile</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
<item row="7" column="2">
<widget class="QPushButton" name="infoButton">
<property name="text">
<string>Info</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<tabstops>
<tabstop>createaccountButton</tabstop>
<tabstop>loadName</tabstop>
<tabstop>loadPasswd</tabstop>
<tabstop>loadGPGPasswd</tabstop>

View File

@ -202,6 +202,7 @@
<file>images/konversation.png</file>
<file>images/konversation16.png</file>
<file>images/konversation128.png</file>
<file>images/konv_message2.png</file>
<file>images/konversation64.png</file>
<file>images/ksysguard.png</file>
<file>images/ksysguard32.png</file>