diff options
| author | Orcan Ogetbil <oget.fedora@gmail.com> | 2010-11-21 02:47:22 +0000 | 
|---|---|---|
| committer | Orcan Ogetbil <oget.fedora@gmail.com> | 2010-11-21 02:47:22 +0000 | 
| commit | e29c2ba6ed400e54dca62a35ce53edea85d34ddb (patch) | |
| tree | 65071c059a0c2d564fd0a79eb1168988858548ec /muse2/muse/liste | |
| parent | ef43b13d1eff9563108b681d0a0e4a7afb394c42 (diff) | |
converted .ui widgets to Qt4 along with all of editevent
Diffstat (limited to 'muse2/muse/liste')
| -rw-r--r-- | muse2/muse/liste/CMakeLists.txt | 12 | ||||
| -rw-r--r-- | muse2/muse/liste/editctrlbase.ui | 1560 | ||||
| -rw-r--r-- | muse2/muse/liste/editevent.cpp | 160 | ||||
| -rw-r--r-- | muse2/muse/liste/editevent.h | 46 | 
4 files changed, 981 insertions, 797 deletions
| diff --git a/muse2/muse/liste/CMakeLists.txt b/muse2/muse/liste/CMakeLists.txt index 5ffbf0dd..d0c13a2d 100644 --- a/muse2/muse/liste/CMakeLists.txt +++ b/muse2/muse/liste/CMakeLists.txt @@ -29,14 +29,15 @@ QT4_WRAP_CPP ( liste_mocs        editevent.h        ) -# QT4_WRAP_UI ( liste_ui_headers -QT4_WRAP_UI3 ( liste_ui_headers +QT4_WRAP_UI ( UIC +      editctrlbase.ui +      ) + +#QT4_WRAP_UI3 ( liste_ui_headers  #       ctrllistedit.ui  #       partlistedit.ui  #       tracklistedit.ui -       -      editctrlbase.ui -      ) +#       )        add_library ( liste STATIC  #       listedit.cpp listedit.h @@ -48,6 +49,7 @@ add_library ( liste STATIC        editevent.cpp editevent.h         ${liste_mocs}        ${liste_ui_headers} +      ${UIC}        )  add_dependencies(liste widgets) diff --git a/muse2/muse/liste/editctrlbase.ui b/muse2/muse/liste/editctrlbase.ui index e018a802..e3b28a69 100644 --- a/muse2/muse/liste/editctrlbase.ui +++ b/muse2/muse/liste/editctrlbase.ui @@ -1,702 +1,878 @@ -<!DOCTYPE UI><UI version="3.2" stdsetdef="1"> -<class>EditCtrlBase</class> -<widget class="QDialog"> -    <property name="name"> -        <cstring>MyDialog</cstring> -    </property> -    <property name="geometry"> -        <rect> -            <x>0</x> -            <y>0</y> -            <width>601</width> -            <height>413</height> -        </rect> -    </property> -    <property name="caption"> -        <string>MusE: Edit Controller Event</string> -    </property> -    <property name="sizeGripEnabled"> -        <bool>true</bool> -    </property> -    <grid> -        <property name="name"> -            <cstring>unnamed</cstring> -        </property> -        <widget class="QLabel" row="0" column="3"> -            <property name="name"> -                <cstring>textLabel1</cstring> -            </property> -            <property name="text"> -                <string>Time Position</string> -            </property> +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>EditCtrlBase</class> + <widget class="QDialog" name="EditCtrlBase"> +  <property name="geometry"> +   <rect> +    <x>0</x> +    <y>0</y> +    <width>601</width> +    <height>413</height> +   </rect> +  </property> +  <property name="windowTitle"> +   <string>MusE: Edit Controller Event</string> +  </property> +  <property name="sizeGripEnabled"> +   <bool>true</bool> +  </property> +  <layout class="QGridLayout"> +   <item row="0" column="3"> +    <widget class="QLabel" name="textLabel1"> +     <property name="text"> +      <string>Time Position</string> +     </property> +     <property name="wordWrap"> +      <bool>false</bool> +     </property> +    </widget> +   </item> +   <item row="0" column="0" colspan="2"> +    <widget class="QLabel" name="textLabel1_2"> +     <property name="text"> +      <string>Available Controller:</string> +     </property> +     <property name="wordWrap"> +      <bool>false</bool> +     </property> +    </widget> +   </item> +   <item row="2" column="0"> +    <widget class="QPushButton" name="buttonNewController"> +     <property name="text"> +      <string>Create New Controller</string> +     </property> +     <property name="shortcut"> +      <string/> +     </property> +     <property name="autoDefault"> +      <bool>true</bool> +     </property> +     <property name="default"> +      <bool>true</bool> +     </property> +    </widget> +   </item> +   <item row="0" column="4"> +    <widget class="PosEdit" name="timePos" native="true"/> +   </item> +   <item row="1" column="3" rowspan="2" colspan="2"> +    <widget class="QStackedWidget" name="widgetStack"> +     <property name="palette"> +      <palette> +       <active> +        <colorrole role="WindowText"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>0</red> +           <green>0</green> +           <blue>0</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Button"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>238</red> +           <green>234</green> +           <blue>222</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Light"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>255</red> +           <green>255</green> +           <blue>255</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Midlight"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>246</red> +           <green>244</green> +           <blue>238</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Dark"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>119</red> +           <green>117</green> +           <blue>111</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Mid"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>158</red> +           <green>155</green> +           <blue>147</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Text"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>0</red> +           <green>0</green> +           <blue>0</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="BrightText"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>255</red> +           <green>255</green> +           <blue>255</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="ButtonText"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>0</red> +           <green>0</green> +           <blue>0</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Base"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>255</red> +           <green>255</green> +           <blue>255</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Window"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>104</red> +           <green>137</green> +           <blue>236</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Shadow"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>0</red> +           <green>0</green> +           <blue>0</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Highlight"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>0</red> +           <green>0</green> +           <blue>128</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="HighlightedText"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>255</red> +           <green>255</green> +           <blue>255</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Link"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>0</red> +           <green>0</green> +           <blue>0</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="LinkVisited"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>0</red> +           <green>0</green> +           <blue>0</blue> +          </color> +         </brush> +        </colorrole> +       </active> +       <inactive> +        <colorrole role="WindowText"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>0</red> +           <green>0</green> +           <blue>0</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Button"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>238</red> +           <green>234</green> +           <blue>222</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Light"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>255</red> +           <green>255</green> +           <blue>255</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Midlight"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>255</red> +           <green>255</green> +           <blue>255</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Dark"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>119</red> +           <green>117</green> +           <blue>111</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Mid"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>158</red> +           <green>155</green> +           <blue>147</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Text"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>0</red> +           <green>0</green> +           <blue>0</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="BrightText"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>255</red> +           <green>255</green> +           <blue>255</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="ButtonText"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>0</red> +           <green>0</green> +           <blue>0</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Base"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>255</red> +           <green>255</green> +           <blue>255</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Window"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>104</red> +           <green>137</green> +           <blue>236</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Shadow"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>0</red> +           <green>0</green> +           <blue>0</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Highlight"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>0</red> +           <green>0</green> +           <blue>128</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="HighlightedText"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>255</red> +           <green>255</green> +           <blue>255</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Link"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>0</red> +           <green>0</green> +           <blue>192</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="LinkVisited"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>128</red> +           <green>0</green> +           <blue>128</blue> +          </color> +         </brush> +        </colorrole> +       </inactive> +       <disabled> +        <colorrole role="WindowText"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>128</red> +           <green>128</green> +           <blue>128</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Button"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>238</red> +           <green>234</green> +           <blue>222</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Light"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>255</red> +           <green>255</green> +           <blue>255</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Midlight"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>255</red> +           <green>255</green> +           <blue>255</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Dark"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>119</red> +           <green>117</green> +           <blue>111</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Mid"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>158</red> +           <green>155</green> +           <blue>147</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Text"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>128</red> +           <green>128</green> +           <blue>128</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="BrightText"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>255</red> +           <green>255</green> +           <blue>255</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="ButtonText"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>128</red> +           <green>128</green> +           <blue>128</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Base"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>255</red> +           <green>255</green> +           <blue>255</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Window"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>104</red> +           <green>137</green> +           <blue>236</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Shadow"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>0</red> +           <green>0</green> +           <blue>0</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Highlight"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>0</red> +           <green>0</green> +           <blue>128</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="HighlightedText"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>255</red> +           <green>255</green> +           <blue>255</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="Link"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>0</red> +           <green>0</green> +           <blue>192</blue> +          </color> +         </brush> +        </colorrole> +        <colorrole role="LinkVisited"> +         <brush brushstyle="SolidPattern"> +          <color alpha="255"> +           <red>128</red> +           <green>0</green> +           <blue>128</blue> +          </color> +         </brush> +        </colorrole> +       </disabled> +      </palette> +     </property> +     <widget class="QWidget" name="WStackPage"> +      <property name="geometry"> +       <rect> +        <x>0</x> +        <y>0</y> +        <width>140</width> +        <height>349</height> +       </rect> +      </property> +      <layout class="QGridLayout"> +       <item row="3" column="0" colspan="2"> +        <widget class="QSlider" name="valSlider"> +         <property name="maximum"> +          <number>127</number> +         </property> +         <property name="orientation"> +          <enum>Qt::Horizontal</enum> +         </property> +        </widget> +       </item> +       <item row="1" column="1"> +        <widget class="QLabel" name="controllerName"> +         <property name="frameShadow"> +          <enum>QFrame::Sunken</enum> +         </property> +         <property name="text"> +          <string>textLabel3</string> +         </property> +         <property name="wordWrap"> +          <bool>false</bool> +         </property> +        </widget> +       </item> +       <item row="2" column="0"> +        <widget class="QLabel" name="textLabel4"> +         <property name="text"> +          <string>Value</string> +         </property> +         <property name="wordWrap"> +          <bool>false</bool> +         </property> +        </widget> +       </item> +       <item row="1" column="0"> +        <widget class="QLabel" name="textLabel2"> +         <property name="text"> +          <string>Controller</string> +         </property> +         <property name="wordWrap"> +          <bool>false</bool> +         </property>          </widget> -        <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2"> -            <property name="name"> -                <cstring>textLabel1_2</cstring> -            </property> -            <property name="text"> -                <string>Available Controller:</string> -            </property> +       </item> +       <item row="2" column="1"> +        <widget class="QSpinBox" name="valSpinBox"> +         <property name="maximum"> +          <number>127</number> +         </property>          </widget> -        <widget class="QPushButton" row="2" column="0"> -            <property name="name"> -                <cstring>buttonNewController</cstring> -            </property> -            <property name="text"> -                <string>Create New Controller</string> -            </property> -            <property name="accel"> -                <string></string> -            </property> -            <property name="autoDefault"> -                <bool>true</bool> -            </property> -            <property name="default"> -                <bool>true</bool> -            </property> +       </item> +       <item row="0" column="1"> +        <spacer name="spacer2"> +         <property name="orientation"> +          <enum>Qt::Vertical</enum> +         </property> +         <property name="sizeType"> +          <enum>QSizePolicy::Expanding</enum> +         </property> +         <property name="sizeHint" stdset="0"> +          <size> +           <width>20</width> +           <height>40</height> +          </size> +         </property> +        </spacer> +       </item> +      </layout> +     </widget> +     <widget class="QWidget" name="WStackPage"> +      <property name="geometry"> +       <rect> +        <x>0</x> +        <y>0</y> +        <width>100</width> +        <height>30</height> +       </rect> +      </property> +      <layout class="QGridLayout"> +       <item row="2" column="0"> +        <widget class="QLabel" name="textLabel2_2"> +         <property name="text"> +          <string>H-Bank</string> +         </property> +         <property name="wordWrap"> +          <bool>false</bool> +         </property>          </widget> -        <widget class="PosEdit" row="0" column="4"> -            <property name="name"> -                <cstring>timePos</cstring> -            </property> +       </item> +       <item row="3" column="0"> +        <widget class="QLabel" name="textLabel3"> +         <property name="text"> +          <string>L-Bank</string> +         </property> +         <property name="wordWrap"> +          <bool>false</bool> +         </property>          </widget> -        <widget class="QWidgetStack" row="1" column="3" rowspan="2" colspan="2"> -            <property name="name"> -                <cstring>widgetStack</cstring> -            </property> -            <property name="paletteBackgroundColor"> -                <color> -                    <red>104</red> -                    <green>137</green> -                    <blue>236</blue> -                </color> -            </property> -            <property name="palette"> -                <palette> -                    <active> -                        <color> -                            <red>0</red> -                            <green>0</green> -                            <blue>0</blue> -                        </color> -                        <color> -                            <red>238</red> -                            <green>234</green> -                            <blue>222</blue> -                        </color> -                        <color> -                            <red>255</red> -                            <green>255</green> -                            <blue>255</blue> -                        </color> -                        <color> -                            <red>246</red> -                            <green>244</green> -                            <blue>238</blue> -                        </color> -                        <color> -                            <red>119</red> -                            <green>117</green> -                            <blue>111</blue> -                        </color> -                        <color> -                            <red>158</red> -                            <green>155</green> -                            <blue>147</blue> -                        </color> -                        <color> -                            <red>0</red> -                            <green>0</green> -                            <blue>0</blue> -                        </color> -                        <color> -                            <red>255</red> -                            <green>255</green> -                            <blue>255</blue> -                        </color> -                        <color> -                            <red>0</red> -                            <green>0</green> -                            <blue>0</blue> -                        </color> -                        <color> -                            <red>255</red> -                            <green>255</green> -                            <blue>255</blue> -                        </color> -                        <color> -                            <red>104</red> -                            <green>137</green> -                            <blue>236</blue> -                        </color> -                        <color> -                            <red>0</red> -                            <green>0</green> -                            <blue>0</blue> -                        </color> -                        <color> -                            <red>0</red> -                            <green>0</green> -                            <blue>128</blue> -                        </color> -                        <color> -                            <red>255</red> -                            <green>255</green> -                            <blue>255</blue> -                        </color> -                        <color> -                            <red>0</red> -                            <green>0</green> -                            <blue>0</blue> -                        </color> -                        <color> -                            <red>0</red> -                            <green>0</green> -                            <blue>0</blue> -                        </color> -                    </active> -                    <disabled> -                        <color> -                            <red>128</red> -                            <green>128</green> -                            <blue>128</blue> -                        </color> -                        <color> -                            <red>238</red> -                            <green>234</green> -                            <blue>222</blue> -                        </color> -                        <color> -                            <red>255</red> -                            <green>255</green> -                            <blue>255</blue> -                        </color> -                        <color> -                            <red>255</red> -                            <green>255</green> -                            <blue>255</blue> -                        </color> -                        <color> -                            <red>119</red> -                            <green>117</green> -                            <blue>111</blue> -                        </color> -                        <color> -                            <red>158</red> -                            <green>155</green> -                            <blue>147</blue> -                        </color> -                        <color> -                            <red>128</red> -                            <green>128</green> -                            <blue>128</blue> -                        </color> -                        <color> -                            <red>255</red> -                            <green>255</green> -                            <blue>255</blue> -                        </color> -                        <color> -                            <red>128</red> -                            <green>128</green> -                            <blue>128</blue> -                        </color> -                        <color> -                            <red>255</red> -                            <green>255</green> -                            <blue>255</blue> -                        </color> -                        <color> -                            <red>104</red> -                            <green>137</green> -                            <blue>236</blue> -                        </color> -                        <color> -                            <red>0</red> -                            <green>0</green> -                            <blue>0</blue> -                        </color> -                        <color> -                            <red>0</red> -                            <green>0</green> -                            <blue>128</blue> -                        </color> -                        <color> -                            <red>255</red> -                            <green>255</green> -                            <blue>255</blue> -                        </color> -                        <color> -                            <red>0</red> -                            <green>0</green> -                            <blue>192</blue> -                        </color> -                        <color> -                            <red>128</red> -                            <green>0</green> -                            <blue>128</blue> -                        </color> -                    </disabled> -                    <inactive> -                        <color> -                            <red>0</red> -                            <green>0</green> -                            <blue>0</blue> -                        </color> -                        <color> -                            <red>238</red> -                            <green>234</green> -                            <blue>222</blue> -                        </color> -                        <color> -                            <red>255</red> -                            <green>255</green> -                            <blue>255</blue> -                        </color> -                        <color> -                            <red>255</red> -                            <green>255</green> -                            <blue>255</blue> -                        </color> -                        <color> -                            <red>119</red> -                            <green>117</green> -                            <blue>111</blue> -                        </color> -                        <color> -                            <red>158</red> -                            <green>155</green> -                            <blue>147</blue> -                        </color> -                        <color> -                            <red>0</red> -                            <green>0</green> -                            <blue>0</blue> -                        </color> -                        <color> -                            <red>255</red> -                            <green>255</green> -                            <blue>255</blue> -                        </color> -                        <color> -                            <red>0</red> -                            <green>0</green> -                            <blue>0</blue> -                        </color> -                        <color> -                            <red>255</red> -                            <green>255</green> -                            <blue>255</blue> -                        </color> -                        <color> -                            <red>104</red> -                            <green>137</green> -                            <blue>236</blue> -                        </color> -                        <color> -                            <red>0</red> -                            <green>0</green> -                            <blue>0</blue> -                        </color> -                        <color> -                            <red>0</red> -                            <green>0</green> -                            <blue>128</blue> -                        </color> -                        <color> -                            <red>255</red> -                            <green>255</green> -                            <blue>255</blue> -                        </color> -                        <color> -                            <red>0</red> -                            <green>0</green> -                            <blue>192</blue> -                        </color> -                        <color> -                            <red>128</red> -                            <green>0</green> -                            <blue>128</blue> -                        </color> -                    </inactive> -                </palette> -            </property> -            <widget class="QWidget"> -                <property name="name"> -                    <cstring>WStackPage</cstring> -                </property> -                <attribute name="id"> -                    <number>0</number> -                </attribute> -                <grid> -                    <property name="name"> -                        <cstring>unnamed</cstring> -                    </property> -                    <widget class="QSlider" row="3" column="0" rowspan="1" colspan="2"> -                        <property name="name"> -                            <cstring>valSlider</cstring> -                        </property> -                        <property name="maxValue"> -                            <number>127</number> -                        </property> -                        <property name="orientation"> -                            <enum>Horizontal</enum> -                        </property> -                    </widget> -                    <widget class="QLabel" row="1" column="1"> -                        <property name="name"> -                            <cstring>controllerName</cstring> -                        </property> -                        <property name="paletteBackgroundColor"> -                            <color> -                                <red>255</red> -                                <green>255</green> -                                <blue>255</blue> -                            </color> -                        </property> -                        <property name="frameShape"> -                            <enum>LineEditPanel</enum> -                        </property> -                        <property name="frameShadow"> -                            <enum>Sunken</enum> -                        </property> -                        <property name="text"> -                            <string>textLabel3</string> -                        </property> -                    </widget> -                    <widget class="QLabel" row="2" column="0"> -                        <property name="name"> -                            <cstring>textLabel4</cstring> -                        </property> -                        <property name="text"> -                            <string>Value</string> -                        </property> -                    </widget> -                    <widget class="QLabel" row="1" column="0"> -                        <property name="name"> -                            <cstring>textLabel2</cstring> -                        </property> -                        <property name="text"> -                            <string>Controller</string> -                        </property> -                    </widget> -                    <widget class="QSpinBox" row="2" column="1"> -                        <property name="name"> -                            <cstring>valSpinBox</cstring> -                        </property> -                        <property name="maxValue"> -                            <number>127</number> -                        </property> -                    </widget> -                    <spacer row="0" column="1"> -                        <property name="name"> -                            <cstring>spacer2</cstring> -                        </property> -                        <property name="orientation"> -                            <enum>Vertical</enum> -                        </property> -                        <property name="sizeType"> -                            <enum>Expanding</enum> -                        </property> -                        <property name="sizeHint"> -                            <size> -                                <width>20</width> -                                <height>40</height> -                            </size> -                        </property> -                    </spacer> -                </grid> -            </widget> -            <widget class="QWidget"> -                <property name="name"> -                    <cstring>WStackPage</cstring> -                </property> -                <attribute name="id"> -                    <number>1</number> -                </attribute> -                <grid> -                    <property name="name"> -                        <cstring>unnamed</cstring> -                    </property> -                    <widget class="QLabel" row="2" column="0"> -                        <property name="name"> -                            <cstring>textLabel2_2</cstring> -                        </property> -                        <property name="text"> -                            <string>H-Bank</string> -                        </property> -                    </widget> -                    <widget class="QLabel" row="3" column="0"> -                        <property name="name"> -                            <cstring>textLabel3</cstring> -                        </property> -                        <property name="text"> -                            <string>L-Bank</string> -                        </property> -                    </widget> -                    <widget class="QLabel" row="4" column="0"> -                        <property name="name"> -                            <cstring>textLabel4_2</cstring> -                        </property> -                        <property name="text"> -                            <string>Program</string> -                        </property> -                    </widget> -                    <widget class="QSpinBox" row="2" column="1"> -                        <property name="name"> -                            <cstring>hbank</cstring> -                        </property> -                        <property name="specialValueText"> -                            <string>off</string> -                        </property> -                        <property name="maxValue"> -                            <number>128</number> -                        </property> -                        <property name="minValue"> -                            <number>0</number> -                        </property> -                        <property name="value"> -                            <number>0</number> -                        </property> -                    </widget> -                    <widget class="QSpinBox" row="3" column="1"> -                        <property name="name"> -                            <cstring>lbank</cstring> -                        </property> -                        <property name="specialValueText"> -                            <string>off</string> -                        </property> -                        <property name="maxValue"> -                            <number>128</number> -                        </property> -                        <property name="minValue"> -                            <number>0</number> -                        </property> -                        <property name="value"> -                            <number>0</number> -                        </property> -                    </widget> -                    <widget class="QSpinBox" row="4" column="1"> -                        <property name="name"> -                            <cstring>program</cstring> -                        </property> -                        <property name="maxValue"> -                            <number>128</number> -                        </property> -                        <property name="minValue"> -                            <number>1</number> -                        </property> -                    </widget> -                    <spacer row="0" column="0" rowspan="1" colspan="2"> -                        <property name="name"> -                            <cstring>spacer4</cstring> -                        </property> -                        <property name="orientation"> -                            <enum>Vertical</enum> -                        </property> -                        <property name="sizeType"> -                            <enum>Expanding</enum> -                        </property> -                        <property name="sizeHint"> -                            <size> -                                <width>20</width> -                                <height>140</height> -                            </size> -                        </property> -                    </spacer> -                    <widget class="QPushButton" row="1" column="0" rowspan="1" colspan="2"> -                        <property name="name"> -                            <cstring>patchName</cstring> -                        </property> -                        <property name="text"> -                            <string>pushButton4</string> -                        </property> -                    </widget> -                </grid> -            </widget> +       </item> +       <item row="4" column="0"> +        <widget class="QLabel" name="textLabel4_2"> +         <property name="text"> +          <string>Program</string> +         </property> +         <property name="wordWrap"> +          <bool>false</bool> +         </property>          </widget> -        <widget class="QLayoutWidget" row="4" column="0" rowspan="1" colspan="5"> -            <property name="name"> -                <cstring>Layout1</cstring> -            </property> -            <hbox> -                <property name="name"> -                    <cstring>unnamed</cstring> -                </property> -                <property name="margin"> -                    <number>0</number> -                </property> -                <property name="spacing"> -                    <number>6</number> -                </property> -                <spacer> -                    <property name="name"> -                        <cstring>Horizontal Spacing2</cstring> -                    </property> -                    <property name="orientation"> -                        <enum>Horizontal</enum> -                    </property> -                    <property name="sizeType"> -                        <enum>Expanding</enum> -                    </property> -                    <property name="sizeHint"> -                        <size> -                            <width>20</width> -                            <height>20</height> -                        </size> -                    </property> -                </spacer> -                <widget class="QPushButton"> -                    <property name="name"> -                        <cstring>buttonOk</cstring> -                    </property> -                    <property name="text"> -                        <string>&OK</string> -                    </property> -                    <property name="accel"> -                        <string></string> -                    </property> -                    <property name="autoDefault"> -                        <bool>true</bool> -                    </property> -                    <property name="default"> -                        <bool>true</bool> -                    </property> -                </widget> -                <widget class="QPushButton"> -                    <property name="name"> -                        <cstring>buttonCancel</cstring> -                    </property> -                    <property name="text"> -                        <string>&Cancel</string> -                    </property> -                    <property name="accel"> -                        <string></string> -                    </property> -                    <property name="autoDefault"> -                        <bool>true</bool> -                    </property> -                </widget> -            </hbox> +       </item> +       <item row="2" column="1"> +        <widget class="QSpinBox" name="hbank"> +         <property name="specialValueText"> +          <string>off</string> +         </property> +         <property name="minimum"> +          <number>0</number> +         </property> +         <property name="maximum"> +          <number>128</number> +         </property> +         <property name="value"> +          <number>0</number> +         </property>          </widget> -        <widget class="Line" row="3" column="0" rowspan="1" colspan="5"> -            <property name="name"> -                <cstring>line1</cstring> -            </property> -            <property name="frameShape"> -                <enum>HLine</enum> -            </property> -            <property name="frameShadow"> -                <enum>Raised</enum> -            </property> -            <property name="lineWidth"> -                <number>3</number> -            </property> -            <property name="margin"> -                <number>2</number> -            </property> -            <property name="midLineWidth"> -                <number>2</number> -            </property> -            <property name="orientation"> -                <enum>Horizontal</enum> -            </property> +       </item> +       <item row="3" column="1"> +        <widget class="QSpinBox" name="lbank"> +         <property name="specialValueText"> +          <string>off</string> +         </property> +         <property name="minimum"> +          <number>0</number> +         </property> +         <property name="maximum"> +          <number>128</number> +         </property> +         <property name="value"> +          <number>0</number> +         </property>          </widget> -        <widget class="QListBox" row="1" column="0" rowspan="1" colspan="2"> -            <property name="name"> -                <cstring>ctrlList</cstring> -            </property> -            <property name="currentItem"> -                <number>-1</number> -            </property> +       </item> +       <item row="4" column="1"> +        <widget class="QSpinBox" name="program"> +         <property name="minimum"> +          <number>1</number> +         </property> +         <property name="maximum"> +          <number>128</number> +         </property>          </widget> -        <spacer row="2" column="1"> -            <property name="name"> -                <cstring>spacer3</cstring> -            </property> -            <property name="orientation"> -                <enum>Horizontal</enum> -            </property> -            <property name="sizeType"> -                <enum>Expanding</enum> -            </property> -            <property name="sizeHint"> -                <size> -                    <width>60</width> -                    <height>20</height> -                </size> -            </property> +       </item> +       <item row="0" column="0" colspan="2"> +        <spacer name="spacer4"> +         <property name="orientation"> +          <enum>Qt::Vertical</enum> +         </property> +         <property name="sizeType"> +          <enum>QSizePolicy::Expanding</enum> +         </property> +         <property name="sizeHint" stdset="0"> +          <size> +           <width>20</width> +           <height>140</height> +          </size> +         </property>          </spacer> -        <widget class="Line" row="0" column="2" rowspan="3" colspan="1"> -            <property name="name"> -                <cstring>line2</cstring> -            </property> -            <property name="frameShape"> -                <enum>VLine</enum> -            </property> -            <property name="frameShadow"> -                <enum>Raised</enum> -            </property> -            <property name="lineWidth"> -                <number>3</number> -            </property> -            <property name="margin"> -                <number>2</number> -            </property> -            <property name="midLineWidth"> -                <number>2</number> -            </property> -            <property name="orientation"> -                <enum>Vertical</enum> -            </property> +       </item> +       <item row="1" column="0" colspan="2"> +        <widget class="QPushButton" name="patchName"> +         <property name="text"> +          <string>pushButton4</string> +         </property>          </widget> -    </grid> -</widget> -<customwidgets> -    <customwidget> -        <class>PosEdit</class> -        <header location="global">posedit.h</header> -        <sizehint> -            <width>50</width> -            <height>20</height> -        </sizehint> -        <container>0</container> -        <sizepolicy> -            <hordata>5</hordata> -            <verdata>5</verdata> -            <horstretch>0</horstretch> -            <verstretch>0</verstretch> -        </sizepolicy> -    </customwidget> -</customwidgets> -<connections> -    <connection> -        <sender>buttonOk</sender> -        <signal>clicked()</signal> -        <receiver>MyDialog</receiver> -        <slot>accept()</slot> -    </connection> -    <connection> -        <sender>buttonCancel</sender> -        <signal>clicked()</signal> -        <receiver>MyDialog</receiver> -        <slot>reject()</slot> -    </connection> -    <connection> -        <sender>valSlider</sender> -        <signal>valueChanged(int)</signal> -        <receiver>valSpinBox</receiver> -        <slot>setValue(int)</slot> -    </connection> -    <connection> -        <sender>valSpinBox</sender> -        <signal>valueChanged(int)</signal> -        <receiver>valSlider</receiver> -        <slot>setValue(int)</slot> -    </connection> -</connections> -<layoutdefaults spacing="6" margin="11"/> -<includehints> -    <includehint>../widgets/posedit.h</includehint> -</includehints> -</UI> +       </item> +      </layout> +     </widget> +    </widget> +   </item> +   <item row="4" column="0" colspan="5"> +    <layout class="QHBoxLayout"> +     <property name="spacing"> +      <number>6</number> +     </property> +     <property name="margin"> +      <number>0</number> +     </property> +     <item> +      <spacer name="Horizontal Spacing2"> +       <property name="orientation"> +        <enum>Qt::Horizontal</enum> +       </property> +       <property name="sizeType"> +        <enum>QSizePolicy::Expanding</enum> +       </property> +       <property name="sizeHint" stdset="0"> +        <size> +         <width>20</width> +         <height>20</height> +        </size> +       </property> +      </spacer> +     </item> +     <item> +      <widget class="QPushButton" name="buttonOk"> +       <property name="text"> +        <string>&OK</string> +       </property> +       <property name="shortcut"> +        <string/> +       </property> +       <property name="autoDefault"> +        <bool>true</bool> +       </property> +       <property name="default"> +        <bool>true</bool> +       </property> +      </widget> +     </item> +     <item> +      <widget class="QPushButton" name="buttonCancel"> +       <property name="text"> +        <string>&Cancel</string> +       </property> +       <property name="shortcut"> +        <string/> +       </property> +       <property name="autoDefault"> +        <bool>true</bool> +       </property> +      </widget> +     </item> +    </layout> +   </item> +   <item row="3" column="0" colspan="5"> +    <widget class="Line" name="line1"> +     <property name="frameShape"> +      <enum>QFrame::HLine</enum> +     </property> +     <property name="frameShadow"> +      <enum>QFrame::Raised</enum> +     </property> +     <property name="lineWidth"> +      <number>3</number> +     </property> +     <property name="midLineWidth"> +      <number>2</number> +     </property> +    </widget> +   </item> +   <item row="1" column="0" colspan="2"> +    <widget class="QListWidget" name="ctrlList"> +    </widget> +   </item> +   <item row="2" column="1"> +    <spacer name="spacer3"> +     <property name="orientation"> +      <enum>Qt::Horizontal</enum> +     </property> +     <property name="sizeType"> +      <enum>QSizePolicy::Expanding</enum> +     </property> +     <property name="sizeHint" stdset="0"> +      <size> +       <width>60</width> +       <height>20</height> +      </size> +     </property> +    </spacer> +   </item> +   <item row="0" column="2" rowspan="3"> +    <widget class="Line" name="line2"> +     <property name="frameShape"> +      <enum>QFrame::VLine</enum> +     </property> +     <property name="frameShadow"> +      <enum>QFrame::Raised</enum> +     </property> +     <property name="lineWidth"> +      <number>3</number> +     </property> +     <property name="midLineWidth"> +      <number>2</number> +     </property> +    </widget> +   </item> +  </layout> + </widget> + <layoutdefault spacing="6" margin="11"/> + <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> + <customwidgets> +  <customwidget> +   <class>PosEdit</class> +   <extends>QWidget</extends> +   <header location="global">posedit.h</header> +  </customwidget> + </customwidgets> + <includes> +  <include location="local">../widgets/posedit.h</include> + </includes> + <resources/> + <connections> +  <connection> +   <sender>buttonOk</sender> +   <signal>clicked()</signal> +   <receiver>MyDialog</receiver> +   <slot>accept()</slot> +   <hints> +    <hint type="sourcelabel"> +     <x>20</x> +     <y>20</y> +    </hint> +    <hint type="destinationlabel"> +     <x>20</x> +     <y>20</y> +    </hint> +   </hints> +  </connection> +  <connection> +   <sender>buttonCancel</sender> +   <signal>clicked()</signal> +   <receiver>MyDialog</receiver> +   <slot>reject()</slot> +   <hints> +    <hint type="sourcelabel"> +     <x>20</x> +     <y>20</y> +    </hint> +    <hint type="destinationlabel"> +     <x>20</x> +     <y>20</y> +    </hint> +   </hints> +  </connection> +  <connection> +   <sender>valSlider</sender> +   <signal>valueChanged(int)</signal> +   <receiver>valSpinBox</receiver> +   <slot>setValue(int)</slot> +   <hints> +    <hint type="sourcelabel"> +     <x>20</x> +     <y>20</y> +    </hint> +    <hint type="destinationlabel"> +     <x>20</x> +     <y>20</y> +    </hint> +   </hints> +  </connection> +  <connection> +   <sender>valSpinBox</sender> +   <signal>valueChanged(int)</signal> +   <receiver>valSlider</receiver> +   <slot>setValue(int)</slot> +   <hints> +    <hint type="sourcelabel"> +     <x>20</x> +     <y>20</y> +    </hint> +    <hint type="destinationlabel"> +     <x>20</x> +     <y>20</y> +    </hint> +   </hints> +  </connection> + </connections> +</ui> diff --git a/muse2/muse/liste/editevent.cpp b/muse2/muse/liste/editevent.cpp index 5681231b..8d8318c9 100644 --- a/muse2/muse/liste/editevent.cpp +++ b/muse2/muse/liste/editevent.cpp @@ -7,22 +7,19 @@  #include <stdio.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <q3multilineedit.h> -#include <qmessagebox.h> -#include <qslider.h> -#include <qradiobutton.h> -#include <qspinbox.h> -#include <q3listbox.h> -#include <q3widgetstack.h> -#include <q3popupmenu.h> -//Added by qt3to4: +#include <QBoxLayout>  #include <QHBoxLayout>  #include <QGridLayout> +#include <QLabel> +#include <QListWidget> +#include <QMenu> +#include <QMessageBox> +#include <QPushButton> +#include <QRadioButton> +#include <QSlider> +#include <QSpinBox> +#include <QTextEdit>  #include <QVBoxLayout> -#include <QBoxLayout>  #include "song.h"  #include "event.h" @@ -156,28 +153,29 @@ Event EditPAfterDialog::getEvent(int tick, const Event& event, QWidget* parent)  //   EditEventDialog  //--------------------------------------------------------- -EditEventDialog::EditEventDialog(QWidget* parent, const char* name) -   : QDialog(parent, name, true) +EditEventDialog::EditEventDialog(QWidget* parent) +   : QDialog(parent)        { -      QVBoxLayout* xlayout = new QVBoxLayout(this); -      layout1 = new QGridLayout(this); // ddskrjo this +      QVBoxLayout* xlayout = new QVBoxLayout; +      layout1 = new QGridLayout; // ddskrjo this        xlayout->addLayout(layout1);        //---------------------------------------------------        //  Ok, Cancel        //--------------------------------------------------- -      QBoxLayout* w5 = new QHBoxLayout(this); // ddskrjo this -      xlayout->addLayout(w5); -      QPushButton* okB = new QPushButton(tr("Ok"), this); +      QBoxLayout* w5 = new QHBoxLayout; // ddskrjo this +      QPushButton* okB = new QPushButton(tr("Ok"));        okB->setDefault(true); -      QPushButton* cancelB = new QPushButton(tr("Cancel"), this); +      QPushButton* cancelB = new QPushButton(tr("Cancel"));        okB->setFixedWidth(80);        cancelB->setFixedWidth(80);        w5->addWidget(okB);        w5->addSpacing(12);        w5->addWidget(cancelB);        w5->addStretch(1); +      xlayout->addLayout(w5); +      setLayout(xlayout);        connect(cancelB, SIGNAL(clicked()), SLOT(reject()));        connect(okB, SIGNAL(clicked()), SLOT(accept()));        } @@ -187,9 +185,10 @@ EditEventDialog::EditEventDialog(QWidget* parent, const char* name)  //---------------------------------------------------------  EditNoteDialog::EditNoteDialog(int tick, const Event& event, -   QWidget* parent, const char* name) -   : EditNoteDialogBase(parent, name) +   QWidget* parent) +   : QDialog(parent)        { +      setupUi(this);        if (!event.empty()) {              epos->setValue(tick);              il1->setValue(event.lenTick()); @@ -226,9 +225,10 @@ Event EditNoteDialog::event()  //---------------------------------------------------------  EditSysexDialog::EditSysexDialog(int tick, const Event& event, -   QWidget* parent, const char* name) -   : EditSysexDialogBase(parent, name) +   QWidget* parent) +   : QDialog(parent)        { +      setupUi(this);        sysex = 0;        if (!event.empty()) {              epos->setValue(tick); @@ -280,32 +280,32 @@ void EditSysexDialog::accept()  //---------------------------------------------------------  EditMetaDialog::EditMetaDialog(int tick, const Event& ev, -   QWidget* parent, const char* name) -   : EditEventDialog(parent, name) +   QWidget* parent) +   : EditEventDialog(parent)        {        meta = 0;        setCaption(tr("MusE: Enter Meta Event")); -      QLabel* l1 = new QLabel(tr("Time Position"), this); -      epos = new PosEdit(this); +      QLabel* l1 = new QLabel(tr("Time Position")); +      epos = new PosEdit; -      QLabel* l2 = new QLabel(tr("Meta Type"), this); +      QLabel* l2 = new QLabel(tr("Meta Type"));        il2 = new IntLabel(-1, 0, 127, this, -1);        il2->setFixedWidth(100);        il2->setFrame(true);        il2->setDark(); -      typeLabel = new QLabel(this); +      typeLabel = new QLabel;        typeLabel->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); -      QHBoxLayout* typeLayout = new QHBoxLayout(this); +      QHBoxLayout* typeLayout = new QHBoxLayout;        typeLayout->addWidget(il2);        typeLayout->addWidget(typeLabel);        typeLayout->addStretch(); -      hexButton = new QRadioButton(tr("Enter Hex"), this, "hextoggle"); +      hexButton = new QRadioButton(tr("Enter Hex"));        hexButton->setChecked(true);        connect(hexButton, SIGNAL(toggled(bool)), SLOT(toggled(bool))); -      edit = new Q3MultiLineEdit(this); +      edit = new QTextEdit;        edit->setFont(config.fonts[5]);        if (!ev.empty()) { @@ -411,20 +411,20 @@ void EditMetaDialog::accept()  //---------------------------------------------------------  EditCAfterDialog::EditCAfterDialog(int tick, const Event& event, -   QWidget* parent, const char* name) -   : EditEventDialog(parent, name) +   QWidget* parent) +   : EditEventDialog(parent)        {        setCaption(tr("MusE: Enter Channel Aftertouch")); -      QLabel* l1 = new QLabel(tr("Time Position"), this); -      epos = new PosEdit(this); +      QLabel* l1 = new QLabel(tr("Time Position")); +      epos = new PosEdit; -      QLabel* l2 = new QLabel(tr("Pressure"), this); +      QLabel* l2 = new QLabel(tr("Pressure"));        il2  = new IntLabel(-1, 0, 127, this, -1);        il2->setFrame(true);        il2->setDark(); -      QSlider* slider = new QSlider(0, 127, 1, 0, Qt::Horizontal, this); +      QSlider* slider = new QSlider(0, 127, 1, 0, Qt::Horizontal);        connect(slider, SIGNAL(valueChanged(int)), il2, SLOT(setValue(int)));        connect(il2, SIGNAL(valueChanged(int)), slider, SLOT(setValue(int))); @@ -463,22 +463,22 @@ Event EditCAfterDialog::event()  //---------------------------------------------------------  EditPAfterDialog::EditPAfterDialog(int tick, const Event& event, -   QWidget* parent, const char* name) -   : EditEventDialog(parent, name) +   QWidget* parent) +   : EditEventDialog(parent)        {        setCaption(tr("MusE: Enter Poly Aftertouch")); -      QLabel* l1 = new QLabel(tr("Time Position"), this); -      epos = new PosEdit(this); +      QLabel* l1 = new QLabel(tr("Time Position")); +      epos = new PosEdit; -      QLabel* l2 = new QLabel(tr("Pitch"), this); -      pl = new PitchEdit(this); -      QLabel* l3 = new QLabel(tr("Pressure"), this); +      QLabel* l2 = new QLabel(tr("Pitch")); +      pl = new PitchEdit; +      QLabel* l3 = new QLabel(tr("Pressure"));        il2  = new IntLabel(-1, 0, 127, this, -1);        il2->setFrame(true);        il2->setDark(); -      QSlider* slider = new QSlider(0, 127, 1, 0, Qt::Horizontal, this); +      QSlider* slider = new QSlider(0, 127, 1, 0, Qt::Horizontal);        connect(slider, SIGNAL(valueChanged(int)), il2, SLOT(setValue(int)));        connect(il2, SIGNAL(valueChanged(int)), slider, SLOT(setValue(int))); @@ -554,14 +554,16 @@ Event EditCtrlDialog::event()  //    QSlider* valSlider;  //    QSpinBox* valSpinBox;  //    QLabel* controllerName; -//    QListBox* ctrlList; +//    QListWidget* ctrlList;  //    QPushButton* buttonNewController;  //---------------------------------------------------------  EditCtrlDialog::EditCtrlDialog(int tick, const Event& event, -   const MidiPart* p, QWidget* parent, const char* name) -   : EditCtrlBase(parent, name), part(p) +   const MidiPart* p, QWidget* parent) +   : QDialog(parent), part(p)        { +      setupUi(this); +      widgetStack->setAutoFillBackground(true);        val = 0;        num = 0;        if (!event.empty()) { @@ -569,7 +571,7 @@ EditCtrlDialog::EditCtrlDialog(int tick, const Event& event,              val = event.dataB();              } -      pop = new Q3PopupMenu(this); +      pop = new QMenu(this);        pop->setCheckable(false);        MidiTrack* track   = part->track(); @@ -579,7 +581,7 @@ EditCtrlDialog::EditCtrlDialog(int tick, const Event& event,        MidiCtrlValListList* cll = port->controller();        ctrlList->clear(); -      ctrlList->setSelectionMode(Q3ListBox::Single); +      ctrlList->setSelectionMode(QAbstractItemView::SingleSelection);        //        // populate list of available controller @@ -610,11 +612,11 @@ EditCtrlDialog::EditCtrlDialog(int tick, const Event& event,        int idx = 0;        int selectionIndex = 0;        for (isList i = sList.begin(); i != sList.end(); ++i, ++idx) { -            ctrlList->insertItem(*i); +            ctrlList->addItem(*i);              if (mc->name() == *i)                    selectionIndex = idx;              } -      ctrlList->setSelected(selectionIndex, true); +      ctrlList->item(selectionIndex)->setSelected(true);        valSlider->setRange(mc->minVal(), mc->maxVal());        valSpinBox->setRange(mc->minVal(), mc->maxVal()); @@ -625,23 +627,25 @@ EditCtrlDialog::EditCtrlDialog(int tick, const Event& event,        {          if(num == CTRL_PROGRAM)          { -          widgetStack->raiseWidget(1); +          widgetStack->setCurrentIndex(1);            updatePatch();          }            else            { -          widgetStack->raiseWidget(0); +          widgetStack->setCurrentIndex(0);            valSlider->setValue(val - mc->bias());          }          }        else -        ctrlListClicked(ctrlList->selectedItem()); -      connect(ctrlList, SIGNAL(clicked(Q3ListBoxItem*)), SLOT(ctrlListClicked(Q3ListBoxItem*))); +        ctrlListClicked(ctrlList->selectedItems()[0]); +      connect(ctrlList, SIGNAL(itemClicked(QListWidgetItem*)), SLOT(ctrlListClicked(QListWidgetItem*)));        connect(buttonNewController, SIGNAL(clicked()), SLOT(newController()));        connect(hbank,   SIGNAL(valueChanged(int)), SLOT(programChanged()));        connect(lbank,   SIGNAL(valueChanged(int)), SLOT(programChanged()));        connect(program, SIGNAL(valueChanged(int)), SLOT(programChanged()));        connect(patchName, SIGNAL(released()), SLOT(instrPopup())); +      connect(buttonCancel, SIGNAL(clicked()), SLOT(reject())); +      connect(buttonOk, SIGNAL(clicked()), SLOT(accept()));        timePos->setValue(tick);        } @@ -651,7 +655,7 @@ EditCtrlDialog::EditCtrlDialog(int tick, const Event& event,  void EditCtrlDialog::newController()        { -      Q3PopupMenu* pop = new Q3PopupMenu(this); +      QMenu* pop = new QMenu(this);        pop->setCheckable(this);        //        // populate popup with all controllers available for @@ -665,14 +669,19 @@ void EditCtrlDialog::newController()        MidiCtrlValListList* cll = port->controller();        int channel              = track->outChannel(); +      int nn = 0;        for (iMidiController ci = mcl->begin(); ci != mcl->end(); ++ci)        {              if(cll->find(channel, ci->second->num()) == cll->end()) -              pop->insertItem(ci->second->name()); -      } -      int rv = pop->exec(buttonNewController->mapToGlobal(QPoint(0,0))); -      if (rv != -1) { -            QString s = pop->text(rv); +            { +                    QAction* act = pop->addAction(ci->second->name()); +		    act->setData(nn); +		    ++nn; +	    } +      } +      QAction* rv = pop->exec(buttonNewController->mapToGlobal(QPoint(0,0))); +      if (rv) { +            QString s = rv->text();              for (iMidiController ci = mcl->begin(); ci != mcl->end(); ++ci) {                    MidiController* mc = ci->second;                    if (mc->name() == s) { @@ -683,16 +692,16 @@ void EditCtrlDialog::newController()                            //song->update(SC_MIDI_CONTROLLER_ADD);                          }                          for (int idx = 0; ;++idx) { -                              QString str = ctrlList->text(idx); +			  QString str = ctrlList->item(idx)->text();                                if (s == str)                                { -                                    ctrlList->setSelected(idx, true); +				ctrlList->item(idx)->setSelected(true);                                      ctrlListClicked(ctrlList->item(idx));                                      break;                                }                                      if (str.isNull()) { -                                    ctrlList->insertItem(s); -                                    ctrlList->setSelected(idx, true); +                                    ctrlList->addItem(s); +                                    ctrlList->item(idx)->setSelected(true);                                      ctrlListClicked(ctrlList->item(idx));                                      break;                                      } @@ -708,7 +717,7 @@ void EditCtrlDialog::newController()  //   ctrlListClicked  //--------------------------------------------------------- -void EditCtrlDialog::ctrlListClicked(Q3ListBoxItem* item) +void EditCtrlDialog::ctrlListClicked(QListWidgetItem* item)        {        if (item == 0)              return; @@ -726,7 +735,7 @@ void EditCtrlDialog::ctrlListClicked(Q3ListBoxItem* item)              MidiController* c   = port->midiController(num);              if (s == c->name()) {                    if (num == CTRL_PROGRAM) { -                        widgetStack->raiseWidget(1); +                        widgetStack->setCurrentIndex(1);                          val = c->initVal();                          if(val == CTRL_VAL_UNKNOWN) @@ -734,7 +743,7 @@ void EditCtrlDialog::ctrlListClicked(Q3ListBoxItem* item)                          updatePatch();                          }                    else { -                        widgetStack->raiseWidget(0); +                        widgetStack->setCurrentIndex(0);                          valSlider->setRange(c->minVal(), c->maxVal());                          valSpinBox->setRange(c->minVal(), c->maxVal());                          controllerName->setText(s); @@ -814,11 +823,12 @@ void EditCtrlDialog::instrPopup()        if(pop->count() == 0)          return; -      int rv = pop->exec(patchName->mapToGlobal(QPoint(10,5))); -      if (rv != -1) { -            val = rv; +      QAction* rv = new QAction(pop->exec(patchName->mapToGlobal(QPoint(10,5)))); +      if (rv) { +            val = rv->data().toInt();              updatePatch();              } +      delete rv;        }  //--------------------------------------------------------- diff --git a/muse2/muse/liste/editevent.h b/muse2/muse/liste/editevent.h index 7c0b431c..076ba4eb 100644 --- a/muse2/muse/liste/editevent.h +++ b/muse2/muse/liste/editevent.h @@ -8,27 +8,23 @@  #ifndef __EDIT_EVENT_H__  #define __EDIT_EVENT_H__ -#include <qdialog.h> -//Added by qt3to4: -#include <Q3PopupMenu> -#include <QGridLayout> -#include <QLabel> - -#include "editnotedialogbase.h" -#include "editsysexdialogbase.h" -#include "editctrlbase.h" +#include "ui_editnotedialogbase.h" +#include "ui_editsysexdialogbase.h" +#include "ui_editctrlbase.h"  #include "event.h"  class PosEdit;  class IntLabel;  class PitchEdit; +class QDialog; +class QLabel;  class QGridLayout; -class Q3MultiLineEdit; +class QTextEdit;  class QRadioButton;  class PosEdit;  class MidiPart; -class Q3ListBoxItem; -class Q3PopupMenu; +class QListWidgetItem; +class QMenu;  //---------------------------------------------------------  //   EditEventDialog  //--------------------------------------------------------- @@ -40,7 +36,7 @@ class EditEventDialog : public QDialog {        QGridLayout* layout1;     public: -      EditEventDialog(QWidget* parent=0, const char* name=0); +      EditEventDialog(QWidget* parent=0);        virtual Event event() = 0;        }; @@ -48,12 +44,12 @@ class EditEventDialog : public QDialog {  //   EditNoteDialog  //--------------------------------------------------------- -class EditNoteDialog : public EditNoteDialogBase { +class EditNoteDialog : public QDialog, public Ui::EditNoteDialogBase {        Q_OBJECT     public:        EditNoteDialog(int tick, const Event&, -         QWidget* parent=0, const char* name=0); +         QWidget* parent=0);        static Event getEvent(int tick, const Event&,           QWidget* parent = 0);        virtual Event event(); @@ -63,7 +59,7 @@ class EditNoteDialog : public EditNoteDialogBase {  //   EditSysExDialog  //--------------------------------------------------------- -class EditSysexDialog : public EditSysexDialogBase { +class EditSysexDialog : public QDialog, public Ui::EditSysexDialogBase {        Q_OBJECT        unsigned char* sysex; @@ -77,7 +73,7 @@ class EditSysexDialog : public EditSysexDialogBase {     public:        EditSysexDialog(int tick, const Event&, -         QWidget* parent=0, const char* name=0); +         QWidget* parent=0);        ~EditSysexDialog();        static Event getEvent(int tick, const Event&,           QWidget* parent = 0); @@ -88,19 +84,19 @@ class EditSysexDialog : public EditSysexDialogBase {  //   EditCtrlDialog  //--------------------------------------------------------- -class EditCtrlDialog : public EditCtrlBase  { +class EditCtrlDialog : public QDialog, public Ui::EditCtrlBase  {        Q_OBJECT        int num;          // controller number        int val;          // controller value (for prog. changes)        const MidiPart* part; -      Q3PopupMenu* pop; +      QMenu* pop;        void updatePatch();     private slots: -      void ctrlListClicked(Q3ListBoxItem*); +      void ctrlListClicked(QListWidgetItem*);        void newController();        void programChanged();        void instrPopup(); @@ -111,7 +107,7 @@ class EditCtrlDialog : public EditCtrlBase  {     public:        EditCtrlDialog(int tick, const Event&, -         const MidiPart*, QWidget* parent=0, const char* name=0); +         const MidiPart*, QWidget* parent=0);        static Event getEvent(int tick, const Event&, const MidiPart*,           QWidget* parent = 0);        virtual Event event(); @@ -127,7 +123,7 @@ class EditMetaDialog : public EditEventDialog {        unsigned char* meta;        int len;        PosEdit* epos; -      Q3MultiLineEdit* edit; +      QTextEdit* edit;        IntLabel* il2;        QRadioButton* hexButton;        QLabel* typeLabel; @@ -142,7 +138,7 @@ class EditMetaDialog : public EditEventDialog {     public:        EditMetaDialog(int tick, const Event&, -         QWidget* parent=0, const char* name=0); +         QWidget* parent=0);        ~EditMetaDialog();        static Event getEvent(int tick, const Event&,           QWidget* parent = 0); @@ -164,7 +160,7 @@ class EditCAfterDialog : public EditEventDialog {     public:        EditCAfterDialog(int tick, const Event&, -         QWidget* parent=0, const char* name=0); +         QWidget* parent=0);        static Event getEvent(int tick, const Event&,           QWidget* parent = 0);        virtual Event event(); @@ -186,7 +182,7 @@ class EditPAfterDialog : public EditEventDialog {     public:        EditPAfterDialog(int tick, const Event&, -         QWidget* parent=0, const char* name=0); +         QWidget* parent=0);        static Event getEvent(int tick, const Event&,           QWidget* parent = 0);        virtual Event event(); | 
