• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • KDevelop Property Editing Library
 

KDevelop Property Editing Library

  • lib
  • widgets
  • propeditor
propertyeditor.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2002-2004 by Alexander Dymo *
3  * cloudtemple@mskat.net *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU Library General Public License as *
7  * published by the Free Software Foundation; either version 2 of the *
8  * License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU Library General Public *
16  * License along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19  ***************************************************************************/
20 #ifndef PROPERTYEDITOR_H
21 #define PROPERTYEDITOR_H
22 
23 #ifndef PURE_QT
24 #include <tdelistview.h>
25 #else
26 #include <tqlistview.h>
27 #define TDEListView TQListView
28 #define TDEListViewItem TQListViewItem
29 #endif
30 
31 #include "propertylist.h"
32 
33 class TQPushButton;
34 class TQGridLayout;
35 
36 namespace PropertyLib{
37 
38 class PropertyItem;
39 class PropertyGroupItem;
40 class PropertyWidget;
41 class Property;
42 class MultiProperty;
43 struct Machine;
44 
58 class PropertyEditor: public TDEListView{
59  Q_OBJECT
60 
61 public:
63  PropertyEditor(TQWidget *parent = 0, const char *name = 0);
64  ~PropertyEditor();
65 
69  Machine *machine(MultiProperty *property);
70 
71 public slots:
73  void populateProperties(PropertyList *list);
75  void clearProperties();
77  void clearMachineCache();
78 
79 signals:
81  void changed();
82 
83 protected slots:
85  void propertyValueChanged(Property* property);
87  void propertyChanged(MultiProperty *property, const TQVariant &value);
88 
90  void slotClicked(TQListViewItem* item);
91  void updateEditorSize();
92 
94  void undo();
95 
96 protected:
97  void editItem(TQListViewItem*, int);
98  void hideEditor();
99  void showEditor(PropertyItem *item);
100  void placeEditor(PropertyItem *item);
101  PropertyWidget *prepareEditor(PropertyItem *item);
102 
103  void addGroup(const TQString &name);
104  void addProperty(PropertyGroupItem *group, const TQString &name);
105  void addProperty(const TQString &name);
106  void addChildProperties(PropertyItem *parent);
107 
108 private:
109  PropertyList *m_list;
110  PropertyList m_detailedList;
111 
112  //machines cache for property types, machines will be deleted
113  TQMap<TQString, Machine* > m_registeredForType;
114 
115  PropertyItem *m_currentEditItem;
116  PropertyWidget *m_currentEditWidget;
117  TQWidget *m_currentEditArea;
118  TQGridLayout *m_currentEditLayout;
119 
120  bool m_doubleClickForEdit;
121  TQListViewItem* m_lastClickedItem;
122 
123  TQPushButton *m_undoButton;
124 
125 friend class PropertyItem;
126 };
127 
128 }
129 
130 #endif
PropertyLib::PropertyEditor::clearProperties
void clearProperties()
Clears property list, disconnects accessor from the editor and deletes it.
Definition: propertyeditor.cpp:283
PropertyLib::PropertyEditor::clearMachineCache
void clearMachineCache()
Deletes cached machines.
Definition: propertyeditor.cpp:456
PropertyLib
Namespace which contain property editing classes.
Definition: childproperty.cpp:29
PropertyLib::PropertyEditor::propertyValueChanged
void propertyValueChanged(Property *property)
Updates property widget in the editor.
Definition: propertyeditor.cpp:297
PropertyLib::PropertyEditor
Property editor.
Definition: propertyeditor.h:58
PropertyLib::PropertyEditor::slotClicked
void slotClicked(TQListViewItem *item)
Shows property editor.
Definition: propertyeditor.cpp:420
PropertyLib::PropertyEditor::undo
void undo()
Undoes the last change in property editor.
Definition: propertyeditor.cpp:465
propertylist.h
Contains PropertyLib::PropertyList class.
PropertyLib::PropertyWidget
An abstract base class of property viewer and editor vidget.
Definition: propertywidget.h:49
PropertyLib::PropertyEditor::populateProperties
void populateProperties(PropertyList *list)
Shows properties from a list.
Definition: propertyeditor.cpp:212
PropertyLib::PropertyList
The list of properties.
Definition: propertylist.h:55
PropertyLib::PropertyEditor::propertyChanged
void propertyChanged(MultiProperty *property, const TQVariant &value)
Updates property in the list when new value is selected in the editor.
Definition: propertyeditor.cpp:314
PropertyLib::PropertyEditor::PropertyEditor
PropertyEditor(TQWidget *parent=0, const char *name=0)
Constructs the property editor.
Definition: propertyeditor.cpp:167
PropertyLib::Property
Property.
Definition: property.h:62
PropertyLib::MultiProperty
Holds a list of properties with the same name and type.
Definition: multiproperty.h:49
PropertyLib::Machine
Machine for a property type.
Definition: propertymachinefactory.h:46
PropertyLib::PropertyEditor::machine
Machine * machine(MultiProperty *property)
Definition: propertyeditor.cpp:440
PropertyLib::PropertyEditor::changed
void changed()
Emitted when something is changed in property editor.

KDevelop Property Editing Library

Skip menu "KDevelop Property Editing Library"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

KDevelop Property Editing Library

Skip menu "KDevelop Property Editing Library"
  • buildtools
  •   lib
  •     base
  •     parsers
  •       autotools
  •       qmake
  •     widgets
  •   api
  • languages
  •   lib
  •     debugger
  •     designer_integration
  •     interfaces
  • lib
  •   catalog
  •   interfaces
  •     extensions
  •     external
  •     extras
  •   util
  •   widgets
  •     propeditor
  • parts
  •   documentation
  •     interfaces
  • src
  •   profileengine
  •     lib
Generated for KDevelop Property Editing Library by doxygen 1.8.13
This website is maintained by Timothy Pearson.