diff options
Diffstat (limited to 'tqtinterface/qt4/tools/qtconfig')
17 files changed, 0 insertions, 5661 deletions
diff --git a/tqtinterface/qt4/tools/qtconfig/LICENSE.GPL b/tqtinterface/qt4/tools/qtconfig/LICENSE.GPL deleted file mode 100644 index 3221c03..0000000 --- a/tqtinterface/qt4/tools/qtconfig/LICENSE.GPL +++ /dev/null @@ -1,280 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS diff --git a/tqtinterface/qt4/tools/qtconfig/colorbutton.cpp b/tqtinterface/qt4/tools/qtconfig/colorbutton.cpp deleted file mode 100644 index bab9b97..0000000 --- a/tqtinterface/qt4/tools/qtconfig/colorbutton.cpp +++ /dev/null @@ -1,177 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2008 Trolltech ASA. All rights reserved. -** -** This file is part of TQt Configuration. -** -** 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 files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at [email protected]. -** -** Licensees holding valid TQt Commercial licenses may use this file in -** accordance with the TQt Commercial License Agreement provided with -** the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#include "colorbutton.h" - -#include <tqapplication.h> -#include <tqcolordialog.h> -#include <tqpainter.h> -#include <tqdragobject.h> -#include <tqstyle.h> - - -ColorButton::ColorButton(TQWidget *parent, const char *name) - : TQButton(parent, name), mousepressed(FALSE) -{ - setAcceptDrops(TRUE); - col = Qt::black; - connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(changeColor())); -} - - -ColorButton::ColorButton(const TQColor &c, TQWidget *parent, const char *name) - : TQButton(parent, name) -{ - setAcceptDrops(TRUE); - col = c; - connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(changeColor())); -} - - -void ColorButton::setColor(const TQColor &c) -{ - col = c; - update(); -} - - -void ColorButton::changeColor() -{ - TQColor c = TQColorDialog::getColor(col, TQT_TQWIDGET(tqApp->activeWindow())); - - if (c.isValid()) { - setColor(c); - emit colorChanged(color()); - } -} - - -TQSize ColorButton::tqsizeHint() const -{ - return TQSize(40, 25); -} - - -TQSize ColorButton::tqminimumSizeHint() const -{ - return TQSize(40, 25); -} - - -void ColorButton::drawButton(TQPainter *p) -{ - tqstyle().tqdrawPrimitive(TQStyle::PE_ButtonBevel, p, rect(), tqcolorGroup(), - isDown() ? TQStyle::Style_Down : TQStyle::Style_Raised); - drawButtonLabel(p); - - if (hasFocus()) - tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, p, - tqstyle().subRect(TQStyle::SR_PushButtonFocusRect, this), - tqcolorGroup(), TQStyle::Style_Default); -} - - -void ColorButton::drawButtonLabel(TQPainter *p) -{ - TQColor pen = (isEnabled() ? - (hasFocus() ? tqpalette().active().buttonText() : - tqpalette().inactive().buttonText()) - : tqpalette().disabled().buttonText()); - p->setPen( pen ); - p->setBrush(col); - p->drawRect(width() / 4, height() / 4, width() / 2, height() / 2); -} - - -void ColorButton::dragEnterEvent(TQDragEnterEvent *e) -{ - if (! TQColorDrag::canDecode(e)) { - e->ignore(); - return; - } -} - - -void ColorButton::dragMoveEvent(TQDragMoveEvent *e) -{ - if (! TQColorDrag::canDecode(e)) { - e->ignore(); - return; - } - - e->accept(); -} - - -void ColorButton::dropEvent(TQDropEvent *e) -{ - if (! TQColorDrag::canDecode(e)) { - e->ignore(); - return; - } - - TQColor c; - TQColorDrag::decode(e, c); - setColor(c); - emit colorChanged(color()); -} - - -void ColorButton::mousePressEvent(TQMouseEvent *e) -{ - presspos = e->pos(); - mousepressed = TRUE; - TQButton::mousePressEvent(e); -} - - -void ColorButton::mouseReleaseEvent(TQMouseEvent *e) -{ - mousepressed = FALSE; - TQButton::mouseReleaseEvent(e); -} - - -void ColorButton::mouseMoveEvent(TQMouseEvent *e) -{ - if (! mousepressed) - return; - - if ((presspos - e->pos()).manhattanLength() > TQApplication::startDragDistance()) { - mousepressed = FALSE; - setDown(FALSE); - - TQColorDrag *cd = new TQColorDrag(color(), this); - cd->dragCopy(); - } -} diff --git a/tqtinterface/qt4/tools/qtconfig/colorbutton.h b/tqtinterface/qt4/tools/qtconfig/colorbutton.h deleted file mode 100644 index 451c6df..0000000 --- a/tqtinterface/qt4/tools/qtconfig/colorbutton.h +++ /dev/null @@ -1,83 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2008 Trolltech ASA. All rights reserved. -** -** This file is part of TQt Configuration. -** -** 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 files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at [email protected]. -** -** Licensees holding valid TQt Commercial licenses may use this file in -** accordance with the TQt Commercial License Agreement provided with -** the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef COLORBUTTON_H -#define COLORBUTTON_H - -#include <tqbutton.h> - - -class ColorButton : public TQButton -{ - Q_OBJECT - TQ_OBJECT - -public: - ColorButton(TQWidget *, const char * = 0); - ColorButton(const TQColor &, TQWidget *, const char * = 0); - - const TQColor &color() const { return col; } - - void setColor(const TQColor &); - TQSize tqsizeHint() const; - TQSize tqminimumSizeHint() const; - - void mousePressEvent(TQMouseEvent *); - void mouseReleaseEvent(TQMouseEvent *); - void mouseMoveEvent(TQMouseEvent *); - void dragEnterEvent(TQDragEnterEvent *); - void dragMoveEvent(TQDragMoveEvent *); - void dropEvent(TQDropEvent *); - - -Q_SIGNALS: - void colorChanged(const TQColor &); - - -protected: - void drawButton(TQPainter *); - void drawButtonLabel(TQPainter *); - - -private Q_SLOTS: - void changeColor(); - - -private: - TQColor col; - TQPoint presspos; - bool mousepressed; -}; - - -#endif // COLORBUTTON_H diff --git a/tqtinterface/qt4/tools/qtconfig/images/appicon.png b/tqtinterface/qt4/tools/qtconfig/images/appicon.png Binary files differdeleted file mode 100644 index 0cb2b68..0000000 --- a/tqtinterface/qt4/tools/qtconfig/images/appicon.png +++ /dev/null diff --git a/tqtinterface/qt4/tools/qtconfig/main.cpp b/tqtinterface/qt4/tools/qtconfig/main.cpp deleted file mode 100644 index ef8bbb5..0000000 --- a/tqtinterface/qt4/tools/qtconfig/main.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/********************************************************************** -** Copyright (C) 2005-2008 Trolltech ASA. All rights reserved. -** -** This file is part of TQt Configuration. -** -** 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 files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at [email protected]. -** -** Licensees holding valid TQt Commercial licenses may use this file in -** accordance with the TQt Commercial License Agreement provided with -** the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#include "mainwindow.h" -#include <tqapplication.h> - - -int main(int argc, char **argv) -{ - TQApplication app(argc, argv); - MainWindow mw; - app.setMainWidget(&mw); - mw.show(); - return app.exec(); -} diff --git a/tqtinterface/qt4/tools/qtconfig/mainwindow.cpp b/tqtinterface/qt4/tools/qtconfig/mainwindow.cpp deleted file mode 100644 index 42e7033..0000000 --- a/tqtinterface/qt4/tools/qtconfig/mainwindow.cpp +++ /dev/null @@ -1,1142 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2008 Trolltech ASA. All rights reserved. -** -** This file is part of TQt Configuration. -** -** 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 files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at [email protected]. -** -** Licensees holding valid TQt Commercial licenses may use this file in -** accordance with the TQt Commercial License Agreement provided with -** the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#include "mainwindow.h" -#include "colorbutton.h" -#include "previewframe.h" -#include "paletteeditoradvanced.h" - -#include <tqlabel.h> -#include <tqapplication.h> -#include <tqcombobox.h> -#include <tqstylefactory.h> -#include <tqinputcontextfactory.h> -#include <tqobjectlist.h> -#include <tqfontdatabase.h> -#include <tqlineedit.h> -#include <tqlistbox.h> -#include <tqspinbox.h> -#include <tqcheckbox.h> -#include <tqfiledialog.h> -#include <tqaction.h> -#include <tqstatusbar.h> -#include <tqsettings.h> -#include <tqmessagebox.h> -#include <tqtextview.h> -#include <tqstyle.h> - -#include <stdlib.h> - - -// from qapplication.cpp and qapplication_x11.cpp - These are NOT for -// external use ignore them -extern bool TQ_EXPORT qt_resolve_symlinks; - - -static const char *appearance_text = -"<p><b><font size+=2>Appearance</font></b></p>" -"<hr>" -"<p>Use this tab to customize the appearance of your TQt applications.</p>" -"<p>You can select the default GUI Style from the drop down list and " -"customize the colors.</p>" -"<p>Any GUI Style plugins in your plugin path will automatically be added " -"to the list of built-in TQt styles. (See the Library Paths tab for " -"information on adding new plugin paths.)</p>" -"<p>When you choose 3-D Effects and Background colors, the TQt Configuration " -"program will automatically generate a palette for you. To customize " -"colors further, press the Tune Palette button to open the advanced " -"palette editor." -"<p>The Preview Window shows what the selected Style and colors look " -"like."; - -static const char *font_text = -"<p><b><font size+=2>Fonts</font></b></p>" -"<hr>" -"<p>Use this tab to select the default font for your TQt applications. " -"The selected font is shown (initially as 'Sample Text') in the line " -"edit below the Family, " -"Style and Point Size drop down lists.</p>" -"<p>TQt has a powerful font substitution feature that allows you to " -"specify a list of substitute fonts. Substitute fonts are used " -"when a font cannot be loaded, or if the specified font doesn't have " -"a particular character." -"<p>For example, if you select the font Lucida, which doesn't have Korean " -"characters, but need to show some Korean text using the Mincho font family " -"you can do so by adding Mincho to the list. Once Mincho is added, any " -"Korean characters that are not found in the Lucida font will be taken " -"from the Mincho font. Because the font substitutions are " -"lists, you can also select multiple families, such as Song Ti (for " -"use with Chinese text)."; - -static const char *interface_text = -"<p><b><font size+=2>Interface</font></b></p>" -"<hr>" -"<p>Use this tab to customize the feel of your TQt applications.</p>" -"<p>If the Resolve Symlinks checkbox is checked TQt will follow symlinks " -"when handling URLs. For example, in the file dialog, if this setting is turned " -"on and /usr/tmp is a symlink to /var/tmp, entering the /usr/tmp directory " -"will cause the file dialog to change to /var/tmp. With this setting turned " -"off, symlinks are not resolved or followed.</p>" -"<p>The Global Strut setting is useful for people who require a " -"minimum size for all widgets (e.g. when using a touch panel or for users " -"who are visually impaired). Leaving the Global Strut width and height " -"at 0 will disable the Global Strut feature</p>" -"<p>XIM (Extended Input Methods) are used for entering characters in " -"languages that have large character sets, for example, Chinese and " -"Japanese."; -// ### What does the 'Enhanced support for languages written R2L do? - -static const char *libpath_text = -"<p><b><font size+=2>Library Paths</font></b></p>" -"<hr>" -"<p>Use this tab to select additional directories where TQt should search " -"for component plugins." -"<p>These directories should be the base directory of where your plugins " -"are stored. For example, if you wish to store GUI Style plugins in " -"$HOME/plugins/styles and TQt Designer plugins in $HOME/plugins/designer, " -"you would add $HOME/plugins to your Library Path. <p>Notes:" -"<ul><li>The TQt Configuration program does <i>not</i> support environment " -"variables, so you must give full path names, for example " -"<tt>/home/brad/myplugins</tt> not <tt>$HOME/myplugins</tt>" -"<li> TQt automatically " -"searches in the directory where you installed TQt for component plugins. " -"Removing that path is not possible.</ul>"; - -static const char *printer_text = -"<p><b><font size+=2>Printer</font></b></p>" -"<hr>" -"<p>Use this tab to configure the way TQt generates output for the printer." -"You can specify if TQt should try to embed fonts into its generated output." -"If you enable font embedding, the resulting postscript will be more " -"portable and will more accurately reflect the " -"visual output on the screen; however the resulting postscript file " -"size will be bigger." -"<p>When using font embedding you can select additional directories where " -"TQt should search for embeddable font files. By default, the X " -"server font path is used."; - -static const char *about_text = -"<p><b><font size=+2>TQt Configuration</font></b></p>" -"<p>A graphical configuration tool for programs using TQt</p>" -"<p>Version 1.0</p>" -"<p>Copyright (C) 2010 Timothy Pearson. All rights reserved.<br>" -"Copyright (C) 2001-2008 Trolltech ASA. All rights reserved.</p>" -"<p></p>" -"<p>This program is licensed to you under the terms of the GNU General " -"Public License Version 2 as published by the Free Software Foundation. This " -"gives you legal permission to copy, distribute and/or modify this software " -"under certain conditions. For details, see the file 'LICENSE.GPL' that came with " -"this software distribution. If you did not get the file, send email to " -"[email protected].</p>\n\n<p>The program is provided AS IS with NO WARRANTY " -"OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS " -"FOR A PARTICULAR PURPOSE.</p>"; - - -static TQColorGroup::ColorRole centralFromItem( int item ) -{ - switch( item ) { - case 0: return TQColorGroup::Background; - case 1: return TQColorGroup::Foreground; - case 2: return TQColorGroup::Button; - case 3: return TQColorGroup::Base; - case 4: return TQColorGroup::Text; - case 5: return TQColorGroup::BrightText; - case 6: return TQColorGroup::ButtonText; - case 7: return TQColorGroup::Highlight; - case 8: return TQColorGroup::HighlightedText; - default: return TQColorGroup::NColorRoles; - } -} - - -static TQColorGroup::ColorRole effectFromItem( int item ) -{ - switch( item ) { - case 0: return TQColorGroup::Light; - case 1: return TQColorGroup::Midlight; - case 2: return TQColorGroup::Mid; - case 3: return TQColorGroup::Dark; - case 4: return TQColorGroup::Shadow; - default: return TQColorGroup::NColorRoles; - } -} - - -static void setStyleHelper(TQWidget *w, TQStyle *s) -{ - w->unsetPalette(); - w->setStyle(s); - - if (w->childrenListObject().isEmpty()) - return; - - TQPtrListIterator<TQObject> childit(w->childrenListObject()); - TQObject *child; - while ((child = childit.current()) != 0) { - ++childit; - - if (child->isWidgetType()) - setStyleHelper((TQWidget *) child, s); - } -} - - -MainWindow::MainWindow() - : MainWindowBase(0, "main window"), - editPalette(tqpalette()), previewPalette(tqpalette()), previewstyle(0) -{ - modified = TRUE; - - TQStringList gstyles = TQStyleFactory::keys(); - gstyles.sort(); - gstylecombo->insertStringList(gstyles); - - TQSettings settings; - TQString currentstyle = settings.readEntry("/qt/style"); - if (currentstyle.isNull()) - currentstyle = TQApplication::tqstyle().className(); - { - int s = 0; - TQStringList::Iterator git = gstyles.begin(); - while (git != gstyles.end()) { - if (*git == currentstyle) - break; - s++; - git++; - } - - if (s < gstylecombo->count()) { - gstylecombo->setCurrentItem(s); - } else { - // no predefined style, try to find the closest match - // class names usually contain the name of the style, so we - // iterate over the items in the combobox, and use the one whose - // name is contained in the classname of the style - s = 0; - git = gstyles.begin(); - while (git != gstyles.end()) { - if (currentstyle.contains(*git)) - break; - s++; - git++; - } - - if (s < gstylecombo->count()) { - gstylecombo->setCurrentItem(s); - } else { - // we give up - gstylecombo->insertItem("Unknown"); - gstylecombo->setCurrentItem(gstylecombo->count() - 1); - } - } - } - - buttonMainColor->setColor(tqpalette().color(TQPalette::Active, - TQColorGroup::Button)); - buttonMainColor2->setColor(tqpalette().color(TQPalette::Active, - TQColorGroup::Background)); - - TQFontDatabase db; - TQStringList families = TQT_TQSTRINGLIST_OBJECT(db.families()); - familycombo->insertStringList(families); - - TQStringList fs = families; - TQStringList fs2 = TQT_TQSTRINGLIST_OBJECT(TQFont::substitutions()); - TQStringList::Iterator fsit = fs2.begin(); - while (fsit != fs2.end()) { - if (! fs.contains(*fsit)) - fs += *fsit; - fsit++; - } - fs.sort(); - familysubcombo->insertStringList(fs); - - choosesubcombo->insertStringList(families); - TQValueList<int> sizes = db.tqstandardSizes(); - TQValueList<int>::Iterator it = sizes.begin(); - while (it != sizes.end()) - psizecombo->insertItem(TQString::number(*it++)); - - dcispin->setValue(TQApplication::doubleClickInterval()); - cfispin->setValue(TQApplication::cursorFlashTime()); - wslspin->setValue(TQApplication::wheelScrollLines()); - resolvelinks->setChecked(qt_resolve_symlinks); - - effectcheckbox->setChecked(TQApplication::isEffectEnabled(Qt::UI_General)); - effectbase->setEnabled(effectcheckbox->isChecked()); - - if (TQApplication::isEffectEnabled(Qt::UI_FadeMenu)) - menueffect->setCurrentItem(2); - else if (TQApplication::isEffectEnabled(Qt::UI_AnimateMenu)) - menueffect->setCurrentItem(1); - - if (TQApplication::isEffectEnabled(Qt::UI_AnimateCombo)) - comboeffect->setCurrentItem(1); - - if (TQApplication::isEffectEnabled(Qt::UI_FadeTooltip)) - tooltipeffect->setCurrentItem(2); - else if (TQApplication::isEffectEnabled(Qt::UI_AnimateTooltip)) - tooltipeffect->setCurrentItem(1); - - if ( TQApplication::isEffectEnabled( Qt::UI_AnimateToolBox ) ) - toolboxeffect->setCurrentItem( 1 ); - - TQSize globalStrut = TQApplication::globalStrut(); - strutwidth->setValue(globalStrut.width()); - strutheight->setValue(globalStrut.height()); - - libpathlistbox->clear(); - libpathlistbox->insertStringList(TQApplication::libraryPaths()); - - // find the default family - TQStringList::Iterator sit = families.begin(); - int i = 0, possible = -1; - while (sit != families.end()) { - if (*sit == TQApplication::font().family()) - break; - if ((*sit).contains(TQApplication::font().family())) - possible = i; - - i++; - sit++; - } - if (sit == families.end()) - i = possible; - if (i == -1) // no clue about the current font - i = 0; - - familycombo->setCurrentItem(i); - - TQStringList styles = TQT_TQSTRINGLIST_OBJECT(db.styles(familycombo->currentText())); - stylecombo->insertStringList(styles); - - TQString stylestring = db.styleString(TQApplication::font()); - sit = styles.begin(); - i = 0; - possible = -1; - while (sit != styles.end()) { - if (*sit == stylestring) - break; - if ((*sit).contains(stylestring)) - possible = i; - - i++; - sit++; - } - if (sit == styles.end()) - i = possible; - if (i == -1) // no clue about the current font - i = 0; - stylecombo->setCurrentItem(i); - - i = 0; - while (i < psizecombo->count()) { - if (psizecombo->text(i) == TQString::number(TQApplication::font().pointSize())) { - psizecombo->setCurrentItem(i); - break; - } - - i++; - } - - TQStringList subs = TQT_TQSTRINGLIST_OBJECT(TQFont::substitutes(familysubcombo->currentText())); - sublistbox->clear(); - sublistbox->insertStringList(subs); - - rtlExtensions->setChecked( settings.readBoolEntry( "/qt/useRtlExtensions", FALSE ) ); - -#if defined(TQ_WS_X11) - inputStyle->setCurrentText( settings.readEntry( "/qt/XIMInputStyle", trUtf8( "On The Spot" ) ) ); -#else - inputStyle->hide(); - inputStyleLabel->hide(); -#endif - -#if defined(TQ_WS_X11) && !defined(TQT_NO_IM_EXTENSIONS) - /* - This code makes it possible to set up default input method. - - The list of identifier names of input method which can be used - is acquired using TQInputContextFactory::keys(). And it is - translated to display name and set to inputMethodCombo which - displays the list of input method. - */ - inputMethodIdentifiers = TQInputContextFactory::keys(); - TQStringList imDispNames; - { - // input method switcher should named with "imsw-" prefix to - // prevent to be listed in ordinary input method list. - TQStringList::Iterator imIt = inputMethodIdentifiers.begin(); - while (imIt != inputMethodIdentifiers.end()) { - if ((*imIt).find("imsw-") == 0) - imIt = inputMethodIdentifiers.remove(imIt); - else - imIt++; - } - // we should not sort the list - //inputMethodIdentifiers.sort(); - for (imIt = inputMethodIdentifiers.begin(); - imIt != inputMethodIdentifiers.end(); - imIt++) { - TQString dispName = TQInputContextFactory::displayName(*imIt); - if (dispName.isNull() || dispName.isEmpty()) - dispName = *imIt; - imDispNames << dispName; - } - } - //inputMethodCombo->insertStringList(inputMethodIdentifiers); - inputMethodCombo->insertStringList(imDispNames); - - /* - input method set up as a default in the past is chosen. - If nothing is set up, default input method in the platform is chosen. - */ - // default input method is XIM in X11. - TQString currentIM = settings.readEntry("/qt/DefaultInputMethod", "xim"); - { - int index = inputMethodIdentifiers.findIndex(currentIM); - // set up Selected input method. - if (0 <= index && index < inputMethodIdentifiers.count()) { - inputMethodCombo->setCurrentItem(index); - } else { - // Give up. this part is executed when specified IM is not - // installed. - TQString dispName = tr("Unknown Input Method") + " (" + currentIM + ")"; - inputMethodCombo->insertItem(dispName); - inputMethodCombo->setCurrentItem(inputMethodCombo->count() - 1); - inputMethodIdentifiers << currentIM; - } - } -#else - inputMethodCombo->hide(); - inputMethodLabel->hide(); -#endif - - fontembeddingcheckbox->setChecked( settings.readBoolEntry("/qt/embedFonts", TRUE) ); - fontpaths = settings.readListEntry("/qt/fontPath", ':'); - fontpathlistbox->insertStringList(fontpaths); - - setModified(FALSE); -} - - -MainWindow::~MainWindow() -{ -} - - -void MainWindow::fileSave() -{ - if (! modified) { - statusBar()->message("No changes to be saved.", 2000); - return; - } - - statusBar()->message("Saving changes..."); - - { - TQSettings settings; - TQFontDatabase db; - TQFont font = db.font(familycombo->currentText(), - stylecombo->currentText(), - psizecombo->currentText().toInt()); - TQStringList actcg, inactcg, discg; - - int i; - for (i = 0; i < TQColorGroup::NColorRoles; i++) - actcg << editPalette.color(TQPalette::Active, - (TQColorGroup::ColorRole) i).name(); - for (i = 0; i < TQColorGroup::NColorRoles; i++) - inactcg << editPalette.color(TQPalette::Inactive, - (TQColorGroup::ColorRole) i).name(); - for (i = 0; i < TQColorGroup::NColorRoles; i++) - discg << editPalette.color(TQPalette::Disabled, - (TQColorGroup::ColorRole) i).name(); - - settings.writeEntry("/qt/font", font.toString()); - settings.writeEntry("/qt/Palette/active", actcg); - settings.writeEntry("/qt/Palette/inactive", inactcg); - settings.writeEntry("/qt/Palette/disabled", discg); - - TQStringList libpath = TQApplication::libraryPaths(); - TQString libpathkey = - TQString("/qt/%1.%2/libraryPath").arg( TQT_VERSION >> 16 ).arg( (TQT_VERSION & 0xff00 ) >> 8 ); - settings.writeEntry(libpathkey, libpath, ':'); - settings.writeEntry("/qt/fontPath", fontpaths, ':'); - settings.writeEntry("/qt/embedFonts", fontembeddingcheckbox->isChecked() ); - settings.writeEntry("/qt/style", gstylecombo->currentText()); - settings.writeEntry("/qt/doubleClickInterval", - dcispin->value()); - settings.writeEntry("/qt/cursorFlashTime", cfispin->value() == 9 ? 0 : cfispin->value() ); - settings.writeEntry("/qt/wheelScrollLines", wslspin->value()); - settings.writeEntry("/qt/resolveSymlinks", resolvelinks->isChecked()); - - TQStringList strut; - strut << TQString::number(strutwidth->value()); - strut << TQString::number(strutheight->value()); - settings.writeEntry("/qt/globalStrut", strut); - - settings.writeEntry("/qt/useRtlExtensions", rtlExtensions->isChecked() ); - -#ifdef TQ_WS_X11 - TQString style = inputStyle->currentText(); - TQString str = "On The Spot"; - if ( style == trUtf8( "Over The Spot" ) ) - str = "Over The Spot"; - else if ( style == trUtf8( "Off The Spot" ) ) - str = "Off The Spot"; - else if ( style == trUtf8( "Root" ) ) - str = "Root"; - settings.writeEntry( "/qt/XIMInputStyle", inputStyle->currentText() ); - -#if !defined(TQT_NO_IM_EXTENSIONS) - TQString imSwitcher = settings.readEntry("/qt/DefaultInputMethodSwitcher", "imsw-multi"); - settings.writeEntry("/qt/DefaultInputMethodSwitcher", imSwitcher); - int imIndex = inputMethodCombo->currentItem(); - settings.writeEntry("/qt/DefaultInputMethod", inputMethodIdentifiers[imIndex]); -#endif -#endif - - TQStringList effects; - if (effectcheckbox->isChecked()) { - effects << "general"; - - switch (menueffect->currentItem()) { - case 1: effects << "animatemenu"; break; - case 2: effects << "fademenu"; break; - } - - switch (comboeffect->currentItem()) { - case 1: effects << "animatecombo"; break; - } - - switch (tooltipeffect->currentItem()) { - case 1: effects << "animatetooltip"; break; - case 2: effects << "fadetooltip"; break; - } - - switch ( toolboxeffect->currentItem() ) { - case 1: effects << "animatetoolbox"; break; - } - } else - effects << "none"; - settings.writeEntry("/qt/GUIEffects", effects); - - TQStringList familysubs = TQT_TQSTRINGLIST_OBJECT(TQFont::substitutions()); - TQStringList::Iterator fit = familysubs.begin(); - while (fit != familysubs.end()) { - TQStringList subs = TQT_TQSTRINGLIST_OBJECT(TQFont::substitutes(*fit)); - settings.writeEntry("/qt/Font Substitutions/" + *fit, subs); - fit++; - } - } - -#if defined(TQ_WS_X11) - TQApplication::x11_apply_settings(); -#endif // TQ_WS_X11 - - setModified(FALSE); - statusBar()->message("Saved changes."); -} - - -void MainWindow::fileExit() -{ - tqApp->closeAllWindows(); -} - - -void MainWindow::setModified(bool m) -{ - if (modified == m) - return; - - modified = m; - fileSaveAction->setEnabled(m); -} - - -void MainWindow::buildPalette() -{ - int i; - TQColorGroup cg; - TQColor btn = buttonMainColor->color(); - TQColor back = buttonMainColor2->color(); - TQPalette automake( btn, back ); - - for (i = 0; i<9; i++) - cg.setColor( centralFromItem(i), automake.active().color( centralFromItem(i) ) ); - - editPalette.setActive( cg ); - buildActiveEffect(); - - cg = editPalette.inactive(); - - TQPalette temp( editPalette.active().color( TQColorGroup::Button ), - editPalette.active().color( TQColorGroup::Background ) ); - - for (i = 0; i<9; i++) - cg.setColor( centralFromItem(i), temp.inactive().color( centralFromItem(i) ) ); - - editPalette.setInactive( cg ); - buildInactiveEffect(); - - cg = editPalette.disabled(); - - for (i = 0; i<9; i++) - cg.setColor( centralFromItem(i), temp.disabled().color( centralFromItem(i) ) ); - - editPalette.setDisabled( cg ); - buildDisabledEffect(); - - updateColorButtons(); - - setModified(TRUE); -} - - -void MainWindow::buildActiveEffect() -{ - TQColorGroup cg = editPalette.active(); - TQColor btn = cg.color( TQColorGroup::Button ); - - TQPalette temp( btn, btn ); - - for (int i = 0; i<5; i++) - cg.setColor( effectFromItem(i), temp.active().color( effectFromItem(i) ) ); - - editPalette.setActive( cg ); - setPreviewPalette( editPalette ); - - updateColorButtons(); -} - - -void MainWindow::buildInactive() -{ - editPalette.setInactive( editPalette.active() ); - buildInactiveEffect(); -} - - -void MainWindow::buildInactiveEffect() -{ - TQColorGroup cg = editPalette.inactive(); - - TQColor light, midlight, mid, dark, shadow; - TQColor btn = cg.color( TQColorGroup::Button ); - - light = btn.light(150); - midlight = btn.light(115); - mid = btn.dark(150); - dark = btn.dark(); - shadow = Qt::black; - - cg.setColor( TQColorGroup::Light, light ); - cg.setColor( TQColorGroup::Midlight, midlight ); - cg.setColor( TQColorGroup::Mid, mid ); - cg.setColor( TQColorGroup::Dark, dark ); - cg.setColor( TQColorGroup::Shadow, shadow ); - - editPalette.setInactive( cg ); - setPreviewPalette( editPalette ); - updateColorButtons(); -} - - -void MainWindow::buildDisabled() -{ - TQColorGroup cg = editPalette.active(); - cg.setColor( TQColorGroup::ButtonText, Qt::darkGray ); - cg.setColor( TQColorGroup::Foreground, Qt::darkGray ); - cg.setColor( TQColorGroup::Text, Qt::darkGray ); - cg.setColor( TQColorGroup::HighlightedText, Qt::darkGray ); - editPalette.setDisabled( cg ); - - buildDisabledEffect(); -} - - -void MainWindow::buildDisabledEffect() -{ - TQColorGroup cg = editPalette.disabled(); - - TQColor light, midlight, mid, dark, shadow; - TQColor btn = cg.color( TQColorGroup::Button ); - - light = btn.light(150); - midlight = btn.light(115); - mid = btn.dark(150); - dark = btn.dark(); - shadow = Qt::black; - - cg.setColor( TQColorGroup::Light, light ); - cg.setColor( TQColorGroup::Midlight, midlight ); - cg.setColor( TQColorGroup::Mid, mid ); - cg.setColor( TQColorGroup::Dark, dark ); - cg.setColor( TQColorGroup::Shadow, shadow ); - - editPalette.setDisabled( cg ); - setPreviewPalette( editPalette ); - updateColorButtons(); -} - - -void MainWindow::setPreviewPalette( const TQPalette& pal ) -{ - TQColorGroup cg; - - switch (paletteCombo->currentItem()) { - case 0: - default: - cg = pal.active(); - break; - case 1: - cg = pal.inactive(); - break; - case 2: - cg = pal.disabled(); - break; - } - previewPalette.setActive( cg ); - previewPalette.setInactive( cg ); - previewPalette.setDisabled( cg ); - - previewFrame->setPreviewPalette(previewPalette); -} - - -void MainWindow::updateColorButtons() -{ - buttonMainColor->setColor( editPalette.active().color( TQColorGroup::Button )); - buttonMainColor2->setColor( editPalette.active().color( TQColorGroup::Background )); -} - - -void MainWindow::tunePalette() -{ - bool ok; - TQPalette pal = PaletteEditorAdvanced::getPalette(&ok, editPalette, - backgroundMode(), this); - if (! ok) - return; - - editPalette = pal; - setPreviewPalette(editPalette); - setModified(TRUE); -} - - -void MainWindow::paletteSelected(int) -{ - setPreviewPalette(editPalette); -} - - -void MainWindow::styleSelected(const TQString &stylename) -{ - TQStyle *style = TQStyleFactory::create(stylename); - if (! style) - return; - - setStyleHelper(previewFrame, style); - delete previewstyle; - previewstyle = style; - - setModified(TRUE); -} - - -void MainWindow::familySelected(const TQString &family) -{ - TQFontDatabase db; - TQStringList styles = TQT_TQSTRINGLIST_OBJECT(db.styles(family)); - stylecombo->clear(); - stylecombo->insertStringList(styles); - familysubcombo->insertItem(family); - buildFont(); -} - - -void MainWindow::buildFont() -{ - TQFontDatabase db; - TQFont font = db.font(familycombo->currentText(), - stylecombo->currentText(), - psizecombo->currentText().toInt()); - samplelineedit->setFont(font); - setModified(TRUE); -} - - -void MainWindow::substituteSelected(const TQString &family) -{ - TQStringList subs = TQT_TQSTRINGLIST_OBJECT(TQFont::substitutes(family)); - sublistbox->clear(); - sublistbox->insertStringList(subs); -} - - -void MainWindow::removeSubstitute() -{ - if (sublistbox->currentItem() < 0 || - uint(sublistbox->currentItem()) > sublistbox->count()) - return; - - int item = sublistbox->currentItem(); - TQStringList subs = TQT_TQSTRINGLIST_OBJECT(TQFont::substitutes(familysubcombo->currentText())); - subs.remove(subs.at(sublistbox->currentItem())); - sublistbox->clear(); - sublistbox->insertStringList(subs); - if (uint(item) > sublistbox->count()) - item = int(sublistbox->count()) - 1; - sublistbox->setCurrentItem(item); - TQFont::removeSubstitution(familysubcombo->currentText()); - TQFont::insertSubstitutions(familysubcombo->currentText(), subs); - setModified(TRUE); -} - - -void MainWindow::addSubstitute() -{ - if (sublistbox->currentItem() < 0 || - uint(sublistbox->currentItem()) > sublistbox->count()) { - TQFont::insertSubstitution(familysubcombo->currentText(), choosesubcombo->currentText()); - TQStringList subs = TQT_TQSTRINGLIST_OBJECT(TQFont::substitutes(familysubcombo->currentText())); - sublistbox->clear(); - sublistbox->insertStringList(subs); - setModified(TRUE); - return; - } - - int item = sublistbox->currentItem(); - TQFont::insertSubstitution(familysubcombo->currentText(), choosesubcombo->currentText()); - TQStringList subs = TQT_TQSTRINGLIST_OBJECT(TQFont::substitutes(familysubcombo->currentText())); - sublistbox->clear(); - sublistbox->insertStringList(subs); - sublistbox->setCurrentItem(item); - setModified(TRUE); -} - - -void MainWindow::downSubstitute() -{ - if (sublistbox->currentItem() < 0 || - uint(sublistbox->currentItem()) >= sublistbox->count()) - return; - - int item = sublistbox->currentItem(); - TQStringList subs = TQT_TQSTRINGLIST_OBJECT(TQFont::substitutes(familysubcombo->currentText())); - TQStringList::Iterator it = subs.at(item); - TQString fam = *it; - subs.remove(it); - it = subs.at(item); - subs.insert(++it, fam); - sublistbox->clear(); - sublistbox->insertStringList(subs); - sublistbox->setCurrentItem(item + 1); - TQFont::removeSubstitution(familysubcombo->currentText()); - TQFont::insertSubstitutions(familysubcombo->currentText(), subs); - setModified(TRUE); -} - - -void MainWindow::upSubstitute() -{ - if (sublistbox->currentItem() < 1) - return; - - int item = sublistbox->currentItem(); - TQStringList subs = TQT_TQSTRINGLIST_OBJECT(TQFont::substitutes(familysubcombo->currentText())); - TQStringList::Iterator it = subs.at(item); - TQString fam = *it; - subs.remove(it); - it = subs.at(item - 1); - subs.insert(it, fam); - sublistbox->clear(); - sublistbox->insertStringList(subs); - sublistbox->setCurrentItem(item - 1); - TQFont::removeSubstitution(familysubcombo->currentText()); - TQFont::insertSubstitutions(familysubcombo->currentText(), subs); - setModified(TRUE); -} - - -void MainWindow::removeLibpath() -{ - if (libpathlistbox->currentItem() < 0 || - uint(libpathlistbox->currentItem()) > libpathlistbox->count()) - return; - - int item = libpathlistbox->currentItem(); - TQStringList paths = TQApplication::libraryPaths(); - paths.remove(paths.at(libpathlistbox->currentItem())); - libpathlistbox->clear(); - libpathlistbox->insertStringList(paths); - if (uint(item) > libpathlistbox->count()) - item = int(libpathlistbox->count()) - 1; - libpathlistbox->setCurrentItem(item); - TQApplication::tqsetLibraryPaths(paths); - setModified(TRUE); -} - - -void MainWindow::addLibpath() -{ - if (libpathlineedit->text().isEmpty()) - return; - - if (libpathlistbox->currentItem() < 0 || - uint(libpathlistbox->currentItem()) > libpathlistbox->count()) { - TQStringList paths = TQApplication::libraryPaths(); - paths.append(libpathlineedit->text()); - libpathlistbox->clear(); - libpathlistbox->insertStringList(paths); - TQApplication::tqsetLibraryPaths(paths); - setModified(TRUE); - - return; - } - - int item = libpathlistbox->currentItem(); - TQStringList paths =TQApplication::libraryPaths(); - paths.insert(++paths.at(libpathlistbox->currentItem()), - libpathlineedit->text()); - libpathlistbox->clear(); - libpathlistbox->insertStringList(paths); - libpathlistbox->setCurrentItem(item); - TQApplication::tqsetLibraryPaths(paths); - setModified(TRUE); -} - - -void MainWindow::downLibpath() -{ - if (libpathlistbox->currentItem() < 0 || - uint(libpathlistbox->currentItem()) >= libpathlistbox->count() - 1) - return; - - int item = libpathlistbox->currentItem(); - TQStringList paths = TQApplication::libraryPaths(); - TQStringList::Iterator it = paths.at(item); - TQString fam = *it; - paths.remove(it); - it = paths.at(item); - paths.insert(++it, fam); - libpathlistbox->clear(); - libpathlistbox->insertStringList(paths); - libpathlistbox->setCurrentItem(item + 1); - TQApplication::tqsetLibraryPaths(paths); - setModified(TRUE); -} - - -void MainWindow::upLibpath() -{ - if (libpathlistbox->currentItem() < 1) - return; - - int item = libpathlistbox->currentItem(); - TQStringList paths = TQApplication::libraryPaths(); - TQStringList::Iterator it = paths.at(item); - TQString fam = *it; - paths.remove(it); - it = paths.at(item - 1); - paths.insert(it, fam); - libpathlistbox->clear(); - libpathlistbox->insertStringList(paths); - libpathlistbox->setCurrentItem(item - 1); - TQApplication::tqsetLibraryPaths(paths); - setModified(TRUE); -} - - -void MainWindow::browseLibpath() -{ - TQString dirname = TQFileDialog::getExistingDirectory(TQString(), this, 0, - tr("Select a Directory")); - if (dirname.isNull()) - return; - - libpathlineedit->setText(dirname); -} - - -void MainWindow::removeFontpath() -{ - if (fontpathlistbox->currentItem() < 0 || - uint(fontpathlistbox->currentItem()) > fontpathlistbox->count()) - return; - - int item = fontpathlistbox->currentItem(); - fontpaths.remove(fontpaths.at(fontpathlistbox->currentItem())); - fontpathlistbox->clear(); - fontpathlistbox->insertStringList(fontpaths); - if (uint(item) > fontpathlistbox->count()) - item = int(fontpathlistbox->count()) - 1; - fontpathlistbox->setCurrentItem(item); - setModified(TRUE); -} - - -void MainWindow::addFontpath() -{ - if (fontpathlineedit->text().isEmpty()) - return; - - if (fontpathlistbox->currentItem() < 0 || - uint(fontpathlistbox->currentItem()) > fontpathlistbox->count()) { - fontpaths.append(fontpathlineedit->text()); - fontpathlistbox->clear(); - fontpathlistbox->insertStringList(fontpaths); - setModified(TRUE); - - return; - } - - int item = fontpathlistbox->currentItem(); - fontpaths.insert(++fontpaths.at(fontpathlistbox->currentItem()), - fontpathlineedit->text()); - fontpathlistbox->clear(); - fontpathlistbox->insertStringList(fontpaths); - fontpathlistbox->setCurrentItem(item); - setModified(TRUE); -} - - -void MainWindow::downFontpath() -{ - if (fontpathlistbox->currentItem() < 0 || - uint(fontpathlistbox->currentItem()) >= fontpathlistbox->count() - 1) - return; - - int item = fontpathlistbox->currentItem(); - TQStringList::Iterator it = fontpaths.at(item); - TQString fam = *it; - fontpaths.remove(it); - it = fontpaths.at(item); - fontpaths.insert(++it, fam); - fontpathlistbox->clear(); - fontpathlistbox->insertStringList(fontpaths); - fontpathlistbox->setCurrentItem(item + 1); - setModified(TRUE); -} - - -void MainWindow::upFontpath() -{ - if (fontpathlistbox->currentItem() < 1) - return; - - int item = fontpathlistbox->currentItem(); - TQStringList::Iterator it = fontpaths.at(item); - TQString fam = *it; - fontpaths.remove(it); - it = fontpaths.at(item - 1); - fontpaths.insert(it, fam); - fontpathlistbox->clear(); - fontpathlistbox->insertStringList(fontpaths); - fontpathlistbox->setCurrentItem(item - 1); - setModified(TRUE); -} - - -void MainWindow::browseFontpath() -{ - TQString dirname = TQFileDialog::getExistingDirectory(TQString(), this, 0, - tr("Select a Directory")); - if (dirname.isNull()) - return; - - fontpathlineedit->setText(dirname); -} - - -void MainWindow::somethingModified() -{ - setModified(TRUE); -} - - -void MainWindow::helpAbout() -{ - TQMessageBox::about(this, tr("TQt Configuration"), - tr(about_text)); -} - - -void MainWindow::helpAboutTQt() -{ - TQMessageBox::aboutTQt(this, tr("TQt Configuration")); -} - - -void MainWindow::pageChanged(TQWidget *page) -{ - if (page == tab) - helpview->setText(tr(appearance_text)); - else if (page == tab_2) - helpview->setText(tr(font_text)); - else if (page == tab_3) - helpview->setText(tr(interface_text)); - else if (page == tab_4) - helpview->setText(tr(libpath_text)); - else if (page == tab_5) - helpview->setText(tr(printer_text)); -} - - -void MainWindow::closeEvent(TQCloseEvent *e) -{ - if (modified) { - switch(TQMessageBox::warning(this, tr("Save Changes"), - tr("Save changes to settings?"), - tr("&Yes"), tr("&No"), tr("&Cancel"), 0, 2)) { - case 0: // save - tqApp->processEvents(); - fileSave(); - - // fall through intended - case 1: // don't save - e->accept(); - break; - - case 2: // cancel - e->ignore(); - break; - - default: break; - } - } else - e->accept(); -} diff --git a/tqtinterface/qt4/tools/qtconfig/mainwindow.h b/tqtinterface/qt4/tools/qtconfig/mainwindow.h deleted file mode 100644 index 66acb8c..0000000 --- a/tqtinterface/qt4/tools/qtconfig/mainwindow.h +++ /dev/null @@ -1,105 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2008 Trolltech ASA. All rights reserved. -** -** This file is part of TQt Configuration. -** -** 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 files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at [email protected]. -** -** Licensees holding valid TQt Commercial licenses may use this file in -** accordance with the TQt Commercial License Agreement provided with -** the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef MAINWINDOW_H -#define MAINWINDOW_H - -#include "mainwindowbase.h" - - -class MainWindow : public MainWindowBase -{ - Q_OBJECT - TQ_OBJECT - -public: - MainWindow(); - ~MainWindow(); - - void closeEvent(TQCloseEvent *); - - -public Q_SLOTS: - virtual void buildPalette(); - virtual void buildFont(); - virtual void tunePalette(); - virtual void paletteSelected(int); - virtual void styleSelected(const TQString &); - virtual void familySelected(const TQString &); - virtual void substituteSelected(const TQString &); - virtual void removeSubstitute(); - virtual void addSubstitute(); - virtual void downSubstitute(); - virtual void upSubstitute(); - virtual void removeLibpath(); - virtual void addLibpath(); - virtual void downLibpath(); - virtual void upLibpath(); - virtual void browseLibpath(); - virtual void removeFontpath(); - virtual void addFontpath(); - virtual void downFontpath(); - virtual void upFontpath(); - virtual void browseFontpath(); - virtual void fileSave(); - virtual void fileExit(); - virtual void somethingModified(); - virtual void helpAbout(); - virtual void helpAboutTQt(); - virtual void pageChanged(TQWidget *); - - -private: - void buildActive(); - void buildActiveEffect(); - void buildInactive(); - void buildInactiveEffect(); - void buildDisabled(); - void buildDisabledEffect(); - - void updateColorButtons(); - void updateFontSample(); - - void setPreviewPalette(const TQPalette &); - - void setModified(bool); - - TQPalette editPalette, previewPalette; - TQStyle *previewstyle; - TQStringList fontpaths; - TQStringList inputMethodIdentifiers; - bool modified; -}; - - -#endif // MAINWINDOW_H diff --git a/tqtinterface/qt4/tools/qtconfig/mainwindowbase.ui b/tqtinterface/qt4/tools/qtconfig/mainwindowbase.ui deleted file mode 100644 index 5192546..0000000 --- a/tqtinterface/qt4/tools/qtconfig/mainwindowbase.ui +++ /dev/null @@ -1,1846 +0,0 @@ -<!DOCTYPE UI><UI version="3.2" stdsetdef="1"> -<class>MainWindowBase</class> -<comment>********************************************************************* -** Copyright (C) 2000-2008 Trolltech ASA. All rights reserved. -** -** This file is part of Qt Configuration. -** -** 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 files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free Qt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at [email protected]. -** -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with -** the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -*********************************************************************</comment> -<widget class="TQMainWindow"> - <property name="name"> - <cstring>MainWindowBase</cstring> - </property> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>700</width> - <height>600</height> - </rect> - </property> - <property name="caption"> - <string>TQt Configuration</string> - </property> - <property name="icon"> - <pixmap>appicon.png</pixmap> - </property> - <hbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>8</number> - </property> - <property name="spacing"> - <number>4</number> - </property> - <widget class="TQTextView"> - <property name="name"> - <cstring>helpview</cstring> - </property> - <property name="tqminimumSize"> - <size> - <width>200</width> - <height>0</height> - </size> - </property> - <property name="text"> - <string><p align=center><b>Documentation</b></p> -<p>This TQTextView will display a brief explanation about the current page, so that the user isn't confused about the settings he/she is twiddling.</p></string> - </property> - </widget> - <widget class="TQTabWidget"> - <property name="name"> - <cstring>TabWidget3</cstring> - </property> - <widget class="TQWidget"> - <property name="name"> - <cstring>tab</cstring> - </property> - <attribute name="title"> - <string>Appearance</string> - </attribute> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>4</number> - </property> - <property name="spacing"> - <number>4</number> - </property> - <widget class="TQGroupBox"> - <property name="name"> - <cstring>GroupBox40</cstring> - </property> - <property name="title"> - <string>GUI Style</string> - </property> - <hbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>8</number> - </property> - <property name="spacing"> - <number>4</number> - </property> - <widget class="TQLabel"> - <property name="name"> - <cstring>gstylebuddy</cstring> - </property> - <property name="text"> - <string>Select GUI &Style:</string> - </property> - <property name="buddy" stdset="0"> - <cstring>gstylecombo</cstring> - </property> - </widget> - <widget class="TQComboBox"> - <property name="name"> - <cstring>gstylecombo</cstring> - </property> - </widget> - </hbox> - </widget> - <widget class="TQGroupBox"> - <property name="name"> - <cstring>groupAutoPalette</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>5</hsizetype> - <vsizetype>4</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="title"> - <string>Build Palette</string> - </property> - <property name="tqalignment"> - <set>AlignAuto</set> - </property> - <hbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>8</number> - </property> - <property name="spacing"> - <number>4</number> - </property> - <widget class="TQLabel"> - <property name="name"> - <cstring>labelMainColor</cstring> - </property> - <property name="text"> - <string>&3-D Effects:</string> - </property> - <property name="buddy" stdset="0"> - <cstring>buttonMainColor</cstring> - </property> - </widget> - <widget class="ColorButton"> - <property name="name"> - <cstring>buttonMainColor</cstring> - </property> - </widget> - <widget class="TQLabel"> - <property name="name"> - <cstring>labelMainColor2</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>1</hsizetype> - <vsizetype>1</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="tqminimumSize"> - <size> - <width>50</width> - <height>0</height> - </size> - </property> - <property name="lineWidth"> - <number>1</number> - </property> - <property name="margin"> - <number>0</number> - </property> - <property name="midLineWidth"> - <number>0</number> - </property> - <property name="text"> - <string>Back&ground:</string> - </property> - <property name="tqalignment"> - <set>AlignVCenter</set> - </property> - <property name="buddy" stdset="0"> - <cstring>buttonMainColor2</cstring> - </property> - </widget> - <widget class="ColorButton"> - <property name="name"> - <cstring>buttonMainColor2</cstring> - </property> - </widget> - <spacer> - <property name="name"> - <cstring>Spacer1</cstring> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="tqsizeHint"> - <size> - <width>70</width> - <height>20</height> - </size> - </property> - </spacer> - <widget class="TQPushButton"> - <property name="name"> - <cstring>btnAdvanced</cstring> - </property> - <property name="text"> - <string>&Tune Palette...</string> - </property> - </widget> - </hbox> - </widget> - <widget class="TQGroupBox"> - <property name="name"> - <cstring>GroupBox126</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>5</hsizetype> - <vsizetype>7</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="title"> - <string>Preview</string> - </property> - <grid> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>8</number> - </property> - <property name="spacing"> - <number>4</number> - </property> - <widget class="TQLabel" row="0" column="0"> - <property name="name"> - <cstring>TextLabel1</cstring> - </property> - <property name="text"> - <string>Select &Palette:</string> - </property> - <property name="buddy" stdset="0"> - <cstring>paletteCombo</cstring> - </property> - </widget> - <widget class="TQComboBox" row="0" column="1"> - <item> - <property name="text"> - <string>Active Palette</string> - </property> - </item> - <item> - <property name="text"> - <string>Inactive Palette</string> - </property> - </item> - <item> - <property name="text"> - <string>Disabled Palette</string> - </property> - </item> - <property name="name"> - <cstring>paletteCombo</cstring> - </property> - </widget> - <widget class="PreviewFrame" row="1" column="0" rowspan="1" colspan="2"> - <property name="name"> - <cstring>previewFrame</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>7</hsizetype> - <vsizetype>7</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="tqminimumSize"> - <size> - <width>410</width> - <height>260</height> - </size> - </property> - </widget> - </grid> - </widget> - </vbox> - </widget> - <widget class="TQWidget"> - <property name="name"> - <cstring>tab</cstring> - </property> - <attribute name="title"> - <string>Fonts</string> - </attribute> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>8</number> - </property> - <property name="spacing"> - <number>4</number> - </property> - <widget class="TQGroupBox"> - <property name="name"> - <cstring>GroupBox1</cstring> - </property> - <property name="title"> - <string>Default Font</string> - </property> - <grid> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>8</number> - </property> - <property name="spacing"> - <number>4</number> - </property> - <widget class="TQComboBox" row="1" column="1"> - <property name="name"> - <cstring>stylecombo</cstring> - </property> - <property name="autoCompletion"> - <bool>true</bool> - </property> - <property name="duplicatesEnabled"> - <bool>false</bool> - </property> - </widget> - <widget class="TQComboBox" row="0" column="1"> - <property name="name"> - <cstring>familycombo</cstring> - </property> - <property name="autoCompletion"> - <bool>true</bool> - </property> - <property name="duplicatesEnabled"> - <bool>false</bool> - </property> - </widget> - <widget class="TQComboBox" row="2" column="1"> - <property name="name"> - <cstring>psizecombo</cstring> - </property> - <property name="editable"> - <bool>true</bool> - </property> - <property name="autoCompletion"> - <bool>true</bool> - </property> - <property name="duplicatesEnabled"> - <bool>false</bool> - </property> - </widget> - <widget class="TQLabel" row="1" column="0"> - <property name="name"> - <cstring>stylebuddy</cstring> - </property> - <property name="text"> - <string>&Style:</string> - </property> - <property name="buddy" stdset="0"> - <cstring>stylecombo</cstring> - </property> - </widget> - <widget class="TQLabel" row="2" column="0"> - <property name="name"> - <cstring>psizebuddy</cstring> - </property> - <property name="text"> - <string>&Point Size:</string> - </property> - <property name="buddy" stdset="0"> - <cstring>psizecombo</cstring> - </property> - </widget> - <widget class="TQLabel" row="0" column="0"> - <property name="name"> - <cstring>familybuddy</cstring> - </property> - <property name="text"> - <string>F&amily:</string> - </property> - <property name="buddy" stdset="0"> - <cstring>familycombo</cstring> - </property> - </widget> - <widget class="TQLineEdit" row="3" column="0" rowspan="1" colspan="2"> - <property name="name"> - <cstring>samplelineedit</cstring> - </property> - <property name="text"> - <string>Sample Text</string> - </property> - <property name="tqalignment"> - <set>AlignHCenter</set> - </property> - </widget> - </grid> - </widget> - <widget class="TQGroupBox"> - <property name="name"> - <cstring>GroupBox2</cstring> - </property> - <property name="frameShape"> - <enum>Box</enum> - </property> - <property name="frameShadow"> - <enum>Sunken</enum> - </property> - <property name="title"> - <string>Font Substitution</string> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>8</number> - </property> - <property name="spacing"> - <number>4</number> - </property> - <widget class="TQLayoutWidget"> - <property name="name"> - <cstring>Layout2</cstring> - </property> - <hbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <property name="spacing"> - <number>4</number> - </property> - <widget class="TQLabel"> - <property name="name"> - <cstring>famsubbuddy</cstring> - </property> - <property name="text"> - <string>S&elect or Enter a Family:</string> - </property> - <property name="buddy" stdset="0"> - <cstring>familysubcombo</cstring> - </property> - </widget> - <widget class="TQComboBox"> - <property name="name"> - <cstring>familysubcombo</cstring> - </property> - <property name="editable"> - <bool>true</bool> - </property> - <property name="autoCompletion"> - <bool>true</bool> - </property> - <property name="duplicatesEnabled"> - <bool>false</bool> - </property> - </widget> - </hbox> - </widget> - <widget class="Line"> - <property name="name"> - <cstring>Line1</cstring> - </property> - <property name="frameShape"> - <enum>HLine</enum> - </property> - <property name="frameShadow"> - <enum>Sunken</enum> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - </widget> - <widget class="TQLabel"> - <property name="name"> - <cstring>TextLabel5</cstring> - </property> - <property name="text"> - <string>Current Substitutions:</string> - </property> - </widget> - <widget class="TQListBox"> - <property name="name"> - <cstring>sublistbox</cstring> - </property> - </widget> - <widget class="TQLayoutWidget"> - <property name="name"> - <cstring>Layout3</cstring> - </property> - <hbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <property name="spacing"> - <number>4</number> - </property> - <widget class="TQPushButton"> - <property name="name"> - <cstring>PushButton2</cstring> - </property> - <property name="text"> - <string>Up</string> - </property> - </widget> - <widget class="TQPushButton"> - <property name="name"> - <cstring>PushButton3</cstring> - </property> - <property name="text"> - <string>Down</string> - </property> - </widget> - <widget class="TQPushButton"> - <property name="name"> - <cstring>PushButton4</cstring> - </property> - <property name="text"> - <string>Remove</string> - </property> - </widget> - </hbox> - </widget> - <widget class="Line"> - <property name="name"> - <cstring>Line2</cstring> - </property> - <property name="frameShape"> - <enum>HLine</enum> - </property> - <property name="frameShadow"> - <enum>Sunken</enum> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - </widget> - <widget class="TQLayoutWidget"> - <property name="name"> - <cstring>Layout11</cstring> - </property> - <hbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <property name="spacing"> - <number>4</number> - </property> - <widget class="TQLabel"> - <property name="name"> - <cstring>choosebuddy</cstring> - </property> - <property name="text"> - <string>Select s&ubstitute Family:</string> - </property> - <property name="buddy" stdset="0"> - <cstring>choosesubcombo</cstring> - </property> - </widget> - <widget class="TQComboBox"> - <property name="name"> - <cstring>choosesubcombo</cstring> - </property> - <property name="autoCompletion"> - <bool>true</bool> - </property> - <property name="duplicatesEnabled"> - <bool>false</bool> - </property> - </widget> - <widget class="TQPushButton"> - <property name="name"> - <cstring>PushButton1</cstring> - </property> - <property name="text"> - <string>Add</string> - </property> - </widget> - </hbox> - </widget> - </vbox> - </widget> - </vbox> - </widget> - <widget class="TQWidget"> - <property name="name"> - <cstring>tab</cstring> - </property> - <attribute name="title"> - <string>Interface</string> - </attribute> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <widget class="TQGroupBox"> - <property name="name"> - <cstring>GroupBox4</cstring> - </property> - <property name="title"> - <string>Feel Settings</string> - </property> - <grid> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>8</number> - </property> - <property name="spacing"> - <number>4</number> - </property> - <widget class="TQSpinBox" row="0" column="1"> - <property name="name"> - <cstring>dcispin</cstring> - </property> - <property name="suffix"> - <string> ms</string> - </property> - <property name="maxValue"> - <number>10000</number> - </property> - <property name="minValue"> - <number>10</number> - </property> - </widget> - <widget class="TQLabel" row="0" column="0"> - <property name="name"> - <cstring>dcibuddy</cstring> - </property> - <property name="text"> - <string>&Double Click Interval:</string> - </property> - <property name="buddy" stdset="0"> - <cstring>dcispin</cstring> - </property> - </widget> - <widget class="TQSpinBox" row="1" column="1"> - <property name="name"> - <cstring>cfispin</cstring> - </property> - <property name="suffix"> - <string> ms</string> - </property> - <property name="maxValue"> - <number>10000</number> - </property> - <property name="minValue"> - <number>9</number> - </property> - <property name="specialValueText"> - <string>No blinking</string> - </property> - </widget> - <widget class="TQLabel" row="1" column="0"> - <property name="name"> - <cstring>cfibuddy</cstring> - </property> - <property name="text"> - <string>&Cursor Flash Time:</string> - </property> - <property name="buddy" stdset="0"> - <cstring>cfispin</cstring> - </property> - </widget> - <widget class="TQSpinBox" row="2" column="1"> - <property name="name"> - <cstring>wslspin</cstring> - </property> - <property name="suffix"> - <string> lines</string> - </property> - <property name="maxValue"> - <number>20</number> - </property> - <property name="minValue"> - <number>1</number> - </property> - </widget> - <widget class="TQLabel" row="2" column="0"> - <property name="name"> - <cstring>wslbuddy</cstring> - </property> - <property name="text"> - <string>Wheel &Scroll Lines:</string> - </property> - <property name="buddy" stdset="0"> - <cstring>wslspin</cstring> - </property> - </widget> - <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="2"> - <property name="name"> - <cstring>resolvelinks</cstring> - </property> - <property name="text"> - <string>Resolve symlinks in URLs</string> - </property> - </widget> - </grid> - </widget> - <widget class="TQGroupBox"> - <property name="name"> - <cstring>GroupBox3</cstring> - </property> - <property name="title"> - <string>GUI Effects</string> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>8</number> - </property> - <property name="spacing"> - <number>4</number> - </property> - <widget class="TQCheckBox"> - <property name="name"> - <cstring>effectcheckbox</cstring> - </property> - <property name="text"> - <string>&Enable</string> - </property> - <property name="accel"> - <string>Alt+E</string> - </property> - </widget> - <widget class="TQFrame"> - <property name="name"> - <cstring>effectbase</cstring> - </property> - <property name="frameShape"> - <enum>NoFrame</enum> - </property> - <property name="frameShadow"> - <enum>Plain</enum> - </property> - <grid> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <property name="spacing"> - <number>4</number> - </property> - <widget class="TQLabel" row="0" column="0"> - <property name="name"> - <cstring>meffectbuddy</cstring> - </property> - <property name="text"> - <string>&Menu Effect:</string> - </property> - <property name="buddy" stdset="0"> - <cstring>menueffect</cstring> - </property> - </widget> - <widget class="TQLabel" row="1" column="0"> - <property name="name"> - <cstring>ceffectbuddy</cstring> - </property> - <property name="text"> - <string>C&omboBox Effect:</string> - </property> - <property name="buddy" stdset="0"> - <cstring>comboeffect</cstring> - </property> - </widget> - <widget class="TQLabel" row="2" column="0"> - <property name="name"> - <cstring>teffectbuddy</cstring> - </property> - <property name="text"> - <string>&ToolTip Effect:</string> - </property> - <property name="buddy" stdset="0"> - <cstring>tooltipeffect</cstring> - </property> - </widget> - <widget class="TQLabel" row="3" column="0"> - <property name="name"> - <cstring>beffectbuddy</cstring> - </property> - <property name="text"> - <string>Tool&Box Effect:</string> - </property> - <property name="buddy" stdset="0"> - <cstring>toolboxeffect</cstring> - </property> - </widget> - <widget class="TQComboBox" row="0" column="1"> - <item> - <property name="text"> - <string>Disable</string> - </property> - </item> - <item> - <property name="text"> - <string>Animate</string> - </property> - </item> - <item> - <property name="text"> - <string>Fade</string> - </property> - </item> - <property name="name"> - <cstring>menueffect</cstring> - </property> - <property name="currentItem"> - <number>0</number> - </property> - <property name="autoCompletion"> - <bool>true</bool> - </property> - </widget> - <widget class="TQComboBox" row="1" column="1"> - <item> - <property name="text"> - <string>Disable</string> - </property> - </item> - <item> - <property name="text"> - <string>Animate</string> - </property> - </item> - <property name="name"> - <cstring>comboeffect</cstring> - </property> - </widget> - <widget class="TQComboBox" row="2" column="1"> - <item> - <property name="text"> - <string>Disable</string> - </property> - </item> - <item> - <property name="text"> - <string>Animate</string> - </property> - </item> - <item> - <property name="text"> - <string>Fade</string> - </property> - </item> - <property name="name"> - <cstring>tooltipeffect</cstring> - </property> - </widget> - <widget class="TQComboBox" row="3" column="1"> - <item> - <property name="text"> - <string>Disable</string> - </property> - </item> - <item> - <property name="text"> - <string>Animate</string> - </property> - </item> - <property name="name"> - <cstring>toolboxeffect</cstring> - </property> - </widget> - </grid> - </widget> - </vbox> - </widget> - <widget class="TQGroupBox"> - <property name="name"> - <cstring>GroupBox5</cstring> - </property> - <property name="title"> - <string>Global Strut</string> - </property> - <grid> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>8</number> - </property> - <property name="spacing"> - <number>4</number> - </property> - <widget class="TQLabel" row="0" column="0"> - <property name="name"> - <cstring>swbuddy</cstring> - </property> - <property name="text"> - <string>Minimum &Width:</string> - </property> - <property name="buddy" stdset="0"> - <cstring>strutwidth</cstring> - </property> - </widget> - <widget class="TQLabel" row="1" column="0"> - <property name="name"> - <cstring>shbuddy</cstring> - </property> - <property name="text"> - <string>Minimum Hei&ght:</string> - </property> - <property name="buddy" stdset="0"> - <cstring>strutheight</cstring> - </property> - </widget> - <widget class="TQSpinBox" row="0" column="1"> - <property name="name"> - <cstring>strutwidth</cstring> - </property> - <property name="suffix"> - <string> pixels</string> - </property> - <property name="maxValue"> - <number>1000</number> - </property> - </widget> - <widget class="TQSpinBox" row="1" column="1"> - <property name="name"> - <cstring>strutheight</cstring> - </property> - <property name="suffix"> - <string> pixels</string> - </property> - <property name="maxValue"> - <number>1000</number> - </property> - </widget> - </grid> - </widget> - <widget class="TQCheckBox"> - <property name="name"> - <cstring>rtlExtensions</cstring> - </property> - <property name="text"> - <string>Enhanced support for languages written right-to-left</string> - </property> - </widget> - <widget class="TQLabel"> - <property name="name"> - <cstring>inputStyleLabel</cstring> - </property> - <property name="text"> - <string>XIM Input Style:</string> - </property> - </widget> - <widget class="TQComboBox"> - <item> - <property name="text"> - <string>On The Spot</string> - </property> - </item> - <item> - <property name="text"> - <string>Over The Spot</string> - </property> - </item> - <item> - <property name="text"> - <string>Off The Spot</string> - </property> - </item> - <item> - <property name="text"> - <string>Root</string> - </property> - </item> - <property name="name"> - <cstring>inputStyle</cstring> - </property> - <property name="currentItem"> - <number>0</number> - </property> - </widget> - <widget class="TQLabel"> - <property name="name"> - <cstring>inputMethodLabel</cstring> - </property> - <property name="text"> - <string>Default Input Method:</string> - </property> - </widget> - <widget class="TQComboBox"> - <property name="name"> - <cstring>inputMethodCombo</cstring> - </property> - </widget> - <spacer> - <property name="name"> - <cstring>spacer5</cstring> - </property> - <property name="orientation"> - <enum>Vertical</enum> - </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="tqsizeHint"> - <size> - <width>20</width> - <height>30</height> - </size> - </property> - </spacer> - </vbox> - </widget> - <widget class="TQWidget"> - <property name="name"> - <cstring>tab</cstring> - </property> - <attribute name="title"> - <string>Library Paths</string> - </attribute> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>4</number> - </property> - <property name="spacing"> - <number>4</number> - </property> - <widget class="TQGroupBox"> - <property name="name"> - <cstring>GroupBox39</cstring> - </property> - <property name="title"> - <string>Library Paths</string> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>8</number> - </property> - <property name="spacing"> - <number>4</number> - </property> - <widget class="TQLayoutWidget"> - <property name="name"> - <cstring>Layout68</cstring> - </property> - <grid> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <property name="spacing"> - <number>4</number> - </property> - <widget class="TQListBox" row="0" column="0" rowspan="1" colspan="3"> - <property name="name"> - <cstring>libpathlistbox</cstring> - </property> - <property name="frameShape"> - <enum>StyledPanel</enum> - </property> - <property name="frameShadow"> - <enum>Sunken</enum> - </property> - </widget> - <widget class="TQPushButton" row="1" column="1"> - <property name="name"> - <cstring>PushButton8</cstring> - </property> - <property name="text"> - <string>Down</string> - </property> - </widget> - <widget class="TQPushButton" row="1" column="2"> - <property name="name"> - <cstring>PushButton9</cstring> - </property> - <property name="text"> - <string>Remove</string> - </property> - </widget> - <widget class="TQPushButton" row="1" column="0"> - <property name="name"> - <cstring>PushButton7</cstring> - </property> - <property name="text"> - <string>Up</string> - </property> - </widget> - </grid> - </widget> - <widget class="TQLayoutWidget"> - <property name="name"> - <cstring>Layout71</cstring> - </property> - <grid> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <property name="spacing"> - <number>4</number> - </property> - <spacer row="2" column="0"> - <property name="name"> - <cstring>Spacer1_2</cstring> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - <property name="sizeType"> - <enum>Minimum</enum> - </property> - <property name="tqsizeHint"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="3"> - <property name="name"> - <cstring>TextLabel15</cstring> - </property> - <property name="text"> - <string>Press the <b>Browse</b> button or enter a directory and press Enter to add them to the list.</string> - </property> - </widget> - <widget class="TQLineEdit" row="1" column="0" rowspan="1" colspan="3"> - <property name="name"> - <cstring>libpathlineedit</cstring> - </property> - </widget> - <widget class="TQPushButton" row="2" column="1"> - <property name="name"> - <cstring>PushButton5</cstring> - </property> - <property name="text"> - <string>Browse...</string> - </property> - </widget> - <widget class="TQPushButton" row="2" column="2"> - <property name="name"> - <cstring>PushButton6</cstring> - </property> - <property name="text"> - <string>Add</string> - </property> - </widget> - </grid> - </widget> - </vbox> - </widget> - </vbox> - </widget> - <widget class="TQWidget"> - <property name="name"> - <cstring>tab</cstring> - </property> - <attribute name="title"> - <string>Printer</string> - </attribute> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>8</number> - </property> - <property name="spacing"> - <number>4</number> - </property> - <widget class="TQCheckBox"> - <property name="name"> - <cstring>fontembeddingcheckbox</cstring> - </property> - <property name="text"> - <string>Enable Font embedding</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - <widget class="TQGroupBox"> - <property name="name"> - <cstring>GroupBox10</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>5</hsizetype> - <vsizetype>7</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="title"> - <string>Font Paths</string> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>8</number> - </property> - <property name="spacing"> - <number>4</number> - </property> - <widget class="TQLayoutWidget"> - <property name="name"> - <cstring>Layout9</cstring> - </property> - <grid> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <property name="spacing"> - <number>4</number> - </property> - <widget class="TQPushButton" row="1" column="0"> - <property name="name"> - <cstring>PushButton11</cstring> - </property> - <property name="text"> - <string>Up</string> - </property> - </widget> - <widget class="TQPushButton" row="1" column="2"> - <property name="name"> - <cstring>PushButton13</cstring> - </property> - <property name="text"> - <string>Remove</string> - </property> - </widget> - <widget class="TQListBox" row="0" column="0" rowspan="1" colspan="3"> - <property name="name"> - <cstring>fontpathlistbox</cstring> - </property> - </widget> - <widget class="TQPushButton" row="1" column="1"> - <property name="name"> - <cstring>PushButton12</cstring> - </property> - <property name="text"> - <string>Down</string> - </property> - </widget> - </grid> - </widget> - <widget class="TQLayoutWidget"> - <property name="name"> - <cstring>Layout10</cstring> - </property> - <grid> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <property name="spacing"> - <number>4</number> - </property> - <spacer row="2" column="0"> - <property name="name"> - <cstring>Spacer4</cstring> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - <property name="sizeType"> - <enum>Minimum</enum> - </property> - <property name="tqsizeHint"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="3"> - <property name="name"> - <cstring>TextLabel15_2</cstring> - </property> - <property name="text"> - <string>Press the <b>Browse</b> button or enter a directory and press Enter to add them to the list.</string> - </property> - </widget> - <widget class="TQPushButton" row="2" column="2"> - <property name="name"> - <cstring>PushButton15</cstring> - </property> - <property name="text"> - <string>Add</string> - </property> - </widget> - <widget class="TQLineEdit" row="1" column="0" rowspan="1" colspan="3"> - <property name="name"> - <cstring>fontpathlineedit</cstring> - </property> - </widget> - <widget class="TQPushButton" row="2" column="1"> - <property name="name"> - <cstring>PushButton14</cstring> - </property> - <property name="text"> - <string>Browse...</string> - </property> - </widget> - </grid> - </widget> - </vbox> - </widget> - </vbox> - </widget> - </widget> - </hbox> -</widget> -<menubar> - <property name="name"> - <cstring>menubar</cstring> - </property> - <item text="&File" name="PopupMenu"> - <action name="fileSaveAction"/> - <separator/> - <action name="fileExitAction"/> - </item> - <item text="&Help" name="PopupMenu_2"> - <action name="helpAboutAction"/> - <action name="helpAboutTQtAction"/> - </item> -</menubar> -<toolbars> -</toolbars> -<customwidgets> - <customwidget> - <class>ColorButton</class> - <header location="local">colorbutton.h</header> - <sizehint> - <width>40</width> - <height>25</height> - </sizehint> - <container>0</container> - <sizepolicy> - <hordata>5</hordata> - <verdata>5</verdata> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - <pixmap>image0</pixmap> - <signal>clicked()</signal> - <signal>colorChanged(const TQColor &)</signal> - <signal>changed()</signal> - <property type="Color">color</property> - <property type="Pixmap">pixmap</property> - <property type="Bool">scale</property> - </customwidget> - <customwidget> - <class>PreviewFrame</class> - <header location="local">previewframe.h</header> - <sizehint> - <width>200</width> - <height>200</height> - </sizehint> - <container>0</container> - <sizepolicy> - <hordata>5</hordata> - <verdata>5</verdata> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - <pixmap>image1</pixmap> - </customwidget> -</customwidgets> -<actions> - <action> - <property name="name"> - <cstring>fileSaveAction</cstring> - </property> - <property name="iconSet"> - <iconset></iconset> - </property> - <property name="text"> - <string>Save</string> - </property> - <property name="menuText"> - <string>&Save</string> - </property> - <property name="accel"> - <string>Ctrl+S</string> - </property> - </action> - <action> - <property name="name"> - <cstring>fileExitAction</cstring> - </property> - <property name="text"> - <string>Exit</string> - </property> - <property name="menuText"> - <string>E&xit</string> - </property> - <property name="accel"> - <string></string> - </property> - </action> - <action> - <property name="name"> - <cstring>helpAboutAction</cstring> - </property> - <property name="text"> - <string>About</string> - </property> - <property name="menuText"> - <string>&About</string> - </property> - <property name="accel"> - <string></string> - </property> - </action> - <action> - <property name="name"> - <cstring>helpAboutTQtAction</cstring> - </property> - <property name="text"> - <string>About TQt</string> - </property> - <property name="menuText"> - <string>About &TQt</string> - </property> - </action> -</actions> -<images> - <image name="image0"> - <data format="XPM.GZ" length="4350">789c6dd7594f23471007f0f7fd14d6d6db2aaaf58c3db647511eb831b7317794879ac30760cc61c010e5bba7dcf5af5688167664fdb66bbaababbb67cccf1f8dab93c3c68f9fdf5e16b298968d7222cf8d1fd5eb6cf6f1e75f7ffcfded7b9a3656ff9aad46fafdb76fdf078b46d9389a3fd42bf04841699e964933b830b79a7019dd0b96955b895b5a703bcd572e08eea576ff6570ae0eedd477b792103f854b8b2fc6d1163f77237e646e37113f89b6f8307e3bf1785a8b0eedbc696eb7ad9db7e01ee6476ee4ffe0c6fd158c7c69182cde4eec6e87fea50dfbf8176e6ba7d07f96669999cfa325ccaf862bcc97a36dbccf60f178cee11cde706761f16917ae30fe6b7488a7851bf14d7327417f676eb4f756eea41e2f57e6d83e83919f6cba117f04235fd9765b3b0fa36dfc398cf973edc67a6fb951ffe768ab6765ee26b8dff213ef5f4630e2b9e7463ea7ee8ee5ff60ee2618af8eb6fe3238437eb91bf1299cdbfacad3cadd5617f5a11738c7fe4adcb8ffd68d7aeec15e8fc3683b9f62ee2518ef33dafa3f75e3bc957086f86eb4d56f3db8e8e6dd56f01a5cc1bbe65e629673d8ebd18d0efdc9058cf9f2c08df9e630ce037db8719ec37c7a9a7fb708f10267b65e7cef46fb3e9ca3fd23dad6ef0cf67abe99f304f95ec3a8871cbb71be52d8d777e8b6fee412f6f958be3adf5ea817b561afe7d86ded7c67ce13c46fc37ede2766c17a17059cd9f38e466e8c3f8eb6fd700f0b9ef7095c37cd3d37de178f2be76dcf876fa343bd790267f012f67a77cc319f69b4ed872e2ca8e732daeabfe3c6fa9cc235f21f9b8bd4f2a5cd687bfedbfd659ee7ede017b842becf6eb44fa3cbd0df8559b0ffe808ceb0ff37e01afba3652e52cc87a26dbe276ecca7097790ff73b4cdef0616ac4fdf6df1c2d1d67ee8c6f80318eb4bd1180ff529513f0ecf7b694b62f5a002ceccb2662e523c2fb7605f9f0fd8fbbf75e3bc2dcd3e9ebcb9f17ce8c05e8f83685bcf701e44eb2db65e4fd1b65eebe62245be53b8c6f3ffdd8dfd3933fbf884761f5f0edcd88f951bf118bf44bde926dae24fe01ae7af76e3f9169e2f45bb143c0f5fdcf6fea23b18f773eac6f3e63ddac6db75e37df5e8c6fbae65aebcde6d37beaf84f528aa52f03c9dc3359ea79939c627d136deab1befaf75b883ef23e76e3ccfaea36d7dc2f795322b05ebfb0ad738af7db7ad371f99fd7e59b8b13f276e9cdf1318f5e54337e6d78cb67cf761ec170efba1acaa1afd9db92d3f3a36d729ea77efc6f33cbccf2beddfe6478fe6d85e45dbfd851bf1577007f5d877e3bc86f5a9ea3a2d6cffdfc1debe116df5db73a39e37b0e777191dda257c7fa83b6e8a2eaae00eeceb13d6b7d69f325b79b058fd32b170c1a55ebffaac2ccae2b9e6118f79c253bd6ef9ee3fd7587fef79c60f7acf3cc617fcc84ffcac6d8ffcc20b7ee5377ee7257ff027aff1bac66ff0269716cf5b1ab7cd3bbcabb17ddee37d3ee0433ee2633ee1019ff290cff89c2ff89229c48b66f1ac3d5df135df7093134eb9c56dcef4b3c35dee71ce393111dbfa8c784a4205955451cd1d1ad1982634a55bbad3f80eddd38c1ef882e66cf52ab5ff2b8d7ea4277aa6175ad06bb866f446efb4d4df0ffad4fed762ffb7b44e1b9cd2266dd142c75e5ddb3cd0bb3e347a477bd9d5f83ee245e3f7689f0ee830f67d44c77412ee186946033aa5e197fecfe85c7bf7be2fe892aee89a6ea84989f6bfa434f4eff9df52c509b5d0779b32ea684d13ea528f728d1e882ebfce37f6cf077422b4ea5b440ad14af1a15452ab473aee52c65ff39789b64fe955f44eb9937b5d858c5b32d377c0c32a7fee7ecd5fe61aff284ff22c2fb290577993775db1443fb53ef2219f5ff2bf93356d5b970dd9d41eb77820dbb223bbab155ed55ffab2f725ffb1eccb81aed6931cca116ab490633909d10339fd5ffdef795d869ae7923bc27226e772415d5986b51d683663b9d4fcfbb1ff190fe54aaec35aeaa577ee20f24673e94b531249a585fc2b69ebfe3ed7dae91f75ba964b5c03e9d344ba1add93bce0826c3f87f3b2a9fb6f18aeba10ba2f563f25eb1b563771a5d17531e2513c5fba538b3111cd690dd73c7ef6a95f4c8aa99de12fe77da4951de9ffffea730be7fd9fdfbffd0b690edc6c</data> - </image> - <image name="image1"> - <data format="XPM.GZ" length="857">789c6d92cd4ec3300c80ef7d8a68b94da8dbba51a9423c02882312e210c7f95d3a241807847877eca4e93a84d54af9fcd5899374b316cf4f0f62bd693eceea1cb4d05ebd8b357e8ee3d7cbebfd77b3ea3a41cfae17bbd54db36a85168f6f27c3634563b9dfedb7db2da3acd8778cb1607f5bd0331ed4411f142330f65db5a1e0301444c64157d41507cd980a6a53d67515cbc723a3c66a6dc5624dc532d5a9a0b5058f8cd6566cdb56aaeba05436a0f43210a4826294369c31c63a4404002f55362c02e50d2f8001207a2f6531d4d131e729128227a32643152ed14ce86c4a09168605440ac031a57031b404091f3d861872d16c6ca9a01d87885cb430b9c29cac8b90122e0c7205094b4dd374b3a16d70056f15fc1f6323d8bc550757b3510680d3fc5e75e0f2b72e00f2212cbb464701d45d449796060199318490079775e8dc4b660e980c9dad9f1dd2f10428b7d02a991d9f58001ec0747374dbf24fa8c9fcff87fcdc35bf3990fd9c</data> - </image> -</images> -<connections> - <connection> - <sender>fontpathlineedit</sender> - <signal>returnPressed()</signal> - <receiver>MainWindowBase</receiver> - <slot>addFontpath()</slot> - </connection> - <connection> - <sender>PushButton15</sender> - <signal>clicked()</signal> - <receiver>MainWindowBase</receiver> - <slot>addFontpath()</slot> - </connection> - <connection> - <sender>PushButton6</sender> - <signal>clicked()</signal> - <receiver>MainWindowBase</receiver> - <slot>addLibpath()</slot> - </connection> - <connection> - <sender>libpathlineedit</sender> - <signal>returnPressed()</signal> - <receiver>MainWindowBase</receiver> - <slot>addLibpath()</slot> - </connection> - <connection> - <sender>PushButton1</sender> - <signal>clicked()</signal> - <receiver>MainWindowBase</receiver> - <slot>addSubstitute()</slot> - </connection> - <connection> - <sender>PushButton14</sender> - <signal>clicked()</signal> - <receiver>MainWindowBase</receiver> - <slot>browseFontpath()</slot> - </connection> - <connection> - <sender>PushButton5</sender> - <signal>clicked()</signal> - <receiver>MainWindowBase</receiver> - <slot>browseLibpath()</slot> - </connection> - <connection> - <sender>stylecombo</sender> - <signal>activated(int)</signal> - <receiver>MainWindowBase</receiver> - <slot>buildFont()</slot> - </connection> - <connection> - <sender>psizecombo</sender> - <signal>activated(int)</signal> - <receiver>MainWindowBase</receiver> - <slot>buildFont()</slot> - </connection> - <connection> - <sender>PushButton12</sender> - <signal>clicked()</signal> - <receiver>MainWindowBase</receiver> - <slot>downFontpath()</slot> - </connection> - <connection> - <sender>PushButton8</sender> - <signal>clicked()</signal> - <receiver>MainWindowBase</receiver> - <slot>downLibpath()</slot> - </connection> - <connection> - <sender>PushButton3</sender> - <signal>clicked()</signal> - <receiver>MainWindowBase</receiver> - <slot>downSubstitute()</slot> - </connection> - <connection> - <sender>familycombo</sender> - <signal>activated(const TQString&)</signal> - <receiver>MainWindowBase</receiver> - <slot>familySelected(const TQString&)</slot> - </connection> - <connection> - <sender>fileExitAction</sender> - <signal>activated()</signal> - <receiver>MainWindowBase</receiver> - <slot>fileExit()</slot> - </connection> - <connection> - <sender>fileSaveAction</sender> - <signal>activated()</signal> - <receiver>MainWindowBase</receiver> - <slot>fileSave()</slot> - </connection> - <connection> - <sender>helpAboutAction</sender> - <signal>activated()</signal> - <receiver>MainWindowBase</receiver> - <slot>helpAbout()</slot> - </connection> - <connection> - <sender>helpAboutTQtAction</sender> - <signal>activated()</signal> - <receiver>MainWindowBase</receiver> - <slot>helpAboutTQt()</slot> - </connection> - <connection> - <sender>TabWidget3</sender> - <signal>currentChanged(TQWidget*)</signal> - <receiver>MainWindowBase</receiver> - <slot>pageChanged(TQWidget*)</slot> - </connection> - <connection> - <sender>paletteCombo</sender> - <signal>activated(int)</signal> - <receiver>MainWindowBase</receiver> - <slot>paletteSelected(int)</slot> - </connection> - <connection> - <sender>PushButton13</sender> - <signal>clicked()</signal> - <receiver>MainWindowBase</receiver> - <slot>removeFontpath()</slot> - </connection> - <connection> - <sender>PushButton9</sender> - <signal>clicked()</signal> - <receiver>MainWindowBase</receiver> - <slot>removeLibpath()</slot> - </connection> - <connection> - <sender>PushButton4</sender> - <signal>clicked()</signal> - <receiver>MainWindowBase</receiver> - <slot>removeSubstitute()</slot> - </connection> - <connection> - <sender>effectcheckbox</sender> - <signal>toggled(bool)</signal> - <receiver>effectbase</receiver> - <slot>setEnabled(bool)</slot> - </connection> - <connection> - <sender>fontembeddingcheckbox</sender> - <signal>toggled(bool)</signal> - <receiver>GroupBox10</receiver> - <slot>setEnabled(bool)</slot> - </connection> - <connection> - <sender>toolboxeffect</sender> - <signal>activated(int)</signal> - <receiver>MainWindowBase</receiver> - <slot>somethingModified()</slot> - </connection> - <connection> - <sender>dcispin</sender> - <signal>valueChanged(int)</signal> - <receiver>MainWindowBase</receiver> - <slot>somethingModified()</slot> - </connection> - <connection> - <sender>cfispin</sender> - <signal>valueChanged(int)</signal> - <receiver>MainWindowBase</receiver> - <slot>somethingModified()</slot> - </connection> - <connection> - <sender>wslspin</sender> - <signal>valueChanged(int)</signal> - <receiver>MainWindowBase</receiver> - <slot>somethingModified()</slot> - </connection> - <connection> - <sender>menueffect</sender> - <signal>activated(int)</signal> - <receiver>MainWindowBase</receiver> - <slot>somethingModified()</slot> - </connection> - <connection> - <sender>comboeffect</sender> - <signal>activated(int)</signal> - <receiver>MainWindowBase</receiver> - <slot>somethingModified()</slot> - </connection> - <connection> - <sender>tooltipeffect</sender> - <signal>activated(int)</signal> - <receiver>MainWindowBase</receiver> - <slot>somethingModified()</slot> - </connection> - <connection> - <sender>strutwidth</sender> - <signal>valueChanged(int)</signal> - <receiver>MainWindowBase</receiver> - <slot>somethingModified()</slot> - </connection> - <connection> - <sender>strutheight</sender> - <signal>valueChanged(int)</signal> - <receiver>MainWindowBase</receiver> - <slot>somethingModified()</slot> - </connection> - <connection> - <sender>effectcheckbox</sender> - <signal>toggled(bool)</signal> - <receiver>MainWindowBase</receiver> - <slot>somethingModified()</slot> - </connection> - <connection> - <sender>resolvelinks</sender> - <signal>toggled(bool)</signal> - <receiver>MainWindowBase</receiver> - <slot>somethingModified()</slot> - </connection> - <connection> - <sender>fontembeddingcheckbox</sender> - <signal>clicked()</signal> - <receiver>MainWindowBase</receiver> - <slot>somethingModified()</slot> - </connection> - <connection> - <sender>rtlExtensions</sender> - <signal>toggled(bool)</signal> - <receiver>MainWindowBase</receiver> - <slot>somethingModified()</slot> - </connection> - <connection> - <sender>inputStyle</sender> - <signal>activated(int)</signal> - <receiver>MainWindowBase</receiver> - <slot>somethingModified()</slot> - </connection> - <connection> - <sender>inputMethodCombo</sender> - <signal>activated(int)</signal> - <receiver>MainWindowBase</receiver> - <slot>somethingModified()</slot> - </connection> - <connection> - <sender>gstylecombo</sender> - <signal>activated(const TQString&)</signal> - <receiver>MainWindowBase</receiver> - <slot>styleSelected(const TQString&)</slot> - </connection> - <connection> - <sender>familysubcombo</sender> - <signal>activated(const TQString&)</signal> - <receiver>MainWindowBase</receiver> - <slot>substituteSelected(const TQString&)</slot> - </connection> - <connection> - <sender>btnAdvanced</sender> - <signal>clicked()</signal> - <receiver>MainWindowBase</receiver> - <slot>tunePalette()</slot> - </connection> - <connection> - <sender>PushButton11</sender> - <signal>clicked()</signal> - <receiver>MainWindowBase</receiver> - <slot>upFontpath()</slot> - </connection> - <connection> - <sender>PushButton7</sender> - <signal>clicked()</signal> - <receiver>MainWindowBase</receiver> - <slot>upLibpath()</slot> - </connection> - <connection> - <sender>PushButton2</sender> - <signal>clicked()</signal> - <receiver>MainWindowBase</receiver> - <slot>upSubstitute()</slot> - </connection> -</connections> -<tabstops> - <tabstop>helpview</tabstop> - <tabstop>TabWidget3</tabstop> - <tabstop>familycombo</tabstop> - <tabstop>stylecombo</tabstop> - <tabstop>psizecombo</tabstop> - <tabstop>samplelineedit</tabstop> - <tabstop>familysubcombo</tabstop> - <tabstop>PushButton2</tabstop> - <tabstop>PushButton3</tabstop> - <tabstop>PushButton4</tabstop> - <tabstop>choosesubcombo</tabstop> - <tabstop>PushButton1</tabstop> - <tabstop>dcispin</tabstop> - <tabstop>cfispin</tabstop> - <tabstop>wslspin</tabstop> - <tabstop>effectcheckbox</tabstop> - <tabstop>menueffect</tabstop> - <tabstop>comboeffect</tabstop> - <tabstop>tooltipeffect</tabstop> - <tabstop>strutwidth</tabstop> - <tabstop>strutheight</tabstop> - <tabstop>libpathlineedit</tabstop> - <tabstop>PushButton5</tabstop> - <tabstop>PushButton6</tabstop> - <tabstop>PushButton7</tabstop> - <tabstop>PushButton8</tabstop> - <tabstop>PushButton9</tabstop> - <tabstop>sublistbox</tabstop> - <tabstop>libpathlistbox</tabstop> -</tabstops> -<Q_SLOTS> - <slot access="protected">init()</slot> - <slot access="protected">destroy()</slot> - <slot>addFontpath()</slot> - <slot>addLibpath()</slot> - <slot>addSubstitute()</slot> - <slot>browseFontpath()</slot> - <slot>browseLibpath()</slot> - <slot>buildFont()</slot> - <slot>buildPalette()</slot> - <slot>downFontpath()</slot> - <slot>downLibpath()</slot> - <slot>downSubstitute()</slot> - <slot>familySelected( const TQString & )</slot> - <slot>fileExit()</slot> - <slot>fileSave()</slot> - <slot>helpAbout()</slot> - <slot>helpAboutTQt()</slot> - <slot>new_slot()</slot> - <slot>pageChanged( TQWidget * )</slot> - <slot>paletteSelected( int )</slot> - <slot>removeFontpath()</slot> - <slot>removeLibpath()</slot> - <slot>removeSubstitute()</slot> - <slot>somethingModified()</slot> - <slot>styleSelected( const TQString & )</slot> - <slot>substituteSelected( const TQString & )</slot> - <slot>tunePalette()</slot> - <slot>upFontpath()</slot> - <slot>upLibpath()</slot> - <slot>upSubstitute()</slot> -</Q_SLOTS> -<pixmapinproject/> -<layoutdefaults spacing="4" margin="8"/> -<includehints> - <includehint>colorbutton.h</includehint> - <includehint>colorbutton.h</includehint> - <includehint>previewframe.h</includehint> -</includehints> -</UI> diff --git a/tqtinterface/qt4/tools/qtconfig/paletteeditoradvanced.cpp b/tqtinterface/qt4/tools/qtconfig/paletteeditoradvanced.cpp deleted file mode 100644 index 36a5927..0000000 --- a/tqtinterface/qt4/tools/qtconfig/paletteeditoradvanced.cpp +++ /dev/null @@ -1,615 +0,0 @@ -/********************************************************************** -** Copyright (C) 2005-2008 Trolltech ASA. All rights reserved. -** -** This file is part of TQt Configuration. -** -** 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 files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at [email protected]. -** -** Licensees holding valid TQt Commercial licenses may use this file in -** accordance with the TQt Commercial License Agreement provided with -** the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#include "paletteeditoradvanced.h" -#include "colorbutton.h" - -#include <tqcheckbox.h> -#include <tqcombobox.h> -#include <tqapplication.h> -#include <tqpushbutton.h> -#include <tqlistbox.h> -#include <tqpainter.h> -#include <tqgroupbox.h> - -/*! - Class used by PaletteEditor for bold combobox items -*/ - -class BoldListBoxText : public TQListBoxText -{ -public: - BoldListBoxText( TQString text, TQListBox* lb = 0 ); - -protected: - virtual void paint( TQPainter* ); -}; - -BoldListBoxText::BoldListBoxText( TQString text, TQListBox* lb ) - : TQListBoxText( lb ) -{ - setText( text ); -} - -void BoldListBoxText::paint( TQPainter* painter ) -{ - TQFont f = painter->font(); - f.setBold( TRUE ); - painter->setFont( f ); - - TQListBoxText::paint( painter ); -} - -PaletteEditorAdvanced::PaletteEditorAdvanced( TQWidget * parent, - const char * name, bool modal, WFlags f ) - : PaletteEditorAdvancedBase( parent, name, modal, f ), selectedPalette(0) -{ - editPalette = TQApplication::palette(); - setPreviewPalette( editPalette ); -} - -PaletteEditorAdvanced::~PaletteEditorAdvanced() -{ -} - -void PaletteEditorAdvanced::onToggleBuildInactive( bool v ) -{ - if (selectedPalette == 1) { - groupCentral->setDisabled(v); - groupEffect->setDisabled(v); - } - - if (v) { - buildInactive(); - updateColorButtons(); - } -} - -void PaletteEditorAdvanced::onToggleBuildDisabled( bool v ) -{ - if (selectedPalette == 2) { - groupCentral->setDisabled(v); - groupEffect->setDisabled(v); - } - - if (v) { - buildDisabled(); - updateColorButtons(); - } -} - -void PaletteEditorAdvanced::paletteSelected(int p) -{ - selectedPalette = p; - - if(p == 1) { // inactive - groupCentral->setDisabled(checkBuildInactive->isChecked()); - groupEffect->setDisabled(checkBuildInactive->isChecked()); - } - else if (p == 2) { // disabled - groupCentral->setDisabled(checkBuildDisabled->isChecked()); - groupEffect->setDisabled(checkBuildDisabled->isChecked()); - } - else { - groupCentral->setEnabled(TRUE); - groupEffect->setEnabled(TRUE); - } - updateColorButtons(); -} - -void PaletteEditorAdvanced::onChooseCentralColor() -{ - switch(selectedPalette) { - case 0: - default: - mapToActiveCentralRole( buttonCentral->color() ); - break; - case 1: - mapToInactiveCentralRole( buttonCentral->color() ); - break; - case 2: - mapToDisabledCentralRole( buttonCentral->color() ); - break; - } - updateColorButtons(); -} - -void PaletteEditorAdvanced::onChooseEffectColor() -{ - switch(selectedPalette) { - case 0: - default: - mapToActiveEffectRole( buttonEffect->color() ); - break; - case 1: - mapToInactiveEffectRole( buttonEffect->color() ); - break; - case 2: - mapToDisabledEffectRole( buttonEffect->color() ); - break; - } - updateColorButtons(); -} - -void PaletteEditorAdvanced::onToggleBuildEffects( bool on ) -{ - if (!on) return; - buildActiveEffect(); - buildInactiveEffect(); - buildDisabledEffect(); -} - -TQColorGroup::ColorRole PaletteEditorAdvanced::centralFromItem( int item ) -{ - switch( item ) { - case 0: - return TQColorGroup::Background; - case 1: - return TQColorGroup::Foreground; - case 2: - return TQColorGroup::Button; - case 3: - return TQColorGroup::Base; - case 4: - return TQColorGroup::Text; - case 5: - return TQColorGroup::BrightText; - case 6: - return TQColorGroup::ButtonText; - case 7: - return TQColorGroup::Highlight; - case 8: - return TQColorGroup::HighlightedText; - case 9: - return TQColorGroup::Link; - case 10: - return TQColorGroup::LinkVisited; - default: - return TQColorGroup::NColorRoles; - } -} - -TQColorGroup::ColorRole PaletteEditorAdvanced::effectFromItem( int item ) -{ - switch( item ) { - case 0: - return TQColorGroup::Light; - case 1: - return TQColorGroup::Midlight; - case 2: - return TQColorGroup::Mid; - case 3: - return TQColorGroup::Dark; - case 4: - return TQColorGroup::Shadow; - default: - return TQColorGroup::NColorRoles; - } -} - -void PaletteEditorAdvanced::onCentral( int item ) -{ - TQColor c; - - switch(selectedPalette) { - case 0: - default: - c = editPalette.active().color( centralFromItem(item) ); - break; - case 1: - c = editPalette.inactive().color( centralFromItem(item) ); - break; - case 2: - c = editPalette.disabled().color( centralFromItem(item) ); - break; - } - - buttonCentral->setColor(c); -} - -void PaletteEditorAdvanced::onEffect( int item ) -{ - TQColor c; - switch(selectedPalette) { - case 0: - default: - c = editPalette.active().color( effectFromItem(item) ); - break; - case 1: - editPalette.inactive().color( effectFromItem(item) ); - break; - case 2: - editPalette.disabled().color( effectFromItem(item) ); - break; - } - buttonEffect->setColor(c); -} - -void PaletteEditorAdvanced::mapToActiveCentralRole( const TQColor& c ) -{ - TQColorGroup cg = editPalette.active(); - cg.setColor( centralFromItem(comboCentral->currentItem()), c ); - editPalette.setActive( cg ); - - buildActiveEffect(); - if(checkBuildInactive->isChecked()) - buildInactive(); - if(checkBuildDisabled->isChecked()) - buildDisabled(); - - setPreviewPalette( editPalette ); -} - -void PaletteEditorAdvanced::mapToActiveEffectRole( const TQColor& c ) -{ - TQColorGroup cg = editPalette.active(); - cg.setColor( effectFromItem(comboEffect->currentItem()), c ); - editPalette.setActive( cg ); - - if(checkBuildInactive->isChecked()) - buildInactive(); - if(checkBuildDisabled->isChecked()) - buildDisabled(); - - setPreviewPalette( editPalette ); -} - -void PaletteEditorAdvanced::mapToActivePixmapRole( const TQPixmap& pm ) -{ - TQColorGroup::ColorRole role = centralFromItem(comboCentral->currentItem()); - TQColorGroup cg = editPalette.active(); - if ( !pm.isNull() ) - cg.setBrush( role, TQBrush( cg.color( role ), pm ) ); - else - cg.setBrush( role, TQBrush( cg.color( role ) ) ); - editPalette.setActive( cg ); - - - buildActiveEffect(); - if(checkBuildInactive->isChecked()) - buildInactive(); - if(checkBuildDisabled->isChecked()) - buildDisabled(); - - setPreviewPalette( editPalette ); -} - -void PaletteEditorAdvanced::mapToInactiveCentralRole( const TQColor& c ) -{ - TQColorGroup cg = editPalette.inactive(); - cg.setColor( centralFromItem(comboCentral->currentItem()), c ); - editPalette.setInactive( cg ); - - buildInactiveEffect(); - - setPreviewPalette( editPalette ); -} - -void PaletteEditorAdvanced::mapToInactiveEffectRole( const TQColor& c ) -{ - TQColorGroup cg = editPalette.inactive(); - cg.setColor( effectFromItem(comboEffect->currentItem()), c ); - editPalette.setInactive( cg ); - - setPreviewPalette( editPalette ); -} - -void PaletteEditorAdvanced::mapToInactivePixmapRole( const TQPixmap& pm ) -{ - TQColorGroup::ColorRole role = centralFromItem(comboCentral->currentItem()); - TQColorGroup cg = editPalette.inactive(); - if ( !pm.isNull() ) - cg.setBrush( role, TQBrush( cg.color( role ), pm ) ); - else - cg.setBrush( role, TQBrush( cg.color( role ) ) ); - editPalette.setInactive( cg ); - - setPreviewPalette( editPalette ); -} - -void PaletteEditorAdvanced::mapToDisabledCentralRole( const TQColor& c ) -{ - TQColorGroup cg = editPalette.disabled(); - cg.setColor( centralFromItem(comboCentral->currentItem()), c ); - editPalette.setDisabled( cg ); - - buildDisabledEffect(); - - setPreviewPalette( editPalette ); -} - -void PaletteEditorAdvanced::mapToDisabledEffectRole( const TQColor& c ) -{ - TQColorGroup cg = editPalette.disabled(); - cg.setColor( effectFromItem(comboEffect->currentItem()), c ); - editPalette.setDisabled( cg ); - - setPreviewPalette( editPalette ); -} - -void PaletteEditorAdvanced::mapToDisabledPixmapRole( const TQPixmap& pm ) -{ - TQColorGroup::ColorRole role = centralFromItem(comboCentral->currentItem()); - TQColorGroup cg = editPalette.disabled(); - if ( !pm.isNull() ) - cg.setBrush( role, TQBrush( cg.color( role ), pm ) ); - else - cg.setBrush( role, TQBrush( cg.color( role ) ) ); - - editPalette.setDisabled( cg ); - - setPreviewPalette( editPalette ); -} - -void PaletteEditorAdvanced::buildActiveEffect() -{ - TQColorGroup cg = editPalette.active(); - TQColor btn = cg.color( TQColorGroup::Button ); - - TQPalette temp( btn, btn ); - - for (int i = 0; i<5; i++) - cg.setColor( effectFromItem(i), temp.active().color( effectFromItem(i) ) ); - - editPalette.setActive( cg ); - setPreviewPalette( editPalette ); - - updateColorButtons(); -} - -void PaletteEditorAdvanced::buildInactive() -{ - editPalette.setInactive( editPalette.active() ); - if ( checkBuildEffect->isChecked() ) - buildInactiveEffect(); - else { - setPreviewPalette( editPalette ); - updateColorButtons(); - } - -} - -void PaletteEditorAdvanced::buildInactiveEffect() -{ - TQColorGroup cg = editPalette.inactive(); - - TQColor light, midlight, mid, dark, shadow; - TQColor btn = cg.color( TQColorGroup::Button ); - - light = btn.light(150); - midlight = btn.light(115); - mid = btn.dark(150); - dark = btn.dark(); - shadow = Qt::black; - - cg.setColor( TQColorGroup::Light, light ); - cg.setColor( TQColorGroup::Midlight, midlight ); - cg.setColor( TQColorGroup::Mid, mid ); - cg.setColor( TQColorGroup::Dark, dark ); - cg.setColor( TQColorGroup::Shadow, shadow ); - - editPalette.setInactive( cg ); - setPreviewPalette( editPalette ); - updateColorButtons(); -} - -void PaletteEditorAdvanced::buildDisabled() -{ - TQColorGroup cg = editPalette.active(); - cg.setColor( TQColorGroup::ButtonText, Qt::darkGray ); - cg.setColor( TQColorGroup::Foreground, Qt::darkGray ); - cg.setColor( TQColorGroup::Text, Qt::darkGray ); - cg.setColor( TQColorGroup::HighlightedText, Qt::darkGray ); - editPalette.setDisabled( cg ); - - if ( checkBuildEffect->isChecked() ) - buildDisabledEffect(); - else { - setPreviewPalette( editPalette ); - updateColorButtons(); - } -} - -void PaletteEditorAdvanced::buildDisabledEffect() -{ - TQColorGroup cg = editPalette.disabled(); - - TQColor light, midlight, mid, dark, shadow; - TQColor btn = cg.color( TQColorGroup::Button ); - - light = btn.light(150); - midlight = btn.light(115); - mid = btn.dark(150); - dark = btn.dark(); - shadow = Qt::black; - - cg.setColor( TQColorGroup::Light, light ); - cg.setColor( TQColorGroup::Midlight, midlight ); - cg.setColor( TQColorGroup::Mid, mid ); - cg.setColor( TQColorGroup::Dark, dark ); - cg.setColor( TQColorGroup::Shadow, shadow ); - - editPalette.setDisabled( cg ); - setPreviewPalette( editPalette ); - updateColorButtons(); -} - -void PaletteEditorAdvanced::setPreviewPalette( const TQPalette& pal ) -{ - TQColorGroup cg; - - switch (selectedPalette) { - case 0: - default: - cg = pal.active(); - break; - case 1: - cg = pal.inactive(); - break; - case 2: - cg = pal.disabled(); - break; - } - previewPalette.setActive( cg ); - previewPalette.setInactive( cg ); - previewPalette.setDisabled( cg ); -} - -void PaletteEditorAdvanced::updateColorButtons() -{ - TQColor central, effect; - switch (selectedPalette) { - case 0: - default: - central = editPalette.active().color( centralFromItem( comboCentral->currentItem() ) ); - effect = editPalette.active().color( effectFromItem( comboEffect->currentItem() ) ); - break; - case 1: - central = editPalette.inactive().color( centralFromItem( comboCentral->currentItem() ) ); - effect = editPalette.inactive().color( effectFromItem( comboEffect->currentItem() ) ); - break; - case 2: - central = editPalette.disabled().color( centralFromItem( comboCentral->currentItem() ) ); - effect = editPalette.disabled().color( effectFromItem( comboEffect->currentItem() ) ); - break; - } - - buttonCentral->setColor(central); - buttonEffect->setColor(effect); -} - -void PaletteEditorAdvanced::setPal( const TQPalette& pal ) -{ - editPalette = pal; - setPreviewPalette( pal ); - updateColorButtons(); -} - -TQPalette PaletteEditorAdvanced::pal() const -{ - return editPalette; -} - -void PaletteEditorAdvanced::setupBackgroundMode( TQt::BackgroundMode mode ) -{ - int initRole = 0; - - switch( mode ) { - case TQt::PaletteBackground: - initRole = 0; - break; - case TQt::PaletteForeground: - initRole = 1; - break; - case TQt::PaletteButton: - initRole = 2; - break; - case TQt::PaletteBase: - initRole = 3; - break; - case TQt::PaletteText: - initRole = 4; - break; - case TQt::PaletteBrightText: - initRole = 5; - break; - case TQt::PaletteButtonText: - initRole = 6; - break; - case TQt::PaletteHighlight: - initRole = 7; - break; - case TQt::PaletteHighlightedText: - initRole = 8; - break; - case TQt::PaletteLight: - initRole = 9; - break; - case TQt::PaletteMidlight: - initRole = 10; - break; - case TQt::PaletteDark: - initRole = 11; - break; - case TQt::PaletteMid: - initRole = 12; - break; - case TQt::PaletteShadow: - initRole = 13; - break; - default: - initRole = -1; - break; - } - - if ( initRole <= -1 ) return; - - if (initRole > 8 ) { - comboEffect->setCurrentItem( initRole - 9 ); - if ( comboEffect->listBox() ) { - TQString text = comboEffect->currentText(); - comboEffect->listBox()->changeItem( new BoldListBoxText( text ), initRole - 9 ); - } - } - else { - comboCentral->setCurrentItem( initRole ); - if ( comboCentral->listBox() ) { - TQString text = comboCentral->currentText(); - comboCentral->listBox()->changeItem( new BoldListBoxText( text ), initRole ); - } - } -} - -TQPalette PaletteEditorAdvanced::getPalette( bool *ok, const TQPalette &init, - TQt::BackgroundMode mode, TQWidget* parent, - const char* name ) -{ - PaletteEditorAdvanced* dlg = new PaletteEditorAdvanced( parent, name, TRUE ); - dlg->setupBackgroundMode( mode ); - - if ( init != TQPalette() ) - dlg->setPal( init ); - int resultCode = dlg->exec(); - - TQPalette result = init; - if ( resultCode == TQDialog::Accepted ) { - if ( ok ) - *ok = TRUE; - result = dlg->pal(); - } else { - if ( ok ) - *ok = FALSE; - } - delete dlg; - return result; -} diff --git a/tqtinterface/qt4/tools/qtconfig/paletteeditoradvanced.h b/tqtinterface/qt4/tools/qtconfig/paletteeditoradvanced.h deleted file mode 100644 index d78bc85..0000000 --- a/tqtinterface/qt4/tools/qtconfig/paletteeditoradvanced.h +++ /dev/null @@ -1,99 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2008 Trolltech ASA. All rights reserved. -** -** This file is part of TQt Configuration. -** -** 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 files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at [email protected]. -** -** Licensees holding valid TQt Commercial licenses may use this file in -** accordance with the TQt Commercial License Agreement provided with -** the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef PALETTEEDITORADVANCED_H -#define PALETTEEDITORADVANCED_H - -#include "paletteeditoradvancedbase.h" - -class PaletteEditorAdvanced : public PaletteEditorAdvancedBase -{ - Q_OBJECT - TQ_OBJECT -public: - PaletteEditorAdvanced( TQWidget * parent=0, const char * name=0, - bool modal=FALSE, WFlags f=0 ); - ~PaletteEditorAdvanced(); - - static TQPalette getPalette( bool *ok, const TQPalette &pal, TQt::BackgroundMode mode = TQt::PaletteBackground, - TQWidget* parent = 0, const char* name = 0 ); - -protected Q_SLOTS: - void paletteSelected(int); - - void onCentral( int ); - void onEffect( int ); - - void onChooseCentralColor(); - void onChooseEffectColor(); - - void onToggleBuildEffects( bool ); - void onToggleBuildInactive( bool ); - void onToggleBuildDisabled( bool ); - -protected: - void mapToActiveCentralRole( const TQColor& ); - void mapToActiveEffectRole( const TQColor& ); - void mapToActivePixmapRole( const TQPixmap& ); - void mapToInactiveCentralRole( const TQColor& ); - void mapToInactiveEffectRole( const TQColor& ); - void mapToInactivePixmapRole( const TQPixmap& ); - void mapToDisabledCentralRole( const TQColor& ); - void mapToDisabledEffectRole( const TQColor& ); - void mapToDisabledPixmapRole( const TQPixmap& ); - - - void buildPalette(); - void buildActiveEffect(); - void buildInactive(); - void buildInactiveEffect(); - void buildDisabled(); - void buildDisabledEffect(); - -private: - void setPreviewPalette( const TQPalette& ); - void updateColorButtons(); - void setupBackgroundMode( TQt::BackgroundMode ); - - TQPalette pal() const; - void setPal( const TQPalette& ); - - TQColorGroup::ColorRole centralFromItem( int ); - TQColorGroup::ColorRole effectFromItem( int ); - TQPalette editPalette; - TQPalette previewPalette; - - int selectedPalette; -}; - -#endif diff --git a/tqtinterface/qt4/tools/qtconfig/paletteeditoradvancedbase.ui b/tqtinterface/qt4/tools/qtconfig/paletteeditoradvancedbase.ui deleted file mode 100644 index 8daf961..0000000 --- a/tqtinterface/qt4/tools/qtconfig/paletteeditoradvancedbase.ui +++ /dev/null @@ -1,682 +0,0 @@ -<!DOCTYPE UI><UI version="3.0" stdsetdef="1"> -<class>PaletteEditorAdvancedBase</class> -<comment>********************************************************************* -** Copyright (C) 2000-2008 Trolltech ASA. All rights reserved. -** -** This file is part of Qt Designer. -** -** 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 files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free Qt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at [email protected]. -** -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with -** the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -*********************************************************************</comment> -<widget class="TQDialog"> - <property name="name"> - <cstring>PaletteEditorAdvancedBase</cstring> - </property> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>295</width> - <height>346</height> - </rect> - </property> - <property name="caption"> - <string>Tune Palette</string> - </property> - <property name="sizeGripEnabled"> - <bool>true</bool> - </property> - <property name="whatsThis" stdset="0"> - <string><b>Edit Palette</b><p>Change the palette of the current widget or form.</p><p>Use a generated palette or select colors for each color group and each color role.</p><p>The palette can be tested with different widget layouts in the preview section.</p></string> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>11</number> - </property> - <property name="spacing"> - <number>6</number> - </property> - <widget class="TQLayoutWidget"> - <property name="name"> - <cstring>Layout14</cstring> - </property> - <hbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <property name="spacing"> - <number>6</number> - </property> - <widget class="TQLabel"> - <property name="name"> - <cstring>TextLabel1</cstring> - </property> - <property name="frameShape"> - <enum>MShape</enum> - </property> - <property name="frameShadow"> - <enum>MShadow</enum> - </property> - <property name="text"> - <string>Select &Palette:</string> - </property> - <property name="buddy" stdset="0"> - <cstring>paletteCombo</cstring> - </property> - </widget> - <widget class="TQComboBox"> - <item> - <property name="text"> - <string>Active Palette</string> - </property> - </item> - <item> - <property name="text"> - <string>Inactive Palette</string> - </property> - </item> - <item> - <property name="text"> - <string>Disabled Palette</string> - </property> - </item> - <property name="name"> - <cstring>paletteCombo</cstring> - </property> - </widget> - </hbox> - </widget> - <widget class="TQButtonGroup"> - <property name="name"> - <cstring>ButtonGroup1</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>5</hsizetype> - <vsizetype>4</vsizetype> - </sizepolicy> - </property> - <property name="title"> - <string>Auto</string> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>11</number> - </property> - <property name="spacing"> - <number>6</number> - </property> - <widget class="TQCheckBox"> - <property name="name"> - <cstring>checkBuildInactive</cstring> - </property> - <property name="text"> - <string>Build inactive palette from active.</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - <widget class="TQCheckBox"> - <property name="name"> - <cstring>checkBuildDisabled</cstring> - </property> - <property name="text"> - <string>Build disabled palette from active.</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - </vbox> - </widget> - <widget class="TQGroupBox"> - <property name="name"> - <cstring>groupCentral</cstring> - </property> - <property name="title"> - <string>Central color &roles</string> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>11</number> - </property> - <property name="spacing"> - <number>6</number> - </property> - <widget class="TQComboBox"> - <item> - <property name="text"> - <string>Background</string> - </property> - </item> - <item> - <property name="text"> - <string>Foreground</string> - </property> - </item> - <item> - <property name="text"> - <string>Button</string> - </property> - </item> - <item> - <property name="text"> - <string>Base</string> - </property> - </item> - <item> - <property name="text"> - <string>Text</string> - </property> - </item> - <item> - <property name="text"> - <string>BrightText</string> - </property> - </item> - <item> - <property name="text"> - <string>ButtonText</string> - </property> - </item> - <item> - <property name="text"> - <string>Highlight</string> - </property> - </item> - <item> - <property name="text"> - <string>HighlightText</string> - </property> - </item> - <item> - <property name="text"> - <string>Link</string> - </property> - </item> - <item> - <property name="text"> - <string>LinkVisited</string> - </property> - </item> - <property name="name"> - <cstring>comboCentral</cstring> - </property> - <property name="toolTip" stdset="0"> - <string>Choose central color role</string> - </property> - <property name="whatsThis" stdset="0"> - <string><b>Select a color role.</b><p>Available central roles are: <ul> <li>Background - general background color.</li> <li>Foreground - general foreground color. </li> <li>Base - used as background color for e.g. text entry widgets, usually white or another light color. </li> <li>Text - the forground color used with Base. Usually this is the same as the Foreground, in what case it must provide good contrast both with Background and Base. </li> <li>Button - general button background color, where buttons need a background different from Background, as in the Macintosh style. </li> <li>ButtonText - a foreground color used with the Button color. </li> <li>Highlight - a color to indicate a selected or highlighted item. </li> <li>HighlightedText - a text color that contrasts to Highlight. </li> <li>BrightText - a text color that is very different from Foreground and contrasts well with e.g. black. </li> </ul> </p></string> - </property> - </widget> - <widget class="TQLayoutWidget"> - <property name="name"> - <cstring>Layout32_2</cstring> - </property> - <hbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <property name="spacing"> - <number>6</number> - </property> - <spacer> - <property name="name"> - <cstring>Horizontal_Spacing1</cstring> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="tqsizeHint"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - <widget class="TQLabel"> - <property name="name"> - <cstring>labelCentral</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>1</hsizetype> - <vsizetype>1</vsizetype> - </sizepolicy> - </property> - <property name="tqminimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="text"> - <string>&Select Color:</string> - </property> - <property name="buddy" stdset="0"> - <cstring>buttonCentral</cstring> - </property> - </widget> - <widget class="ColorButton"> - <property name="name"> - <cstring>buttonCentral</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>0</hsizetype> - <vsizetype>0</vsizetype> - </sizepolicy> - </property> - <property name="focusPolicy"> - <enum>TabFocus</enum> - </property> - <property name="toolTip" stdset="0"> - <string>Choose a color</string> - </property> - <property name="whatsThis" stdset="0"> - <string>Choose a color for the selected central color role.</string> - </property> - </widget> - </hbox> - </widget> - </vbox> - </widget> - <widget class="TQGroupBox"> - <property name="name"> - <cstring>groupEffect</cstring> - </property> - <property name="title"> - <string>3-D shadow &effects</string> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>11</number> - </property> - <property name="spacing"> - <number>6</number> - </property> - <widget class="TQLayoutWidget"> - <property name="name"> - <cstring>Layout32_3</cstring> - </property> - <hbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <property name="spacing"> - <number>6</number> - </property> - <widget class="TQCheckBox"> - <property name="name"> - <cstring>checkBuildEffect</cstring> - </property> - <property name="text"> - <string>Build &from button color</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - <property name="toolTip" stdset="0"> - <string>Generate shadings</string> - </property> - <property name="whatsThis" stdset="0"> - <string>Check to let 3D-effect colors be calculated from button-color.</string> - </property> - </widget> - <widget class="TQComboBox"> - <item> - <property name="text"> - <string>Light</string> - </property> - </item> - <item> - <property name="text"> - <string>Midlight</string> - </property> - </item> - <item> - <property name="text"> - <string>Mid</string> - </property> - </item> - <item> - <property name="text"> - <string>Dark</string> - </property> - </item> - <item> - <property name="text"> - <string>Shadow</string> - </property> - </item> - <property name="name"> - <cstring>comboEffect</cstring> - </property> - <property name="toolTip" stdset="0"> - <string>Choose 3D-effect color role</string> - </property> - <property name="whatsThis" stdset="0"> - <string><b>Select a color role.</b><p>Available effect roles are: <ul> <li>Light - lighter than Button color. </li> <li>Midlight - between Button and Light. </li> <li>Mid - between Button and Dark. </li> <li>Dark - darker than Button. </li> <li>Shadow - a very dark color. </li> </ul></string> - </property> - </widget> - </hbox> - </widget> - <widget class="TQLayoutWidget"> - <property name="name"> - <cstring>Layout31_2</cstring> - </property> - <hbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <property name="spacing"> - <number>6</number> - </property> - <spacer> - <property name="name"> - <cstring>Horizontal_Spacing3</cstring> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="tqsizeHint"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - <widget class="TQLabel"> - <property name="name"> - <cstring>labelEffect</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>1</hsizetype> - <vsizetype>1</vsizetype> - </sizepolicy> - </property> - <property name="tqminimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="text"> - <string>Select Co&lor:</string> - </property> - <property name="buddy" stdset="0"> - <cstring>buttonEffect</cstring> - </property> - </widget> - <widget class="ColorButton"> - <property name="name"> - <cstring>buttonEffect</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>0</hsizetype> - <vsizetype>0</vsizetype> - </sizepolicy> - </property> - <property name="focusPolicy"> - <enum>TabFocus</enum> - </property> - <property name="toolTip" stdset="0"> - <string>Choose a color</string> - </property> - <property name="whatsThis" stdset="0"> - <string>Choose a color for the selected effect color role.</string> - </property> - </widget> - </hbox> - </widget> - </vbox> - </widget> - <widget class="TQLayoutWidget"> - <property name="name"> - <cstring>Layout3</cstring> - </property> - <hbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <property name="spacing"> - <number>6</number> - </property> - <spacer> - <property name="name"> - <cstring>Horizontal_Spacing2</cstring> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="tqsizeHint"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - <widget class="TQPushButton"> - <property name="name"> - <cstring>buttonOk</cstring> - </property> - <property name="text"> - <string>OK</string> - </property> - <property name="autoDefault"> - <bool>true</bool> - </property> - <property name="default"> - <bool>true</bool> - </property> - <property name="whatsThis" stdset="0"> - <string>Close dialog and apply all changes.</string> - </property> - </widget> - <widget class="TQPushButton"> - <property name="name"> - <cstring>buttonCancel</cstring> - </property> - <property name="text"> - <string>Cancel</string> - </property> - <property name="autoDefault"> - <bool>true</bool> - </property> - <property name="whatsThis" stdset="0"> - <string>Close dialog and discard all changes.</string> - </property> - </widget> - </hbox> - </widget> - </vbox> -</widget> -<customwidgets> - <customwidget> - <class>ColorButton</class> - <header location="local">colorbutton.h</header> - <sizehint> - <width>40</width> - <height>25</height> - </sizehint> - <container>0</container> - <sizepolicy> - <hordata>5</hordata> - <verdata>5</verdata> - </sizepolicy> - <pixmap>image0</pixmap> - <signal>clicked()</signal> - <signal>colorChanged(const QColor &)</signal> - <signal>changed()</signal> - <property type="Color">color</property> - <property type="Pixmap">pixmap</property> - </customwidget> -</customwidgets> -<images> - <image name="image0"> - <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> - </image> -</images> -<connections> - <connection> - <sender>buttonOk</sender> - <signal>clicked()</signal> - <receiver>PaletteEditorAdvancedBase</receiver> - <slot>accept()</slot> - </connection> - <connection> - <sender>buttonCancel</sender> - <signal>clicked()</signal> - <receiver>PaletteEditorAdvancedBase</receiver> - <slot>reject()</slot> - </connection> - <connection> - <sender>paletteCombo</sender> - <signal>activated(int)</signal> - <receiver>PaletteEditorAdvancedBase</receiver> - <slot>paletteSelected(int)</slot> - </connection> - <connection> - <sender>comboCentral</sender> - <signal>activated(int)</signal> - <receiver>PaletteEditorAdvancedBase</receiver> - <slot>onCentral(int)</slot> - </connection> - <connection> - <sender>buttonCentral</sender> - <signal>clicked()</signal> - <receiver>PaletteEditorAdvancedBase</receiver> - <slot>onChooseCentralColor()</slot> - </connection> - <connection> - <sender>buttonEffect</sender> - <signal>clicked()</signal> - <receiver>PaletteEditorAdvancedBase</receiver> - <slot>onChooseEffectColor()</slot> - </connection> - <connection> - <sender>comboEffect</sender> - <signal>activated(int)</signal> - <receiver>PaletteEditorAdvancedBase</receiver> - <slot>onEffect(int)</slot> - </connection> - <connection> - <sender>checkBuildEffect</sender> - <signal>toggled(bool)</signal> - <receiver>PaletteEditorAdvancedBase</receiver> - <slot>onToggleBuildEffects(bool)</slot> - </connection> - <connection> - <sender>checkBuildEffect</sender> - <signal>toggled(bool)</signal> - <receiver>comboEffect</receiver> - <slot>setDisabled(bool)</slot> - </connection> - <connection> - <sender>checkBuildEffect</sender> - <signal>toggled(bool)</signal> - <receiver>buttonEffect</receiver> - <slot>setDisabled(bool)</slot> - </connection> - <connection> - <sender>checkBuildInactive</sender> - <signal>toggled(bool)</signal> - <receiver>PaletteEditorAdvancedBase</receiver> - <slot>onToggleBuildInactive(bool)</slot> - </connection> - <connection> - <sender>checkBuildDisabled</sender> - <signal>toggled(bool)</signal> - <receiver>PaletteEditorAdvancedBase</receiver> - <slot>onToggleBuildDisabled(bool)</slot> - </connection> - <slot access="protected" language="C++" returnType="void">init()</slot> - <slot access="protected" language="C++" returnType="void">destroy()</slot> - <slot access="protected" language="C++" returnType="void">onCentral(int)</slot> - <slot access="protected" language="C++" returnType="void">onChooseCentralColor()</slot> - <slot access="protected" language="C++" returnType="void">onChooseEffectColor()</slot> - <slot access="protected" language="C++" returnType="void">onEffect(int)</slot> - <slot access="protected" language="C++" returnType="void">onToggleBuildDisabled(bool)</slot> - <slot access="protected" language="C++" returnType="void">onToggleBuildEffects(bool)</slot> - <slot access="protected" language="C++" returnType="void">onToggleBuildInactive(bool)</slot> - <slot access="protected" language="C++" returnType="void">paletteSelected(int)</slot> -</connections> -<tabstops> - <tabstop>buttonOk</tabstop> - <tabstop>buttonCancel</tabstop> - <tabstop>paletteCombo</tabstop> - <tabstop>checkBuildInactive</tabstop> - <tabstop>checkBuildDisabled</tabstop> - <tabstop>comboCentral</tabstop> - <tabstop>buttonCentral</tabstop> - <tabstop>checkBuildEffect</tabstop> - <tabstop>comboEffect</tabstop> - <tabstop>buttonEffect</tabstop> -</tabstops> -</UI> diff --git a/tqtinterface/qt4/tools/qtconfig/previewframe.cpp b/tqtinterface/qt4/tools/qtconfig/previewframe.cpp deleted file mode 100644 index 5f926ca..0000000 --- a/tqtinterface/qt4/tools/qtconfig/previewframe.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/********************************************************************** -** Copyright (C) 2005-2008 Trolltech ASA. All rights reserved. -** -** This file is part of TQt Configuration. -** -** 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 files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at [email protected]. -** -** Licensees holding valid TQt Commercial licenses may use this file in -** accordance with the TQt Commercial License Agreement provided with -** the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#include "previewframe.h" - -#include <tqvbox.h> -#include <tqpainter.h> - -PreviewFrame::PreviewFrame( TQWidget *parent, const char *name ) - : TQVBox( parent, name ) -{ - setMinimumSize(200, 200); - setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken); - setLineWidth(1); - - Workspace * w = new Workspace( this ); - w->setEraseColor(tqcolorGroup().dark()); - previewWidget = new PreviewWidget( w ); - previewWidget->move( 10, 10 ); -} - -void PreviewFrame::setPreviewPalette(TQPalette pal) -{ - previewWidget->setPalette(pal); -} - -void Workspace::paintEvent( TQPaintEvent* ) -{ - TQPainter p ( this ); - p.setPen( TQPen( Qt::white ) ); - p.drawText ( 0, height() / 2, width(), height(), TQt::AlignHCenter, - "The moose in the noose\nate the goose who was loose." ); -} diff --git a/tqtinterface/qt4/tools/qtconfig/previewframe.h b/tqtinterface/qt4/tools/qtconfig/previewframe.h deleted file mode 100644 index bb919aa..0000000 --- a/tqtinterface/qt4/tools/qtconfig/previewframe.h +++ /dev/null @@ -1,69 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2008 Trolltech ASA. All rights reserved. -** -** This file is part of TQt Configuration. -** -** 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 files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at [email protected]. -** -** Licensees holding valid TQt Commercial licenses may use this file in -** accordance with the TQt Commercial License Agreement provided with -** the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef PREVIEWFRAME_H -#define PREVIEWFRAME_H - -#include "previewwidget.h" - -#include <tqvbox.h> -#include <tqworkspace.h> - -class Workspace : public TQWorkspace -{ - Q_OBJECT - TQ_OBJECT - -public: - Workspace( TQWidget* parent = 0, const char* name = 0 ) - : TQWorkspace( parent, name ) {} - ~Workspace() {} - -protected: - void paintEvent( TQPaintEvent* ); -}; - -class PreviewFrame : public TQVBox -{ - Q_OBJECT - TQ_OBJECT - -public: - PreviewFrame( TQWidget *parent = 0, const char *name = 0 ); - void setPreviewPalette(TQPalette); - -private: - PreviewWidget *previewWidget; -}; - -#endif diff --git a/tqtinterface/qt4/tools/qtconfig/previewwidget.cpp b/tqtinterface/qt4/tools/qtconfig/previewwidget.cpp deleted file mode 100644 index 70f536c..0000000 --- a/tqtinterface/qt4/tools/qtconfig/previewwidget.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/********************************************************************** -** Copyright (C) 2005-2008 Trolltech ASA. All rights reserved. -** -** This file is part of TQt Configuration. -** -** 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 files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at [email protected]. -** -** Licensees holding valid TQt Commercial licenses may use this file in -** accordance with the TQt Commercial License Agreement provided with -** the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#include "previewwidget.h" - -#include <tqobjectlist.h> - -PreviewWidget::PreviewWidget( TQWidget *parent, const char *name ) - : PreviewWidgetBase( parent, name ) -{ - // install event filter on child widgets - TQObjectList *l = queryList("TQWidget"); - TQObjectListIt it(*l); - TQObject * obj; - while ((obj = it.current()) != 0) { - ++it; - obj->installEventFilter(this); - ((TQWidget*)obj)->setFocusPolicy(Qt::NoFocus); - } -} - - -void PreviewWidget::closeEvent(TQCloseEvent *e) -{ - e->ignore(); -} - - -bool PreviewWidget::eventFilter(TQObject *, TQEvent *e) -{ - switch ( e->type() ) { - case TQEvent::MouseButtonPress: - case TQEvent::MouseButtonRelease: - case TQEvent::MouseButtonDblClick: - case TQEvent::MouseMove: - case TQEvent::KeyPress: - case TQEvent::KeyRelease: - case TQEvent::Enter: - case TQEvent::Leave: - return TRUE; // ignore; - default: - break; - } - return FALSE; -} diff --git a/tqtinterface/qt4/tools/qtconfig/previewwidget.h b/tqtinterface/qt4/tools/qtconfig/previewwidget.h deleted file mode 100644 index 8533a47..0000000 --- a/tqtinterface/qt4/tools/qtconfig/previewwidget.h +++ /dev/null @@ -1,51 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2008 Trolltech ASA. All rights reserved. -** -** This file is part of TQt Configuration. -** -** 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 files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free TQt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at [email protected]. -** -** Licensees holding valid TQt Commercial licenses may use this file in -** accordance with the TQt Commercial License Agreement provided with -** the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef PREVIEWWIDGET_H -#define PREVIEWWIDGET_H - -#include "previewwidgetbase.h" - -class PreviewWidget : public PreviewWidgetBase -{ - Q_OBJECT - TQ_OBJECT - -public: - PreviewWidget( TQWidget *parent = 0, const char *name = 0 ); - - void closeEvent(TQCloseEvent *); - bool eventFilter(TQObject *, TQEvent *); -}; - -#endif diff --git a/tqtinterface/qt4/tools/qtconfig/previewwidgetbase.ui b/tqtinterface/qt4/tools/qtconfig/previewwidgetbase.ui deleted file mode 100644 index a01b57c..0000000 --- a/tqtinterface/qt4/tools/qtconfig/previewwidgetbase.ui +++ /dev/null @@ -1,311 +0,0 @@ -<!DOCTYPE UI><UI version="3.0" stdsetdef="1"> -<class>PreviewWidgetBase</class> -<comment>********************************************************************* -** Copyright (C) 2000-2008 Trolltech ASA. All rights reserved. -** -** This file is part of Qt Configuration. -** -** 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 files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free Qt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at [email protected]. -** -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with -** the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -*********************************************************************</comment> -<widget class="TQWidget"> - <property name="name"> - <cstring>PreviewWidgetBase</cstring> - </property> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>378</width> - <height>236</height> - </rect> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>1</hsizetype> - <vsizetype>1</vsizetype> - </sizepolicy> - </property> - <property name="caption"> - <string>Preview Window</string> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>11</number> - </property> - <property name="spacing"> - <number>6</number> - </property> - <widget class="TQLayoutWidget"> - <property name="name"> - <cstring>Layout6</cstring> - </property> - <hbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <property name="spacing"> - <number>6</number> - </property> - <widget class="TQLayoutWidget"> - <property name="name"> - <cstring>Layout17</cstring> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <property name="spacing"> - <number>6</number> - </property> - <widget class="TQButtonGroup"> - <property name="name"> - <cstring>ButtonGroup1</cstring> - </property> - <property name="title"> - <string>ButtonGroup</string> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>11</number> - </property> - <property name="spacing"> - <number>6</number> - </property> - <widget class="TQRadioButton"> - <property name="name"> - <cstring>RadioButton1</cstring> - </property> - <property name="text"> - <string>RadioButton1</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - <widget class="TQRadioButton"> - <property name="name"> - <cstring>RadioButton2</cstring> - </property> - <property name="text"> - <string>RadioButton2</string> - </property> - </widget> - <widget class="TQRadioButton"> - <property name="name"> - <cstring>RadioButton3</cstring> - </property> - <property name="text"> - <string>RadioButton3</string> - </property> - </widget> - </vbox> - </widget> - <widget class="TQButtonGroup"> - <property name="name"> - <cstring>ButtonGroup2</cstring> - </property> - <property name="title"> - <string>ButtonGroup2</string> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>11</number> - </property> - <property name="spacing"> - <number>6</number> - </property> - <widget class="TQCheckBox"> - <property name="name"> - <cstring>CheckBox1</cstring> - </property> - <property name="text"> - <string>CheckBox1</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - <widget class="TQCheckBox"> - <property name="name"> - <cstring>CheckBox2</cstring> - </property> - <property name="text"> - <string>CheckBox2</string> - </property> - </widget> - </vbox> - </widget> - <widget class="TQProgressBar"> - <property name="name"> - <cstring>ProgressBar1</cstring> - </property> - <property name="progress"> - <number>50</number> - </property> - </widget> - </vbox> - </widget> - <widget class="TQLayoutWidget"> - <property name="name"> - <cstring>Layout5</cstring> - </property> - <vbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <property name="spacing"> - <number>6</number> - </property> - <widget class="TQLineEdit"> - <property name="name"> - <cstring>LineEdit1</cstring> - </property> - <property name="text"> - <string>LineEdit</string> - </property> - </widget> - <widget class="TQComboBox"> - <item> - <property name="text"> - <string>ComboBox</string> - </property> - </item> - <property name="name"> - <cstring>ComboBox1</cstring> - </property> - </widget> - <widget class="TQLayoutWidget"> - <property name="name"> - <cstring>Layout13</cstring> - </property> - <hbox> - <property name="name"> - <cstring>unnamed</cstring> - </property> - <property name="margin"> - <number>0</number> - </property> - <property name="spacing"> - <number>6</number> - </property> - <widget class="TQSpinBox"> - <property name="name"> - <cstring>SpinBox1</cstring> - </property> - </widget> - <widget class="TQPushButton"> - <property name="name"> - <cstring>PushButton1</cstring> - </property> - <property name="text"> - <string>PushButton</string> - </property> - </widget> - </hbox> - </widget> - <widget class="TQScrollBar"> - <property name="name"> - <cstring>ScrollBar1</cstring> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - </widget> - <widget class="TQSlider"> - <property name="name"> - <cstring>Slider1</cstring> - </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - </widget> - <widget class="TQTextView"> - <property name="name"> - <cstring>textView</cstring> - </property> - <property name="tqmaximumSize"> - <size> - <width>32767</width> - <height>50</height> - </size> - </property> - <property name="text"> - <string><p> -<a href="http://tqt.pearsoncomputing.net">http://tqt.pearsoncomputing.net</a> -</p> -<p> -<a href="http://trinity.pearsoncomputing.net">http://trinity.pearsoncomputing.net</a> -</p></string> - </property> - </widget> - </vbox> - </widget> - </hbox> - </widget> - <spacer> - <property name="name"> - <cstring>Spacer2</cstring> - </property> - <property name="orientation"> - <enum>Vertical</enum> - </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="tqsizeHint"> - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - </vbox> -</widget> -<connections> - <slot access="protected" language="C++" returnType="void">init()</slot> - <slot access="protected" language="C++" returnType="void">destroy()</slot> -</connections> -</UI> diff --git a/tqtinterface/qt4/tools/qtconfig/qtconfig.pro b/tqtinterface/qt4/tools/qtconfig/qtconfig.pro deleted file mode 100644 index aaef136..0000000 --- a/tqtinterface/qt4/tools/qtconfig/qtconfig.pro +++ /dev/null @@ -1,18 +0,0 @@ -TEMPLATE = app -CONFIG += qt warn_on -LANGUAGE = C++ - -SOURCES += colorbutton.cpp main.cpp previewframe.cpp previewwidget.cpp mainwindow.cpp paletteeditoradvanced.cpp -HEADERS += colorbutton.h previewframe.h previewwidget.h mainwindow.h paletteeditoradvanced.h -FORMS = mainwindowbase.ui paletteeditoradvancedbase.ui previewwidgetbase.ui -IMAGES = images/appicon.png - -PROJECTNAME = Qt Configuration -TARGET = qtconfig -DESTDIR = ../../bin - -target.path=$$bins.path -INSTALLS += target -INCLUDEPATH += . -DBFILE = qtconfig.db -REQUIRES=full-config nocrosscompiler !win32* |