mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-16 13:02:27 -04:00
Changed help buttons from QPushButton to QToolButton to use auto raise effect.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6647 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
7be951eebf
commit
0051782aef
9 changed files with 49 additions and 91 deletions
|
@ -76,15 +76,9 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="helpButton">
|
<widget class="QToolButton" name="helpButton">
|
||||||
<property name="sizePolicy">
|
<property name="focusPolicy">
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
<enum>Qt::NoFocus</enum>
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="images.qrc">
|
<iconset resource="images.qrc">
|
||||||
|
@ -93,7 +87,7 @@
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="flat">
|
<property name="autoRaise">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -70,15 +70,9 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="helpButton">
|
<widget class="QToolButton" name="helpButton">
|
||||||
<property name="sizePolicy">
|
<property name="focusPolicy">
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
<enum>Qt::NoFocus</enum>
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="images.qrc">
|
<iconset resource="images.qrc">
|
||||||
|
@ -87,7 +81,7 @@
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="flat">
|
<property name="autoRaise">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -70,15 +70,9 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="helpButton">
|
<widget class="QToolButton" name="helpButton">
|
||||||
<property name="sizePolicy">
|
<property name="focusPolicy">
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
<enum>Qt::NoFocus</enum>
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../images.qrc">
|
<iconset resource="../images.qrc">
|
||||||
|
@ -87,7 +81,7 @@
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="flat">
|
<property name="autoRaise">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -76,15 +76,9 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="helpButton">
|
<widget class="QToolButton" name="helpButton">
|
||||||
<property name="sizePolicy">
|
<property name="focusPolicy">
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
<enum>Qt::NoFocus</enum>
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="images.qrc">
|
<iconset resource="images.qrc">
|
||||||
|
@ -93,7 +87,7 @@
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="flat">
|
<property name="autoRaise">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -67,15 +67,9 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="helpButton">
|
<widget class="QToolButton" name="helpButton">
|
||||||
<property name="sizePolicy">
|
<property name="focusPolicy">
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
<enum>Qt::NoFocus</enum>
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="images.qrc">
|
<iconset resource="images.qrc">
|
||||||
|
@ -84,7 +78,7 @@
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="flat">
|
<property name="autoRaise">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <retroshare-gui/mainpage.h>
|
#include <retroshare-gui/mainpage.h>
|
||||||
#include <QGraphicsBlurEffect>
|
#include <QGraphicsBlurEffect>
|
||||||
#include <QPushButton>
|
#include <QAbstractButton>
|
||||||
#include <QGraphicsDropShadowEffect>
|
#include <QGraphicsDropShadowEffect>
|
||||||
|
|
||||||
MainPage::MainPage(QWidget *parent , Qt::WindowFlags flags ) : QWidget(parent, flags)
|
MainPage::MainPage(QWidget *parent , Qt::WindowFlags flags ) : QWidget(parent, flags)
|
||||||
|
@ -12,19 +12,19 @@ MainPage::MainPage(QWidget *parent , Qt::WindowFlags flags ) : QWidget(parent, f
|
||||||
class MyTextBrowser: public QTextBrowser
|
class MyTextBrowser: public QTextBrowser
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MyTextBrowser(QWidget *parent,QPushButton *bt)
|
MyTextBrowser(QWidget *parent,QAbstractButton *bt)
|
||||||
: QTextBrowser(parent),button(bt)
|
: QTextBrowser(parent),button(bt)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void mousePressEvent ( QMouseEvent * e )
|
virtual void mousePressEvent ( QMouseEvent* )
|
||||||
{
|
{
|
||||||
hide() ;
|
hide() ;
|
||||||
button->setChecked(false) ;
|
button->setChecked(false) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QPushButton *button ;
|
QAbstractButton *button ;
|
||||||
};
|
};
|
||||||
|
|
||||||
void MainPage::showHelp(bool b)
|
void MainPage::showHelp(bool b)
|
||||||
|
@ -40,7 +40,7 @@ void MainPage::showHelp(bool b)
|
||||||
help_browser->hide() ;
|
help_browser->hide() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainPage::registerHelpButton(QPushButton *button,const QString& help_html_txt)
|
void MainPage::registerHelpButton(QAbstractButton *button,const QString& help_html_txt)
|
||||||
{
|
{
|
||||||
if(help_browser == NULL)
|
if(help_browser == NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -292,29 +292,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="13">
|
|
||||||
<widget class="QPushButton" name="helpButton">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="images.qrc">
|
|
||||||
<normaloff>:/images/64px_help.png</normaloff>:/images/64px_help.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="3">
|
<item row="0" column="3">
|
||||||
<widget class="Line" name="line">
|
<widget class="Line" name="line">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -451,6 +428,23 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="13">
|
||||||
|
<widget class="QToolButton" name="helpButton">
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="images.qrc">
|
||||||
|
<normaloff>:/images/64px_help.png</normaloff>:/images/64px_help.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="autoRaise">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -819,7 +813,7 @@
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>LineEditClear</class>
|
<class>LineEditClear</class>
|
||||||
<extends>QLineEdit</extends>
|
<extends>QLineEdit</extends>
|
||||||
<header>gui/common/LineEditClear.h</header>
|
<header location="global">gui/common/LineEditClear.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>RSTabWidget</class>
|
<class>RSTabWidget</class>
|
||||||
|
|
|
@ -93,15 +93,9 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="helpButton">
|
<widget class="QToolButton" name="helpButton">
|
||||||
<property name="sizePolicy">
|
<property name="focusPolicy">
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
<enum>Qt::NoFocus</enum>
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="images.qrc">
|
<iconset resource="images.qrc">
|
||||||
|
@ -110,7 +104,7 @@
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="flat">
|
<property name="autoRaise">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include <QTextBrowser>
|
#include <QTextBrowser>
|
||||||
|
|
||||||
class UserNotify;
|
class UserNotify;
|
||||||
class QPushButton ;
|
class QAbstractButton ;
|
||||||
|
|
||||||
class MainPage : public QWidget
|
class MainPage : public QWidget
|
||||||
{
|
{
|
||||||
|
@ -43,7 +43,7 @@ class MainPage : public QWidget
|
||||||
// Overload this to add some help info to the page. The way the info is
|
// Overload this to add some help info to the page. The way the info is
|
||||||
// shown is handled by showHelp() below;
|
// shown is handled by showHelp() below;
|
||||||
//
|
//
|
||||||
void registerHelpButton(QPushButton *button, const QString& help_html_text) ;
|
void registerHelpButton(QAbstractButton *button, const QString& help_html_text) ;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void showHelp(bool b) ;
|
void showHelp(bool b) ;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue