Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bazhenovc committed Feb 14, 2016
0 parents commit 182aadc
Show file tree
Hide file tree
Showing 87 changed files with 19,492 additions and 0 deletions.
22 changes: 22 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

project(QtPropertyBrowser)

find_package(Qt5Widgets REQUIRED)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)

include_directories(src)

macro(AddFileDirectory dir)
file(GLOB SRC ${dir}/*.*)

set(LOCAL_SRC_ALL ${LOCAL_SRC_ALL} ${SRC})
endmacro()

AddFileDirectory(src)

add_library(QtPropertyBrowser STATIC ${LOCAL_SRC_ALL})
target_link_libraries(QtPropertyBrowser Qt5::Widgets)
254 changes: 254 additions & 0 deletions INSTALL.TXT
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@
INSTALLATION INSTRUCTIONS

These instructions refer to the package you are installing as
some-package.tar.gz or some-package.zip. The .zip file is intended for use
on Windows.

The directory you choose for the installation will be referred to as
your-install-dir.

Note to Qt Visual Studio Integration users: In the instructions below,
instead of building from command line with nmake, you can use the menu
command 'Qt->Open Solution from .pro file' on the .pro files in the
example and plugin directories, and then build from within Visual
Studio.

Unpacking and installation
--------------------------

1. Unpacking the archive (if you have not done so already).

On Unix and Mac OS X (in a terminal window):

cd your-install-dir
gunzip some-package.tar.gz
tar xvf some-package.tar

This creates the subdirectory some-package containing the files.

On Windows:

Unpack the .zip archive by right-clicking it in explorer and
choosing "Extract All...". If your version of Windows does not
have zip support, you can use the infozip tools available
from www.info-zip.org.

If you are using the infozip tools (in a command prompt window):
cd your-install-dir
unzip some-package.zip

2. Configuring the package.

The configure script is called "configure" on unix/mac and
"configure.bat" on Windows. It should be run from a command line
after cd'ing to the package directory.

You can choose whether you want to use the component by including
its source code directly into your project, or build the component
as a dynamic shared library (DLL) that is loaded into the
application at run-time. The latter may be preferable for
technical or licensing (LGPL) reasons. If you want to build a DLL,
run the configure script with the argument "-library". Also see
the note about usage below.

(Components that are Qt plugins, e.g. styles and image formats,
are by default built as a plugin DLL.)

The configure script will prompt you in some cases for further
information. Answer these questions and carefully read the license text
before accepting the license conditions. The package cannot be used if
you do not accept the license conditions.

3. Building the component and examples (when required).

If a DLL is to be built, or if you would like to build the
examples, next give the commands

qmake
make [or nmake if your are using Microsoft Visual C++]

The example program(s) can be found in the directory called
"examples" or "example".

Components that are Qt plugins, e.g. styles and image formats, are
ready to be used as soon as they are built, so the rest of this
installation instruction can be skipped.

4. Building the Qt Designer plugin (optional).

Some of the widget components are provided with plugins for Qt
Designer. To build and install the plugin, cd into the
some-package/plugin directory and give the commands

qmake
make [or nmake if your are using Microsoft Visual C++]

Restart Qt Designer to make it load the new widget plugin.

Note: If you are using the built-in Qt Designer from the Qt Visual
Studio Integration, you will need to manually copy the plugin DLL
file, i.e. copy
%QTDIR%\plugins\designer\some-component.dll
to the Qt Visual Studio Integration plugin path, typically:
C:\Program Files\Trolltech\Qt VS Integration\plugins

Note: If you for some reason are using a Qt Designer that is built
in debug mode, you will need to build the plugin in debug mode
also. Edit the file plugin.pro in the plugin directory, changing
'release' to 'debug' in the CONFIG line, before running qmake.



Solutions components are intended to be used directly from the package
directory during development, so there is no 'make install' procedure.


Using a component in your project
---------------------------------

To use this component in your project, add the following line to the
project's .pro file (or do the equivalent in your IDE):

include(your-install-dir/some-package/src/some-package.pri)

This adds the package's sources and headers to the SOURCES and HEADERS
project variables respectively (or, if the component has been
configured as a DLL, it adds that library to the LIBS variable), and
updates INCLUDEPATH to contain the package's src
directory. Additionally, the .pri file may include some dependencies
needed by the package.

To include a header file from the package in your sources, you can now
simply use:

#include <SomeClass>

or alternatively, in pre-Qt 4 style:

#include <some-class.h>

Refer to the documentation to see the classes and headers this
components provides.



Install documentation (optional)
--------------------------------

The HTML documentation for the package's classes is located in the
your-install-dir/some-package/doc/html/index.html. You can open this
file and read the documentation with any web browser.

To install the documentation into Qt Assistant (for Qt version 4.4 and
later):

1. In Assistant, open the Edit->Preferences dialog and choose the
Documentation tab. Click the Add... button and select the file
your-install-dir/some-package/doc/html/some-package.qch

For Qt versions prior to 4.4, do instead the following:

1. The directory your-install-dir/some-package/doc/html contains a
file called some-package.dcf. Execute the following commands in a
shell, command prompt or terminal window:

cd your-install-dir/some-package/doc/html/
assistant -addContentFile some-package.dcf

The next time you start Qt Assistant, you can access the package's
documentation.


Removing the documentation from assistant
-----------------------------------------

If you have installed the documentation into Qt Assistant, and want to uninstall it, do as follows, for Qt version 4.4 and later:

1. In Assistant, open the Edit->Preferences dialog and choose the
Documentation tab. In the list of Registered Documentation, select
the item com.nokia.qtsolutions.some-package_version, and click
the Remove button.

For Qt versions prior to 4.4, do instead the following:

1. The directory your-install-dir/some-package/doc/html contains a
file called some-package.dcf. Execute the following commands in a
shell, command prompt or terminal window:

cd your-install-dir/some-package/doc/html/
assistant -removeContentFile some-package.dcf



Using the component as a DLL
----------------------------

1. Normal components

The shared library (DLL) is built and placed in the
some-package/lib directory. It is intended to be used directly
from there during development. When appropriate, both debug and
release versions are built, since the run-time linker will in some
cases refuse to load a debug-built DLL into a release-built
application or vice versa.

The following steps are taken by default to help the dynamic
linker to locate the DLL at run-time (during development):

Unix: The some-package.pri file will add linker instructions to
add the some-package/lib directory to the rpath of the
executable. (When distributing, or if your system does not support
rpath, you can copy the shared library to another place that is
searched by the dynamic linker, e.g. the "lib" directory of your
Qt installation.)

Mac: The full path to the library is hardcoded into the library
itself, from where it is copied into the executable at link time,
and ready by the dynamic linker at run-time. (When distributing,
you will want to edit these hardcoded paths in the same way as for
the Qt DLLs. Refer to the document "Deploying an Application on
Mac OS X" in the Qt Reference Documentation.)

Windows: the .dll file(s) are copied into the "bin" directory of
your Qt installation. The Qt installation will already have set up
that directory to be searched by the dynamic linker.


2. Plugins

For Qt Solutions plugins (e.g. image formats), both debug and
release versions of the plugin are built by default when
appropriate, since in some cases the release Qt library will not
load a debug plugin, and vice versa. The plugins are automatically
copied into the plugins directory of your Qt installation when
built, so no further setup is required.

Plugins may also be built statically, i.e. as a library that will be
linked into your application executable, and so will not need to
be redistributed as a separate plugin DLL to end users. Static
building is required if Qt itself is built statically. To do it,
just add "static" to the CONFIG variable in the plugin/plugin.pro
file before building. Refer to the "Static Plugins" section in the
chapter "How to Create Qt Plugins" for explanation of how to use a
static plugin in your application. The source code of the example
program(s) will also typically contain the relevant instructions
as comments.



Uninstalling
------------

The following command will remove any fils that have been
automatically placed outside the package directory itself during
installation and building

make distclean [or nmake if your are using Microsoft Visual C++]

If Qt Assistant documentation or Qt Designer plugins have been
installed, they can be uninstalled manually, ref. above.


Enjoy! :)

- The Qt Solutions Team.
94 changes: 94 additions & 0 deletions README_ORIG.TXT
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
Qt Solutions Component: Property Browser

A property browser framework enabling the user to edit a set of
properties.

The framework provides a browser widget that displays the given
properties with labels and corresponding editing widgets (e.g.
line edits or comboboxes). The various types of editing widgets
are provided by the framework's editor factories: For each
property type, the framework provides a property manager (e.g.
QtIntPropertyManager and QtStringPropertyManager) which can be
associated with the preferred editor factory (e.g.
QtSpinBoxFactory and QtLineEditFactory). The framework also
provides a variant based property type with corresponding variant
manager and factory. Finally, the framework provides three
ready-made implementations of the browser widget:
QtTreePropertyBrowser, QtButtonPropertyBrowser and
QtGroupBoxPropertyBrowser.

Version history:

2.1: - QtTreePropertyBrowser - tooltip of property applied to
first column, while second column shows the value text of property
in its tooltip
- QtAbstractPropertyManager - initializeProperty() and
uninitializeProperty() without const modifier now
- QtTreePropertyBrowser and QtGroupBoxPropertyBrowser - internal
margin set to 0
- QtProperty - setEnabled() and isEnabled() methods added
- QtTreePropertyBrowser - "rootIsDecorated", "indentation" and
"headerVisible" properties added
- QtProperty - hasValue() method added, useful for group
properties

2.2: - FocusOut event now filtered out in case of
Qt::ActiveWindowFocusReason reason. In that case editor is not
closed when its sub dialog is executed
- Removed bug in color icon generation
- Decimals attribute added to "double" property type
- PointF, SizeF and RectF types supported
- Proper translation calls for tree property browser
- QtProperty - ensure inserted subproperty is different from
"this" property
- QtBrowserItem class introduced, useful for identifying browser's
gui elements
- Possibility to control expanded state of QtTreePropertyBrowser's
items from code
- QtTreePropertyBrowser - "resizeMode" and "splitterPosition"
properties added
- QtGroupBoxPropertyBrowser - fixed crash in case of deleting the
editor factory and then deleting the manager
- "Decoration" example added - it shows how to add new
responsibilities to the existing managers and editor factories

2.3: - Various bugfixes and improvements
- QtProperty - setModified() and isModified() methods added
- QtTreePropertyBrowser - disabling an item closes its editor
- KeySequence, Char, Locale and Cursor types supported
- Support for icons in enum type added
- Kerning subproperty exposed in Font type
- New property browser class added - QtButtonPropertyBrowser with
drop down button as a grouping element

2.4: - Fixed memory leak of QtProperty
- QtTreePropertyBrowser - group items are rendered better
- QtTreePropertyBrowser - propertiesWithoutValueMarked and
alternatingRowColors features added
- QtTreePropertyBrowser - possibility of coloring properties added
- QtTreePropertyBrowser - keyboard navigation improved
- New factories providing popup dialogs added:
QtColorEditorFactory and QtFontEditorFactory
- Single step attribute added to: QtIntPropertyManager and
QtDoublePropertyManager

2.5: - "Object Controller" example added. It implements a similar
widget to the property editor in QDesigner
- Compile with QT_NO_CURSOR
- Expand root item with single click on the '+' icon
- QtRectPropertyManager and QtRectFPropertyManager - by default
constraint is null rect meaning no constraint is applied

2.6: - QtGroupPropertyBrowser - don't force the layout to show the
whole labels' contents for read only properties, show tooltips for
them in addition.
- QtTreePropertyBrowser - fixed painting of the editor for color
property type when style sheet is used (QTSOLBUG-64).
- Make it possible to change the style of the checkboxes with a
stylesheet (QTSOLBUG-61).
- Change the minimum size of a combobox so that it can show at
least one character and an icon.
- Make it possible to properly style custom embedded editors (e.g.
the color editor provided with the solution).

2.7: - Added FilePath property manager.
1 change: 1 addition & 0 deletions src/QtAbstractEditorFactoryBase
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "qtpropertybrowser.h"
1 change: 1 addition & 0 deletions src/QtAbstractPropertyBrowser
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "qtpropertybrowser.h"
1 change: 1 addition & 0 deletions src/QtAbstractPropertyManager
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "qtpropertybrowser.h"
1 change: 1 addition & 0 deletions src/QtBoolPropertyManager
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "qtpropertymanager.h"
1 change: 1 addition & 0 deletions src/QtBrowserItem
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "qtpropertybrowser.h"
1 change: 1 addition & 0 deletions src/QtButtonPropertyBrowser
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "qtbuttonpropertybrowser.h"
1 change: 1 addition & 0 deletions src/QtCharEditorFactory
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "qteditorfactory.h"
1 change: 1 addition & 0 deletions src/QtCharPropertyManager
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "qtpropertymanager.h"
1 change: 1 addition & 0 deletions src/QtCheckBoxFactory
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "qteditorfactory.h"
1 change: 1 addition & 0 deletions src/QtColorEditorFactory
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "qteditorfactory.h"
1 change: 1 addition & 0 deletions src/QtColorPropertyManager
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "qtpropertymanager.h"
1 change: 1 addition & 0 deletions src/QtCursorEditorFactory
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "qteditorfactory.h"
1 change: 1 addition & 0 deletions src/QtCursorPropertyManager
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "qtpropertymanager.h"
Loading

0 comments on commit 182aadc

Please sign in to comment.