Removed context help button from the dialogs (currently not used) and added minimize/maximize buttons to the "floating" dialogs.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5786 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-11-06 23:26:47 +00:00
parent 07d8db4505
commit 9b5ee85fd0
42 changed files with 86 additions and 189 deletions

View File

@ -223,8 +223,10 @@ void ChannelFeed::channelListCustomPopupMenu( QPoint /*point*/ )
void ChannelFeed::createChannel() void ChannelFeed::createChannel()
{ {
CreateChannel cf (this); CreateChannel *cf = new CreateChannel();
cf.exec(); cf->show();
/* window will destroy itself! */
} }
/*************************************************************************************/ /*************************************************************************************/
@ -246,13 +248,13 @@ void ChannelFeed::openChat(std::string /*peerId*/)
void ChannelFeed::editChannelDetail(){ void ChannelFeed::editChannelDetail(){
EditChanDetails editUi(this, 0, mChannelId); EditChanDetails editUi(this, mChannelId);
editUi.exec(); editUi.exec();
} }
void ChannelFeed::shareKey() void ChannelFeed::shareKey()
{ {
ShareKey shareUi(this, 0, mChannelId, CHANNEL_KEY_SHARE); ShareKey shareUi(this, mChannelId, CHANNEL_KEY_SHARE);
shareUi.exec(); shareUi.exec();
} }

View File

@ -1435,8 +1435,10 @@ void ForumsDialog::copyMessageLink()
void ForumsDialog::newforum() void ForumsDialog::newforum()
{ {
CreateForum cf (this); CreateForum *cf = new CreateForum();
cf.exec (); cf->show();
/* window will destroy itself! */
} }
void ForumsDialog::createmessage() void ForumsDialog::createmessage()
@ -1598,7 +1600,7 @@ void ForumsDialog::filterItems(const QString& text)
void ForumsDialog::shareKey() void ForumsDialog::shareKey()
{ {
ShareKey shareUi(this, 0, mCurrForumId, FORUM_KEY_SHARE); ShareKey shareUi(this, mCurrForumId, FORUM_KEY_SHARE);
shareUi.exec(); shareUi.exec();
} }

View File

@ -26,14 +26,14 @@
#include "msgs/MessageComposer.h" #include "msgs/MessageComposer.h"
#include "settings/rsharesettings.h" #include "settings/rsharesettings.h"
void FriendRecommendDialog::showYourself(QWidget *parent) void FriendRecommendDialog::showYourself()
{ {
FriendRecommendDialog *dlg = new FriendRecommendDialog(parent); FriendRecommendDialog *dlg = new FriendRecommendDialog();
dlg->show(); dlg->show();
} }
FriendRecommendDialog::FriendRecommendDialog(QWidget *parent) : FriendRecommendDialog::FriendRecommendDialog() :
QDialog(parent), QDialog(NULL, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint),
ui(new Ui::FriendRecommendDialog) ui(new Ui::FriendRecommendDialog)
{ {
ui->setupUi(this); ui->setupUi(this);

View File

@ -35,13 +35,13 @@ class FriendRecommendDialog : public QDialog
public: public:
~FriendRecommendDialog(); ~FriendRecommendDialog();
static void showYourself(QWidget *parent = 0); static void showYourself();
private slots: private slots:
void sendMsg(); void sendMsg();
private: private:
FriendRecommendDialog(QWidget *parent = 0); FriendRecommendDialog();
Ui::FriendRecommendDialog *ui; Ui::FriendRecommendDialog *ui;
}; };

View File

@ -34,14 +34,10 @@
#include "retroshare/rspeers.h" #include "retroshare/rspeers.h"
#include <retroshare/rshistory.h> #include <retroshare/rshistory.h>
#ifndef RS_RELEASE_VERSION
#include "channels/CreateChannel.h"
#endif
#include "common/Emoticons.h" #include "common/Emoticons.h"
#include "common/PeerDefs.h" #include "common/PeerDefs.h"
#include "chat/ChatUserNotify.h" #include "chat/ChatUserNotify.h"
#include "connect/ConnectFriendWizard.h" #include "connect/ConnectFriendWizard.h"
#include "forums/CreateForum.h"
#include "groups/CreateGroup.h" #include "groups/CreateGroup.h"
#include "im_history/ImHistoryBrowser.h" #include "im_history/ImHistoryBrowser.h"
#include "MainWindow.h" #include "MainWindow.h"
@ -174,10 +170,6 @@ FriendsDialog::FriendsDialog(QWidget *parent)
menu->addAction(ui.actionFriendRecommendations); menu->addAction(ui.actionFriendRecommendations);
menu->addSeparator(); menu->addSeparator();
menu->addAction(ui.actionCreate_New_Forum);
#ifndef RS_RELEASE_VERSION
menu->addAction(ui.actionCreate_New_Channel);
#endif
menu->addAction(ui.actionSet_your_Avatar); menu->addAction(ui.actionSet_your_Avatar);
menu->addAction(ui.actionSet_your_Personal_Message); menu->addAction(ui.actionSet_your_Personal_Message);
@ -753,26 +745,6 @@ void FriendsDialog::getAvatar()
} }
} }
void FriendsDialog::on_actionCreate_New_Forum_activated()
{
MainWindow::activatePage (MainWindow::Forums);
CreateForum cf (this);
cf.exec();
}
void FriendsDialog::on_actionCreate_New_Channel_activated()
{
#ifndef RS_RELEASE_VERSION
MainWindow::activatePage (MainWindow::Channels);
CreateChannel cf (this);
cf.exec();
#endif
}
/** Loads own personal status */ /** Loads own personal status */
void FriendsDialog::loadmypersonalstatus() void FriendsDialog::loadmypersonalstatus()
{ {

View File

@ -101,8 +101,6 @@ private slots:
void getAvatar(); void getAvatar();
void on_actionAdd_Group_activated(); void on_actionAdd_Group_activated();
void on_actionCreate_New_Forum_activated();
void on_actionCreate_New_Channel_activated();
void loadmypersonalstatus(); void loadmypersonalstatus();

View File

@ -744,45 +744,6 @@
<string>Add Friend</string> <string>Add Friend</string>
</property> </property>
</action> </action>
<action name="actionCreate_new_Profile">
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/contact_new.png</normaloff>:/images/contact_new.png</iconset>
</property>
<property name="text">
<string>Create new Profile</string>
</property>
</action>
<action name="actionCreate_New_Forum">
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/new_forum16.png</normaloff>:/images/new_forum16.png</iconset>
</property>
<property name="text">
<string>Create new Forum</string>
</property>
<property name="toolTip">
<string>Create new Forum</string>
</property>
<property name="shortcut">
<string>F</string>
</property>
</action>
<action name="actionCreate_New_Channel">
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/add_channel24.png</normaloff>:/images/add_channel24.png</iconset>
</property>
<property name="text">
<string>Create new Channel</string>
</property>
<property name="toolTip">
<string>Create new Channel</string>
</property>
<property name="shortcut">
<string>C</string>
</property>
</action>
<action name="actionSet_your_Avatar"> <action name="actionSet_your_Avatar">
<property name="icon"> <property name="icon">
<iconset resource="images.qrc"> <iconset resource="images.qrc">
@ -881,16 +842,21 @@
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>
<class>AvatarWidget</class> <class>LineEditClear</class>
<extends>QLabel</extends> <extends>QLineEdit</extends>
<header>gui/common/AvatarWidget.h</header> <header>gui/common/LineEditClear.h</header>
<container>1</container>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>LinkTextBrowser</class> <class>LinkTextBrowser</class>
<extends>QTextBrowser</extends> <extends>QTextBrowser</extends>
<header>gui/common/LinkTextBrowser.h</header> <header>gui/common/LinkTextBrowser.h</header>
</customwidget> </customwidget>
<customwidget>
<class>AvatarWidget</class>
<extends>QLabel</extends>
<header>gui/common/AvatarWidget.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>FriendList</class> <class>FriendList</class>
<extends>QWidget</extends> <extends>QWidget</extends>
@ -909,11 +875,6 @@
<header location="global">gui/chat/ChatTabWidget.h</header> <header location="global">gui/chat/ChatTabWidget.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>LineEditClear</class>
<extends>QLineEdit</extends>
<header location="global">gui/common/LineEditClear.h</header>
</customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="images.qrc"/> <include location="images.qrc"/>

View File

@ -33,8 +33,8 @@
#define DATETIME_FMT "MMM dd hh:mm:ss" #define DATETIME_FMT "MMM dd hh:mm:ss"
/** Default constructor */ /** Default constructor */
GenCertDialog::GenCertDialog(bool onlyGenerateIdentity, QWidget *parent, Qt::WFlags flags) GenCertDialog::GenCertDialog(bool onlyGenerateIdentity, QWidget *parent)
: QDialog(parent, flags), mOnlyGenerateIdentity(onlyGenerateIdentity) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint), mOnlyGenerateIdentity(onlyGenerateIdentity)
{ {
/* Invoke Qt Designer generated QObject setup routine */ /* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this); ui.setupUi(this);

View File

@ -30,7 +30,7 @@ class GenCertDialog : public QDialog
public: public:
/** Default constructor */ /** Default constructor */
GenCertDialog(bool onlyGenerateIdentity, QWidget *parent = 0, Qt::WFlags flags = 0); GenCertDialog(bool onlyGenerateIdentity, QWidget *parent = 0);
private slots: private slots:
void genPerson(); void genPerson();

View File

@ -45,8 +45,8 @@
ShareManager *ShareManager::_instance = NULL ; ShareManager *ShareManager::_instance = NULL ;
/** Default constructor */ /** Default constructor */
ShareManager::ShareManager(QWidget *parent, Qt::WFlags flags) ShareManager::ShareManager()
: QDialog(parent, flags) : QDialog(NULL, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint)
{ {
/* Invoke Qt Designer generated QObject setup routine */ /* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this); ui.setupUi(this);
@ -208,7 +208,7 @@ void ShareManager::load()
void ShareManager::showYourself() void ShareManager::showYourself()
{ {
if(_instance == NULL) if(_instance == NULL)
_instance = new ShareManager(NULL,0) ; _instance = new ShareManager() ;
_instance->show() ; _instance->show() ;
_instance->activateWindow(); _instance->activateWindow();

View File

@ -38,7 +38,7 @@ public:
private: private:
/** Default constructor */ /** Default constructor */
ShareManager( QWidget *parent = 0, Qt::WFlags flags = 0); ShareManager();
/** Default destructor */ /** Default destructor */
~ShareManager(); ~ShareManager();

View File

@ -30,7 +30,7 @@
/** Default constructor */ /** Default constructor */
StartDialog::StartDialog(QWidget *parent) StartDialog::StartDialog(QWidget *parent)
: QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinimizeButtonHint), reqNewCert(false) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint), reqNewCert(false)
{ {
/* Invoke Qt Designer generated QObject setup routine */ /* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this); ui.setupUi(this);

View File

@ -37,8 +37,8 @@
#define DATETIME_FMT "MMM dd hh:mm:ss" #define DATETIME_FMT "MMM dd hh:mm:ss"
/** Default constructor */ /** Default constructor */
ChannelDetails::ChannelDetails(QWidget *parent, Qt::WFlags flags) ChannelDetails::ChannelDetails(QWidget *parent)
: QDialog(parent, flags) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint)
{ {
/* Invoke Qt Designer generated QObject setup routine */ /* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this); ui.setupUi(this);

View File

@ -33,8 +33,7 @@ class ChannelDetails : public QDialog
public: public:
/** Default constructor */ /** Default constructor */
ChannelDetails(QWidget *parent = 0, Qt::WFlags flags = 0); ChannelDetails(QWidget *parent = 0);
/** Default destructor */
void showDetails(std::string mChannelId); void showDetails(std::string mChannelId);

View File

@ -32,12 +32,14 @@
#include <retroshare/rspeers.h> #include <retroshare/rspeers.h>
/** Constructor */ /** Constructor */
CreateChannel::CreateChannel(QWidget *parent) CreateChannel::CreateChannel()
: QDialog(parent) : QDialog(NULL, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint)
{ {
/* Invoke the Qt Designer generated object setup routine */ /* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this); ui.setupUi(this);
setAttribute(Qt::WA_DeleteOnClose, true);
ui.headerFrame->setHeaderImage(QPixmap(":/images/add_channel64.png")); ui.headerFrame->setHeaderImage(QPixmap(":/images/add_channel64.png"));
ui.headerFrame->setHeaderText(tr("New Channel")); ui.headerFrame->setHeaderText(tr("New Channel"));

View File

@ -29,7 +29,7 @@ class CreateChannel : public QDialog
Q_OBJECT Q_OBJECT
public: public:
CreateChannel(QWidget *parent = 0); CreateChannel();
void newChannel(); /* cleanup */ void newChannel(); /* cleanup */

View File

@ -39,7 +39,7 @@
/** Constructor */ /** Constructor */
CreateChannelMsg::CreateChannelMsg(std::string cId) CreateChannelMsg::CreateChannelMsg(std::string cId)
: QDialog (NULL), mChannelId(cId) ,mCheckAttachment(true), mAutoMediaThumbNail(false) : QDialog (NULL, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint), mChannelId(cId) ,mCheckAttachment(true), mAutoMediaThumbNail(false)
{ {
/* Invoke the Qt Designer generated object setup routine */ /* Invoke the Qt Designer generated object setup routine */
setupUi(this); setupUi(this);

View File

@ -34,8 +34,8 @@
/** Default constructor */ /** Default constructor */
EditChanDetails::EditChanDetails(QWidget *parent, Qt::WFlags flags, std::string cId) EditChanDetails::EditChanDetails(QWidget *parent, std::string cId)
: QDialog(parent, flags), mChannelId(cId) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint), mChannelId(cId)
{ {
/* Invoke Qt Designer generated QObject setup routine */ /* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this); ui.setupUi(this);

View File

@ -32,8 +32,7 @@ class EditChanDetails : public QDialog
public: public:
/** Default constructor */ /** Default constructor */
EditChanDetails(QWidget *parent = 0, Qt::WFlags flags = 0, std::string cId = ""); EditChanDetails(QWidget *parent = 0, std::string cId = 0);
/** Default destructor */
signals: signals:
void configChanged(); void configChanged();

View File

@ -30,8 +30,8 @@
#include "gui/common/PeerDefs.h" #include "gui/common/PeerDefs.h"
ShareKey::ShareKey(QWidget *parent, Qt::WFlags flags, std::string grpId, int grpType) : ShareKey::ShareKey(QWidget *parent, std::string grpId, int grpType) :
QDialog(parent, flags), mGrpId(grpId), mGrpType(grpType) QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint), mGrpId(grpId), mGrpType(grpType)
{ {
ui = new Ui::ShareKey(); ui = new Ui::ShareKey();
ui->setupUi(this); ui->setupUi(this);

View File

@ -16,7 +16,7 @@ public:
/* /*
*@param chanId The channel id to send request for *@param chanId The channel id to send request for
*/ */
ShareKey(QWidget *parent = 0, Qt::WFlags flags = 0, std::string grpId = "", int grpType = 0); ShareKey(QWidget *parent = 0, std::string grpId = "", int grpType = 0);
~ShareKey(); ~ShareKey();
protected: protected:

View File

@ -31,8 +31,8 @@
#include "gui/common/PeerDefs.h" #include "gui/common/PeerDefs.h"
#include "ChatDialog.h" #include "ChatDialog.h"
CreateLobbyDialog::CreateLobbyDialog(const std::list<std::string>& peer_list, int privacyLevel, QWidget *parent, Qt::WFlags flags) : CreateLobbyDialog::CreateLobbyDialog(const std::list<std::string>& peer_list, int privacyLevel, QWidget *parent) :
QDialog(parent, flags) QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint)
{ {
ui = new Ui::CreateLobbyDialog() ; ui = new Ui::CreateLobbyDialog() ;
ui->setupUi(this); ui->setupUi(this);

View File

@ -12,7 +12,7 @@ public:
/* /*
*@param chanId The channel id to send request for *@param chanId The channel id to send request for
*/ */
CreateLobbyDialog(const std::list<std::string>& friends_list, int privacyLevel = 0, QWidget *parent = 0, Qt::WFlags flags = 0); CreateLobbyDialog(const std::list<std::string>& friends_list, int privacyLevel = 0, QWidget *parent = 0);
~CreateLobbyDialog(); ~CreateLobbyDialog();
protected: protected:

View File

@ -31,12 +31,14 @@
#include <retroshare/rspeers.h> #include <retroshare/rspeers.h>
/** Constructor */ /** Constructor */
CreateForum::CreateForum(QWidget *parent) CreateForum::CreateForum()
: QDialog(parent) : QDialog(NULL, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint)
{ {
/* Invoke the Qt Designer generated object setup routine */ /* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this); ui.setupUi(this);
setAttribute(Qt::WA_DeleteOnClose, true);
ui.headerFrame->setHeaderImage(QPixmap(":/images/konversation64.png")); ui.headerFrame->setHeaderImage(QPixmap(":/images/konversation64.png"));
ui.headerFrame->setHeaderText(tr("New Forum")); ui.headerFrame->setHeaderText(tr("New Forum"));

View File

@ -30,7 +30,7 @@ class CreateForum : public QDialog
Q_OBJECT Q_OBJECT
public: public:
CreateForum(QWidget *parent = 0); CreateForum();
void newForum(); /* cleanup */ void newForum(); /* cleanup */

View File

@ -42,7 +42,7 @@
/** Constructor */ /** Constructor */
CreateForumMsg::CreateForumMsg(const std::string &fId, const std::string &pId) CreateForumMsg::CreateForumMsg(const std::string &fId, const std::string &pId)
: QDialog(NULL), mForumId(fId), mParentId(pId) : QDialog(NULL, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint), mForumId(fId), mParentId(pId)
{ {
/* Invoke the Qt Designer generated object setup routine */ /* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this); ui.setupUi(this);

View File

@ -31,8 +31,8 @@
/** Default constructor */ /** Default constructor */
EditForumDetails::EditForumDetails(std::string forumId, QWidget *parent, Qt::WFlags flags) EditForumDetails::EditForumDetails(std::string forumId, QWidget *parent)
: QDialog(parent, flags), m_forumId(forumId) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint), m_forumId(forumId)
{ {
/* Invoke Qt Designer generated QObject setup routine */ /* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this); ui.setupUi(this);

View File

@ -32,7 +32,7 @@ class EditForumDetails : public QDialog
public: public:
/** Default constructor */ /** Default constructor */
EditForumDetails(std::string forumId = "", QWidget *parent = 0, Qt::WFlags flags = 0); EditForumDetails(std::string forumId = "", QWidget *parent = 0);
signals: signals:
void configChanged(); void configChanged();

View File

@ -37,8 +37,8 @@
#define DATETIME_FMT "MMM dd hh:mm:ss" #define DATETIME_FMT "MMM dd hh:mm:ss"
/** Default constructor */ /** Default constructor */
ForumDetails::ForumDetails(QWidget *parent, Qt::WFlags flags) ForumDetails::ForumDetails(QWidget *parent)
: QDialog(parent, flags) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint)
{ {
/* Invoke Qt Designer generated QObject setup routine */ /* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this); ui.setupUi(this);

View File

@ -33,8 +33,7 @@ class ForumDetails : public QDialog
public: public:
/** Default constructor */ /** Default constructor */
ForumDetails(QWidget *parent = 0, Qt::WFlags flags = 0); ForumDetails(QWidget *parent = 0);
/** Default destructor */
void showDetails(std::string mCurrForumId); void showDetails(std::string mCurrForumId);

View File

@ -29,8 +29,8 @@
#include "gui/common/GroupDefs.h" #include "gui/common/GroupDefs.h"
/** Default constructor */ /** Default constructor */
CreateGroup::CreateGroup(const std::string groupId, QWidget *parent, Qt::WFlags flags) CreateGroup::CreateGroup(const std::string groupId, QWidget *parent)
: QDialog(parent, flags) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint)
{ {
/* Invoke Qt Designer generated QObject setup routine */ /* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this); ui.setupUi(this);

View File

@ -32,7 +32,7 @@ class CreateGroup : public QDialog
public: public:
/** Default constructor */ /** Default constructor */
CreateGroup(const std::string groupId, QWidget *parent = 0, Qt::WFlags flags = 0); CreateGroup(const std::string groupId, QWidget *parent = 0);
/** Default destructor */ /** Default destructor */
~CreateGroup(); ~CreateGroup();

View File

@ -91,8 +91,8 @@ void ImHistoryBrowserCreateItemsThread::run()
} }
/** Default constructor */ /** Default constructor */
ImHistoryBrowser::ImHistoryBrowser(const std::string &peerId, QTextEdit *edit, QWidget *parent, Qt::WFlags flags) ImHistoryBrowser::ImHistoryBrowser(const std::string &peerId, QTextEdit *edit, QWidget *parent)
: QDialog(parent, flags) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint)
{ {
/* Invoke Qt Designer generated QObject setup routine */ /* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this); ui.setupUi(this);

View File

@ -43,7 +43,7 @@ class ImHistoryBrowser : public QDialog
public: public:
/** Default constructor */ /** Default constructor */
ImHistoryBrowser(const std::string &peerId, QTextEdit *edit, QWidget *parent = 0, Qt::WFlags flags = 0); ImHistoryBrowser(const std::string &peerId, QTextEdit *edit, QWidget *parent = 0);
/** Default destructor */ /** Default destructor */
virtual ~ImHistoryBrowser(); virtual ~ImHistoryBrowser();

View File

@ -42,8 +42,8 @@
#define COLUMN_GID 2 #define COLUMN_GID 2
/** Default constructor */ /** Default constructor */
ProfileManager::ProfileManager(QWidget *parent, Qt::WFlags flags) ProfileManager::ProfileManager(QWidget *parent)
: QDialog(parent, flags) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint)
{ {
/* Invoke Qt Designer generated QObject setup routine */ /* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this); ui.setupUi(this);

View File

@ -33,8 +33,7 @@ class ProfileManager : public QDialog
public: public:
/** Default constructor */ /** Default constructor */
ProfileManager(QWidget *parent = 0, Qt::WFlags flags = 0); ProfileManager(QWidget *parent = 0);
/** Default destructor */
private slots: private slots:
void identityTreeWidgetCostumPopupMenu( QPoint point ); void identityTreeWidgetCostumPopupMenu( QPoint point );

View File

@ -18,23 +18,14 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, * Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
****************************************************************/ ****************************************************************/
#include "StatusMessage.h" #include "StatusMessage.h"
#include <retroshare/rsiface.h>
#include <retroshare/rspeers.h>
#include <retroshare/rsdisc.h>
#include <retroshare/rsmsgs.h> #include <retroshare/rsmsgs.h>
#include "gui/settings/rsharesettings.h"
#include <QTime>
#include <iomanip>
/** Default constructor */ /** Default constructor */
StatusMessage::StatusMessage(QWidget *parent, Qt::WFlags flags) StatusMessage::StatusMessage(QWidget *parent)
: QDialog(parent, flags) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint)
{ {
/* Invoke Qt Designer generated QObject setup routine */ /* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this); ui.setupUi(this);
@ -42,13 +33,7 @@ StatusMessage::StatusMessage(QWidget *parent, Qt::WFlags flags)
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(save())); connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(save()));
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close())); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
load(); ui.txt_StatusMessage->setText(QString::fromUtf8(rsMsgs->getCustomStateString().c_str()));
}
/** Destructor. */
StatusMessage::~StatusMessage()
{
} }
/** Saves the changes on this page */ /** Saves the changes on this page */
@ -56,14 +41,5 @@ void StatusMessage::save()
{ {
rsMsgs->setCustomStateString(ui.txt_StatusMessage->text().toUtf8().constData()); rsMsgs->setCustomStateString(ui.txt_StatusMessage->text().toUtf8().constData());
close(); accept();
} }
/** Loads the settings for this page */
void StatusMessage::load()
{
ui.txt_StatusMessage->setText(QString::fromUtf8(rsMsgs->getCustomStateString().c_str()));
}

View File

@ -19,7 +19,6 @@
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
****************************************************************/ ****************************************************************/
#ifndef _STATUSMESSAGE_H #ifndef _STATUSMESSAGE_H
#define _STATUSMESSAGE_H #define _STATUSMESSAGE_H
@ -33,21 +32,16 @@ class StatusMessage : public QDialog
public: public:
/** Default constructor */ /** Default constructor */
StatusMessage(QWidget *parent = 0, Qt::WFlags flags = 0); StatusMessage(QWidget *parent = 0);
/** Default destructor */
~StatusMessage();
private slots: private slots:
/** Saves the changes on this page */ /** Saves the changes on this page */
void save(); void save();
/** Loads the settings for this page */
void load();
private: private:
/** Qt Designer generated object */ /** Qt Designer generated object */
Ui::StatusMessage ui; Ui::StatusMessage ui;
}; };
#endif #endif

View File

@ -42,14 +42,13 @@
#define IMAGE_GENERAL ":/images/kcmsystem24.png" #define IMAGE_GENERAL ":/images/kcmsystem24.png"
#include "rsettingswin.h" #include "rsettingswin.h"
RSettingsWin *RSettingsWin::_instance = NULL; RSettingsWin *RSettingsWin::_instance = NULL;
int RSettingsWin::lastPage = 0; int RSettingsWin::lastPage = 0;
RSettingsWin::RSettingsWin(QWidget * parent, Qt::WFlags flags) RSettingsWin::RSettingsWin(QWidget *parent)
: QDialog(parent, flags) : QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint)
{ {
setupUi(this); setupUi(this);
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);

View File

@ -38,7 +38,7 @@ public:
static void postModDirectories(bool update_local); static void postModDirectories(bool update_local);
protected: protected:
RSettingsWin(QWidget * parent = 0, Qt::WFlags flags = 0); RSettingsWin(QWidget *parent = 0);
~RSettingsWin(); ~RSettingsWin();
void addPage(ConfigPage*) ; void addPage(ConfigPage*) ;

View File

@ -28,7 +28,8 @@
#include "gui/style/RSStyle.h" #include "gui/style/RSStyle.h"
/** Default constructor */ /** Default constructor */
StyleDialog::StyleDialog(RSStyle &style, QWidget *parent, Qt::WFlags flags) : QDialog(parent, flags) StyleDialog::StyleDialog(RSStyle &style, QWidget *parent)
: QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint)
{ {
/* Invoke Qt Designer generated QObject setup routine */ /* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this); ui.setupUi(this);
@ -42,9 +43,7 @@ StyleDialog::StyleDialog(RSStyle &style, QWidget *parent, Qt::WFlags flags) : QD
restoreGeometry(geometry); restoreGeometry(geometry);
} }
// setWindowIcon(QIcon(":/images/rstray3.png")); connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(onOK()));
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(reject())); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
connect(ui.color1Button, SIGNAL(clicked()), this, SLOT(chooseColor())); connect(ui.color1Button, SIGNAL(clicked()), this, SLOT(chooseColor()));
@ -88,11 +87,6 @@ StyleDialog::~StyleDialog()
Settings->setValueToGroup("StyleDialog", "Geometry", saveGeometry()); Settings->setValueToGroup("StyleDialog", "Geometry", saveGeometry());
} }
void StyleDialog::onOK()
{
accept();
}
int StyleDialog::neededColors() int StyleDialog::neededColors()
{ {
return RSStyle::neededColors((RSStyle::StyleType) ui.styleComboBox->itemData(ui.styleComboBox->currentIndex()).toInt()); return RSStyle::neededColors((RSStyle::StyleType) ui.styleComboBox->itemData(ui.styleComboBox->currentIndex()).toInt());

View File

@ -36,14 +36,13 @@ class StyleDialog : public QDialog
public: public:
/** Default constructor */ /** Default constructor */
StyleDialog(RSStyle &style, QWidget *parent = 0, Qt::WFlags flags = 0); StyleDialog(RSStyle &style, QWidget *parent = 0);
/** Default destructor */ /** Default destructor */
~StyleDialog(); ~StyleDialog();
void getStyle(RSStyle &style); void getStyle(RSStyle &style);
private slots: private slots:
void onOK();
void chooseColor(); void chooseColor();
void showButtons(); void showButtons();