Changeset 66327a0 for src/gui


Ignore:
Timestamp:
01/12/10 09:15:42 (13 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
72f6fe4
Parents:
5034a83
Message:

modified model-view

  • created own delegate to display TreeView? items
    • contains also 'controls' - which are clickable (handled in TreeView?)
  • created own TreeView? inherited from QTreeView
    • to handle control-clicks of the Delegate
  • minor modifications to MainWindow? UI
  • icons added
Location:
src/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/gui/mainwindow.cpp

    r5034a83 r66327a0  
    55
    66#include <eventmodel.h>
     7#include <delegate.h>
    78
    89MainWindow::MainWindow(QWidget *parent)
     
    1617    setupUi(this);
    1718    //TODO Palo: continue
    18     //treeView->setModel(new QDirModel);
     19    treeView->setHeaderHidden(true);
     20    treeView->setRootIsDecorated(false);
     21    treeView->setIndentation(0);
     22    treeView->setAnimated(true);
    1923    treeView->setModel(new EventModel());
     24    treeView->setItemDelegate(new Delegate(treeView));
    2025}
     26
  • src/gui/mainwindow.ui

    r5034a83 r66327a0  
    66    <x>0</x>
    77    <y>0</y>
    8     <width>800</width>
    9     <height>600</height>
     8    <width>856</width>
     9    <height>558</height>
    1010   </rect>
    1111  </property>
     
    1414  </property>
    1515  <widget class="QWidget" name="centralwidget" >
    16    <widget class="QTabWidget" name="tabWidget" >
    17     <property name="geometry" >
    18      <rect>
    19       <x>0</x>
    20       <y>0</y>
    21       <width>791</width>
    22       <height>551</height>
    23      </rect>
    24     </property>
    25     <property name="currentIndex" >
    26      <number>0</number>
    27     </property>
    28     <widget class="QWidget" name="tab" >
    29      <attribute name="title" >
    30       <string>Tab 1</string>
    31      </attribute>
    32      <widget class="QTreeView" name="treeView" >
    33       <property name="geometry" >
    34        <rect>
    35         <x>0</x>
    36         <y>0</y>
    37         <width>781</width>
    38         <height>521</height>
    39        </rect>
     16   <layout class="QGridLayout" name="gridLayout" >
     17    <item row="0" column="0" >
     18     <widget class="QTabWidget" name="tabWidget" >
     19      <property name="currentIndex" >
     20       <number>0</number>
    4021      </property>
     22      <widget class="QWidget" name="tab" >
     23       <attribute name="title" >
     24        <string>Tab 1</string>
     25       </attribute>
     26       <layout class="QGridLayout" name="gridLayout_2" >
     27        <item row="0" column="0" >
     28         <layout class="QVBoxLayout" name="verticalLayout" >
     29          <item>
     30           <widget class="TreeView" name="treeView" >
     31            <property name="maximumSize" >
     32             <size>
     33              <width>16777215</width>
     34              <height>16777215</height>
     35             </size>
     36            </property>
     37           </widget>
     38          </item>
     39         </layout>
     40        </item>
     41       </layout>
     42      </widget>
     43      <widget class="QWidget" name="tab_2" >
     44       <attribute name="title" >
     45        <string>Tab 2</string>
     46       </attribute>
     47      </widget>
    4148     </widget>
    42     </widget>
    43     <widget class="QWidget" name="tab_2" >
    44      <attribute name="title" >
    45       <string>Tab 2</string>
    46      </attribute>
    47     </widget>
    48    </widget>
     49    </item>
     50   </layout>
    4951  </widget>
    5052  <widget class="QMenuBar" name="menubar" >
     
    5355     <x>0</x>
    5456     <y>0</y>
    55      <width>800</width>
    56      <height>25</height>
     57     <width>856</width>
     58     <height>22</height>
    5759    </rect>
    5860   </property>
     
    6062  <widget class="QStatusBar" name="statusbar" />
    6163 </widget>
     64 <customwidgets>
     65  <customwidget>
     66   <class>TreeView</class>
     67   <extends>QTreeView</extends>
     68   <header>../model/treeview.h</header>
     69  </customwidget>
     70 </customwidgets>
    6271 <resources/>
    6372 <connections/>
Note: See TracChangeset for help on using the changeset viewer.