different Layer Chooser

Issue #119 wontfix
Reimar Bauer created an issue

The Layer chooser has currently very long names, it can have lots entries and a pulldown list integration gives not an simple overview what layers are there.

I think that we should solve this by a simple tree widget e.g. http://doc.qt.io/qt-5/qtwidgets-itemviews-simpletreemodel-example.html

We could think about grouping on unique prefix or postfix of all Layer names.

Maybe we could add that widget on left side of the image as we have there lots of unused white space.

vorschlag_layer.png

Optional would be an option for the user to enable/disable those getting showed at all. Not everyone will look on all Layers.

Comments (9)

  1. Jens-Uwe Grooß

    yes, especially when displying data from different sources (e.g. CLaMS, CLaMSICE,...) it becomes confusing as the list is ordered alphabetically, not by source. (maybe this could already be changed in 1.4.0 to order the list by the source data sets first).

    Also I would propose to add a dictionary or so for the displayed parameter name. Already the wording "mole_fraction_of_carbon_monoxide_in_air" is automatically replaced by "carbon_monoxide", however it would be clearer to have the chemical formula "CO"

  2. Reimar Bauer reporter
    diff --git a/mslib/msui/ui_wms_dockwidget.ui b/mslib/msui/ui_wms_dockwidget.ui
    index 5d1476e..cb142d3 100644
    --- a/mslib/msui/ui_wms_dockwidget.ui
    +++ b/mslib/msui/ui_wms_dockwidget.ui
    @@ -7,7 +7,7 @@
         <x>0</x>
         <y>0</y>
         <width>1001</width>
    -    <height>155</height>
    +    <height>244</height>
        </rect>
       </property>
       <property name="sizePolicy">
    @@ -25,7 +25,7 @@
       <property name="maximumSize">
        <size>
         <width>16777215</width>
    -    <height>155</height>
    +    <height>244</height>
        </size>
       </property>
       <property name="windowTitle">
    @@ -141,6 +141,71 @@
         </layout>
        </item>
        <item>
    +    <widget class="QLabel" name="label_8">
    +     <property name="sizePolicy">
    +      <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
    +       <horstretch>0</horstretch>
    +       <verstretch>0</verstretch>
    +      </sizepolicy>
    +     </property>
    +     <property name="minimumSize">
    +      <size>
    +       <width>40</width>
    +       <height>0</height>
    +      </size>
    +     </property>
    +     <property name="text">
    +      <string>Layer:</string>
    +     </property>
    +    </widget>
    +   </item>
    +   <item>
    +    <widget class="QComboBox" name="cbLayer">
    +     <property name="sizePolicy">
    +      <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
    +       <horstretch>0</horstretch>
    +       <verstretch>0</verstretch>
    +      </sizepolicy>
    +     </property>
    +     <property name="minimumSize">
    +      <size>
    +       <width>200</width>
    +       <height>0</height>
    +      </size>
    +     </property>
    +     <property name="maximumSize">
    +      <size>
    +       <width>16777215</width>
    +       <height>16777215</height>
    +      </size>
    +     </property>
    +     <property name="styleSheet">
    +      <string notr="true">QComboBox QAbstractItemView { min-width: 600px; }</string>
    +     </property>
    +     <property name="sizeAdjustPolicy">
    +      <enum>QComboBox::AdjustToContentsOnFirstShow</enum>
    +     </property>
    +     <property name="minimumContentsLength">
    +      <number>0</number>
    +     </property>
    +     <item>
    +      <property name="text">
    +       <string>BASEMAP</string>
    +      </property>
    +     </item>
    +     <item>
    +      <property name="text">
    +       <string>MSLP</string>
    +      </property>
    +     </item>
    +     <item>
    +      <property name="text">
    +       <string>TCC</string>
    +      </property>
    +     </item>
    +    </widget>
    +   </item>
    +   <item>
         <layout class="QHBoxLayout" name="horizontalLayout_5">
          <property name="spacing">
           <number>5</number>
    @@ -151,73 +216,7 @@
             <number>5</number>
            </property>
            <item>
    -        <layout class="QHBoxLayout" name="horizontalLayout">
    -         <item>
    -          <widget class="QLabel" name="label_8">
    -           <property name="sizePolicy">
    -            <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
    -             <horstretch>0</horstretch>
    -             <verstretch>0</verstretch>
    -            </sizepolicy>
    -           </property>
    -           <property name="minimumSize">
    -            <size>
    -             <width>40</width>
    -             <height>0</height>
    -            </size>
    -           </property>
    -           <property name="text">
    -            <string>Layer:</string>
    -           </property>
    -          </widget>
    -         </item>
    -         <item>
    -          <widget class="QComboBox" name="cbLayer">
    -           <property name="sizePolicy">
    -            <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
    -             <horstretch>0</horstretch>
    -             <verstretch>0</verstretch>
    -            </sizepolicy>
    -           </property>
    -           <property name="minimumSize">
    -            <size>
    -             <width>200</width>
    -             <height>0</height>
    -            </size>
    -           </property>
    -           <property name="maximumSize">
    -            <size>
    -             <width>16777215</width>
    -             <height>16777215</height>
    -            </size>
    -           </property>
    -           <property name="styleSheet">
    -            <string notr="true">QComboBox QAbstractItemView { min-width: 600px; }</string>
    -           </property>
    -           <property name="sizeAdjustPolicy">
    -            <enum>QComboBox::AdjustToContentsOnFirstShow</enum>
    -           </property>
    -           <property name="minimumContentsLength">
    -            <number>0</number>
    -           </property>
    -           <item>
    -            <property name="text">
    -             <string>BASEMAP</string>
    -            </property>
    -           </item>
    -           <item>
    -            <property name="text">
    -             <string>MSLP</string>
    -            </property>
    -           </item>
    -           <item>
    -            <property name="text">
    -             <string>TCC</string>
    -            </property>
    -           </item>
    -          </widget>
    -         </item>
    -        </layout>
    +        <layout class="QHBoxLayout" name="horizontalLayout"/>
            </item>
            <item>
             <layout class="QHBoxLayout" name="horizontalLayout_2">
    @@ -261,7 +260,7 @@
                 </size>
                </property>
                <property name="styleSheet">
    -             <string notr="true">QComboBox QAbstractItemView { min-width: 600px; }</string>
    +            <string notr="true">QComboBox QAbstractItemView { min-width: 600px; }</string>
                </property>
                <property name="sizeAdjustPolicy">
                 <enum>QComboBox::AdjustToContentsOnFirstShow</enum>
    @@ -293,7 +292,7 @@
               <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;
     &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;
     p, li { white-space: pre-wrap; }
    -&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:7.8pt; font-weight:400; font-style:normal;&quot;&gt;
    +&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
     &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:10pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
              </property>
             </widget>
    @@ -487,12 +486,12 @@ p, li { white-space: pre-wrap; }
                 <date>
                  <year>2010</year>
                  <month>1</month>
    -             <day>18</day>
    +             <day>17</day>
                 </date>
                </property>
                <property name="minimumDateTime">
                 <datetime>
    -             <hour>8</hour>
    +             <hour>7</hour>
                  <minute>0</minute>
                  <second>0</second>
                  <year>2000</year>
    @@ -509,7 +508,7 @@ p, li { white-space: pre-wrap; }
                </property>
                <property name="minimumTime">
                 <time>
    -             <hour>8</hour>
    +             <hour>7</hour>
                  <minute>0</minute>
                  <second>0</second>
                 </time>
    @@ -855,6 +854,19 @@ p, li { white-space: pre-wrap; }
         </layout>
        </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>
    +   <item>
         <widget class="Line" name="line">
          <property name="orientation">
           <enum>Qt::Vertical</enum>
    
  3. Joern Ungermann

    Is this still an issue with the current version? The dropdown box becomes larger when pressed, so one can read all options. "Only" the chosen option is compressed, which is fine in my view. Also, we can efficiently use now multiple servers to reduce the number of layers per server.

  4. Reimar Bauer reporter

    The dropdown box becomes larger when pressed, so one can read all options. This is also the fastest way to select something. Other solutions may need more than two clicks.

    Also we could easily set up more than one server if we want to group data.

    May be on a future redisign of the UI we will come back to this.

  5. Log in to comment