Initial import
100
.gitignore
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
# This file is used to ignore files which are generated
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
*~
|
||||
*.a
|
||||
*.core
|
||||
*.moc
|
||||
*.o
|
||||
*.obj
|
||||
*.orig
|
||||
*.rej
|
||||
*.so
|
||||
*_pch.h.cpp
|
||||
*_resource.rc
|
||||
.#*
|
||||
*.*#
|
||||
core
|
||||
.qmake.cache
|
||||
tags
|
||||
.DS_Store
|
||||
*.debug
|
||||
Makefile*
|
||||
*.prl
|
||||
*.app
|
||||
moc_*.cpp
|
||||
ui_*.h
|
||||
qrc_*.cpp
|
||||
|
||||
# xemacs temporary files
|
||||
*.flc
|
||||
|
||||
# Vim temporary files
|
||||
.*.swp
|
||||
|
||||
# Visual Studio generated files
|
||||
*.ib_pdb_index
|
||||
*.idb
|
||||
*.ilk
|
||||
*.pdb
|
||||
*.sln
|
||||
*.suo
|
||||
*.vcproj
|
||||
*vcproj.*.*.user
|
||||
*.ncb
|
||||
|
||||
# MinGW generated files
|
||||
*.Debug
|
||||
*.Release
|
||||
|
||||
# Directories to ignore
|
||||
# ---------------------
|
||||
|
||||
debug
|
||||
examples/tools/plugandpaint/plugins
|
||||
include/*
|
||||
include/*/*
|
||||
lib/*
|
||||
plugins/*/*
|
||||
release
|
||||
tmp
|
||||
doc-build
|
||||
doc/html/*
|
||||
doc/qch
|
||||
doc-build
|
||||
.rcc
|
||||
.pch
|
||||
src/corelib/lib
|
||||
src/network/lib
|
||||
src/xml/lib/
|
||||
|
||||
# Files copied by syncIde
|
||||
# -----------------------
|
||||
bin/Aggregation.dll
|
||||
bin/CodeModel.dll
|
||||
bin/ExtensionSystem.dll
|
||||
bin/QtConcurrent.dll
|
||||
bin/Utils.dll
|
||||
bin/qtcreator
|
||||
bin/qtcreator.exe
|
||||
shared/help/bookmarkdialog.ui
|
||||
shared/help/bookmarkmanager.cpp
|
||||
shared/help/bookmarkmanager.h
|
||||
shared/help/contentwindow.cpp
|
||||
shared/help/contentwindow.h
|
||||
shared/help/filternamedialog.cpp
|
||||
shared/help/filternamedialog.h
|
||||
shared/help/filternamedialog.ui
|
||||
shared/help/helpviewer.cpp
|
||||
shared/help/helpviewer.h
|
||||
shared/help/indexwindow.cpp
|
||||
shared/help/indexwindow.h
|
||||
shared/help/topicchooser.cpp
|
||||
shared/help/topicchooser.h
|
||||
shared/help/topicchooser.ui
|
||||
shared/proparser/abstractproitemvisitor.h
|
||||
shared/proparser/profileevaluator.cpp
|
||||
shared/proparser/profileevaluator.h
|
||||
shared/proparser/proitems.cpp
|
||||
shared/proparser/proitems.h
|
||||
shared/proparser/proparserutils.h
|
13
bin/designer/templates.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<designertemplates version="1.0.0">
|
||||
<template name="Widget Form" description="Create new widget form" uifile="templates/Widget.ui">
|
||||
</template>
|
||||
<template name="Mainwindow Form" description="Create new mainwindow form" uifile="templates/Main_Window.ui">
|
||||
</template>
|
||||
<template name="Dialog without buttons" description="Create a dialog without buttons." uifile="templates/Dialog_without_Buttons.ui">
|
||||
</template>
|
||||
<template name="Dialog with buttons bottom" description="Create a dialog with the buttons at the bottom." uifile="templates/Dialog_with_Buttons_Bottom.ui">
|
||||
</template>
|
||||
<template name="Dialog with buttons right" description="Create a dialog with the buttons at the right." uifile="templates/Dialog_with_Buttons_Right.ui">
|
||||
</template>
|
||||
</designertemplates>
|
71
bin/designer/templates/Dialog_with_Buttons_Bottom.ui
Normal file
@@ -0,0 +1,71 @@
|
||||
<ui version="4.0" >
|
||||
<author></author>
|
||||
<comment></comment>
|
||||
<exportmacro></exportmacro>
|
||||
<class>Dialog</class>
|
||||
<widget class="QDialog" name="Dialog" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QDialogButtonBox" name="buttonBox" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>240</y>
|
||||
<width>341</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons" >
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>Dialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>Dialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
71
bin/designer/templates/Dialog_with_Buttons_Right.ui
Normal file
@@ -0,0 +1,71 @@
|
||||
<ui version="4.0" >
|
||||
<author></author>
|
||||
<comment></comment>
|
||||
<exportmacro></exportmacro>
|
||||
<class>Dialog</class>
|
||||
<widget class="QDialog" name="Dialog" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QDialogButtonBox" name="buttonBox" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>290</x>
|
||||
<y>20</y>
|
||||
<width>81</width>
|
||||
<height>241</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="standardButtons" >
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>Dialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>Dialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel" >
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel" >
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
18
bin/designer/templates/Dialog_without_Buttons.ui
Normal file
@@ -0,0 +1,18 @@
|
||||
<ui version="4.0" >
|
||||
<class>Dialog</class>
|
||||
<widget class="QDialog" name="Dialog" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
27
bin/designer/templates/Main_Window.ui
Normal file
@@ -0,0 +1,27 @@
|
||||
<ui version="4.0" >
|
||||
<author></author>
|
||||
<comment></comment>
|
||||
<exportmacro></exportmacro>
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow" >
|
||||
<property name="objectName" >
|
||||
<string notr="true" >MainWindow</string>
|
||||
</property>
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>MainWindow</string>
|
||||
</property>
|
||||
<widget class="QMenuBar" name="menubar" />
|
||||
<widget class="QWidget" name="centralwidget" />
|
||||
<widget class="QStatusBar" name="statusbar" />
|
||||
</widget>
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<connections/>
|
||||
</ui>
|
24
bin/designer/templates/Widget.ui
Normal file
@@ -0,0 +1,24 @@
|
||||
<ui version="4.0" >
|
||||
<author></author>
|
||||
<comment></comment>
|
||||
<exportmacro></exportmacro>
|
||||
<class>Form</class>
|
||||
<widget class="QWidget" name="Form" >
|
||||
<property name="objectName" >
|
||||
<string notr="true" >Form</string>
|
||||
</property>
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>Form</string>
|
||||
</property>
|
||||
</widget>
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<connections/>
|
||||
</ui>
|
87
bin/gdbmacros/GPL_EXCEPTION.TXT
Normal file
@@ -0,0 +1,87 @@
|
||||
Nokia Corporation Qt GPL Exception version 1.3
|
||||
==============================================
|
||||
|
||||
Additional rights granted beyond the GPL (the "Exception").
|
||||
|
||||
As a special exception to the terms and conditions of GPL version 2.0 or GPL
|
||||
version 3.0, Nokia Corporation hereby grants you the rights described below,
|
||||
provided you agree to the terms and conditions in this Exception, including its
|
||||
obligations and restrictions on use.
|
||||
|
||||
Nothing in this Exception gives you or anyone else the right to change the
|
||||
licensing terms of the Qt Open Source Edition.
|
||||
|
||||
Below, "Licensed Software" shall refer to the software licensed under the GPL
|
||||
version 2.0 or GPL version 3.0 and this exception.
|
||||
|
||||
1) The right to use open source licenses not compatible with the GNU
|
||||
General Public License version 2.0 or GNU General Public License version
|
||||
3.0: You may link software (hereafter referred to as "Your Software")
|
||||
against the Licensed Software and/or distribute binaries of Your Software
|
||||
linked against the Licensed Software, provided that:
|
||||
|
||||
A) Your Software is licensed under one of the following licenses:
|
||||
|
||||
|
||||
License name Version(s)/Copyright Date
|
||||
Academic Free License 2.0, 2.1, 3.0
|
||||
Apache Software License 1.0 or 1.1
|
||||
Apache License 2.0
|
||||
Apple Public Source License 2.0
|
||||
Artistic license (as set forth in the addendum file)
|
||||
BSD license "July 22 1999"
|
||||
Common Development and Distribution
|
||||
License (CDDL) 1.0
|
||||
Common Public License 1.0
|
||||
Eclipse Public License 1.0
|
||||
GNU Library or "Lesser"
|
||||
General Public License (LGPL) 2.0, 2.1, 3.0
|
||||
Jabber Open Source License 1.0
|
||||
MIT License (as set forth in the addendum file)
|
||||
Mozilla Public License (MPL) 1.0 or 1.1
|
||||
Open Software License 2.0, 3.0
|
||||
OpenSSL license (with original
|
||||
SSLeay license) "2003" ("1998")
|
||||
PHP License 3.0
|
||||
Python license (CNRI Python License) (as set forth in the addendum file)
|
||||
Python Software Foundation License 2.1.1
|
||||
Q Public License 1.0
|
||||
Sleepycat License "1999"
|
||||
W3C License "2001"
|
||||
X11 License X11R6.6
|
||||
Zlib/libpng License (as set forth in the addendum file)
|
||||
Zope Public License 2.0, 2.1
|
||||
|
||||
|
||||
(Licenses without a specific version number or date are reproduced
|
||||
in the file GPL_Exception_Addendum.txt in your source package).
|
||||
|
||||
and
|
||||
|
||||
B) You must, on request, make a complete package including the complete
|
||||
source code of Your Software (as defined in the GNU General Public License
|
||||
version 2, section 3, but excluding anything excluded by the special
|
||||
exception in the same section) available to Nokia Corporation under the
|
||||
same license as that granted to other recipients of the source code of Your
|
||||
Software.
|
||||
|
||||
and
|
||||
|
||||
C) Your or any other contributor's rights to:
|
||||
|
||||
i) distribute the source code of Your Software to anyone for any purpose;
|
||||
|
||||
and
|
||||
|
||||
ii) publicly discuss the development project for Your Software and its
|
||||
goals in any form and in any forum are not prohibited by any legal
|
||||
instrument, including but not limited to contracts, non-disclosure
|
||||
agreements, and employee contracts.
|
||||
|
||||
|
||||
2) The right to link non-open source applications with pre-installed versions of
|
||||
the Licensed Software: You may link applications with binary pre-installed
|
||||
versions of the Licensed Software, provided that such applications have been
|
||||
developed and are deployed in accordance with the terms and conditions of the Qt
|
||||
Commercial License Agreement.
|
||||
|
2446
bin/gdbmacros/gdbmacros.cpp
Normal file
3
bin/gdbmacros/gdbmacros.pro
Normal file
@@ -0,0 +1,3 @@
|
||||
TEMPLATE = lib
|
||||
CONFIG += shared
|
||||
SOURCES=gdbmacros.cpp
|
615
bin/license.txt
Normal file
@@ -0,0 +1,615 @@
|
||||
For individuals and/or legal entities resident in the Americas (North
|
||||
America, Central America and South America), the applicable licensing
|
||||
terms are specified under the heading "Technology Preview License
|
||||
Agreement: The Americas".
|
||||
|
||||
For individuals and/or legal entities not resident in The Americas, the
|
||||
applicable licensing terms are specified under the heading "Technology
|
||||
Preview License Agreement: Rest of the World".
|
||||
|
||||
|
||||
TECHNOLOGY PREVIEW LICENSE AGREEMENT: The Americas
|
||||
Agreement version 2.3
|
||||
|
||||
This Technology Preview License Agreement ("Agreement") is a legal
|
||||
agreement between Nokia Inc. ("Nokia"), with its registered office at
|
||||
6021 Connection Drive, Irving, TX 75039, U.S.A. and you (either an
|
||||
individual or a legal entity) ("Licensee") for the Licensed Software (as
|
||||
defined below).
|
||||
|
||||
1. DEFINITIONS
|
||||
|
||||
"Affiliate" of a Party shall mean an entity (i) which is directly or
|
||||
indirectly controlling such Party; (ii) which is under the same direct
|
||||
or indirect ownership or control as such Party; or (iii) which is
|
||||
directly or indirectly owned or controlled by such Party. For these
|
||||
purposes, an entity shall be treated as being controlled by another if
|
||||
that other entity has fifty percent (50 %) or more of the votes in such
|
||||
entity, is able to direct its affairs and/or to control the composition
|
||||
of its board of directors or equivalent body.
|
||||
|
||||
"Term" shall mean the period of time six (6) months from the later of
|
||||
(a) the Effective Date; or (b) the date the Licensed Software was
|
||||
initially delivered to Licensee by Nokia. If no specific Effective Date
|
||||
is set forth in the Agreement, the Effective Date shall be deemed to be
|
||||
the date the Licensed Software was initially delivered to Licensee.
|
||||
|
||||
"Licensed Software" shall mean the computer software, "online" or
|
||||
electronic documentation, associated media and printed materials,
|
||||
including the source code, example programs and the documentation
|
||||
delivered by Nokia to Licensee in conjunction with this Agreement.
|
||||
|
||||
"Party" or "Parties" shall mean Licensee and/or Nokia.
|
||||
|
||||
|
||||
2. OWNERSHIP
|
||||
|
||||
The Licensed Software is protected by copyright laws and international
|
||||
copyright treaties, as well as other intellectual property laws and
|
||||
treaties. The Licensed Software is licensed, not sold.
|
||||
|
||||
If Licensee provides any findings, proposals, suggestions or other
|
||||
feedback ("Feedback") to Nokia regarding the Licensed Software, Nokia
|
||||
shall own all right, title and interest including the intellectual
|
||||
property rights in and to such Feedback, excluding however any existing
|
||||
patent rights of Licensee. To the extent Licensee owns or controls any
|
||||
patents for such Feedback Licensee hereby grants to Nokia and its
|
||||
Affiliates, a worldwide, perpetual, non-transferable, sublicensable,
|
||||
royalty-free license to (i) use, copy and modify Feedback and to create
|
||||
derivative works thereof, (ii) to make (and have made), use, import,
|
||||
sell, offer for sale, lease, dispose, offer for disposal or otherwise
|
||||
exploit any products or services of Nokia containing Feedback,, and
|
||||
(iii) sublicense all the foregoing rights to third party licensees and
|
||||
customers of Nokia and/or its Affiliates.
|
||||
|
||||
|
||||
3. VALIDITY OF THE AGREEMENT
|
||||
|
||||
By installing, copying, or otherwise using the Licensed Software,
|
||||
Licensee agrees to be bound by the terms of this Agreement. If Licensee
|
||||
does not agree to the terms of this Agreement, Licensee may not install,
|
||||
copy, or otherwise use the Licensed Software. Upon Licensee's acceptance
|
||||
of the terms and conditions of this Agreement, Nokia grants Licensee the
|
||||
right to use the Licensed Software in the manner provided below.
|
||||
|
||||
|
||||
4. LICENSES
|
||||
|
||||
4.1. Using and Copying
|
||||
|
||||
Nokia grants to Licensee a non-exclusive, non-transferable, time-limited
|
||||
license to use and copy the Licensed Software for sole purpose of
|
||||
evaluating and testing the Licensed Software during the Term.
|
||||
|
||||
Licensee may install copies of the Licensed Software on an unlimited
|
||||
number of computers provided that (a) if an individual, only such
|
||||
individual; or (b) if a legal entity only its employees; use the
|
||||
Licensed Software for the authorized purposes.
|
||||
|
||||
4.2 No Distribution or Modifications
|
||||
|
||||
Licensee may not disclose, modify, sell, market, commercialise,
|
||||
distribute, loan, rent, lease, or license the Licensed Software or any
|
||||
copy of it or use the Licensed Software for any purpose that is not
|
||||
expressly granted in this Section 4. Licensee may not alter or remove
|
||||
any details of ownership, copyright, trademark or other property right
|
||||
connected with the Licensed Software. Licensee may not distribute any
|
||||
software statically or dynamically linked with the Licensed Software.
|
||||
|
||||
4.3 No Technical Support
|
||||
|
||||
Nokia has no obligation to furnish Licensee with any technical support
|
||||
whatsoever. Any such support is subject to separate agreement between
|
||||
the Parties.
|
||||
|
||||
|
||||
5. PRE-RELEASE CODE
|
||||
The Licensed Software contains pre-release code that is not at the level
|
||||
of performance and compatibility of a final, generally available,
|
||||
product offering. The Licensed Software may not operate correctly and
|
||||
may be substantially modified prior to the first commercial product
|
||||
release, if any. Nokia is not obligated to make this or any later
|
||||
version of the Licensed Software commercially available. The License
|
||||
Software is "Not for Commercial Use" and may only be used for the
|
||||
purposes described in Section 4. The Licensed Software may not be used
|
||||
in a live operating environment where it may be relied upon to perform
|
||||
in the same manner as a commercially released product or with data that
|
||||
has not been sufficiently backed up.
|
||||
|
||||
6. THIRD PARTY SOFTWARE
|
||||
|
||||
The Licensed Software may provide links to third party libraries or code
|
||||
(collectively "Third Party Software") to implement various functions.
|
||||
Third Party Software does not comprise part of the Licensed Software. In
|
||||
some cases, access to Third Party Software may be included along with
|
||||
the Licensed Software delivery as a convenience for development and
|
||||
testing only. Such source code and libraries may be listed in the
|
||||
".../src/3rdparty" source tree delivered with the Licensed Software or
|
||||
documented in the Licensed Software where the Third Party Software is
|
||||
used, as may be amended from time to time, do not comprise the Licensed
|
||||
Software. Licensee acknowledges (1) that some part of Third Party
|
||||
Software may require additional licensing of copyright and patents from
|
||||
the owners of such, and (2) that distribution of any of the Licensed
|
||||
Software referencing any portion of a Third Party Software may require
|
||||
appropriate licensing from such third parties.
|
||||
|
||||
|
||||
7. LIMITED WARRANTY AND WARRANTY DISCLAIMER
|
||||
|
||||
The Licensed Software is licensed to Licensee "as is". To the maximum
|
||||
extent permitted by applicable law, Nokia on behalf of itself and its
|
||||
suppliers, disclaims all warranties and conditions, either express or
|
||||
implied, including, but not limited to, implied warranties of
|
||||
merchantability, fitness for a particular purpose, title and
|
||||
non-infringement with regard to the Licensed Software.
|
||||
|
||||
|
||||
8. LIMITATION OF LIABILITY
|
||||
|
||||
If, Nokia's warranty disclaimer notwithstanding, Nokia is held liable to
|
||||
Licensee, whether in contract, tort or any other legal theory, based on
|
||||
the Licensed Software, Nokia's entire liability to Licensee and
|
||||
Licensee's exclusive remedy shall be, at Nokia's option, either (A)
|
||||
return of the price Licensee paid for the Licensed Software, or (B)
|
||||
repair or replacement of the Licensed Software, provided Licensee
|
||||
returns to Nokia all copies of the Licensed Software as originally
|
||||
delivered to Licensee. Nokia shall not under any circumstances be liable
|
||||
to Licensee based on failure of the Licensed Software if the failure
|
||||
resulted from accident, abuse or misapplication, nor shall Nokia under
|
||||
any circumstances be liable for special damages, punitive or exemplary
|
||||
damages, damages for loss of profits or interruption of business or for
|
||||
loss or corruption of data. Any award of damages from Nokia to Licensee
|
||||
shall not exceed the total amount Licensee has paid to Nokia in
|
||||
connection with this Agreement.
|
||||
|
||||
|
||||
9. CONFIDENTIALITY
|
||||
|
||||
Each party acknowledges that during the Term of this Agreement it shall
|
||||
have access to information about the other party's business, business
|
||||
methods, business plans, customers, business relations, technology, and
|
||||
other information, including the terms of this Agreement, that is
|
||||
confidential and of great value to the other party, and the value of
|
||||
which would be significantly reduced if disclosed to third parties (the
|
||||
"Confidential Information"). Accordingly, when a party (the "Receiving
|
||||
Party") receives Confidential Information from another party (the
|
||||
"Disclosing Party"), the Receiving Party shall, and shall obligate its
|
||||
employees and agents and employees and agents of its Affiliates to: (i)
|
||||
maintain the Confidential Information in strict confidence; (ii) not
|
||||
disclose the Confidential Information to a third party without the
|
||||
Disclosing Party's prior written approval; and (iii) not, directly or
|
||||
indirectly, use the Confidential Information for any purpose other than
|
||||
for exercising its rights and fulfilling its responsibilities pursuant
|
||||
to this Agreement. Each party shall take reasonable measures to protect
|
||||
the Confidential Information of the other party, which measures shall
|
||||
not be less than the measures taken by such party to protect its own
|
||||
confidential and proprietary information.
|
||||
|
||||
"Confidential Information" shall not include information that (a) is or
|
||||
becomes generally known to the public through no act or omission of the
|
||||
Receiving Party; (b) was in the Receiving Party's lawful possession
|
||||
prior to the disclosure hereunder and was not subject to limitations on
|
||||
disclosure or use; (c) is developed by the Receiving Party without
|
||||
access to the Confidential Information of the Disclosing Party or by
|
||||
persons who have not had access to the Confidential Information of the
|
||||
Disclosing Party as proven by the written records of the Receiving
|
||||
Party; (d) is lawfully disclosed to the Receiving Party without
|
||||
restrictions, by a third party not under an obligation of
|
||||
confidentiality; or (e) the Receiving Party is legally compelled to
|
||||
disclose the information, in which case the Receiving Party shall assert
|
||||
the privileged and confidential nature of the information and cooperate
|
||||
fully with the Disclosing Party to protect against and prevent
|
||||
disclosure of any Confidential Information and to limit the scope of
|
||||
disclosure and the dissemination of disclosed Confidential Information
|
||||
by all legally available means.
|
||||
|
||||
The obligations of the Receiving Party under this Section shall continue
|
||||
during the Initial Term and for a period of five (5) years after
|
||||
expiration or termination of this Agreement. To the extent that the
|
||||
terms of the Non-Disclosure Agreement between Nokia and Licensee
|
||||
conflict with the terms of this Section 8, this Section 8 shall be
|
||||
controlling over the terms of the Non-Disclosure Agreement.
|
||||
|
||||
|
||||
10. GENERAL PROVISIONS
|
||||
|
||||
10.1 No Assignment
|
||||
|
||||
Licensee shall not be entitled to assign or transfer all or any of its
|
||||
rights, benefits and obligations under this Agreement without the prior
|
||||
written consent of Nokia, which shall not be unreasonably withheld.
|
||||
|
||||
10.2 Termination
|
||||
|
||||
Nokia may terminate the Agreement at any time immediately upon written
|
||||
notice by Nokia to Licensee if Licensee breaches this Agreement.
|
||||
|
||||
Upon termination of this Agreement, Licensee shall return to Nokia all
|
||||
copies of Licensed Software that were supplied by Nokia. All other
|
||||
copies of Licensed Software in the possession or control of Licensee
|
||||
must be erased or destroyed. An officer of Licensee must promptly
|
||||
deliver to Nokia a written confirmation that this has occurred.
|
||||
|
||||
10.3 Surviving Sections
|
||||
|
||||
Any terms and conditions that by their nature or otherwise reasonably
|
||||
should survive a cancellation or termination of this Agreement shall
|
||||
also be deemed to survive. Such terms and conditions include, but are
|
||||
not limited to the following Sections: 2, 5, 6, 7, 8, 9, 10.2, 10.3, 10.4,
|
||||
10.5, 10.6, 10.7, and 10.8 of this Agreement.
|
||||
|
||||
10.4 Entire Agreement
|
||||
|
||||
This Agreement constitutes the complete agreement between the parties
|
||||
and supersedes all prior or contemporaneous discussions,
|
||||
representations, and proposals, written or oral, with respect to the
|
||||
subject matters discussed herein, with the exception of the
|
||||
non-disclosure agreement executed by the parties in connection with this
|
||||
Agreement ("Non-Disclosure Agreement"), if any, shall be subject to
|
||||
Section 8. No modification of this Agreement shall be effective unless
|
||||
contained in a writing executed by an authorized representative of each
|
||||
party. No term or condition contained in Licensee's purchase order shall
|
||||
apply unless expressly accepted by Nokia in writing. If any provision of
|
||||
the Agreement is found void or unenforceable, the remainder shall remain
|
||||
valid and enforceable according to its terms. If any remedy provided is
|
||||
determined to have failed for its essential purpose, all limitations of
|
||||
liability and exclusions of damages set forth in this Agreement shall
|
||||
remain in effect.
|
||||
|
||||
10.5 Export Control
|
||||
|
||||
Licensee acknowledges that the Licensed Software may be subject to
|
||||
export control restrictions of various countries. Licensee shall fully
|
||||
comply with all applicable export license restrictions and requirements
|
||||
as well as with all laws and regulations relating to the importation of
|
||||
the Licensed Software and shall procure all necessary governmental
|
||||
authorizations, including without limitation, all necessary licenses,
|
||||
approvals, permissions or consents, where necessary for the
|
||||
re-exportation of the Licensed Software.,
|
||||
|
||||
10.6 Governing Law and Legal Venue
|
||||
|
||||
This Agreement shall be governed by and construed in accordance with the
|
||||
federal laws of the United States of America and the internal laws of
|
||||
the State of New York without given effect to any choice of law rule
|
||||
that would result in the application of the laws of any other
|
||||
jurisdiction. The United Nations Convention on Contracts for the
|
||||
International Sale of Goods (CISG) shall not apply. Each Party (a)
|
||||
hereby irrevocably submits itself to and consents to the jurisdiction of
|
||||
the United States District Court for the Southern District of New York
|
||||
(or if such court lacks jurisdiction, the state courts of the State of
|
||||
New York) for the purposes of any action, claim, suit or proceeding
|
||||
between the Parties in connection with any controversy, claim, or
|
||||
dispute arising out of or relating to this Agreement; and (b) hereby
|
||||
waives, and agrees not to assert by way of motion, as a defense or
|
||||
otherwise, in any such action, claim, suit or proceeding, any claim that
|
||||
is not personally subject to the jurisdiction of such court(s), that the
|
||||
action, claim, suit or proceeding is brought in an inconvenient forum or
|
||||
that the venue of the action, claim, suit or proceeding is improper.
|
||||
Notwithstanding the foregoing, nothing in this Section 9.6 is intended
|
||||
to, or shall be deemed to, constitute a submission or consent to, or
|
||||
selection of, jurisdiction, forum or venue for any action for patent
|
||||
infringement, whether or not such action relates to this Agreement.
|
||||
|
||||
10.7 No Implied License
|
||||
|
||||
There are no implied licenses or other implied rights granted under this
|
||||
Agreement, and all rights, save for those expressly granted hereunder,
|
||||
shall remain with Nokia and its licensors. In addition, no licenses or
|
||||
immunities are granted to the combination of the Licensed Software with
|
||||
any other software or hardware not delivered by Nokia under this
|
||||
Agreement.
|
||||
|
||||
10.8 Government End Users
|
||||
|
||||
A "U.S. Government End User" shall mean any agency or entity of the
|
||||
government of the United States. The following shall apply if Licensee
|
||||
is a U.S. Government End User. The Licensed Software is a "commercial
|
||||
item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995),
|
||||
consisting of "commercial computer software" and "commercial computer
|
||||
software documentation," as such terms are used in 48 C.F.R. 12.212
|
||||
(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1
|
||||
through 227.7202-4 (June 1995), all U.S. Government End Users acquire
|
||||
the Licensed Software with only those rights set forth herein. The
|
||||
Licensed Software (including related documentation) is provided to U.S.
|
||||
Government End Users: (a) only as a commercial end item; and (b) only
|
||||
pursuant to this Agreement.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
TECHNOLOGY PREVIEW LICENSE AGREEMENT: Rest of the World
|
||||
Agreement version 2.3
|
||||
|
||||
This Technology Preview License Agreement ("Agreement") is a legal
|
||||
agreement between Nokia Corporation ("Nokia"), with its registered
|
||||
office at Keilalahdentie 4, 02150 Espoo, Finland and you (either an
|
||||
individual or a legal entity) ("Licensee") for the Licensed Software (as
|
||||
defined below).
|
||||
|
||||
1. DEFINITIONS
|
||||
|
||||
"Affiliate" of a Party shall mean an entity (i) which is directly or
|
||||
indirectly controlling such Party; (ii) which is under the same direct
|
||||
or indirect ownership or control as such Party; or (iii) which is
|
||||
directly or indirectly owned or controlled by such Party. For these
|
||||
purposes, an entity shall be treated as being controlled by another if
|
||||
that other entity has fifty percent (50 %) or more of the votes in such
|
||||
entity, is able to direct its affairs and/or to control the composition
|
||||
of its board of directors or equivalent body.
|
||||
|
||||
"Term" shall mean the period of time six (6) months from the later of
|
||||
(a) the Effective Date; or (b) the date the Licensed Software was
|
||||
initially delivered to Licensee by Nokia. If no specific Effective Date
|
||||
is set forth in the Agreement, the Effective Date shall be deemed to be
|
||||
the date the Licensed Software was initially delivered to Licensee.
|
||||
|
||||
"Licensed Software" shall mean the computer software, "online" or
|
||||
electronic documentation, associated media and printed materials,
|
||||
including the source code, example programs and the documentation
|
||||
delivered by Nokia to Licensee in conjunction with this Agreement.
|
||||
|
||||
"Party" or "Parties" shall mean Licensee and/or Nokia.
|
||||
|
||||
|
||||
2. OWNERSHIP
|
||||
|
||||
The Licensed Software is protected by copyright laws and international
|
||||
copyright treaties, as well as other intellectual property laws and
|
||||
treaties. The Licensed Software is licensed, not sold.
|
||||
|
||||
If Licensee provides any findings, proposals, suggestions or other
|
||||
feedback ("Feedback") to Nokia regarding the Licensed Software, Nokia
|
||||
shall own all right, title and interest including the intellectual
|
||||
property rights in and to such Feedback, excluding however any existing
|
||||
patent rights of Licensee. To the extent Licensee owns or controls any
|
||||
patents for such Feedback Licensee hereby grants to Nokia and its
|
||||
Affiliates, a worldwide, perpetual, non-transferable, sublicensable,
|
||||
royalty-free license to (i) use, copy and modify Feedback and to create
|
||||
derivative works thereof, (ii) to make (and have made), use, import,
|
||||
sell, offer for sale, lease, dispose, offer for disposal or otherwise
|
||||
exploit any products or services of Nokia containing Feedback,, and
|
||||
(iii) sublicense all the foregoing rights to third party licensees and
|
||||
customers of Nokia and/or its Affiliates.
|
||||
|
||||
3. VALIDITY OF THE AGREEMENT
|
||||
|
||||
By installing, copying, or otherwise using the Licensed Software,
|
||||
Licensee agrees to be bound by the terms of this Agreement. If Licensee
|
||||
does not agree to the terms of this Agreement, Licensee may not install,
|
||||
copy, or otherwise use the Licensed Software. Upon Licensee's acceptance
|
||||
of the terms and conditions of this Agreement, Nokia grants Licensee the
|
||||
right to use the Licensed Software in the manner provided below.
|
||||
|
||||
|
||||
4. LICENSES
|
||||
|
||||
4.1. Using and Copying
|
||||
|
||||
Nokia grants to Licensee a non-exclusive, non-transferable, time-limited
|
||||
license to use and copy the Licensed Software for sole purpose of
|
||||
evaluating and testing the Licensed Software during the Term.
|
||||
|
||||
Licensee may install copies of the Licensed Software on an unlimited
|
||||
number of computers provided that (a) if an individual, only such
|
||||
individual; or (b) if a legal entity only its employees; use the
|
||||
Licensed Software for the authorized purposes.
|
||||
|
||||
4.2 No Distribution or Modifications
|
||||
|
||||
Licensee may not disclose, modify, sell, market, commercialise,
|
||||
distribute, loan, rent, lease, or license the Licensed Software or any
|
||||
copy of it or use the Licensed Software for any purpose that is not
|
||||
expressly granted in this Section 4. Licensee may not alter or remove
|
||||
any details of ownership, copyright, trademark or other property right
|
||||
connected with the Licensed Software. Licensee may not distribute any
|
||||
software statically or dynamically linked with the Licensed Software.
|
||||
|
||||
4.3 No Technical Support
|
||||
|
||||
Nokia has no obligation to furnish Licensee with any technical support
|
||||
whatsoever. Any such support is subject to separate agreement between
|
||||
the Parties.
|
||||
|
||||
|
||||
5. PRE-RELEASE CODE
|
||||
|
||||
The Licensed Software contains pre-release code that is not at the level
|
||||
of performance and compatibility of a final, generally available,
|
||||
product offering. The Licensed Software may not operate correctly and
|
||||
may be substantially modified prior to the first commercial product
|
||||
release, if any. Nokia is not obligated to make this or any later
|
||||
version of the Licensed Software commercially available. The License
|
||||
Software is "Not for Commercial Use" and may only be used for the
|
||||
purposes described in Section 4. The Licensed Software may not be used
|
||||
in a live operating environment where it may be relied upon to perform
|
||||
in the same manner as a commercially released product or with data that
|
||||
has not been sufficiently backed up.
|
||||
|
||||
6. THIRD PARTY SOFTWARE
|
||||
|
||||
The Licensed Software may provide links to third party libraries or code
|
||||
(collectively "Third Party Software") to implement various functions.
|
||||
Third Party Software does not comprise part of the Licensed Software. In
|
||||
some cases, access to Third Party Software may be included along with
|
||||
the Licensed Software delivery as a convenience for development and
|
||||
testing only. Such source code and libraries may be listed in the
|
||||
".../src/3rdparty" source tree delivered with the Licensed Software or
|
||||
documented in the Licensed Software where the Third Party Software is
|
||||
used, as may be amended from time to time, do not comprise the Licensed
|
||||
Software. Licensee acknowledges (1) that some part of Third Party
|
||||
Software may require additional licensing of copyright and patents from
|
||||
the owners of such, and (2) that distribution of any of the Licensed
|
||||
Software referencing any portion of a Third Party Software may require
|
||||
appropriate licensing from such third parties.
|
||||
|
||||
|
||||
7. LIMITED WARRANTY AND WARRANTY DISCLAIMER
|
||||
|
||||
The Licensed Software is licensed to Licensee "as is". To the maximum
|
||||
extent permitted by applicable law, Nokia on behalf of itself and its
|
||||
suppliers, disclaims all warranties and conditions, either express or
|
||||
implied, including, but not limited to, implied warranties of
|
||||
merchantability, fitness for a particular purpose, title and
|
||||
non-infringement with regard to the Licensed Software.
|
||||
|
||||
|
||||
8. LIMITATION OF LIABILITY
|
||||
|
||||
If, Nokia's warranty disclaimer notwithstanding, Nokia is held liable to
|
||||
Licensee, whether in contract, tort or any other legal theory, based on
|
||||
the Licensed Software, Nokia's entire liability to Licensee and
|
||||
Licensee's exclusive remedy shall be, at Nokia's option, either (A)
|
||||
return of the price Licensee paid for the Licensed Software, or (B)
|
||||
repair or replacement of the Licensed Software, provided Licensee
|
||||
returns to Nokia all copies of the Licensed Software as originally
|
||||
delivered to Licensee. Nokia shall not under any circumstances be liable
|
||||
to Licensee based on failure of the Licensed Software if the failure
|
||||
resulted from accident, abuse or misapplication, nor shall Nokia under
|
||||
any circumstances be liable for special damages, punitive or exemplary
|
||||
damages, damages for loss of profits or interruption of business or for
|
||||
loss or corruption of data. Any award of damages from Nokia to Licensee
|
||||
shall not exceed the total amount Licensee has paid to Nokia in
|
||||
connection with this Agreement.
|
||||
|
||||
|
||||
9. CONFIDENTIALITY
|
||||
|
||||
Each party acknowledges that during the Term of this Agreement it shall
|
||||
have access to information about the other party's business, business
|
||||
methods, business plans, customers, business relations, technology, and
|
||||
other information, including the terms of this Agreement, that is
|
||||
confidential and of great value to the other party, and the value of
|
||||
which would be significantly reduced if disclosed to third parties (the
|
||||
"Confidential Information"). Accordingly, when a party (the "Receiving
|
||||
Party") receives Confidential Information from another party (the
|
||||
"Disclosing Party"), the Receiving Party shall, and shall obligate its
|
||||
employees and agents and employees and agents of its Affiliates to: (i)
|
||||
maintain the Confidential Information in strict confidence; (ii) not
|
||||
disclose the Confidential Information to a third party without the
|
||||
Disclosing Party's prior written approval; and (iii) not, directly or
|
||||
indirectly, use the Confidential Information for any purpose other than
|
||||
for exercising its rights and fulfilling its responsibilities pursuant
|
||||
to this Agreement. Each party shall take reasonable measures to protect
|
||||
the Confidential Information of the other party, which measures shall
|
||||
not be less than the measures taken by such party to protect its own
|
||||
confidential and proprietary information.
|
||||
|
||||
"Confidential Information" shall not include information that (a) is or
|
||||
becomes generally known to the public through no act or omission of the
|
||||
Receiving Party; (b) was in the Receiving Party's lawful possession
|
||||
prior to the disclosure hereunder and was not subject to limitations on
|
||||
disclosure or use; (c) is developed by the Receiving Party without
|
||||
access to the Confidential Information of the Disclosing Party or by
|
||||
persons who have not had access to the Confidential Information of the
|
||||
Disclosing Party as proven by the written records of the Receiving
|
||||
Party; (d) is lawfully disclosed to the Receiving Party without
|
||||
restrictions, by a third party not under an obligation of
|
||||
confidentiality; or (e) the Receiving Party is legally compelled to
|
||||
disclose the information, in which case the Receiving Party shall assert
|
||||
the privileged and confidential nature of the information and cooperate
|
||||
fully with the Disclosing Party to protect against and prevent
|
||||
disclosure of any Confidential Information and to limit the scope of
|
||||
disclosure and the dissemination of disclosed Confidential Information
|
||||
by all legally available means.
|
||||
|
||||
The obligations of the Receiving Party under this Section shall continue
|
||||
during the Initial Term and for a period of five (5) years after
|
||||
expiration or termination of this Agreement. To the extent that the
|
||||
terms of the Non-Disclosure Agreement between Nokia and Licensee
|
||||
conflict with the terms of this Section 8, this Section 8 shall be
|
||||
controlling over the terms of the Non-Disclosure Agreement.
|
||||
|
||||
|
||||
10. GENERAL PROVISIONS
|
||||
|
||||
10.1 No Assignment
|
||||
|
||||
Licensee shall not be entitled to assign or transfer all or any of its
|
||||
rights, benefits and obligations under this Agreement without the prior
|
||||
written consent of Nokia, which shall not be unreasonably withheld.
|
||||
|
||||
10.2 Termination
|
||||
|
||||
Nokia may terminate the Agreement at any time immediately upon written
|
||||
notice by Nokia to Licensee if Licensee breaches this Agreement.
|
||||
|
||||
Upon termination of this Agreement, Licensee shall return to Nokia all
|
||||
copies of Licensed Software that were supplied by Nokia. All other
|
||||
copies of Licensed Software in the possession or control of Licensee
|
||||
must be erased or destroyed. An officer of Licensee must promptly
|
||||
deliver to Nokia a written confirmation that this has occurred.
|
||||
|
||||
10.3 Surviving Sections
|
||||
|
||||
Any terms and conditions that by their nature or otherwise reasonably
|
||||
should survive a cancellation or termination of this Agreement shall
|
||||
also be deemed to survive. Such terms and conditions include, but are
|
||||
not limited to the following Sections: 2, 5, 6, 7, 8, 9, 10.2, 10.3, 10.4,
|
||||
10.5, 10.6, 10.7, and 10.8 of this Agreement.
|
||||
|
||||
10.4 Entire Agreement
|
||||
|
||||
This Agreement constitutes the complete agreement between the parties
|
||||
and supersedes all prior or contemporaneous discussions,
|
||||
representations, and proposals, written or oral, with respect to the
|
||||
subject matters discussed herein, with the exception of the
|
||||
non-disclosure agreement executed by the parties in connection with this
|
||||
Agreement ("Non-Disclosure Agreement"), if any, shall be subject to
|
||||
Section 8. No modification of this Agreement shall be effective unless
|
||||
contained in a writing executed by an authorized representative of each
|
||||
party. No term or condition contained in Licensee's purchase order shall
|
||||
apply unless expressly accepted by Nokia in writing. If any provision of
|
||||
the Agreement is found void or unenforceable, the remainder shall remain
|
||||
valid and enforceable according to its terms. If any remedy provided is
|
||||
determined to have failed for its essential purpose, all limitations of
|
||||
liability and exclusions of damages set forth in this Agreement shall
|
||||
remain in effect.
|
||||
|
||||
10.5 Export Control
|
||||
|
||||
Licensee acknowledges that the Licensed Software may be subject to
|
||||
export control restrictions of various countries. Licensee shall fully
|
||||
comply with all applicable export license restrictions and requirements
|
||||
as well as with all laws and regulations relating to the importation of
|
||||
the Licensed Software and shall procure all necessary governmental
|
||||
authorizations, including without limitation, all necessary licenses,
|
||||
approvals, permissions or consents, where necessary for the
|
||||
re-exportation of the Licensed Software.,
|
||||
|
||||
10.6 Governing Law and Legal Venue
|
||||
|
||||
This Agreement shall be construed and interpreted in accordance with the
|
||||
laws of Finland, excluding its choice of law provisions. Any disputes
|
||||
arising out of or relating to this Agreement shall be resolved in
|
||||
arbitration under the Rules of Arbitration of the Chamber of Commerce of
|
||||
Helsinki, Finland. The arbitration tribunal shall consist of one (1), or
|
||||
if either Party so requires, of three (3), arbitrators. The award shall
|
||||
be final and binding and enforceable in any court of competent
|
||||
jurisdiction. The arbitration shall be held in Helsinki, Finland and the
|
||||
process shall be conducted in the English language.
|
||||
|
||||
10.7 No Implied License
|
||||
|
||||
There are no implied licenses or other implied rights granted under this
|
||||
Agreement, and all rights, save for those expressly granted hereunder,
|
||||
shall remain with Nokia and its licensors. In addition, no licenses or
|
||||
immunities are granted to the combination of the Licensed Software with
|
||||
any other software or hardware not delivered by Nokia under this
|
||||
Agreement.
|
||||
|
||||
10.8 Government End Users
|
||||
|
||||
A "U.S. Government End User" shall mean any agency or entity of the
|
||||
government of the United States. The following shall apply if Licensee
|
||||
is a U.S. Government End User. The Licensed Software is a "commercial
|
||||
item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995),
|
||||
consisting of "commercial computer software" and "commercial computer
|
||||
software documentation," as such terms are used in 48 C.F.R. 12.212
|
||||
(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1
|
||||
through 227.7202-4 (June 1995), all U.S. Government End Users acquire
|
||||
the Licensed Software with only those rights set forth herein. The
|
||||
Licensed Software (including related documentation) is provided to U.S.
|
||||
Government End Users: (a) only as a commercial end item; and (b) only
|
||||
pursuant to this Agreement.
|
7
bin/runInTerminal.command
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
osascript >/dev/null 2>&1 <<EOF
|
||||
tell application "Terminal"
|
||||
activate
|
||||
do script with command "$@; exit"
|
||||
end tell
|
||||
EOF
|
495
bin/schemes/MS_Visual_C++.kms
Normal file
@@ -0,0 +1,495 @@
|
||||
<!DOCTYPE KeyboardMappingScheme>
|
||||
<mapping>
|
||||
<shortcut id="Debugger.JumpToLine" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.ToggleBreak" >
|
||||
<key value="F9" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.BreakByFunction" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.BreakAtMain" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.SkipKnownFrames" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.UseCustomDumpers" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.UseFastStart" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.AddToWatch" >
|
||||
<key value="Alt+D, Alt+W" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Mode.GdbDebugger.Mode.Debug" >
|
||||
<key value="Ctrl+3" />
|
||||
</shortcut>
|
||||
<shortcut id="Qt Script Editor.Run" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="FindFilter.Files on Disk" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="FindFilter.All Projects" >
|
||||
<key value="Ctrl+Shift+F" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Pane.TaskList" >
|
||||
<key value="Alt+1" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Pane.SearchResults" >
|
||||
<key value="Alt+2" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Pane.ApplicationOutput" >
|
||||
<key value="Alt+3" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Pane.Compile" >
|
||||
<key value="Alt+4" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Pane.Perforce" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Pane.General" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.Edit.Delete" >
|
||||
<key value="Del" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.WidgetEditor" >
|
||||
<key value="F3" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.SignalsSlotsEditor" >
|
||||
<key value="F4" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.BuddyEditor" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.TabOrderEditor" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.LayoutHorizontally" >
|
||||
<key value="Ctrl+H" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.LayoutVertically" >
|
||||
<key value="Ctrl+L" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.SplitHorizontal" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.SplitVertical" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.LayoutForm" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.LayoutGrid" >
|
||||
<key value="Ctrl+G" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.LayoutBreak" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.LayoutAdjustSize" >
|
||||
<key value="Ctrl+J" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.SimplifyLayout" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.ReturnToEditor" >
|
||||
<key value="Esc" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.New" >
|
||||
<key value="Ctrl+N" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.Lower" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Open" >
|
||||
<key value="Ctrl+O" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.Raise" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.OpenWith" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.Preview" >
|
||||
<key value="Ctrl+Alt+R" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Save" >
|
||||
<key value="Ctrl+S" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.SaveAs" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.SaveAll" >
|
||||
<key value="Ctrl+Shift+S" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Print" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Exit" >
|
||||
<key value="Ctrl+Q" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Undo" >
|
||||
<key value="Ctrl+Z" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Redo" >
|
||||
<key value="Ctrl+Shift+Z" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Cut" >
|
||||
<key value="Ctrl+X" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Copy" >
|
||||
<key value="Ctrl+C" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Paste" >
|
||||
<key value="Ctrl+V" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.SelectAll" >
|
||||
<key value="Ctrl+A" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Goto" >
|
||||
<key value="Ctrl+G" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Options" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.ToggleSidebar" >
|
||||
<key value="Alt+0" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.AboutWorkbench" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.AboutPlugins" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.RevertToSaved" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Formeditor.Menu.Preview.Windows" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Formeditor.Menu.Preview.Motif" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Formeditor.Menu.Preview.CDE" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Formeditor.Menu.Preview.Plastique" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Formeditor.Menu.Preview.Cleanlooks" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.ViewCode" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.FormSettings" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Close" >
|
||||
<key value="Ctrl+W" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.CloseAll" >
|
||||
<key value="Ctrl+Shift+W" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.DuplicateDocument" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.GotoPreviousInHistory" >
|
||||
<key value="Ctrl+Tab" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.GotoNextInHistory" >
|
||||
<key value="Ctrl+Shift+Tab" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Horizontal" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Vertical" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Remove" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.SaveAsDefaultLayout" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.RestoreDefaultLayout" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.GotoPreviousTabGroup" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.GotoNextTabGroup" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.DocumentToPreviousGroup" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.DocumentToNextGroup" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Mode.QtCreator.Mode.Output" >
|
||||
<key value="Ctrl+6" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Mode.QtCreator.Mode.Welcome" >
|
||||
<key value="Ctrl+1" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Mode.QtCreator.Mode.Edit" >
|
||||
<key value="Ctrl+2" />
|
||||
</shortcut>
|
||||
<shortcut id="Find.FindInCurrentDocument" >
|
||||
<key value="Ctrl+F" />
|
||||
</shortcut>
|
||||
<shortcut id="Find.FindNext" >
|
||||
<key value="F3" />
|
||||
</shortcut>
|
||||
<shortcut id="Find.FindPrevious" >
|
||||
<key value="Shift+F3" />
|
||||
</shortcut>
|
||||
<shortcut id="Find.ReplaceNext" >
|
||||
<key value="Ctrl+=" />
|
||||
</shortcut>
|
||||
<shortcut id="Find.ReplacePrevious" >
|
||||
<key value="Ctrl+Shift+=" />
|
||||
</shortcut>
|
||||
<shortcut id="Find.ReplaceAll" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Find.CaseSensitive" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Find.WholeWords" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.View.QuickOpen.ToolWindow" >
|
||||
<key value="Ctrl+D" />
|
||||
</shortcut>
|
||||
<shortcut id="Help.Home" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Help.Previous" >
|
||||
<key value="Backspace" />
|
||||
</shortcut>
|
||||
<shortcut id="Help.Next" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Help.AddBookmark" >
|
||||
<key value="Ctrl+M" />
|
||||
</shortcut>
|
||||
<shortcut id="Help.Index" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Help.Contents" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Help.Search" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Help.Context" >
|
||||
<key value="F1" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Mode.Help.HelpMode" >
|
||||
<key value="Ctrl+5" />
|
||||
</shortcut>
|
||||
<shortcut id="Help.IndexShortcut" >
|
||||
<key value="Ctrl+I" />
|
||||
</shortcut>
|
||||
<shortcut id="Help.ContentsShortcut" >
|
||||
<key value="Ctrl+T" />
|
||||
</shortcut>
|
||||
<shortcut id="Help.SearchShortcut" >
|
||||
<key value="Ctrl+S" />
|
||||
</shortcut>
|
||||
<shortcut id="TextEditor.CompleteThis" >
|
||||
<key value="Ctrl+Space" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Mode.ProjectExplorer.Mode.Session" >
|
||||
<key value="Ctrl+4" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.NewSession" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.NewProject" >
|
||||
<key value="Ctrl+Shift+N" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.Load" >
|
||||
<key value="Ctrl+Shift+O" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.OpenFile" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.Unload" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.ClearSession" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.BuildSession" >
|
||||
<key value="F7" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.RebuildSession" >
|
||||
<key value="Ctrl+Shift+F7" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.CleanSession" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.Build" >
|
||||
<key value="Ctrl+Shift+B" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.Rebuild" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.Clean" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.Run" >
|
||||
<key value="Ctrl+F5" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.GoToTaskWindow" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.CancelBuild" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.Debug" >
|
||||
<key value="F5" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.Dependencies" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.AddNewFile" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.AddExistingFiles" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.RemoveFile" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.RenameFile" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Bookmarks.Toggle" >
|
||||
<key value="Ctrl+K, Ctrl+K" />
|
||||
</shortcut>
|
||||
<shortcut id="Bookmarks.MoveUp" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Bookmarks.MoveDown" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Bookmarks.Previous" >
|
||||
<key value="Shift+F2" />
|
||||
</shortcut>
|
||||
<shortcut id="Bookmarks.Next" >
|
||||
<key value="F2" />
|
||||
</shortcut>
|
||||
<shortcut id="Bookmarks.Previous.Document" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Bookmarks.Next.Document" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="CppTools.SwitchHeaderSource" >
|
||||
<key value="F4" />
|
||||
</shortcut>
|
||||
<shortcut id="CppEditor.JumpToDefinition" >
|
||||
<key value="Ctrl+F12" />
|
||||
</shortcut>
|
||||
<shortcut id="CppEditor.SwitchDeclarationDefinition" >
|
||||
<key value="Ctrl+Shift+F12" />
|
||||
</shortcut>
|
||||
<shortcut id="Qt4Builder.RunQMake" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Qt4Builder.RunQMakeContextMenu" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.Edit" >
|
||||
<key value="Alt+P, Alt+E" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.Add" >
|
||||
<key value="Alt+P, Alt+A" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.Delete" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.Revert" >
|
||||
<key value="Alt+P, Alt+R" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.DiffCurrent" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.DiffProject" >
|
||||
<key value="Alt+P, Alt+D" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.DiffAll" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.Opened" >
|
||||
<key value="Alt+P, Alt+O" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.Submit" >
|
||||
<key value="Alt+P, Alt+S" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.PendingChanges" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.Describe" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.AnnotateCurrent" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.Annotate" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.FilelogCurrent" >
|
||||
<key value="Alt+P, Alt+F" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.Filelog" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Nokia.Perforce.SubmitCurrentLog" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Nokia.Perforce.DiffSelectedFilesInLog" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.StartExternal" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.AttachExternal" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.Interrupt" >
|
||||
<key value="Shift+F5" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.Reset" >
|
||||
<key value="Ctrl+Shift+F5" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.NextLine" >
|
||||
<key value="F10" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.StepLine" >
|
||||
<key value="F11" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.StepOut" >
|
||||
<key value="Shift+F11" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.NextInstruction" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.StepInstruction" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.RunToLine" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.RunToFunction" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
</mapping>
|
585
bin/schemes/Xcode.kms
Normal file
@@ -0,0 +1,585 @@
|
||||
<!DOCTYPE KeyboardMappingScheme>
|
||||
<mapping>
|
||||
<shortcut id="QtCreator.ReturnToEditor" >
|
||||
<key value="Esc" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.New" >
|
||||
<key value="Ctrl+N" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Open" >
|
||||
<key value="Ctrl+O" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.OpenWith" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Save" >
|
||||
<key value="Ctrl+S" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.SaveAs" >
|
||||
<key value="Ctrl+Shift+S" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.SaveAll" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Print" >
|
||||
<key value="Ctrl+P" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Exit" >
|
||||
<key value="Ctrl+Q" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Undo" >
|
||||
<key value="Ctrl+Z" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Redo" >
|
||||
<key value="Ctrl+Shift+Z" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Cut" >
|
||||
<key value="Ctrl+X" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Copy" >
|
||||
<key value="Ctrl+C" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Paste" >
|
||||
<key value="Ctrl+V" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.SelectAll" >
|
||||
<key value="Ctrl+A" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Goto" >
|
||||
<key value="Ctrl+L" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Options" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.MinimizeWindow" >
|
||||
<key value="Ctrl+M" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.ZoomWindow" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.ToggleSidebar" >
|
||||
<key value="Ctrl+0" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.AboutWorkbench" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.AboutPlugins" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.RevertToSaved" >
|
||||
<key value="Ctrl+U" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Close" >
|
||||
<key value="Ctrl+Shift+W" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.CloseAll" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.DuplicateDocument" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.GotoPreviousInHistory" >
|
||||
<key value="Alt+Tab" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.GotoNextInHistory" >
|
||||
<key value="Alt+Shift+Tab" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.GoBack" >
|
||||
<key value="Ctrl+Alt+Left" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Horizontal" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Vertical" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Remove" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.SaveAsDefaultLayout" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.RestoreDefaultLayout" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.GotoPreviousTabGroup" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.GotoNextTabGroup" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.DocumentToPreviousGroup" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.DocumentToNextGroup" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Mode.QtCreator.Mode.Output" >
|
||||
<key value="Meta+6" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Mode.QtCreator.Mode.Welcome" >
|
||||
<key value="Meta+1" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Mode.QtCreator.Mode.Edit" >
|
||||
<key value="Meta+2" />
|
||||
</shortcut>
|
||||
<shortcut id="Find.FindInCurrentDocument" >
|
||||
<key value="Ctrl+F" />
|
||||
</shortcut>
|
||||
<shortcut id="Find.EnterFindString" >
|
||||
<key value="Ctrl+E" />
|
||||
</shortcut>
|
||||
<shortcut id="Find.FindNext" >
|
||||
<key value="Ctrl+G" />
|
||||
</shortcut>
|
||||
<shortcut id="Find.FindPrevious" >
|
||||
<key value="Ctrl+Shift+G" />
|
||||
</shortcut>
|
||||
<shortcut id="Find.ReplaceNext" >
|
||||
<key value="Ctrl+=" />
|
||||
</shortcut>
|
||||
<shortcut id="Find.ReplacePrevious" >
|
||||
<key value="Ctrl+Shift+=" />
|
||||
</shortcut>
|
||||
<shortcut id="Find.ReplaceAll" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Find.CaseSensitive" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Find.WholeWords" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.View.QuickOpen.ToolWindow" >
|
||||
<key value="Ctrl+Shift+D" />
|
||||
</shortcut>
|
||||
<shortcut id="TextEditor.CompleteThis" >
|
||||
<key value="Alt+Esc" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Mode.ProjectExplorer.Mode.Session" >
|
||||
<key value="Meta+4" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.NewSession" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.NewProject" >
|
||||
<key value="Ctrl+Shift+N" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.Load" >
|
||||
<key value="Ctrl+Shift+O" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.OpenFile" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.Unload" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.ClearSession" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.BuildSession" >
|
||||
<key value="Ctrl+B" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.RebuildSession" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.CleanSession" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.Build" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.Rebuild" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.Clean" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.Run" >
|
||||
<key value="Ctrl+R" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.GoToTaskWindow" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.CancelBuild" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.Debug" >
|
||||
<key value="Ctrl+Y" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.Dependencies" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.AddNewFile" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.AddExistingFiles" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.RemoveFile" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="ProjectExplorer.RenameFile" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="CppTools.SwitchHeaderSource" >
|
||||
<key value="Ctrl+Alt+Up" />
|
||||
</shortcut>
|
||||
<shortcut id="CppEditor.JumpToDefinition" >
|
||||
<key value="F2" />
|
||||
</shortcut>
|
||||
<shortcut id="CppEditor.SwitchDeclarationDefinition" >
|
||||
<key value="Shift+F2" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.Edit.Delete" >
|
||||
<key value="Del" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.WidgetEditor" >
|
||||
<key value="F3" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.SignalsSlotsEditor" >
|
||||
<key value="F4" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.BuddyEditor" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.TabOrderEditor" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.LayoutHorizontally" >
|
||||
<key value="Ctrl+H" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.LayoutVertically" >
|
||||
<key value="Ctrl+L" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.SplitHorizontal" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.SplitVertical" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.LayoutForm" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.LayoutGrid" >
|
||||
<key value="Ctrl+G" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.LayoutBreak" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.LayoutAdjustSize" >
|
||||
<key value="Ctrl+J" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.SimplifyLayout" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.Lower" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.Raise" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.Preview" >
|
||||
<key value="Ctrl+Alt+R" />
|
||||
</shortcut>
|
||||
<shortcut id="Formeditor.Menu.Preview.Windows" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Formeditor.Menu.Preview.Motif" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Formeditor.Menu.Preview.CDE" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Formeditor.Menu.Preview.Plastique" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Formeditor.Menu.Preview.Cleanlooks" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Formeditor.Menu.Preview.Macintosh (aqua)" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="FormEditor.FormSettings" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Git.Diff" >
|
||||
<key value="Alt+G, Alt+D" />
|
||||
</shortcut>
|
||||
<shortcut id="Git.Status" >
|
||||
<key value="Alt+G, Alt+S" />
|
||||
</shortcut>
|
||||
<shortcut id="Git.Log" >
|
||||
<key value="Alt+G, Alt+L" />
|
||||
</shortcut>
|
||||
<shortcut id="Git.Blame" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Git.Undo" >
|
||||
<key value="Alt+G, Alt+U" />
|
||||
</shortcut>
|
||||
<shortcut id="Git.Add" >
|
||||
<key value="Alt+G, Alt+A" />
|
||||
</shortcut>
|
||||
<shortcut id="Git.DiffProject" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Git.StatusProject" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Git.LogProject" >
|
||||
<key value="Alt+G, Alt+K" />
|
||||
</shortcut>
|
||||
<shortcut id="Git.UndoProject" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Git.ShowCommit" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Git.Commit" >
|
||||
<key value="Alt+G, Alt+C" />
|
||||
</shortcut>
|
||||
<shortcut id="Git.Pull" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Git.Push" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Help.Home" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Help.Previous" >
|
||||
<key value="Backspace" />
|
||||
</shortcut>
|
||||
<shortcut id="Help.Next" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Help.AddBookmark" >
|
||||
<key value="Ctrl+D" />
|
||||
</shortcut>
|
||||
<shortcut id="Help.Index" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Help.Contents" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Help.Search" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Help.Context" >
|
||||
<key value="F1" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Mode.Help.HelpMode" >
|
||||
<key value="Meta+5" />
|
||||
</shortcut>
|
||||
<shortcut id="Help.IndexShortcut" >
|
||||
<key value="Ctrl+I" />
|
||||
</shortcut>
|
||||
<shortcut id="Help.ContentsShortcut" >
|
||||
<key value="Ctrl+T" />
|
||||
</shortcut>
|
||||
<shortcut id="Help.SearchShortcut" >
|
||||
<key value="Ctrl+S" />
|
||||
</shortcut>
|
||||
<shortcut id="Qt4Builder.RunQMake" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Qt4Builder.RunQMakeContextMenu" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Qt Script Editor.Run" >
|
||||
<key value="Ctrl+R" />
|
||||
</shortcut>
|
||||
<shortcut id="CodePaster.post" >
|
||||
<key value="Alt+C, Alt+P" />
|
||||
</shortcut>
|
||||
<shortcut id="CodePaster.fetch" >
|
||||
<key value="Alt+C, Alt+F" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.StartExternal" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.AttachExternal" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.Interrupt" >
|
||||
<key value="Ctrl+Alt+P" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.Reset" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.NextLine" >
|
||||
<key value="Ctrl+Shift+O" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.StepLine" >
|
||||
<key value="Ctrl+Shift+I" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.StepOut" >
|
||||
<key value="Ctrl+Shift+T" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.NextInstruction" >
|
||||
<key value="Ctrl+Alt+Shift+O" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.StepInstruction" >
|
||||
<key value="Ctrl+Alt+Shift+I" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.RunToLine" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.RunToFunction" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.JumpToLine" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.ToggleBreak" >
|
||||
<key value="Ctrl+\" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.BreakByFunction" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.BreakAtMain" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.SkipKnownFrames" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.UseCustomDumpers" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.UseFastStart" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.DumpLog" >
|
||||
<key value="Ctrl+Shift+F11" />
|
||||
</shortcut>
|
||||
<shortcut id="Debugger.AddToWatch" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Mode.Debugger.Mode.Debug" >
|
||||
<key value="Meta+3" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.Edit" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.Add" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.Delete" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.Revert" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.DiffCurrent" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.DiffProject" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.DiffAll" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.Opened" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.Submit" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.PendingChanges" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.Describe" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.AnnotateCurrent" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.Annotate" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.FilelogCurrent" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Perforce.Filelog" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Nokia.Perforce.SubmitCurrentLog" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Nokia.Perforce.DiffSelectedFilesInLog" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Bookmarks.Toggle" >
|
||||
<key value="Ctrl+D" />
|
||||
</shortcut>
|
||||
<shortcut id="Bookmarks.MoveUp" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Bookmarks.MoveDown" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Bookmarks.Previous" >
|
||||
<key value="Meta+," />
|
||||
</shortcut>
|
||||
<shortcut id="Bookmarks.Next" >
|
||||
<key value="Meta+." />
|
||||
</shortcut>
|
||||
<shortcut id="Bookmarks.Previous.Document" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="Bookmarks.Next.Document" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="TextEditor.SelectEncoding" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="TextEditor.AutoIndentSelection" >
|
||||
<key value="Ctrl+I" />
|
||||
</shortcut>
|
||||
<shortcut id="TextEditor.VisualizeWhitespace" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="TextEditor.TextWrapping" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="TextEditor.UnCommentSelection" >
|
||||
<key value="Ctrl+/" />
|
||||
</shortcut>
|
||||
<shortcut id="TextEditor.DeleteLine" >
|
||||
<key value="Shift+Del" />
|
||||
</shortcut>
|
||||
<shortcut id="TextEditor.UnCollapseAll" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="FindFilter.Files on Disk" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="FindFilter.All Projects" >
|
||||
<key value="Ctrl+Shift+F" />
|
||||
</shortcut>
|
||||
<shortcut id="FindFilter.Current Project" >
|
||||
<key value="Ctrl+Alt+F" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Pane.Problems" >
|
||||
<key value="Ctrl+1" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Pane.SearchResults" >
|
||||
<key value="Ctrl+2" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Pane.ApplicationOutput" >
|
||||
<key value="Ctrl+3" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Pane.Compile" >
|
||||
<key value="Ctrl+4" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Pane.Git" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Pane.Perforce" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
<shortcut id="QtCreator.Pane.General" >
|
||||
<key value="" />
|
||||
</shortcut>
|
||||
</mapping>
|
26
bin/snippets/class_generic.snp
Normal file
@@ -0,0 +1,26 @@
|
||||
<!DOCTYPE QtWorkbenchSnippet>
|
||||
<qtworkbench>
|
||||
<data>
|
||||
<variable>Name</variable>
|
||||
<value type="QString" >Class - Generic</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Description</variable>
|
||||
<value type="QString" >This creates a new generic class</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Category</variable>
|
||||
<value type="QString" >Classes</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Shortcut</variable>
|
||||
<value type="QString" >cl</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Contents</variable>
|
||||
<value type="QString" ><![CDATA[class $anchor$MyClass$cursor$
|
||||
{
|
||||
$selection$
|
||||
};]]></value>
|
||||
</data>
|
||||
</qtworkbench>
|
29
bin/snippets/class_qobject.snp
Normal file
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE QtWorkbenchSnippet>
|
||||
<qtworkbench>
|
||||
<data>
|
||||
<variable>Name</variable>
|
||||
<value type="QString" >Class - QObject</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Description</variable>
|
||||
<value type="QString" >This creates a new class deriving from QObject</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Category</variable>
|
||||
<value type="QString" >Classes</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Shortcut</variable>
|
||||
<value type="QString" >cl</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Contents</variable>
|
||||
<value type="QString" ><![CDATA[class $anchor$MyClass$cursor$ : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
$selection$
|
||||
};]]></value>
|
||||
</data>
|
||||
</qtworkbench>
|
29
bin/snippets/class_qwidget.snp
Normal file
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE QtWorkbenchSnippet>
|
||||
<qtworkbench>
|
||||
<data>
|
||||
<variable>Name</variable>
|
||||
<value type="QString" >Class - QWidget</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Description</variable>
|
||||
<value type="QString" >This creates a new class deriving from QWidget</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Category</variable>
|
||||
<value type="QString" >Classes</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Shortcut</variable>
|
||||
<value type="QString" >cl</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Contents</variable>
|
||||
<value type="QString" ><![CDATA[class $anchor$MyClass$cursor$ : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
$selection$
|
||||
};]]></value>
|
||||
</data>
|
||||
</qtworkbench>
|
23
bin/snippets/comment.snp
Normal file
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE QtWorkbenchSnippet>
|
||||
<qtworkbench>
|
||||
<data>
|
||||
<variable>Name</variable>
|
||||
<value type="QString" >/* ... */ Comment</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Description</variable>
|
||||
<value type="QString" >This creates comment</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Category</variable>
|
||||
<value type="QString" >Other</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Shortcut</variable>
|
||||
<value type="QString" >/*</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Contents</variable>
|
||||
<value type="QString" ><![CDATA[/* $anchor$$selection$$cursor$ */]]></value>
|
||||
</data>
|
||||
</qtworkbench>
|
48
bin/snippets/for.snp
Normal file
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE QtWorkbenchSnippet>
|
||||
<qtworkbench>
|
||||
|
||||
<data>
|
||||
<variable>Name</variable>
|
||||
<value type="QString" >for loop</value>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<variable>Description</variable>
|
||||
<value type="QString" >This inserts an incrementing for loop</value>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<variable>Category</variable>
|
||||
<value type="QString" >Common Statements</value>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<variable>Shortcut</variable>
|
||||
<value type="QString" >fo</value>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<variable>Contents</variable>
|
||||
<value type="QString" ><![CDATA[for (%1 %2 = 0; %2 < %3; ++%2) {
|
||||
$anchor$$selection$$cursor$
|
||||
}]]></value>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<variable>Arguments</variable>
|
||||
<valuemap type="QVariantMap" >
|
||||
<value key="1" type="QString"><![CDATA[<tt>for (<b>TYPE</b> VAR = 0; VAR < CONDITION; ++VAR)...</tt>]]></value>
|
||||
<value key="2" type="QString"><![CDATA[<tt>for (%1 <b>VAR</b> = 0; <b>VAR</b> < 10; ++<b>VAR</b>)...</tt>]]></value>
|
||||
<value key="3" type="QString"><![CDATA[<tt>for (%1 %2 = 0; %2 < <b>CONDITION</b>; ++%2)...</tt>]]></value>
|
||||
</valuemap>
|
||||
</data>
|
||||
|
||||
<data>
|
||||
<variable>ArgumentDefaults</variable>
|
||||
<valuemap type="QVariantMap" >
|
||||
<value key="1" type="QString">int</value>
|
||||
<value key="2" type="QString">i</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
|
||||
</qtworkbench>
|
25
bin/snippets/foreach.snp
Normal file
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE QtWorkbenchSnippet>
|
||||
<qtworkbench>
|
||||
<data>
|
||||
<variable>Name</variable>
|
||||
<value type="QString" >foreach statement</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Description</variable>
|
||||
<value type="QString" >This creates a foreach statement</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Category</variable>
|
||||
<value type="QString" >Common Statements</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Shortcut</variable>
|
||||
<value type="QString" >fo</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Contents</variable>
|
||||
<value type="QString" ><![CDATA[foreach ($cursor$) {
|
||||
$selection$
|
||||
}]]></value>
|
||||
</data>
|
||||
</qtworkbench>
|
25
bin/snippets/if.snp
Normal file
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE QtWorkbenchSnippet>
|
||||
<qtworkbench>
|
||||
<data>
|
||||
<variable>Name</variable>
|
||||
<value type="QString" >if Statement</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Description</variable>
|
||||
<value type="QString" >This creates a if statement</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Category</variable>
|
||||
<value type="QString" >Common Statements</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Shortcut</variable>
|
||||
<value type="QString" >if</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Contents</variable>
|
||||
<value type="QString" ><![CDATA[if ($cursor$) {
|
||||
$selection$
|
||||
}]]></value>
|
||||
</data>
|
||||
</qtworkbench>
|
27
bin/snippets/ifelse.snp
Normal file
@@ -0,0 +1,27 @@
|
||||
<!DOCTYPE QtWorkbenchSnippet>
|
||||
<qtworkbench>
|
||||
<data>
|
||||
<variable>Name</variable>
|
||||
<value type="QString" >if - else Statement</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Description</variable>
|
||||
<value type="QString" >This creates a if...else statement</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Category</variable>
|
||||
<value type="QString" >Common Statements</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Shortcut</variable>
|
||||
<value type="QString" >if</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Contents</variable>
|
||||
<value type="QString" ><![CDATA[if ($cursor$) {
|
||||
$selection$
|
||||
} else {
|
||||
|
||||
}]]></value>
|
||||
</data>
|
||||
</qtworkbench>
|
10
bin/templates/qt4project/main.cpp
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <%QAPP_INCLUDE%>
|
||||
#include "%INCLUDE%"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
%CLASS% w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
}
|
11
bin/templates/qt4project/mywidget.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "%INCLUDE%"
|
||||
|
||||
%CLASS%::%CLASS%(QWidget *parent)
|
||||
: %BASECLASS%(parent)
|
||||
{
|
||||
}
|
||||
|
||||
%CLASS%::~%CLASS%()
|
||||
{
|
||||
|
||||
}
|
15
bin/templates/qt4project/mywidget.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef %PRE_DEF%
|
||||
#define %PRE_DEF%
|
||||
|
||||
#include <QtGui/%BASECLASS%>
|
||||
|
||||
class %CLASS% : public %BASECLASS%
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
%CLASS%(QWidget *parent = 0);
|
||||
~%CLASS%();
|
||||
};
|
||||
|
||||
#endif // %PRE_DEF%
|
13
bin/templates/qt4project/mywidget_form.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#include "%INCLUDE%"
|
||||
#include "%UI_HDR%"
|
||||
|
||||
%CLASS%::%CLASS%(QWidget *parent)
|
||||
: %BASECLASS%(parent), ui(new Ui::%CLASS%Class)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
%CLASS%::~%CLASS%()
|
||||
{
|
||||
delete ui;
|
||||
}
|
23
bin/templates/qt4project/mywidget_form.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef %PRE_DEF%
|
||||
#define %PRE_DEF%
|
||||
|
||||
#include <QtGui/%BASECLASS%>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class %CLASS%Class;
|
||||
}
|
||||
|
||||
class %CLASS% : public %BASECLASS%
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
%CLASS%(QWidget *parent = 0);
|
||||
~%CLASS%();
|
||||
|
||||
private:
|
||||
Ui::%CLASS%Class *ui;
|
||||
};
|
||||
|
||||
#endif // %PRE_DEF%
|
23
bin/templates/qt4project/widget.ui
Normal file
@@ -0,0 +1,23 @@
|
||||
<ui version="4.0" stdsetdef="1" >
|
||||
<class>%CLASS%Class</class>
|
||||
<widget class="%BASECLASS%" name="%CLASS%Class" >
|
||||
<property name="objectName" >
|
||||
<cstring>%CLASS%Class</cstring>
|
||||
</property>
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>600</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>%CLASS%</string>
|
||||
</property>%CENTRAL_WIDGET%
|
||||
</widget>
|
||||
<layoutDefault spacing="6" margin="11" />
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
102
doc/classic.css
Normal file
@@ -0,0 +1,102 @@
|
||||
h3.fn,span.fn
|
||||
{
|
||||
margin-left: 1cm;
|
||||
text-indent: -1cm;
|
||||
}
|
||||
|
||||
a:link
|
||||
{
|
||||
color: #004faf;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
a:visited
|
||||
{
|
||||
color: #672967;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
td.postheader
|
||||
{
|
||||
font-family: sans-serif
|
||||
}
|
||||
|
||||
tr.address
|
||||
{
|
||||
font-family: sans-serif
|
||||
}
|
||||
|
||||
body
|
||||
{
|
||||
background: #ffffff;
|
||||
color: black
|
||||
}
|
||||
|
||||
table tr.odd {
|
||||
background: #f0f0f0;
|
||||
color: black;
|
||||
}
|
||||
|
||||
table tr.even {
|
||||
background: #e4e4e4;
|
||||
color: black;
|
||||
}
|
||||
|
||||
table.annotated th {
|
||||
padding: 3px;
|
||||
text-align: left
|
||||
}
|
||||
|
||||
table.annotated td {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
table tr pre
|
||||
{
|
||||
padding-top: none;
|
||||
padding-bottom: none;
|
||||
padding-left: none;
|
||||
padding-right: none;
|
||||
border: none;
|
||||
background: none
|
||||
}
|
||||
|
||||
tr.qt-style
|
||||
{
|
||||
background: #a2c511;
|
||||
color: black
|
||||
}
|
||||
|
||||
body pre
|
||||
{
|
||||
padding: 0.2em;
|
||||
border: #e7e7e7 1px solid;
|
||||
background: #f1f1f1;
|
||||
color: black
|
||||
}
|
||||
|
||||
span.preprocessor, span.preprocessor a
|
||||
{
|
||||
color: darkblue;
|
||||
}
|
||||
|
||||
span.comment
|
||||
{
|
||||
color: darkred;
|
||||
font-style: italic
|
||||
}
|
||||
|
||||
span.string,span.char
|
||||
{
|
||||
color: darkgreen;
|
||||
}
|
||||
|
||||
.subtitle
|
||||
{
|
||||
font-size: 0.8em
|
||||
}
|
||||
|
||||
.small-subtitle
|
||||
{
|
||||
font-size: 0.65em
|
||||
}
|
25
doc/doc.pri
Normal file
@@ -0,0 +1,25 @@
|
||||
# Generate docs. Does not work for shadow builds and never will.
|
||||
# (adding a "docs" make target).
|
||||
|
||||
unix {
|
||||
QDOC = SRCDIR=$$PWD OUTDIR=$$OUT_PWD/html $$(QTDIR)/tools/qdoc3/qdoc3
|
||||
HELPGENERATOR = qhelpgenerator
|
||||
} else {
|
||||
QDOC = $$(QTDIR)\tools\qdoc3\release\qdoc3.exe
|
||||
HELPGENERATOR = qhelpgenerator
|
||||
}
|
||||
|
||||
QHP_FILE = $$OUT_PWD/html/qtcreator.qhp
|
||||
QCH_FILE = $$OUT_PWD/qtcreator.qch
|
||||
|
||||
html_docs.commands =$$QDOC $$PWD/qtcreator.qdocconf
|
||||
html_docs.depends += $$PWD/qtcreator.qdoc $$PWD/qtcreator.qdocconf
|
||||
html_docs.files = $$QHP_FILE
|
||||
|
||||
qch_docs.commands = $$HELPGENERATOR -o $$QCH_FILE $$QHP_FILE
|
||||
qch_docs.depends += html_docs
|
||||
qch_docs.files = $$QCH_FILE
|
||||
|
||||
docs.depends = qch_docs
|
||||
|
||||
QMAKE_EXTRA_TARGETS += html_docs qch_docs docs
|
1
doc/doc.pro
Normal file
@@ -0,0 +1 @@
|
||||
include(doc.pri)
|
1306
doc/doxygen/Doxyfile
Normal file
2
doc/example/textfinder/input.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
These forms are processed at run-time to produce dynamically-generated user interfaces. In order to generate a form at run-time, a resource file containing a .ui file is needed. Applications that use the form handling classes need to be configured to be built against the QtUiTools module. This is done by including the following declaration in a qmake project file to ensure that the application is compiled and linked appropriately. A form loader object, provided by the QUiLoader class, is used to construct the user interface. This user interface
|
||||
can be retrieved from any QIODevice; for example, a QFile object can be used to obtain a form stored in a project's resources. The QUiLoader::load() function takes the user interface description contained in the file and constructs the form widget.
|
43
doc/example/textfinder/main.cpp
Normal file
@@ -0,0 +1,43 @@
|
||||
/***************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** Non-Open Source Usage
|
||||
**
|
||||
** Licensees may use this file in accordance with the Qt Beta Version
|
||||
** License Agreement, Agreement version 2.2 provided with the Software or,
|
||||
** alternatively, in accordance with the terms contained in a written
|
||||
** agreement between you and Nokia.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
**
|
||||
** Alternatively, this file may be used under the terms of the GNU General
|
||||
** Public License versions 2.0 or 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the packaging
|
||||
** of this file. Please review the following information to ensure GNU
|
||||
** General Public Licensing requirements will be met:
|
||||
**
|
||||
** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
|
||||
** http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt GPL Exception version
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
#include <QtGui/QApplication>
|
||||
#include "textfinder.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
Q_INIT_RESOURCE(textfinder);
|
||||
QApplication a(argc, argv);
|
||||
TextFinder w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
}
|
75
doc/example/textfinder/textfinder.cpp
Normal file
@@ -0,0 +1,75 @@
|
||||
/***************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** Non-Open Source Usage
|
||||
**
|
||||
** Licensees may use this file in accordance with the Qt Beta Version
|
||||
** License Agreement, Agreement version 2.2 provided with the Software or,
|
||||
** alternatively, in accordance with the terms contained in a written
|
||||
** agreement between you and Nokia.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
**
|
||||
** Alternatively, this file may be used under the terms of the GNU General
|
||||
** Public License versions 2.0 or 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the packaging
|
||||
** of this file. Please review the following information to ensure GNU
|
||||
** General Public Licensing requirements will be met:
|
||||
**
|
||||
** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
|
||||
** http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt GPL Exception version
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
#include <QtGui/QMessageBox>
|
||||
#include <QtCore/QFile>
|
||||
#include <QtCore/QTextStream>
|
||||
#include "textfinder.h"
|
||||
|
||||
TextFinder::TextFinder(QWidget *parent, Qt::WFlags flags)
|
||||
: QWidget(parent, flags)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
loadTextFile();
|
||||
isFirstTime = true;
|
||||
}
|
||||
|
||||
TextFinder::~TextFinder()
|
||||
{
|
||||
}
|
||||
|
||||
void TextFinder::loadTextFile()
|
||||
{
|
||||
QFile inputFile(":/input.txt");
|
||||
inputFile.open(QIODevice::ReadOnly);
|
||||
|
||||
QTextStream in(&inputFile);
|
||||
QString line = in.readAll();
|
||||
inputFile.close();
|
||||
|
||||
ui.textEdit->setPlainText(line);
|
||||
QTextCursor cursor = ui.textEdit->textCursor();
|
||||
cursor.movePosition(QTextCursor::Start, QTextCursor::MoveAnchor, 1);
|
||||
}
|
||||
|
||||
void TextFinder::on_findButton_clicked()
|
||||
{
|
||||
QString searchString = ui.lineEdit->text();
|
||||
QTextDocument *document = ui.textEdit->document();
|
||||
|
||||
bool found = false;
|
||||
|
||||
ui.textEdit->find(searchString, QTextDocument::FindWholeWords);
|
||||
QTextCursor cursor = ui.textEdit->textCursor();
|
||||
if (!cursor.isNull())
|
||||
found = true;
|
||||
}
|
64
doc/example/textfinder/textfinder.h
Normal file
@@ -0,0 +1,64 @@
|
||||
/***************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** Non-Open Source Usage
|
||||
**
|
||||
** Licensees may use this file in accordance with the Qt Beta Version
|
||||
** License Agreement, Agreement version 2.2 provided with the Software or,
|
||||
** alternatively, in accordance with the terms contained in a written
|
||||
** agreement between you and Nokia.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
**
|
||||
** Alternatively, this file may be used under the terms of the GNU General
|
||||
** Public License versions 2.0 or 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the packaging
|
||||
** of this file. Please review the following information to ensure GNU
|
||||
** General Public Licensing requirements will be met:
|
||||
**
|
||||
** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
|
||||
** http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt GPL Exception version
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
#ifndef TEXTFINDER_H
|
||||
#define TEXTFINDER_H
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include "ui_textfinder.h"
|
||||
|
||||
class QPushButton;
|
||||
class QTextEdit;
|
||||
class QLineEdit;
|
||||
|
||||
class TextFinder : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TextFinder(QWidget *parent = 0, Qt::WFlags flags = 0);
|
||||
~TextFinder();
|
||||
|
||||
private slots:
|
||||
void on_findButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::Form ui;
|
||||
void loadTextFile();
|
||||
|
||||
QPushButton *ui_findButton;
|
||||
QTextEdit *ui_textEdit;
|
||||
QLineEdit *ui_lineEdit;
|
||||
bool isFirstTime;
|
||||
};
|
||||
|
||||
#endif // TEXTFINDER_H
|
12
doc/example/textfinder/textfinder.pro
Normal file
@@ -0,0 +1,12 @@
|
||||
TARGET = TextFinder
|
||||
TEMPLATE = app
|
||||
|
||||
|
||||
SOURCES += main.cpp\
|
||||
textfinder.cpp
|
||||
|
||||
HEADERS += textfinder.h
|
||||
|
||||
FORMS += textfinder.ui
|
||||
|
||||
RESOURCES += textfinder.qrc
|
5
doc/example/textfinder/textfinder.qrc
Normal file
@@ -0,0 +1,5 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource>
|
||||
<file>input.txt</file>
|
||||
</qresource>
|
||||
</RCC>
|
78
doc/example/textfinder/textfinder.ui
Normal file
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Form</class>
|
||||
<widget class="QWidget" name="Form">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>378</width>
|
||||
<height>158</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Find Text</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout">
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit"/>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="searchLabel">
|
||||
<property name="text">
|
||||
<string>&Keyword:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>lineEdit</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="findButton">
|
||||
<property name="text">
|
||||
<string>&Find</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>lineEdit</sender>
|
||||
<signal>returnPressed()</signal>
|
||||
<receiver>findButton</receiver>
|
||||
<slot>animateClick()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>261</x>
|
||||
<y>17</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>320</x>
|
||||
<y>17</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
BIN
doc/qt-logo.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
doc/qtcreator-add-resource-wizard.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
doc/qtcreator-add-resource.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
doc/qtcreator-application-output.png
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
doc/qtcreator-breakdown.png
Normal file
After Width: | Height: | Size: 122 KiB |
BIN
doc/qtcreator-buildenvironment.png
Normal file
After Width: | Height: | Size: 96 KiB |
BIN
doc/qtcreator-buildsettings.png
Normal file
After Width: | Height: | Size: 71 KiB |
BIN
doc/qtcreator-buildsettingstab.png
Normal file
After Width: | Height: | Size: 72 KiB |
BIN
doc/qtcreator-buildsteps.png
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
doc/qtcreator-class-info.png
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
doc/qtcreator-compile-pane.png
Normal file
After Width: | Height: | Size: 86 KiB |
BIN
doc/qtcreator-context-sensitive-help.png
Normal file
After Width: | Height: | Size: 209 KiB |
BIN
doc/qtcreator-debug-mode.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
doc/qtcreator-debugging-buttons.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
doc/qtcreator-formedit.png
Normal file
After Width: | Height: | Size: 211 KiB |
BIN
doc/qtcreator-intro-and-location.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
doc/qtcreator-navigate-customfilter.png
Normal file
After Width: | Height: | Size: 52 KiB |
BIN
doc/qtcreator-navigate-popup.png
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
doc/qtcreator-new-project.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
doc/qtcreator-run.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
doc/qtcreator-search-pane.png
Normal file
After Width: | Height: | Size: 52 KiB |
BIN
doc/qtcreator-select-modules.png
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
doc/qtcreator-setting-breakpoint1.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
doc/qtcreator-setting-breakpoint2.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
doc/qtcreator-task-list.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
doc/qtcreator-textfinder-screenshot.png
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
doc/qtcreator-textfinder-ui.png
Normal file
After Width: | Height: | Size: 7.4 KiB |
BIN
doc/qtcreator-watcher.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
doc/qtcreator.png
Normal file
After Width: | Height: | Size: 72 KiB |
BIN
doc/qtcreator.qch
Normal file
1153
doc/qtcreator.qdoc
Normal file
205
doc/qtcreator.qdocconf
Normal file
@@ -0,0 +1,205 @@
|
||||
# Run qdoc from the directory that contains this file.
|
||||
|
||||
project = qtcreator
|
||||
description = "Qt Creator Manual"
|
||||
|
||||
headerdirs =
|
||||
sourcedirs =
|
||||
sourcedirs = $SRCDIR
|
||||
imagedirs = $SRCDIR
|
||||
outputdir = $OUTDIR
|
||||
|
||||
extraimages.HTML = qt-logo \
|
||||
trolltech-logo
|
||||
|
||||
sources.fileextensions = "qtcreator.qdoc"
|
||||
|
||||
|
||||
qhp.projects = QtCreator
|
||||
qhp.QtCreator.file = qtcreator.qhp
|
||||
qhp.QtCreator.namespace = com.nokia.qtcreator.09
|
||||
qhp.QtCreator.virtualFolder = doc
|
||||
qhp.QtCreator.indexTitle = Qt Creator
|
||||
qhp.QtCreator.indexRoot =
|
||||
qhp.QtCreator.extraFiles = classic.css \
|
||||
images/qt-logo.png
|
||||
qhp.QtCreator.filterAttributes = qtcreator 0.9
|
||||
qhp.QtCreator.customFilters.QtCreator.name = Qt Creator 0.9
|
||||
qhp.QtCreator.customFilters.QtCreator.filterAttributes = qtcreator 0.9
|
||||
|
||||
# macros.qdocconf
|
||||
|
||||
macro.aring.HTML = "å"
|
||||
macro.Auml.HTML = "Ä"
|
||||
macro.author = "\\bold{Author:}"
|
||||
macro.br.HTML = "<br />"
|
||||
macro.BR.HTML = "<br />"
|
||||
macro.aacute.HTML = "á"
|
||||
macro.eacute.HTML = "é"
|
||||
macro.iacute.HTML = "í"
|
||||
macro.gui = "\\bold"
|
||||
macro.hr.HTML = "<hr />"
|
||||
macro.key = "\\bold"
|
||||
macro.menu = "\\bold"
|
||||
macro.note = "\\bold{Note:}"
|
||||
macro.oslash.HTML = "ø"
|
||||
macro.ouml.HTML = "ö"
|
||||
macro.QA = "\\e{Qt Assistant}"
|
||||
macro.QD = "\\e{Qt Designer}"
|
||||
macro.QL = "\\e{Qt Linguist}"
|
||||
macro.param = "\\e"
|
||||
macro.raisedaster.HTML = "<sup>*</sup>"
|
||||
macro.reg.HTML = "<sup>®</sup>"
|
||||
macro.return = "Returns"
|
||||
macro.starslash = "\\c{*/}"
|
||||
macro.uuml.HTML = "ü"
|
||||
macro.mdash.HTML = "—"
|
||||
|
||||
# compat.qdocconf
|
||||
|
||||
alias.i = e
|
||||
alias.include = input
|
||||
|
||||
macro.0 = "\\\\0"
|
||||
macro.b = "\\\\b"
|
||||
macro.n = "\\\\n"
|
||||
macro.r = "\\\\r"
|
||||
macro.i = "\\o"
|
||||
macro.i11 = "\\o{1,1}"
|
||||
macro.i12 = "\\o{1,2}"
|
||||
macro.i13 = "\\o{1,3}"
|
||||
macro.i14 = "\\o{1,4}"
|
||||
macro.i15 = "\\o{1,5}"
|
||||
macro.i16 = "\\o{1,6}"
|
||||
macro.i17 = "\\o{1,7}"
|
||||
macro.i18 = "\\o{1,8}"
|
||||
macro.i19 = "\\o{1,9}"
|
||||
macro.i21 = "\\o{2,1}"
|
||||
macro.i31 = "\\o{3,1}"
|
||||
macro.i41 = "\\o{4,1}"
|
||||
macro.i51 = "\\o{5,1}"
|
||||
macro.i61 = "\\o{6,1}"
|
||||
macro.i71 = "\\o{7,1}"
|
||||
macro.i81 = "\\o{8,1}"
|
||||
macro.i91 = "\\o{9,1}"
|
||||
macro.img = "\\image"
|
||||
macro.endquote = "\\endquotation"
|
||||
|
||||
spurious = "Missing comma in .*" \
|
||||
"Missing pattern .*"
|
||||
|
||||
# Doxygen compatibility commands
|
||||
|
||||
macro.see = "\\sa"
|
||||
macro.function = "\\fn"
|
||||
|
||||
# qt-cpp-ignore.qdocconf
|
||||
|
||||
Cpp.ignoretokens = QAXFACTORY_EXPORT \
|
||||
QDESIGNER_COMPONENTS_LIBRARY \
|
||||
QDESIGNER_EXTENSION_LIBRARY \
|
||||
QDESIGNER_SDK_LIBRARY \
|
||||
QDESIGNER_SHARED_LIBRARY \
|
||||
QDESIGNER_UILIB_LIBRARY \
|
||||
QM_EXPORT_CANVAS \
|
||||
QM_EXPORT_DNS \
|
||||
QM_EXPORT_DOM \
|
||||
QM_EXPORT_FTP \
|
||||
QM_EXPORT_HTTP \
|
||||
QM_EXPORT_ICONVIEW \
|
||||
QM_EXPORT_NETWORK \
|
||||
QM_EXPORT_OPENGL \
|
||||
QM_EXPORT_SQL \
|
||||
QM_EXPORT_TABLE \
|
||||
QM_EXPORT_WORKSPACE \
|
||||
QM_EXPORT_XML \
|
||||
QT_ASCII_CAST_WARN \
|
||||
QT_ASCII_CAST_WARN_CONSTRUCTOR \
|
||||
QT_BEGIN_HEADER \
|
||||
QT_DESIGNER_STATIC \
|
||||
QT_END_HEADER \
|
||||
QT_FASTCALL \
|
||||
QT_WIDGET_PLUGIN_EXPORT \
|
||||
Q_COMPAT_EXPORT \
|
||||
Q_CORE_EXPORT \
|
||||
Q_EXPLICIT \
|
||||
Q_EXPORT \
|
||||
Q_EXPORT_CODECS_CN \
|
||||
Q_EXPORT_CODECS_JP \
|
||||
Q_EXPORT_CODECS_KR \
|
||||
Q_EXPORT_PLUGIN \
|
||||
Q_GFX_INLINE \
|
||||
Q_GUI_EXPORT \
|
||||
Q_GUI_EXPORT_INLINE \
|
||||
Q_GUI_EXPORT_STYLE_CDE \
|
||||
Q_GUI_EXPORT_STYLE_COMPACT \
|
||||
Q_GUI_EXPORT_STYLE_MAC \
|
||||
Q_GUI_EXPORT_STYLE_MOTIF \
|
||||
Q_GUI_EXPORT_STYLE_MOTIFPLUS \
|
||||
Q_GUI_EXPORT_STYLE_PLATINUM \
|
||||
Q_GUI_EXPORT_STYLE_POCKETPC \
|
||||
Q_GUI_EXPORT_STYLE_SGI \
|
||||
Q_GUI_EXPORT_STYLE_WINDOWS \
|
||||
Q_GUI_EXPORT_STYLE_WINDOWSXP \
|
||||
QHELP_EXPORT \
|
||||
Q_INLINE_TEMPLATE \
|
||||
Q_INTERNAL_WIN_NO_THROW \
|
||||
Q_NETWORK_EXPORT \
|
||||
Q_OPENGL_EXPORT \
|
||||
Q_OUTOFLINE_TEMPLATE \
|
||||
Q_SQL_EXPORT \
|
||||
Q_SVG_EXPORT \
|
||||
Q_SCRIPT_EXPORT \
|
||||
Q_TESTLIB_EXPORT \
|
||||
Q_TYPENAME \
|
||||
Q_XML_EXPORT \
|
||||
Q_XMLSTREAM_EXPORT \
|
||||
Q_XMLPATTERNS_EXPORT \
|
||||
QDBUS_EXPORT \
|
||||
QT_BEGIN_NAMESPACE \
|
||||
QT_BEGIN_INCLUDE_NAMESPACE \
|
||||
QT_END_NAMESPACE \
|
||||
QT_END_INCLUDE_NAMESPACE \
|
||||
PHONON_EXPORT \
|
||||
EXTENSIONSYSTEM_EXPORT
|
||||
Cpp.ignoredirectives = Q_DECLARE_HANDLE \
|
||||
Q_DECLARE_INTERFACE \
|
||||
Q_DECLARE_METATYPE \
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS \
|
||||
Q_DECLARE_PRIVATE \
|
||||
Q_DECLARE_PUBLIC \
|
||||
Q_DECLARE_SHARED \
|
||||
Q_DECLARE_TR_FUNCTIONS \
|
||||
Q_DECLARE_TYPEINFO \
|
||||
Q_DISABLE_COPY \
|
||||
QT_FORWARD_DECLARE_CLASS \
|
||||
Q_DUMMY_COMPARISON_OPERATOR \
|
||||
Q_ENUMS \
|
||||
Q_FLAGS \
|
||||
Q_INTERFACES \
|
||||
__attribute__ \
|
||||
K_DECLARE_PRIVATE \
|
||||
PHONON_OBJECT \
|
||||
PHONON_HEIR
|
||||
|
||||
|
||||
|
||||
HTML.stylesheets = classic.css
|
||||
HTML.postheader = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n" \
|
||||
"<tr>\n" \
|
||||
"<td align=\"left\" valign=\"top\" width=\"32\">" \
|
||||
"<img src=\"images/qt-logo.png\" align=\"left\" width=\"32\" height=\"32\" border=\"0\" />" \
|
||||
"</td>\n" \
|
||||
"<td width=\"1\"> </td>" \
|
||||
"<td class=\"postheader\" valign=\"center\">" \
|
||||
"<a href=\"qtcreator-manual.html\">" \
|
||||
"<font color=\"#004faf\">Home</font></a>" \
|
||||
"</td>\n" \
|
||||
"<td align=\"right\" valign=\"top\" width=\"230\"></td></tr></table><br>"
|
||||
|
||||
HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
|
||||
"<table width=\"100%\" cellspacing=\"0\" border=\"0\"><tr class=\"address\">\n" \
|
||||
"<td width=\"30%\" align=\"left\">Copyright © 2008 Nokia</td>\n" \
|
||||
"<td width=\"40%\" align=\"center\"> </td>\n" \
|
||||
"<td width=\"30%\" align=\"right\"><div align=\"right\">Qt Creator 0.9</div></td>\n" \
|
||||
"</tr></table></div></address>"
|
BIN
doc/runframework.dia
Normal file
BIN
doc/trolltech-logo.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
98
doc/workbench.qdoc
Normal file
@@ -0,0 +1,98 @@
|
||||
/*!
|
||||
\page index.html
|
||||
\title Workbench
|
||||
|
||||
Workbench is Trolltech's crossplatform IDE. The core of Workbench is
|
||||
basically only a \l{Plugin Loader Framework}{plugin loader} comparable to
|
||||
Eclipse. All major functionality is then added via plugins. The plugins
|
||||
necessary for a full IDE will be provided by Trolltech, possible addons or
|
||||
replacements of existing plugins can be provided by anyone. This means that
|
||||
there will be a place where plugins can be shared.
|
||||
|
||||
The main features of Workbench are:
|
||||
|
||||
\list
|
||||
\o Fast since it's written in C++
|
||||
\o Easy and fast to use (the entire IDE can be controlled via short cuts)
|
||||
\o Highly extensible
|
||||
\o Integrated C++ language support, i.e. code completion, class browser, ...
|
||||
\o Integrated debugger framework and outstanding support for gdb
|
||||
\o Integrated Qt Designer
|
||||
\o Qtopia Integration
|
||||
\endlist
|
||||
|
||||
\section1 Plugins
|
||||
|
||||
As already mentioned, Workbench is basically only a plugin loader framework
|
||||
which gets its IDE functionality through plugins. The most important plugin
|
||||
is the QWorkbench plugin which provides all the basic functionality needed
|
||||
later to integrate e.g. editors or tool windows.
|
||||
|
||||
\table
|
||||
\header
|
||||
\o Plugin Name
|
||||
\o Description
|
||||
|
||||
\row
|
||||
\o \l{QWorkbench Plugin} {QWorkbench}
|
||||
\o The core plugin. Provides the main window and managers for editors,
|
||||
actions, tool windows and files, just to mention the most important ones.
|
||||
|
||||
\endtable
|
||||
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page classes.html
|
||||
\title Workbench Classes and Namespaces
|
||||
|
||||
\section1 Classes
|
||||
|
||||
\generatelist classes
|
||||
|
||||
\section1 Namespaces
|
||||
|
||||
\generatelist{namespaces}
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page interfaces.html
|
||||
\title Interfaces
|
||||
\generatelist mainclasses
|
||||
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page functions.html
|
||||
\title Member Function Index
|
||||
\generatelist functionindex
|
||||
*/
|
||||
|
||||
/*!
|
||||
\group pluginloader
|
||||
|
||||
\title Plugin Loader Framework
|
||||
*/
|
||||
|
||||
/*!
|
||||
\group qwb
|
||||
|
||||
\title QWorkbench Plugin
|
||||
*/
|
||||
|
||||
/*!
|
||||
\namespace Trolltech
|
||||
*/
|
||||
|
||||
/*!
|
||||
\namespace Trolltech::QWorkbench
|
||||
*/
|
||||
|
||||
/*!
|
||||
\namespace Trolltech::QWorkbench::Internal
|
||||
\brief Classes that manage and control internal features of the workbench environment.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\namespace ExtensionSystem
|
||||
*/
|
147
doc/workbench.qtdocconf
Normal file
@@ -0,0 +1,147 @@
|
||||
project = Workbench
|
||||
description = Workbench SDK Documentation
|
||||
|
||||
language = Cpp
|
||||
|
||||
headerdirs = . \
|
||||
../src/libs/extensionsystem \
|
||||
../src/plugins/core \
|
||||
../src/plugins/core/actionmanager
|
||||
|
||||
sourcedirs = . \
|
||||
../src/libs/extensionsystem \
|
||||
../src/plugins/core \
|
||||
../src/plugins/core/actionmanager
|
||||
|
||||
headers.fileextesnions = "*.h"
|
||||
sources.fileextensions = "*.cpp *.qdoc"
|
||||
|
||||
imagedirs = .
|
||||
|
||||
indexes = $QTDIR/doc/html/qt.index
|
||||
|
||||
outputdir = ./html
|
||||
base = file:./html
|
||||
versionsym = 1.0.0
|
||||
defines = Q_QDOC \
|
||||
QT_.*_SUPPORT \
|
||||
QT_.*_LIB \
|
||||
QT_COMPAT \
|
||||
QT_KEYPAD_NAVIGATION \
|
||||
QT3_SUPPORT \
|
||||
Q_WS_.* \
|
||||
Q_OS_.* \
|
||||
Q_BYTE_ORDER \
|
||||
__cplusplus
|
||||
|
||||
codeindent = 1
|
||||
extraimages.HTML = qt-logo \
|
||||
trolltech-logo
|
||||
|
||||
macro.br.HTML = "<br />"
|
||||
macro.QD = "\\e{Qt Designer}"
|
||||
macro.QA = "\\e{Qt Assistant}"
|
||||
macro.eacute.HTML = "é"
|
||||
macro.aring.HTML = "å"
|
||||
macro.oslash.HTML = "ø"
|
||||
macro.ouml.HTML = "ö"
|
||||
macro.Auml.HTML = "Ä"
|
||||
macro.uuml.HTML = "ü"
|
||||
macro.starslash = "\\c{*/}"
|
||||
|
||||
Cpp.ignoretokens = QAXFACTORY_EXPORT \
|
||||
QDESIGNER_COMPONENTS_LIBRARY \
|
||||
QDESIGNER_EXTENSION_LIBRARY \
|
||||
QDESIGNER_SDK_LIBRARY \
|
||||
QDESIGNER_SHARED_LIBRARY \
|
||||
QDESIGNER_UILIB_LIBRARY \
|
||||
QM_EXPORT_CANVAS \
|
||||
QM_EXPORT_DNS \
|
||||
QM_EXPORT_DOM \
|
||||
QM_EXPORT_FTP \
|
||||
QM_EXPORT_HTTP \
|
||||
QM_EXPORT_ICONVIEW \
|
||||
QM_EXPORT_NETWORK \
|
||||
QM_EXPORT_OPENGL \
|
||||
QM_EXPORT_SQL \
|
||||
QM_EXPORT_TABLE \
|
||||
QM_EXPORT_WORKSPACE \
|
||||
QM_EXPORT_XML \
|
||||
QT_ASCII_CAST_WARN \
|
||||
QT_BEGIN_HEADER \
|
||||
QT_DESIGNER_STATIC \
|
||||
QT_END_HEADER \
|
||||
QT_WIDGET_PLUGIN_EXPORT \
|
||||
Q_COMPAT_EXPORT \
|
||||
Q_CORE_EXPORT \
|
||||
Q_EXPLICIT \
|
||||
Q_EXPORT \
|
||||
Q_EXPORT_CODECS_CN \
|
||||
Q_EXPORT_CODECS_JP \
|
||||
Q_EXPORT_CODECS_KR \
|
||||
Q_EXPORT_PLUGIN \
|
||||
Q_GFX_INLINE \
|
||||
Q_GUI_EXPORT \
|
||||
Q_GUI_EXPORT_INLINE \
|
||||
Q_GUI_EXPORT_STYLE_CDE \
|
||||
Q_GUI_EXPORT_STYLE_COMPACT \
|
||||
Q_GUI_EXPORT_STYLE_MAC \
|
||||
Q_GUI_EXPORT_STYLE_MOTIF \
|
||||
Q_GUI_EXPORT_STYLE_MOTIFPLUS \
|
||||
Q_GUI_EXPORT_STYLE_PLATINUM \
|
||||
Q_GUI_EXPORT_STYLE_POCKETPC \
|
||||
Q_GUI_EXPORT_STYLE_SGI \
|
||||
Q_GUI_EXPORT_STYLE_WINDOWS \
|
||||
Q_GUI_EXPORT_STYLE_WINDOWSXP \
|
||||
Q_INLINE_TEMPLATE \
|
||||
Q_NETWORK_EXPORT \
|
||||
Q_OPENGL_EXPORT \
|
||||
Q_OUTOFLINE_TEMPLATE \
|
||||
Q_SQL_EXPORT \
|
||||
Q_SVG_EXPORT \
|
||||
Q_SCRIPT_EXPORT \
|
||||
Q_TESTLIB_EXPORT \
|
||||
Q_TYPENAME \
|
||||
Q_XML_EXPORT \
|
||||
QDBUS_EXPORT
|
||||
Cpp.ignoredirectives = Q_DECLARE_HANDLE \
|
||||
Q_DECLARE_INTERFACE \
|
||||
Q_DECLARE_METATYPE \
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS \
|
||||
Q_DECLARE_PRIVATE \
|
||||
Q_DECLARE_PUBLIC \
|
||||
Q_DECLARE_SHARED \
|
||||
Q_DECLARE_TR_FUNCTIONS \
|
||||
Q_DECLARE_TYPEINFO \
|
||||
Q_DISABLE_COPY \
|
||||
Q_DUMMY_COMPARISON_OPERATOR \
|
||||
Q_ENUMS \
|
||||
Q_FLAGS \
|
||||
Q_INTERFACES \
|
||||
__attribute__
|
||||
|
||||
HTML.stylesheets = classic.css
|
||||
HTML.postheader = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n" \
|
||||
"<tr>\n" \
|
||||
"<td align=\"left\" valign=\"top\" width=\"32\">" \
|
||||
"<a href=\"http://www.trolltech.com/products/qt\"><img src=\"images/qt-logo.png\" align=\"left\" width=\"32\" height=\"32\" border=\"0\" /></a>" \
|
||||
"</td>\n" \
|
||||
"<td width=\"1\"> </td>" \
|
||||
"<td class=\"postheader\" valign=\"center\">" \
|
||||
"<a href=\"index.html\">" \
|
||||
"<font color=\"#004faf\">Home</font></a> ·" \
|
||||
" <a href=\"classes.html\">" \
|
||||
"<font color=\"#004faf\">All Classes</font></a> ·" \
|
||||
" <a href=\"interfaces.html\">" \
|
||||
"<font color=\"#004faf\">All Interfaces</font></a> ·" \
|
||||
" <a href=\"functions.html\">" \
|
||||
"<font color=\"#004faf\">Functions</font></a>" \
|
||||
"</td>\n" \
|
||||
"<td align=\"right\" valign=\"top\" width=\"230\"><a href=\"http://www.trolltech.com\"><img src=\"images/trolltech-logo.png\" align=\"right\" width=\"203\" height=\"32\" border=\"0\" /></a></td></tr></table>"
|
||||
|
||||
HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
|
||||
"<table width=\"100%\" cellspacing=\"0\" border=\"0\"><tr class=\"address\">\n" \
|
||||
"<td width=\"30%\">Copyright © \$THISYEAR\$ <a href=\"trolltech.html\">Trolltech</a></td>\n" \
|
||||
"<td width=\"40%\" align=\"center\"><a href=\"trademarks.html\">Trademarks</a></td>\n" \
|
||||
"<td width=\"30%\" align=\"right\"><div align=\"right\">Qt \\version</div></td>\n" \
|
||||
"</tr></table></div></address>"
|
346
examples/scripting/demo.js
Normal file
@@ -0,0 +1,346 @@
|
||||
// This script file demos the scripting features
|
||||
// of Qt Creator.
|
||||
// Choose "Run" from the context menu.
|
||||
|
||||
function introspect(o, indent)
|
||||
{
|
||||
core.messageManager.printToOutputPane(indent + "+++++++++++++ Class " + o);
|
||||
for (i in o) {
|
||||
var member = o[i];
|
||||
var t = typeof member;
|
||||
core.messageManager.printToOutputPane(indent + typeof o[i] + " " + i);
|
||||
if (t == "object")
|
||||
introspect(i, indent + " ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function introspectToString(o)
|
||||
{
|
||||
var rc = "";
|
||||
for (i in o) {
|
||||
rc = rc + " " + typeof o[i] + " " + i;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
function demoInputDialogs()
|
||||
{
|
||||
var t = getText(core.mainWindow, "Input dialogs", "text", "default");
|
||||
if (t == null)
|
||||
return;
|
||||
|
||||
core.messageManager.printToOutputPane("Input :" +t);
|
||||
var i = getInteger(core.mainWindow, "Input dialogs", "integer", 42, 0, 1000);
|
||||
if (i == null)
|
||||
return;
|
||||
|
||||
core.messageManager.printToOutputPane("Input :" +i);
|
||||
var d = getDouble(core.mainWindow, "Input dialogs", "double", 42.0, 0.0, 1000.0);
|
||||
if (d == null)
|
||||
return;
|
||||
core.messageManager.printToOutputPane("Input :" +d);
|
||||
}
|
||||
|
||||
function demoFileDialogs()
|
||||
{
|
||||
var f = getOpenFileName(core.mainWindow, "Choose file", "", "All files (*.*)");
|
||||
if (f == null)
|
||||
return;
|
||||
|
||||
core.messageManager.printToOutputPane("File:" + f);
|
||||
|
||||
f = getOpenFileNames(core.mainWindow, "Choose files", "", "All files (*.*)");
|
||||
|
||||
if (f == null)
|
||||
return;
|
||||
|
||||
core.messageManager.printToOutputPane("Files:" + f);
|
||||
|
||||
f = getSaveFileName(core.mainWindow, "Choose file to write to", "", "All files (*.*)");
|
||||
|
||||
if (f == null)
|
||||
return;
|
||||
|
||||
core.messageManager.printToOutputPane("File:" + f);
|
||||
|
||||
f = getExistingDirectory(core.mainWindow, "Choose directory", "");
|
||||
|
||||
if (f == null)
|
||||
return;
|
||||
|
||||
core.messageManager.printToOutputPane("Directory:" + f);
|
||||
}
|
||||
|
||||
|
||||
function demoMessageBoxes()
|
||||
{
|
||||
critical(core.mainWindow, "Critical", "critical");
|
||||
warning(core.mainWindow, "warning", "warning");
|
||||
information(core.mainWindow, "information", "information");
|
||||
var a = yesNoQuestion(core.mainWindow, "Question", "question");
|
||||
core.messageManager.printToOutputPane("Answer:" +a);
|
||||
}
|
||||
|
||||
function demoWizard()
|
||||
{
|
||||
var filters = new Array("ProjectExplorer.WizardType.Project", "QtCreator::WizardType::File");
|
||||
core.showNewItemDialog(filters);
|
||||
}
|
||||
|
||||
function demoWidgets()
|
||||
{
|
||||
core.mainWindow.windowTitle = "Accessing MainWindow";
|
||||
core.statusBar.showMessage("Accessing StatusBar", 0);
|
||||
}
|
||||
|
||||
function demoIntrospect()
|
||||
{
|
||||
// Not perfect yet
|
||||
introspect(core, "");
|
||||
}
|
||||
|
||||
function demoFileManager()
|
||||
{
|
||||
core.messageManager.printToOutputPane("Recent files:" + core.fileManager.recentFiles);
|
||||
var name = getText(core.mainWindow, "Input file name", "name", "");
|
||||
|
||||
if (core.fileManager.isFileManaged(name) == 0) {
|
||||
core.messageManager.printToOutputPane(name + " is not managed.");
|
||||
return;
|
||||
}
|
||||
|
||||
var mf = core.fileManager.managedFiles(name);
|
||||
var s = mf.length;
|
||||
core.messageManager.printToOutputPane(s + " managed files match " + name);
|
||||
for (var i = 0; i < mf.length; i++) {
|
||||
core.messageManager.printToOutputPane(mf[i].fileName);
|
||||
}
|
||||
}
|
||||
|
||||
function printEditor(e, indent)
|
||||
{
|
||||
var m = indent + "Editor " + e.displayName + ", " + e.kind ;
|
||||
var f = e.file;
|
||||
m = m + " (" + f.fileName + ")";
|
||||
core.messageManager.printToOutputPane(m);
|
||||
}
|
||||
|
||||
function printEditorList(header, l, indent)
|
||||
{
|
||||
core.messageManager.printToOutputPane(header + " (" + l.length + ")");
|
||||
for (var i = 0; i < l.length; i++) {
|
||||
printEditor(l[i]," ");
|
||||
}
|
||||
}
|
||||
|
||||
function printEditorGroup(g)
|
||||
{
|
||||
var m = "Editor Group: " + g.editorCount + " editor(s)";
|
||||
core.messageManager.printToOutputPane(m);
|
||||
printEditorList("Editors of the group", g.editors);
|
||||
var ce = g.currentEditor;
|
||||
if (ce == null) {
|
||||
core.messageManager.printToOutputPane("No current editor in group");
|
||||
} else {
|
||||
printEditor(ce, " ");
|
||||
}
|
||||
}
|
||||
|
||||
function demoEditorManager()
|
||||
{
|
||||
var og = core.editorManager.editorGroups;
|
||||
core.messageManager.printToOutputPane("Editor groups " + og.length);
|
||||
for (var i = 0; i < og.length; i++) {
|
||||
printEditorGroup(og[i]);
|
||||
}
|
||||
|
||||
printEditorList("Opened editors", core.editorManager.openedEditors);
|
||||
|
||||
var ce = core.editorManager.currentEditor;
|
||||
if (ce == null) {
|
||||
core.messageManager.printToOutputPane("No current editor");
|
||||
return;
|
||||
}
|
||||
|
||||
core.messageManager.printToOutputPane("Current editor");
|
||||
printEditor(ce, "");
|
||||
|
||||
var f = getOpenFileName(core.mainWindow, "Choose file to open", "", "All files (*.*)");
|
||||
if (f == null)
|
||||
return;
|
||||
|
||||
printEditor(core.editorManager.openEditor(f, ""), "");
|
||||
// printEditor(core.editorManager.newFile("Text", "title", "contents"));
|
||||
// var dup = ce.duplicate(core.mainWindow);
|
||||
}
|
||||
|
||||
function demoDebugger()
|
||||
{
|
||||
var state = gdbdebugger.status;
|
||||
core.messageManager.printToOutputPane("State " + state);
|
||||
// TODO: Start debugger on demand?
|
||||
if (state != 0)
|
||||
gdbdebugger.sendCommand("help");
|
||||
}
|
||||
|
||||
// -- ProjectExplorer
|
||||
function printProjectItem(pi, indent, recursively)
|
||||
{
|
||||
var m = indent + "ProjectItem " + pi.kind + " " + pi.name;
|
||||
core.messageManager.printToOutputPane(m);
|
||||
if (recursively != 0) {
|
||||
var rIndent = indent + " ";
|
||||
var c = projectExplorer.childrenOf(pi);
|
||||
for (var i = 0; i < c.length; i++) {
|
||||
printProjectItem(c[i], rIndent, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function printSession(s, indent)
|
||||
{
|
||||
core.messageManager.printToOutputPane(indent + "Session " + s.name + " startup project " + s.startupProject);
|
||||
var p = s.projects;
|
||||
var pIndent = indent + " ";
|
||||
for (var i = 0; i < p.length; i++) {
|
||||
printProjectItem(p[i], pIndent, 1);
|
||||
}
|
||||
}
|
||||
|
||||
function demoProjectExplorer()
|
||||
{
|
||||
core.messageManager.printToOutputPane("ProjectExplorer");
|
||||
projectExplorer.buildManager.showOutputWindow(1);
|
||||
projectExplorer.buildManager.addMessage("Build manager message");
|
||||
projectExplorer.applicationOutputWindow.clear();
|
||||
projectExplorer.applicationOutputWindow.appendOutput("Hi, there! .. This the projectExplorer demo");
|
||||
|
||||
var ci = projectExplorer.currentItem;
|
||||
if (ci != null) {
|
||||
core.messageManager.printToOutputPane("Current Item");
|
||||
printProjectItem(ci, " ", 0);
|
||||
} else {
|
||||
core.messageManager.printToOutputPane("No current Item");
|
||||
}
|
||||
var cp = projectExplorer.currentProject;
|
||||
if (cp != null) {
|
||||
core.messageManager.printToOutputPane("Current Project");
|
||||
printProjectItem(cp, " ", 0);
|
||||
} else {
|
||||
core.messageManager.printToOutputPane("No current Project");
|
||||
}
|
||||
|
||||
var cs = projectExplorer.session;
|
||||
if (cs != null) {
|
||||
core.messageManager.printToOutputPane("Current Session");
|
||||
printSession(cs, " ");
|
||||
// Ask to build
|
||||
var p = projectExplorer.needsBuild(cs.projects[0]);
|
||||
for (var i = 0; i < p.length; i++) {
|
||||
if (yesNoQuestion(core.mainWindow, "Rebuild", "Do you want to rebuild " + p[i].name + "?") != 65536) {
|
||||
if (p[i].supportsProjectCommand(2)) {
|
||||
p[i].executeProjectCommand(2);
|
||||
} else {
|
||||
core.messageManager.printToOutputPane("Build not supported.");
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
core.messageManager.printToOutputPane("No current Session");
|
||||
var a = yesNoQuestion(core.mainWindow, "Open Session", "Do you want to open a session?");
|
||||
if (a != 65536) {
|
||||
var f = getOpenFileNames(core.mainWindow, "Choose a session", "", "All projects (*.qws *.pro)");
|
||||
if (f == null)
|
||||
return;
|
||||
var o = projectExplorer.openProject(f);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (yesNoQuestion(core.mainWindow, "Build manager", "Do you want run a command using build mananger?") != 65536) {
|
||||
var cmd = new BuildManagerCommand("ls", "-l");
|
||||
var cmds =new Array(cmd);
|
||||
core.messageManager.printToOutputPane("Let build mananger run a command " + cmds + " (see compile window)");
|
||||
projectExplorer.buildManager.start(cmds);
|
||||
}
|
||||
}
|
||||
|
||||
// --------------- MAIN
|
||||
|
||||
var features = new Array("Input dialogs",
|
||||
"File dialogs",
|
||||
"Messages",
|
||||
"Project Explorer",
|
||||
"Message Manager",
|
||||
"Wizard",
|
||||
"Editor manager",
|
||||
"File manager",
|
||||
"Introspect",
|
||||
"Widgets magic",
|
||||
"Debugger");
|
||||
|
||||
core.messageManager.printToOutputPane(" +++ demo.js " + Date());
|
||||
|
||||
while (1) {
|
||||
var f = getItem(core.mainWindow, "Choose a demo", "Available demos", features, 0);
|
||||
if (f == null)
|
||||
return;
|
||||
|
||||
while (1) {
|
||||
if (f == features[0]) {
|
||||
demoInputDialogs();
|
||||
break;
|
||||
}
|
||||
|
||||
if (f == features[1]) {
|
||||
demoFileDialogs();
|
||||
break;
|
||||
}
|
||||
|
||||
if (f == features[2]) {
|
||||
demoMessageBoxes();
|
||||
break;
|
||||
}
|
||||
|
||||
if (f == features[3]) {
|
||||
demoProjectExplorer();
|
||||
break;
|
||||
}
|
||||
|
||||
if (f == features[4]) {
|
||||
core.messageManager.printToOutputPane("Hi there!",1);
|
||||
break;
|
||||
}
|
||||
|
||||
if (f == features[5]) {
|
||||
demoWizard();
|
||||
break;
|
||||
}
|
||||
|
||||
if (f == features[6]) {
|
||||
demoEditorManager();
|
||||
break;
|
||||
}
|
||||
|
||||
if (f == features[7]) {
|
||||
demoFileManager();
|
||||
break;
|
||||
}
|
||||
|
||||
if (f == features[8]) {
|
||||
demoIntrospect();
|
||||
break;
|
||||
}
|
||||
|
||||
if (f == features[9]) {
|
||||
demoWidgets();
|
||||
break;
|
||||
}
|
||||
|
||||
if (f == features[10]) {
|
||||
demoDebugger();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
52
fix_makefile_header_dependencies.sh
Executable file
@@ -0,0 +1,52 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
WORKER=./fill_deps.sh
|
||||
DEPFILE=deps
|
||||
|
||||
write_deps_file() {
|
||||
INPUT=$1
|
||||
ESCAPED_OUTPUT=`sed 's/\//\\\\\//g' <<<"$1"`
|
||||
|
||||
{
|
||||
echo '#! /usr/bin/env bash'
|
||||
grep '^\(CXXFLAGS\|INCPATH\|DEFINES\)' ${INPUT} \
|
||||
| sed \
|
||||
-e 's/$(\([^)]\+\))/${\1}/g' \
|
||||
-e 's/"/\\"/g' \
|
||||
-e 's/^\([^ ]\+\) *= *\(.\+\)/\1="\2"/'
|
||||
echo
|
||||
echo 'touch deps'
|
||||
grep '^.$(CXX)' ${INPUT} \
|
||||
| grep -v '$@' \
|
||||
| sed \
|
||||
-e 's/^\t\$(CXX)\(.\+\)$/makedepend \1 -w 1000000 -f '${DEPFILE}' -p "" -a -o .o 2>\/dev\/null/' \
|
||||
-e 's/$(\([^)]\+\))/${\1}/g' \
|
||||
-e 's/\\/\//g'
|
||||
} > "${WORKER}"
|
||||
chmod a+x "${WORKER}"
|
||||
}
|
||||
|
||||
|
||||
|
||||
PWD_BACKUP=$PWD
|
||||
|
||||
while read makefile ; do
|
||||
dir=`dirname "${makefile}"`
|
||||
if [ `find "${dir}" -maxdepth 1 -name '*.cpp' | wc -l 2>/dev/null` -ge 1 ]; then
|
||||
echo "Directory: $dir"
|
||||
cd $dir
|
||||
rm -f "${DEPFILE}"
|
||||
write_deps_file Makefile
|
||||
"${WORKER}"
|
||||
TEMPFILE=`mktemp`
|
||||
sed 's/^.\+\/\([^\/]\+.o:\)/\1/' "${DEPFILE}" > "${TEMPFILE}"
|
||||
mv "${TEMPFILE}" "${DEPFILE}"
|
||||
# rm "${WORKER}"
|
||||
|
||||
cd ${PWD_BACKUP}
|
||||
echo "include ${DEPFILE}" >> "${makefile}"
|
||||
fi
|
||||
done < <(find src -name 'Makefile')
|
||||
|
||||
cd ${PWD_BACKUP}
|
||||
|
12
installer/TODO.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
<all>
|
||||
- installdir whitespace check done.
|
||||
- installdir exist/non-empty check
|
||||
|
||||
<linux>
|
||||
- run '/bin/xdg-desktop-install.sh' if '/usr/bin/xdg-mime exists'
|
||||
- desktop shortcut
|
||||
|
||||
<windows>
|
||||
- create dir '${env(APPDATA)}/Trolltech'
|
||||
- start menue shortcuts
|
||||
|
433
installer/installer.cpp
Normal file
@@ -0,0 +1,433 @@
|
||||
/***************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** Non-Open Source Usage
|
||||
**
|
||||
** Licensees may use this file in accordance with the Qt Beta Version
|
||||
** License Agreement, Agreement version 2.2 provided with the Software or,
|
||||
** alternatively, in accordance with the terms contained in a written
|
||||
** agreement between you and Nokia.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
**
|
||||
** Alternatively, this file may be used under the terms of the GNU General
|
||||
** Public License versions 2.0 or 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the packaging
|
||||
** of this file. Please review the following information to ensure GNU
|
||||
** General Public Licensing requirements will be met:
|
||||
**
|
||||
** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
|
||||
** http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt GPL Exception version
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
// This file contains the QtCreator-specific part of the installer.
|
||||
// It lists the files and features the installer should handle.
|
||||
|
||||
#include "qinstaller.h"
|
||||
#include "qinstallergui.h"
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QtCore/QObject>
|
||||
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QBoxLayout>
|
||||
#include <QtGui/QGridLayout>
|
||||
#include <QtGui/QLabel>
|
||||
#include <QtGui/QMessageBox>
|
||||
|
||||
|
||||
// QInstallerGui is base of the Gui part of an installer, i.e.
|
||||
// the "main installer wizard". In the simplest case it's just
|
||||
// a sequence of "standard" wizard pages. A few commonly used
|
||||
// ones are provided already in qinstallergui.h.
|
||||
|
||||
|
||||
// A custom target directory selection based due to the no-space
|
||||
// restriction...
|
||||
|
||||
class TargetDirectoryPage : public QInstallerTargetDirectoryPage
|
||||
{
|
||||
public:
|
||||
TargetDirectoryPage(QInstaller *installer)
|
||||
: QInstallerTargetDirectoryPage(installer)
|
||||
{
|
||||
m_noSpaceLabel = new QLabel(this);
|
||||
m_noSpaceLabel->setText("The directory name should not contain any space.");
|
||||
m_noSpaceLabel->hide();
|
||||
insertWidget(m_noSpaceLabel, "MessageLabel");
|
||||
}
|
||||
|
||||
bool isComplete() const
|
||||
{
|
||||
bool invalid = targetDir().contains(' ');
|
||||
QPalette palette;
|
||||
// We show the warning only if the user types a space.
|
||||
// No need to scare him if the path is ok for us...
|
||||
if (invalid) {
|
||||
m_noSpaceLabel->show();
|
||||
palette.setColor(QPalette::WindowText, Qt::red);
|
||||
}
|
||||
m_noSpaceLabel->setPalette(palette);
|
||||
return !invalid;
|
||||
}
|
||||
|
||||
int nextId() const
|
||||
{
|
||||
QFileInfo fi(targetDir());
|
||||
|
||||
if (isVisible() && fi.isDir()) {
|
||||
QFileInfo fi2(targetDir() + '/' + installer()->uninstallerName());
|
||||
if (fi2.exists()) {
|
||||
QMessageBox::StandardButton bt = QMessageBox::warning(wizard(),
|
||||
tr("Warning"),
|
||||
tr("The directory you selected exists already and contains an installaion.\n"
|
||||
"Do you want to overwrite it?"),
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
if (bt == QMessageBox::No)
|
||||
return wizard()->currentId();
|
||||
} else {
|
||||
QMessageBox::StandardButton bt = QMessageBox::warning(wizard(),
|
||||
tr("Warning"),
|
||||
tr("The directory you selected exists already.\n"
|
||||
"Do you want to remove it and continue?"),
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
if (bt == QMessageBox::No)
|
||||
return wizard()->currentId();
|
||||
}
|
||||
}
|
||||
return QInstallerPage::nextId();
|
||||
}
|
||||
|
||||
private:
|
||||
QLabel *m_noSpaceLabel;
|
||||
};
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// QtCreatorInstallerGui
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
// QtCreatorInstallerGui is the QtCreator specific incarnation
|
||||
// of a QInstallerGui.
|
||||
|
||||
class QtCreatorInstallerGui : public QInstallerGui
|
||||
{
|
||||
public:
|
||||
QtCreatorInstallerGui(QInstaller *installer)
|
||||
{
|
||||
// The Gui has access to the installer backend at construction
|
||||
// time. For later access it needs to store the QInstaller *
|
||||
// pointer provided. Not needed in this case here.
|
||||
|
||||
setWindowTitle(tr("%1 Setup").arg(installer->value("ProductName")));
|
||||
installer->connectGui(this);
|
||||
|
||||
// We are happy with the default set of pages.
|
||||
addPage(new QInstallerIntroductionPage(installer));
|
||||
addPage(new QInstallerLicenseAgreementPage(installer));
|
||||
//addPage(new QInstallerTargetDirectoryPage(installer));
|
||||
addPage(new TargetDirectoryPage(installer));
|
||||
if (installer->componentCount() > 1)
|
||||
addPage(new QInstallerComponentSelectionPage(installer));
|
||||
addPage(new QInstallerReadyForInstallationPage(installer));
|
||||
addPage(new QInstallerPerformInstallationPage(installer));
|
||||
addPage(new QInstallerFinishedPage(installer));
|
||||
|
||||
setStartId(installer->value("GuiStartPage").toInt());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// QInstaller is base of the "backend" part of an installer, i.e.
|
||||
// the part handling the installer tasks and keeping track of
|
||||
// related data like the directory to install to, the name of
|
||||
// the Product, version of the Product etc.
|
||||
|
||||
// QtCreatorInstaller is the QtCreator specific incarnation
|
||||
// of a QInstaller. It needs to list all tasks that a performed
|
||||
// during installation. The tasks themselves specify what to
|
||||
// do at uninstall time.
|
||||
|
||||
class QtCreatorInstaller : public QInstaller
|
||||
{
|
||||
public:
|
||||
QtCreatorInstaller()
|
||||
{
|
||||
// basic product information
|
||||
setValue("ProductName", "Qt Creator");
|
||||
setValue("ProductVersion", "alpha");
|
||||
|
||||
// registration information
|
||||
setValue("Comments", "");
|
||||
setValue("Contact", "");
|
||||
setValue("DisplayVersion", "");
|
||||
setValue("HelpLink", "");
|
||||
setValue("Publisher", "");
|
||||
setValue("UrlAboutInfo", "");
|
||||
|
||||
// information needed at installer generation time
|
||||
setValue("OutputFile", "qtcreator-installer");
|
||||
setValue("RunProgram", "@TargetDir@/bin/qtcreator");
|
||||
|
||||
// default component selection, overridable from command line
|
||||
setValue("UseQtCreator", "true");
|
||||
#ifdef Q_OS_WIN
|
||||
//setValue("UseQt", "true");
|
||||
//setValue("UseMinGW", "true");
|
||||
#endif
|
||||
}
|
||||
|
||||
private:
|
||||
// tasks related to QtCreator itself. Binary, libraries etc.
|
||||
void appendQtCreatorComponent()
|
||||
{
|
||||
QString sourceDir = value("SourceDir");
|
||||
if (sourceDir.isEmpty() && QFileInfo("../bin/qtcreator").isReadable())
|
||||
sourceDir = QLatin1String("..");
|
||||
if (sourceDir.isEmpty())
|
||||
throw QInstallerError("Missing 'SourceDir=<dir>' on command line.");
|
||||
QInstallerComponent *component = new QInstallerComponent(this);
|
||||
component->setValue("Name", "QtCreator");
|
||||
component->setValue("DisplayName", "Qt Creator");
|
||||
component->setValue("Description", "The Qt Creator IDE");
|
||||
component->setValue("SuggestedState", "AlwaysInstalled");
|
||||
#ifdef Q_OS_MAC
|
||||
component->appendDirectoryTasks(sourceDir + "/bin/QtCreator.app", "@TargetDir@");
|
||||
#else
|
||||
component->appendDirectoryTasks(sourceDir + "/bin", "@TargetDir@/bin");
|
||||
component->appendDirectoryTasks(sourceDir + "/lib", "@TargetDir@/lib");
|
||||
#endif
|
||||
|
||||
QInstallerPatchFileTask *task = new QInstallerPatchFileTask(this);
|
||||
task->setTargetPath("@TargetDir@/lib/Trolltech/" + libraryName("ProjectExplorer", "1.0.0"));
|
||||
task->setNeedle("Clear Session");
|
||||
task->setReplacement("CLEAR SESSION");
|
||||
component->appendTask(task);
|
||||
|
||||
appendComponent(component);
|
||||
}
|
||||
|
||||
void appendMinGWComponent()
|
||||
{
|
||||
QString mingwSourceDir = value("MinGWSourceDir");
|
||||
if (mingwSourceDir.isEmpty())
|
||||
throw QInstallerError("Missing 'MinGWSourceDir=<dir>' on command line.");
|
||||
QInstallerComponent *component = new QInstallerComponent(this);
|
||||
component->setValue("Name", "MinGW");
|
||||
component->setValue("DisplayName", "MinGW");
|
||||
component->setValue("Description",
|
||||
"The MinGW environment including the g++ compiler "
|
||||
"and the gdb debugger.");
|
||||
component->setValue("SuggestedState", "Installed");
|
||||
component->appendDirectoryTasks(mingwSourceDir, "@TargetDir@");
|
||||
appendComponent(component);
|
||||
}
|
||||
|
||||
void appendQtComponent()
|
||||
{
|
||||
QString qtSourceDir = value("QtSourceDir");
|
||||
if (qtSourceDir.isEmpty())
|
||||
throw QInstallerError("Missing 'QtSourceDir=<dir>' on command line.");
|
||||
|
||||
QInstallerComponent *component = new QInstallerComponent(this);
|
||||
component->setValue("Name", "Qt Development Libraries");
|
||||
component->setValue("DisplayName", "Qt");
|
||||
component->setValue("Description",
|
||||
"The Qt library files for development including "
|
||||
"documentation");
|
||||
component->setValue("SuggestedState", "Installed");
|
||||
component->appendDirectoryTasks(qtSourceDir, "@TargetDir@");
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
static const struct
|
||||
{
|
||||
const char *fileName;
|
||||
const char *sourceLocation;
|
||||
} libs[] = {
|
||||
{"/bin/Qt3Support", "/src/qt3support/"},
|
||||
{"/bin/QtCore", "/src/corelib/"},
|
||||
{"/bin/QtGui", "/src/gui/"},
|
||||
{"/bin/QtHelp", "/tools/assistant/lib/"},
|
||||
{"/bin/QtNetwork", "/src/network/"},
|
||||
{"/bin/QtOpenGL", "/src/opengl/"},
|
||||
{"/bin/QtScript", "/src/script/"},
|
||||
{"/bin/QtSql", "/src/sql/"},
|
||||
{"/bin/QtSvg", "/src/svg/"},
|
||||
{"/bin/QtTest", "/src/testlib/"},
|
||||
{"/bin/QtWebKit", "/src/3rdparty/webkit/WebCore/"},
|
||||
{"/bin/QtXml", "/src/xml/"},
|
||||
{"/bin/QtXmlPatterns", "/src/xmlpatterns/"},
|
||||
{"/plugins/accessible/qtaccessiblecompatwidgets",
|
||||
"/src/plugins/accessible/compat/"},
|
||||
{"/plugins/accessible/qtaccessiblewidgets",
|
||||
"/src/plugins/accessible/widgets/"},
|
||||
{"/plugins/codecs/qcncodecs", "/src/plugins/codecs/cn/"},
|
||||
{"/plugins/codecs/qjpcodecs", "/src/plugins/codecs/jp/"},
|
||||
{"/plugins/codecs/qkrcodecs", "/src/plugins/codecs/kr/"},
|
||||
{"/plugins/codecs/qtwcodecs", "/src/plugins/codecs/tw/"},
|
||||
{"/plugins/iconengines/qsvgicon", "/src/plugins/iconengines/svgiconengine/"},
|
||||
{"/plugins/imageformats/qgif", "/src/plugins/imageformats/gif/"},
|
||||
{"/plugins/imageformats/qjpeg", "/src/plugins/imageformats/jpeg/"},
|
||||
{"/plugins/imageformats/qmng", "/src/plugins/imageformats/mng/"},
|
||||
{"/plugins/imageformats/qsvg", "/src/plugins/imageformats/svg/"},
|
||||
{"/plugins/imageformats/qtiff", "/src/plugins/imageformats/tiff/"},
|
||||
{"/plugins/sqldrivers/qsqlite", "/src/plugins/sqldrivers/sqlite/"},
|
||||
// {"/plugins/sqldrivers/qsqlodbc", "/src/plugins/sqldrivers/odbc/"}
|
||||
};
|
||||
|
||||
QString debug = QLatin1String("d4.dll");
|
||||
|
||||
for (int i = 0; i != sizeof(libs) / sizeof(libs[0]); ++i) {
|
||||
QInstallerPatchFileTask *task = new QInstallerPatchFileTask(this);
|
||||
task->setTargetPath(QString("@TargetDir@/") + libs[i].fileName + debug);
|
||||
task->setNeedle("f:/depot/qt");
|
||||
task->setReplacement(QByteArray("@TargetDir@/") + libs[i].sourceLocation);
|
||||
component->appendTask(task);
|
||||
}
|
||||
#endif
|
||||
|
||||
appendComponent(component);
|
||||
}
|
||||
|
||||
void createTasks()
|
||||
{
|
||||
// set UseXXX=false on command line to prevent inclusion of the
|
||||
// respective component
|
||||
if (value("UseQtCreator") == "true")
|
||||
appendQtCreatorComponent();
|
||||
if (value("UseMinGW") == "true")
|
||||
appendMinGWComponent();
|
||||
if (value("UseQt") == "true")
|
||||
appendQtComponent();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// QtCreatorUninstallerGui
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
class QtCreatorUninstallerGui : public QObject
|
||||
{
|
||||
public:
|
||||
QtCreatorUninstallerGui(QInstaller *installer)
|
||||
: m_installer(installer)
|
||||
{}
|
||||
|
||||
int exec()
|
||||
{
|
||||
QMessageBox::StandardButton bt = QMessageBox::question(0,
|
||||
tr("Question"),
|
||||
tr("Do you want to deinstall %1 and all of its modules?")
|
||||
.arg(m_installer->value("ProductName")),
|
||||
QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
|
||||
if (bt == QMessageBox::No)
|
||||
return 0;
|
||||
QWizard wizard;
|
||||
wizard.addPage(new QInstallerPerformUninstallationPage(m_installer));
|
||||
wizard.show();
|
||||
return qApp->exec();
|
||||
}
|
||||
|
||||
private:
|
||||
QInstaller *m_installer;
|
||||
};
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// The Main Driver Program
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
QStringList args = app.arguments();
|
||||
qDebug() << "ARGS: " << args;
|
||||
|
||||
QtCreatorInstaller installer;
|
||||
|
||||
bool helpRequested = false;
|
||||
bool guiRequested = true;
|
||||
|
||||
for (int i = 1; i < args.size(); ++i) {
|
||||
if (args.at(i).contains('=')) {
|
||||
const QString arg = args.at(i);
|
||||
const QString name = arg.section('=', 0, 0);
|
||||
const QString value = arg.section('=', 1, 1);
|
||||
installer.setValue(name, value);
|
||||
} else if (args.at(i) == "--help" || args.at(i) == "-h") {
|
||||
helpRequested = true;
|
||||
} else if (args.at(i) == "--no-gui" || args.at(i) == "NoGui") {
|
||||
qDebug() << "NOGUI";
|
||||
guiRequested = false;
|
||||
} else if (args.at(i) == "--verbose" || args.at(i) == "Verbose") {
|
||||
installer.setVerbose(true);
|
||||
} else {
|
||||
helpRequested = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (installer.isVerbose())
|
||||
installer.dump();
|
||||
|
||||
if (helpRequested) {
|
||||
QString productName = installer.value("ProductName");
|
||||
QString str;
|
||||
if (installer.isCreator())
|
||||
str = QString(" [SourceDir=<dir>]\n"
|
||||
"\n Creates the %1 installer.\n").arg(productName);
|
||||
else if (installer.isInstaller())
|
||||
str = QString(" [--no-gui] [<name>=<value>...]\n"
|
||||
"\n Runs the %1 installer\n"
|
||||
"\n If the '--no-gui' parameter is given, it runs "
|
||||
" installer without GUI\n").arg(productName);
|
||||
else if (installer.isUninstaller())
|
||||
str = QString(" [<name>=<value>...]\n"
|
||||
"\n Runs the %1 uninstaller.\n").arg(productName);
|
||||
str = "\nUsage: " + installer.installerBinaryPath() + str;
|
||||
qDebug() << qPrintable(str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (installer.isInstaller() && guiRequested) {
|
||||
QtCreatorInstallerGui gui(&installer);
|
||||
gui.show();
|
||||
return app.exec();
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
if (installer.isUninstaller()) {
|
||||
QStringList newArgs = args;
|
||||
newArgs.removeFirst();
|
||||
installer.restartTempUninstaller(newArgs);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
if ((installer.isUninstaller() || installer.isTempUninstaller())
|
||||
&& guiRequested) {
|
||||
QtCreatorUninstallerGui gui(&installer);
|
||||
//gui.show();
|
||||
return gui.exec();
|
||||
}
|
||||
|
||||
return installer.run() ? 0 : 1;
|
||||
}
|
29
installer/installer.pro
Normal file
@@ -0,0 +1,29 @@
|
||||
TEMPLATE = app
|
||||
TARGET = installercreator
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += .
|
||||
|
||||
CONFIG -= debug
|
||||
CONFIG += release
|
||||
|
||||
HEADERS += \
|
||||
qinstaller.h \
|
||||
qinstallergui.h \
|
||||
|
||||
SOURCES += \
|
||||
qinstaller.cpp \
|
||||
qinstallergui.cpp \
|
||||
installer.cpp \
|
||||
|
||||
RESOURCES += \
|
||||
installer.qrc \
|
||||
|
||||
true {
|
||||
OBJECTS_DIR = .tmp/
|
||||
MOC_DIR = .tmp/
|
||||
RCC_DIR = .tmp/
|
||||
UI_DIR = .tmp/
|
||||
}
|
||||
|
||||
win32:LIBS += ole32.lib
|
||||
|
7
installer/installer.qrc
Normal file
@@ -0,0 +1,7 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource>
|
||||
<file>resources/logo.png</file>
|
||||
<file>resources/watermark.png</file>
|
||||
<file>resources/license.txt</file>
|
||||
</qresource>
|
||||
</RCC>
|
1872
installer/qinstaller.cpp
Normal file
357
installer/qinstaller.h
Normal file
@@ -0,0 +1,357 @@
|
||||
/***************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** Non-Open Source Usage
|
||||
**
|
||||
** Licensees may use this file in accordance with the Qt Beta Version
|
||||
** License Agreement, Agreement version 2.2 provided with the Software or,
|
||||
** alternatively, in accordance with the terms contained in a written
|
||||
** agreement between you and Nokia.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
**
|
||||
** Alternatively, this file may be used under the terms of the GNU General
|
||||
** Public License versions 2.0 or 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the packaging
|
||||
** of this file. Please review the following information to ensure GNU
|
||||
** General Public Licensing requirements will be met:
|
||||
**
|
||||
** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
|
||||
** http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt GPL Exception version
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef QINSTALLER_H
|
||||
#define QINSTALLER_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
|
||||
QT_BEGIN_HEADER
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QIODevice;
|
||||
class QInstallerTask;
|
||||
class QInstallerComponent;
|
||||
|
||||
class QInstaller : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QInstaller();
|
||||
~QInstaller();
|
||||
|
||||
bool run();
|
||||
|
||||
// parameter handling
|
||||
void setValue(const QString &key, const QString &value);
|
||||
QString value(const QString &key,
|
||||
const QString &defaultValue = QString()) const;
|
||||
bool containsValue(const QString &key) const;
|
||||
QString replaceVariables(const QString &str) const;
|
||||
QByteArray replaceVariables(const QByteArray &str) const;
|
||||
QString installerBinaryPath() const;
|
||||
QString uninstallerName() const;
|
||||
|
||||
// installer-specific task creation
|
||||
virtual void createTasks() {}
|
||||
|
||||
// component handling
|
||||
void appendComponent(QInstallerComponent *components);
|
||||
int componentCount() const;
|
||||
QInstallerComponent *component(int i) const;
|
||||
typedef QInstallerTask *(*TaskCreator)(QInstaller *);
|
||||
void registerTaskType(TaskCreator);
|
||||
int indexOfTaskType(TaskCreator) const;
|
||||
|
||||
// progress handling
|
||||
//void setInstallationProgress(int);
|
||||
int installationProgress() const;
|
||||
void setInstallationProgressText(const QString &);
|
||||
QString installationProgressText() const;
|
||||
|
||||
// convenience
|
||||
bool isCreator() const;
|
||||
bool isInstaller() const;
|
||||
bool isUninstaller() const;
|
||||
bool isTempUninstaller() const;
|
||||
|
||||
bool isVerbose() const;
|
||||
void setVerbose(bool on);
|
||||
void connectGui(QObject *gui);
|
||||
|
||||
QString libraryName(const QString &baseName, const QString &version);
|
||||
|
||||
bool restartTempUninstaller(const QStringList &args);
|
||||
|
||||
// status
|
||||
enum InstallerStatus {
|
||||
InstallerUnfinished,
|
||||
InstallerCanceledByUser,
|
||||
InstallerFailed,
|
||||
InstallerSucceeded,
|
||||
};
|
||||
InstallerStatus status() const;
|
||||
|
||||
// I/O helper for authors of classes deriving from QInstallerStep
|
||||
static void appendInt(QIODevice *out, qint64 n);
|
||||
static void appendString(QIODevice *out, const QString &str);
|
||||
static void appendByteArray(QIODevice *out, const QByteArray &str);
|
||||
static qint64 retrieveInt(QIODevice *in);
|
||||
static QString retrieveString(QIODevice *in);
|
||||
static QByteArray retrieveByteArray(QIODevice *in);
|
||||
|
||||
void dump() const;
|
||||
class Private;
|
||||
|
||||
public slots:
|
||||
bool runInstaller();
|
||||
bool runUninstaller();
|
||||
void interrupt();
|
||||
void showWarning(const QString &);
|
||||
|
||||
signals:
|
||||
void installationStarted();
|
||||
void installationFinished();
|
||||
void uninstallationStarted();
|
||||
void uninstallationFinished();
|
||||
void warning(QString);
|
||||
|
||||
private:
|
||||
Private *d;
|
||||
};
|
||||
|
||||
|
||||
class QInstallerComponent
|
||||
{
|
||||
public:
|
||||
explicit QInstallerComponent(QInstaller *installer);
|
||||
~QInstallerComponent();
|
||||
|
||||
void setValue(const QString &key, const QString &value);
|
||||
QString value(const QString &key,
|
||||
const QString &defaultValue = QString()) const;
|
||||
|
||||
void appendTask(QInstallerTask *step);
|
||||
void appendDirectoryTasks(const QString &sourcePath,
|
||||
const QString &targetPath);
|
||||
void appendSettingsTask(const QString &key, const QString &value);
|
||||
void appendUninstallerRegistrationTask();
|
||||
int taskCount() const;
|
||||
QInstallerTask *task(int) const;
|
||||
|
||||
friend class QInstaller;
|
||||
friend class QInstaller::Private;
|
||||
private:
|
||||
Q_DISABLE_COPY(QInstallerComponent);
|
||||
class Private;
|
||||
Private *d;
|
||||
};
|
||||
|
||||
|
||||
class QInstallerTask
|
||||
{
|
||||
public:
|
||||
QInstallerTask(QInstaller *parent);
|
||||
virtual ~QInstallerTask() {}
|
||||
|
||||
QInstaller *installer() const;
|
||||
|
||||
virtual void writeToInstaller(QIODevice *out) const = 0;
|
||||
virtual void readAndExecuteFromInstaller(QIODevice *in) = 0;
|
||||
|
||||
virtual void writeToUninstaller(QIODevice *out) const = 0;
|
||||
virtual void readAndExecuteFromUninstaller(QIODevice *in) = 0;
|
||||
|
||||
virtual void undo() = 0;
|
||||
virtual void dump(QDebug &) const {}
|
||||
|
||||
virtual QInstaller::TaskCreator creator() const = 0;
|
||||
|
||||
private:
|
||||
QInstaller *m_installer;
|
||||
};
|
||||
|
||||
|
||||
class QInstallerError
|
||||
{
|
||||
public:
|
||||
QInstallerError(const QString &m) : m_message(m) {}
|
||||
virtual ~QInstallerError() {}
|
||||
virtual QString message() const { return m_message; }
|
||||
private:
|
||||
QString m_message;
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Some useful examples
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
class QInstallerCopyFileTask : public QInstallerTask
|
||||
{
|
||||
public:
|
||||
QInstallerCopyFileTask(QInstaller *parent) : QInstallerTask(parent) {}
|
||||
QInstaller::TaskCreator creator() const;
|
||||
|
||||
void setSourcePath(const QString &sourcePath) { m_sourcePath = sourcePath; }
|
||||
QString sourcePath() const { return m_sourcePath; }
|
||||
|
||||
void setTargetPath(const QString &targetPath) { m_targetPath = targetPath; }
|
||||
QString targetPath() const { return m_targetPath; }
|
||||
|
||||
void setPermissions(qint64 permissions) { m_permissions = permissions; }
|
||||
qint64 permissions() const { return m_permissions; }
|
||||
|
||||
void writeToInstaller(QIODevice *out) const;
|
||||
void readAndExecuteFromInstaller(QIODevice *in);
|
||||
|
||||
void writeToUninstaller(QIODevice *out) const;
|
||||
void readAndExecuteFromUninstaller(QIODevice *in);
|
||||
|
||||
void undo();
|
||||
void dump(QDebug &) const;
|
||||
|
||||
private:
|
||||
QString m_sourcePath;
|
||||
QString m_targetPath;
|
||||
qint64 m_permissions;
|
||||
int m_parentDirCount;
|
||||
};
|
||||
|
||||
|
||||
class QInstallerLinkFileTask : public QInstallerTask
|
||||
{
|
||||
public:
|
||||
QInstallerLinkFileTask(QInstaller *parent) : QInstallerTask(parent) {}
|
||||
QInstaller::TaskCreator creator() const;
|
||||
|
||||
void setTargetPath(const QString &path) { m_targetPath = path; }
|
||||
QString targetPath() const { return m_targetPath; }
|
||||
|
||||
void setLinkTargetPath(const QString &path) { m_linkTargetPath = path; }
|
||||
QString linkTargetPath() const { return m_linkTargetPath; }
|
||||
|
||||
void setPermissions(qint64 permissions) { m_permissions = permissions; }
|
||||
qint64 permissions() const { return m_permissions; }
|
||||
|
||||
void writeToInstaller(QIODevice *out) const;
|
||||
void readAndExecuteFromInstaller(QIODevice *in);
|
||||
|
||||
void writeToUninstaller(QIODevice *out) const;
|
||||
void readAndExecuteFromUninstaller(QIODevice *in);
|
||||
|
||||
void undo();
|
||||
void dump(QDebug &) const;
|
||||
|
||||
public:
|
||||
QString m_targetPath; // location of the link in the target system
|
||||
QString m_linkTargetPath; // linkee
|
||||
qint64 m_permissions;
|
||||
};
|
||||
|
||||
|
||||
class QInstallerWriteSettingsTask : public QInstallerTask
|
||||
{
|
||||
public:
|
||||
QInstallerWriteSettingsTask(QInstaller *parent)
|
||||
: QInstallerTask(parent) {}
|
||||
QInstaller::TaskCreator creator() const;
|
||||
|
||||
void setKey(const QString &key) { m_key = key; }
|
||||
QString key() const { return m_key; }
|
||||
|
||||
void setValue(const QString &value) { m_value = value; }
|
||||
QString value() const { return m_value; }
|
||||
|
||||
void writeToInstaller(QIODevice *out) const;
|
||||
void readAndExecuteFromInstaller(QIODevice *in);
|
||||
|
||||
void writeToUninstaller(QIODevice *out) const;
|
||||
void readAndExecuteFromUninstaller(QIODevice *in);
|
||||
|
||||
void undo();
|
||||
void dump(QDebug &) const;
|
||||
|
||||
public:
|
||||
QString m_key;
|
||||
QString m_value;
|
||||
};
|
||||
|
||||
|
||||
class QInstallerPatchFileTask : public QInstallerTask
|
||||
{
|
||||
public:
|
||||
QInstallerPatchFileTask(QInstaller *parent) : QInstallerTask(parent) {}
|
||||
QInstaller::TaskCreator creator() const;
|
||||
|
||||
void setTargetPath(const QString &path) { m_targetPath = path; }
|
||||
QString targetPath() const { return m_targetPath; }
|
||||
|
||||
void setNeedle(const QByteArray &needle) { m_needle = needle; }
|
||||
QByteArray needle() const { return m_needle; }
|
||||
|
||||
void setReplacement(const QByteArray &repl) { m_replacement = repl; }
|
||||
QByteArray replacement() const { return m_replacement; }
|
||||
|
||||
void writeToInstaller(QIODevice *out) const;
|
||||
void readAndExecuteFromInstaller(QIODevice *in);
|
||||
|
||||
void writeToUninstaller(QIODevice *) const {}
|
||||
void readAndExecuteFromUninstaller(QIODevice *) {}
|
||||
|
||||
void undo() {}
|
||||
void dump(QDebug &) const;
|
||||
|
||||
private:
|
||||
QByteArray m_needle;
|
||||
QByteArray m_replacement;
|
||||
QString m_targetPath;
|
||||
};
|
||||
|
||||
|
||||
class QInstallerMenuShortcutTask : public QInstallerTask
|
||||
{
|
||||
public:
|
||||
QInstallerMenuShortcutTask(QInstaller *parent) : QInstallerTask(parent) {}
|
||||
QInstaller::TaskCreator creator() const;
|
||||
|
||||
void setTargetPath(const QString &path) { m_targetPath = path; }
|
||||
QString targetPath() const { return m_targetPath; }
|
||||
|
||||
void setLinkTargetPath(const QString &path) { m_linkTargetPath = path; }
|
||||
QString linkTargetPath() const { return m_linkTargetPath; }
|
||||
|
||||
void writeToInstaller(QIODevice *out) const;
|
||||
void readAndExecuteFromInstaller(QIODevice *in);
|
||||
|
||||
void writeToUninstaller(QIODevice *out) const;
|
||||
void readAndExecuteFromUninstaller(QIODevice *in);
|
||||
|
||||
void undo();
|
||||
void dump(QDebug &) const;
|
||||
|
||||
public:
|
||||
QString m_targetPath;
|
||||
QString m_linkTargetPath;
|
||||
QString m_startMenuPath;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
QT_END_HEADER
|
||||
|
||||
#endif // QINSTALLER_H
|
742
installer/qinstallergui.cpp
Normal file
@@ -0,0 +1,742 @@
|
||||
/***************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** Non-Open Source Usage
|
||||
**
|
||||
** Licensees may use this file in accordance with the Qt Beta Version
|
||||
** License Agreement, Agreement version 2.2 provided with the Software or,
|
||||
** alternatively, in accordance with the terms contained in a written
|
||||
** agreement between you and Nokia.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
**
|
||||
** Alternatively, this file may be used under the terms of the GNU General
|
||||
** Public License versions 2.0 or 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the packaging
|
||||
** of this file. Please review the following information to ensure GNU
|
||||
** General Public Licensing requirements will be met:
|
||||
**
|
||||
** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
|
||||
** http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt GPL Exception version
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#include "qinstallergui.h"
|
||||
|
||||
#include "qinstaller.h"
|
||||
#include "private/qobject_p.h"
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QProcess>
|
||||
#include <QtCore/QRegExp>
|
||||
#include <QtCore/QTimer>
|
||||
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QCheckBox>
|
||||
#include <QtGui/QFileDialog>
|
||||
#include <QtGui/QGridLayout>
|
||||
#include <QtGui/QHBoxLayout>
|
||||
#include <QtGui/QHeaderView>
|
||||
#include <QtGui/QLabel>
|
||||
#include <QtGui/QLineEdit>
|
||||
#include <QtGui/QMessageBox>
|
||||
#include <QtGui/QProgressBar>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QRadioButton>
|
||||
#include <QtGui/QTextEdit>
|
||||
#include <QtGui/QTreeWidget>
|
||||
#include <QtGui/QTreeView>
|
||||
#include <QtGui/QVBoxLayout>
|
||||
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// QInstallerGui
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
QInstallerGui::QInstallerGui(QInstaller *installer, QWidget *parent)
|
||||
: QWizard(parent)
|
||||
{
|
||||
#ifndef Q_WS_MAC
|
||||
setWizardStyle(QWizard::ModernStyle);
|
||||
#endif
|
||||
setOption(QWizard::IndependentPages);
|
||||
connect(button(QWizard::CancelButton), SIGNAL(clicked()),
|
||||
this, SLOT(cancelButtonClicked()));
|
||||
|
||||
connect(this, SIGNAL(interrupted()),
|
||||
installer, SLOT(interrupt()));
|
||||
connect(installer, SIGNAL(installationFinished()),
|
||||
this, SLOT(showFinishedPage()));
|
||||
connect(installer, SIGNAL(warning(QString)),
|
||||
this, SLOT(showWarning(QString)));
|
||||
}
|
||||
|
||||
void QInstallerGui::cancelButtonClicked()
|
||||
{
|
||||
QInstallerPage *page = qobject_cast<QInstallerPage *>(currentPage());
|
||||
qDebug() << "CANCEL CLICKED" << currentPage() << page;
|
||||
if (page && page->isInterruptible()) {
|
||||
QMessageBox::StandardButton bt = QMessageBox::warning(this,
|
||||
tr("Warning"),
|
||||
tr("Do you want to abort the installation process?"),
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
if (bt == QMessageBox::Yes)
|
||||
emit interrupted();
|
||||
} else {
|
||||
QMessageBox::StandardButton bt = QMessageBox::warning(this,
|
||||
tr("Warning"),
|
||||
tr("Do you want to abort the installer application?"),
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
if (bt == QMessageBox::Yes)
|
||||
QDialog::reject();
|
||||
}
|
||||
}
|
||||
|
||||
void QInstallerGui::reject()
|
||||
{}
|
||||
|
||||
void QInstallerGui::showFinishedPage()
|
||||
{
|
||||
qDebug() << "SHOW FINISHED PAGE";
|
||||
next();
|
||||
}
|
||||
|
||||
void QInstallerGui::showWarning(const QString &msg)
|
||||
{
|
||||
QMessageBox::warning(this, tr("Warning"), msg);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// QInstallerPage
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
QInstallerPage::QInstallerPage(QInstaller *installer)
|
||||
: m_installer(installer), m_fresh(true)
|
||||
{
|
||||
setSubTitle(QString(" ")); // otherwise the colors will screw up
|
||||
|
||||
}
|
||||
|
||||
QInstaller *QInstallerPage::installer() const
|
||||
{
|
||||
return m_installer;
|
||||
}
|
||||
|
||||
QPixmap QInstallerPage::watermarkPixmap() const
|
||||
{
|
||||
return QPixmap(m_installer->value("WatermarkPixmap"));
|
||||
}
|
||||
|
||||
QPixmap QInstallerPage::logoPixmap() const
|
||||
{
|
||||
return QPixmap(m_installer->value("LogoPixmap"));
|
||||
}
|
||||
|
||||
QString QInstallerPage::productName() const
|
||||
{
|
||||
return m_installer->value("ProductName");
|
||||
}
|
||||
|
||||
void QInstallerPage::insertWidget(QWidget *widget, const QString &siblingName, int offset)
|
||||
{
|
||||
QWidget *sibling = findChild<QWidget *>(siblingName);
|
||||
QWidget *parent = sibling ? sibling->parentWidget() : 0;
|
||||
QLayout *layout = parent ? parent->layout() : 0;
|
||||
QBoxLayout *blayout = qobject_cast<QBoxLayout *>(layout);
|
||||
//qDebug() << "FOUND: " << sibling << parent << layout << blayout;
|
||||
if (blayout) {
|
||||
int index = blayout->indexOf(sibling) + offset;
|
||||
blayout->insertWidget(index, widget);
|
||||
}
|
||||
}
|
||||
|
||||
QWidget *QInstallerPage::findWidget(const QString &objectName) const
|
||||
{
|
||||
return findChild<QWidget *>(objectName);
|
||||
}
|
||||
|
||||
void QInstallerPage::setVisible(bool visible)
|
||||
{
|
||||
QWizardPage::setVisible(visible);
|
||||
qApp->processEvents();
|
||||
//qDebug() << "VISIBLE: " << visible << objectName() << installer();
|
||||
if (m_fresh && !visible) {
|
||||
//qDebug() << "SUPRESSED...";
|
||||
m_fresh = false;
|
||||
return;
|
||||
}
|
||||
if (visible)
|
||||
entering();
|
||||
else
|
||||
leaving();
|
||||
}
|
||||
|
||||
int QInstallerPage::nextId() const
|
||||
{
|
||||
//qDebug() << "NEXTID";
|
||||
return QWizardPage::nextId();
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// QInstallerIntroductionPage
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
QInstallerIntroductionPage::QInstallerIntroductionPage(QInstaller *installer)
|
||||
: QInstallerPage(installer)
|
||||
{
|
||||
setObjectName("IntroductionPage");
|
||||
setTitle(tr("Setup - %1").arg(productName()));
|
||||
setPixmap(QWizard::WatermarkPixmap, watermarkPixmap());
|
||||
setSubTitle(QString());
|
||||
|
||||
QLabel *msgLabel = new QLabel(this);
|
||||
msgLabel->setObjectName("MessageLabel");
|
||||
msgLabel->setWordWrap(true);
|
||||
msgLabel->setText(QInstaller::tr("Welcome to the %1 Setup Wizard.")
|
||||
.arg(productName()));
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||
layout->addWidget(msgLabel);
|
||||
setLayout(layout);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// QInstallerLicenseAgreementPage
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
QInstallerLicenseAgreementPage::QInstallerLicenseAgreementPage(QInstaller *installer)
|
||||
: QInstallerPage(installer)
|
||||
{
|
||||
setObjectName("LicenseAgreementPage");
|
||||
setTitle(tr("License Agreement"));
|
||||
QString msg = tr("Please read the following License Agreement. "
|
||||
"You must accept the terms of this agreement "
|
||||
"before continuing with the installation.");
|
||||
setPixmap(QWizard::LogoPixmap, logoPixmap());
|
||||
setPixmap(QWizard::WatermarkPixmap, QPixmap());
|
||||
|
||||
QTextEdit *textEdit = new QTextEdit(this);
|
||||
textEdit->setObjectName("LicenseText");
|
||||
QFile file(":/resources/license.txt");
|
||||
file.open(QIODevice::ReadOnly);
|
||||
textEdit->setText(file.readAll());
|
||||
|
||||
m_acceptRadioButton = new QRadioButton(tr("I accept the agreement"), this);
|
||||
m_rejectRadioButton = new QRadioButton(tr("I do not accept the agreement"), this);
|
||||
|
||||
QLabel *msgLabel = new QLabel(msg, this);
|
||||
msgLabel->setObjectName("MessageLabel");
|
||||
msgLabel->setWordWrap(true);
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||
layout->addWidget(msgLabel);
|
||||
layout->addWidget(textEdit);
|
||||
QHBoxLayout *hlayout = new QHBoxLayout;
|
||||
hlayout->addWidget(new QLabel(tr("Do you accept this License?")));
|
||||
QVBoxLayout *vlayout = new QVBoxLayout;
|
||||
vlayout->addWidget(m_acceptRadioButton);
|
||||
vlayout->addWidget(m_rejectRadioButton);
|
||||
hlayout->addLayout(vlayout);
|
||||
layout->addLayout(hlayout);
|
||||
setLayout(layout);
|
||||
connect(m_acceptRadioButton, SIGNAL(toggled(bool)),
|
||||
this, SIGNAL(completeChanged()));
|
||||
connect(m_rejectRadioButton, SIGNAL(toggled(bool)),
|
||||
this, SIGNAL(completeChanged()));
|
||||
}
|
||||
|
||||
bool QInstallerLicenseAgreementPage::isComplete() const
|
||||
{
|
||||
return m_acceptRadioButton->isChecked();
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// QInstallerComponentSelectionPage
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
static QString niceSizeText(const QString &str)
|
||||
{
|
||||
qint64 size = str.toInt();
|
||||
QString msg = QInstallerComponentSelectionPage::tr(
|
||||
"This component will occupy approximately %1 %2 on your harddisk.");
|
||||
if (size < 10000)
|
||||
return msg.arg(size).arg("Bytes");
|
||||
if (size < 1024 * 10000)
|
||||
return msg.arg(size / 1024).arg("kBytes");
|
||||
return msg.arg(size / 1024 / 1024).arg("MBytes");
|
||||
}
|
||||
|
||||
class QInstallerComponentSelectionPage::Private : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Private(QInstallerComponentSelectionPage *q_, QInstaller *installer)
|
||||
: q(q_), m_installer(installer)
|
||||
{
|
||||
m_treeView = new QTreeWidget(q);
|
||||
m_treeView->setObjectName("TreeView");
|
||||
m_treeView->setMouseTracking(true);
|
||||
m_treeView->header()->hide();
|
||||
|
||||
for (int i = 0; i != installer->componentCount(); ++i) {
|
||||
QInstallerComponent *component = installer->component(i);
|
||||
QTreeWidgetItem *item = new QTreeWidgetItem(m_treeView);
|
||||
item->setText(0, component->value("Name"));
|
||||
item->setToolTip(0, component->value("Description"));
|
||||
item->setToolTip(1, niceSizeText(component->value("UncompressedSize")));
|
||||
//QString current = component->value("CurrentState");
|
||||
QString suggested = component->value("SuggestedState");
|
||||
if (suggested == "Uninstalled") {
|
||||
item->setCheckState(0, Qt::Unchecked);
|
||||
} else if (suggested == "AlwaysInstalled") {
|
||||
item->setCheckState(0, Qt::PartiallyChecked);
|
||||
item->setFlags(item->flags() & ~Qt::ItemIsUserCheckable);
|
||||
} else { //if (suggested == "Installed")
|
||||
item->setCheckState(0, Qt::Checked);
|
||||
}
|
||||
}
|
||||
|
||||
m_descriptionLabel = new QLabel(q);
|
||||
m_descriptionLabel->setWordWrap(true);
|
||||
|
||||
m_sizeLabel = new QLabel(q);
|
||||
m_sizeLabel->setWordWrap(true);
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout(q);
|
||||
//layout->addWidget(msgLabel);
|
||||
QHBoxLayout *hlayout = new QHBoxLayout;
|
||||
hlayout->addWidget(m_treeView, 3);
|
||||
QVBoxLayout *vlayout = new QVBoxLayout;
|
||||
vlayout->addWidget(m_descriptionLabel);
|
||||
vlayout->addWidget(m_sizeLabel);
|
||||
vlayout->addSpacerItem(new QSpacerItem(1, 1,
|
||||
QSizePolicy::MinimumExpanding,
|
||||
QSizePolicy::MinimumExpanding));
|
||||
hlayout->addLayout(vlayout, 2);
|
||||
layout->addLayout(hlayout);
|
||||
q->setLayout(layout);
|
||||
|
||||
connect(m_treeView,
|
||||
SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),
|
||||
this, SLOT(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)));
|
||||
}
|
||||
|
||||
public slots:
|
||||
void currentItemChanged(QTreeWidgetItem *item, QTreeWidgetItem *)
|
||||
{
|
||||
m_descriptionLabel->setText(item->toolTip(0));
|
||||
m_sizeLabel->setText(item->toolTip(1));
|
||||
}
|
||||
|
||||
public:
|
||||
QInstallerComponentSelectionPage *q;
|
||||
QInstaller *m_installer;
|
||||
QTreeWidget *m_treeView;
|
||||
QLabel *m_descriptionLabel;
|
||||
QLabel *m_sizeLabel;
|
||||
};
|
||||
|
||||
|
||||
QInstallerComponentSelectionPage::QInstallerComponentSelectionPage
|
||||
(QInstaller *installer)
|
||||
: QInstallerPage(installer), d(new Private(this, installer))
|
||||
{
|
||||
setObjectName("ComponentSelectionPage");
|
||||
setTitle(tr("Select Components"));
|
||||
QString msg = tr("Please select the components you want to install.");
|
||||
setSubTitle(msg);
|
||||
setPixmap(QWizard::LogoPixmap, logoPixmap());
|
||||
setPixmap(QWizard::WatermarkPixmap, QPixmap());
|
||||
}
|
||||
|
||||
QInstallerComponentSelectionPage::~QInstallerComponentSelectionPage()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
void QInstallerComponentSelectionPage::leaving()
|
||||
{
|
||||
int n = d->m_treeView->topLevelItemCount();
|
||||
for (int i = 0; i != n; ++i) {
|
||||
QTreeWidgetItem *item = d->m_treeView->topLevelItem(i);
|
||||
QInstallerComponent *component = installer()->component(i);
|
||||
if (item->checkState(0) == Qt::Unchecked)
|
||||
component->setValue("WantedState", "Uninstalled");
|
||||
else
|
||||
component->setValue("WantedState", "Installed");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// QInstallerTargetDirectoryPage
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
QInstallerTargetDirectoryPage::QInstallerTargetDirectoryPage(QInstaller *installer)
|
||||
: QInstallerPage(installer)
|
||||
{
|
||||
setObjectName("TargetDirectoryPage");
|
||||
setTitle(tr("Installation Directory"));
|
||||
setPixmap(QWizard::LogoPixmap, logoPixmap());
|
||||
setPixmap(QWizard::WatermarkPixmap, QPixmap());
|
||||
|
||||
QLabel *msgLabel = new QLabel(this);
|
||||
msgLabel->setText(QInstaller::tr("Please specify the directory where %1 "
|
||||
"will be installed.").arg(productName()));
|
||||
msgLabel->setWordWrap(true);
|
||||
msgLabel->setObjectName("MessageLabel");
|
||||
|
||||
m_lineEdit = new QLineEdit(this);
|
||||
m_lineEdit->setObjectName("LineEdit");
|
||||
|
||||
QPushButton *browseButton = new QPushButton(this);
|
||||
browseButton->setObjectName("BrowseButton");
|
||||
browseButton->setText("Browse...");
|
||||
browseButton->setIcon(QIcon(logoPixmap()));
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||
layout->addWidget(msgLabel);
|
||||
QHBoxLayout *hlayout = new QHBoxLayout;
|
||||
hlayout->addWidget(m_lineEdit);
|
||||
hlayout->addWidget(browseButton);
|
||||
layout->addLayout(hlayout);
|
||||
setLayout(layout);
|
||||
|
||||
QString targetDir = installer->value("TargetDir");
|
||||
//targetDir = QDir::currentPath();
|
||||
if (targetDir.isEmpty())
|
||||
targetDir = QDir::homePath() + QDir::separator() + productName();
|
||||
m_lineEdit->setText(targetDir);
|
||||
|
||||
connect(browseButton, SIGNAL(clicked()),
|
||||
this, SLOT(dirRequested()));
|
||||
connect(m_lineEdit, SIGNAL(textChanged(QString)),
|
||||
this, SIGNAL(completeChanged()));
|
||||
}
|
||||
|
||||
QString QInstallerTargetDirectoryPage::targetDir() const
|
||||
{
|
||||
return m_lineEdit->text();
|
||||
}
|
||||
|
||||
void QInstallerTargetDirectoryPage::setTargetDir(const QString &dirName)
|
||||
{
|
||||
m_lineEdit->setText(dirName);
|
||||
}
|
||||
|
||||
void QInstallerTargetDirectoryPage::entering()
|
||||
{
|
||||
connect(wizard(), SIGNAL(customButtonClicked(int)),
|
||||
this, SLOT(targetDirSelected()));
|
||||
}
|
||||
|
||||
void QInstallerTargetDirectoryPage::leaving()
|
||||
{
|
||||
installer()->setValue("TargetDir", targetDir());
|
||||
disconnect(wizard(), SIGNAL(customButtonClicked(int)),
|
||||
this, SLOT(targetDirSelected()));
|
||||
}
|
||||
|
||||
void QInstallerTargetDirectoryPage::targetDirSelected()
|
||||
{
|
||||
//qDebug() << "TARGET DIRECTORY";
|
||||
QDir dir(targetDir());
|
||||
if (dir.exists() && dir.isReadable()) {
|
||||
QMessageBox::StandardButton bt = QMessageBox::warning(this,
|
||||
tr("Warning"),
|
||||
tr("The directory you slected exists already.\n"
|
||||
"Do you want to continue?"),
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
if (bt == QMessageBox::Yes)
|
||||
wizard()->next();
|
||||
return;
|
||||
}
|
||||
dir.cdUp();
|
||||
if (dir.exists() && dir.isReadable()) {
|
||||
wizard()->next();
|
||||
return;
|
||||
}
|
||||
wizard()->next();
|
||||
}
|
||||
|
||||
void QInstallerTargetDirectoryPage::dirRequested()
|
||||
{
|
||||
//qDebug() << "DIR REQUESTED";
|
||||
QString newDirName = QFileDialog::getExistingDirectory(this,
|
||||
tr("Select Installation Directory"), targetDir()
|
||||
/*, Options options = ShowDirsOnly*/);
|
||||
if (newDirName.isEmpty() || newDirName == targetDir())
|
||||
return;
|
||||
m_lineEdit->setText(newDirName);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// QInstallerReadyForInstallationPage
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
QInstallerReadyForInstallationPage::
|
||||
QInstallerReadyForInstallationPage(QInstaller *installer)
|
||||
: QInstallerPage(installer)
|
||||
{
|
||||
setObjectName("ReadyForInstallationPage");
|
||||
setTitle(tr("Ready to Install"));
|
||||
setCommitPage(true);
|
||||
setButtonText(QWizard::CommitButton, tr("Install"));
|
||||
|
||||
QLabel *msgLabel = new QLabel(this);
|
||||
msgLabel->setObjectName("MessageLabel");
|
||||
msgLabel->setText(QInstaller::tr("Setup is now ready to begin installing %1 "
|
||||
"on your computer.").arg(productName()));
|
||||
|
||||
QLayout *layout = new QVBoxLayout(this);
|
||||
layout->addWidget(msgLabel);
|
||||
setLayout(layout);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// QInstallerPerformInstallationPage
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
QInstallerPerformInstallationPage::QInstallerPerformInstallationPage(QInstaller *gui)
|
||||
: QInstallerPage(gui)
|
||||
{
|
||||
setObjectName("InstallationPage");
|
||||
setTitle(tr("Installing %1").arg(installer()->value("ProductName")));
|
||||
setCommitPage(true);
|
||||
|
||||
m_progressBar = new QProgressBar(this);
|
||||
m_progressBar->setObjectName("ProgressBar");
|
||||
m_progressBar->setRange(1, 100);
|
||||
|
||||
m_progressLabel = new QLabel(this);
|
||||
m_progressLabel->setObjectName("ProgressLabel");
|
||||
|
||||
m_updateTimer = new QTimer(this);
|
||||
connect(m_updateTimer, SIGNAL(timeout()),
|
||||
this, SLOT(updateProgress()));
|
||||
m_updateTimer->setInterval(50);
|
||||
|
||||
QLayout *layout = new QVBoxLayout(this);
|
||||
layout->addWidget(m_progressBar);
|
||||
layout->addWidget(m_progressLabel);
|
||||
setLayout(layout);
|
||||
|
||||
connect(installer(), SIGNAL(installationStarted()),
|
||||
this, SLOT(installationStarted()));
|
||||
connect(installer(), SIGNAL(installationFinished()),
|
||||
this, SLOT(installationFinished()));
|
||||
}
|
||||
|
||||
void QInstallerPerformInstallationPage::initializePage()
|
||||
{
|
||||
QWizardPage::initializePage();
|
||||
QTimer::singleShot(30, installer(), SLOT(runInstaller()));
|
||||
}
|
||||
|
||||
// FIXME: remove function
|
||||
bool QInstallerPerformInstallationPage::isComplete() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void QInstallerPerformInstallationPage::installationStarted()
|
||||
{
|
||||
qDebug() << "INSTALLATION STARTED";
|
||||
m_updateTimer->start();
|
||||
updateProgress();
|
||||
}
|
||||
|
||||
void QInstallerPerformInstallationPage::installationFinished()
|
||||
{
|
||||
qDebug() << "INSTALLATION FINISHED";
|
||||
m_updateTimer->stop();
|
||||
updateProgress();
|
||||
}
|
||||
|
||||
void QInstallerPerformInstallationPage::updateProgress()
|
||||
{
|
||||
int progress = installer()->installationProgress();
|
||||
if (progress != m_progressBar->value())
|
||||
m_progressBar->setValue(progress);
|
||||
QString progressText = installer()->installationProgressText();
|
||||
if (progressText != m_progressLabel->text())
|
||||
m_progressLabel->setText(progressText);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// QInstallerPerformUninstallationPage
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
QInstallerPerformUninstallationPage::QInstallerPerformUninstallationPage
|
||||
(QInstaller *gui)
|
||||
: QInstallerPage(gui)
|
||||
{
|
||||
setObjectName("UninstallationPage");
|
||||
setTitle(tr("Uninstalling %1").arg(installer()->value("ProductName")));
|
||||
setCommitPage(true);
|
||||
|
||||
m_progressBar = new QProgressBar(this);
|
||||
m_progressBar->setObjectName("ProgressBar");
|
||||
m_progressBar->setRange(1, 100);
|
||||
|
||||
m_progressLabel = new QLabel(this);
|
||||
m_progressLabel->setObjectName("ProgressLabel");
|
||||
|
||||
m_updateTimer = new QTimer(this);
|
||||
connect(m_updateTimer, SIGNAL(timeout()),
|
||||
this, SLOT(updateProgress()));
|
||||
m_updateTimer->setInterval(50);
|
||||
|
||||
QLayout *layout = new QVBoxLayout(this);
|
||||
layout->addWidget(m_progressBar);
|
||||
layout->addWidget(m_progressLabel);
|
||||
setLayout(layout);
|
||||
|
||||
connect(installer(), SIGNAL(uninstallationStarted()),
|
||||
this, SLOT(uninstallationStarted()));
|
||||
connect(installer(), SIGNAL(uninstallationFinished()),
|
||||
this, SLOT(uninstallationFinished()));
|
||||
}
|
||||
|
||||
void QInstallerPerformUninstallationPage::initializePage()
|
||||
{
|
||||
QWizardPage::initializePage();
|
||||
QTimer::singleShot(30, installer(), SLOT(runUninstaller()));
|
||||
}
|
||||
|
||||
// FIXME: remove function
|
||||
bool QInstallerPerformUninstallationPage::isComplete() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void QInstallerPerformUninstallationPage::uninstallationStarted()
|
||||
{
|
||||
m_updateTimer->start();
|
||||
updateProgress();
|
||||
}
|
||||
|
||||
void QInstallerPerformUninstallationPage::uninstallationFinished()
|
||||
{
|
||||
m_updateTimer->stop();
|
||||
updateProgress();
|
||||
}
|
||||
|
||||
void QInstallerPerformUninstallationPage::updateProgress()
|
||||
{
|
||||
int progress = installer()->installationProgress();
|
||||
if (progress != m_progressBar->value())
|
||||
m_progressBar->setValue(progress);
|
||||
QString progressText = installer()->installationProgressText();
|
||||
if (progressText != m_progressLabel->text())
|
||||
m_progressLabel->setText(progressText);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// QInstallerFinishedPage
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
QInstallerFinishedPage::QInstallerFinishedPage(QInstaller *installer)
|
||||
: QInstallerPage(installer)
|
||||
{
|
||||
setObjectName("FinishedPage");
|
||||
setTitle(tr("Completing the %1 Setup Wizard").arg(productName()));
|
||||
setPixmap(QWizard::WatermarkPixmap, watermarkPixmap());
|
||||
setSubTitle(QString());
|
||||
|
||||
QLabel *msgLabel = new QLabel(this);
|
||||
msgLabel->setObjectName("MessageLabel");
|
||||
msgLabel->setWordWrap(true);
|
||||
msgLabel->setText(tr("Click Finish to exit the Setup Wizard"));
|
||||
|
||||
m_runItCheckBox = new QCheckBox(this);
|
||||
m_runItCheckBox->setObjectName("RunItCheckBox");
|
||||
m_runItCheckBox->setChecked(true);
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||
layout->addWidget(msgLabel);
|
||||
if (m_runItCheckBox)
|
||||
layout->addWidget(m_runItCheckBox);
|
||||
setLayout(layout);
|
||||
}
|
||||
|
||||
void QInstallerFinishedPage::entering()
|
||||
{
|
||||
qDebug() << "FINISHED ENTERING: ";
|
||||
connect(wizard()->button(QWizard::FinishButton), SIGNAL(clicked()),
|
||||
this, SLOT(handleFinishClicked()));
|
||||
if (installer()->status() == QInstaller::InstallerSucceeded) {
|
||||
m_runItCheckBox->show();
|
||||
m_runItCheckBox->setText(tr("Run %1 now.").arg(productName()));
|
||||
} else {
|
||||
setTitle(tr("The %1 Setup Wizard failed").arg(productName()));
|
||||
m_runItCheckBox->hide();
|
||||
m_runItCheckBox->setChecked(false);
|
||||
}
|
||||
}
|
||||
|
||||
void QInstallerFinishedPage::leaving()
|
||||
{
|
||||
disconnect(wizard(), SIGNAL(customButtonClicked(int)),
|
||||
this, SLOT(handleFinishClicked()));
|
||||
}
|
||||
|
||||
void QInstallerFinishedPage::handleFinishClicked()
|
||||
{
|
||||
if (!m_runItCheckBox->isChecked())
|
||||
return;
|
||||
QString program = installer()->value("RunProgram");
|
||||
if (program.isEmpty())
|
||||
return;
|
||||
program = installer()->replaceVariables(program);
|
||||
qDebug() << "STARTING " << program;
|
||||
QProcess *process = new QProcess;
|
||||
process->start(program);
|
||||
process->waitForFinished();
|
||||
}
|
||||
|
||||
#include "qinstallergui.moc"
|
||||
|
||||
QT_END_NAMESPACE
|
256
installer/qinstallergui.h
Normal file
@@ -0,0 +1,256 @@
|
||||
/***************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** Non-Open Source Usage
|
||||
**
|
||||
** Licensees may use this file in accordance with the Qt Beta Version
|
||||
** License Agreement, Agreement version 2.2 provided with the Software or,
|
||||
** alternatively, in accordance with the terms contained in a written
|
||||
** agreement between you and Nokia.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
**
|
||||
** Alternatively, this file may be used under the terms of the GNU General
|
||||
** Public License versions 2.0 or 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the packaging
|
||||
** of this file. Please review the following information to ensure GNU
|
||||
** General Public Licensing requirements will be met:
|
||||
**
|
||||
** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
|
||||
** http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt GPL Exception version
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef QINSTALLERGUI_H
|
||||
#define QINSTALLERGUI_H
|
||||
|
||||
#include <QtGui/QWizard>
|
||||
|
||||
QT_BEGIN_HEADER
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QInstaller;
|
||||
|
||||
// FIXME: move to private classes
|
||||
class QCheckBox;
|
||||
class QLabel;
|
||||
class QLineEdit;
|
||||
class QProgressBar;
|
||||
class QRadioButton;
|
||||
class QTreeView;
|
||||
class QTreeWidget;
|
||||
|
||||
class QInstallerGui : public QWizard
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QInstallerGui(QInstaller *installer, QWidget *parent = 0);
|
||||
|
||||
signals:
|
||||
void interrupted();
|
||||
|
||||
public slots:
|
||||
void cancelButtonClicked();
|
||||
void reject();
|
||||
void showFinishedPage();
|
||||
void showWarning(const QString &msg);
|
||||
};
|
||||
|
||||
|
||||
class QInstallerPage : public QWizardPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QInstallerPage(QInstaller *installer);
|
||||
|
||||
virtual bool isInterruptible() const { return false; }
|
||||
virtual QPixmap watermarkPixmap() const;
|
||||
virtual QPixmap logoPixmap() const;
|
||||
virtual QString productName() const;
|
||||
|
||||
protected:
|
||||
QInstaller *installer() const;
|
||||
|
||||
// Inserts widget into the same layout like a sibling identified
|
||||
// by its name. Default position is just behind the sibling.
|
||||
virtual void insertWidget(QWidget *widget, const QString &siblingName,
|
||||
int offset = 1);
|
||||
virtual QWidget *findWidget(const QString &objectName) const;
|
||||
|
||||
virtual void setVisible(bool visible); // reimp
|
||||
virtual int nextId() const; // reimp
|
||||
|
||||
virtual void entering() {} // called on entering
|
||||
virtual void leaving() {} // called on leaving
|
||||
|
||||
virtual void forward() const {} // called when going forwards
|
||||
//virtual void backward() const {} // called when going back
|
||||
bool isConstructing() const { return m_fresh; }
|
||||
|
||||
private:
|
||||
QInstaller *m_installer;
|
||||
bool m_fresh;
|
||||
};
|
||||
|
||||
|
||||
class QInstallerIntroductionPage : public QInstallerPage
|
||||
{
|
||||
public:
|
||||
explicit QInstallerIntroductionPage(QInstaller *installer);
|
||||
};
|
||||
|
||||
|
||||
class QInstallerLicenseAgreementPage : public QInstallerPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QInstallerLicenseAgreementPage(QInstaller *installer);
|
||||
bool isComplete() const;
|
||||
|
||||
private:
|
||||
QRadioButton *m_acceptRadioButton;
|
||||
QRadioButton *m_rejectRadioButton;
|
||||
};
|
||||
|
||||
|
||||
class QInstallerComponentSelectionPage : public QInstallerPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QInstallerComponentSelectionPage(QInstaller *installer);
|
||||
~QInstallerComponentSelectionPage();
|
||||
|
||||
protected:
|
||||
//void entering();
|
||||
void leaving();
|
||||
|
||||
private:
|
||||
class Private;
|
||||
Private *d;
|
||||
};
|
||||
|
||||
|
||||
class QInstallerTargetDirectoryPage : public QInstallerPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QInstallerTargetDirectoryPage(QInstaller *installer);
|
||||
QString targetDir() const;
|
||||
void setTargetDir(const QString &dirName);
|
||||
|
||||
protected:
|
||||
void entering();
|
||||
void leaving();
|
||||
|
||||
private slots:
|
||||
void targetDirSelected();
|
||||
void dirRequested();
|
||||
|
||||
private:
|
||||
QLineEdit *m_lineEdit;
|
||||
};
|
||||
|
||||
|
||||
class QInstallerReadyForInstallationPage : public QInstallerPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QInstallerReadyForInstallationPage(QInstaller *installer);
|
||||
};
|
||||
|
||||
|
||||
class QInstallerPerformInstallationPage : public QInstallerPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QInstallerPerformInstallationPage(QInstaller *installer);
|
||||
|
||||
protected:
|
||||
void initializePage();
|
||||
bool isComplete() const;
|
||||
bool isInterruptible() const { return true; }
|
||||
|
||||
signals:
|
||||
void installationRequested();
|
||||
|
||||
private slots:
|
||||
void installationStarted();
|
||||
void installationFinished();
|
||||
void updateProgress();
|
||||
|
||||
private:
|
||||
QProgressBar *m_progressBar;
|
||||
QLabel *m_progressLabel;
|
||||
QTimer *m_updateTimer;
|
||||
};
|
||||
|
||||
|
||||
class QInstallerPerformUninstallationPage : public QInstallerPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QInstallerPerformUninstallationPage(QInstaller *installer);
|
||||
|
||||
protected:
|
||||
void initializePage();
|
||||
bool isComplete() const;
|
||||
bool isInterruptible() const { return true; }
|
||||
|
||||
signals:
|
||||
void uninstallationRequested();
|
||||
|
||||
private slots:
|
||||
void uninstallationStarted();
|
||||
void uninstallationFinished();
|
||||
void updateProgress();
|
||||
|
||||
private:
|
||||
QProgressBar *m_progressBar;
|
||||
QLabel *m_progressLabel;
|
||||
QTimer *m_updateTimer;
|
||||
};
|
||||
|
||||
|
||||
class QInstallerFinishedPage : public QInstallerPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QInstallerFinishedPage(QInstaller *installer);
|
||||
|
||||
public slots:
|
||||
void handleFinishClicked();
|
||||
|
||||
protected:
|
||||
void entering();
|
||||
void leaving();
|
||||
|
||||
private:
|
||||
QCheckBox *m_runItCheckBox;
|
||||
};
|
||||
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
QT_END_HEADER
|
||||
|
||||
#endif // QINSTALLERGUI_H
|
84
installer/resources/license.txt
Normal file
@@ -0,0 +1,84 @@
|
||||
For individuals and/or legal entities resident in the American Continent (including those resident in Canada, South America, and the United States of America), the applicable licensing terms are specified under the heading "Trolltech Technology Preview License
|
||||
Agreement: American Continent".
|
||||
|
||||
For individuals and/or legal entities not resident in the American Continent, the applicable licensing terms are specified under the heading "Trolltech Technology Preview License Agreement: Norway".
|
||||
|
||||
TROLLTECH TECHNOLOGY PREVIEW LICENSE AGREEMENT: AMERICAN CONTINENT Agreement version 2.0
|
||||
IMPORTANT-READ CAREFULLY:
|
||||
|
||||
1. This Trolltech Technology Preview License Agreement ("Agreement") is a legal agreement between you (either an individual or a legal entity) and Trolltech, Inc. ("Trolltech"), and pertains to the Trolltech software product(s) accompanying this Agreement, which include(s) computer software and may include "online" or electronic documentation, associated media, and printed materials, including the source code, example programs and the documentation ("Licensed Software").
|
||||
|
||||
2. The Licensed Software is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. Trolltech retains all rights not expressly granted. No title, property rights or copyright in the Licensed Software or in any modifications to the Licensed Software shall pass to the Licensee under any circumstances. The Licensed Software is licensed, not sold.
|
||||
|
||||
3. By installing, copying, or otherwise using the Licensed Software, Licensee agrees to be bound by the terms of this Agreement. If Licensee does not agree to the terms of this Agreement, Licensee should not install, copy, or otherwise use the Licensed Software.
|
||||
|
||||
4. Upon Licensee's acceptance of the terms and conditions of this Agreement, Trolltech grants Licensee the right to use the Licensed Software in the manner provided below.
|
||||
|
||||
5. Trolltech grants to Licensee as an individual a personal, non-exclusive, non-transferable license to make and use copies of the Licensed Software for the sole purpose of evaluating and testing the Licensed Software and/or providing feedback to Trolltech. Licensee may install copies of the Licensed Software on an unlimited number of computers provided that Licensee is the only individual using the Licensed Software. If Licensee is an entity, Trolltech grants Licensee the right to designate one, and only one, individual within Licensee's organization who shall have the sole right to use the Licensed Software in the manner provided in this Agreement. Licensee may, at any time, but not more frequently than once every six (6) months, designate another individual to replace the current designated user by notifying Trolltech, so long as there is no more than one (1) designated user at any given time
|
||||
|
||||
6. Licensee may not loan, rent, lease, or license the Licensed Software or any copy of it. Licensee may not alter or remove any details of ownership, copyright, trademark or other property right connected with the Licensed Software. Licensee may not modify or distribute the Licensed Software. Licensee may not distribute any software statically or dynamically linked with the Licensed Software.
|
||||
|
||||
7. This Licensed Software is time-limited. All rights granted to Licensee in this Agreement will be void three (3) months after Licensee received the Licensed Software.
|
||||
|
||||
8. The Licensed Software may provide links to third party libraries or code (collectively "Third Party Libraries") to implement various functions. Third Party Libraries do not comprise part of the Licensed Software. In some cases, access to Third Party Libraries may be included along with the Licensed Software delivery as a convenience for development and testing only. Such source code and libraries as are or may be listed in the ".../src/3rdparty" source tree delivered with the Licensed Software, as may be amended from time to time, do not comprise the Licensed Software. Licensee acknowledges (1) that some Third Party Libraries may require additional licensing of copyright and patents from the owners of such, and (2) that distribution of any of the Licensed Software referencing any portion of a Third Party Library may require appropriate licensing from such third parties.
|
||||
|
||||
9. Pre-Release Code, Non-Commercial Use: The Licensed Software contains Pre-release Code that is not at the level of performance and compatibility of a final, generally available, product offering. The Licensed Software may not operate correctly and may be substantially modified prior to the first commercial shipment, if any. Trolltech is not obligated to make this or any later version of the Licensed Software commercially available. The License Software is "Not for Commercial Use" and may only be used for the purposes described in Section 5. You may not use the Licensed Software in a live operating environment where it may be relied upon to perform in the same manner as a commercially released product or with data that has not been sufficiently backed up.
|
||||
|
||||
10. WARRANTY DISCLAIMER: THE LICENSED SOFTWARE IS LICENSED TO LICENSEE "AS IS". TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, TROLLTECH ON BEHALF OF ITSELF AND ITS SUPPLIERS, DISCLAIMS ALL WARRANTIES AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT WITH REGARD TO THE LICENSED SOFTWARE.
|
||||
|
||||
11. LIMITATION OF LIABILITY: IF, TROLLTECH'S WARRANTY DISCLAIMER NOTWITHSTANDING, TROLLTECH IS HELD LIABLE TO LICENSEE, WHETHER IN CONTRACT, TORT OR ANY OTHER LEGAL THEORY, BASED ON THE LICENSED SOFTWARE, TROLLTECH'S ENTIRE LIABILITY TO LICENSEE AND LICENSEE'S EXCLUSIVE REMEDY SHALL BE, AT TROLLTECH'S OPTION, EITHER (A) RETURN OF THE PRICE LICENSEE PAID FOR THE LICENSED SOFTWARE, OR (B) REPAIR OR REPLACEMENT OF THE LICENSED SOFTWARE, PROVIDED LICENSEE RETURNS TO TROLLTECH ALL COPIES OF THE LICENSED SOFTWARE AS ORIGINALLY DELIVERED TO LICENSEE. TROLLTECH SHALL NOT UNDER ANY CIRCUMSTANCES BE LIABLE TO LICENSEE BASED ON FAILURE OF THE LICENSED SOFTWARE IF THE FAILURE RESULTED FROM ACCIDENT, ABUSE OR MISAPPLICATION, NOR SHALL TROLLTECH UNDER ANY CIRCUMSTANCES BE LIABLE FOR SPECIAL DAMAGES, PUNITIVE OR EXEMPLARY DAMAGES, DAMAGES FOR LOSS OF PROFITS OR INTERRUPTION OF BUSINESS OR FOR LOSS OR CORRUPTION OF DATA. ANY AWARD OF DAMAGES FROM TROLLTECH TO LICENSEE SHALL NOT EXCEED THE TOTAL AMOUNT LICENSEE HAS PAID TO TROLLTECH IN CONNECTION WITH THIS AGREEMENT.
|
||||
|
||||
12. Termination: Without prejudice to any other rights, Trolltech may terminate this Agreement if Licensee fails to comply with the terms and conditions of this Agreement. In such event, Licensee must destroy all copies of the Licensed Software and all of its components.
|
||||
|
||||
13. Export Restrictions: Licensee agrees not to export or re-export the Licensed Software, any part thereof, or any process or service that is the direct product of the Licensed Software. Licensee may not sell, resell, or otherwise transfer for value, the Licensed Software (the foregoing collectively referred to as the "Restricted Components"), to any country, person, entity or end user subject to U.S. export restrictions. Licensee specifically agrees not to export or re-export any of the Restricted Components (i) to any country to which the U.S. has embargoed or restricted the export of goods or services, which currently include, but are not necessarily limited to Cuba, Iran, Iraq, Libya, North Korea, Sudan and Syria, or to any national of any such country, wherever located, who intends to transmit or transport the Restricted Components back to such country; (ii) to any end-user who Licensee knows or has reason to know will utilize the Restricted Components in the design, development or production of nuclear, chemical or biological weapons; or (iii) to any end-user who has been prohibited from participating in U.S. export transactions by any federal agency of the U.S. government. Licensee warrants and represents that neither the U.S. Commerce Department, Bureau of Export Administration nor any other U.S. federal agency has suspended, revoked or denied Licensee's export privileges.
|
||||
|
||||
14. Government End Users: A "U.S. Government End User" shall mean any agency or entity of the government of the United States. The following shall apply if Licensee is a U.S. Government End User. The Licensed Software is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire the Licensed Software with only those rights set forth herein. The Licensed Software (including related documentation) is provided to U.S. Government End Users: (a) only as a commercial end item; and (b) only pursuant to this Agreement.
|
||||
|
||||
15. Compliance with local laws: Licensee shall comply with all applicable laws and regulations relating to the Licensed Software in the United States and in other countries in which Licensee uses or modifies the Licensed Software. Without limiting the generality of the foregoing, Licensee shall not export, re-export, disclose or distribute any of the Licensed Software in violation of any applicable laws or regulations, including the export laws and regulations of the United States, and shall comply with all such laws and regulations.
|
||||
|
||||
16. Entire Agreement: This Agreement constitutes the complete agreement between the parties and supersedes all prior or contemporaneous discussions, representations, and proposals, written or oral, with respect to the subject matters discussed herein. No modification of this Agreement will be effective unless contained in a writing executed by an authorized representative of each party. No term or condition contained in Licensee's purchase order will apply unless expressly accepted by Trolltech in writing. If any provision of the Agreement is found void or unenforceable, the remainder will remain valid and enforceable according to its terms. If any remedy provided is determined to have failed for its essential purpose, all limitations of liability and exclusions of damages set forth in this Agreement shall remain in effect.
|
||||
|
||||
17. Governing law, legal venue: This Agreement shall be construed, interpreted and governed by the laws of the State of California, USA. Any action or proceeding arising from or relating to this Agreement shall be brought in a federal court in the Northern District of California or in the State Court in Santa Clara County, California, and each party irrevocably submits to the personal jurisdiction of any such court in any such action or proceeding. The Agreement gives Licensee specific legal rights; Licensee may have others, which vary from state to state and from country to country. Trolltech reserves all rights not specifically granted in this Agreement.
|
||||
|
||||
|
||||
|
||||
|
||||
For legal entities and/or individuals residing in any country other than Canada, the United States of America or South America:
|
||||
TROLLTECH TECHNOLOGY PREVIEW LICENSE AGREEMENT: NORWAY
|
||||
|
||||
Agreement version 2.0
|
||||
IMPORTANT-READ CAREFULLY:
|
||||
|
||||
1. This Trolltech Technology Preview License Agreement ("Agreement") is a legal agreement between you (either an individual or a legal entity) and Trolltech ASA ("Trolltech"), and pertains to the Trolltech software product(s) accompanying this Agreement, which include(s) computer software and may include "online" or electronic documentation, associated media, and printed materials, including the source code, example programs and the documentation ("Licensed Software").
|
||||
|
||||
2. The Licensed Software is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. Trolltech retains all rights not expressly granted. No title, property rights or copyright in the Licensed Software or in any modifications to the Licensed Software shall pass to the Licensee under any circumstances. The Licensed Software is licensed, not sold.
|
||||
|
||||
3. By installing, copying, or otherwise using the Licensed Software, Licensee agrees to be bound by the terms of this Agreement. If Licensee does not agree to the terms of this Agreement, Licensee should not install, copy, or otherwise use the Licensed Software.
|
||||
|
||||
4. Upon Licensee's acceptance of the terms and conditions of this Agreement, Trolltech grants Licensee the right to use the Licensed Software in the manner provided below.
|
||||
|
||||
5. Trolltech grants to Licensee as an individual a personal, non-exclusive, non-transferable license to make and use copies of the Licensed Software for the sole purpose of evaluating and testing the Licensed Software and/or providing feedback to Trolltech. Licensee may install copies of the Licensed Software on an unlimited number of computers provided that Licensee is the only individual using the Licensed Software. If Licensee is an entity, Trolltech grants Licensee the right to designate one, and only one, individual within Licensee's organization who shall have the sole right to use the Licensed Software in the manner provided in this Agreement. Licensee may, at any time, but not more frequently than once every six (6) months, designate another individual to replace the current designated user by notifying Trolltech, so long as there is no more than one (1) designated user at any given time
|
||||
|
||||
6. Licensee may not loan, rent, lease, or license the Licensed Software or any copy of it. Licensee may not alter or remove any details of ownership, copyright, trademark or other property right connected with the Licensed Software. Licensee may not modify or distribute the Licensed Software. Licensee may not distribute any software statically or dynamically linked with the Licensed Software.
|
||||
|
||||
7. This Licensed Software is time-limited. All rights granted to Licensee in this Agreement will be void three (3) months after Licensee received the Licensed Software.
|
||||
|
||||
8. The Licensed Software may provide links to third party libraries or code (collectively "Third Party Libraries") to implement various functions. Third Party Libraries do not comprise part of the Licensed Software. In some cases, access to Third Party Libraries may be included along with the Licensed Software delivery as a convenience for development and testing only. Such source code and libraries as are or may be listed in the ".../src/3rdparty" source tree delivered with the Licensed Software, as may be amended from time to time, do not comprise the Licensed Software. Licensee acknowledges (1) that some Third Party Libraries may require additional licensing of copyright and patents from the owners of such, and (2) that distribution of any of the Licensed Software referencing any portion of a Third Party Library may require appropriate licensing from such third parties.
|
||||
|
||||
9. Pre-Release Code, Non-Commercial Use: The Licensed Software contains Pre-release Code that is not at the level of performance and compatibility of a final, generally available, product offering. The Licensed Software may not operate correctly and may be substantially modified prior to the first commercial shipment, if any. Trolltech is not obligated to make this or any later version of the Licensed Software commercially available. The License Software is "Not for Commercial Use" and may only be used for the purposes described in Section 5. You may not use the Licensed Software in a live operating environment where it may be relied upon to perform in the same manner as a commercially released product or with data that has not been sufficiently backed up.
|
||||
|
||||
10. WARRANTY DISCLAIMER: THE LICENSED SOFTWARE IS LICENSED TO LICENSEE "AS IS". TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, TROLLTECH ON BEHALF OF ITSELF AND ITS SUPPLIERS, DISCLAIMS ALL WARRANTIES AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT WITH REGARD TO THE LICENSED SOFTWARE.
|
||||
|
||||
11. LIMITATION OF LIABILITY: IF, TROLLTECH'S WARRANTY DISCLAIMER NOTWITHSTANDING, TROLLTECH IS HELD LIABLE TO LICENSEE, WHETHER IN CONTRACT, TORT OR ANY OTHER LEGAL THEORY, BASED ON THE LICENSED SOFTWARE, TROLLTECH'S ENTIRE LIABILITY TO LICENSEE AND LICENSEE'S EXCLUSIVE REMEDY SHALL BE, AT TROLLTECH'S OPTION, EITHER (A) RETURN OF THE PRICE LICENSEE PAID FOR THE LICENSED SOFTWARE, OR (B) REPAIR OR REPLACEMENT OF THE LICENSED SOFTWARE, PROVIDED LICENSEE RETURNS TO TROLLTECH ALL COPIES OF THE LICENSED SOFTWARE AS ORIGINALLY DELIVERED TO LICENSEE. TROLLTECH SHALL NOT UNDER ANY CIRCUMSTANCES BE LIABLE TO LICENSEE BASED ON FAILURE OF THE LICENSED SOFTWARE IF THE FAILURE RESULTED FROM ACCIDENT, ABUSE OR MISAPPLICATION, NOR SHALL TROLLTECH UNDER ANY CIRCUMSTANCES BE LIABLE FOR SPECIAL DAMAGES, PUNITIVE OR EXEMPLARY DAMAGES, DAMAGES FOR LOSS OF PROFITS OR INTERRUPTION OF BUSINESS OR FOR LOSS OR CORRUPTION OF DATA. ANY AWARD OF DAMAGES FROM TROLLTECH TO LICENSEE SHALL NOT EXCEED THE TOTAL AMOUNT LICENSEE HAS PAID TO TROLLTECH IN CONNECTION WITH THIS AGREEMENT.
|
||||
|
||||
12. Termination: Without prejudice to any other rights, Trolltech may terminate this Agreement if Licensee fails to comply with the terms and conditions of this Agreement. In such event, Licensee must destroy all copies of the Licensed Software and all of its components.
|
||||
|
||||
13. Export Restrictions: Licensee agrees not to export or re-export the Licensed Software, any part thereof, or any process or service that is the direct product of the Licensed Software. Licensee may not sell, resell, or otherwise transfer for value, the Licensed Software (the foregoing collectively referred to as the "Restricted Components"), to any country, person, entity or end user subject to U.S. export restrictions. Licensee specifically agrees not to export or re-export any of the Restricted Components (i) to any country to which the U.S. has embargoed or restricted the export of goods or services, which currently include, but are not necessarily limited to Cuba, Iran, Iraq, Libya, North Korea, Sudan and Syria, or to any national of any such country, wherever located, who intends to transmit or transport the Restricted Components back to such country; (ii) to any end-user who Licensee knows or has reason to know will utilize the Restricted Components in the design, development or production of nuclear, chemical or biological weapons; or (iii) to any end-user who has been prohibited from participating in U.S. export transactions by any federal agency of the U.S. government. Licensee warrants and represents that neither the U.S. Commerce Department, Bureau of Export Administration nor any other U.S. federal agency has suspended, revoked or denied Licensee's export privileges.
|
||||
|
||||
14. Government End Users: A "U.S. Government End User" shall mean any agency or entity of the government of the United States. The following shall apply if Licensee is a U.S. Government End User. The Licensed Software is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire the Licensed Software with only those rights set forth herein. The Licensed Software (including related documentation) is provided to U.S. Government End Users: (a) only as a commercial end item; and (b) only pursuant to this Agreement.
|
||||
|
||||
15. Compliance with local laws: Licensee shall comply with all applicable laws and regulations relating to the Licensed Software in the United States and in other countries in which Licensee uses or modifies the Licensed Software. Without limiting the generality of the foregoing, Licensee shall not export, re-export, disclose or distribute any of the Licensed Software in violation of any applicable laws or regulations, including the export laws and regulations of the United States, and shall comply with all such laws and regulations.
|
||||
|
||||
16. Entire Agreement: This Agreement constitutes the complete agreement between the parties and supersedes all prior or contemporaneous discussions, representations, and proposals, written or oral, with respect to the subject matters discussed herein. No modification of this Agreement will be effective unless contained in a writing executed by an authorized representative of each party. No term or condition contained in Licensee's purchase order will apply unless expressly accepted by Trolltech in writing. If any provision of the Agreement is found void or unenforceable, the remainder will remain valid and enforceable according to its terms. If any remedy provided is determined to have failed for its essential purpose, all limitations of liability and exclusions of damages set forth in this Agreement shall remain in effect.
|
||||
|
||||
17. Governing law, legal venue: This Agreement shall be construed, interpreted and governed by the laws of Norway, the legal venue to be Oslo City Court. Trolltech reserves all rights not specifically granted in this Agreement.
|
BIN
installer/resources/logo.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
installer/resources/watermark.png
Normal file
After Width: | Height: | Size: 14 KiB |
4
qtcreator.pro
Normal file
@@ -0,0 +1,4 @@
|
||||
TEMPLATE = subdirs
|
||||
CONFIG += ordered
|
||||
|
||||
SUBDIRS = src
|
101
replaceVersion.sh
Executable file
@@ -0,0 +1,101 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
## Command line parameters
|
||||
if [[ $# != 2 ]]; then
|
||||
cat <<USAGE
|
||||
usage:
|
||||
$0 <old> <new>
|
||||
example:
|
||||
$0 '1.2.3' '1.2.4'
|
||||
USAGE
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
## Process and show version
|
||||
OLD=`sed 's/\./\\\\./g' <<<"$1"`
|
||||
NEW=`sed 's/\./\\\\./g' <<<"$2"`
|
||||
|
||||
OLD_MAJOR=`sed 's/^\([0-9]\+\)\.[0-9]\+\.[0-9]\+$/\1/' <<<"$1"`
|
||||
NEW_MAJOR=`sed 's/^\([0-9]\+\)\.[0-9]\+\.[0-9]\+$/\1/' <<<"$2"`
|
||||
|
||||
OLD_MINOR=`sed 's/^[0-9]\+\.\([0-9]\+\)\.[0-9]\+$/\1/' <<<"$1"`
|
||||
NEW_MINOR=`sed 's/^[0-9]\+\.\([0-9]\+\)\.[0-9]\+$/\1/' <<<"$2"`
|
||||
|
||||
OLD_RELEASE=`sed 's/^[0-9]\+\.[0-9]\+\.\([0-9]\+\)$/\1/' <<<"$1"`
|
||||
NEW_RELEASE=`sed 's/^[0-9]\+\.[0-9]\+\.\([0-9]\+\)$/\1/' <<<"$2"`
|
||||
|
||||
OLD_DOT_FOUR="${OLD_MAJOR}\\.${OLD_MINOR}\\.${OLD_RELEASE}\\.0"
|
||||
NEW_DOT_FOUR="${NEW_MAJOR}\\.${NEW_MINOR}\\.${NEW_RELEASE}\\.0"
|
||||
|
||||
OLD_COMMA_FOUR="${OLD_MAJOR},${OLD_MINOR},${OLD_RELEASE},0"
|
||||
NEW_COMMA_FOUR="${NEW_MAJOR},${NEW_MINOR},${NEW_RELEASE},0"
|
||||
|
||||
echo "#==============================================="
|
||||
echo "# Plain '${OLD}' -> '${NEW}'"
|
||||
echo "#-----------------------------------------------"
|
||||
echo "# Major '${OLD_MAJOR}' -> '${NEW_MAJOR}'"
|
||||
echo "# Minor '${OLD_MINOR}' -> '${NEW_MINOR}'"
|
||||
echo "# Release '${OLD_RELEASE}' -> '${NEW_RELEASE}'"
|
||||
echo "#-----------------------------------------------"
|
||||
echo "# Dots '${OLD_DOT_FOUR}' -> '${NEW_DOT_FOUR}'"
|
||||
echo "# Comma '${OLD_COMMA_FOUR}' -> '${NEW_COMMA_FOUR}'"
|
||||
echo "#==============================================="
|
||||
echo
|
||||
|
||||
|
||||
## Make script safe to call from anywhere by going home first
|
||||
SCRIPT_DIR=`dirname "${PWD}/$0"`
|
||||
echo "Entering directory \`${SCRIPT_DIR}'"
|
||||
pushd "${SCRIPT_DIR}" &>/dev/null || exit 1
|
||||
|
||||
|
||||
## Patch *.pluginspec
|
||||
while read i ; do
|
||||
echo "Patching \`$i'"
|
||||
TMPFILE=`mktemp`
|
||||
sed -e 's/version="'"${OLD}"'"/version="'"${NEW}"'"/' \
|
||||
-e 's/compatVersion="'"${OLD}"'"/compatVersion="'"${NEW}"'"/' \
|
||||
"${i}" > "${TMPFILE}"
|
||||
mv -f "${TMPFILE}" "${i}"
|
||||
done < <(find . -name '*.pluginspec')
|
||||
|
||||
|
||||
## Patch coreconstants.h
|
||||
TMPFILE=`mktemp`
|
||||
CORE_CONSTANT_H="${SCRIPT_DIR}/src/plugins/coreplugin/coreconstants.h"
|
||||
echo "Patching \`${CORE_CONSTANT_H}'"
|
||||
sed \
|
||||
-e 's/^\(#define IDE_VERSION_MAJOR \)'"${OLD_MAJOR}"'/\1'"${NEW_MAJOR}"'/' \
|
||||
-e 's/^\(#define IDE_VERSION_MINOR \)'"${OLD_MINOR}"'/\1'"${NEW_MINOR}"'/' \
|
||||
-e 's/^\(#define IDE_VERSION_RELEASE \)'"${OLD_RELEASE}"'/\1'"${NEW_RELEASE}"'/' \
|
||||
"${CORE_CONSTANT_H}" > "${TMPFILE}"
|
||||
mv -f "${TMPFILE}" "${CORE_CONSTANT_H}"
|
||||
|
||||
|
||||
## Patch installer.rc
|
||||
TMPFILE=`mktemp`
|
||||
INSTALLER_RC="${SCRIPT_DIR}/../ide/nightly_builds/installer/installer.rc"
|
||||
echo "Patching \`${INSTALLER_RC}'"
|
||||
sed \
|
||||
-e "s/"${OLD_DOT_FOUR}"/"${NEW_DOT_FOUR}"/" \
|
||||
-e "s/"${OLD_COMMA_FOUR}"/"${NEW_COMMA_FOUR}"/" \
|
||||
"${INSTALLER_RC}" > "${TMPFILE}"
|
||||
p4 edit `sed -e 's/\/\.\//\//g' -e 's/\/[^\/]\+\/\.\.\//\//g' <<<"${INSTALLER_RC}"`
|
||||
mv -f "${TMPFILE}" "${INSTALLER_RC}"
|
||||
|
||||
|
||||
## Patch installer.rc
|
||||
TMPFILE=`mktemp`
|
||||
INFO_PLIST="${SCRIPT_DIR}/src/app/Info.plist"
|
||||
echo "Patching \`${INFO_PLIST}'"
|
||||
sed \
|
||||
-e "s/"${OLD}"/"${NEW}"/" \
|
||||
"${INFO_PLIST}" > "${TMPFILE}"
|
||||
mv -f "${TMPFILE}" "${INFO_PLIST}"
|
||||
|
||||
|
||||
## Go back to original $PWD
|
||||
echo "Leaving directory \`${SCRIPT_DIR}'"
|
||||
popd &>/dev/null || exit 1
|
||||
exit 0
|
428
shared/cpaster/cgi.cpp
Normal file
@@ -0,0 +1,428 @@
|
||||
/***************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** Non-Open Source Usage
|
||||
**
|
||||
** Licensees may use this file in accordance with the Qt Beta Version
|
||||
** License Agreement, Agreement version 2.2 provided with the Software or,
|
||||
** alternatively, in accordance with the terms contained in a written
|
||||
** agreement between you and Nokia.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
**
|
||||
** Alternatively, this file may be used under the terms of the GNU General
|
||||
** Public License versions 2.0 or 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the packaging
|
||||
** of this file. Please review the following information to ensure GNU
|
||||
** General Public Licensing requirements will be met:
|
||||
**
|
||||
** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
|
||||
** http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt GPL Exception version
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
#include "cgi.h"
|
||||
|
||||
#include <QByteArray>
|
||||
|
||||
// -------------------------------------------------------------------------------------------------
|
||||
|
||||
const char *cgi_chars = "0123456789abcdef"; // RFC 1738 suggests lower-case to be optimal
|
||||
QString CGI::encodeURL(const QString &rawText)
|
||||
{
|
||||
QByteArray utf = rawText.toUtf8();
|
||||
QString enc;
|
||||
enc.reserve(utf.length()); // Make sure we at least have space for a normal US-ASCII URL
|
||||
|
||||
QByteArray::const_iterator it = utf.constBegin();
|
||||
while(it != utf.constEnd()) {
|
||||
char ch = *it;
|
||||
if (('A' <= ch && ch <= 'Z')
|
||||
|| ('a' <= ch && ch <= 'z')
|
||||
|| ('0' <= ch && ch <= '9'))
|
||||
enc.append(*it);
|
||||
else if (ch == ' ')
|
||||
enc.append('+');
|
||||
else {
|
||||
switch(ch) {
|
||||
case '-': case '_':
|
||||
case '(': case ')':
|
||||
case '.': case '!':
|
||||
case '~': case '*':
|
||||
case '\'':
|
||||
enc.append(ch);
|
||||
break;
|
||||
default:
|
||||
ushort c1 = (*it & 0xF0) >> 4;
|
||||
ushort c2 = (*it & 0x0F);
|
||||
enc.append('%');
|
||||
enc.append(QChar(*(cgi_chars + c1)));
|
||||
enc.append(QChar(*(cgi_chars + c2)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
++it;
|
||||
}
|
||||
return enc;
|
||||
}
|
||||
|
||||
QString CGI::decodeURL(const QString &urlText)
|
||||
{
|
||||
QByteArray dec;
|
||||
QString::const_iterator it = urlText.constBegin();
|
||||
while(it != urlText.constEnd()) {
|
||||
ushort ch = (*it).unicode();
|
||||
switch(ch) {
|
||||
case '%':
|
||||
{
|
||||
char c1 = char(0x00ff & (*(++it)).unicode());
|
||||
char c2 = char(0x00ff & (*(++it)).unicode());
|
||||
ushort v = 0;
|
||||
if('A' <= c1 && c1 <= 'Z')
|
||||
v = c1 - 'A' + 10;
|
||||
else if ('a' <= c1 && c1 <= 'z')
|
||||
v = c1 - 'a' + 10;
|
||||
else if ('0' <= c1 && c1 <= '9')
|
||||
v = c1 - '0';
|
||||
else
|
||||
continue; // Malformed URL!
|
||||
v <<= 4; // c1 was MSB half
|
||||
if('A' <= c2 && c2 <= 'Z')
|
||||
v |= c2 - 'A' + 10;
|
||||
else if ('a' <= c2 && c2 <= 'z')
|
||||
v |= c2 - 'a' + 10;
|
||||
else if ('0' <= c2 && c2 <= '9')
|
||||
v |= c2 - '0';
|
||||
else
|
||||
continue; // Malformed URL!
|
||||
dec.append((char)v);
|
||||
}
|
||||
break;
|
||||
case '+':
|
||||
dec.append(' ');
|
||||
break;
|
||||
default:
|
||||
dec.append(*it);
|
||||
break;
|
||||
}
|
||||
++it;
|
||||
}
|
||||
return QString::fromUtf8(dec.constData(), dec.length());
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------------
|
||||
inline const char *unicodeToHTML(ushort unicode_char)
|
||||
{
|
||||
switch(unicode_char) {
|
||||
// Latin -------------------------------
|
||||
case 0x0022: return "quot"; // (34 ) quotation mark = APL quote
|
||||
case 0x0026: return "amp"; // (38 ) ampersand
|
||||
case 0x003C: return "lt"; // (60 ) less-than sign
|
||||
case 0x003E: return "gt"; // (62 ) greater-than sign
|
||||
case 0x00A0: return "nbsp"; // (160 ) no-break space = non-breaking space
|
||||
case 0x00A1: return "iexcl"; // (161 ) inverted exclamation mark
|
||||
case 0x00A2: return "cent"; // (162 ) cent sign
|
||||
case 0x00A3: return "pound"; // (163 ) pound sign
|
||||
case 0x00A4: return "curren"; // (164 ) currency sign
|
||||
case 0x00A5: return "yen"; // (165 ) yen sign = yuan sign
|
||||
case 0x00A6: return "brvbar"; // (166 ) broken bar = broken vertical bar
|
||||
case 0x00A7: return "sect"; // (167 ) section sign
|
||||
case 0x00A8: return "uml"; // (168 ) diaeresis = spacing diaeresis
|
||||
case 0x00A9: return "copy"; // (169 ) copyright sign
|
||||
case 0x00AA: return "ordf"; // (170 ) feminine ordinal indicator
|
||||
case 0x00AB: return "laquo"; // (171 ) left-pointing double angle quotation mark = left pointing guillemet
|
||||
case 0x00AC: return "not"; // (172 ) not sign
|
||||
case 0x00AD: return "shy"; // (173 ) soft hyphen = discretionary hyphen
|
||||
case 0x00AE: return "reg"; // (174 ) registered sign = registered trade mark sign
|
||||
case 0x00AF: return "macr"; // (175 ) macron = spacing macron = overline = APL overbar
|
||||
case 0x00B0: return "deg"; // (176 ) degree sign
|
||||
case 0x00B1: return "plusmn"; // (177 ) plus-minus sign = plus-or-minus sign
|
||||
case 0x00B2: return "sup2"; // (178 ) superscript two = superscript digit two = squared
|
||||
case 0x00B3: return "sup3"; // (179 ) superscript three = superscript digit three = cubed
|
||||
case 0x00B4: return "acute"; // (180 ) acute accent = spacing acute
|
||||
case 0x00B5: return "micro"; // (181 ) micro sign
|
||||
case 0x00B6: return "para"; // (182 ) pilcrow sign = paragraph sign
|
||||
case 0x00B7: return "middot"; // (183 ) middle dot = Georgian comma = Greek middle dot
|
||||
case 0x00B8: return "cedil"; // (184 ) cedilla = spacing cedilla
|
||||
case 0x00B9: return "sup1"; // (185 ) superscript one = superscript digit one
|
||||
case 0x00BA: return "ordm"; // (186 ) masculine ordinal indicator
|
||||
case 0x00BB: return "raquo"; // (187 ) right-pointing double angle quotation mark = right pointing guillemet
|
||||
case 0x00BC: return "frac14"; // (188 ) vulgar fraction one quarter = fraction one quarter
|
||||
case 0x00BD: return "frac12"; // (189 ) vulgar fraction one half = fraction one half
|
||||
case 0x00BE: return "frac34"; // (190 ) vulgar fraction three quarters = fraction three quarters
|
||||
case 0x00BF: return "iquest"; // (191 ) inverted question mark = turned question mark
|
||||
case 0x00C0: return "Agrave"; // (192 ) capital letter A with grave = capital letter <20>
|
||||
case 0x00C1: return "Aacute"; // (193 ) capital letter A with acute
|
||||
case 0x00C2: return "Acirc"; // (194 ) capital letter A with circumflex
|
||||
case 0x00C3: return "Atilde"; // (195 ) capital letter A with tilde
|
||||
case 0x00C4: return "Auml"; // (196 ) capital letter A with diaeresis
|
||||
case 0x00C5: return "Aring"; // (197 ) capital letter A with ring above = capital letter <20>
|
||||
case 0x00C6: return "AElig"; // (198 ) capital letter AE = capital ligature <20>
|
||||
case 0x00C7: return "Ccedil"; // (199 ) capital letter C with cedilla
|
||||
case 0x00C8: return "Egrave"; // (200 ) capital letter E with grave
|
||||
case 0x00C9: return "Eacute"; // (201 ) capital letter E with acute
|
||||
case 0x00CA: return "Ecirc"; // (202 ) capital letter E with circumflex
|
||||
case 0x00CB: return "Euml"; // (203 ) capital letter E with diaeresis
|
||||
case 0x00CC: return "Igrave"; // (204 ) capital letter I with grave
|
||||
case 0x00CD: return "Iacute"; // (205 ) capital letter I with acute
|
||||
case 0x00CE: return "Icirc"; // (206 ) capital letter I with circumflex
|
||||
case 0x00CF: return "Iuml"; // (207 ) capital letter I with diaeresis
|
||||
case 0x00D0: return "ETH"; // (208 ) capital letter ETH
|
||||
case 0x00D1: return "Ntilde"; // (209 ) capital letter N with tilde
|
||||
case 0x00D2: return "Ograve"; // (210 ) capital letter O with grave
|
||||
case 0x00D3: return "Oacute"; // (211 ) capital letter O with acute
|
||||
case 0x00D4: return "Ocirc"; // (212 ) capital letter O with circumflex
|
||||
case 0x00D5: return "Otilde"; // (213 ) capital letter O with tilde
|
||||
case 0x00D6: return "Ouml"; // (214 ) capital letter O with diaeresis
|
||||
case 0x00D7: return "times"; // (215 ) multiplication sign
|
||||
case 0x00D8: return "Oslash"; // (216 ) capital letter O with stroke = capital letter <20>
|
||||
case 0x00D9: return "Ugrave"; // (217 ) capital letter U with grave
|
||||
case 0x00DA: return "Uacute"; // (218 ) capital letter U with acute
|
||||
case 0x00DB: return "Ucirc"; // (219 ) capital letter U with circumflex
|
||||
case 0x00DC: return "Uuml"; // (220 ) capital letter U with diaeresis
|
||||
case 0x00DD: return "Yacute"; // (221 ) capital letter Y with acute
|
||||
case 0x00DE: return "THORN"; // (222 ) capital letter THORN
|
||||
case 0x00DF: return "szlig"; // (223 ) small letter sharp s = ess-zed
|
||||
case 0x00E0: return "agrave"; // (224 ) small letter a with grave = small letter <20>
|
||||
case 0x00E1: return "aacute"; // (225 ) small letter a with acute
|
||||
case 0x00E2: return "acirc"; // (226 ) small letter a with circumflex
|
||||
case 0x00E3: return "atilde"; // (227 ) small letter a with tilde
|
||||
case 0x00E4: return "auml"; // (228 ) small letter a with diaeresis
|
||||
case 0x00E5: return "aring"; // (229 ) small letter a with ring above = small letter <20>
|
||||
case 0x00E6: return "aelig"; // (230 ) small letter ae = small letter <20>
|
||||
case 0x00E7: return "ccedil"; // (231 ) small letter c with cedilla
|
||||
case 0x00E8: return "egrave"; // (232 ) small letter e with grave
|
||||
case 0x00E9: return "eacute"; // (233 ) small letter e with acute
|
||||
case 0x00EA: return "ecirc"; // (234 ) small letter e with circumflex
|
||||
case 0x00EB: return "euml"; // (235 ) small letter e with diaeresis
|
||||
case 0x00EC: return "igrave"; // (236 ) small letter i with grave
|
||||
case 0x00ED: return "iacute"; // (237 ) small letter i with acute
|
||||
case 0x00EE: return "icirc"; // (238 ) small letter i with circumflex
|
||||
case 0x00EF: return "iuml"; // (239 ) small letter i with diaeresis
|
||||
case 0x00F0: return "eth"; // (240 ) small letter eth
|
||||
case 0x00F1: return "ntilde"; // (241 ) small letter n with tilde
|
||||
case 0x00F2: return "ograve"; // (242 ) small letter o with grave
|
||||
case 0x00F3: return "oacute"; // (243 ) small letter o with acute
|
||||
case 0x00F4: return "ocirc"; // (244 ) small letter o with circumflex
|
||||
case 0x00F5: return "otilde"; // (245 ) small letter o with tilde
|
||||
case 0x00F6: return "ouml"; // (246 ) small letter o with diaeresis
|
||||
case 0x00F7: return "divide"; // (247 ) division sign
|
||||
case 0x00F8: return "oslash"; // (248 ) small letter o with stroke = small letter <20>
|
||||
case 0x00F9: return "ugrave"; // (249 ) small letter u with grave
|
||||
case 0x00FA: return "uacute"; // (250 ) small letter u with acute
|
||||
case 0x00FB: return "ucirc"; // (251 ) small letter u with circumflex
|
||||
case 0x00FC: return "uuml"; // (252 ) small letter u with diaeresis
|
||||
case 0x00FD: return "yacute"; // (253 ) small letter y with acute
|
||||
case 0x00FE: return "thorn"; // (254 ) small letter thorn
|
||||
case 0x00FF: return "yuml"; // (255 ) small letter y with diaeresis
|
||||
case 0x0152: return "OElig"; // (338 ) capital ligature OE
|
||||
case 0x0153: return "oelig"; // (339 ) small ligature oe
|
||||
case 0x0160: return "Scaron"; // (352 ) capital letter S with caron
|
||||
case 0x0161: return "scaron"; // (353 ) small letter s with caron
|
||||
case 0x0178: return "Yuml"; // (376 ) capital letter Y with diaeresis
|
||||
case 0x0192: return "fnof"; // (402 ) small f with hook = function = florin
|
||||
case 0x02C6: return "circ"; // (710 ) modifier letter circumflex accent
|
||||
case 0x02DC: return "tilde"; // (732 ) small tilde
|
||||
// Greek -------------------------------
|
||||
case 0x0391: return "Alpha"; // (913 ) capital letter alpha
|
||||
case 0x0392: return "Beta"; // (914 ) capital letter beta
|
||||
case 0x0393: return "Gamma"; // (915 ) capital letter gamma
|
||||
case 0x0394: return "Delta"; // (916 ) capital letter delta
|
||||
case 0x0395: return "Epsilon"; // (917 ) capital letter epsilon
|
||||
case 0x0396: return "Zeta"; // (918 ) capital letter zeta
|
||||
case 0x0397: return "Eta"; // (919 ) capital letter eta
|
||||
case 0x0398: return "Theta"; // (920 ) capital letter theta
|
||||
case 0x0399: return "Iota"; // (921 ) capital letter iota
|
||||
case 0x039A: return "Kappa"; // (922 ) capital letter kappa
|
||||
case 0x039B: return "Lambda"; // (923 ) capital letter lambda
|
||||
case 0x039C: return "Mu"; // (924 ) capital letter mu
|
||||
case 0x039D: return "Nu"; // (925 ) capital letter nu
|
||||
case 0x039E: return "Xi"; // (926 ) capital letter xi
|
||||
case 0x039F: return "Omicron"; // (927 ) capital letter omicron
|
||||
case 0x03A0: return "Pi"; // (928 ) capital letter pi
|
||||
case 0x03A1: return "Rho"; // (929 ) capital letter rho
|
||||
case 0x03A3: return "Sigma"; // (931 ) capital letter sigma
|
||||
case 0x03A4: return "Tau"; // (932 ) capital letter tau
|
||||
case 0x03A5: return "Upsilon"; // (933 ) capital letter upsilon
|
||||
case 0x03A6: return "Phi"; // (934 ) capital letter phi
|
||||
case 0x03A7: return "Chi"; // (935 ) capital letter chi
|
||||
case 0x03A8: return "Psi"; // (936 ) capital letter psi
|
||||
case 0x03A9: return "Omega"; // (937 ) capital letter omega
|
||||
case 0x03B1: return "alpha"; // (945 ) small letter alpha
|
||||
case 0x03B2: return "beta"; // (946 ) small letter beta
|
||||
case 0x03B3: return "gamma"; // (947 ) small letter gamma
|
||||
case 0x03B4: return "delta"; // (948 ) small letter delta
|
||||
case 0x03B5: return "epsilon"; // (949 ) small letter epsilon
|
||||
case 0x03B6: return "zeta"; // (950 ) small letter zeta
|
||||
case 0x03B7: return "eta"; // (951 ) small letter eta
|
||||
case 0x03B8: return "theta"; // (952 ) small letter theta
|
||||
case 0x03B9: return "iota"; // (953 ) small letter iota
|
||||
case 0x03BA: return "kappa"; // (954 ) small letter kappa
|
||||
case 0x03BB: return "lambda"; // (955 ) small letter lambda
|
||||
case 0x03BC: return "mu"; // (956 ) small letter mu
|
||||
case 0x03BD: return "nu"; // (957 ) small letter nu
|
||||
case 0x03BE: return "xi"; // (958 ) small letter xi
|
||||
case 0x03BF: return "omicron"; // (959 ) small letter omicron
|
||||
case 0x03C0: return "pi"; // (960 ) small letter pi
|
||||
case 0x03C1: return "rho"; // (961 ) small letter rho
|
||||
case 0x03C2: return "sigmaf"; // (962 ) small letter final sigma
|
||||
case 0x03C3: return "sigma"; // (963 ) small letter sigma
|
||||
case 0x03C4: return "tau"; // (964 ) small letter tau
|
||||
case 0x03C5: return "upsilon"; // (965 ) small letter upsilon
|
||||
case 0x03C6: return "phi"; // (966 ) small letter phi
|
||||
case 0x03C7: return "chi"; // (967 ) small letter chi
|
||||
case 0x03C8: return "psi"; // (968 ) small letter psi
|
||||
case 0x03C9: return "omega"; // (969 ) small letter omega
|
||||
case 0x03D1: return "thetasym";// (977 ) small letter theta symbol
|
||||
case 0x03D2: return "upsih"; // (978 ) upsilon with hook symbol
|
||||
case 0x03D6: return "piv"; // (982 ) pi symbol
|
||||
// General Punctuation -----------------
|
||||
case 0x2002: return "ensp"; // (8194) en space
|
||||
case 0x2003: return "emsp"; // (8195) em space
|
||||
case 0x2009: return "thinsp"; // (8201) thin space
|
||||
case 0x200C: return "zwnj"; // (8204) zero width non-joiner
|
||||
case 0x200D: return "zwj"; // (8205) zero width joiner
|
||||
case 0x200E: return "lrm"; // (8206) left-to-right mark
|
||||
case 0x200F: return "rlm"; // (8207) right-to-left mark
|
||||
case 0x2013: return "ndash"; // (8211) en dash
|
||||
case 0x2014: return "mdash"; // (8212) em dash
|
||||
case 0x2018: return "lsquo"; // (8216) left single quotation mark
|
||||
case 0x2019: return "rsquo"; // (8217) right single quotation mark
|
||||
case 0x201A: return "sbquo"; // (8218) single low-9 quotation mark
|
||||
case 0x201C: return "ldquo"; // (8220) left double quotation mark
|
||||
case 0x201D: return "rdquo"; // (8221) right double quotation mark
|
||||
case 0x201E: return "bdquo"; // (8222) double low-9 quotation mark
|
||||
case 0x2020: return "dagger"; // (8224) dagger
|
||||
case 0x2021: return "Dagger"; // (8225) double dagger
|
||||
case 0x2022: return "bull"; // (8226) bullet = black small circle
|
||||
case 0x2026: return "hellip"; // (8230) horizontal ellipsis = three dot leader
|
||||
case 0x2030: return "permil"; // (8240) per mille sign
|
||||
case 0x2032: return "prime"; // (8242) prime = minutes = feet
|
||||
case 0x2033: return "Prime"; // (8243) double prime = seconds = inches
|
||||
case 0x2039: return "lsaquo"; // (8249) single left-pointing angle quotation mark
|
||||
case 0x203A: return "rsaquo"; // (8250) single right-pointing angle quotation mark
|
||||
case 0x203E: return "oline"; // (8254) overline = spacing overscore
|
||||
case 0x2044: return "frasl"; // (8260) fraction slash
|
||||
// Currency Symbols --------------------
|
||||
case 0x20AC: return "euro"; // (8364) euro sign
|
||||
// Letterlike Symbols ------------------
|
||||
case 0x2111: return "image"; // (8465) blackletter capital I = imaginary part
|
||||
case 0x2118: return "weierp"; // (8472) script capital P = power set = Weierstrass p
|
||||
case 0x211C: return "real"; // (8476) blackletter capital R = real part symbol
|
||||
case 0x2122: return "trade"; // (8482) trade mark sign
|
||||
case 0x2135: return "alefsym"; // (8501) alef symbol = first transfinite cardinal
|
||||
// Arrows ------------------------------
|
||||
case 0x2190: return "larr"; // (8592) leftwards arrow
|
||||
case 0x2191: return "uarr"; // (8593) upwards arrow
|
||||
case 0x2192: return "rarr"; // (8594) rightwards arrow
|
||||
case 0x2193: return "darr"; // (8595) downwards arrow
|
||||
case 0x2194: return "harr"; // (8596) left right arrow
|
||||
case 0x21B5: return "crarr"; // (8629) downwards arrow with corner leftwards = carriage return
|
||||
case 0x21D0: return "lArr"; // (8656) leftwards double arrow
|
||||
case 0x21D1: return "uArr"; // (8657) upwards double arrow
|
||||
case 0x21D2: return "rArr"; // (8658) rightwards double arrow
|
||||
case 0x21D3: return "dArr"; // (8659) downwards double arrow
|
||||
case 0x21D4: return "hArr"; // (8660) left right double arrow
|
||||
// Mathematical Operators --------------
|
||||
case 0x2200: return "forall"; // (8704) for all
|
||||
case 0x2202: return "part"; // (8706) partial differential
|
||||
case 0x2203: return "exist"; // (8707) there exists
|
||||
case 0x2205: return "empty"; // (8709) empty set = null set = diameter
|
||||
case 0x2207: return "nabla"; // (8711) nabla = backward difference
|
||||
case 0x2208: return "isin"; // (8712) element of
|
||||
case 0x2209: return "notin"; // (8713) not an element of
|
||||
case 0x220B: return "ni"; // (8715) contains as member
|
||||
case 0x220F: return "prod"; // (8719) n-ary product = product sign
|
||||
case 0x2211: return "sum"; // (8721) n-ary sumation
|
||||
case 0x2212: return "minus"; // (8722) minus sign
|
||||
case 0x2217: return "lowast"; // (8727) asterisk operator
|
||||
case 0x221A: return "radic"; // (8730) square root = radical sign
|
||||
case 0x221D: return "prop"; // (8733) proportional to
|
||||
case 0x221E: return "infin"; // (8734) infinity
|
||||
case 0x2220: return "ang"; // (8736) angle
|
||||
case 0x2227: return "and"; // (8743) logical and = wedge
|
||||
case 0x2228: return "or"; // (8744) logical or = vee
|
||||
case 0x2229: return "cap"; // (8745) intersection = cap
|
||||
case 0x222A: return "cup"; // (8746) union = cup
|
||||
case 0x222B: return "int"; // (8747) integral
|
||||
case 0x2234: return "there4"; // (8756) therefore
|
||||
case 0x223C: return "sim"; // (8764) tilde operator = varies with = similar to
|
||||
case 0x2245: return "cong"; // (8773) approximately equal to
|
||||
case 0x2248: return "asymp"; // (8776) almost equal to = asymptotic to
|
||||
case 0x2260: return "ne"; // (8800) not equal to
|
||||
case 0x2261: return "equiv"; // (8801) identical to
|
||||
case 0x2264: return "le"; // (8804) less-than or equal to
|
||||
case 0x2265: return "ge"; // (8805) greater-than or equal to
|
||||
case 0x2282: return "sub"; // (8834) subset of
|
||||
case 0x2283: return "sup"; // (8835) superset of
|
||||
case 0x2284: return "nsub"; // (8836) not a subset of
|
||||
case 0x2286: return "sube"; // (8838) subset of or equal to
|
||||
case 0x2287: return "supe"; // (8839) superset of or equal to
|
||||
case 0x2295: return "oplus"; // (8853) circled plus = direct sum
|
||||
case 0x2297: return "otimes"; // (8855) circled times = vector product
|
||||
case 0x22A5: return "perp"; // (8869) up tack = orthogonal to = perpendicular
|
||||
case 0x22C5: return "sdot"; // (8901) dot operator
|
||||
// Miscellaneous Technical -------------
|
||||
case 0x2308: return "lceil"; // (8968) left ceiling = apl upstile
|
||||
case 0x2309: return "rceil"; // (8969) right ceiling
|
||||
case 0x230A: return "lfloor"; // (8970) left floor = apl downstile
|
||||
case 0x230B: return "rfloor"; // (8971) right floor
|
||||
case 0x2329: return "lang"; // (9001) left-pointing angle bracket = bra
|
||||
case 0x232A: return "rang"; // (9002) right-pointing angle bracket = ket
|
||||
// Geometric Shapes --------------------
|
||||
case 0x25CA: return "loz"; // (9674) lozenge
|
||||
// Miscellaneous Symbols ---------------
|
||||
case 0x2660: return "spades"; // (9824) black spade suit
|
||||
case 0x2663: return "clubs"; // (9827) black club suit = shamrock
|
||||
case 0x2665: return "hearts"; // (9829) black heart suit = valentine
|
||||
case 0x2666: return "diams"; // (9830) black diamond suit
|
||||
default: break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
QString CGI::encodeHTML(const QString &rawText, int conversionFlags)
|
||||
{
|
||||
QString enc;
|
||||
enc.reserve(rawText.length()); // at least
|
||||
|
||||
QString::const_iterator it = rawText.constBegin();
|
||||
while (it != rawText.constEnd()) {
|
||||
const char *html = unicodeToHTML((*it).unicode());
|
||||
if (html) {
|
||||
enc.append('&');
|
||||
enc.append(html);
|
||||
enc.append(';');
|
||||
} else if ((conversionFlags & CGI::LineBreaks)
|
||||
&& ((*it).toLatin1() == '\n')) {
|
||||
enc.append("<BR>\n");
|
||||
} else if ((conversionFlags & CGI::Spaces)
|
||||
&& ((*it).toLatin1() == ' ')) {
|
||||
enc.append(" ");
|
||||
} else if ((conversionFlags & CGI::Tabs)
|
||||
&& ((*it).toLatin1() == '\t')) {
|
||||
enc.append(" ");
|
||||
} else if ((*it).unicode() > 0x00FF) {
|
||||
enc.append("&#");
|
||||
enc.append(QString::number((*it).unicode()));
|
||||
enc.append(';');
|
||||
} else {
|
||||
enc.append(*it);
|
||||
}
|
||||
++it;
|
||||
}
|
||||
|
||||
return enc;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------------
|
||||
|
58
shared/cpaster/cgi.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/***************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** Non-Open Source Usage
|
||||
**
|
||||
** Licensees may use this file in accordance with the Qt Beta Version
|
||||
** License Agreement, Agreement version 2.2 provided with the Software or,
|
||||
** alternatively, in accordance with the terms contained in a written
|
||||
** agreement between you and Nokia.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
**
|
||||
** Alternatively, this file may be used under the terms of the GNU General
|
||||
** Public License versions 2.0 or 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the packaging
|
||||
** of this file. Please review the following information to ensure GNU
|
||||
** General Public Licensing requirements will be met:
|
||||
**
|
||||
** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
|
||||
** http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt GPL Exception version
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
#ifndef _CGI_H_
|
||||
#define _CGI_H_
|
||||
#include <QString>
|
||||
|
||||
class CGI
|
||||
{
|
||||
public:
|
||||
static QString encodeURL(const QString &rawText);
|
||||
static QString decodeURL(const QString &urlText);
|
||||
|
||||
enum HTMLconvertFlags {
|
||||
Normal,
|
||||
LineBreaks = 0x0001,
|
||||
Spaces = 0x0002,
|
||||
Tabs = 0x0004
|
||||
};
|
||||
|
||||
static QString encodeHTML(const QString &rawText, int conversionFlags = 0);
|
||||
|
||||
private:
|
||||
inline short charToHex(const QChar &ch);
|
||||
inline QChar hexToChar(const QString &hx);
|
||||
};
|
||||
|
||||
#endif // _CGI_H_
|
||||
|
14
shared/cpaster/cpaster.pri
Normal file
@@ -0,0 +1,14 @@
|
||||
INCLUDEPATH += $$PWD
|
||||
|
||||
HEADERS += $$PWD/cgi.h \
|
||||
$$PWD/fetcher.h \
|
||||
$$PWD/poster.h \
|
||||
$$PWD/splitter.h \
|
||||
$$PWD/view.h
|
||||
SOURCES += $$PWD/cgi.cpp \
|
||||
$$PWD/fetcher.cpp \
|
||||
$$PWD/poster.cpp \
|
||||
$$PWD/splitter.cpp \
|
||||
$$PWD/view.cpp
|
||||
|
||||
FORMS += $$PWD/view.ui
|
78
shared/cpaster/fetcher.cpp
Normal file
@@ -0,0 +1,78 @@
|
||||
/***************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** Non-Open Source Usage
|
||||
**
|
||||
** Licensees may use this file in accordance with the Qt Beta Version
|
||||
** License Agreement, Agreement version 2.2 provided with the Software or,
|
||||
** alternatively, in accordance with the terms contained in a written
|
||||
** agreement between you and Nokia.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
**
|
||||
** Alternatively, this file may be used under the terms of the GNU General
|
||||
** Public License versions 2.0 or 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the packaging
|
||||
** of this file. Please review the following information to ensure GNU
|
||||
** General Public Licensing requirements will be met:
|
||||
**
|
||||
** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
|
||||
** http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt GPL Exception version
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
#include "fetcher.h"
|
||||
#include "cgi.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QByteArray>
|
||||
#include <QDebug>
|
||||
|
||||
Fetcher::Fetcher(const QString &host)
|
||||
: QHttp(host)
|
||||
{
|
||||
m_host = host;
|
||||
m_status = 0;
|
||||
m_hadError = false;
|
||||
connect(this, SIGNAL(requestFinished(int,bool)), SLOT(gotRequestFinished(int,bool)));
|
||||
connect(this, SIGNAL(readyRead(const QHttpResponseHeader &)), SLOT(gotReadyRead(const QHttpResponseHeader &)));
|
||||
}
|
||||
|
||||
int Fetcher::fetch(const QString &url)
|
||||
{
|
||||
// qDebug("Fetcher::fetch(%s)", qPrintable(url));
|
||||
return QHttp::get(url);
|
||||
}
|
||||
|
||||
int Fetcher::fetch(int pasteID)
|
||||
{
|
||||
return fetch("http://" + m_host + "/?format=raw&id=" + QString::number(pasteID));
|
||||
}
|
||||
|
||||
void Fetcher::gotRequestFinished(int, bool error)
|
||||
{
|
||||
m_hadError = error;
|
||||
QCoreApplication::exit(error ? -1 : 0); // ends event-loop
|
||||
}
|
||||
|
||||
void Fetcher::gotReadyRead(const QHttpResponseHeader & /* resp */)
|
||||
{
|
||||
m_body += QHttp::readAll();
|
||||
|
||||
// Hackish check for No Such Paste, as codepaster doesn't send a HTTP code indicating such, or
|
||||
// sends a redirect to an url indicating failure...
|
||||
if (m_body.contains("<B>No such paste!</B>")) {
|
||||
m_body.clear();
|
||||
m_status = -1;
|
||||
m_hadError = true;
|
||||
}
|
||||
}
|
66
shared/cpaster/fetcher.h
Normal file
@@ -0,0 +1,66 @@
|
||||
/***************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** Non-Open Source Usage
|
||||
**
|
||||
** Licensees may use this file in accordance with the Qt Beta Version
|
||||
** License Agreement, Agreement version 2.2 provided with the Software or,
|
||||
** alternatively, in accordance with the terms contained in a written
|
||||
** agreement between you and Nokia.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
**
|
||||
** Alternatively, this file may be used under the terms of the GNU General
|
||||
** Public License versions 2.0 or 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the packaging
|
||||
** of this file. Please review the following information to ensure GNU
|
||||
** General Public Licensing requirements will be met:
|
||||
**
|
||||
** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
|
||||
** http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt GPL Exception version
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
#ifndef FETCHER_H
|
||||
#define FETCHER_H
|
||||
|
||||
#include <QHttp>
|
||||
#include <QHttpResponseHeader>
|
||||
|
||||
#include <QString>
|
||||
|
||||
class Fetcher : public QHttp
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Fetcher(const QString &host);
|
||||
|
||||
int fetch(const QString &url);
|
||||
int fetch(int pasteID);
|
||||
|
||||
QByteArray &body() { return m_body; }
|
||||
|
||||
int status() { return m_status; }
|
||||
bool hadError() { return m_hadError; }
|
||||
|
||||
private slots:
|
||||
void gotRequestFinished(int id, bool error);
|
||||
void gotReadyRead(const QHttpResponseHeader &resp);
|
||||
|
||||
private:
|
||||
QString m_host;
|
||||
int m_status;
|
||||
bool m_hadError;
|
||||
QByteArray m_body;
|
||||
};
|
||||
|
||||
#endif // FETCHER_H
|
75
shared/cpaster/poster.cpp
Normal file
@@ -0,0 +1,75 @@
|
||||
/***************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** Non-Open Source Usage
|
||||
**
|
||||
** Licensees may use this file in accordance with the Qt Beta Version
|
||||
** License Agreement, Agreement version 2.2 provided with the Software or,
|
||||
** alternatively, in accordance with the terms contained in a written
|
||||
** agreement between you and Nokia.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
**
|
||||
** Alternatively, this file may be used under the terms of the GNU General
|
||||
** Public License versions 2.0 or 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the packaging
|
||||
** of this file. Please review the following information to ensure GNU
|
||||
** General Public Licensing requirements will be met:
|
||||
**
|
||||
** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
|
||||
** http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt GPL Exception version
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
#include "poster.h"
|
||||
#include "cgi.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QByteArray>
|
||||
#include <QDebug>
|
||||
|
||||
Poster::Poster(const QString &host)
|
||||
: QHttp(host)
|
||||
{
|
||||
m_status = 0;
|
||||
m_hadError = false;
|
||||
connect(this, SIGNAL(requestFinished(int,bool)), SLOT(gotRequestFinished(int,bool)));
|
||||
connect(this, SIGNAL(responseHeaderReceived(const QHttpResponseHeader &)), SLOT(gotResponseHeaderReceived(const QHttpResponseHeader &)));
|
||||
}
|
||||
|
||||
void Poster::post(const QString &description, const QString &comment,
|
||||
const QString &text, const QString &user)
|
||||
{
|
||||
|
||||
QByteArray data = "command=processcreate&submit=submit&highlight_type=0&description=";
|
||||
data += CGI::encodeURL(description).toLatin1();
|
||||
data += "&comment=";
|
||||
data += CGI::encodeURL(comment).toLatin1();
|
||||
data += "&code=";
|
||||
data += CGI::encodeURL(text).toLatin1();
|
||||
data += "&poster=";
|
||||
data += CGI::encodeURL(user).toLatin1();
|
||||
// qDebug("POST [%s]", data.constData());
|
||||
|
||||
QHttp::post("/", data);
|
||||
}
|
||||
|
||||
void Poster::gotRequestFinished(int, bool error)
|
||||
{
|
||||
m_hadError = error;
|
||||
QCoreApplication::exit(error ? -1 : 0); // ends event-loop
|
||||
}
|
||||
|
||||
void Poster::gotResponseHeaderReceived(const QHttpResponseHeader &resp)
|
||||
{
|
||||
m_url = resp.value("location");
|
||||
}
|
64
shared/cpaster/poster.h
Normal file
@@ -0,0 +1,64 @@
|
||||
/***************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** Non-Open Source Usage
|
||||
**
|
||||
** Licensees may use this file in accordance with the Qt Beta Version
|
||||
** License Agreement, Agreement version 2.2 provided with the Software or,
|
||||
** alternatively, in accordance with the terms contained in a written
|
||||
** agreement between you and Nokia.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
**
|
||||
** Alternatively, this file may be used under the terms of the GNU General
|
||||
** Public License versions 2.0 or 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the packaging
|
||||
** of this file. Please review the following information to ensure GNU
|
||||
** General Public Licensing requirements will be met:
|
||||
**
|
||||
** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
|
||||
** http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt GPL Exception version
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
#ifndef POSTER_H
|
||||
#define POSTER_H
|
||||
|
||||
#include <QHttp>
|
||||
#include <QHttpResponseHeader>
|
||||
|
||||
#include <QString>
|
||||
|
||||
class Poster : public QHttp
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Poster(const QString &host);
|
||||
|
||||
void post(const QString &description, const QString &comment,
|
||||
const QString &text, const QString &user);
|
||||
|
||||
QString pastedUrl() { return m_url; }
|
||||
int status() { return m_status; }
|
||||
bool hadError() { return m_hadError; }
|
||||
|
||||
private slots:
|
||||
void gotRequestFinished(int id, bool error);
|
||||
void gotResponseHeaderReceived(const QHttpResponseHeader &resp);
|
||||
|
||||
private:
|
||||
QString m_url;
|
||||
int m_status;
|
||||
bool m_hadError;
|
||||
};
|
||||
|
||||
#endif // POSTER_H
|
95
shared/cpaster/splitter.cpp
Normal file
@@ -0,0 +1,95 @@
|
||||
/***************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** Non-Open Source Usage
|
||||
**
|
||||
** Licensees may use this file in accordance with the Qt Beta Version
|
||||
** License Agreement, Agreement version 2.2 provided with the Software or,
|
||||
** alternatively, in accordance with the terms contained in a written
|
||||
** agreement between you and Nokia.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
**
|
||||
** Alternatively, this file may be used under the terms of the GNU General
|
||||
** Public License versions 2.0 or 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the packaging
|
||||
** of this file. Please review the following information to ensure GNU
|
||||
** General Public Licensing requirements will be met:
|
||||
**
|
||||
** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
|
||||
** http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt GPL Exception version
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
#include "splitter.h"
|
||||
#include <QRegExp>
|
||||
|
||||
FileDataList splitDiffToFiles(const QByteArray &data)
|
||||
{
|
||||
FileDataList ret;
|
||||
QString strData = data;
|
||||
QString splitExpression;
|
||||
|
||||
if (data.contains("==== ") && data.contains(" ====\n")) {
|
||||
// Perforce diff
|
||||
splitExpression = "==== ([^\\n\\r]+) - ([^\\n\\r]+) ====";
|
||||
|
||||
} else if (data.contains("--- ") && data.contains("\n+++ ")) {
|
||||
// Unified contextual diff
|
||||
splitExpression = "\\-\\-\\- ([^\\n\\r]*)"
|
||||
"\\n\\+\\+\\+ ([^\\n\\r]*)";
|
||||
|
||||
} else if (data.contains("*** ") && data.contains("\n--- ")) {
|
||||
// Copied contextual diff
|
||||
splitExpression = "\\*\\*\\* ([^\\n\\r]*) [0-9\\-]* [0-9:\\.]*[^\\n\\r]*"
|
||||
"\\n\\-\\-\\- ([^\\n\\r]*) [0-9\\-]* [0-9:\\.]*[^\\n\\r]*";
|
||||
|
||||
} else {
|
||||
ret.append(FileData("<not a diff>", data));
|
||||
return ret;
|
||||
}
|
||||
|
||||
int splitIndex = 0, previousSplit = -1;
|
||||
QRegExp splitExpr(splitExpression);
|
||||
QString filename, content;
|
||||
// The algorithm works like this:
|
||||
// On the first match we only get the filename of the first patch part
|
||||
// On the second match (if any) we get the diff content, and the name of the next file patch
|
||||
//
|
||||
|
||||
|
||||
while(-1 != (splitIndex = splitExpr.indexIn(strData,splitIndex))) {
|
||||
if (!filename.isEmpty()) {
|
||||
QString content = strData.mid(previousSplit, splitIndex - previousSplit);
|
||||
ret.append(FileData(filename, content.toLatin1()));
|
||||
}
|
||||
|
||||
// If the first index in not at the beginning of the file, then we know there's content
|
||||
// we're about to skip, which is common in commit diffs, so we get that content and give it
|
||||
// a 'fake' filename.
|
||||
if (previousSplit == -1 && splitIndex > 0 && filename.isEmpty()) {
|
||||
QString content = strData.left(splitIndex);
|
||||
ret.append(FileData("<Header information>", content.toLatin1()));
|
||||
}
|
||||
|
||||
filename = splitExpr.cap(1);
|
||||
previousSplit = splitIndex;
|
||||
++splitIndex;
|
||||
}
|
||||
// Append the last patch content
|
||||
if (!filename.isEmpty()) {
|
||||
QString content = strData.mid(previousSplit);
|
||||
ret.append(FileData(filename, content.toLatin1()));
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
53
shared/cpaster/splitter.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/***************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** Non-Open Source Usage
|
||||
**
|
||||
** Licensees may use this file in accordance with the Qt Beta Version
|
||||
** License Agreement, Agreement version 2.2 provided with the Software or,
|
||||
** alternatively, in accordance with the terms contained in a written
|
||||
** agreement between you and Nokia.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
**
|
||||
** Alternatively, this file may be used under the terms of the GNU General
|
||||
** Public License versions 2.0 or 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the packaging
|
||||
** of this file. Please review the following information to ensure GNU
|
||||
** General Public Licensing requirements will be met:
|
||||
**
|
||||
** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
|
||||
** http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt GPL Exception version
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
#ifndef SPLITTER_H
|
||||
#define SPLITTER_H
|
||||
|
||||
#include <QString>
|
||||
#include <QByteArray>
|
||||
#include <QList>
|
||||
|
||||
struct FileData
|
||||
{
|
||||
FileData(const QString &f, const QByteArray &c)
|
||||
{ filename = f; content = c; }
|
||||
|
||||
QString filename;
|
||||
QByteArray content;
|
||||
};
|
||||
|
||||
typedef QList<FileData> FileDataList;
|
||||
|
||||
FileDataList splitDiffToFiles(const QByteArray &data);
|
||||
|
||||
#endif // SPLITTER_H
|
185
shared/cpaster/view.cpp
Normal file
@@ -0,0 +1,185 @@
|
||||
/***************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Qt Software Information (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** Non-Open Source Usage
|
||||
**
|
||||
** Licensees may use this file in accordance with the Qt Beta Version
|
||||
** License Agreement, Agreement version 2.2 provided with the Software or,
|
||||
** alternatively, in accordance with the terms contained in a written
|
||||
** agreement between you and Nokia.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
**
|
||||
** Alternatively, this file may be used under the terms of the GNU General
|
||||
** Public License versions 2.0 or 3.0 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL included in the packaging
|
||||
** of this file. Please review the following information to ensure GNU
|
||||
** General Public Licensing requirements will be met:
|
||||
**
|
||||
** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
|
||||
** http://www.gnu.org/copyleft/gpl.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt GPL Exception version
|
||||
** 1.2, included in the file GPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
***************************************************************************/
|
||||
#include "view.h"
|
||||
|
||||
#include <QFontMetrics>
|
||||
#include <QPainter>
|
||||
#include <QScrollBar>
|
||||
#include <QPushButton>
|
||||
#include <QSettings>
|
||||
|
||||
// -------------------------------------------------------------------------------------------------
|
||||
class ColumnIndicatorTextEdit : public QTextEdit
|
||||
{
|
||||
public:
|
||||
ColumnIndicatorTextEdit(QWidget *parent) : QTextEdit(parent), m_columnIndicator(0)
|
||||
{
|
||||
QFont font;
|
||||
font.setFamily(QString::fromUtf8("Courier New"));
|
||||
//font.setPointSizeF(8.0);
|
||||
setFont(font);
|
||||
setReadOnly(true);
|
||||
QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
sizePolicy.setVerticalStretch(3);
|
||||
setSizePolicy(sizePolicy);
|
||||
int cmx = 0, cmy = 0, cmw = 0, cmh = 0;
|
||||
getContentsMargins(&cmx, &cmy, &cmw, &cmh);
|
||||
m_columnIndicator = QFontMetrics(font).width('W') * 100 + cmx + 1;
|
||||
m_columnIndicatorFont.setFamily(QString::fromUtf8("Times"));
|
||||
m_columnIndicatorFont.setPointSizeF(7.0);
|
||||
}
|
||||
|
||||
int m_columnIndicator;
|
||||
QFont m_columnIndicatorFont;
|
||||
|
||||
protected:
|
||||
virtual void paintEvent(QPaintEvent *event);
|
||||
};
|
||||
|
||||
void ColumnIndicatorTextEdit::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
QTextEdit::paintEvent(event);
|
||||
|
||||
QPainter p(viewport());
|
||||
p.setFont(m_columnIndicatorFont);
|
||||
p.setPen(QPen(QColor(0xa0, 0xa0, 0xa0, 0xa0)));
|
||||
p.drawLine(m_columnIndicator, 0, m_columnIndicator, viewport()->height());
|
||||
int yOffset = verticalScrollBar()->value();
|
||||
p.drawText(m_columnIndicator + 1, m_columnIndicatorFont.pointSize() - yOffset, "100");
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
View::View(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
m_ui.setupUi(this);
|
||||
|
||||
// Swap out the Patch View widget with a ColumnIndicatorTextEdit, which will indicate column 100
|
||||
delete m_ui.uiPatchView;
|
||||
m_ui.uiPatchView = new ColumnIndicatorTextEdit(m_ui.groupBox);
|
||||
m_ui.vboxLayout1->addWidget(m_ui.uiPatchView);
|
||||
m_ui.buttonBox->button(QDialogButtonBox::Ok)->setText("Paste");
|
||||
connect(m_ui.uiPatchList, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(contentChanged()));
|
||||
}
|
||||
|
||||
View::~View()
|
||||
{
|
||||
}
|
||||
|
||||
QString View::getUser()
|
||||
{
|
||||
const QString username = m_ui.uiUsername->text();
|
||||
if (username.isEmpty() || username == "<Username>")
|
||||
return "Anonymous";
|
||||
return username;
|
||||
}
|
||||
|
||||
QString View::getDescription()
|
||||
{
|
||||
const QString description = m_ui.uiDescription->text();
|
||||
if (description == "<Description>")
|
||||
return QString();
|
||||
return description;
|
||||
}
|
||||
|
||||
QString View::getComment()
|
||||
{
|
||||
const QString comment = m_ui.uiComment->toPlainText();
|
||||
if (comment == "<Comment>")
|
||||
return QString();
|
||||
return comment;
|
||||
}
|
||||
|
||||
QByteArray View::getContent()
|
||||
{
|
||||
QByteArray newContent;
|
||||
for(int i = 0; i < m_ui.uiPatchList->count(); ++i) {
|
||||
QListWidgetItem *item = m_ui.uiPatchList->item(i);
|
||||
if (item->checkState() != Qt::Unchecked)
|
||||
newContent += m_parts.at(i).content;
|
||||
}
|
||||
return newContent;
|
||||
}
|
||||
|
||||
void View::contentChanged()
|
||||
{
|
||||
m_ui.uiPatchView->setPlainText(getContent());
|
||||
}
|
||||
|
||||
int View::show(const QString &user, const QString &description, const QString &comment,
|
||||
const FileDataList &parts)
|
||||
{
|
||||
if (user.isEmpty())
|
||||
m_ui.uiUsername->setText("<Username>");
|
||||
else
|
||||
m_ui.uiUsername->setText(user);
|
||||
|
||||
if (description.isEmpty())
|
||||
m_ui.uiDescription->setText("<Description>");
|
||||
else
|
||||
m_ui.uiDescription->setText(description);
|
||||
|
||||
if (comment.isEmpty())
|
||||
m_ui.uiComment->setPlainText("<Comment>");
|
||||
else
|
||||
m_ui.uiComment->setPlainText(comment);
|
||||
|
||||
QByteArray content;
|
||||
m_parts = parts;
|
||||
m_ui.uiPatchList->clear();
|
||||
foreach(const FileData part, parts) {
|
||||
QListWidgetItem *itm = new QListWidgetItem(part.filename, m_ui.uiPatchList);
|
||||
itm->setCheckState(Qt::Checked);
|
||||
itm->setFlags(Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
|
||||
content += part.content;
|
||||
}
|
||||
m_ui.uiPatchView->setPlainText(content);
|
||||
|
||||
m_ui.uiDescription->setFocus();
|
||||
m_ui.uiDescription->selectAll();
|
||||
|
||||
// (Re)store dialog size
|
||||
QSettings settings("Trolltech", "cpaster");
|
||||
int h = settings.value("/gui/height", height()).toInt();
|
||||
int w = settings.value("/gui/width",
|
||||
((ColumnIndicatorTextEdit*)m_ui.uiPatchView)->m_columnIndicator + 50)
|
||||
.toInt();
|
||||
resize(w, h);
|
||||
int ret = QDialog::exec();
|
||||
settings.setValue("/gui/height", height());
|
||||
settings.setValue("/gui/width", width());
|
||||
|
||||
return ret;
|
||||
}
|