svn path=/branches/KDE4/; revision=1853
: QWidget(parent), m_audioList(audioEffectList), m_videoList(videoEffectList), m_customList(customEffectList)
{
ui.setupUi(this);
: QWidget(parent), m_audioList(audioEffectList), m_videoList(videoEffectList), m_customList(customEffectList)
{
ui.setupUi(this);
- initList();
- connect(ui.video_button, SIGNAL(released()), this, SLOT(initList()));
- connect(ui.audio_button, SIGNAL(released()), this, SLOT(initList()));
- connect(ui.custom_button, SIGNAL(released()), this, SLOT(initList()));
- connect(ui.effectlist, SIGNAL(itemSelectionChanged()), this, SLOT(slotDisplayInfo()));
+ initList(0);
+ connect(ui.type_combo, SIGNAL(currentIndexChanged(int)), this, SLOT(initList(int)));
+ connect(ui.button_info, SIGNAL(stateChanged(int)), this, SLOT(showInfoPanel(int)));
+ connect(ui.effectlist, SIGNAL(itemSelectionChanged()), this, SLOT(slotUpdateInfo()));
-void EffectsListView::initList()
+void EffectsListView::initList(int pos)
- if (ui.video_button->isChecked()) {
- names = m_videoList->effectNames();
- }
- else if (ui.audio_button->isChecked()) {
- names = m_audioList->effectNames();
- }
- if (ui.custom_button->isChecked()) {
- names = m_customList->effectNames();
+ switch (pos)
+ {
+ case 0:
+ names = m_videoList->effectNames();
+ break;
+ case 1:
+ names = m_audioList->effectNames();
+ break;
+ default:
+ names = m_customList->effectNames();
+ break;
}
ui.effectlist->clear();
ui.effectlist->addItems(names);
}
}
ui.effectlist->clear();
ui.effectlist->addItems(names);
}
-void EffectsListView::slotDisplayInfo()
+void EffectsListView::showInfoPanel(int state)
+{
+ if (state == 0) ui.infopanel->hide();
+ else ui.infopanel->show();
+}
+
+void EffectsListView::slotUpdateInfo()
- if (ui.video_button->isChecked()) {
+ if (ui.type_combo->currentIndex() == 0) {
info = m_videoList->getInfo(ui.effectlist->currentItem()->text());
}
info = m_videoList->getInfo(ui.effectlist->currentItem()->text());
}
- else if (ui.audio_button->isChecked()) {
+ else if (ui.type_combo->currentIndex() == 1) {
info = m_audioList->getInfo(ui.effectlist->currentItem()->text());
}
info = m_audioList->getInfo(ui.effectlist->currentItem()->text());
}
- if (ui.custom_button->isChecked()) {
+ if (ui.type_combo->currentIndex() == 2) {
info = m_customList->getInfo(ui.effectlist->currentItem()->text());
}
ui.infopanel->setText(info);
info = m_customList->getInfo(ui.effectlist->currentItem()->text());
}
ui.infopanel->setText(info);
EffectsList *m_customList;
private slots:
EffectsList *m_customList;
private slots:
- void initList();
- void slotDisplayInfo();
+ void initList(int pos);
+ void slotUpdateInfo();
+ void showInfoPanel(int state);
- <width>260</width>
- <height>256</height>
+ <width>257</width>
+ <height>280</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout" >
<property name="margin" >
<number>0</number>
</property>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout" >
<property name="margin" >
<number>0</number>
</property>
- <item row="0" column="0" colspan="2" >
+ <item row="0" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout" >
<item>
<layout class="QHBoxLayout" name="horizontalLayout" >
<item>
- <widget class="QRadioButton" name="video_button" >
- <property name="text" >
- <string>Video</string>
- </property>
- <property name="checked" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="audio_button" >
- <property name="text" >
- <string>Audio</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="custom_button" >
- <property name="text" >
- <string>Custom</string>
- </property>
+ <widget class="KComboBox" name="type_combo" >
+ <item>
+ <property name="text" >
+ <string>Video</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Audio</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Custom</string>
+ </property>
+ </item>
</property>
<property name="sizeHint" stdset="0" >
<size>
</property>
<property name="sizeHint" stdset="0" >
<size>
- <width>40</width>
- <height>20</height>
+ <width>68</width>
+ <height>17</height>
</size>
</property>
</spacer>
</item>
</size>
</property>
</spacer>
</item>
+ <item>
+ <widget class="QCheckBox" name="button_info" >
+ <property name="text" >
+ <string>Info</string>
+ </property>
+ <property name="checked" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
<item row="1" column="0" >
</layout>
</item>
<item row="1" column="0" >
- <widget class="KListWidget" name="effectlist" />
- </item>
- <item row="1" column="1" >
- <widget class="QTextEdit" name="infopanel" >
- <property name="frameShape" >
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Sunken</enum>
- </property>
- <property name="readOnly" >
- <bool>true</bool>
+ <widget class="QSplitter" name="splitter" >
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ <widget class="KListWidget" name="effectlist" />
+ <widget class="QTextEdit" name="infopanel" >
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ </widget>
</widget>
</item>
</layout>
</widget>
<customwidgets>
</widget>
</item>
</layout>
</widget>
<customwidgets>
+ <customwidget>
+ <class>KComboBox</class>
+ <extends>QComboBox</extends>
+ <header>kcombobox.h</header>
+ </customwidget>
<customwidget>
<class>KListWidget</class>
<extends>QListWidget</extends>
<customwidget>
<class>KListWidget</class>
<extends>QListWidget</extends>