Create file

This commit is contained in:
Ian Gebbie 2020-02-08 10:42:51 +02:00
parent c6040ca8fc
commit b02e9f8cdf
16 changed files with 151 additions and 1806 deletions

View file

@ -108,17 +108,9 @@ HEADERS += \
include/main.h \ include/main.h \
include/mainwindow.h \ include/mainwindow.h \
include/matrixdata.h \ include/matrixdata.h \
include/moc_predefs.h \
include/options.h \ include/options.h \
include/texteditor.h \ include/texteditor.h \
include/treemodel.h \ include/treemodel.h \
include/ui_getnumber.h \
include/ui_hp_infodialog.h \
include/ui_hp_mdiwindow.h \
include/ui_hp_settingsdlg.h \
include/ui_mainwindow.h \
include/ui_options.h \
include/ui_variableview.h \
include/variableview.h \ include/variableview.h \
include/vartablemodel.h \ include/vartablemodel.h \
include/version.h \ include/version.h \

View file

@ -19,6 +19,7 @@
#include <cntfilesystemmodel.h> #include <cntfilesystemmodel.h>
#include <QMimeData> #include <QMimeData>
#include <QStringListModel> #include <QStringListModel>
#include <hp_mditexteditor.h> #include <hp_mditexteditor.h>
#include <QSettings> #include <QSettings>
#include <QTextCodec> #include <QTextCodec>
@ -170,10 +171,10 @@ bool contentFileSystemModel::dropMimeData(const QMimeData* md_data, Qt::DropActi
dir= rootDirectory(); dir= rootDirectory();
if (!dir.exists()) { if (!dir.exists()) {
qDebug()<<"Content Path Does not Exist:"<<path; qWarning()<<tr("Content Path Does not exist: ")<<path;
if(!dir.mkpath(".")) if(!dir.mkpath("."))
{ {
qDebug()<<"Path could not be created"<<path; qWarning()<<tr("Path could not be created: ")<<path;
return false; return false;
} }
} }
@ -232,29 +233,37 @@ QVariant contentFileSystemModel::data( const QModelIndex &index, int role ) cons
//action if file is left clicked //action if file is left clicked
void contentFileSystemModel::clickAction(QMdiArea * mdiwin, QModelIndex &index) { void contentFileSystemModel::clickAction(QMdiArea * mdiwin, QModelIndex &index) {
return openFile(mdiwin,index); openFile(mdiwin,index);
return;
} }
//open a file in the mdi window //open a file in the mdi window
void contentFileSystemModel::openFile(QMdiArea * mdiwin, QModelIndex &index) { bool contentFileSystemModel::openFile(QMdiArea * mdiwin, QModelIndex &index) {
hp_mdiTextEdit * hptextedit = nullptr;
hp_DataStruct filedata;
AbstractData * data=nullptr;
QFileInfo info = contentFileSystemModel::fileInfo(index); QFileInfo info = contentFileSystemModel::fileInfo(index);
return openFile(mdiwin,info);
}
//open a file in the mdi window
bool contentFileSystemModel::openFile(QMdiArea * mdiwin,QFileInfo info) {
hp_mdiTextEdit * hptextedit = nullptr;
AbstractData * data=nullptr;
data = readFile(info); data = readFile(info);
if (data!=nullptr) { if (data!=nullptr) {
if (hptextedit==nullptr) if (hptextedit==nullptr)
hptextedit = new hp_mdiTextEdit(mdiwin,filedata, data); hptextedit = new hp_mdiTextEdit(mdiwin,info, data);
if (hptextedit!=nullptr) if (hptextedit!=nullptr) {
hptextedit ->show(); hptextedit ->show();
return true;
}
} }
else { else {
qDebug()<<"Null data"; qWarning()<<"Read file return null data";
} }
return false;
qDebug()<<"ClickAction "<<info.absoluteFilePath(); qDebug()<<"ClickAction "<<info.absoluteFilePath();
} }
@ -368,17 +377,28 @@ bool contentFileSystemModel::createNewFolder(QString foldername) {
} }
//create a new program file //create a new program file
bool contentFileSystemModel::createNewProgram(QMdiArea * mdiwin,QString foldername) { bool contentFileSystemModel::createNewProgram(QMdiArea * mdiwin, QString filename) {
QSettings appSettings("IRGP","QtHPconnect"); QSettings appSettings("IRGP","QtHPconnect");
QString path=appSettings.value("contentPath").toString(); QString path=appSettings.value("contentPath").toString();
QDir dir(path);
QFileInfo fileinfo(dir,filename+"."+getFileType(HP_PROG));
// QFileInfo fileinfo = /*
QFile file(fileinfo.absoluteFilePath());
//.... if (file.open(QIODevice::WriteOnly)) {
//openFile(mdiwin,fileinfo);
QTextStream out(&file);
out << "" << endl;
} else {
qWarning()<<tr("Could not open file");
}
file.close();
*/
qDebug()<<"Create new program pressed"; qDebug()<<"Create new program pressed";
return false; return openFile(mdiwin,fileinfo);
} }
//create a new note file //create a new note file

View file

@ -15,13 +15,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <QMessageBox>
#include <hp_mditexteditor.h>
#include <hp_mdiwindow.h>
#include <hptreeitem.h>
#include <hpdata.h>
#include <abstractdata.h>
#include "hp_mditexteditor.h" //Called by the calculator Window
#include "hp_mdiwindow.h"
#include "hptreeitem.h"
#include "hpdata.h"
#include "abstractdata.h"
hp_mdiTextEdit::hp_mdiTextEdit(QWidget * parent,hpTreeItem * treeItem, AbstractData * calcData) hp_mdiTextEdit::hp_mdiTextEdit(QWidget * parent,hpTreeItem * treeItem, AbstractData * calcData)
:hp_MdiWindow(parent) :hp_MdiWindow(parent)
{ {
@ -29,33 +30,37 @@ hp_mdiTextEdit::hp_mdiTextEdit(QWidget * parent,hpTreeItem * treeItem, AbstractD
setMaximumSize(1000,1000); setMaximumSize(1000,1000);
setSizePolicy(QSizePolicy::Ignored,QSizePolicy::Ignored); setSizePolicy(QSizePolicy::Ignored,QSizePolicy::Ignored);
qDebug()<<"hp_mdiTextEdit::hp_mdiTextEdit"; qDebug()<<"hp_mdiTextEdit::hp_mdiTextEdit 1";
hptreeitem=treeItem; hptreeitem=treeItem;
content=false;
data = calcData; data = calcData;
qDebug()<<data->getName();
qDebug()<<data->getType();
filename=treeItem->getFileName();
qDebug()<<filename;
filename=treeItem->getFileName();
calculator=treeItem->getCalculatorName();
type=treeItem->getType(); type=treeItem->getType();
setup(); setup();
setWindowTitle(filename); setWindowTitle(calculator+": "+filename);
} }
hp_mdiTextEdit::hp_mdiTextEdit(QWidget * parent,hp_DataStruct filedata, AbstractData * calcData) //Called by the content window
hp_mdiTextEdit::hp_mdiTextEdit(QWidget * parent, QFileInfo filedata, AbstractData * calcData)
:hp_MdiWindow (parent) :hp_MdiWindow (parent)
{ {
qDebug()<<"hp_mdiTextEdit::hp_mdiTextEdit 2";
setMinimumSize(200,200); setMinimumSize(200,200);
setMaximumSize(1000,1000); setMaximumSize(1000,1000);
setSizePolicy(QSizePolicy::Ignored,QSizePolicy::Ignored); setSizePolicy(QSizePolicy::Ignored,QSizePolicy::Ignored);
calculator=QStringLiteral("Content: ");
content=true;
hptreeitem=nullptr; hptreeitem=nullptr;
data = calcData; data = calcData;
filename=filedata.filename; filename=filedata.fileName();
type=filedata.type; file=filedata;
type=calcData->getType();
setup(); setup();
setWindowTitle(filename); setWindowTitle(calculator+filename);
} }
void hp_mdiTextEdit::setup() { void hp_mdiTextEdit::setup() {
@ -81,7 +86,6 @@ void hp_mdiTextEdit::setup() {
textEdit->setDocumentTitle(prog->getName()); textEdit->setDocumentTitle(prog->getName());
} }
qDebug()<<text; qDebug()<<text;
textEdit->setPlainText(text); textEdit->setPlainText(text);
} }
@ -93,14 +97,57 @@ void hp_mdiTextEdit::setup() {
bool hp_mdiTextEdit::save(){ bool hp_mdiTextEdit::save(){
return textEdit->save(); if(content)
return textEdit->save(file);
else {
return textEdit->save(calculator);
}
} }
bool hp_mdiTextEdit::saveAs(){ bool hp_mdiTextEdit::saveAs(){
return textEdit->saveAs(); if(content)
return textEdit->saveAs(file);
else {
return textEdit->saveAs(calculator);
}
} }
void hp_mdiTextEdit::closeEvent(QCloseEvent *event)
{
if (maybeSave()) {
event->accept();
} else {
event->ignore();
}
}
bool hp_mdiTextEdit::maybeSave()
{
if (!textEdit->document()->isModified())
return true;
const QMessageBox::StandardButton ret
= QMessageBox::warning(this, tr("MDI"),
tr("'%1' has been modified.\n"
"Do you want to save your changes?")
.arg(file.fileName()),
QMessageBox::Save | QMessageBox::Discard
| QMessageBox::Cancel);
switch (ret) {
case QMessageBox::Save:
return textEdit->save(file);
case QMessageBox::Cancel:
return false;
default:
break;
}
return true;
}
void hp_mdiTextEdit::show() { void hp_mdiTextEdit::show() {
if (textEdit) if (textEdit)

View file

@ -39,7 +39,8 @@ public:
Qt::ItemFlags flags(const QModelIndex &index) const; Qt::ItemFlags flags(const QModelIndex &index) const;
void clickAction(QMdiArea * mdiwin,QModelIndex &index); void clickAction(QMdiArea * mdiwin,QModelIndex &index);
void openFile(QMdiArea * mdiwin,QModelIndex &index); bool openFile(QMdiArea * mdiwin,QModelIndex &index);
bool openFile(QMdiArea * mdiwin,QFileInfo file);
void deleteFile(QModelIndex &index); void deleteFile(QModelIndex &index);
void renameFile(QModelIndex &index, QString newName); void renameFile(QModelIndex &index, QString newName);
hp_DataStruct getFileType(QFileInfo info) const; hp_DataStruct getFileType(QFileInfo info) const;

View file

@ -40,19 +40,24 @@ protected:
hpTreeItem * hptreeitem =nullptr; hpTreeItem * hptreeitem =nullptr;
// hpCalcData * hpcalc =nullptr; // hpCalcData * hpcalc =nullptr;
QString filename; QString filename;
QFileInfo file;
hp_DataType type; hp_DataType type;
AbstractData * data =nullptr; AbstractData * data =nullptr;
QString calculator;
bool content;
void closeEvent(QCloseEvent *event) override;
public: public:
hp_mdiTextEdit(QWidget * parent = nullptr, hpTreeItem * treeItem = nullptr, hp_mdiTextEdit(QWidget * parent = nullptr, hpTreeItem * treeItem = nullptr,
AbstractData * calcData =nullptr); AbstractData * calcData =nullptr);
hp_mdiTextEdit(QWidget * parent, hp_DataStruct filename, hp_mdiTextEdit(QWidget * parent, QFileInfo filename,
AbstractData * calcData); AbstractData * calcData);
void setup(); void setup();
bool save(); bool save() override;
bool saveAs(); bool saveAs() override;
bool maybeSave();
void show(); void show();
~hp_mdiTextEdit(); ~hp_mdiTextEdit() override;
signals: signals:

View file

@ -1,391 +0,0 @@
#define __SSP_STRONG__ 3
#define __DBL_MIN_EXP__ (-1021)
#define __FLT32X_MAX_EXP__ 1024
#define __cpp_attributes 200809
#define __UINT_LEAST16_MAX__ 0xffff
#define __ATOMIC_ACQUIRE 2
#define __FLT128_MAX_10_EXP__ 4932
#define __FLT_MIN__ 1.17549435082228750796873653722224568e-38F
#define __GCC_IEC_559_COMPLEX 2
#define __cpp_aggregate_nsdmi 201304
#define __UINT_LEAST8_TYPE__ unsigned char
#define __SIZEOF_FLOAT80__ 16
#define __INTMAX_C(c) c ## L
#define __CHAR_BIT__ 8
#define __UINT8_MAX__ 0xff
#define __WINT_MAX__ 0xffffffffU
#define __FLT32_MIN_EXP__ (-125)
#define __cpp_static_assert 200410
#define __ORDER_LITTLE_ENDIAN__ 1234
#define __SIZE_MAX__ 0xffffffffffffffffUL
#define __WCHAR_MAX__ 0x7fffffff
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
#define __DBL_DENORM_MIN__ double(4.94065645841246544176568792868221372e-324L)
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
#define __GCC_ATOMIC_CHAR_LOCK_FREE 2
#define __GCC_IEC_559 2
#define __FLT32X_DECIMAL_DIG__ 17
#define __FLT_EVAL_METHOD__ 0
#define __unix__ 1
#define __cpp_binary_literals 201304
#define __FLT64_DECIMAL_DIG__ 17
#define __CET__ 3
#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2
#define __x86_64 1
#define __cpp_variadic_templates 200704
#define __UINT_FAST64_MAX__ 0xffffffffffffffffUL
#define __SIG_ATOMIC_TYPE__ int
#define __DBL_MIN_10_EXP__ (-307)
#define __FINITE_MATH_ONLY__ 0
#define __cpp_variable_templates 201304
#define __GNUC_PATCHLEVEL__ 1
#define __FLT32_HAS_DENORM__ 1
#define __UINT_FAST8_MAX__ 0xff
#define __cpp_rvalue_reference 200610
#define __has_include(STR) __has_include__(STR)
#define __DEC64_MAX_EXP__ 385
#define __INT8_C(c) c
#define __INT_LEAST8_WIDTH__ 8
#define __UINT_LEAST64_MAX__ 0xffffffffffffffffUL
#define __SHRT_MAX__ 0x7fff
#define __LDBL_MAX__ 1.18973149535723176502126385303097021e+4932L
#define __FLT64X_MAX_10_EXP__ 4932
#define __UINT_LEAST8_MAX__ 0xff
#define __GCC_ATOMIC_BOOL_LOCK_FREE 2
#define __FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F128
#define __UINTMAX_TYPE__ long unsigned int
#define __linux 1
#define __DEC32_EPSILON__ 1E-6DF
#define __FLT_EVAL_METHOD_TS_18661_3__ 0
#define __OPTIMIZE__ 1
#define __unix 1
#define __UINT32_MAX__ 0xffffffffU
#define __GXX_EXPERIMENTAL_CXX0X__ 1
#define __LDBL_MAX_EXP__ 16384
#define __FLT128_MIN_EXP__ (-16381)
#define __WINT_MIN__ 0U
#define __linux__ 1
#define __FLT128_MIN_10_EXP__ (-4931)
#define __INT_LEAST16_WIDTH__ 16
#define __SCHAR_MAX__ 0x7f
#define __FLT128_MANT_DIG__ 113
#define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1)
#define __INT64_C(c) c ## L
#define __DBL_DIG__ 15
#define __GCC_ATOMIC_POINTER_LOCK_FREE 2
#define __FLT64X_MANT_DIG__ 64
#define _FORTIFY_SOURCE 2
#define __SIZEOF_INT__ 4
#define __SIZEOF_POINTER__ 8
#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2
#define __USER_LABEL_PREFIX__
#define __FLT64X_EPSILON__ 1.08420217248550443400745280086994171e-19F64x
#define __STDC_HOSTED__ 1
#define __LDBL_HAS_INFINITY__ 1
#define __FLT32_DIG__ 6
#define __FLT_EPSILON__ 1.19209289550781250000000000000000000e-7F
#define __GXX_WEAK__ 1
#define __SHRT_WIDTH__ 16
#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L
#define __DEC32_MAX__ 9.999999E96DF
#define __cpp_threadsafe_static_init 200806
#define __FLT64X_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951F64x
#define __FLT32X_HAS_INFINITY__ 1
#define __INT32_MAX__ 0x7fffffff
#define __INT_WIDTH__ 32
#define __SIZEOF_LONG__ 8
#define __STDC_IEC_559__ 1
#define __STDC_ISO_10646__ 201706L
#define __UINT16_C(c) c
#define __PTRDIFF_WIDTH__ 64
#define __DECIMAL_DIG__ 21
#define __FLT64_EPSILON__ 2.22044604925031308084726333618164062e-16F64
#define __gnu_linux__ 1
#define __INTMAX_WIDTH__ 64
#define __FLT64_MIN_EXP__ (-1021)
#define __has_include_next(STR) __has_include_next__(STR)
#define __FLT64X_MIN_10_EXP__ (-4931)
#define __LDBL_HAS_QUIET_NAN__ 1
#define __FLT64_MANT_DIG__ 53
#define __GNUC__ 9
#define __GXX_RTTI 1
#define __pie__ 2
#define __MMX__ 1
#define __cpp_delegating_constructors 200604
#define __FLT_HAS_DENORM__ 1
#define __SIZEOF_LONG_DOUBLE__ 16
#define __BIGGEST_ALIGNMENT__ 16
#define __STDC_UTF_16__ 1
#define __FLT64_MAX_10_EXP__ 308
#define __FLT32_HAS_INFINITY__ 1
#define __DBL_MAX__ double(1.79769313486231570814527423731704357e+308L)
#define __cpp_raw_strings 200710
#define __INT_FAST32_MAX__ 0x7fffffffffffffffL
#define __DBL_HAS_INFINITY__ 1
#define __HAVE_SPECULATION_SAFE_VALUE 1
#define __DEC32_MIN_EXP__ (-94)
#define __INTPTR_WIDTH__ 64
#define __FLT32X_HAS_DENORM__ 1
#define __INT_FAST16_TYPE__ long int
#define __LDBL_HAS_DENORM__ 1
#define __cplusplus 201402L
#define __cpp_ref_qualifiers 200710
#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
#define __INT_LEAST32_MAX__ 0x7fffffff
#define __DEC32_MIN__ 1E-95DF
#define __DEPRECATED 1
#define __cpp_rvalue_references 200610
#define __DBL_MAX_EXP__ 1024
#define __WCHAR_WIDTH__ 32
#define __FLT32_MAX__ 3.40282346638528859811704183484516925e+38F32
#define __DEC128_EPSILON__ 1E-33DL
#define __SSE2_MATH__ 1
#define __ATOMIC_HLE_RELEASE 131072
#define __PTRDIFF_MAX__ 0x7fffffffffffffffL
#define __amd64 1
#define __ATOMIC_HLE_ACQUIRE 65536
#define __FLT32_HAS_QUIET_NAN__ 1
#define __GNUG__ 9
#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL
#define __SIZEOF_SIZE_T__ 8
#define __cpp_nsdmi 200809
#define __FLT64X_MIN_EXP__ (-16381)
#define __SIZEOF_WINT_T__ 4
#define __LONG_LONG_WIDTH__ 64
#define __cpp_initializer_lists 200806
#define __FLT32_MAX_EXP__ 128
#define __cpp_hex_float 201603
#define __GCC_HAVE_DWARF2_CFI_ASM 1
#define __GXX_ABI_VERSION 1013
#define __FLT128_HAS_INFINITY__ 1
#define __FLT_MIN_EXP__ (-125)
#define __cpp_lambdas 200907
#define __FLT64X_HAS_QUIET_NAN__ 1
#define __INT_FAST64_TYPE__ long int
#define __FLT64_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F64
#define __DBL_MIN__ double(2.22507385850720138309023271733240406e-308L)
#define __PIE__ 2
#define __LP64__ 1
#define __FLT32X_EPSILON__ 2.22044604925031308084726333618164062e-16F32x
#define __DECIMAL_BID_FORMAT__ 1
#define __FLT64_MIN_10_EXP__ (-307)
#define __FLT64X_DECIMAL_DIG__ 21
#define __DEC128_MIN__ 1E-6143DL
#define __REGISTER_PREFIX__
#define __UINT16_MAX__ 0xffff
#define __FLT32_MIN__ 1.17549435082228750796873653722224568e-38F32
#define __UINT8_TYPE__ unsigned char
#define __FLT_MANT_DIG__ 24
#define __LDBL_DECIMAL_DIG__ 21
#define __VERSION__ "9.2.1 20191008"
#define __UINT64_C(c) c ## UL
#define __cpp_unicode_characters 200704
#define _STDC_PREDEF_H 1
#define __cpp_decltype_auto 201304
#define __GCC_ATOMIC_INT_LOCK_FREE 2
#define __FLT128_MAX_EXP__ 16384
#define __FLT32_MANT_DIG__ 24
#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __STDC_IEC_559_COMPLEX__ 1
#define __FLT128_HAS_DENORM__ 1
#define __FLT128_DIG__ 33
#define __SCHAR_WIDTH__ 8
#define __INT32_C(c) c
#define __DEC64_EPSILON__ 1E-15DD
#define __ORDER_PDP_ENDIAN__ 3412
#define __DEC128_MIN_EXP__ (-6142)
#define __FLT32_MAX_10_EXP__ 38
#define __INT_FAST32_TYPE__ long int
#define __UINT_LEAST16_TYPE__ short unsigned int
#define __FLT64X_HAS_INFINITY__ 1
#define unix 1
#define __DBL_HAS_DENORM__ 1
#define __INT16_MAX__ 0x7fff
#define __cpp_rtti 199711
#define __SIZE_TYPE__ long unsigned int
#define __UINT64_MAX__ 0xffffffffffffffffUL
#define __FLT64X_DIG__ 18
#define __INT8_TYPE__ signed char
#define __cpp_digit_separators 201309
#define __ELF__ 1
#define __GCC_ASM_FLAG_OUTPUTS__ 1
#define __FLT_RADIX__ 2
#define __INT_LEAST16_TYPE__ short int
#define __LDBL_EPSILON__ 1.08420217248550443400745280086994171e-19L
#define __UINTMAX_C(c) c ## UL
#define __GLIBCXX_BITSIZE_INT_N_0 128
#define __k8 1
#define __SIG_ATOMIC_MAX__ 0x7fffffff
#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2
#define __SIZEOF_PTRDIFF_T__ 8
#define __FLT32X_MANT_DIG__ 53
#define __x86_64__ 1
#define __FLT32X_MIN_EXP__ (-1021)
#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF
#define __INT_FAST16_MAX__ 0x7fffffffffffffffL
#define __FLT64_DIG__ 15
#define __UINT_FAST32_MAX__ 0xffffffffffffffffUL
#define __UINT_LEAST64_TYPE__ long unsigned int
#define __FLT_HAS_QUIET_NAN__ 1
#define __FLT_MAX_10_EXP__ 38
#define __LONG_MAX__ 0x7fffffffffffffffL
#define __FLT64X_HAS_DENORM__ 1
#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL
#define __FLT_HAS_INFINITY__ 1
#define __cpp_unicode_literals 200710
#define __UINT_FAST16_TYPE__ long unsigned int
#define __DEC64_MAX__ 9.999999999999999E384DD
#define __INT_FAST32_WIDTH__ 64
#define __CHAR16_TYPE__ short unsigned int
#define __PRAGMA_REDEFINE_EXTNAME 1
#define __SIZE_WIDTH__ 64
#define __SEG_FS 1
#define __INT_LEAST16_MAX__ 0x7fff
#define __DEC64_MANT_DIG__ 16
#define __INT64_MAX__ 0x7fffffffffffffffL
#define __UINT_LEAST32_MAX__ 0xffffffffU
#define __SEG_GS 1
#define __FLT32_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F32
#define __GCC_ATOMIC_LONG_LOCK_FREE 2
#define __SIG_ATOMIC_WIDTH__ 32
#define __INT_LEAST64_TYPE__ long int
#define __INT16_TYPE__ short int
#define __INT_LEAST8_TYPE__ signed char
#define __DEC32_MAX_EXP__ 97
#define __INT_FAST8_MAX__ 0x7f
#define __FLT128_MAX__ 1.18973149535723176508575932662800702e+4932F128
#define __INTPTR_MAX__ 0x7fffffffffffffffL
#define __cpp_sized_deallocation 201309
#define linux 1
#define __cpp_range_based_for 200907
#define __FLT64_HAS_QUIET_NAN__ 1
#define __FLT32_MIN_10_EXP__ (-37)
#define __SSE2__ 1
#define __EXCEPTIONS 1
#define __LDBL_MANT_DIG__ 64
#define __DBL_HAS_QUIET_NAN__ 1
#define __FLT64_HAS_INFINITY__ 1
#define __FLT64X_MAX__ 1.18973149535723176502126385303097021e+4932F64x
#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1)
#define __code_model_small__ 1
#define __cpp_return_type_deduction 201304
#define __k8__ 1
#define __INTPTR_TYPE__ long int
#define __UINT16_TYPE__ short unsigned int
#define __WCHAR_TYPE__ int
#define __SIZEOF_FLOAT__ 4
#define __pic__ 2
#define __UINTPTR_MAX__ 0xffffffffffffffffUL
#define __INT_FAST64_WIDTH__ 64
#define __DEC64_MIN_EXP__ (-382)
#define __cpp_decltype 200707
#define __FLT32_DECIMAL_DIG__ 9
#define __INT_FAST64_MAX__ 0x7fffffffffffffffL
#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1
#define __FLT_DIG__ 6
#define __FLT64X_MAX_EXP__ 16384
#define __UINT_FAST64_TYPE__ long unsigned int
#define __INT_MAX__ 0x7fffffff
#define __amd64__ 1
#define __INT64_TYPE__ long int
#define __FLT_MAX_EXP__ 128
#define __ORDER_BIG_ENDIAN__ 4321
#define __DBL_MANT_DIG__ 53
#define __cpp_inheriting_constructors 201511
#define __SIZEOF_FLOAT128__ 16
#define __INT_LEAST64_MAX__ 0x7fffffffffffffffL
#define __DEC64_MIN__ 1E-383DD
#define __WINT_TYPE__ unsigned int
#define __UINT_LEAST32_TYPE__ unsigned int
#define __SIZEOF_SHORT__ 2
#define __SSE__ 1
#define __LDBL_MIN_EXP__ (-16381)
#define __FLT64_MAX__ 1.79769313486231570814527423731704357e+308F64
#define __WINT_WIDTH__ 32
#define __INT_LEAST8_MAX__ 0x7f
#define __FLT32X_MAX_10_EXP__ 308
#define __SIZEOF_INT128__ 16
#define __LDBL_MAX_10_EXP__ 4932
#define __ATOMIC_RELAXED 0
#define __DBL_EPSILON__ double(2.22044604925031308084726333618164062e-16L)
#define __FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128
#define _LP64 1
#define __UINT8_C(c) c
#define __FLT64_MAX_EXP__ 1024
#define __INT_LEAST32_TYPE__ int
#define __SIZEOF_WCHAR_T__ 4
#define __FLT128_HAS_QUIET_NAN__ 1
#define __INT_FAST8_TYPE__ signed char
#define __FLT64X_MIN__ 3.36210314311209350626267781732175260e-4932F64x
#define __GNUC_STDC_INLINE__ 1
#define __FLT64_HAS_DENORM__ 1
#define __FLT32_EPSILON__ 1.19209289550781250000000000000000000e-7F32
#define __DBL_DECIMAL_DIG__ 17
#define __STDC_UTF_32__ 1
#define __INT_FAST8_WIDTH__ 8
#define __FXSR__ 1
#define __DEC_EVAL_METHOD__ 2
#define __FLT32X_MAX__ 1.79769313486231570814527423731704357e+308F32x
#define __cpp_runtime_arrays 198712
#define __UINT64_TYPE__ long unsigned int
#define __UINT32_C(c) c ## U
#define __INTMAX_MAX__ 0x7fffffffffffffffL
#define __cpp_alias_templates 200704
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __FLT_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F
#define __INT8_MAX__ 0x7f
#define __LONG_WIDTH__ 64
#define __PIC__ 2
#define __UINT_FAST32_TYPE__ long unsigned int
#define __CHAR32_TYPE__ unsigned int
#define __FLT_MAX__ 3.40282346638528859811704183484516925e+38F
#define __cpp_constexpr 201304
#define __INT32_TYPE__ int
#define __SIZEOF_DOUBLE__ 8
#define __cpp_exceptions 199711
#define __FLT_MIN_10_EXP__ (-37)
#define __FLT64_MIN__ 2.22507385850720138309023271733240406e-308F64
#define __INT_LEAST32_WIDTH__ 32
#define __INTMAX_TYPE__ long int
#define __DEC128_MAX_EXP__ 6145
#define __FLT32X_HAS_QUIET_NAN__ 1
#define __ATOMIC_CONSUME 1
#define __GNUC_MINOR__ 2
#define __GLIBCXX_TYPE_INT_N_0 __int128
#define __INT_FAST16_WIDTH__ 64
#define __UINTMAX_MAX__ 0xffffffffffffffffUL
#define __DEC32_MANT_DIG__ 7
#define __FLT32X_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F32x
#define __DBL_MAX_10_EXP__ 308
#define __LDBL_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951L
#define __INT16_C(c) c
#define __cpp_generic_lambdas 201304
#define __STDC__ 1
#define __FLT32X_DIG__ 15
#define __PTRDIFF_TYPE__ long int
#define __ATOMIC_SEQ_CST 5
#define __UINT32_TYPE__ unsigned int
#define __FLT32X_MIN_10_EXP__ (-307)
#define __UINTPTR_TYPE__ long unsigned int
#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD
#define __DEC128_MANT_DIG__ 34
#define __LDBL_MIN_10_EXP__ (-4931)
#define __FLT128_EPSILON__ 1.92592994438723585305597794258492732e-34F128
#define __SSE_MATH__ 1
#define __SIZEOF_LONG_LONG__ 8
#define __cpp_user_defined_literals 200809
#define __FLT128_DECIMAL_DIG__ 36
#define __GCC_ATOMIC_LLONG_LOCK_FREE 2
#define __FLT32X_MIN__ 2.22507385850720138309023271733240406e-308F32x
#define __LDBL_DIG__ 18
#define __FLT_DECIMAL_DIG__ 9
#define __UINT_FAST16_MAX__ 0xffffffffffffffffUL
#define __GCC_ATOMIC_SHORT_LOCK_FREE 2
#define __INT_LEAST64_WIDTH__ 64
#define __UINT_FAST8_TYPE__ unsigned char
#define _GNU_SOURCE 1
#define __cpp_init_captures 201304
#define __ATOMIC_ACQ_REL 4
#define __ATOMIC_RELEASE 3

View file

@ -29,27 +29,25 @@ class textEditor : public QTextEdit
public: public:
explicit textEditor(QWidget *parent = nullptr); explicit textEditor(QWidget *parent = nullptr);
~textEditor() override; ~textEditor() override;
void newFile(); bool save(QFileInfo file);
bool loadFile(const QString &fileName); bool saveAs(QFileInfo file);
bool save(); bool save(QString calculator);
bool saveAs(); bool saveAs(QString calculator);
bool saveFile(const QString &fileName); bool saveFile(const QString &fileName);
QString userFriendlyCurrentFile(); QString userFriendlyCurrentFile();
QString currentFile() { return curFile; } QString currentFile() { return curFile; }
protected: protected:
void closeEvent(QCloseEvent *event) override;
private slots: private slots:
void documentWasModified(); void documentWasModified();
private: private:
QWidget * wParent; QWidget * wParent;
bool maybeSave();
void setCurrentFile(const QString &fileName); void setCurrentFile(const QString &fileName);
QString strippedName(const QString &fullFileName); QString strippedName(const QString &fullFileName);
QString curFile; QString curFile;
bool isUntitled; bool isUntitled;
QDir defaultPath; QDir defaultPath;

View file

@ -1,66 +0,0 @@
/********************************************************************************
** Form generated from reading UI file 'getnumber.ui'
**
** Created by: Qt User Interface Compiler version 5.12.4
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_GETNUMBER_H
#define UI_GETNUMBER_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QPushButton>
QT_BEGIN_NAMESPACE
class Ui_getNumber
{
public:
QDialogButtonBox *buttonBox;
QLineEdit *lineEdit;
QPushButton *pushButton;
void setupUi(QDialog *getNumber)
{
if (getNumber->objectName().isEmpty())
getNumber->setObjectName(QString::fromUtf8("getNumber"));
getNumber->resize(427, 118);
buttonBox = new QDialogButtonBox(getNumber);
buttonBox->setObjectName(QString::fromUtf8("buttonBox"));
buttonBox->setGeometry(QRect(0, 70, 411, 32));
buttonBox->setOrientation(Qt::Horizontal);
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
lineEdit = new QLineEdit(getNumber);
lineEdit->setObjectName(QString::fromUtf8("lineEdit"));
lineEdit->setGeometry(QRect(30, 20, 381, 32));
pushButton = new QPushButton(getNumber);
pushButton->setObjectName(QString::fromUtf8("pushButton"));
pushButton->setGeometry(QRect(30, 70, 88, 34));
retranslateUi(getNumber);
QObject::connect(buttonBox, SIGNAL(accepted()), getNumber, SLOT(accept()));
QObject::connect(buttonBox, SIGNAL(rejected()), getNumber, SLOT(reject()));
QMetaObject::connectSlotsByName(getNumber);
} // setupUi
void retranslateUi(QDialog *getNumber)
{
getNumber->setWindowTitle(QApplication::translate("getNumber", "Dialog", nullptr));
pushButton->setText(QApplication::translate("getNumber", "Test", nullptr));
} // retranslateUi
};
namespace Ui {
class getNumber: public Ui_getNumber {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_GETNUMBER_H

View file

@ -1,125 +0,0 @@
/********************************************************************************
** Form generated from reading UI file 'hp_infodialog.ui'
**
** Created by: Qt User Interface Compiler version 5.12.4
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_HP_INFODIALOG_H
#define UI_HP_INFODIALOG_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox>
#include <QtWidgets/QFormLayout>
#include <QtWidgets/QFrame>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QVBoxLayout>
QT_BEGIN_NAMESPACE
class Ui_hp_infoDialog
{
public:
QVBoxLayout *verticalLayout;
QFrame *frame;
QHBoxLayout *horizontalLayout;
QFormLayout *formLayout;
QLabel *labelapp;
QLabel *appver;
QLabel *labelopp;
QLabel *oppver;
QLabel *labelser;
QLabel *serialnum;
QDialogButtonBox *buttonBox;
void setupUi(QDialog *hp_infoDialog)
{
if (hp_infoDialog->objectName().isEmpty())
hp_infoDialog->setObjectName(QString::fromUtf8("hp_infoDialog"));
hp_infoDialog->resize(411, 143);
verticalLayout = new QVBoxLayout(hp_infoDialog);
verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
frame = new QFrame(hp_infoDialog);
frame->setObjectName(QString::fromUtf8("frame"));
frame->setFrameShape(QFrame::StyledPanel);
frame->setFrameShadow(QFrame::Raised);
horizontalLayout = new QHBoxLayout(frame);
horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
formLayout = new QFormLayout();
formLayout->setObjectName(QString::fromUtf8("formLayout"));
formLayout->setFormAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter);
labelapp = new QLabel(frame);
labelapp->setObjectName(QString::fromUtf8("labelapp"));
formLayout->setWidget(0, QFormLayout::LabelRole, labelapp);
appver = new QLabel(frame);
appver->setObjectName(QString::fromUtf8("appver"));
formLayout->setWidget(0, QFormLayout::FieldRole, appver);
labelopp = new QLabel(frame);
labelopp->setObjectName(QString::fromUtf8("labelopp"));
formLayout->setWidget(1, QFormLayout::LabelRole, labelopp);
oppver = new QLabel(frame);
oppver->setObjectName(QString::fromUtf8("oppver"));
formLayout->setWidget(1, QFormLayout::FieldRole, oppver);
labelser = new QLabel(frame);
labelser->setObjectName(QString::fromUtf8("labelser"));
formLayout->setWidget(2, QFormLayout::LabelRole, labelser);
serialnum = new QLabel(frame);
serialnum->setObjectName(QString::fromUtf8("serialnum"));
formLayout->setWidget(2, QFormLayout::FieldRole, serialnum);
horizontalLayout->addLayout(formLayout);
verticalLayout->addWidget(frame);
buttonBox = new QDialogButtonBox(hp_infoDialog);
buttonBox->setObjectName(QString::fromUtf8("buttonBox"));
buttonBox->setOrientation(Qt::Horizontal);
buttonBox->setStandardButtons(QDialogButtonBox::Ok);
verticalLayout->addWidget(buttonBox);
retranslateUi(hp_infoDialog);
QObject::connect(buttonBox, SIGNAL(rejected()), hp_infoDialog, SLOT(reject()));
QObject::connect(buttonBox, SIGNAL(accepted()), hp_infoDialog, SLOT(accept()));
QMetaObject::connectSlotsByName(hp_infoDialog);
} // setupUi
void retranslateUi(QDialog *hp_infoDialog)
{
hp_infoDialog->setWindowTitle(QApplication::translate("hp_infoDialog", "HP Information", nullptr));
labelapp->setText(QApplication::translate("hp_infoDialog", "Application version:", nullptr));
appver->setText(QApplication::translate("hp_infoDialog", "-", nullptr));
labelopp->setText(QApplication::translate("hp_infoDialog", "Operational system version:", nullptr));
oppver->setText(QApplication::translate("hp_infoDialog", "-", nullptr));
labelser->setText(QApplication::translate("hp_infoDialog", "Serial number:", nullptr));
serialnum->setText(QApplication::translate("hp_infoDialog", "-", nullptr));
} // retranslateUi
};
namespace Ui {
class hp_infoDialog: public Ui_hp_infoDialog {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_HP_INFODIALOG_H

View file

@ -1,64 +0,0 @@
/********************************************************************************
** Form generated from reading UI file 'hp_mdiwindow.ui'
**
** Created by: Qt User Interface Compiler version 5.12.4
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_HP_MDIWINDOW_H
#define UI_HP_MDIWINDOW_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QMainWindow>
#include <QtWidgets/QTextEdit>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class Ui_hp_MdiWindow
{
public:
QWidget *centralwidget;
QVBoxLayout *verticalLayout;
QTextEdit *textEdit;
void setupUi(QMainWindow *hp_MdiWindow)
{
if (hp_MdiWindow->objectName().isEmpty())
hp_MdiWindow->setObjectName(QString::fromUtf8("hp_MdiWindow"));
hp_MdiWindow->setEnabled(true);
hp_MdiWindow->resize(575, 320);
hp_MdiWindow->setMinimumSize(QSize(400, 200));
centralwidget = new QWidget(hp_MdiWindow);
centralwidget->setObjectName(QString::fromUtf8("centralwidget"));
verticalLayout = new QVBoxLayout(centralwidget);
verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
textEdit = new QTextEdit(centralwidget);
textEdit->setObjectName(QString::fromUtf8("textEdit"));
verticalLayout->addWidget(textEdit);
hp_MdiWindow->setCentralWidget(centralwidget);
retranslateUi(hp_MdiWindow);
QMetaObject::connectSlotsByName(hp_MdiWindow);
} // setupUi
void retranslateUi(QMainWindow *hp_MdiWindow)
{
hp_MdiWindow->setWindowTitle(QApplication::translate("hp_MdiWindow", "LogWindow", nullptr));
} // retranslateUi
};
namespace Ui {
class hp_MdiWindow: public Ui_hp_MdiWindow {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_HP_MDIWINDOW_H

View file

@ -1,339 +0,0 @@
/********************************************************************************
** Form generated from reading UI file 'hp_settingsdlg.ui'
**
** Created by: Qt User Interface Compiler version 5.12.4
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_HP_SETTINGSDLG_H
#define UI_HP_SETTINGSDLG_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QComboBox>
#include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox>
#include <QtWidgets/QLabel>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QTabWidget>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class Ui_hp_SettingsDlg
{
public:
QVBoxLayout *verticalLayout;
QTabWidget *tabWidget;
QWidget *hpSettings;
QLabel *label;
QComboBox *cb_angle;
QCheckBox *ch_signed;
QComboBox *cb_format;
QComboBox *cb_grouping;
QLabel *label_2;
QLabel *label_3;
QComboBox *cb_entry;
QLabel *label_4;
QComboBox *cb_integers;
QLabel *label_5;
QLabel *label_6;
QComboBox *cb_complex;
QComboBox *cb_language;
QLabel *label_7;
QLabel *label_8;
QComboBox *cb_font;
QCheckBox *ch_textbook;
QCheckBox *ch_menu;
QComboBox *cb_theme;
QLabel *label_17;
QComboBox *cb_precision;
QLineEdit *le_integer;
QDialogButtonBox *buttonBox;
void setupUi(QDialog *hp_SettingsDlg)
{
if (hp_SettingsDlg->objectName().isEmpty())
hp_SettingsDlg->setObjectName(QString::fromUtf8("hp_SettingsDlg"));
hp_SettingsDlg->setEnabled(true);
hp_SettingsDlg->resize(415, 455);
hp_SettingsDlg->setFocusPolicy(Qt::StrongFocus);
verticalLayout = new QVBoxLayout(hp_SettingsDlg);
verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
tabWidget = new QTabWidget(hp_SettingsDlg);
tabWidget->setObjectName(QString::fromUtf8("tabWidget"));
hpSettings = new QWidget();
hpSettings->setObjectName(QString::fromUtf8("hpSettings"));
label = new QLabel(hpSettings);
label->setObjectName(QString::fromUtf8("label"));
label->setGeometry(QRect(17, 20, 101, 30));
label->setLayoutDirection(Qt::RightToLeft);
label->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
cb_angle = new QComboBox(hpSettings);
cb_angle->addItem(QString());
cb_angle->addItem(QString());
cb_angle->addItem(QString());
cb_angle->setObjectName(QString::fromUtf8("cb_angle"));
cb_angle->setGeometry(QRect(130, 20, 131, 32));
ch_signed = new QCheckBox(hpSettings);
ch_signed->setObjectName(QString::fromUtf8("ch_signed"));
ch_signed->setGeometry(QRect(310, 150, 41, 22));
ch_signed->setLayoutDirection(Qt::RightToLeft);
cb_format = new QComboBox(hpSettings);
cb_format->addItem(QString());
cb_format->addItem(QString());
cb_format->addItem(QString());
cb_format->addItem(QString());
cb_format->addItem(QString());
cb_format->addItem(QString());
cb_format->setObjectName(QString::fromUtf8("cb_format"));
cb_format->setGeometry(QRect(130, 50, 131, 32));
cb_grouping = new QComboBox(hpSettings);
cb_grouping->addItem(QString());
cb_grouping->addItem(QString());
cb_grouping->addItem(QString());
cb_grouping->addItem(QString());
cb_grouping->addItem(QString());
cb_grouping->addItem(QString());
cb_grouping->addItem(QString());
cb_grouping->addItem(QString());
cb_grouping->addItem(QString());
cb_grouping->addItem(QString());
cb_grouping->addItem(QString());
cb_grouping->setObjectName(QString::fromUtf8("cb_grouping"));
cb_grouping->setGeometry(QRect(130, 81, 131, 32));
label_2 = new QLabel(hpSettings);
label_2->setObjectName(QString::fromUtf8("label_2"));
label_2->setGeometry(QRect(20, 50, 101, 30));
label_2->setLayoutDirection(Qt::RightToLeft);
label_2->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
label_3 = new QLabel(hpSettings);
label_3->setObjectName(QString::fromUtf8("label_3"));
label_3->setGeometry(QRect(20, 80, 101, 30));
label_3->setLayoutDirection(Qt::RightToLeft);
label_3->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
cb_entry = new QComboBox(hpSettings);
cb_entry->addItem(QString());
cb_entry->addItem(QString());
cb_entry->addItem(QString());
cb_entry->setObjectName(QString::fromUtf8("cb_entry"));
cb_entry->setGeometry(QRect(130, 112, 131, 32));
label_4 = new QLabel(hpSettings);
label_4->setObjectName(QString::fromUtf8("label_4"));
label_4->setGeometry(QRect(20, 111, 101, 30));
label_4->setLayoutDirection(Qt::RightToLeft);
label_4->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
cb_integers = new QComboBox(hpSettings);
cb_integers->addItem(QString());
cb_integers->addItem(QString());
cb_integers->addItem(QString());
cb_integers->addItem(QString());
cb_integers->setObjectName(QString::fromUtf8("cb_integers"));
cb_integers->setGeometry(QRect(130, 144, 131, 32));
label_5 = new QLabel(hpSettings);
label_5->setObjectName(QString::fromUtf8("label_5"));
label_5->setGeometry(QRect(20, 143, 101, 30));
label_5->setLayoutDirection(Qt::RightToLeft);
label_5->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
label_6 = new QLabel(hpSettings);
label_6->setObjectName(QString::fromUtf8("label_6"));
label_6->setGeometry(QRect(20, 175, 101, 30));
label_6->setLayoutDirection(Qt::RightToLeft);
label_6->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
cb_complex = new QComboBox(hpSettings);
cb_complex->addItem(QString());
cb_complex->addItem(QString());
cb_complex->setObjectName(QString::fromUtf8("cb_complex"));
cb_complex->setGeometry(QRect(130, 176, 131, 32));
cb_language = new QComboBox(hpSettings);
cb_language->addItem(QString());
cb_language->addItem(QString());
cb_language->addItem(QString());
cb_language->addItem(QString());
cb_language->addItem(QString());
cb_language->addItem(QString());
cb_language->addItem(QString());
cb_language->addItem(QString());
cb_language->setObjectName(QString::fromUtf8("cb_language"));
cb_language->setGeometry(QRect(130, 208, 131, 32));
label_7 = new QLabel(hpSettings);
label_7->setObjectName(QString::fromUtf8("label_7"));
label_7->setGeometry(QRect(20, 207, 101, 30));
label_7->setLayoutDirection(Qt::RightToLeft);
label_7->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
label_8 = new QLabel(hpSettings);
label_8->setObjectName(QString::fromUtf8("label_8"));
label_8->setGeometry(QRect(20, 239, 101, 30));
label_8->setLayoutDirection(Qt::RightToLeft);
label_8->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
cb_font = new QComboBox(hpSettings);
cb_font->addItem(QString());
cb_font->addItem(QString());
cb_font->addItem(QString());
cb_font->setObjectName(QString::fromUtf8("cb_font"));
cb_font->setGeometry(QRect(130, 240, 131, 32));
ch_textbook = new QCheckBox(hpSettings);
ch_textbook->setObjectName(QString::fromUtf8("ch_textbook"));
ch_textbook->setGeometry(QRect(8, 277, 141, 22));
ch_textbook->setLayoutDirection(Qt::RightToLeft);
ch_menu = new QCheckBox(hpSettings);
ch_menu->setObjectName(QString::fromUtf8("ch_menu"));
ch_menu->setGeometry(QRect(151, 277, 141, 22));
ch_menu->setLayoutDirection(Qt::RightToLeft);
cb_theme = new QComboBox(hpSettings);
cb_theme->addItem(QString());
cb_theme->addItem(QString());
cb_theme->setObjectName(QString::fromUtf8("cb_theme"));
cb_theme->setGeometry(QRect(130, 311, 131, 32));
label_17 = new QLabel(hpSettings);
label_17->setObjectName(QString::fromUtf8("label_17"));
label_17->setGeometry(QRect(20, 310, 101, 30));
label_17->setLayoutDirection(Qt::RightToLeft);
label_17->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
cb_precision = new QComboBox(hpSettings);
cb_precision->addItem(QString());
cb_precision->addItem(QString());
cb_precision->addItem(QString());
cb_precision->addItem(QString());
cb_precision->addItem(QString());
cb_precision->addItem(QString());
cb_precision->addItem(QString());
cb_precision->addItem(QString());
cb_precision->addItem(QString());
cb_precision->addItem(QString());
cb_precision->addItem(QString());
cb_precision->addItem(QString());
cb_precision->setObjectName(QString::fromUtf8("cb_precision"));
cb_precision->setGeometry(QRect(270, 50, 51, 32));
le_integer = new QLineEdit(hpSettings);
le_integer->setObjectName(QString::fromUtf8("le_integer"));
le_integer->setGeometry(QRect(266, 144, 41, 32));
le_integer->setInputMethodHints(Qt::ImhDigitsOnly);
tabWidget->addTab(hpSettings, QString());
verticalLayout->addWidget(tabWidget);
buttonBox = new QDialogButtonBox(hp_SettingsDlg);
buttonBox->setObjectName(QString::fromUtf8("buttonBox"));
buttonBox->setOrientation(Qt::Horizontal);
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset);
verticalLayout->addWidget(buttonBox);
retranslateUi(hp_SettingsDlg);
QObject::connect(buttonBox, SIGNAL(accepted()), hp_SettingsDlg, SLOT(accept()));
QObject::connect(buttonBox, SIGNAL(rejected()), hp_SettingsDlg, SLOT(reject()));
tabWidget->setCurrentIndex(0);
cb_angle->setCurrentIndex(0);
QMetaObject::connectSlotsByName(hp_SettingsDlg);
} // setupUi
void retranslateUi(QDialog *hp_SettingsDlg)
{
hp_SettingsDlg->setWindowTitle(QApplication::translate("hp_SettingsDlg", "Settings", nullptr));
label->setText(QApplication::translate("hp_SettingsDlg", "Angle Measure:", nullptr));
cb_angle->setItemText(0, QApplication::translate("hp_SettingsDlg", "Radians", nullptr));
cb_angle->setItemText(1, QApplication::translate("hp_SettingsDlg", "Degrees", nullptr));
cb_angle->setItemText(2, QApplication::translate("hp_SettingsDlg", "Gradians", nullptr));
cb_angle->setCurrentText(QApplication::translate("hp_SettingsDlg", "Radians", nullptr));
ch_signed->setText(QApplication::translate("hp_SettingsDlg", "\302\261:", nullptr));
cb_format->setItemText(0, QApplication::translate("hp_SettingsDlg", "Standard", nullptr));
cb_format->setItemText(1, QApplication::translate("hp_SettingsDlg", "Fixed", nullptr));
cb_format->setItemText(2, QApplication::translate("hp_SettingsDlg", "Scientific", nullptr));
cb_format->setItemText(3, QApplication::translate("hp_SettingsDlg", "Engineering", nullptr));
cb_format->setItemText(4, QApplication::translate("hp_SettingsDlg", "Floating", nullptr));
cb_format->setItemText(5, QApplication::translate("hp_SettingsDlg", "Rounded", nullptr));
cb_format->setCurrentText(QApplication::translate("hp_SettingsDlg", "Standard", nullptr));
cb_grouping->setItemText(0, QApplication::translate("hp_SettingsDlg", "123,456.789", nullptr));
cb_grouping->setItemText(1, QApplication::translate("hp_SettingsDlg", "123'456.789", nullptr));
cb_grouping->setItemText(2, QApplication::translate("hp_SettingsDlg", "123 456.789", nullptr));
cb_grouping->setItemText(3, QApplication::translate("hp_SettingsDlg", "123456.789", nullptr));
cb_grouping->setItemText(4, QApplication::translate("hp_SettingsDlg", "123.456,789", nullptr));
cb_grouping->setItemText(5, QApplication::translate("hp_SettingsDlg", "123'456,789", nullptr));
cb_grouping->setItemText(6, QApplication::translate("hp_SettingsDlg", "123 456,789", nullptr));
cb_grouping->setItemText(7, QApplication::translate("hp_SettingsDlg", "123\"456.789", nullptr));
cb_grouping->setItemText(8, QApplication::translate("hp_SettingsDlg", "123456,789", nullptr));
cb_grouping->setItemText(9, QApplication::translate("hp_SettingsDlg", "1234,5678.901", nullptr));
cb_grouping->setItemText(10, QApplication::translate("hp_SettingsDlg", "1,23,456.789", nullptr));
cb_grouping->setCurrentText(QApplication::translate("hp_SettingsDlg", "123,456.789", nullptr));
label_2->setText(QApplication::translate("hp_SettingsDlg", "Number Format:", nullptr));
label_3->setText(QApplication::translate("hp_SettingsDlg", "Digit Grouping:", nullptr));
cb_entry->setItemText(0, QApplication::translate("hp_SettingsDlg", "Textbook", nullptr));
cb_entry->setItemText(1, QApplication::translate("hp_SettingsDlg", "Algebraic", nullptr));
cb_entry->setItemText(2, QApplication::translate("hp_SettingsDlg", "RPN", nullptr));
cb_entry->setCurrentText(QApplication::translate("hp_SettingsDlg", "Textbook", nullptr));
label_4->setText(QApplication::translate("hp_SettingsDlg", "Entry:", nullptr));
cb_integers->setItemText(0, QApplication::translate("hp_SettingsDlg", "Binary", nullptr));
cb_integers->setItemText(1, QApplication::translate("hp_SettingsDlg", "Octal", nullptr));
cb_integers->setItemText(2, QApplication::translate("hp_SettingsDlg", "Decimal", nullptr));
cb_integers->setItemText(3, QApplication::translate("hp_SettingsDlg", "Hex", nullptr));
cb_integers->setCurrentText(QApplication::translate("hp_SettingsDlg", "Binary", nullptr));
label_5->setText(QApplication::translate("hp_SettingsDlg", "Integers:", nullptr));
label_6->setText(QApplication::translate("hp_SettingsDlg", "Complex:", nullptr));
cb_complex->setItemText(0, QApplication::translate("hp_SettingsDlg", "a+b*i", nullptr));
cb_complex->setItemText(1, QApplication::translate("hp_SettingsDlg", "(a,b)", nullptr));
cb_complex->setCurrentText(QApplication::translate("hp_SettingsDlg", "a+b*i", nullptr));
cb_language->setItemText(0, QApplication::translate("hp_SettingsDlg", "Deutsch", nullptr));
cb_language->setItemText(1, QApplication::translate("hp_SettingsDlg", "English", nullptr));
cb_language->setItemText(2, QApplication::translate("hp_SettingsDlg", "Espanol", nullptr));
cb_language->setItemText(3, QApplication::translate("hp_SettingsDlg", "Francais", nullptr));
cb_language->setItemText(4, QApplication::translate("hp_SettingsDlg", "Nederlands", nullptr));
cb_language->setItemText(5, QApplication::translate("hp_SettingsDlg", "Portugues", nullptr));
cb_language->setItemText(6, QApplication::translate("hp_SettingsDlg", "New Item", nullptr));
cb_language->setItemText(7, QApplication::translate("hp_SettingsDlg", "New Item", nullptr));
cb_language->setCurrentText(QApplication::translate("hp_SettingsDlg", "Deutsch", nullptr));
label_7->setText(QApplication::translate("hp_SettingsDlg", "Language:", nullptr));
label_8->setText(QApplication::translate("hp_SettingsDlg", "Font Size:", nullptr));
cb_font->setItemText(0, QApplication::translate("hp_SettingsDlg", "Small Font", nullptr));
cb_font->setItemText(1, QApplication::translate("hp_SettingsDlg", "Medium Font", nullptr));
cb_font->setItemText(2, QApplication::translate("hp_SettingsDlg", "Large Font", nullptr));
cb_font->setCurrentText(QApplication::translate("hp_SettingsDlg", "Small Font", nullptr));
ch_textbook->setText(QApplication::translate("hp_SettingsDlg", "Textbook Display:", nullptr));
ch_menu->setText(QApplication::translate("hp_SettingsDlg", "Menu Display:", nullptr));
cb_theme->setItemText(0, QApplication::translate("hp_SettingsDlg", "Light", nullptr));
cb_theme->setItemText(1, QApplication::translate("hp_SettingsDlg", "Dark", nullptr));
cb_theme->setCurrentText(QApplication::translate("hp_SettingsDlg", "Light", nullptr));
label_17->setText(QApplication::translate("hp_SettingsDlg", "Color Theme:", nullptr));
cb_precision->setItemText(0, QApplication::translate("hp_SettingsDlg", "0", nullptr));
cb_precision->setItemText(1, QApplication::translate("hp_SettingsDlg", "1", nullptr));
cb_precision->setItemText(2, QApplication::translate("hp_SettingsDlg", "2", nullptr));
cb_precision->setItemText(3, QApplication::translate("hp_SettingsDlg", "3", nullptr));
cb_precision->setItemText(4, QApplication::translate("hp_SettingsDlg", "4", nullptr));
cb_precision->setItemText(5, QApplication::translate("hp_SettingsDlg", "5", nullptr));
cb_precision->setItemText(6, QApplication::translate("hp_SettingsDlg", "6", nullptr));
cb_precision->setItemText(7, QApplication::translate("hp_SettingsDlg", "7", nullptr));
cb_precision->setItemText(8, QApplication::translate("hp_SettingsDlg", "8", nullptr));
cb_precision->setItemText(9, QApplication::translate("hp_SettingsDlg", "9", nullptr));
cb_precision->setItemText(10, QApplication::translate("hp_SettingsDlg", "10", nullptr));
cb_precision->setItemText(11, QApplication::translate("hp_SettingsDlg", "11", nullptr));
cb_precision->setCurrentText(QApplication::translate("hp_SettingsDlg", "0", nullptr));
le_integer->setText(QApplication::translate("hp_SettingsDlg", "32", nullptr));
tabWidget->setTabText(tabWidget->indexOf(hpSettings), QApplication::translate("hp_SettingsDlg", "Home Settings", nullptr));
} // retranslateUi
};
namespace Ui {
class hp_SettingsDlg: public Ui_hp_SettingsDlg {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_HP_SETTINGSDLG_H

View file

@ -1,574 +0,0 @@
/********************************************************************************
** Form generated from reading UI file 'mainwindow.ui'
**
** Created by: Qt User Interface Compiler version 5.12.4
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_MAINWINDOW_H
#define UI_MAINWINDOW_H
#include <QtCore/QVariant>
#include <QtWidgets/QAction>
#include <QtWidgets/QApplication>
#include <QtWidgets/QDockWidget>
#include <QtWidgets/QGridLayout>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QMainWindow>
#include <QtWidgets/QMdiArea>
#include <QtWidgets/QMenu>
#include <QtWidgets/QMenuBar>
#include <QtWidgets/QStatusBar>
#include <QtWidgets/QTextEdit>
#include <QtWidgets/QToolBar>
#include <QtWidgets/QTreeView>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class Ui_MainWindow
{
public:
QAction *actionCut;
QAction *actionCopy;
QAction *actionPaste;
QAction *actionClose;
QAction *actionClose_all;
QAction *actionTile;
QAction *actionCascade;
QAction *actionNext;
QAction *actionMessages;
QAction *actionMonitor;
QAction *actionCalculators;
QAction *actionAbout_HP_Connect;
QAction *actionPreferences;
QAction *actionPrevious;
QAction *actionContent;
QAction *actionSave;
QAction *actionSave_All;
QAction *actionCreateNew;
QAction *actionExit;
QAction *actionOpen;
QAction *actionLog;
QAction *actionTest;
QAction *actionTreePreference;
QAction *actionTestSettings;
QAction *actionTestScreen;
QAction *actionRefresh;
QAction *actionSettings;
QAction *actionFileOpen;
QAction *actionFileDelete;
QAction *actionFileRename;
QAction *actionCalcOpen;
QAction *actionCalcDelete;
QAction *actionCalcRename;
QAction *actionNewFolder;
QAction *actionNew_Note;
QAction *actionNew_Program;
QWidget *centralWidget;
QHBoxLayout *horizontalLayout;
QMdiArea *mdiArea;
QMenuBar *menuBar;
QMenu *menuFile;
QMenu *menuEdit;
QMenu *menuWindow;
QMenu *menuHelp;
QDockWidget *dwCalculator;
QWidget *wCalculator;
QVBoxLayout *verticalLayout_3;
QTreeView *tvCalculators;
QToolBar *toolBar;
QDockWidget *dwContent;
QWidget *wContent;
QVBoxLayout *verticalLayout_2;
QTreeView *tvContent;
QDockWidget *dwMessenger;
QWidget *wMessage;
QVBoxLayout *verticalLayout;
QTextEdit *teMessage;
QDockWidget *dwMonitor;
QWidget *wMonitor;
QVBoxLayout *verticalLayout_4;
QGridLayout *wMonitorGrid;
QStatusBar *statusBar;
void setupUi(QMainWindow *MainWindow)
{
if (MainWindow->objectName().isEmpty())
MainWindow->setObjectName(QString::fromUtf8("MainWindow"));
MainWindow->resize(919, 584);
actionCut = new QAction(MainWindow);
actionCut->setObjectName(QString::fromUtf8("actionCut"));
QIcon icon;
QString iconThemeName = QString::fromUtf8("cut");
if (QIcon::hasThemeIcon(iconThemeName)) {
icon = QIcon::fromTheme(iconThemeName);
} else {
icon.addFile(QString::fromUtf8(":/icons/cut_32x32.png"), QSize(), QIcon::Normal, QIcon::Off);
}
actionCut->setIcon(icon);
QFont font;
actionCut->setFont(font);
actionCopy = new QAction(MainWindow);
actionCopy->setObjectName(QString::fromUtf8("actionCopy"));
QIcon icon1;
iconThemeName = QString::fromUtf8("action_copy");
if (QIcon::hasThemeIcon(iconThemeName)) {
icon1 = QIcon::fromTheme(iconThemeName);
} else {
icon1.addFile(QString::fromUtf8(":/icons/copy_32x32.png"), QSize(), QIcon::Normal, QIcon::Off);
}
actionCopy->setIcon(icon1);
actionCopy->setFont(font);
actionPaste = new QAction(MainWindow);
actionPaste->setObjectName(QString::fromUtf8("actionPaste"));
QIcon icon2;
icon2.addFile(QString::fromUtf8(":/icons/paste_32x32.png"), QSize(), QIcon::Normal, QIcon::Off);
actionPaste->setIcon(icon2);
actionClose = new QAction(MainWindow);
actionClose->setObjectName(QString::fromUtf8("actionClose"));
actionClose_all = new QAction(MainWindow);
actionClose_all->setObjectName(QString::fromUtf8("actionClose_all"));
actionTile = new QAction(MainWindow);
actionTile->setObjectName(QString::fromUtf8("actionTile"));
actionCascade = new QAction(MainWindow);
actionCascade->setObjectName(QString::fromUtf8("actionCascade"));
actionNext = new QAction(MainWindow);
actionNext->setObjectName(QString::fromUtf8("actionNext"));
actionMessages = new QAction(MainWindow);
actionMessages->setObjectName(QString::fromUtf8("actionMessages"));
QIcon icon3;
icon3.addFile(QString::fromUtf8(":/icons/chat_32x32.png"), QSize(), QIcon::Normal, QIcon::Off);
actionMessages->setIcon(icon3);
actionMonitor = new QAction(MainWindow);
actionMonitor->setObjectName(QString::fromUtf8("actionMonitor"));
QIcon icon4;
icon4.addFile(QString::fromUtf8(":/icons/monitor_32x32.png"), QSize(), QIcon::Normal, QIcon::Off);
actionMonitor->setIcon(icon4);
actionCalculators = new QAction(MainWindow);
actionCalculators->setObjectName(QString::fromUtf8("actionCalculators"));
QIcon icon5;
icon5.addFile(QString::fromUtf8(":/icons/calc_tree_32x32.png"), QSize(), QIcon::Normal, QIcon::Off);
actionCalculators->setIcon(icon5);
actionAbout_HP_Connect = new QAction(MainWindow);
actionAbout_HP_Connect->setObjectName(QString::fromUtf8("actionAbout_HP_Connect"));
QIcon icon6;
iconThemeName = QString::fromUtf8("about");
if (QIcon::hasThemeIcon(iconThemeName)) {
icon6 = QIcon::fromTheme(iconThemeName);
} else {
icon6.addFile(QString::fromUtf8(":/icons/about_32x32.png"), QSize(), QIcon::Normal, QIcon::Off);
}
actionAbout_HP_Connect->setIcon(icon6);
actionAbout_HP_Connect->setFont(font);
actionPreferences = new QAction(MainWindow);
actionPreferences->setObjectName(QString::fromUtf8("actionPreferences"));
QIcon icon7;
icon7.addFile(QString::fromUtf8(":/icons/preferences_32x32.png"), QSize(), QIcon::Normal, QIcon::Off);
actionPreferences->setIcon(icon7);
actionPreferences->setFont(font);
actionPrevious = new QAction(MainWindow);
actionPrevious->setObjectName(QString::fromUtf8("actionPrevious"));
actionContent = new QAction(MainWindow);
actionContent->setObjectName(QString::fromUtf8("actionContent"));
QIcon icon8;
icon8.addFile(QString::fromUtf8(":/icons/content_32x32.png"), QSize(), QIcon::Normal, QIcon::Off);
actionContent->setIcon(icon8);
actionSave = new QAction(MainWindow);
actionSave->setObjectName(QString::fromUtf8("actionSave"));
QIcon icon9;
icon9.addFile(QString::fromUtf8(":/icons/save_32x32.png"), QSize(), QIcon::Normal, QIcon::Off);
actionSave->setIcon(icon9);
actionSave_All = new QAction(MainWindow);
actionSave_All->setObjectName(QString::fromUtf8("actionSave_All"));
QIcon icon10;
icon10.addFile(QString::fromUtf8(":/icons/save_all_32x32.png"), QSize(), QIcon::Normal, QIcon::Off);
actionSave_All->setIcon(icon10);
actionCreateNew = new QAction(MainWindow);
actionCreateNew->setObjectName(QString::fromUtf8("actionCreateNew"));
QIcon icon11;
icon11.addFile(QString::fromUtf8(":/icons/add_new_32x32.png"), QSize(), QIcon::Normal, QIcon::Off);
actionCreateNew->setIcon(icon11);
actionExit = new QAction(MainWindow);
actionExit->setObjectName(QString::fromUtf8("actionExit"));
QIcon icon12;
icon12.addFile(QString::fromUtf8(":/icons/delete_32x32.png"), QSize(), QIcon::Normal, QIcon::Off);
actionExit->setIcon(icon12);
actionOpen = new QAction(MainWindow);
actionOpen->setObjectName(QString::fromUtf8("actionOpen"));
QIcon icon13;
icon13.addFile(QString::fromUtf8(":/icons/add_icon_32x32.png"), QSize(), QIcon::Normal, QIcon::Off);
actionOpen->setIcon(icon13);
actionLog = new QAction(MainWindow);
actionLog->setObjectName(QString::fromUtf8("actionLog"));
QIcon icon14;
icon14.addFile(QString::fromUtf8(":/icons/note_32x32.png"), QSize(), QIcon::Normal, QIcon::Off);
actionLog->setIcon(icon14);
actionTest = new QAction(MainWindow);
actionTest->setObjectName(QString::fromUtf8("actionTest"));
QIcon icon15;
icon15.addFile(QString::fromUtf8(":/icons/clone_to_32x32.png"), QSize(), QIcon::Normal, QIcon::Off);
actionTest->setIcon(icon15);
actionTreePreference = new QAction(MainWindow);
actionTreePreference->setObjectName(QString::fromUtf8("actionTreePreference"));
actionTreePreference->setIcon(icon7);
actionTestSettings = new QAction(MainWindow);
actionTestSettings->setObjectName(QString::fromUtf8("actionTestSettings"));
actionTestSettings->setIcon(icon7);
actionTestScreen = new QAction(MainWindow);
actionTestScreen->setObjectName(QString::fromUtf8("actionTestScreen"));
QIcon icon16;
icon16.addFile(QString::fromUtf8(":/icons/add_background_32x32.png"), QSize(), QIcon::Normal, QIcon::Off);
actionTestScreen->setIcon(icon16);
actionRefresh = new QAction(MainWindow);
actionRefresh->setObjectName(QString::fromUtf8("actionRefresh"));
QIcon icon17;
icon17.addFile(QString::fromUtf8(":/icons/refresh_32x32.png"), QSize(), QIcon::Normal, QIcon::Off);
actionRefresh->setIcon(icon17);
actionSettings = new QAction(MainWindow);
actionSettings->setObjectName(QString::fromUtf8("actionSettings"));
actionSettings->setIcon(icon7);
actionFileOpen = new QAction(MainWindow);
actionFileOpen->setObjectName(QString::fromUtf8("actionFileOpen"));
QIcon icon18;
icon18.addFile(QString::fromUtf8(":/icons/open_16x16.png"), QSize(), QIcon::Normal, QIcon::On);
actionFileOpen->setIcon(icon18);
actionFileDelete = new QAction(MainWindow);
actionFileDelete->setObjectName(QString::fromUtf8("actionFileDelete"));
QIcon icon19;
icon19.addFile(QString::fromUtf8(":/icons/delete_16x16.png"), QSize(), QIcon::Normal, QIcon::On);
actionFileDelete->setIcon(icon19);
actionFileRename = new QAction(MainWindow);
actionFileRename->setObjectName(QString::fromUtf8("actionFileRename"));
QIcon icon20;
icon20.addFile(QString::fromUtf8(":/icons/rename_16x16.png"), QSize(), QIcon::Normal, QIcon::On);
actionFileRename->setIcon(icon20);
actionCalcOpen = new QAction(MainWindow);
actionCalcOpen->setObjectName(QString::fromUtf8("actionCalcOpen"));
actionCalcOpen->setIcon(icon18);
actionCalcDelete = new QAction(MainWindow);
actionCalcDelete->setObjectName(QString::fromUtf8("actionCalcDelete"));
actionCalcDelete->setIcon(icon19);
actionCalcRename = new QAction(MainWindow);
actionCalcRename->setObjectName(QString::fromUtf8("actionCalcRename"));
actionCalcRename->setIcon(icon20);
actionNewFolder = new QAction(MainWindow);
actionNewFolder->setObjectName(QString::fromUtf8("actionNewFolder"));
QIcon icon21;
icon21.addFile(QString::fromUtf8(":/icons/new_folder_16x16.png"), QSize(), QIcon::Normal, QIcon::Off);
actionNewFolder->setIcon(icon21);
actionNew_Note = new QAction(MainWindow);
actionNew_Note->setObjectName(QString::fromUtf8("actionNew_Note"));
actionNew_Program = new QAction(MainWindow);
actionNew_Program->setObjectName(QString::fromUtf8("actionNew_Program"));
centralWidget = new QWidget(MainWindow);
centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
horizontalLayout = new QHBoxLayout(centralWidget);
horizontalLayout->setSpacing(6);
horizontalLayout->setContentsMargins(11, 11, 11, 11);
horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
mdiArea = new QMdiArea(centralWidget);
mdiArea->setObjectName(QString::fromUtf8("mdiArea"));
QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Expanding);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(mdiArea->sizePolicy().hasHeightForWidth());
mdiArea->setSizePolicy(sizePolicy);
mdiArea->setMinimumSize(QSize(500, 0));
mdiArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
mdiArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
horizontalLayout->addWidget(mdiArea);
MainWindow->setCentralWidget(centralWidget);
menuBar = new QMenuBar(MainWindow);
menuBar->setObjectName(QString::fromUtf8("menuBar"));
menuBar->setGeometry(QRect(0, 0, 919, 23));
QFont font1;
font1.setPointSize(10);
menuBar->setFont(font1);
menuFile = new QMenu(menuBar);
menuFile->setObjectName(QString::fromUtf8("menuFile"));
menuEdit = new QMenu(menuBar);
menuEdit->setObjectName(QString::fromUtf8("menuEdit"));
menuWindow = new QMenu(menuBar);
menuWindow->setObjectName(QString::fromUtf8("menuWindow"));
menuHelp = new QMenu(menuBar);
menuHelp->setObjectName(QString::fromUtf8("menuHelp"));
MainWindow->setMenuBar(menuBar);
dwCalculator = new QDockWidget(MainWindow);
dwCalculator->setObjectName(QString::fromUtf8("dwCalculator"));
QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Expanding);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(dwCalculator->sizePolicy().hasHeightForWidth());
dwCalculator->setSizePolicy(sizePolicy1);
dwCalculator->setMinimumSize(QSize(200, 184));
dwCalculator->setMaximumSize(QSize(524287, 524287));
dwCalculator->setBaseSize(QSize(300, 200));
wCalculator = new QWidget();
wCalculator->setObjectName(QString::fromUtf8("wCalculator"));
sizePolicy1.setHeightForWidth(wCalculator->sizePolicy().hasHeightForWidth());
wCalculator->setSizePolicy(sizePolicy1);
wCalculator->setMinimumSize(QSize(100, 150));
verticalLayout_3 = new QVBoxLayout(wCalculator);
verticalLayout_3->setSpacing(6);
verticalLayout_3->setContentsMargins(11, 11, 11, 11);
verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3"));
tvCalculators = new QTreeView(wCalculator);
tvCalculators->setObjectName(QString::fromUtf8("tvCalculators"));
tvCalculators->setEnabled(true);
sizePolicy1.setHeightForWidth(tvCalculators->sizePolicy().hasHeightForWidth());
tvCalculators->setSizePolicy(sizePolicy1);
tvCalculators->setContextMenuPolicy(Qt::ActionsContextMenu);
tvCalculators->setLineWidth(2);
tvCalculators->setMidLineWidth(1);
tvCalculators->header()->setVisible(false);
verticalLayout_3->addWidget(tvCalculators);
dwCalculator->setWidget(wCalculator);
MainWindow->addDockWidget(static_cast<Qt::DockWidgetArea>(1), dwCalculator);
toolBar = new QToolBar(MainWindow);
toolBar->setObjectName(QString::fromUtf8("toolBar"));
MainWindow->addToolBar(Qt::TopToolBarArea, toolBar);
dwContent = new QDockWidget(MainWindow);
dwContent->setObjectName(QString::fromUtf8("dwContent"));
sizePolicy1.setHeightForWidth(dwContent->sizePolicy().hasHeightForWidth());
dwContent->setSizePolicy(sizePolicy1);
dwContent->setMinimumSize(QSize(300, 130));
dwContent->setMaximumSize(QSize(524287, 524287));
wContent = new QWidget();
wContent->setObjectName(QString::fromUtf8("wContent"));
sizePolicy1.setHeightForWidth(wContent->sizePolicy().hasHeightForWidth());
wContent->setSizePolicy(sizePolicy1);
verticalLayout_2 = new QVBoxLayout(wContent);
verticalLayout_2->setSpacing(6);
verticalLayout_2->setContentsMargins(11, 11, 11, 11);
verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
tvContent = new QTreeView(wContent);
tvContent->setObjectName(QString::fromUtf8("tvContent"));
tvContent->setSelectionBehavior(QAbstractItemView::SelectItems);
tvContent->setIndentation(15);
tvContent->header()->setCascadingSectionResizes(true);
tvContent->header()->setMinimumSectionSize(47);
tvContent->header()->setDefaultSectionSize(150);
tvContent->header()->setHighlightSections(true);
tvContent->header()->setStretchLastSection(false);
verticalLayout_2->addWidget(tvContent);
dwContent->setWidget(wContent);
MainWindow->addDockWidget(static_cast<Qt::DockWidgetArea>(1), dwContent);
dwMessenger = new QDockWidget(MainWindow);
dwMessenger->setObjectName(QString::fromUtf8("dwMessenger"));
sizePolicy1.setHeightForWidth(dwMessenger->sizePolicy().hasHeightForWidth());
dwMessenger->setSizePolicy(sizePolicy1);
dwMessenger->setMaximumSize(QSize(150, 524287));
wMessage = new QWidget();
wMessage->setObjectName(QString::fromUtf8("wMessage"));
sizePolicy1.setHeightForWidth(wMessage->sizePolicy().hasHeightForWidth());
wMessage->setSizePolicy(sizePolicy1);
verticalLayout = new QVBoxLayout(wMessage);
verticalLayout->setSpacing(6);
verticalLayout->setContentsMargins(11, 11, 11, 11);
verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
teMessage = new QTextEdit(wMessage);
teMessage->setObjectName(QString::fromUtf8("teMessage"));
verticalLayout->addWidget(teMessage);
dwMessenger->setWidget(wMessage);
MainWindow->addDockWidget(static_cast<Qt::DockWidgetArea>(2), dwMessenger);
dwMonitor = new QDockWidget(MainWindow);
dwMonitor->setObjectName(QString::fromUtf8("dwMonitor"));
sizePolicy1.setHeightForWidth(dwMonitor->sizePolicy().hasHeightForWidth());
dwMonitor->setSizePolicy(sizePolicy1);
wMonitor = new QWidget();
wMonitor->setObjectName(QString::fromUtf8("wMonitor"));
sizePolicy1.setHeightForWidth(wMonitor->sizePolicy().hasHeightForWidth());
wMonitor->setSizePolicy(sizePolicy1);
verticalLayout_4 = new QVBoxLayout(wMonitor);
verticalLayout_4->setSpacing(6);
verticalLayout_4->setContentsMargins(11, 11, 11, 11);
verticalLayout_4->setObjectName(QString::fromUtf8("verticalLayout_4"));
wMonitorGrid = new QGridLayout();
wMonitorGrid->setSpacing(6);
wMonitorGrid->setObjectName(QString::fromUtf8("wMonitorGrid"));
verticalLayout_4->addLayout(wMonitorGrid);
dwMonitor->setWidget(wMonitor);
MainWindow->addDockWidget(static_cast<Qt::DockWidgetArea>(2), dwMonitor);
statusBar = new QStatusBar(MainWindow);
statusBar->setObjectName(QString::fromUtf8("statusBar"));
QSizePolicy sizePolicy2(QSizePolicy::Preferred, QSizePolicy::Preferred);
sizePolicy2.setHorizontalStretch(100);
sizePolicy2.setVerticalStretch(20);
sizePolicy2.setHeightForWidth(statusBar->sizePolicy().hasHeightForWidth());
statusBar->setSizePolicy(sizePolicy2);
statusBar->setMinimumSize(QSize(100, 20));
statusBar->setAutoFillBackground(true);
MainWindow->setStatusBar(statusBar);
menuBar->addAction(menuFile->menuAction());
menuBar->addAction(menuEdit->menuAction());
menuBar->addAction(menuWindow->menuAction());
menuBar->addAction(menuHelp->menuAction());
menuFile->addAction(actionExit);
menuEdit->addAction(actionCut);
menuEdit->addAction(actionCopy);
menuEdit->addAction(actionPaste);
menuEdit->addSeparator();
menuEdit->addAction(actionPreferences);
menuWindow->addAction(actionClose);
menuWindow->addAction(actionClose_all);
menuWindow->addSeparator();
menuWindow->addAction(actionTile);
menuWindow->addAction(actionCascade);
menuWindow->addSeparator();
menuWindow->addAction(actionNext);
menuWindow->addAction(actionPrevious);
menuWindow->addSeparator();
menuWindow->addAction(actionMessages);
menuWindow->addAction(actionMonitor);
menuWindow->addAction(actionCalculators);
menuWindow->addAction(actionContent);
menuWindow->addAction(actionLog);
menuHelp->addAction(actionAbout_HP_Connect);
toolBar->addAction(actionCalculators);
toolBar->addAction(actionContent);
toolBar->addAction(actionSave);
toolBar->addAction(actionSave_All);
toolBar->addAction(actionCreateNew);
toolBar->addSeparator();
toolBar->addAction(actionMonitor);
toolBar->addAction(actionMessages);
toolBar->addSeparator();
toolBar->addAction(actionOpen);
toolBar->addSeparator();
toolBar->addAction(actionTest);
toolBar->addAction(actionTestSettings);
toolBar->addAction(actionTestScreen);
toolBar->addAction(actionRefresh);
retranslateUi(MainWindow);
QMetaObject::connectSlotsByName(MainWindow);
} // setupUi
void retranslateUi(QMainWindow *MainWindow)
{
MainWindow->setWindowTitle(QApplication::translate("MainWindow", "Linux HP Connect", nullptr));
actionCut->setText(QApplication::translate("MainWindow", "&Cut", nullptr));
actionCopy->setText(QApplication::translate("MainWindow", "C&opy", nullptr));
actionPaste->setText(QApplication::translate("MainWindow", "&Paste", nullptr));
actionClose->setText(QApplication::translate("MainWindow", "&Close", nullptr));
actionClose_all->setText(QApplication::translate("MainWindow", "C&lose all", nullptr));
actionTile->setText(QApplication::translate("MainWindow", "&Tile", nullptr));
actionCascade->setText(QApplication::translate("MainWindow", "Ca&scade", nullptr));
actionNext->setText(QApplication::translate("MainWindow", "&Next", nullptr));
actionMessages->setText(QApplication::translate("MainWindow", "&Messages", nullptr));
actionMonitor->setText(QApplication::translate("MainWindow", "M&onitor", nullptr));
actionCalculators->setText(QApplication::translate("MainWindow", "Calc&ulators", nullptr));
actionAbout_HP_Connect->setText(QApplication::translate("MainWindow", "&About HP Connect", nullptr));
actionPreferences->setText(QApplication::translate("MainWindow", "P&references", nullptr));
actionPrevious->setText(QApplication::translate("MainWindow", "&Previous", nullptr));
actionContent->setText(QApplication::translate("MainWindow", "Cont&ent", nullptr));
actionSave->setText(QApplication::translate("MainWindow", "Save", nullptr));
actionSave_All->setText(QApplication::translate("MainWindow", "Save All", nullptr));
actionCreateNew->setText(QApplication::translate("MainWindow", "CreateNew", nullptr));
#ifndef QT_NO_TOOLTIP
actionCreateNew->setToolTip(QApplication::translate("MainWindow", "Create New ", nullptr));
#endif // QT_NO_TOOLTIP
actionExit->setText(QApplication::translate("MainWindow", "&Exit", nullptr));
actionOpen->setText(QApplication::translate("MainWindow", "Open", nullptr));
actionLog->setText(QApplication::translate("MainWindow", "Lo&g", nullptr));
actionTest->setText(QApplication::translate("MainWindow", "Test", nullptr));
#ifndef QT_NO_TOOLTIP
actionTest->setToolTip(QApplication::translate("MainWindow", "Test Button", nullptr));
#endif // QT_NO_TOOLTIP
actionTreePreference->setText(QApplication::translate("MainWindow", "TreePreference", nullptr));
actionTestSettings->setText(QApplication::translate("MainWindow", "TestSettings", nullptr));
actionTestScreen->setText(QApplication::translate("MainWindow", "TestScreen", nullptr));
#ifndef QT_NO_TOOLTIP
actionTestScreen->setToolTip(QApplication::translate("MainWindow", "Test get Screen Function", nullptr));
#endif // QT_NO_TOOLTIP
actionRefresh->setText(QApplication::translate("MainWindow", "Refresh", nullptr));
actionSettings->setText(QApplication::translate("MainWindow", "Settings", nullptr));
actionFileOpen->setText(QApplication::translate("MainWindow", "&Open", nullptr));
#ifndef QT_NO_TOOLTIP
actionFileOpen->setToolTip(QApplication::translate("MainWindow", "Open a file", nullptr));
#endif // QT_NO_TOOLTIP
#ifndef QT_NO_SHORTCUT
actionFileOpen->setShortcut(QApplication::translate("MainWindow", "Alt+O", nullptr));
#endif // QT_NO_SHORTCUT
actionFileDelete->setText(QApplication::translate("MainWindow", "&Delete", nullptr));
#ifndef QT_NO_TOOLTIP
actionFileDelete->setToolTip(QApplication::translate("MainWindow", "Delete a file", nullptr));
#endif // QT_NO_TOOLTIP
#ifndef QT_NO_SHORTCUT
actionFileDelete->setShortcut(QApplication::translate("MainWindow", "Alt+D", nullptr));
#endif // QT_NO_SHORTCUT
actionFileRename->setText(QApplication::translate("MainWindow", "&Rename", nullptr));
#ifndef QT_NO_TOOLTIP
actionFileRename->setToolTip(QApplication::translate("MainWindow", "Rename a file", nullptr));
#endif // QT_NO_TOOLTIP
#ifndef QT_NO_SHORTCUT
actionFileRename->setShortcut(QApplication::translate("MainWindow", "Alt+R", nullptr));
#endif // QT_NO_SHORTCUT
actionCalcOpen->setText(QApplication::translate("MainWindow", "&Open", nullptr));
#ifndef QT_NO_TOOLTIP
actionCalcOpen->setToolTip(QApplication::translate("MainWindow", "Open a file", nullptr));
#endif // QT_NO_TOOLTIP
#ifndef QT_NO_SHORTCUT
actionCalcOpen->setShortcut(QApplication::translate("MainWindow", "Alt+O", nullptr));
#endif // QT_NO_SHORTCUT
actionCalcDelete->setText(QApplication::translate("MainWindow", "&Delete", nullptr));
#ifndef QT_NO_TOOLTIP
actionCalcDelete->setToolTip(QApplication::translate("MainWindow", "Delete a file", nullptr));
#endif // QT_NO_TOOLTIP
#ifndef QT_NO_SHORTCUT
actionCalcDelete->setShortcut(QApplication::translate("MainWindow", "Alt+D", nullptr));
#endif // QT_NO_SHORTCUT
actionCalcRename->setText(QApplication::translate("MainWindow", "&Rename", nullptr));
#ifndef QT_NO_TOOLTIP
actionCalcRename->setToolTip(QApplication::translate("MainWindow", "Rename a file", nullptr));
#endif // QT_NO_TOOLTIP
#ifndef QT_NO_SHORTCUT
actionCalcRename->setShortcut(QApplication::translate("MainWindow", "Alt+R", nullptr));
#endif // QT_NO_SHORTCUT
actionNewFolder->setText(QApplication::translate("MainWindow", "Folder", nullptr));
#ifndef QT_NO_TOOLTIP
actionNewFolder->setToolTip(QApplication::translate("MainWindow", "Create a New Folder", nullptr));
#endif // QT_NO_TOOLTIP
actionNew_Note->setText(QApplication::translate("MainWindow", "New Note", nullptr));
actionNew_Program->setText(QApplication::translate("MainWindow", "New Program", nullptr));
menuFile->setTitle(QApplication::translate("MainWindow", "Fi&le", nullptr));
menuEdit->setTitle(QApplication::translate("MainWindow", "Edit", nullptr));
menuWindow->setTitle(QApplication::translate("MainWindow", "Wi&ndow", nullptr));
menuHelp->setTitle(QApplication::translate("MainWindow", "Help", nullptr));
#ifndef QT_NO_TOOLTIP
tvCalculators->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>Calculator View</p></body></html>", nullptr));
#endif // QT_NO_TOOLTIP
toolBar->setWindowTitle(QApplication::translate("MainWindow", "toolBar", nullptr));
#ifndef QT_NO_TOOLTIP
tvContent->setToolTip(QApplication::translate("MainWindow", "<html><head/><body><p>File View</p></body></html>", nullptr));
#endif // QT_NO_TOOLTIP
#ifndef QT_NO_TOOLTIP
statusBar->setToolTip(QString());
#endif // QT_NO_TOOLTIP
} // retranslateUi
};
namespace Ui {
class MainWindow: public Ui_MainWindow {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_MAINWINDOW_H

View file

@ -1,93 +0,0 @@
/********************************************************************************
** Form generated from reading UI file 'options.ui'
**
** Created by: Qt User Interface Compiler version 5.12.4
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_OPTIONS_H
#define UI_OPTIONS_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox>
#include <QtWidgets/QFrame>
#include <QtWidgets/QLabel>
#include <QtWidgets/QLineEdit>
QT_BEGIN_NAMESPACE
class Ui_Options
{
public:
QDialogButtonBox *buttonBox;
QFrame *frame;
QLineEdit *filePath;
QLabel *label;
QLabel *label_2;
void setupUi(QDialog *Options)
{
if (Options->objectName().isEmpty())
Options->setObjectName(QString::fromUtf8("Options"));
Options->resize(640, 480);
buttonBox = new QDialogButtonBox(Options);
buttonBox->setObjectName(QString::fromUtf8("buttonBox"));
buttonBox->setGeometry(QRect(10, 440, 621, 32));
buttonBox->setOrientation(Qt::Horizontal);
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
frame = new QFrame(Options);
frame->setObjectName(QString::fromUtf8("frame"));
frame->setGeometry(QRect(10, 20, 621, 91));
frame->setFrameShape(QFrame::StyledPanel);
frame->setFrameShadow(QFrame::Raised);
filePath = new QLineEdit(frame);
filePath->setObjectName(QString::fromUtf8("filePath"));
filePath->setGeometry(QRect(80, 40, 521, 32));
label = new QLabel(frame);
label->setObjectName(QString::fromUtf8("label"));
label->setGeometry(QRect(10, 30, 58, 51));
label_2 = new QLabel(frame);
label_2->setObjectName(QString::fromUtf8("label_2"));
label_2->setGeometry(QRect(10, 10, 141, 18));
retranslateUi(Options);
QObject::connect(buttonBox, SIGNAL(accepted()), Options, SLOT(accept()));
QObject::connect(buttonBox, SIGNAL(rejected()), Options, SLOT(reject()));
QMetaObject::connectSlotsByName(Options);
} // setupUi
void retranslateUi(QDialog *Options)
{
Options->setWindowTitle(QApplication::translate("Options", "Dialog", nullptr));
#ifndef QT_NO_TOOLTIP
frame->setToolTip(QString());
#endif // QT_NO_TOOLTIP
#ifndef QT_NO_STATUSTIP
frame->setStatusTip(QString());
#endif // QT_NO_STATUSTIP
#ifndef QT_NO_WHATSTHIS
frame->setWhatsThis(QString());
#endif // QT_NO_WHATSTHIS
#ifndef QT_NO_ACCESSIBILITY
frame->setAccessibleName(QString());
#endif // QT_NO_ACCESSIBILITY
#ifndef QT_NO_ACCESSIBILITY
frame->setAccessibleDescription(QString());
#endif // QT_NO_ACCESSIBILITY
label->setText(QApplication::translate("Options", "File Path:", nullptr));
label_2->setText(QApplication::translate("Options", "Environment", nullptr));
} // retranslateUi
};
namespace Ui {
class Options: public Ui_Options {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_OPTIONS_H

View file

@ -1,59 +0,0 @@
/********************************************************************************
** Form generated from reading UI file 'variableview.ui'
**
** Created by: Qt User Interface Compiler version 5.12.4
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_VARIABLEVIEW_H
#define UI_VARIABLEVIEW_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QTableView>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class Ui_variableView
{
public:
QVBoxLayout *verticalLayout;
QTableView *variableList;
void setupUi(QWidget *variableView)
{
if (variableView->objectName().isEmpty())
variableView->setObjectName(QString::fromUtf8("variableView"));
variableView->resize(347, 358);
verticalLayout = new QVBoxLayout(variableView);
verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
variableList = new QTableView(variableView);
variableList->setObjectName(QString::fromUtf8("variableList"));
variableList->setEnabled(true);
verticalLayout->addWidget(variableList);
retranslateUi(variableView);
QMetaObject::connectSlotsByName(variableView);
} // setupUi
void retranslateUi(QWidget *variableView)
{
variableView->setWindowTitle(QApplication::translate("variableView", "Form", nullptr));
} // retranslateUi
};
namespace Ui {
class variableView: public Ui_variableView {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_VARIABLEVIEW_H

View file

@ -34,7 +34,7 @@
#include <QFileIconProvider> #include <QFileIconProvider>
#include <QToolButton> #include <QToolButton>
#include "global.h" #include <global.h>
#include "hpusb.h" #include "hpusb.h"
#include "datamodel.h" #include "datamodel.h"
#include "treemodel.h" #include "treemodel.h"

View file

@ -34,6 +34,7 @@ textEditor::textEditor(QWidget *parent) :
qDebug()<<defaultPath; qDebug()<<defaultPath;
} }
/*
void textEditor::newFile() void textEditor::newFile()
{ {
static int sequenceNumber = 1; static int sequenceNumber = 1;
@ -45,7 +46,9 @@ void textEditor::newFile()
connect(document(), &QTextDocument::contentsChanged, connect(document(), &QTextDocument::contentsChanged,
this, &textEditor::documentWasModified); this, &textEditor::documentWasModified);
} }
*/
/*
bool textEditor::loadFile(const QString &fileName) bool textEditor::loadFile(const QString &fileName)
{ {
QFile file(fileName); QFile file(fileName);
@ -69,19 +72,28 @@ bool textEditor::loadFile(const QString &fileName)
return true; return true;
} }
*/
bool textEditor::save() bool textEditor::save(QString Calculator)
{ {
if (isUntitled) { if (isUntitled) {
return saveAs(); return saveAs(Calculator);
} else { } else {
return saveFile(curFile); return saveFile(curFile);
} }
} }
bool textEditor::saveAs() bool textEditor::save(QFileInfo file)
{
if (isUntitled) {
return saveAs(file);
} else {
return saveFile(curFile);
}
}
bool textEditor::saveAs(QFileInfo fileinfo)
{ {
QFileInfo fileinfo(defaultPath,curFile);
QString fileName = QFileDialog::getSaveFileName(this, tr("Save As"), QString fileName = QFileDialog::getSaveFileName(this, tr("Save As"),
fileinfo.absoluteFilePath()); fileinfo.absoluteFilePath());
@ -91,6 +103,19 @@ bool textEditor::saveAs()
return saveFile(fileName); return saveFile(fileName);
} }
bool textEditor::saveAs(QString calculaor)
{
// QString fileName = QFileDialog::getSaveFileName(this, tr("Save As"),
// fileinfo.absoluteFilePath());
QString fileName=curFile;
if (fileName.isEmpty())
return false;
return saveFile(fileName);
}
bool textEditor::saveFile(const QString &fileName) bool textEditor::saveFile(const QString &fileName)
{ {
QFileInfo fileinfo(defaultPath,fileName); QFileInfo fileinfo(defaultPath,fileName);
@ -116,43 +141,11 @@ QString textEditor::userFriendlyCurrentFile()
return strippedName(curFile); return strippedName(curFile);
} }
void textEditor::closeEvent(QCloseEvent *event)
{
if (maybeSave()) {
event->accept();
} else {
event->ignore();
}
}
void textEditor::documentWasModified() void textEditor::documentWasModified()
{ {
setWindowModified(document()->isModified()); setWindowModified(document()->isModified());
} }
bool textEditor::maybeSave()
{
if (!document()->isModified())
return true;
const QMessageBox::StandardButton ret
= QMessageBox::warning(this, tr("MDI"),
tr("'%1' has been modified.\n"
"Do you want to save your changes?")
.arg(userFriendlyCurrentFile()),
QMessageBox::Save | QMessageBox::Discard
| QMessageBox::Cancel);
switch (ret) {
case QMessageBox::Save:
return save();
case QMessageBox::Cancel:
return false;
default:
break;
}
return true;
}
void textEditor::setCurrentFile(const QString &fileName) void textEditor::setCurrentFile(const QString &fileName)
{ {
curFile = QFileInfo(fileName).canonicalFilePath(); curFile = QFileInfo(fileName).canonicalFilePath();