moved qpicalculator
This commit is contained in:
2
pip
2
pip
Submodule pip updated: 3965e54e38...f033119a8b
14
piqt/utils/qpicalculator/CMakeLists.txt
Normal file
14
piqt/utils/qpicalculator/CMakeLists.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
project(qpicalc)
|
||||
if(APPLE)
|
||||
set(APP_ICON "")
|
||||
elseif(WIN32)
|
||||
set(APP_ICON "icons/qpicalculator.ico")
|
||||
else()
|
||||
set(APP_ICON "icons/qpicalculator.png")
|
||||
endif()
|
||||
set(APP_INFO "Small calculator ang grapher")
|
||||
qad_application(${PROJECT_NAME} "Gui;Widgets" "qad_utils;qad_widgets;qad_graphic")
|
||||
if (Qt5_FOUND)
|
||||
import_version(${PROJ_NAME}5 ${PROJECT_NAME})
|
||||
deploy_target(${PROJECT_NAME}5 DEPLOY_DIR ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${ROOT_DIR}/release)
|
||||
endif()
|
||||
BIN
piqt/utils/qpicalculator/icons/qpicalculator.ico
Normal file
BIN
piqt/utils/qpicalculator/icons/qpicalculator.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 158 KiB |
BIN
piqt/utils/qpicalculator/icons/qpicalculator.png
Normal file
BIN
piqt/utils/qpicalculator/icons/qpicalculator.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
13
piqt/utils/qpicalculator/main.cpp
Normal file
13
piqt/utils/qpicalculator/main.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <QApplication>
|
||||
#include "mainwindow.h"
|
||||
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
QApplication a(argc, argv);
|
||||
#if QT_VERSION >= 0x050000
|
||||
a.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
||||
#endif
|
||||
MainWindow w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
}
|
||||
261
piqt/utils/qpicalculator/mainwindow.cpp
Normal file
261
piqt/utils/qpicalculator/mainwindow.cpp
Normal file
@@ -0,0 +1,261 @@
|
||||
#include "mainwindow.h"
|
||||
|
||||
|
||||
MainWindow::MainWindow(QWidget * parent): QMainWindow(parent), Ui::MainWindow() {
|
||||
setupUi(this);
|
||||
active_ = false;
|
||||
lineInput->setFocus();
|
||||
#if QT_VERSION >= 0x050000
|
||||
treeGraphics->header()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
|
||||
treeGraphics->header()->setSectionResizeMode(1, QHeaderView::ResizeToContents);
|
||||
#else
|
||||
treeGraphics->header()->setResizeMode(0, QHeaderView::ResizeToContents);
|
||||
treeGraphics->header()->setResizeMode(1, QHeaderView::ResizeToContents);
|
||||
#endif
|
||||
npal = epal = lineInput->palette();
|
||||
epal.setColor(lineInput->backgroundRole(), QColor(Qt::red).lighter(150));
|
||||
connect(&session, SIGNAL(loading(QPIConfig & )), this, SLOT(loading(QPIConfig & )));
|
||||
connect(&session, SIGNAL(saving(QPIConfig & )), this, SLOT(saving(QPIConfig & )));
|
||||
session.setFile("session_qpicalc.conf");
|
||||
session.addEntry(this);
|
||||
session.addEntry(lineInput);
|
||||
session.addEntry(tabWidget);
|
||||
session.load();
|
||||
ans = evaluator.setVariable("ans");
|
||||
on_lineInput_returnPressed();
|
||||
}
|
||||
|
||||
|
||||
MainWindow::~MainWindow() {session.save();
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::changeEvent(QEvent * e) {
|
||||
QMainWindow::changeEvent(e);
|
||||
switch (e->type()) {
|
||||
case QEvent::LanguageChange:
|
||||
retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::updateGraphics() {
|
||||
graphic->setGraphicsCount(treeGraphics->topLevelItemCount());
|
||||
for (int i = 0; i < treeGraphics->topLevelItemCount(); ++i)
|
||||
graphic->setGraphicColor(treeGraphics->topLevelItem(i)->data(0, Qt::DecorationRole).value<QColor>(), i);
|
||||
redrawGraphics();
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::redrawGraphics() {
|
||||
QRectF sr = graphic->visualRect();
|
||||
double dx = (sr.right() - sr.left()) / graphic->width(), sx = sr.left(), fx = sr.right(), cx;
|
||||
QPolygonF pol;
|
||||
evaluator.setVariable("x");
|
||||
int vi = evaluator.variableIndex("x");
|
||||
graphic->setAutoUpdate(false);
|
||||
for (int i = 0; i < treeGraphics->topLevelItemCount(); ++i) {
|
||||
QTreeWidgetItem * ti = treeGraphics->topLevelItem(i);
|
||||
graphic->setGraphicName(ti->text(1), i);
|
||||
pol.clear();
|
||||
if (ti->checkState(0) == Qt::Checked) {
|
||||
if (evaluator.check(ti->text(1))) {
|
||||
cx = sx;
|
||||
while (cx < fx) {
|
||||
evaluator.setVariable(vi, complexd(cx, 0.));
|
||||
pol << QPointF(cx, evaluator.evaluate().real());
|
||||
cx += dx;
|
||||
}
|
||||
}
|
||||
}
|
||||
graphic->setGraphicVisible(ti->checkState(0) == Qt::Checked, i);
|
||||
graphic->setGraphicData(pol, i);
|
||||
}
|
||||
graphic->setAutoUpdate(true);
|
||||
graphic->update(true);
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::loading(QPIConfig & conf) {
|
||||
active_ = false;
|
||||
QStringList vars = conf.getValue("variables").toStringList();
|
||||
int vc = vars.size() / 2;
|
||||
for (int i = 0; i < vc; ++i) {
|
||||
QTreeWidgetItem * ti = new QTreeWidgetItem(treeVariables);
|
||||
ti->setText(0, vars[i * 2]);
|
||||
ti->setText(1, vars[i * 2 + 1]);
|
||||
ti->setFlags(ti->flags() | Qt::ItemIsEditable);
|
||||
treeVariables->addTopLevelItem(ti);
|
||||
}
|
||||
buttonVarClear->setEnabled(treeVariables->topLevelItemCount() > 0);
|
||||
QByteArray ba = conf.getValue("graphics").toByteArray();
|
||||
QDataStream s(ba);
|
||||
QVector<GraphicType> g;
|
||||
if (!ba.isEmpty()) s >> g;
|
||||
graphic->setAllGraphics(g);
|
||||
for (int i = 0; i < graphic->graphicsCount(); ++i) {
|
||||
graphic->setCurrentGraphic(i);
|
||||
QTreeWidgetItem * ti = new QTreeWidgetItem(treeGraphics);
|
||||
ti->setFlags(ti->flags() | Qt::ItemIsEditable);
|
||||
ti->setCheckState(0, graphic->graphicVisible() ? Qt::Checked : Qt::Unchecked);
|
||||
ti->setData(0, Qt::DecorationRole, graphic->graphicColor());
|
||||
ti->setText(1, graphic->graphicName());
|
||||
treeGraphics->addTopLevelItem(ti);
|
||||
}
|
||||
buttonGraphicClear->setEnabled(treeGraphics->topLevelItemCount() > 0);
|
||||
graphic->setVisualRect(conf.getValue("graphicRect", QRectF(-1., -1., 2., 2.)).toRectF());
|
||||
ba = conf.getValue("graphic_state").toByteArray();
|
||||
if (!ba.isEmpty())
|
||||
graphic->load(ba);
|
||||
on_tabWidget_currentChanged(0);
|
||||
redrawGraphics();
|
||||
active_ = true;
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::saving(QPIConfig & conf) {
|
||||
QStringList vars;
|
||||
int vc = treeVariables->topLevelItemCount();
|
||||
for (int i = 0; i < vc; ++i) {
|
||||
QTreeWidgetItem * ti = treeVariables->topLevelItem(i);
|
||||
vars << ti->text(0) << ti->text(1);
|
||||
}
|
||||
conf.setValue("variables", vars);
|
||||
|
||||
QVector<GraphicType> g;
|
||||
vc = treeGraphics->topLevelItemCount();
|
||||
for (int i = 0; i < vc; ++i) {
|
||||
QTreeWidgetItem * ti = treeGraphics->topLevelItem(i);
|
||||
vars << QString::number(ti->background(1).color().rgb()) << ti->text(2);
|
||||
}
|
||||
QByteArray ba; QDataStream s(&ba, QIODevice::WriteOnly);
|
||||
s << graphic->allGraphics();
|
||||
conf.setValue("graphics", QByteArray2QString(ba));
|
||||
conf.setValue("graphicRect", graphic->visualRect());
|
||||
conf.setValue("graphic_state", graphic->save());
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_lineInput_textChanged(QString text) {
|
||||
if (evaluator.check(text)) lineInput->setPalette(npal);
|
||||
else lineInput->setPalette(epal);
|
||||
labelParsed->setText(evaluator.expression());
|
||||
labelError->setText(evaluator.error());
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_lineInput_returnPressed() {
|
||||
bool ret = evaluator.check(lineInput->text());
|
||||
if (ret) lineInput->setPalette(npal);
|
||||
else lineInput->setPalette(epal);
|
||||
labelParsed->setText(evaluator.expression());
|
||||
labelError->setText(evaluator.error());
|
||||
if (!ret) return;
|
||||
complexd val = evaluator.evaluate();
|
||||
evaluator.setVariable(ans, val);
|
||||
if (val.imag() == 0) labelResult->setText(QString::number(val.real()));
|
||||
else {
|
||||
if (val.real() == 0) labelResult->setText(QString::number(val.imag()) + "i");
|
||||
else {
|
||||
if (val.imag() > 0) labelResult->setText(QString::number(val.real())
|
||||
+ " + " + QString::number(val.imag()) + "i");
|
||||
else labelResult->setText(QString::number(val.real())
|
||||
+ " - " + QString::number(fabs(val.imag())) + "i");
|
||||
}
|
||||
}
|
||||
if (lineInput->text().trimmed().isEmpty()) return;
|
||||
QTreeWidgetItem * ti = 0, * pti = 0;
|
||||
if (treeHistory->topLevelItemCount() > 0)
|
||||
pti = treeHistory->topLevelItem(treeHistory->topLevelItemCount() - 1);
|
||||
if (pti != 0)
|
||||
if (pti->text(0) == lineInput->text())
|
||||
return;
|
||||
ti = new QTreeWidgetItem(treeHistory);
|
||||
ti->setText(0, lineInput->text());
|
||||
ti->setText(1, labelResult->text());
|
||||
treeHistory->addTopLevelItem(ti);
|
||||
if (treeHistory->verticalScrollBar()->value() == treeHistory->verticalScrollBar()->maximum())
|
||||
treeHistory->scrollToBottom();
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_treeGraphics_itemDoubleClicked(QTreeWidgetItem * item, int column) {
|
||||
Qt::ItemFlags f = item->flags();
|
||||
if (column != 1) f &= ~Qt::ItemIsEditable;
|
||||
else f |= Qt::ItemIsEditable;
|
||||
item->setFlags(f);
|
||||
if (column != 0) return;
|
||||
QColor col = QColorDialog::getColor(item->data(0, Qt::DecorationRole).value<QColor>(), this, "Select color for graphic", QColorDialog::ShowAlphaChannel);
|
||||
if (!col.isValid()) return;
|
||||
item->setData(0, Qt::DecorationRole, col);
|
||||
updateGraphics();
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_buttonVarAdd_clicked() {
|
||||
QTreeWidgetItem * ti = new QTreeWidgetItem(treeVariables);
|
||||
ti->setSelected(true);
|
||||
ti->setFlags(ti->flags() | Qt::ItemIsEditable);
|
||||
treeVariables->addTopLevelItem(ti);
|
||||
treeVariables->setFocus();
|
||||
treeVariables->editItem(ti);
|
||||
buttonVarClear->setEnabled(treeVariables->topLevelItemCount() > 0);
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_buttonVarDel_clicked() {
|
||||
QList<QTreeWidgetItem * > si = treeVariables->selectedItems();
|
||||
foreach (QTreeWidgetItem * i, si)
|
||||
delete i;
|
||||
buttonVarClear->setEnabled(treeVariables->topLevelItemCount() > 0);
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_buttonGraphicAdd_clicked() {
|
||||
graphic->setGraphicsCount(graphic->graphicsCount() + 1);
|
||||
graphic->setCurrentGraphic(graphic->graphicsCount() - 1);
|
||||
QTreeWidgetItem * ti = new QTreeWidgetItem(treeGraphics);
|
||||
ti->setSelected(true);
|
||||
ti->setFlags(ti->flags() | Qt::ItemIsEditable);
|
||||
ti->setCheckState(0, Qt::Checked);
|
||||
ti->setData(0, Qt::DecorationRole, graphic->graphicColor());
|
||||
treeGraphics->addTopLevelItem(ti);
|
||||
treeGraphics->setFocus();
|
||||
treeGraphics->editItem(ti, 1);
|
||||
buttonGraphicClear->setEnabled(treeGraphics->topLevelItemCount() > 0);
|
||||
updateGraphics();
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_buttonGraphicDel_clicked() {
|
||||
QList<QTreeWidgetItem * > si = treeGraphics->selectedItems();
|
||||
foreach (QTreeWidgetItem * i, si)
|
||||
delete i;
|
||||
buttonGraphicClear->setEnabled(treeGraphics->topLevelItemCount() > 0);
|
||||
updateGraphics();
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_buttonGraphicClear_clicked() {
|
||||
treeGraphics->clear();
|
||||
buttonGraphicClear->setEnabled(false);
|
||||
updateGraphics();
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_tabWidget_currentChanged(int index) {
|
||||
QPIEvaluator eval;
|
||||
evaluator.clearCustomVariables();
|
||||
for (int i = 0; i < treeVariables->topLevelItemCount(); ++i) {
|
||||
QString vn, vv;
|
||||
vn = treeVariables->topLevelItem(i)->text(0);
|
||||
vv = treeVariables->topLevelItem(i)->text(1);
|
||||
eval.check(vv);
|
||||
evaluator.setVariable(vn, eval.evaluate());
|
||||
}
|
||||
if (index == 0) on_lineInput_returnPressed();
|
||||
if (index == 2) redrawGraphics();
|
||||
}
|
||||
56
piqt/utils/qpicalculator/mainwindow.h
Normal file
56
piqt/utils/qpicalculator/mainwindow.h
Normal file
@@ -0,0 +1,56 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QPalette>
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
#include <QScrollBar>
|
||||
#include <QColorDialog>
|
||||
#include "ui_mainwindow.h"
|
||||
#include "qpievaluator.h"
|
||||
#include "session_manager.h"
|
||||
|
||||
|
||||
class MainWindow: public QMainWindow, private Ui::MainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MainWindow(QWidget * parent = 0);
|
||||
~MainWindow();
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent * e);
|
||||
|
||||
private:
|
||||
void updateGraphics();
|
||||
void redrawGraphics();
|
||||
|
||||
QPIEvaluator evaluator;
|
||||
QPalette npal, epal;
|
||||
SessionManager session;
|
||||
int ans;
|
||||
bool active_;
|
||||
|
||||
private slots:
|
||||
void loading(QPIConfig & conf);
|
||||
void saving(QPIConfig & conf);
|
||||
void on_lineInput_textChanged(QString s);
|
||||
void on_lineInput_returnPressed();
|
||||
void on_treeHistory_itemDoubleClicked(QTreeWidgetItem * item, int column) {lineInput->setText(item->text(0));}
|
||||
void on_treeVariables_itemSelectionChanged() {buttonVarDel->setDisabled(treeVariables->selectedItems().isEmpty());}
|
||||
void on_treeGraphics_itemSelectionChanged() {buttonGraphicDel->setDisabled(treeGraphics->selectedItems().isEmpty());}
|
||||
void on_treeGraphics_itemChanged(QTreeWidgetItem * , int col) { if (active_) redrawGraphics();}
|
||||
void on_treeGraphics_itemDoubleClicked(QTreeWidgetItem * item, int column);
|
||||
void on_buttonVarAdd_clicked();
|
||||
void on_buttonVarDel_clicked();
|
||||
void on_buttonVarClear_clicked() {treeVariables->clear(); buttonVarClear->setEnabled(false);}
|
||||
void on_buttonGraphicAdd_clicked();
|
||||
void on_buttonGraphicDel_clicked();
|
||||
void on_buttonGraphicClear_clicked();
|
||||
void on_tabWidget_currentChanged(int index);
|
||||
void on_graphic_visualRectChanged() {redrawGraphics();}
|
||||
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
379
piqt/utils/qpicalculator/mainwindow.ui
Normal file
379
piqt/utils/qpicalculator/mainwindow.ui
Normal file
@@ -0,0 +1,379 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>780</width>
|
||||
<height>521</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>QPICalculator</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="qpicalculator.qrc">
|
||||
<normaloff>:/icons/qpicalculator.png</normaloff>:/icons/qpicalculator.png</iconset>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralWidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
<string>Calculator</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTreeWidget" name="treeHistory">
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="alternatingRowColors">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="verticalScrollMode">
|
||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
||||
</property>
|
||||
<property name="rootIsDecorated">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="itemsExpandable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="allColumnsShowFocus">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="headerDefaultSectionSize">
|
||||
<number>300</number>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Expression</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Result</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="CLineEdit" name="lineInput"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelError">
|
||||
<property name="text">
|
||||
<string>Correct</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelParsed">
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelResult">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>14</pointsize>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0</string>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2">
|
||||
<attribute name="title">
|
||||
<string>Variables</string>
|
||||
</attribute>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QTreeWidget" name="treeVariables">
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::ExtendedSelection</enum>
|
||||
</property>
|
||||
<property name="verticalScrollMode">
|
||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
||||
</property>
|
||||
<property name="rootIsDecorated">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="itemsExpandable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="allColumnsShowFocus">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="headerDefaultSectionSize">
|
||||
<number>200</number>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Name</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Value</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonVarAdd">
|
||||
<property name="icon">
|
||||
<iconset resource="../../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/list-add.png</normaloff>:/icons/list-add.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonVarDel">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-delete.png</normaloff>:/icons/edit-delete.png</iconset>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Del</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonVarClear">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-clear.png</normaloff>:/icons/edit-clear.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_3">
|
||||
<attribute name="title">
|
||||
<string>Graphics</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<widget class="QSplitter" name="splitter">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<widget class="QWidget" name="">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QTreeWidget" name="treeGraphics">
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::ExtendedSelection</enum>
|
||||
</property>
|
||||
<property name="verticalScrollMode">
|
||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollMode">
|
||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
||||
</property>
|
||||
<property name="rootIsDecorated">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="itemsExpandable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="allColumnsShowFocus">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="headerVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="headerDefaultSectionSize">
|
||||
<number>50</number>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>On</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Function</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonGraphicAdd">
|
||||
<property name="icon">
|
||||
<iconset resource="../../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/list-add.png</normaloff>:/icons/list-add.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonGraphicDel">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-delete.png</normaloff>:/icons/edit-delete.png</iconset>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Del</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonGraphicClear">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-clear.png</normaloff>:/icons/edit-clear.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="Graphic" name="graphic">
|
||||
<property name="buttons">
|
||||
<set>Graphic::BorderInputs|Graphic::Configure|Graphic::CursorAxis|Graphic::Fullscreen|Graphic::Grid|Graphic::Save</set>
|
||||
</property>
|
||||
<property name="antialiasing">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="borderInputsVisible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="legendVisible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Graphic</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>graphic.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>CLineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>clineedit.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../../utils/qad_utils.qrc"/>
|
||||
<include location="qpicalculator.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
5
piqt/utils/qpicalculator/qpicalculator.qrc
Normal file
5
piqt/utils/qpicalculator/qpicalculator.qrc
Normal file
@@ -0,0 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>icons/qpicalculator.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
Reference in New Issue
Block a user