qCTKSettings.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Library:   qCTK
00004 
00005   Copyright (c) Kitware Inc. 
00006   All rights reserved.
00007   Distributed under a BSD License. See LICENSE.txt file.
00008 
00009   This software is distributed "AS IS" WITHOUT ANY WARRANTY; without even
00010   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00011   See the above copyright notice for more information.
00012 
00013 =========================================================================*/
00014 /*=========================================================================
00015 
00016    Program: ParaView
00017    Module:    $RCSfile: pqSettings.h,v $
00018 
00019    Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
00020    All rights reserved.
00021 
00022    ParaView is a free software; you can redistribute it and/or modify it
00023    under the terms of the ParaView license version 1.2. 
00024 
00025    See License_v1.2.txt for the full ParaView license.
00026    A copy of this license can be obtained by contacting
00027    Kitware Inc.
00028    28 Corporate Drive
00029    Clifton Park, NY 12065
00030    USA
00031 
00032 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00033 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00034 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00035 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
00036 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00037 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00038 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00039 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00040 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00041 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00042 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00043 
00044 =========================================================================*/
00045 
00049 
00050 #ifndef __qCTKSettings_h
00051 #define __qCTKSettings_h
00052 
00053 // QT includes
00054 #include <QSettings>
00055 
00056 #include "qCTKWidgetsExport.h"
00057 
00058 class QDialog;
00059 class QMainWindow;
00060 
00061 class QCTK_WIDGETS_EXPORT qCTKSettings : public QSettings
00062 {
00063   Q_OBJECT
00064 
00065 public:
00066   qCTKSettings(
00067     const QString& organization,
00068     const QString& application,
00069     QObject* p);
00070     
00071   void saveState(const QMainWindow& window, const QString& key);
00072   void saveState(const QDialog& dialog, const QString& key);
00073   
00074   void restoreState(const QString& key, QMainWindow& window);
00075   void restoreState(const QString& key, QDialog& dialog);
00076 
00078   void alertSettingsModified();
00079 
00080 signals:
00081   void modified();
00082 };
00083 
00084 #endif

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1