Little design improvements for Plugin Item

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4749 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2012-01-04 22:17:28 +00:00
parent 3ac5ead40e
commit f6678263f9
4 changed files with 145 additions and 142 deletions

View file

@ -37,6 +37,9 @@ PluginItem::PluginItem(int id, const QString& pluginTitle,const QString& pluginD
QObject::connect(_enabled_CB,SIGNAL(toggled(bool)),this,SLOT(togglePlugin(bool))) ; QObject::connect(_enabled_CB,SIGNAL(toggled(bool)),this,SLOT(togglePlugin(bool))) ;
QObject::connect(_configure_PB,SIGNAL(clicked()),this,SLOT(configurePlugin())) ; QObject::connect(_configure_PB,SIGNAL(clicked()),this,SLOT(configurePlugin())) ;
expandFrame->hide();
} }
void PluginItem::togglePlugin(bool b) void PluginItem::togglePlugin(bool b)
@ -49,4 +52,8 @@ void PluginItem::configurePlugin()
emit( pluginConfigure(_id) ) ; emit( pluginConfigure(_id) ) ;
} }
void PluginItem::on_moreinfo_label_linkActivated(QString)
{
expandFrame->show();
}

View file

@ -38,8 +38,12 @@ class PluginItem: public QWidget, public Ui::PluginItem
void pluginEnabled(bool,const QString&) ; void pluginEnabled(bool,const QString&) ;
void pluginConfigure(int) ; void pluginConfigure(int) ;
private slots:
void on_moreinfo_label_linkActivated(QString link);
private: private:
int _id ; int _id ;
}; };

View file

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>519</width> <width>416</width>
<height>185</height> <height>175</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_7"> <layout class="QVBoxLayout" name="verticalLayout_7">
@ -23,9 +23,9 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">QFrame#frame{border: 2px solid green; <string notr="true">QFrame#frame{border: 2px solid #A8B8D1;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #62E0B1, stop: 1 #8EFFD3); stop: 0 #FCFDFE, stop: 1 #E2E8EF);
border-radius: 0px}</string> border-radius: 0px}</string>
</property> </property>
<property name="frameShape"> <property name="frameShape">
@ -76,19 +76,6 @@ border-radius: 0px}</string>
</property> </property>
</widget> </widget>
</item> </item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</item> </item>
<item> <item>
@ -117,90 +104,73 @@ border-radius: 0px}</string>
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_4">
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_3"> <widget class="QLabel" name="msgLabel">
<item> <property name="sizePolicy">
<widget class="QLabel" name="label_2"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<property name="text"> <horstretch>0</horstretch>
<string>Status: </string> <verstretch>0</verstretch>
</property> </sizepolicy>
</widget> </property>
</item> <property name="text">
<item> <string notr="true">Long
<widget class="QLabel" name="label"> message here</string>
<property name="text"> </property>
<string>File hash:</string> <property name="wordWrap">
</property> <bool>true</bool>
</widget> </property>
</item> <property name="openExternalLinks">
<item> <bool>true</bool>
<widget class="QLabel" name="label_5"> </property>
<property name="text"> </widget>
<string>File name: </string>
</property>
</widget>
</item>
</layout>
</item> </item>
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_2"> <widget class="QLabel" name="moreinfo_label">
<item> <property name="text">
<widget class="QLabel" name="_statusLabel"> <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;
<property name="sizePolicy"> &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;
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> p, li { white-space: pre-wrap; }
<horstretch>0</horstretch> &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;
<verstretch>0</verstretch> &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;more&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;more...&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</sizepolicy> </property>
</property> </widget>
<property name="text"> </item>
<string notr="true">TextLabel</string> <item>
</property> <spacer name="horizontalSpacer">
</widget> <property name="orientation">
</item> <enum>Qt::Horizontal</enum>
<item> </property>
<widget class="QLabel" name="_hashLabel"> <property name="sizeHint" stdset="0">
<property name="sizePolicy"> <size>
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> <width>40</width>
<horstretch>0</horstretch> <height>20</height>
<verstretch>0</verstretch> </size>
</sizepolicy> </property>
</property> </spacer>
<property name="text"> </item>
<string notr="true">TextLabel</string> <item>
</property> <widget class="QCheckBox" name="_enabled_CB">
</widget> <property name="toolTip">
</item> <string>Add the plugin into the white list of accepted plugins. This will be effective after you restart RetroShare, since plugins need to be loaded at startup.</string>
<item> </property>
<widget class="QLabel" name="_name_LE"> <property name="text">
<property name="sizePolicy"> <string>Enabled</string>
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> </property>
<horstretch>0</horstretch> </widget>
<verstretch>0</verstretch> </item>
</sizepolicy> <item>
</property> <widget class="QPushButton" name="_configure_PB">
<property name="text"> <property name="toolTip">
<string notr="true">TextLabel</string> <string>Launch configuration panel, if provided by the plugin</string>
</property> </property>
</widget> <property name="text">
</item> <string>Configure</string>
</layout> </property>
</widget>
</item> </item>
</layout> </layout>
</item> </item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</item> </item>
</layout> </layout>
@ -215,9 +185,16 @@ border-radius: 0px}</string>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QVBoxLayout" name="_2"> <layout class="QGridLayout" name="gridLayout">
<item> <item row="1" column="0">
<widget class="QLabel" name="msgLabel"> <widget class="QLabel" name="label_5">
<property name="text">
<string>File name: </string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QLabel" name="_name_LE">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -225,44 +202,53 @@ border-radius: 0px}</string>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string notr="true">Long <string notr="true">TextLabel</string>
message here</string>
</property> </property>
<property name="wordWrap"> </widget>
<bool>true</bool> </item>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>File hash:</string>
</property> </property>
<property name="openExternalLinks"> </widget>
<bool>true</bool> </item>
<item row="2" column="1" colspan="2">
<widget class="QLabel" name="_hashLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string notr="true">TextLabel</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Status: </string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="_statusLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string notr="true">TextLabel</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
</item> </item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QPushButton" name="_configure_PB">
<property name="toolTip">
<string>Launch configuration panel, if provided by the plugin</string>
</property>
<property name="text">
<string>Configure</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="_enabled_CB">
<property name="toolTip">
<string>Add the plugin into the white list of accepted plugins. This will be effective after you restart RetroShare, since plugins need to be loaded at startup.</string>
</property>
<property name="text">
<string>Enabled</string>
</property>
</widget>
</item>
</layout>
</item>
</layout> </layout>
</item> </item>
</layout> </layout>

View file

@ -519,23 +519,29 @@
<string>Loaded plugins</string> <string>Loaded plugins</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_4"> <layout class="QVBoxLayout" name="verticalLayout_4">
<property name="margin">
<number>6</number>
</property>
<item> <item>
<layout class="QVBoxLayout" name="_pluginsLayout"> <layout class="QVBoxLayout" name="_pluginsLayout">
<item> <property name="spacing">
<spacer name="verticalSpacer_2"> <number>0</number>
<property name="orientation"> </property>
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</item> </item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
@ -546,7 +552,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0"> <item row="3" column="0">
<widget class="QGroupBox" name="groupBox_2"> <widget class="QGroupBox" name="groupBox_2">
<property name="title"> <property name="title">
<string>Plugin look-up directories</string> <string>Plugin look-up directories</string>