tools/qtconfig/mainwindowbase.cpp
changeset 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
-1:000000000000 0:1918ee327afb
       
     1 /****************************************************************************
       
     2 **
       
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     4 ** All rights reserved.
       
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
       
     6 **
       
     7 ** This file is part of the tools applications of the Qt Toolkit.
       
     8 **
       
     9 ** $QT_BEGIN_LICENSE:LGPL$
       
    10 ** No Commercial Usage
       
    11 ** This file contains pre-release code and may not be distributed.
       
    12 ** You may use this file in accordance with the terms and conditions
       
    13 ** contained in the Technology Preview License Agreement accompanying
       
    14 ** this package.
       
    15 **
       
    16 ** GNU Lesser General Public License Usage
       
    17 ** Alternatively, this file may be used under the terms of the GNU Lesser
       
    18 ** General Public License version 2.1 as published by the Free Software
       
    19 ** Foundation and appearing in the file LICENSE.LGPL included in the
       
    20 ** packaging of this file.  Please review the following information to
       
    21 ** ensure the GNU Lesser General Public License version 2.1 requirements
       
    22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
       
    23 **
       
    24 ** In addition, as a special exception, Nokia gives you certain additional
       
    25 ** rights.  These rights are described in the Nokia Qt LGPL Exception
       
    26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
       
    27 **
       
    28 ** If you have questions regarding the use of this file, please contact
       
    29 ** Nokia at qt-info@nokia.com.
       
    30 **
       
    31 **
       
    32 **
       
    33 **
       
    34 **
       
    35 **
       
    36 **
       
    37 **
       
    38 ** $QT_END_LICENSE$
       
    39 **
       
    40 ****************************************************************************/
       
    41 
       
    42 #include "mainwindowbase.h"
       
    43 #include "colorbutton.h"
       
    44 #include "previewframe.h"
       
    45 
       
    46 #include <QVariant>
       
    47 #include <QImage>
       
    48 #include <QPixmap>
       
    49 
       
    50 QT_BEGIN_NAMESPACE
       
    51 
       
    52 /*
       
    53  *  Constructs a MainWindowBase as a child of 'parent', with the
       
    54  *  name 'name' and widget flags set to 'f'.
       
    55  *
       
    56  */
       
    57 MainWindowBase::MainWindowBase(QWidget* parent, const char* name, Qt::WindowFlags fl)
       
    58     : Q3MainWindow(parent, name, fl)
       
    59 {
       
    60     setupUi(this);
       
    61 
       
    62     (void)statusBar();
       
    63 
       
    64     // signals and slots connections
       
    65     connect(fontpathlineedit, SIGNAL(returnPressed()), this, SLOT(addFontpath()));
       
    66     connect(PushButton15, SIGNAL(clicked()), this, SLOT(addFontpath()));
       
    67     connect(PushButton1, SIGNAL(clicked()), this, SLOT(addSubstitute()));
       
    68     connect(PushButton14, SIGNAL(clicked()), this, SLOT(browseFontpath()));
       
    69     connect(stylecombo, SIGNAL(activated(int)), this, SLOT(buildFont()));
       
    70     connect(psizecombo, SIGNAL(activated(int)), this, SLOT(buildFont()));
       
    71     connect(PushButton12, SIGNAL(clicked()), this, SLOT(downFontpath()));
       
    72     connect(PushButton3, SIGNAL(clicked()), this, SLOT(downSubstitute()));
       
    73     connect(familycombo, SIGNAL(activated(QString)), this, SLOT(familySelected(QString)));
       
    74     connect(fileExitAction, SIGNAL(activated()), this, SLOT(fileExit()));
       
    75     connect(fileSaveAction, SIGNAL(activated()), this, SLOT(fileSave()));
       
    76     connect(helpAboutAction, SIGNAL(activated()), this, SLOT(helpAbout()));
       
    77     connect(helpAboutQtAction, SIGNAL(activated()), this, SLOT(helpAboutQt()));
       
    78     connect(TabWidget3, SIGNAL(currentChanged(QWidget*)), this, SLOT(pageChanged(QWidget*)));
       
    79     connect(paletteCombo, SIGNAL(activated(int)), this, SLOT(paletteSelected(int)));
       
    80     connect(PushButton13, SIGNAL(clicked()), this, SLOT(removeFontpath()));
       
    81     connect(PushButton4, SIGNAL(clicked()), this, SLOT(removeSubstitute()));
       
    82     connect(effectcheckbox, SIGNAL(toggled(bool)), effectbase, SLOT(setEnabled(bool)));
       
    83     connect(fontembeddingcheckbox, SIGNAL(toggled(bool)), GroupBox10, SLOT(setEnabled(bool)));
       
    84     connect(toolboxeffect, SIGNAL(activated(int)), this, SLOT(somethingModified()));
       
    85     connect(dcispin, SIGNAL(valueChanged(int)), this, SLOT(somethingModified()));
       
    86     connect(cfispin, SIGNAL(valueChanged(int)), this, SLOT(somethingModified()));
       
    87     connect(wslspin, SIGNAL(valueChanged(int)), this, SLOT(somethingModified()));
       
    88     connect(menueffect, SIGNAL(activated(int)), this, SLOT(somethingModified()));
       
    89     connect(comboeffect, SIGNAL(activated(int)), this, SLOT(somethingModified()));
       
    90     connect(audiosinkCombo, SIGNAL(activated(int)), this, SLOT(somethingModified()));
       
    91     connect(videomodeCombo, SIGNAL(activated(int)), this, SLOT(somethingModified()));
       
    92     connect(tooltipeffect, SIGNAL(activated(int)), this, SLOT(somethingModified()));
       
    93     connect(strutwidth, SIGNAL(valueChanged(int)), this, SLOT(somethingModified()));
       
    94     connect(strutheight, SIGNAL(valueChanged(int)), this, SLOT(somethingModified()));
       
    95     connect(effectcheckbox, SIGNAL(toggled(bool)), this, SLOT(somethingModified()));
       
    96     connect(resolvelinks, SIGNAL(toggled(bool)), this, SLOT(somethingModified()));
       
    97     connect(fontembeddingcheckbox, SIGNAL(clicked()), this, SLOT(somethingModified()));
       
    98     connect(rtlExtensions, SIGNAL(toggled(bool)), this, SLOT(somethingModified()));
       
    99     connect(inputStyle, SIGNAL(activated(int)), this, SLOT(somethingModified()));
       
   100     connect(inputMethod, SIGNAL(activated(int)), this, SLOT(somethingModified()));
       
   101     connect(gstylecombo, SIGNAL(activated(QString)), this, SLOT(styleSelected(QString)));
       
   102     connect(familysubcombo, SIGNAL(activated(QString)), this, SLOT(substituteSelected(QString)));
       
   103     connect(btnAdvanced, SIGNAL(clicked()), this, SLOT(tunePalette()));
       
   104     connect(PushButton11, SIGNAL(clicked()), this, SLOT(upFontpath()));
       
   105     connect(PushButton2, SIGNAL(clicked()), this, SLOT(upSubstitute()));
       
   106     init();
       
   107 }
       
   108 
       
   109 /*
       
   110  *  Destroys the object and frees any allocated resources
       
   111  */
       
   112 MainWindowBase::~MainWindowBase()
       
   113 {
       
   114     destroy();
       
   115     // no need to delete child widgets, Qt does it all for us
       
   116 }
       
   117 
       
   118 /*
       
   119  *  Sets the strings of the subwidgets using the current
       
   120  *  language.
       
   121  */
       
   122 void MainWindowBase::languageChange()
       
   123 {
       
   124     retranslateUi(this);
       
   125 }
       
   126 
       
   127 void MainWindowBase::init()
       
   128 {
       
   129 }
       
   130 
       
   131 void MainWindowBase::destroy()
       
   132 {
       
   133 }
       
   134 
       
   135 void MainWindowBase::addFontpath()
       
   136 {
       
   137     qWarning("MainWindowBase::addFontpath(): Not implemented yet");
       
   138 }
       
   139 
       
   140 void MainWindowBase::addSubstitute()
       
   141 {
       
   142     qWarning("MainWindowBase::addSubstitute(): Not implemented yet");
       
   143 }
       
   144 
       
   145 void MainWindowBase::browseFontpath()
       
   146 {
       
   147     qWarning("MainWindowBase::browseFontpath(): Not implemented yet");
       
   148 }
       
   149 
       
   150 void MainWindowBase::buildFont()
       
   151 {
       
   152     qWarning("MainWindowBase::buildFont(): Not implemented yet");
       
   153 }
       
   154 
       
   155 void MainWindowBase::buildPalette()
       
   156 {
       
   157     qWarning("MainWindowBase::buildPalette(): Not implemented yet");
       
   158 }
       
   159 
       
   160 void MainWindowBase::downFontpath()
       
   161 {
       
   162     qWarning("MainWindowBase::downFontpath(): Not implemented yet");
       
   163 }
       
   164 
       
   165 void MainWindowBase::downSubstitute()
       
   166 {
       
   167     qWarning("MainWindowBase::downSubstitute(): Not implemented yet");
       
   168 }
       
   169 
       
   170 void MainWindowBase::familySelected( const QString &)
       
   171 {
       
   172     qWarning("MainWindowBase::familySelected( const QString &): Not implemented yet");
       
   173 }
       
   174 
       
   175 void MainWindowBase::fileExit()
       
   176 {
       
   177     qWarning("MainWindowBase::fileExit(): Not implemented yet");
       
   178 }
       
   179 
       
   180 void MainWindowBase::fileSave()
       
   181 {
       
   182     qWarning("MainWindowBase::fileSave(): Not implemented yet");
       
   183 }
       
   184 
       
   185 void MainWindowBase::helpAbout()
       
   186 {
       
   187     qWarning("MainWindowBase::helpAbout(): Not implemented yet");
       
   188 }
       
   189 
       
   190 void MainWindowBase::helpAboutQt()
       
   191 {
       
   192     qWarning("MainWindowBase::helpAboutQt(): Not implemented yet");
       
   193 }
       
   194 
       
   195 void MainWindowBase::new_slot()
       
   196 {
       
   197     qWarning("MainWindowBase::new_slot(): Not implemented yet");
       
   198 }
       
   199 
       
   200 void MainWindowBase::pageChanged( QWidget *)
       
   201 {
       
   202     qWarning("MainWindowBase::pageChanged( QWidget *): Not implemented yet");
       
   203 }
       
   204 
       
   205 void MainWindowBase::paletteSelected(int)
       
   206 {
       
   207     qWarning("MainWindowBase::paletteSelected(int): Not implemented yet");
       
   208 }
       
   209 
       
   210 void MainWindowBase::removeFontpath()
       
   211 {
       
   212     qWarning("MainWindowBase::removeFontpath(): Not implemented yet");
       
   213 }
       
   214 
       
   215 void MainWindowBase::removeSubstitute()
       
   216 {
       
   217     qWarning("MainWindowBase::removeSubstitute(): Not implemented yet");
       
   218 }
       
   219 
       
   220 void MainWindowBase::somethingModified()
       
   221 {
       
   222     qWarning("MainWindowBase::somethingModified(): Not implemented yet");
       
   223 }
       
   224 
       
   225 void MainWindowBase::styleSelected( const QString &)
       
   226 {
       
   227     qWarning("MainWindowBase::styleSelected( const QString &): Not implemented yet");
       
   228 }
       
   229 
       
   230 void MainWindowBase::substituteSelected( const QString &)
       
   231 {
       
   232     qWarning("MainWindowBase::substituteSelected( const QString &): Not implemented yet");
       
   233 }
       
   234 
       
   235 void MainWindowBase::tunePalette()
       
   236 {
       
   237     qWarning("MainWindowBase::tunePalette(): Not implemented yet");
       
   238 }
       
   239 
       
   240 void MainWindowBase::upFontpath()
       
   241 {
       
   242     qWarning("MainWindowBase::upFontpath(): Not implemented yet");
       
   243 }
       
   244 
       
   245 void MainWindowBase::upSubstitute()
       
   246 {
       
   247     qWarning("MainWindowBase::upSubstitute(): Not implemented yet");
       
   248 }
       
   249 
       
   250 QT_END_NAMESPACE