summaryrefslogtreecommitdiffstats
path: root/src/qalculateeditfunctiondialog.h
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-04-09 15:59:57 +0200
committerSlávek Banko <slavek.banko@axis.cz>2016-04-09 15:59:57 +0200
commitee0c9d4bc3e25a409b3127be2876079f69719978 (patch)
tree04d895b486c04df1fe2e5dedb7cd5705eff06a9b /src/qalculateeditfunctiondialog.h
downloadqalculate-tde-ee0c9d4bc3e25a409b3127be2876079f69719978.tar.gz
qalculate-tde-ee0c9d4bc3e25a409b3127be2876079f69719978.zip
Initial import of qalculate-kde 0.9.7
Diffstat (limited to 'src/qalculateeditfunctiondialog.h')
-rw-r--r--src/qalculateeditfunctiondialog.h140
1 files changed, 140 insertions, 0 deletions
diff --git a/src/qalculateeditfunctiondialog.h b/src/qalculateeditfunctiondialog.h
new file mode 100644
index 0000000..ecd322d
--- /dev/null
+++ b/src/qalculateeditfunctiondialog.h
@@ -0,0 +1,140 @@
+/***************************************************************************
+ * Copyright (C) 2005 by Niklas Knutsson *
+ * nq@altern.org *
+ * *
+ * 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; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef QALCULATEEDITFUNCTIONDIALOG_H
+#define QALCULATEEDITFUNCTIONDIALOG_H
+
+#include <kdialogbase.h>
+#include <qmap.h>
+
+class QLabel;
+class KComboBox;
+class KLineEdit;
+class QCheckBox;
+class QPushButton;
+class MathStructure;
+class QalculateEditNamesDialog;
+class QalculateEditSubFunctionsDialog;
+class QalculateEditArgumentDialog;
+class MathFunction;
+class KListView;
+class QTextEdit;
+class Argument;
+class QTabWidget;
+class UserFunction;
+
+/**
+@author Niklas Knutsson
+*/
+class QalculateEditFunctionDialog : public KDialogBase {
+
+ Q_OBJECT
+
+public:
+
+ QalculateEditFunctionDialog(QWidget *parent = 0, const char *name = 0);
+ virtual ~QalculateEditFunctionDialog();
+
+ MathFunction *editFunction(QString category = QString::null, MathFunction *f = NULL);
+
+ QalculateEditNamesDialog *names_edit_dialog;
+ QalculateEditSubFunctionsDialog *subfunctions_edit_dialog;
+ QalculateEditArgumentDialog *argument_edit_dialog;
+ MathFunction *edited_function;
+ KComboBox *categoryCombo;
+ KLineEdit *conditionEdit, *nameEdit, *titleEdit;
+ QLabel *namesLabel;
+ QCheckBox *hideButton;
+ KListView *argumentsView;
+ QTextEdit *descriptionEdit, *expressionEdit;
+ QPushButton *namesButton, *subFunctionsButton, *newArgumentButton, *editArgumentButton, *deleteArgumentButton;
+ QTabWidget *tabs;
+ QMap<QListViewItem*, Argument*> argumentsItems;
+ QMap<QListViewItem*, bool> argumentsItemsEdited;
+
+public slots:
+
+ void argumentSelectionChanged();
+ void argumentRenamed(QListViewItem*, const QString&, int);
+ void editNames();
+ void newArgument();
+ void editArgument();
+ void deleteArgument();
+ void editSubFunctions();
+ void nameChanged(const QString&);
+
+protected slots:
+
+ void slotHelp();
+ void slotOk();
+
+};
+
+class QalculateEditSubFunctionsDialog : public KDialog {
+
+ Q_OBJECT
+
+public:
+
+ QalculateEditSubFunctionsDialog(QWidget *parent = 0, const char *name = 0);
+ virtual ~QalculateEditSubFunctionsDialog();
+
+ void saveSubFunctions(UserFunction *f);
+ void setSubFunctions(UserFunction *f = NULL, bool edited = false);
+ bool isEmpty();
+
+ KListView* subFunctionsView;
+ QPushButton* newButton;
+ QPushButton* deleteButton;
+ QPushButton* buttonClose;
+
+public slots:
+
+ void itemClicked(QListViewItem*, const QPoint&, int);
+ void newSubFunction();
+ void deleteSubFunction();
+ void selectionChanged();
+
+};
+
+class QalculateEditArgumentDialog : public KDialogBase {
+
+ Q_OBJECT
+
+public:
+
+ QalculateEditArgumentDialog(QWidget *parent = 0, const char *name = 0);
+ virtual ~QalculateEditArgumentDialog();
+
+ Argument *editArgument(Argument *arg = NULL);
+
+ KComboBox *typeCombo;
+ KLineEdit *nameEdit, *conditionEdit, *maxEdit, *minEdit;
+ QCheckBox *conditionButton, *matrixButton, *zeroButton, *complexButton, *maxButton, *minButton, *maxIncludeEqualsButton, *minIncludeEqualsButton, *testButton;
+
+public slots:
+
+ void maxEnabled(bool);
+ void minEnabled(bool);
+ void typeChanged(int);
+
+};
+
+
+#endif