"Fossies" - the Fresh Open Source Software Archive

Member "src/controller.h" (28 Sep 2008, 4038 Bytes) of package /windows/misc/PosteRazor-1.9.5-Source.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "controller.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2     PosteRazor - Make your own poster!
    3     Copyright (C) 2005-2008 by Alessandro Portale
    4     http://posterazor.sourceforge.net/
    5 
    6     This file is part of PosteRazor
    7 
    8     PosteRazor is free software; you can redistribute it and/or modify
    9     it under the terms of the GNU General Public License as published by
   10     the Free Software Foundation, either version 3 of the License, or
   11     (at your option) any later version.
   12 
   13     PosteRazor is distributed in the hope that it will be useful,
   14     but WITHOUT ANY WARRANTY; without even the implied warranty of
   15     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   16     GNU General Public License for more details.
   17 
   18     You should have received a copy of the GNU General Public License
   19     along with PosteRazor; if not, write to the Free Software
   20     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
   21 */
   22 
   23 #ifndef CONTROLLER_H
   24 #define CONTROLLER_H
   25 
   26 #include <QSettings>
   27 #include "types.h"
   28 
   29 class PosteRazorCore;
   30 class MainWindow;
   31 class WizardController;
   32 class QTranslator;
   33 
   34 class Controller: public QObject
   35 {
   36     Q_OBJECT
   37 
   38 public:
   39     Controller(PosteRazorCore *posteRazorCore, MainWindow *mainWindow, QObject *parent = 0);
   40 
   41     void updateDialog();
   42     void updatePreview();
   43 
   44 public slots:
   45     void setUnitOfLength(Types::UnitsOfLength unit);
   46     void setPaperFormat(const QString &format);
   47     void setPaperOrientation(QPrinter::Orientation orientation);
   48     void setPaperBorderTop(double border);
   49     void setPaperBorderRight(double border);
   50     void setPaperBorderBottom(double border);
   51     void setPaperBorderLeft(double border);
   52     void setCustomPaperWidth(double width);
   53     void setCustomPaperHeight(double height);
   54     void setUseCustomPaperSize(bool useIt);
   55     void setOverlappingWidth(double width);
   56     void setOverlappingHeight(double height);
   57     void setOverlappingPosition(Qt::Alignment position);
   58     void setPosterWidthAbsolute(double width);
   59     void setPosterHeightAbsolute(double height);
   60     void setPosterWidthPages(double width);
   61     void setPosterHeightPages(double height);
   62     void setPosterSizePercentual(double percent);
   63     void setPosterSizeMode(Types::PosterSizeModes mode);
   64     void setPosterAlignment(Qt::Alignment alignment);
   65     void setLaunchPDFApplication(bool launch);
   66     void readSettings(const QSettings *settings);
   67     void writeSettings(QSettings *settings) const;
   68     void loadInputImage();
   69     bool loadInputImage(const QString &fileName);
   70     bool loadInputImage(const QString &fileName, QString &errorMessage);
   71     int savePoster(const QString &fileName) const;
   72     void savePoster() const;
   73     void loadTranslation(const QString &localeName);
   74     void setUnitOfLength(const QString &unit);
   75     void openPosteRazorWebsite();
   76 
   77 signals:
   78     virtual void previewChanged() const;
   79     virtual void imageFileNameChanged(const QString &fileName) const;
   80     virtual void imageInfoChanged(int imageWidthInPixels, int imageHeightInPixels, double imageWidth,
   81         double imageHeight, Types::UnitsOfLength unitOfLength, double verticalDpi, double horizontalDpi,
   82         Types::ColorTypes colorType, int bitsPerPixel) const;
   83     virtual void pddfLaunch(const QString &pdfFileName) const;
   84 
   85 private slots:
   86     void showExtraAboutDialog();
   87 
   88 protected:
   89     PosteRazorCore *m_posteRazorCore;
   90     MainWindow *m_mainWindow;
   91     bool m_launchPDFApplication;
   92     WizardController *m_wizardController;
   93     QTranslator *m_translator;
   94     QString m_translationName;
   95 
   96     void setDialogSaveOptions();
   97     void setDialogPosterSizeMode();
   98     void setDialogPosterOptions();
   99     void setDialogPosterDimensions(Types::PosterSizeModes excludedMode, bool widthExcluded);
  100     void setDialogPaperOptions();
  101     void setDialogPaperBorders();
  102     void setDialogCustomPaperDimensions();
  103     void setDialogImageInfoFields();
  104     void setDialogOverlappingDimensions();
  105     void setDialogOverlappingOptions();
  106 };
  107 
  108 #endif // CONTROLLER_H