Back to index

scribus-ng  1.3.4.dfsg+svn20071115
aligndistribute.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        begin                : June 2005
00009        copyright            : (C) 2005 by Craig Bradney
00010        email                : cbradney@zip.com.au
00011 ***************************************************************************/
00012 
00013 /***************************************************************************
00014 *                                                                         *
00015 *   Scribus is free software; you can redistribute it and/or modify       *
00016 *   it under the terms of the GNU General Public License as published by  *
00017 *   the Free Software Foundation; either version 2 of the License, or     *
00018 *   (at your option) any later version.                                   *
00019 *                                                                         *
00020 ***************************************************************************/
00021 
00022 #ifndef ALIGNDISTRIBUTEPALETTE_H
00023 #define ALIGNDISTRIBUTEPALETTE_H
00024 
00025 #include "aligndistributebase.h"
00026 
00027 #include <qvariant.h>
00028 #include <qpixmap.h>
00029 #include <qdialog.h>
00030 
00031 #include "scribusapi.h"
00032 #include "scribusstructs.h"
00033 #include "scribusview.h"
00034 #include "scrpalettebase.h"
00035 
00036 class QVBoxLayout;
00037 class QHBoxLayout;
00038 class QGridLayout;
00039 class QSpacerItem;
00040 class QGroupBox;
00041 class QLabel;
00042 class QLineEdit;
00043 class QComboBox;
00044 class QToolButton;
00045 class MSpinBox;
00046 
00047 class ScribusMainWindow;
00048 class ScribusDoc;
00049 class UndoManager;
00050 
00051 class SCRIBUS_API AlignDistributePalette : public AlignDistributeBase
00052 {
00053        Q_OBJECT
00054 
00055 public:
00056        AlignDistributePalette( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
00057        ~AlignDistributePalette();
00058 
00059        virtual void setDoc( ScribusDoc* newDoc );
00060        void unitChange();
00061        
00062 public slots:
00063        void setGuide(int, double);
00064 
00065 protected:
00066        ScribusView *currView;
00067        
00068 protected slots:
00069        virtual void languageChange();
00070        
00071        void alignLeftOut();
00072        void alignRightOut();
00073        void alignBottomIn();
00074        void alignRightIn();
00075        void alignBottomOut();
00076        void alignCenterHor();
00077        void alignLeftIn();
00078        void alignCenterVer();
00079        void alignTopOut();
00080        void alignTopIn();
00081        void distributeDistH(bool usingDistance=false);
00082        void distributeDistValH();
00083        void distributeDistAcrossPage();
00084        void distributeDistAcrossMargins();
00085        void distributeRight();
00086        void distributeBottom();
00087        void distributeCenterH();
00088        void distributeDistV(bool usingDistance=false);
00089        void distributeDistValV();
00090        void distributeDistDownPage();
00091        void distributeDistDownMargins();
00092        void distributeLeft();
00093        void distributeCenterV();
00094        void distributeTop();
00095        
00096        void alignToChanged(int);
00097 
00098 private:
00099        void init();
00100        UndoManager *undoManager;
00101        ScribusDoc::AlignTo currAlignTo;
00102        QValueList<AlignObjs> *alignObjects;
00103        ScribusDoc *currDoc;
00104        double unitRatio;
00105        int guideDirection;
00106        double guidePosition;
00107        QString guideInfoText, guideInfoTextNone;
00108        void enableGuideButtons();
00109        
00110 signals:
00111        void documentChanged();
00112 
00113 };
00114 
00115 #endif // ALIGNDISTRIBUTEPALETTE_H