Scribus Developer Documentation - API
logo-pen

Scribus Developer Documentation - API

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 "ui_aligndistribute.h"
00026 
00027 #include <QVariant>
00028 #include <QPixmap>
00029 #include <QDialog>
00030 #include <QLabel>
00031 #include <QList>
00032 
00033 class QEvent;
00034 
00035 #include "scribusapi.h"
00036 #include "scribusview.h"
00037 #include "scrpalettebase.h"
00038 
00039 class QSpacerItem;
00040 class QLabel;
00041 class QLineEdit;
00042 class QComboBox;
00043 class QToolButton;
00044 class ScrSpinBox;
00045 
00046 class ScribusMainWindow;
00047 class ScribusDoc;
00048 class UndoManager;
00049 struct AlignObjs;
00050 
00051 class SCRIBUS_API AlignDistributePalette : public ScrPaletteBase, Ui::AlignDistribute
00052 {
00053     Q_OBJECT
00054 
00055 public:
00056     AlignDistributePalette( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
00057     ~AlignDistributePalette();
00058 
00059     virtual void setDoc( ScribusDoc* newDoc );
00060     void unitChange();
00061     
00062     virtual void changeEvent(QEvent *e);
00063     
00064 public slots:
00065     void setGuide(int, double);
00066 
00067 protected:
00068     ScribusView *currView;
00069     
00070 protected slots:
00071     virtual void languageChange();
00072     
00073     void alignLeftOut();
00074     void alignRightOut();
00075     void alignBottomIn();
00076     void alignRightIn();
00077     void alignBottomOut();
00078     void alignCenterHor();
00079     void alignLeftIn();
00080     void alignCenterVer();
00081     void alignTopOut();
00082     void alignTopIn();
00083     void distributeDistH(bool usingDistance=false);
00084     void distributeDistValH();
00085     void distributeDistAcrossPage();
00086     void distributeDistAcrossMargins();
00087     void distributeRight();
00088     void distributeBottom();
00089     void distributeCenterH();
00090     void distributeDistV(bool usingDistance=false);
00091     void distributeDistValV();
00092     void distributeDistDownPage();
00093     void distributeDistDownMargins();
00094     void distributeLeft();
00095     void distributeCenterV();
00096     void distributeTop();
00097     
00098     void alignToChanged(int);
00099 
00100 private:
00101     void init();
00102     UndoManager *undoManager;
00103     ScribusDoc::AlignTo currAlignTo;
00104     QList<AlignObjs> *alignObjects;
00105     ScribusDoc *currDoc;
00106     double unitRatio;
00107     int guideDirection;
00108     double guidePosition;
00109     QString guideInfoText, guideInfoTextNone;
00110     void enableGuideButtons();
00111     
00112 signals:
00113     void documentChanged();
00114 
00115 };
00116 
00117 #endif // ALIGNDISTRIBUTEPALETTE_H
Created with personalized Doxygen. This is documentation for GPL software Scribus - Open Source Desktop Publishing.