Back to index

scribus-ng  1.3.4.dfsg+svn20071115
scrpalettebase.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 /***************************************************************************
00008  *   Copyright (C) 2005 by Craig Bradney                                   *
00009  *   cbradney@scribus.info                                                 *
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  *   This program is distributed in the hope that it will be useful,       *
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00019  *   GNU General Public License for more details.                          *
00020  *                                                                         *
00021  *   You should have received a copy of the GNU General Public License     *
00022  *   along with this program; if not, write to the                         *
00023  *   Free Software Foundation, Inc.,                                       *
00024  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00025  ***************************************************************************/
00026 #ifndef SCRPALETTE_BASE_H
00027 #define SCRPALETTE_BASE_H
00028 
00029 #include <qdialog.h>
00030 #include <qkeysequence.h>
00031 
00032 #include "scribusapi.h"
00033 class PrefsContext;
00034 
00035 class SCRIBUS_API ScrPaletteBase : public QDialog
00036 {
00037        Q_OBJECT
00038 
00039        public:
00040               ScrPaletteBase( QWidget * parent = NULL, const char * name = NULL, bool modal = false, WFlags f = 0 );
00041               ~ScrPaletteBase() {};
00043               //virtual void keyPressEvent(QKeyEvent *keyEvent);
00045               virtual void closeEvent(QCloseEvent *closeEvent);
00047               void hideEvent(QHideEvent*);
00048               virtual void show();
00049               virtual void hide();
00050               void startup();
00051               
00052        public slots:
00053               virtual void setPaletteShown(bool);
00054               virtual void setFontSize();
00055               int exec(QWidget* newParent);
00056               
00057        signals:
00059               void paletteShown(bool);
00060               
00061        protected:
00063               virtual void setPrefsContext(QString context);
00064               void storePosition();
00065               void storePosition(int newX, int newY);
00066               void storeSize();
00067               void storeVisibility(bool);
00068               
00069               PrefsContext* palettePrefs;
00070               QString prefsContextName;
00071               bool visibleOnStartup;
00072               QWidget* originalParent;
00073               QWidget* tempParent;
00074               
00075        protected slots:
00076               virtual void reject();
00077 };
00078 #endif