Changed the standard dialog buttons from single buttons to buttonbox to have a standard layout and a standard translation.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5657 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-10-10 10:51:53 +00:00
parent e10ce3ff35
commit b67f9f88fe
39 changed files with 110 additions and 671 deletions

View File

@ -23,7 +23,7 @@
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tabgeneral">
<widget class="QWidget" name="tabGeneral">
<attribute name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/fileinfo.png</normaloff>:/images/fileinfo.png</iconset>
@ -352,7 +352,7 @@
</item>
</layout>
</widget>
<widget class="QWidget">
<widget class="QWidget" name="tabComments">
<attribute name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/filecomments.png</normaloff>:/images/filecomments.png</iconset>
@ -366,7 +366,7 @@
</item>
</layout>
</widget>
<widget class="QWidget">
<widget class="QWidget" name="tabLinks">
<attribute name="title">
<string>retroshare link(s)</string>
</attribute>
@ -407,33 +407,10 @@
</widget>
</widget>
</item>
<item row="1" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>321</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="ok_dButton">
<property name="text">
<string>OK</string>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="cancel_dButton">
<property name="text">
<string>Cancel</string>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
</widget>
</item>
@ -442,5 +419,22 @@
<resources>
<include location="images.qrc"/>
</resources>
<connections/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>DetailsDialog</receiver>
<slot>close()</slot>
<hints>
<hint type="sourcelabel">
<x>262</x>
<y>456</y>
</hint>
<hint type="destinationlabel">
<x>262</x>
<y>238</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -43,10 +43,7 @@ ChannelDetails::ChannelDetails(QWidget *parent, Qt::WFlags flags)
/* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this);
connect(ui.applyButton, SIGNAL(clicked()), this, SLOT(applyDialog()));
connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(closeinfodlg()));
ui.applyButton->setToolTip(tr("Close"));
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
ui.nameline ->setReadOnly(true);
ui.popline ->setReadOnly(true);
@ -79,11 +76,6 @@ void ChannelDetails::closeEvent (QCloseEvent * event)
QWidget::closeEvent(event);
}
void ChannelDetails::closeinfodlg()
{
close();
}
void ChannelDetails::showDetails(std::string mChannelId)
{
cId = mChannelId;
@ -137,17 +129,3 @@ void ChannelDetails::loadChannel()
}
}
void ChannelDetails::applyDialog()
{
/* reload now */
loadChannel();
/* close the Dialog after the Changes applied */
closeinfodlg();
}

View File

@ -48,14 +48,7 @@ public slots:
protected:
void closeEvent (QCloseEvent * event);
private slots:
void closeinfodlg();
void applyDialog();
private:
void loadChannel();
std::string cId;

View File

@ -131,35 +131,9 @@
<item row="1" column="0">
<layout class="QGridLayout" name="_2">
<item row="0" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>311</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="applyButton">
<property name="text">
<string>OK</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="default">
<bool>true</bool>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
</widget>
</item>

View File

@ -44,8 +44,8 @@ CreateChannel::CreateChannel(QWidget *parent)
picture = NULL;
// connect up the buttons.
connect( ui.cancelButton, SIGNAL( clicked ( bool ) ), this, SLOT( cancelChannel( ) ) );
connect( ui.createButton, SIGNAL( clicked ( bool ) ), this, SLOT( createChannel( ) ) );
connect( ui.buttonBox, SIGNAL(accepted()), this, SLOT(createChannel()));
connect( ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
connect( ui.logoButton, SIGNAL(clicked() ), this , SLOT(addChannelLogo()));
connect( ui.pubKeyShare_cb, SIGNAL( clicked() ), this, SLOT( setShareList( ) ));
@ -134,11 +134,6 @@ void CreateChannel::createChannel()
close();
}
void CreateChannel::cancelChannel()
{
close();
}
void CreateChannel::addChannelLogo() // the same function as in EditChanDetails
{
QPixmap img = misc::getOpenThumbnailedPicture(this, tr("Load channel logo"), 64, 64);

View File

@ -36,7 +36,6 @@ public:
private slots:
/* actions to take.... */
void createChannel();
void cancelChannel();
void addChannelLogo();
void setShareList();

View File

@ -337,32 +337,9 @@
<item row="6" column="0" colspan="2">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>238</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="createButton">
<property name="text">
<string>Create</string>
</property>
<property name="default">
<bool>true</bool>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>

View File

@ -40,8 +40,8 @@ EditChanDetails::EditChanDetails(QWidget *parent, Qt::WFlags flags, std::string
/* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this);
connect(ui.applyButton, SIGNAL(clicked()), this, SLOT(applyDialog()));
connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(closeinfodlg()));
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(applyDialog()));
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
connect( ui.logoButton, SIGNAL(clicked() ), this , SLOT(addChannelLogo()));
@ -51,11 +51,6 @@ EditChanDetails::EditChanDetails(QWidget *parent, Qt::WFlags flags, std::string
loadChannel();
}
void EditChanDetails::closeinfodlg()
{
close();
}
void EditChanDetails::loadChannel()
{
if (!rsChannels)
@ -104,7 +99,7 @@ void EditChanDetails::applyDialog()
rsChannels->channelEditInfo(mChannelId, ci);
/* close the Dialog after the Changes applied */
closeinfodlg();
close();
return;
}

View File

@ -39,7 +39,6 @@ signals:
void configChanged();
private slots:
void closeinfodlg();
void applyDialog();
void addChannelLogo();

View File

@ -21,35 +21,9 @@
<item row="1" column="0">
<layout class="QGridLayout" name="_2">
<item row="0" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>311</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="applyButton">
<property name="text">
<string>OK</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="default">
<bool>true</bool>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>

View File

@ -39,8 +39,8 @@ ShareKey::ShareKey(QWidget *parent, Qt::WFlags flags, std::string grpId, int grp
ui->headerFrame->setHeaderImage(QPixmap(":/images/user/agt_forum64.png"));
ui->headerFrame->setHeaderText(tr("Share Channel"));
connect( ui->shareButton, SIGNAL( clicked ( bool ) ), this, SLOT( shareKey( ) ) );
connect( ui->cancelButton, SIGNAL( clicked ( bool ) ), this, SLOT( cancel( ) ) );
connect( ui->buttonBox, SIGNAL(accepted()), this, SLOT(shareKey()));
connect( ui->buttonBox, SIGNAL(rejected()), this, SLOT(close()));
/* initialize key share list */
ui->keyShareList->setHeaderText(tr("Contacts:"));
@ -99,8 +99,3 @@ void ShareKey::shareKey()
close();
}
void ShareKey::cancel()
{
close();
}

View File

@ -24,7 +24,6 @@ protected:
private slots:
void shareKey();
void cancel();
private:
std::string mGrpId;

View File

@ -125,29 +125,9 @@
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="shareButton">
<property name="text">
<string>Share</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>

View File

@ -22,6 +22,7 @@
#include "CreateLobbyDialog.h"
#include <QMessageBox>
#include <QPushButton>
#include <algorithm>
#include <retroshare/rsmsgs.h>
@ -48,8 +49,8 @@ CreateLobbyDialog::CreateLobbyDialog(const std::list<std::string>& peer_list, in
#endif
ui->nickName_LE->setText(QString::fromUtf8(default_nick.c_str())) ;
connect( ui->shareButton, SIGNAL( clicked ( bool ) ), this, SLOT( createLobby( ) ) );
connect( ui->cancelButton, SIGNAL( clicked ( bool ) ), this, SLOT( cancel( ) ) );
connect( ui->buttonBox, SIGNAL(accepted()), this, SLOT(createLobby()));
connect( ui->buttonBox, SIGNAL(rejected()), this, SLOT(close()));
connect( ui->lobbyName_LE, SIGNAL( textChanged ( QString ) ), this, SLOT( checkTextFields( ) ) );
connect( ui->lobbyTopic_LE, SIGNAL( textChanged ( QString ) ), this, SLOT( checkTextFields( ) ) );
connect( ui->nickName_LE, SIGNAL( textChanged ( QString ) ), this, SLOT( checkTextFields( ) ) );
@ -89,9 +90,9 @@ void CreateLobbyDialog::changeEvent(QEvent *e)
void CreateLobbyDialog::checkTextFields()
{
if(ui->lobbyName_LE->text() == "" || ui->nickName_LE->text() == "")
ui->shareButton->setEnabled(false) ;
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false) ;
else
ui->shareButton->setEnabled(true) ;
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true) ;
}
void CreateLobbyDialog::createLobby()
@ -128,8 +129,3 @@ void CreateLobbyDialog::createLobby()
close();
}
void CreateLobbyDialog::cancel()
{
close();
}

View File

@ -24,7 +24,6 @@ private:
private slots:
void createLobby();
void checkTextFields();
void cancel();
};
#endif // CREATELOBBYDIALOG_H

View File

@ -239,29 +239,9 @@
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="shareButton">
<property name="text">
<string>Create</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>

View File

@ -73,8 +73,8 @@ ConfCertDialog::ConfCertDialog(const std::string& id, QWidget *parent, Qt::WFlag
setAttribute(Qt::WA_DeleteOnClose, true);
connect(ui.applyButton, SIGNAL(clicked()), this, SLOT(applyDialog()));
connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(close()));
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(applyDialog()));
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
connect(ui.make_friend_button, SIGNAL(clicked()), this, SLOT(makeFriend()));
connect(ui.denyFriendButton, SIGNAL(clicked()), this, SLOT(denyFriend()));
connect(ui.signKeyButton, SIGNAL(clicked()), this, SLOT(signGPGKey()));

View File

@ -49,38 +49,9 @@
<item row="1" column="0">
<layout class="QGridLayout" name="_12">
<item row="0" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>311</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="applyButton">
<property name="toolTip">
<string>Apply and Close</string>
</property>
<property name="text">
<string>OK</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
@ -775,18 +746,18 @@ p, li { white-space: pre-wrap; }
</layout>
</widget>
<customwidgets>
<customwidget>
<class>AvatarWidget</class>
<extends>QLabel</extends>
<header>gui/common/AvatarWidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>HeaderFrame</class>
<extends>QFrame</extends>
<header>gui/common/HeaderFrame.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>AvatarWidget</class>
<extends>QLabel</extends>
<header>gui/common/AvatarWidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>LinkTextBrowser</class>
<extends>QTextBrowser</extends>

View File

@ -41,8 +41,8 @@ CreateForum::CreateForum(QWidget *parent)
ui.headerFrame->setHeaderText(tr("New Forum"));
// connect up the buttons.
connect( ui.cancelButton, SIGNAL( clicked ( bool ) ), this, SLOT( cancelForum( ) ) );
connect( ui.createButton, SIGNAL( clicked ( bool ) ), this, SLOT( createForum( ) ) );
connect( ui.buttonBox, SIGNAL(accepted()), this, SLOT(createForum()));
connect( ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
connect( ui.pubKeyShare_cb, SIGNAL( clicked() ), this, SLOT( setShareList( ) ));
if (!ui.pubKeyShare_cb->isChecked()) {
@ -129,8 +129,3 @@ void CreateForum::setShareList()
this->resize(this->size().width() - ui.contactsdockWidget->size().width(), this->size().height());
}
}
void CreateForum::cancelForum()
{
close();
}

View File

@ -37,7 +37,6 @@ public:
private slots:
/* actions to take.... */
void createForum();
void cancelForum();
// set private forum key share list
void setShareList();

View File

@ -280,35 +280,9 @@
<item row="5" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>238</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="createButton">
<property name="text">
<string>Create</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<property name="default">
<bool>false</bool>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>

View File

@ -37,7 +37,8 @@ EditForumDetails::EditForumDetails(std::string forumId, QWidget *parent, Qt::WFl
/* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this);
connect(ui.applyButton, SIGNAL(clicked()), this, SLOT(applyDialog()));
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(applyDialog()));
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
loadForum();
}

View File

@ -21,35 +21,9 @@
<item row="1" column="0">
<layout class="QGridLayout" name="_2">
<item row="0" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>311</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="applyButton">
<property name="text">
<string>OK</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="default">
<bool>true</bool>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
@ -109,22 +83,5 @@
<resources>
<include location="../images.qrc"/>
</resources>
<connections>
<connection>
<sender>cancelButton</sender>
<signal>clicked()</signal>
<receiver>EditForumDetails</receiver>
<slot>close()</slot>
<hints>
<hint type="sourcelabel">
<x>307</x>
<y>333</y>
</hint>
<hint type="destinationlabel">
<x>217</x>
<y>177</y>
</hint>
</hints>
</connection>
</connections>
<connections/>
</ui>

View File

@ -43,10 +43,7 @@ ForumDetails::ForumDetails(QWidget *parent, Qt::WFlags flags)
/* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this);
connect(ui.applyButton, SIGNAL(clicked()), this, SLOT(applyDialog()));
connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(closeinfodlg()));
ui.applyButton->setToolTip(tr("Apply and Close"));
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
ui.nameline ->setReadOnly(true);
ui.popline ->setReadOnly(true);
@ -77,11 +74,6 @@ void ForumDetails::closeEvent (QCloseEvent * event)
QWidget::closeEvent(event);
}
void ForumDetails::closeinfodlg()
{
close();
}
void ForumDetails::showDetails(std::string mCurrForumId)
{
fId = mCurrForumId;
@ -129,14 +121,3 @@ void ForumDetails::loadDialog()
ui.radioButton_anonymous->setChecked(true);
}
}
void ForumDetails::applyDialog()
{
/* reload now */
loadDialog();
/* close the Dialog after the Changes applied */
closeinfodlg();
}

View File

@ -48,13 +48,7 @@ public slots:
protected:
void closeEvent (QCloseEvent * event);
private slots:
void closeinfodlg();
void applyDialog();
private:
void loadDialog();
std::string fId;

View File

@ -158,35 +158,9 @@
<item row="1" column="0">
<layout class="QGridLayout">
<item row="0" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>311</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="applyButton">
<property name="text">
<string>OK</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="default">
<bool>true</bool>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
</widget>
</item>

View File

@ -48,8 +48,8 @@ CreateForumV2::CreateForumV2(QWidget *parent)
mForumQueue = new TokenQueue(rsForumsV2, this);
// connect up the buttons.
connect( ui.cancelButton, SIGNAL( clicked ( bool ) ), this, SLOT( cancelForum( ) ) );
connect( ui.createButton, SIGNAL( clicked ( bool ) ), this, SLOT( createForum( ) ) );
connect( ui.buttonBox, SIGNAL(accepted()), this, SLOT(createForum()));
connect( ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
connect( ui.pubKeyShare_cb, SIGNAL( clicked() ), this, SLOT( setShareList( ) ));
if (!ui.pubKeyShare_cb->isChecked()) {
@ -172,14 +172,6 @@ void CreateForumV2::setShareList()
}
}
void CreateForumV2::cancelForum()
{
close();
}
void CreateForumV2::loadNewForumId(const uint32_t &token)
{
std::cerr << "CreateForumV2::loadNewForumId()";

View File

@ -42,7 +42,6 @@ virtual void loadRequest(const TokenQueue *queue, const TokenRequest &req);
private slots:
/* actions to take.... */
void createForum();
void cancelForum();
// set private forum key share list
void setShareList();

View File

@ -271,33 +271,10 @@
</layout>
</widget>
</item>
<item row="5" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>238</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="1">
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QPushButton" name="createButton">
<property name="text">
<string>Create</string>
</property>
<property name="default">
<bool>true</bool>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>

View File

@ -37,7 +37,8 @@ EditForumV2Details::EditForumV2Details(std::string forumId, QWidget *parent, Qt:
/* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this);
connect(ui.applyButton, SIGNAL(clicked()), this, SLOT(applyDialog()));
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(applyDialog()));
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
loadForum();
}

View File

@ -21,35 +21,9 @@
<item row="1" column="0">
<layout class="QGridLayout" name="_2">
<item row="0" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>311</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="applyButton">
<property name="text">
<string>OK</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="default">
<bool>true</bool>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
@ -109,22 +83,5 @@
<resources>
<include location="../images.qrc"/>
</resources>
<connections>
<connection>
<sender>cancelButton</sender>
<signal>clicked()</signal>
<receiver>EditForumDetails</receiver>
<slot>close()</slot>
<hints>
<hint type="sourcelabel">
<x>307</x>
<y>333</y>
</hint>
<hint type="destinationlabel">
<x>217</x>
<y>177</y>
</hint>
</hints>
</connection>
</connections>
<connections/>
</ui>

View File

@ -43,10 +43,7 @@ ForumV2Details::ForumV2Details(QWidget *parent, Qt::WFlags flags)
/* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this);
connect(ui.applyButton, SIGNAL(clicked()), this, SLOT(applyDialog()));
connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(closeinfodlg()));
ui.applyButton->setToolTip(tr("Apply and Close"));
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
ui.nameline ->setReadOnly(true);
ui.popline ->setReadOnly(true);
@ -77,11 +74,6 @@ void ForumV2Details::closeEvent (QCloseEvent * event)
QWidget::closeEvent(event);
}
void ForumV2Details::closeinfodlg()
{
close();
}
void ForumV2Details::showDetails(std::string mCurrForumId)
{
fId = mCurrForumId;
@ -133,14 +125,3 @@ void ForumV2Details::loadDialog()
#endif
}
void ForumV2Details::applyDialog()
{
/* reload now */
loadDialog();
/* close the Dialog after the Changes applied */
closeinfodlg();
}

View File

@ -48,13 +48,7 @@ public slots:
protected:
void closeEvent (QCloseEvent * event);
private slots:
void closeinfodlg();
void applyDialog();
private:
void loadDialog();
std::string fId;

View File

@ -158,35 +158,9 @@
<item row="1" column="0">
<layout class="QGridLayout">
<item row="0" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>311</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="applyButton">
<property name="text">
<string>OK</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="default">
<bool>true</bool>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
</widget>
</item>

View File

@ -152,27 +152,8 @@
<property name="topMargin">
<number>6</number>
</property>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>404</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
@ -198,17 +179,17 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>LineEditClear</class>
<extends>QLineEdit</extends>
<header>gui/common/LineEditClear.h</header>
</customwidget>
<customwidget>
<class>HeaderFrame</class>
<extends>QFrame</extends>
<header>gui/common/HeaderFrame.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>LineEditClear</class>
<extends>QLineEdit</extends>
<header>gui/common/LineEditClear.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../images.qrc"/>

View File

@ -39,8 +39,8 @@ StatusMessage::StatusMessage(QWidget *parent, Qt::WFlags flags)
/* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this);
connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(close()));
connect(ui.okButton, SIGNAL(clicked()), this, SLOT(save()));
connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(save()));
connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(close()));
load();

View File

@ -152,33 +152,17 @@ border: 1px solid #CCCCCC;}
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<widget class="QPushButton" name="okButton">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="geometry">
<rect>
<x>220</x>
<y>180</y>
<width>75</width>
<width>156</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>OK</string>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
<widget class="QPushButton" name="cancelButton">
<property name="geometry">
<rect>
<x>300</x>
<y>180</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Cancel</string>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</widget>
@ -190,13 +174,6 @@ border: 1px solid #CCCCCC;}
</widget>
<resources>
<include location="../images.qrc"/>
<include location="../images.qrc"/>
<include location="../images.qrc"/>
<include location="../images.qrc"/>
<include location="../images.qrc"/>
<include location="../images.qrc"/>
<include location="../images.qrc"/>
<include location="../images.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -58,7 +58,8 @@ RSettingsWin::RSettingsWin(QWidget * parent, Qt::WFlags flags)
initStackedWidget();
connect(listWidget, SIGNAL(currentRowChanged(int)), this, SLOT(setNewPage(int)));
connect(applyButton, SIGNAL(clicked( bool )), this, SLOT( saveChanges()) );
connect(buttonBox, SIGNAL(accepted()), this, SLOT(saveChanges()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(close()));
connect(this, SIGNAL(finished(int)), this, SLOT(dialogFinished(int)));
}

View File

@ -157,44 +157,9 @@
<number>0</number>
</property>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>312</width>
<height>31</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="canceButton">
<property name="minimumSize">
<size>
<width>0</width>
<height>22</height>
</size>
</property>
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="applyButton">
<property name="minimumSize">
<size>
<width>0</width>
<height>22</height>
</size>
</property>
<property name="text">
<string>OK</string>
</property>
<property name="default">
<bool>true</bool>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
@ -205,38 +170,5 @@
<resources>
<include location="../images.qrc"/>
</resources>
<connections>
<connection>
<sender>applyButton</sender>
<signal>clicked()</signal>
<receiver>Settings</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>278</x>
<y>253</y>
</hint>
<hint type="destinationlabel">
<x>96</x>
<y>254</y>
</hint>
</hints>
</connection>
<connection>
<sender>canceButton</sender>
<signal>clicked()</signal>
<receiver>Settings</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>369</x>
<y>253</y>
</hint>
<hint type="destinationlabel">
<x>179</x>
<y>282</y>
</hint>
</hints>
</connection>
</connections>
<connections/>
</ui>