Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/components/componentdialog.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                           componentdialog.h  -  description
00003                              -------------------
00004     begin                : Tue Sep 9 2003
00005     copyright            : (C) 2003 by Michael Margraf
00006     email                : michael.margraf@alumni.tu-berlin.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
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  ***************************************************************************/
00017 
00018 #ifndef COMPONENTDIALOG_H
00019 #define COMPONENTDIALOG_H
00020 
00021 #include "component.h"
00022 
00023 #include <QDialog>
00024 
00025 class Schematic;
00026 
00027 class QValidator;
00028 class QIntValidator;
00029 class QRegExpValidator;
00030 class QTableWidget;
00031 class QTableWidgetItem;
00032 class QLabel;
00033 class QLineEdit;
00034 class QCheckBox;
00035 class QRegExp;
00036 class QComboBox;
00037 class QPushButton;
00038 class QVBoxLayout;
00039 
00040 
00041 class ComponentDialog : public QDialog {
00042    Q_OBJECT
00043 public:
00044   ComponentDialog(Component*, Schematic*);
00045  ~ComponentDialog();
00046 
00047 private slots:
00048   void slotButtOK();
00049   void slotButtCancel();
00050   void slotSelectProperty(QTableWidgetItem *item);
00051   void slotApplyInput();
00052   void slotApplyState(int State);
00053   void slotBrowseFile();
00054   void slotEditFile();
00055   void slotApplyChange(const QString& Text);
00056   void slotApplyProperty();
00057   void slotApplyPropName();
00058 
00059   void slotButtAdd();
00060   void slotButtRem();
00061 
00062   void slotButtUp();
00063   void slotButtDown();
00064 
00065   void slotSimTypeChange(int);
00066   void slotNumberChanged(const QString&);
00067   void slotStepChanged(const QString&);
00068 
00069   void slotParamEntered();
00070   void slotSimEntered(int);
00071   void slotValuesEntered();
00072   void slotStartEntered();
00073   void slotStopEntered();
00074   void slotStepEntered();
00075   void slotNumberEntered();
00076   void slotHHeaderClicked(int headerIdx);
00077 
00078 protected slots:
00079     void reject();
00080 
00081 private:
00082   QVBoxLayout *all;   // the mother of all widgets
00083   QValidator  *Validator, *ValRestrict, *Validator2;
00084   QRegExp     Expr;
00085   QIntValidator *ValInteger;
00086   QTableWidget  *prop;
00087   QLineEdit   *edit, *NameEdit, *CompNameEdit;
00088   QComboBox   *ComboEdit;
00089   QLabel      *Name, *Description;
00090   QPushButton *BrowseButt, *EditButt, *ButtAdd, *ButtRem;
00091   QPushButton *ButtUp, *ButtDown;
00092   QCheckBox   *disp;
00093   Component   *Comp;
00094   Schematic   *Doc;
00095   bool        changed;
00096   int         tx_Dist, ty_Dist;   // remember the text position
00097   bool        setAllVisible; // used for toggling visibility of properties
00098  
00099   QLabel    *textType;
00100   QLabel    *textSim, *textParam, *textValues, *textStart, *textStop,
00101             *textStep, *textNumber;
00102   QLineEdit *editParam, *editValues, *editStart, *editStop,
00103             *editStep, *editNumber;
00104   QCheckBox *checkSim, *checkParam, *checkValues, *checkStart, *checkStop,
00105             *checkNumber, *checkType, *showName;
00106   QComboBox *comboSim, *comboType;
00107 
00108   void updateCompPropsList(void);
00109 };
00110 
00111 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines