kalgebra
kalgebra.cpp
Go to the documentation of this file.
70 virtual bool matchesExpression(const Analitza::Expression& exp, const Analitza::ExpressionType& functype) const {
91 virtual bool matchesExpression(const Analitza::Expression& exp, const Analitza::ExpressionType& functype) const
117 KToggleFullScreenAction* fullScreenAction = KStandardAction::fullScreen(this, SLOT(fullScreen(bool)), this, this);
153 c_exp->setExamples(QStringList() << "square:=x->x**2" << "fib:=n->piecewise { eq(n,0)?0, eq(n,1)?1, ?fib(n-1)+fib(n-2) }");
172 c_recentScripts=new KRecentFilesAction(KIcon("document-open-recent"), i18n("Recent Scripts"), this);
182 QAction* calc = c_menu->addAction(i18nc("@item:inmenu", "Calculate"), this, SLOT(consoleCalculate()));
183 QAction* eval = c_menu->addAction(i18nc("@item:inmenu", "Evaluate"), this, SLOT(consoleEvaluate()));
250 connect(b_varsView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(varsContextMenu(QPoint)));
268 b_actions[5] = b_menu->addAction(i18nc("@item:inmenu", "Very Fine"), this, SLOT(set_res_vfine()));
405 Analitza::PlotBuilder req = Analitza::PlotsFactory::self()->requestPlot(exp, Analitza::Dim2D, c_results->analitza()->variables());
501 KUrl path = KFileDialog::getOpenUrl(KUrl(), "*.kal|"+i18n("Script (*.kal)"), this, i18n("Choose a script"));
517 KUrl path = KFileDialog::getSaveUrl(KUrl(), "*.kal|"+i18n("Script (*.kal)"), this, QString(), KFileDialog::ConfirmOverwrite);
528 KUrl path = KFileDialog::getSaveUrl(KUrl(), "*.html|"+i18n("HTML File (*.html)"), this, QString(), KFileDialog::ConfirmOverwrite);
542 Analitza::PlotBuilder plot = Analitza::PlotsFactory::self()->requestPlot(exp, Analitza::Dim3D, c_results->analitza()->variables());
575 QString path = KFileDialog::getSaveFileName(KUrl(), i18n("*.png|PNG File\n*.pdf|PDF Document"), this, QString(), KFileDialog::ConfirmOverwrite);
607 QPointer<KFileDialog> dialog=new KFileDialog(KUrl(), i18n("*.png|Image File\n*.svg|SVG File"), this);
615 bool isSvg = filename.endsWith(".svg") || (!filename.endsWith(".png") && filter.mid(2, 3)=="svg");
616 Analitza::PlotsView2D::Format f = isSvg ? Analitza::PlotsView2D::SVG : Analitza::PlotsView2D::PNG;
720 Analitza::PlotBuilder plot = Analitza::PlotsFactory::self()->requestPlot(exp, Analitza::Dim3D, c_results->analitza()->variables());
void setText(const QString &text)
void resizeSections(QHeaderView::ResizeMode mode)
Definition: askname.h:29
QSize size() const
Definition: viewportwidget.h:25
virtual int rowCount(const QModelIndex &parent) const =0
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const =0
bool end()
void setCurrentIndex(const QModelIndex &index)
void setSelectionMode(QAbstractItemView::SelectionMode mode)
virtual QString id() const =0
QItemSelectionModel * selectionModel() const
The VarEdit provides a dialog to allow users to edit/create a variable.
Definition: varedit.h:42
void setOutputFileName(const QString &fileName)
void setDefaultAction(QAction *action)
void setFocusPolicy(Qt::FocusPolicy policy)
void setCornerWidget(QWidget *widget, Qt::Corner corner)
void setChecked(bool)
virtual void setModel(QAbstractItemModel *model)
Analitza::Analyzer * analitza()
Retrieves a pointer to the Analitza calculator associated.
Definition: consolehtml.h:62
void setDocumentMode(bool set)
QPoint mapToGlobal(const QPoint &pos) const
QAction * addAction(QAction *action)
void setTabPosition(TabPosition)
QHeaderView * verticalHeader() const
bool addOperation(const Analitza::Expression &e, const QString &input)
Adds the operation defined by the expression e.
Definition: consolehtml.cpp:97
void clear()
void setSelectionBehavior(QAbstractItemView::SelectionBehavior behavior)
void setTabEnabled(int index, bool enable)
Definition: variablesdelegate.h:24
void setParent(QWidget *parent)
void addOptionsObserver(InlineOptions *opt)
Definition: consolehtml.h:70
void setTabText(int index, const QString &label)
QColor fromHsv(int h, int s, int v, int a)
void setCurrentIndex(int index)
void setEnabled(bool)
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
The Console widget is able to receive an operation, solve it and show the value.
Definition: consolehtml.h:45
virtual void setModel(QAbstractItemModel *model)
bool save(const QString &fileName, const char *format, int quality) const
Definition: dictionary.h:39
void setFeatures(QFlags< QDockWidget::DockWidgetFeature > features)
void setLayout(QLayout *layout)
void setEditing(bool m)
Sets whether we are editing or adding a function.
Definition: functionedit.cpp:319
void setFocus()
void drawPixmap(const QRectF &target, const QPixmap &pixmap, const QRectF &source)
void raise()
bool isEmpty() const
void setItemDelegate(QAbstractItemDelegate *delegate)
int row() const
int addTab(QWidget *page, const QString &label)
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const
virtual QVariant data(const QModelIndex &index, int role) const =0
void setText(const QString &)
void setShowGrid(bool show)
void hide()
void setPaperSize(PaperSize newPaperSize)
virtual bool matchesExpression(const Analitza::Expression &exp, const Analitza::ExpressionType &functype) const =0
void setSizePolicy(QSizePolicy)
void addWidget(QWidget *w)
void setContextMenuPolicy(Qt::ContextMenuPolicy policy)
The FunctionEdit dialog provides a way to specify functions.
Definition: functionedit.h:46
void setPageMargins(qreal left, qreal top, qreal right, qreal bottom, Unit unit)
void setCheckable(bool)
void setWidget(QWidget *widget)
virtual QString caption() const =0
Definition: consolehtml.h:28
QString mid(int position, int n) const
QVariant data(int role) const
QModelIndex sibling(int row, int column) const
virtual void setModel(QAbstractItemModel *model)
Definition: kalgebra.h:45
void showFullScreen()
virtual void triggerOption(const Analitza::Expression &exp)=0
int column() const
void setCurrentIndex(const QModelIndex &index, QFlags< QItemSelectionModel::SelectionFlag > command)
QHeaderView * header() const
void setVariables(Analitza::Variables *v)
Sets the variables class to be used with the graph functions.
Definition: functionedit.h:83
Calculates everything, if it finds a not defined variable shows an error.
Definition: consolehtml.h:52
void show()
QFuture< void > filter(Sequence &sequence, FilterFunction filterFunction)
void setFunction(const QString &newText)
Sets an expression text to the ExpressionEdit widget.
Definition: functionedit.cpp:150
Analitza::PlaneCurve * createFunction() const
Definition: functionedit.cpp:291
QAbstractItemModel * model() const
QModelIndex currentIndex() const
void setRootIsDecorated(bool show)
void setColor(const QColor &newColor)
Sets the selected color for the function.
Definition: functionedit.cpp:156
void setStretchLastSection(bool stretch)
QList< QAction * > actions() const
void setOutputFormat(OutputFormat format)
bool begin(QPaintDevice *device)
QHeaderView * horizontalHeader() const
QString toString() const
QWidget * widget() const
void setEnabled(bool)
bool editing() const
Returns whether we are editing or adding a function.
Definition: functionedit.h:71
QString applicationFilePath()
Simplifies the expression, tries to simplify when sees a variable not defined.
Definition: consolehtml.h:51
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:11:49 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:11:49 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.