small touches to the backend choosing dialog:

- improves the text, getting rid of the wordwrap for the label
- delete the widget class when no more needed

svn path=/trunk/playground/graphics/okular/; revision=648131
This commit is contained in:
Pino Toscano 2007-03-30 15:35:01 +00:00
parent 5deae607aa
commit 0861c3286f
3 changed files with 22 additions and 30 deletions

View File

@ -30,10 +30,16 @@ ChooseEngineDialog::ChooseEngineDialog( const QStringList &generators, const KMi
m_widget->engineList->addItems(generators);
m_widget->description->setText(
i18n( "More than one backend found for mimetype \"%1\" (%2).\n"
i18n( "More than one backend found for the MIME type:<br>"
"<b>%1</b> (%2).<br><br>"
"Please select which one to use:", mime->comment(), mime->name() ) );
}
ChooseEngineDialog::~ChooseEngineDialog()
{
delete m_widget;
}
int ChooseEngineDialog::selectedGenerator() const
{
return m_widget->engineList->currentIndex();

View File

@ -21,6 +21,7 @@ class ChooseEngineDialog : public KDialog
{
public:
ChooseEngineDialog( const QStringList &generators, const KMimeType::Ptr &mime, QWidget * parent = 0 );
~ChooseEngineDialog();
int selectedGenerator() const;

View File

@ -1,57 +1,42 @@
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>ChooseEngineWidget</class>
<widget class="QWidget" name="ChooseEngineWidget" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>364</width>
<height>97</height>
<width>286</width>
<height>96</height>
</rect>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<property name="leftMargin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<item>
<widget class="QLabel" name="description" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>1</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string/>
</property>
<property name="wordWrap" >
<bool>true</bool>
<property name="textFormat" >
<enum>Qt::RichText</enum>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="engineList" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="QComboBox" name="engineList" />
</item>
</layout>
</widget>
<pixmapfunction></pixmapfunction>
<resources/>
<connections/>
</ui>