Commit cf1767bc authored by Akarsh Simha's avatar Akarsh Simha
Browse files

Restruct. Obs. Planner: More vertical real estate for the Table Views.

It seems more natural to provide more vertical real estate for the
Table View objects, since the list spans a fairly long length in
typical cases. Just showing 4 rows is not very useful, but showing as
few as 2 columns should still be useful (it takes less scrolling to
scroll through the small number of columns).

However, we would want to make the first column, the one with the
names of objects, always visible irrespective of how we scroll
horizontally. To this end, there is a solution in the form of a Qt
example which we can use in KStars with minimal modification:

http://doc.qt.io/qt-5/qtwidgets-itemviews-frozencolumn-example.html

N.B. The BSD License used in the example is GPL-compatible.

Other improvements necessary are:

1. Put the list on the left -- feels more natural.

2. Move the time schedule option in the Session View below the table
   view.

3. Gray out the date box in WishList mode to indicate its irrelevance?
   It is technically not irrelevant since the RA/Dec shown are
   apparent coords! Maybe this should change.

4. Show some vital info about the object in a label

5. Make sure buttons don't expand if we resize -- only the table view
   must expand to fill up as much real estate as possible.

6. Allow the user to hide / show columns in the TableView.

7. Make sure the "Minify" option works well.

8. Would be nice if we could "minimize" the observing list to an icon
   in the bottom-right of the main window.
parent 81e30115
......@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>837</width>
<width>811</width>
<height>650</height>
</rect>
</property>
......@@ -22,22 +22,7 @@
<height>650</height>
</size>
</property>
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin">
<number>9</number>
</property>
<property name="topMargin">
<number>9</number>
</property>
<property name="rightMargin">
<number>9</number>
</property>
<property name="bottomMargin">
<number>9</number>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_1">
<property name="spacing">
......@@ -392,253 +377,267 @@
</layout>
</item>
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>202</height>
</size>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="WishList">
<attribute name="title">
<string>Wish List</string>
</attribute>
<layout class="QVBoxLayout">
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item>
<widget class="QTableView" name="WishListView">
<widget class="AVTPlotWidget" name="avt">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
<property name="minimumSize">
<size>
<width>350</width>
<height>200</height>
</size>
</property>
<property name="showGrid">
<bool>false</bool>
<property name="maximumSize">
<size>
<width>350</width>
<height>200</height>
</size>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="Session">
<attribute name="title">
<string>Session Plan</string>
</attribute>
<layout class="QHBoxLayout">
<item>
<widget class="QTableView" name="SessionView">
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
<property name="showGrid">
<bool>false</bool>
</property>
<property name="sortingEnabled">
<bool>true</bool>
<property name="cursor">
<cursorShape>CrossCursor</cursorShape>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<widget class="QLabel" name="ImagePreview">
<property name="minimumSize">
<size>
<width>20</width>
<height>40</height>
<width>200</width>
<height>200</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="scheduledTimeLabel">
<property name="text">
<string>Scheduled Time</string>
</property>
</widget>
</item>
<item>
<widget class="QTimeEdit" name="TimeEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>30</height>
<width>200</width>
<height>200</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="SetTime">
<property name="text">
<string>Set Time</string>
<string>(No Image)</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QLabel" name="dssMetadataLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>145</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Image Metadata Info</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="rightMargin">
<number>12</number>
</property>
<item>
<widget class="QPushButton" name="SearchImage">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Replace from internet</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="DeleteImage">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Delete Image</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="Preview">
<property name="topMargin">
<number>0</number>
</property>
<item>
<widget class="AVTPlotWidget" name="avt">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>350</width>
<height>200</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>350</width>
<height>200</height>
</size>
</property>
<property name="cursor">
<cursorShape>CrossCursor</cursorShape>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="ImagePreview">
<property name="minimumSize">
<size>
<width>200</width>
<height>200</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<height>200</height>
</size>
</property>
<property name="text">
<string>(No Image)</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="dssMetadataLabel">
<widget class="QTabWidget" name="tabWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>145</width>
<height>0</height>
<width>0</width>
<height>202</height>
</size>
</property>
<property name="text">
<string>Image Metadata Info</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="WishList">
<attribute name="title">
<string>Wish List</string>
</attribute>
<layout class="QVBoxLayout">
<item>
<widget class="QTableView" name="WishListView">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
<property name="showGrid">
<bool>false</bool>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="Session">
<attribute name="title">
<string>Session Plan</string>
</attribute>
<layout class="QHBoxLayout">
<item>
<widget class="QTableView" name="SessionView">
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
<property name="showGrid">
<bool>false</bool>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout">
<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="QLabel" name="scheduledTimeLabel">
<property name="text">
<string>Scheduled Time</string>
</property>
</widget>
</item>
<item>
<widget class="QTimeEdit" name="TimeEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>30</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="SetTime">
<property name="text">
<string>Set Time</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="rightMargin">
<number>12</number>
</property>
<item>
<widget class="QPushButton" name="SearchImage">
<property name="text">
<string>Find Image</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="DeleteImage">
<property name="text">
<string>Delete</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment