[kplato] Two GUI questions

Thomas Zander kplato@kde.org
Thu, 20 Feb 2003 09:45:38 +0100


--bp/iNruPH9dso1Pn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Tue, Feb 18, 2003 at 09:53:38PM +0000, John Lamb wrote:
> 1. What is a good way to put durations (times) into the tasks in the
> GUI? I think we need to enter them as a set of parameters for a 
> distribution. The default should be a fixed distribution: the _time_ for 
> the task. Then a PERT distribution: three times. Possibly, later other 
> distributions. But, how do we enter a time? It will be too much to ask 
> for days and hours and minutes and seconds always. One possibility is to 
> set a time scale for the project: days, weeks, hours. Then the default 
> is to ask for times in the project _time scale_.

I suggest to give comprehensive input widgets and a very verbose direct
feedback line.

Hmm, an 'adjust' section would be nice; so adding 30 days does not require
you to calculate the amount of weeks or months..

What about the attached UI file :)

I think that is a wonderful way to edit durations!

What it should look like (functionality)
The top label is adjusted continuesly to show the current duration.
The 'less then a day' and 'amount of days' can be edited by the user and
the top label should change.  The input field should get a custom made
input verifier to make sure only digits and the chars 'dwy' for day, week
year can be entered.

The 'adjust time' field can be used to add or subtract time of the current
duration.
The 'ok' should then clean the spinbox so dubble-clicking does nothing.
Naturally the ok should also update the top-label and the 'amount of days'
lineedit

Hope you like it.

-- 
Thomas Zander

--bp/iNruPH9dso1Pn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="durationdialog.ui"

<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>DurationDialog</class>
<widget class="QWidget">
    <property name="name">
        <cstring>DurationDialog</cstring>
    </property>
    <property name="geometry">
        <rect>
            <x>0</x>
            <y>0</y>
            <width>415</width>
            <height>304</height>
        </rect>
    </property>
    <property name="caption">
        <string>Adjust duration</string>
    </property>
    <vbox>
        <property name="name">
            <cstring>unnamed</cstring>
        </property>
        <widget class="QLayoutWidget">
            <property name="name">
                <cstring>layout6</cstring>
            </property>
            <hbox>
                <property name="name">
                    <cstring>unnamed</cstring>
                </property>
                <widget class="QLabel">
                    <property name="name">
                        <cstring>textLabel1</cstring>
                    </property>
                    <property name="text">
                        <string>Duration:</string>
                    </property>
                </widget>
                <widget class="QLabel">
                    <property name="name">
                        <cstring>textLabel2</cstring>
                    </property>
                    <property name="text">
                        <string>1 week, 1day, 15 hours 14 minutes</string>
                    </property>
                </widget>
                <spacer>
                    <property name="name">
                        <cstring>spacer2</cstring>
                    </property>
                    <property name="orientation">
                        <enum>Horizontal</enum>
                    </property>
                    <property name="sizeType">
                        <enum>Expanding</enum>
                    </property>
                    <property name="sizeHint">
                        <size>
                            <width>335</width>
                            <height>20</height>
                        </size>
                    </property>
                </spacer>
            </hbox>
        </widget>
        <widget class="Line">
            <property name="name">
                <cstring>line4</cstring>
            </property>
            <property name="frameShape">
                <enum>HLine</enum>
            </property>
            <property name="frameShadow">
                <enum>Sunken</enum>
            </property>
            <property name="orientation">
                <enum>Horizontal</enum>
            </property>
        </widget>
        <widget class="QLayoutWidget">
            <property name="name">
                <cstring>layout3</cstring>
            </property>
            <grid>
                <property name="name">
                    <cstring>unnamed</cstring>
                </property>
                <widget class="QLabel" row="0" column="0">
                    <property name="name">
                        <cstring>textLabel3</cstring>
                    </property>
                    <property name="text">
                        <string>Less then a day:</string>
                    </property>
                </widget>
                <widget class="QLineEdit" row="1" column="1">
                    <property name="name">
                        <cstring>lineEdit1</cstring>
                    </property>
                    <property name="text">
                        <string>1w, 1d</string>
                    </property>
                </widget>
                <widget class="QLayoutWidget" row="0" column="1">
                    <property name="name">
                        <cstring>layout1</cstring>
                    </property>
                    <hbox>
                        <property name="name">
                            <cstring>unnamed</cstring>
                        </property>
                        <widget class="QTimeEdit">
                            <property name="name">
                                <cstring>timeEdit1</cstring>
                            </property>
                            <property name="time">
                                <time>
                                    <hour>15</hour>
                                    <minute>14</minute>
                                    <second>0</second>
                                </time>
                            </property>
                        </widget>
                        <spacer>
                            <property name="name">
                                <cstring>spacer1</cstring>
                            </property>
                            <property name="orientation">
                                <enum>Horizontal</enum>
                            </property>
                            <property name="sizeType">
                                <enum>Expanding</enum>
                            </property>
                            <property name="sizeHint">
                                <size>
                                    <width>21</width>
                                    <height>20</height>
                                </size>
                            </property>
                        </spacer>
                    </hbox>
                </widget>
                <widget class="QLabel" row="1" column="0">
                    <property name="name">
                        <cstring>textLabel4</cstring>
                    </property>
                    <property name="text">
                        <string>Amount of days:</string>
                    </property>
                </widget>
            </grid>
        </widget>
        <widget class="QGroupBox">
            <property name="name">
                <cstring>groupBox2</cstring>
            </property>
            <property name="title">
                <string>Adjust time</string>
            </property>
            <vbox>
                <property name="name">
                    <cstring>unnamed</cstring>
                </property>
                <widget class="QLayoutWidget">
                    <property name="name">
                        <cstring>layout8</cstring>
                    </property>
                    <hbox>
                        <property name="name">
                            <cstring>unnamed</cstring>
                        </property>
                        <widget class="QComboBox">
                            <item>
                                <property name="text">
                                    <string>Add</string>
                                </property>
                            </item>
                            <item>
                                <property name="text">
                                    <string>Subtract</string>
                                </property>
                            </item>
                            <property name="name">
                                <cstring>comboBox1</cstring>
                            </property>
                        </widget>
                        <widget class="QSpinBox">
                            <property name="name">
                                <cstring>spinBox1</cstring>
                            </property>
                        </widget>
                        <widget class="QComboBox">
                            <item>
                                <property name="text">
                                    <string>Day(s)</string>
                                </property>
                            </item>
                            <item>
                                <property name="text">
                                    <string>Week(s)</string>
                                </property>
                            </item>
                            <item>
                                <property name="text">
                                    <string>Year(s)</string>
                                </property>
                            </item>
                            <item>
                                <property name="text">
                                    <string>Leap year(s)</string>
                                </property>
                            </item>
                            <item>
                                <property name="text">
                                    <string>Hour(s)</string>
                                </property>
                            </item>
                            <item>
                                <property name="text">
                                    <string>Minute(s)</string>
                                </property>
                            </item>
                            <item>
                                <property name="text">
                                    <string>Second(s)</string>
                                </property>
                            </item>
                            <property name="name">
                                <cstring>comboBox2</cstring>
                            </property>
                        </widget>
                        <spacer>
                            <property name="name">
                                <cstring>spacer6_2</cstring>
                            </property>
                            <property name="orientation">
                                <enum>Horizontal</enum>
                            </property>
                            <property name="sizeType">
                                <enum>Expanding</enum>
                            </property>
                            <property name="sizeHint">
                                <size>
                                    <width>31</width>
                                    <height>20</height>
                                </size>
                            </property>
                        </spacer>
                    </hbox>
                </widget>
                <widget class="QLayoutWidget">
                    <property name="name">
                        <cstring>layout11</cstring>
                    </property>
                    <hbox>
                        <property name="name">
                            <cstring>unnamed</cstring>
                        </property>
                        <spacer>
                            <property name="name">
                                <cstring>spacer7</cstring>
                            </property>
                            <property name="orientation">
                                <enum>Horizontal</enum>
                            </property>
                            <property name="sizeType">
                                <enum>Expanding</enum>
                            </property>
                            <property name="sizeHint">
                                <size>
                                    <width>240</width>
                                    <height>20</height>
                                </size>
                            </property>
                        </spacer>
                        <widget class="QPushButton">
                            <property name="name">
                                <cstring>pushButton11</cstring>
                            </property>
                            <property name="text">
                                <string>Ok</string>
                            </property>
                        </widget>
                    </hbox>
                </widget>
            </vbox>
        </widget>
        <spacer>
            <property name="name">
                <cstring>spacer3</cstring>
            </property>
            <property name="orientation">
                <enum>Vertical</enum>
            </property>
            <property name="sizeType">
                <enum>Expanding</enum>
            </property>
            <property name="sizeHint">
                <size>
                    <width>21</width>
                    <height>20</height>
                </size>
            </property>
        </spacer>
        <widget class="Line">
            <property name="name">
                <cstring>line2</cstring>
            </property>
            <property name="frameShape">
                <enum>HLine</enum>
            </property>
            <property name="frameShadow">
                <enum>Sunken</enum>
            </property>
            <property name="orientation">
                <enum>Horizontal</enum>
            </property>
        </widget>
        <widget class="QLayoutWidget">
            <property name="name">
                <cstring>layout9</cstring>
            </property>
            <hbox>
                <property name="name">
                    <cstring>unnamed</cstring>
                </property>
                <widget class="QPushButton">
                    <property name="name">
                        <cstring>pushButton10</cstring>
                    </property>
                    <property name="text">
                        <string>Help</string>
                    </property>
                </widget>
                <spacer>
                    <property name="name">
                        <cstring>spacer6</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>pushButton1</cstring>
                    </property>
                    <property name="text">
                        <string>&amp;Ok</string>
                    </property>
                </widget>
                <widget class="QPushButton">
                    <property name="name">
                        <cstring>pushButton3</cstring>
                    </property>
                    <property name="text">
                        <string>&amp;Apply</string>
                    </property>
                </widget>
                <widget class="QPushButton">
                    <property name="name">
                        <cstring>pushButton2</cstring>
                    </property>
                    <property name="text">
                        <string>&amp;Cancel</string>
                    </property>
                </widget>
            </hbox>
        </widget>
    </vbox>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

--bp/iNruPH9dso1Pn--