Qt4: Just a toggle test for the advanced Panel.
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 20 Nov 2006 19:38:21 +0000 (19:38 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 20 Nov 2006 19:38:21 +0000 (19:38 +0000)
modules/gui/qt4/dialogs/open.cpp
modules/gui/qt4/dialogs/open.hpp
modules/gui/qt4/ui/open.ui

index 507af80..b514fdd 100644 (file)
@@ -44,12 +44,27 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
     ui.Tab->addTab(fileOpenPanel, "File");
     ui.Tab->addTab(diskOpenPanel, "Disk");
     ui.Tab->addTab(netOpenPanel, "Network");
+    ui.advancedFrame->hide();
+
+    BUTTONACT( ui.advancedButton , toggleAdvancedPanel()  );
 }
 
 OpenDialog::~OpenDialog()
 {
 }
 
+void OpenDialog::toggleAdvancedPanel()
+{
+    if (ui.advancedFrame->isVisible())
+    {
+        ui.advancedFrame->hide();
+    }
+    else
+    {
+        ui.advancedFrame->show();
+    }
+}
+
 void OpenDialog::cancel()
 {
     this->toggleVisible();
@@ -59,3 +74,4 @@ void OpenDialog::ok()
 {
     this->toggleVisible();
 }
+
index 287d708..09b5d65 100644 (file)
@@ -57,6 +57,7 @@ private:
 public slots:
     void cancel();
     void ok();
+    void toggleAdvancedPanel();
 };
 
 #endif
index 18a2a04..39797b9 100644 (file)
   <property name="windowTitle" >
    <string>Dialog</string>
   </property>
-  <widget class="QFrame" name="frame" >
+  <widget class="QPushButton" name="closeButton" >
+   <property name="geometry" >
+    <rect>
+     <x>520</x>
+     <y>540</y>
+     <width>91</width>
+     <height>29</height>
+    </rect>
+   </property>
+   <property name="text" >
+    <string>Close</string>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="cancelButton" >
+   <property name="geometry" >
+    <rect>
+     <x>400</x>
+     <y>540</y>
+     <width>101</width>
+     <height>29</height>
+    </rect>
+   </property>
+   <property name="text" >
+    <string>Cancel</string>
+   </property>
+  </widget>
+  <widget class="QTabWidget" name="Tab" >
+   <property name="geometry" >
+    <rect>
+     <x>10</x>
+     <y>10</y>
+     <width>601</width>
+     <height>371</height>
+    </rect>
+   </property>
+   <property name="currentIndex" >
+    <number>-1</number>
+   </property>
+  </widget>
+  <widget class="QFrame" name="advancedFrame" >
    <property name="geometry" >
     <rect>
      <x>10</x>
@@ -121,19 +160,6 @@ p, li { white-space: pre-wrap; }
     </item>
    </layout>
   </widget>
-  <widget class="QPushButton" name="closeButton" >
-   <property name="geometry" >
-    <rect>
-     <x>520</x>
-     <y>540</y>
-     <width>91</width>
-     <height>29</height>
-    </rect>
-   </property>
-   <property name="text" >
-    <string>Close</string>
-   </property>
-  </widget>
   <widget class="QPushButton" name="advancedButton" >
    <property name="geometry" >
     <rect>
@@ -147,32 +173,6 @@ p, li { white-space: pre-wrap; }
     <string>More...</string>
    </property>
   </widget>
-  <widget class="QPushButton" name="cancelButton" >
-   <property name="geometry" >
-    <rect>
-     <x>400</x>
-     <y>540</y>
-     <width>101</width>
-     <height>29</height>
-    </rect>
-   </property>
-   <property name="text" >
-    <string>Cancel</string>
-   </property>
-  </widget>
-  <widget class="QTabWidget" name="Tab" >
-   <property name="geometry" >
-    <rect>
-     <x>10</x>
-     <y>10</y>
-     <width>601</width>
-     <height>371</height>
-    </rect>
-   </property>
-   <property name="currentIndex" >
-    <number>-1</number>
-   </property>
-  </widget>
  </widget>
  <tabstops>
   <tabstop>advancedButton</tabstop>
@@ -182,7 +182,6 @@ p, li { white-space: pre-wrap; }
   <tabstop>closeButton</tabstop>
   <tabstop>cancelButton</tabstop>
  </tabstops>
- <includes/>
  <resources/>
  <connections/>
 </ui>