/* * MathPlanner 3.1 - Mathematical design tool. * Copyright(C) 2002 Jarmo Nikkanen * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation. * * You should have received a copy of the GNU General Public License with this program. * */ #ifndef _MATHPLANNER_APP_CONTROL_H #define _MATHPLANNER_APP_CONTROL_H #include #include #include #include #include #include #include #include #include #include #include #include "Extern.h" class DataStorage; class string_object; class m_function_object; class MathWindow; class m_base_object; class Paper; class TextControl; class ApplicationControl : public QObject { Q_OBJECT public: ApplicationControl(MathWindow *parent); void CreateFunctionMenu(QStringList); QColor GetColor(int id); QFont GetFont(int id); int GetFontSize(int id); int CenterLine(string_object *); void CreateControlMenu(m_base_object *); void SetModeFlag(int,bool); bool GetModeFlag(int); void AddError(QString); void DocumentChanged(bool c=true); bool IsChanged(); MathWindow *MainWindow(); QPixmap LoadIcon(QString); void MessageReceived(DataStorage *msg,int rec); void PostMessage(DataStorage *msg,int dest=TO_FRAME); private: void SetupFonts(); private slots: void SetFunction(int); public: QPopupMenu *FunctionMenu; class DataStorage *Clipboard; class function_serv *function_server; class int_server *integer_server; class config_file_reader *Prefs; class setup *Setup; class mpl_unit *Unit; class TextControl *TextControlBar; class MathControl *MathControlBar; private: class MathWindow *parent; class base_object_message *base_om[50]; int zoomfactor; bool documentchanged; bool mode_flag[32]; QWidgetStack *wstack; QColor color[16]; QFont font[16]; int fontsize[16]; int centerline; QToolBar *ObjectBar; }; #endif