equalx-0.7.1/resources/symbols/Operators/bullet.png000644 001750 001750 00000000264 12314604155 022716 0ustar00mihaimihai000000 000000 PNG  IHDRLsRGBbKGD pHYs  tIME :&`4IDAT(c?>@ ,0###Jn$|s6G2o\!mIENDB`equalx-0.7.1/resources/icons/tabBar/physics/eq04.png000644 001750 001750 00000002405 12314604155 022521 0ustar00mihaimihai000000 000000 PNG  IHDR"v: pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;=zTXtLatexx).͍TH,)(ΌϬUH/ֈI)HT)UMMOT(^otEXtResolution116-'IDATxu ulPe U6pgp6p:Alw@A!v^"!qH4τ-P;֋xWޱn"d5 Wnd"Ƴgs(ňׁ jxsJF px'WvJRu^9@ؤ .$r&] K|/)=i+Z"x#[wL2dmtNia?NOѳpJ~;)=axA"7pE=?GF "FA>{t)ugM߲( iMZ;&.}kD}Y?˽UgCju"̸Lwd]jصֽ*/z5hӉv\+Y׼vgMʩ~ϛݒ@s^8jl3. QsWa0)s0@N}7uKB),96X$>HFo +Bf7ADj ؝٪.TbhNf$weC.Ʒu ">#赲/`;WJ w\H]9P7Og8qP(W%U{ܢ5G'\;8 16m/phxc.*sF}G]f#m׆N;jk!ܵ^~e!+- T9j75SueAQ_*u؃fG}tnƐjkۜ9@ u^]iMk&hNjshq |WG).jsWf1]kꀛ N\c $xSƹG-ܖޝR> :'Mȉb< @tg#H$g֑H$9[>(W/[K:22rf 7|&pf  os?IENDB`equalx-0.7.1/include/BookmarksPanel/DialogPreferencesBookmark.h000644 001750 001750 00000002657 12314604155 025024 0ustar00mihaimihai000000 000000 /* * Copyright 2014 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef DIALOGBOOKMARK_H #define DIALOGBOOKMARK_H #include namespace Ui { class DialogPreferencesBookmark; } class DialogPreferencesBookmark : public QDialog { Q_OBJECT public: explicit DialogPreferencesBookmark(QWidget *parent = 0); ~DialogPreferencesBookmark(); QString title() const; QString description() const; int parentFolder() const; void show(); public slots: void setTitle(const QString& title); void setDescrition(const QString& desc); void setParentFolder(int id); int exec(); private: void populateFolderCombobox(); Ui::DialogPreferencesBookmark *ui; int mPIdx; }; #endif // DIALOGBOOKMARK_H equalx-0.7.1/resources/symbols/Products/coprod2.png000644 001750 001750 00000000310 12314604155 022614 0ustar00mihaimihai000000 000000 PNG  IHDRgsRGBbKGD pHYs  tIME HIDAT8c`0OZǥSKX0p:#1O`6r#dF# IENDB`equalx-0.7.1/resources/symbols/Arrows/leftarrow.png000644 001750 001750 00000000275 12314604155 022735 0ustar00mihaimihai000000 000000 PNG  IHDROWsRGBbKGD pHYs  tIME%&P-=IDAT8!  Vtʀ-P"DN.0_UcphcIENDB`equalx-0.7.1/resources/symbols/Operators/sqcap.png000644 001750 001750 00000000266 12314604155 022540 0ustar00mihaimihai000000 000000 PNG  IHDR F)sRGBbKGD pHYs  tIME8'l<6IDAT(c?00000022 3 sp)6샎v`#kmIENDB`equalx-0.7.1/resources/symbols/Greek/alpha.png000644 001750 001750 00000000320 12314604155 021564 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME 407oPIDAT( 0C =cbl`V"u@U4χ * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include "defines.h" #include "EquationTemplateWidget.h" EquationTemplateWidget::EquationTemplateWidget(QStringList paths, QWidget *parent) : QWidget(parent) { signalMapper = new QSignalMapper(this); QHBoxLayout *gridLayout = new QHBoxLayout(this); for(int i=0; i < paths.size(); i++){ QPushButton *bt = new QPushButton(this); QImage img(paths.at(i)); bt->setIcon( QIcon(paths.at(i)) ); bt->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); bt->setIconSize(img.size()); connect(bt, SIGNAL(clicked()), signalMapper, SLOT(map()) ); signalMapper->setMapping(bt, img.text("Latex") ); gridLayout->addWidget(bt); } gridLayout->addStretch(0); gridLayout->setSpacing(0); gridLayout->setContentsMargins(0,0,0,0); connect(signalMapper, SIGNAL(mapped(const QString&)), this, SIGNAL(clicked(const QString&)) ); setLayout(gridLayout); } equalx-0.7.1/LICENSE000644 001750 001750 00000005262 12314604155 014251 0ustar00mihaimihai000000 000000 Copyright © 2010-2014 Mihai Niculescu <q.quark@gmail.com >

EqualX License EqualX is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
EqualX is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.
If not, see http://www.gnu.org/licenses/.

XMP is distributed under BSD License
The BSD License
Copyright (c) 1999 - 2013, Adobe Systems Incorporated
All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the following
conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of Adobe Systems Incorporated, nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Qt is distributed under LGPL License
Other libraries/software that comes with EqualX use LGPL License or GPL License

equalx-0.7.1/src/EquationView.cpp000644 001750 001750 00000005734 12314604155 017163 0ustar00mihaimihai000000 000000 /* * Copyright 2010 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include #include "defines.h" #include "EquationView.h" EquationView::EquationView(QWidget * parent) : QLabel(parent), mDragPosition(), mDragFileSource() { setMinimumSize(64,64); // set a minimum size to have displayed correctly the preloader setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); setAcceptDrops(true); setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); setPixmap(""); } void EquationView::clear() { QLabel::clear(); unsetCursor(); } QSize EquationView::sizeHint() const { if(pixmap()) return pixmap()->size(); return QLabel::sizeHint(); } QString EquationView::exportSource() const { return mDragFileSource; } void EquationView::setExportSource(const QString &filename) { mDragFileSource = filename; } void EquationView::setPixmap(const QString &fileName) { // a safe value if the dragfilesource wasn't specified with setExportSource() mDragFileSource = fileName; QPixmap pix; if(pix.load(fileName)){ QLabel::setPixmap(pix); setCursor(Qt::OpenHandCursor); } else{ clear(); } } void EquationView::mousePressEvent( QMouseEvent * event) { if (event->button() == Qt::LeftButton ){ mDragPosition = event->pos(); } } void EquationView::mouseMoveEvent( QMouseEvent * event) { if (!(event->buttons() & Qt::LeftButton)) return; if (QLineF(event->pos(), mDragPosition).length() < QApplication::startDragDistance()) { return; } if(!pixmap()) return; QList urls; QUrl fileUrl = QUrl::fromLocalFile(mDragFileSource); urls.append( fileUrl ); QMimeData *mimeData = new QMimeData; mimeData->setUrls(urls); QDrag *drag = new QDrag(this); drag->setMimeData(mimeData); drag->setPixmap( *pixmap() ); drag->setHotSpot( event->pos() - QPoint((width()-pixmap()->width())/2.0, (height()-pixmap()->height())/2.0 ) ); drag->exec(Qt::CopyAction); } void EquationView::paintEvent(QPaintEvent * ev) { QLabel::paintEvent(ev); if(pixmap()) resize(pixmap()->size()); } equalx-0.7.1/include/FileInfo.h000644 001750 001750 00000004453 12314604155 016534 0ustar00mihaimihai000000 000000 /* * Copyright 2013 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef FILEINFO_H #define FILEINFO_H #include #include #include #include "defines.h" #include "HLSelections.h" namespace EqualX{ /* * A EqualX File is any file which contains EqualX metadata embedded as XMP * * This class only describes the metadata specific for a EqualX file. For reading/writing EqualX Files look in File.h * */ class FileInfo : public QObject { Q_OBJECT public: explicit FileInfo(QObject *parent = 0); FileInfo(const EqualX::FileInfo& other); QString equation() const; QString preamble() const; HLSelections selections() const; LATEX_FONT_SIZE fontSize() const; QColor fgColor() const; QColor bgColor() const; LATEX_ENV_MODE environment() const; void setEquation(const QString& equation); void setPreamble(const QString& preamble); void setSelections(const HLSelections& selections); EqualX::FileInfo& operator=(const EqualX::FileInfo& other); public slots: void setFontSize(int size); // size is enum LATEX_FONT_SIZE void setForegroundColor(const QColor& color); void setBackgroundColor(const QColor& color); void setEnvironment(int env); // int values must be correlated with RENDER_MODE private: QString mPreamble; QString mEquation; LATEX_FONT_SIZE mFontSize; // font size QColor mFGColor; // color is in format for latex color QColor mBGColor; // color is in format for latex color HLSelections mSelections; LATEX_ENV_MODE mEnvironment; // latex environment for equation }; } #endif // FILEINFO_H equalx-0.7.1/ui/dialogReplace.ui000644 001750 001750 00000011674 12314604155 016757 0ustar00mihaimihai000000 000000 DialogReplace Qt::NonModal 0 0 396 208 0 0 16777215 250 Replace &Search for: findEntry 175 0 true 3 0 false &Find false Replace false Replace &all Qt::Vertical 20 40 &Replace with: replaceEntry 175 0 &Close Match &whole words Match &case Search &backwards findEntry replaceEntry checkWholeWords findButton replaceButton replaceAllButton closeButton clicked() DialogReplace hide() 343 134 324 172 equalx-0.7.1/resources/symbols/Operators/cdot.png000644 001750 001750 00000000242 12314604155 022354 0ustar00mihaimihai000000 000000 PNG  IHDR"]sRGBbKGD pHYs  tIME.tG"IDATc?2`b@ELt'IENDB`equalx-0.7.1/resources/symbols/Decorations/000755 001750 001750 00000000000 12314604155 021213 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/symbols/Greek/xi.png000644 001750 001750 00000000322 12314604155 021121 0ustar00mihaimihai000000 000000 PNG  IHDRLsRGBbKGD pHYs  tIME &TwRIDAT(ϵ Bye * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /* * This is the implementation of EqualX::File when using exempi API (intended for Linux) */ #include #include #include #include #include #include #include "defines.h" #include "File.h" #include "Util.h" namespace EqualX{ /* Theft code from GPL code pdfcropxmp.pl by Johannes Grosse - Copyright (C) 2007 */ const char* __templateLatexCropFile = "\\def\\pdffile{%1}\n" "\\csname pdfmapfile\\endcsname{}\n" "\\newread\\instream\n" "\\def\\includexmp#1{%\n" "\\openin\\instream=#1\n" "\\ifeof\\instream\\else \n" "\\closein\\instream\n" "\% file exists\n" "\\begingroup\n" "\\pdfcompresslevel=0\n" "\\immediate\\pdfobj stream attr {/Type /Metadata /Subtype /XML}\n" "file{#1}\n" "\\pdfcatalog{/Metadata \\the\\pdflastobj\\space 0 R}\n" "\\endgroup \%/\n" "\\fi\n" "}\n" "\\def\\page #1 [#2 #3 #4 #5]{\%\n" "\\count0=#1\\relax\n" "\\setbox0=\\hbox{\%\n" "\\pdfximage page #1{\\pdffile}\%\n" "\\pdfrefximage\\pdflastximage\n" "}\%\n" "\\pdfhorigin=-#2bp\\relax\n" "\\pdfvorigin=#3bp\\relax\n" "\\pdfpagewidth=#4bp\\relax\n" "\\advance\\pdfpagewidth by -#2bp\\relax\n" "\\pdfpageheight=#5bp\\relax\n" "\\advance\\pdfpageheight by -#3bp\\relax\n" "\\ht0=\\pdfpageheight\n" "\\shipout\\box0\\relax\n" "}\n" "\\def\\pageclip #1 [#2 #3 #4 #5][#6 #7 #8 #9]{\%\n" "\\count0=#1\\relax\n" "\\ndimen0=#4bp\\relax \\advance\\dimen0 by -#2bp\\relax\n" "\\edef\\imagewidth{\\the\\dimen0}\%\n" "\\dimen0=#5bp\\relax \\advance\\ndimen0 by -#3bp\\relax\n" "\\edef\\imageheight{\\the\\dimen0}\%\n" "\\pdfximage page #1{\\pdffile}\%\n" "\\setbox0=\\hbox{\%\n" "\\kern -#2bp\\relax\n" "\\lower #3bp\\hbox{\\pdfrefximage\\pdflastximage}\%\n" "}\%\n" "\\wd0=\\imagewidth\\relax\n" "\\ht0=\\imageheight\\relax\n" "\\dp0=0pt\\relax\n" "\\pdfhorigin=#6pt\\relax\n" "\\pdfvorigin=#7bp\\relax\n" "\\pdfpagewidth=\\imagewidth\n" "\\advance\\pdfpagewidth by #6bp\\relax\n" "\\advance\\pdfpagewidth by #8bp\\relax\n" "\\pdfpageheight=\\imageheight\\relax\n" "\\advance\\pdfpageheight by #7bp\\relax\n" "\\advance\\pdfpageheight by #9bp\\relax\n" "\\pdfxform0\\relax\n" "\\shipout\\hbox{\\pdfrefxform\\pdflastxform}\%\n" "}\%\n" "\\includexmp{%2}\n" "\\page %3 [%4 %5 %6 %7]\n" "\\csname @@end\\endcsname\n\\end\n"; /* * Identifiers for __templateLatexCropFile: * - input pdf file * - input xmp metadata file * - page number * - llx: lower left x * - lly: lower left y * - urx: upper right x * - ury: upper right y * (gs has the coordinate system with origin in the lower left corner) */ /* End Theft */ const char* __templatePSwithXMP = "/currentdistillerparams where\n" "{pop currentdistillerparams /CoreDistVersion get 5000 lt} {true} ifelse\n" "{ userdict /pdfmark /cleartomark load put\n" "userdict /metafile_pdfmark {flushfile cleartomark } bind put}\n" "{ userdict /metafile_pdfmark {/PUT pdfmark} bind put} ifelse\n" "[/_objdef {%2} /type /stream /OBJ pdfmark\n" "[{%2}\n" "currentfile 0 (% &&end XMP packet marker&&)\n" "/SubFileDecode filter metafile_pdfmark\n" "\n" "%1\n" "\n" "% &&end XMP packet marker&&\n" "[{%2}\n" "2 dict begin /Type /Metadata def /Subtype /XML currentdict end\n" "/PUT pdfmark\n"; /* * Identifiers for __templatePSwithXMP: * %1 - the XMP packet * %2 - equalx_metadata_stream dependant on timestamp */ } typedef struct _Xmp *XmpPtr; typedef struct _XmpFile *XmpFilePtr; struct EqualX::File::FileImplementation{ XmpPtr mMetadata; XmpFilePtr mFile; }; EqualX::File::File() : mFileName(), mFileInfo(0) { __init(); } EqualX::File::File(const EqualX::FileInfo &fileinfo) : mFileName(), mFileInfo(fileinfo) { __init(); } EqualX::File::~File() { xmp_free(mClassImpl->mMetadata); xmp_terminate(); delete mClassImpl; } void EqualX::File::__init() { xmp_init(); mClassImpl = new FileImplementation; mClassImpl->mMetadata = xmp_new_empty(); // new empty XMP packet pointer } void EqualX::File::open(const QString &filename, EqualX::File::OpenModes mode) { mFileName = filename; qDebug() << "[EqualX::File::open] Openning file:"<mFile = xmp_files_open_new(filename.toLatin1().constData(), (XmpOpenFileOptions)(xmpOpenMode) ); } void EqualX::File::close() { xmp_files_close(mClassImpl->mFile,XMP_CLOSE_NOOPTION); xmp_files_free(mClassImpl->mFile); } bool EqualX::File::read() { xmp_free(mClassImpl->mMetadata); mClassImpl->mMetadata = xmp_new_empty(); if(!xmp_files_get_xmp(mClassImpl->mFile, mClassImpl->mMetadata)){ qDebug() << "[EqualX::File::read] Can not retrieve XMP metadata from file. Aborting read..."; return false; } if(!xmp_namespace_prefix(METADATA_NS, NULL) ){ qDebug() << "[EqualX::File::read] Namespace ["<mMetadata, METADATA_NS, METADATA_PREAMBLE, preamble,0); readStatus = xmp_get_property(mClassImpl->mMetadata, METADATA_NS, METADATA_EQUATION, equation,0); readStatus = xmp_get_property_int32(mClassImpl->mMetadata, METADATA_NS, METADATA_ENV, &environment, 0); readStatus = xmp_get_property(mClassImpl->mMetadata, METADATA_NS, METADATA_FG, fgColor, 0); readStatus = xmp_get_property(mClassImpl->mMetadata, METADATA_NS, METADATA_BG, bgColor, 0); readStatus = xmp_get_property_int32(mClassImpl->mMetadata, METADATA_NS, METADATA_DOC_FONT_SIZE, &fontSize, 0); QString preambleStr = xmp_string_cstr(preamble); preambleStr.replace( "#perc", "%"); preambleStr.replace( "#", "\\"); QString equationStr = xmp_string_cstr(equation); equationStr.replace("#perc", "%"); equationStr.replace( "#", "\\"); QColor c1; QColor c2; EqualX::Util::LatexToColor(xmp_string_cstr(fgColor), c1); EqualX::Util::LatexToColor(xmp_string_cstr(bgColor), c2); mFileInfo.setPreamble(preambleStr); mFileInfo.setEquation(equationStr); mFileInfo.setForegroundColor( c1 ); mFileInfo.setBackgroundColor( c2 ); mFileInfo.setEnvironment(environment); mFileInfo.setFontSize(fontSize); xmp_string_free(preamble); xmp_string_free(equation); xmp_string_free(fgColor); xmp_string_free(bgColor); return readStatus; } bool EqualX::File::write() { bool status = false; QString filetype = mFileName.section(".",-1); qDebug() << "[EqualX::File::write] Trying to insert metadata into "<mMetadata, buf, XMP_SERIAL_OMITPACKETWRAPPER, 0); QString metadataStr(xmp_string_cstr(buf)); qDebug() << "[EqualX::File::write] \tOpenning file"; QFile file( mFileName ); file.open(QIODevice::ReadWrite | QIODevice::Text); QTextStream stream(&file); qDebug() << "[EqualX::File::write] \tSearching for EOF"; QString line; qint64 pos; do{ pos = stream.pos(); line = stream.readLine(); } while (!line.contains("")); qDebug() << "[EqualX::File::write] \tFound EOF. Flushing metadata..."; stream.seek(pos); stream << "\n"<"<< "]]>\n"; stream << ""; stream.flush(); file.close(); xmp_string_free(buf); qDebug() << "[EqualX::File::write] \tFlushing Done."; status = true; } else if(filetype.contains("ps")){ // for ps and eps documents, level 2 XmpStringPtr buf = xmp_string_new(); xmp_serialize(mClassImpl->mMetadata, buf, XMP_SERIAL_OMITPACKETWRAPPER, 0); QString metadataStr(xmp_string_cstr(buf)); QFile in(mFileName); QFile out(mFileName+"~"); in.open(QIODevice::ReadOnly); out.open(QIODevice::WriteOnly); QTextStream stream(&out); QString line; QString curTimeStamp = QString::number(QDateTime::currentDateTime().toTime_t()); while(!in.atEnd()){ line = in.readLine(); stream << line; if(line.contains("%%BeginPageSetup")){ stream << QString(__templatePSwithXMP).arg(metadataStr, curTimeStamp); } stream.flush(); } in.close(); out.close(); QFile::remove(mFileName); QFile::rename(mFileName+"~", mFileName); xmp_string_free(buf); status = true; } else if(xmp_files_can_put_xmp(mClassImpl->mFile, mClassImpl->mMetadata)){ status=xmp_files_put_xmp(mClassImpl->mFile, mClassImpl->mMetadata); } else{ status = false; } if(status) qDebug() << "[EqualX::File::write] inserted metadata to file:" << mFileName; return status; } void EqualX::File::writeLatexFile(bool withBackgroundColor) { QString latexColors; // sets font color QString latexHLColor; // sets HighLight color QString latexFGColor, latexBGColor; EqualX::Util::colorToLatex(mFileInfo.fgColor(), latexFGColor); EqualX::Util::colorToLatex(mFileInfo.bgColor(), latexBGColor); latexColors = QString("\\definecolor{fgC}{rgb}{%1}\\color{fgC}").arg(latexFGColor); if(withBackgroundColor){ QString bgColor = QString("\\definecolor{bgC}{rgb}{%1}\\pagecolor{bgC} ").arg(latexBGColor); latexColors.append(bgColor); } QString equation = mFileInfo.equation(); // we modify it if we have selections /* Highlight selections */ if(!mFileInfo.selections().isEmpty()){ if(withBackgroundColor){ latexHLColor = QString("\\definecolor{selC}{rgb}{%1}").arg(latexBGColor); } else { latexHLColor = QString("\\definecolor{selC}{rgb}{1,1,1}"); } QString insert1 = "\\colorbox{fgC}{\\color{selC} $"; QString insert2 = "$}"; int insertStr1Len = insert1.length(); int insertStr2Len = insert2.length(); int insertStrLen = insertStr1Len + insertStr2Len; int newInsert1Pos, newInsert2Pos; for(int i=0; i < mFileInfo.selections().size(); i++){ SelectionIndex *selectionItem = mFileInfo.selections().at(i); int ss = selectionItem->start; // start selection int se = selectionItem->end; // end selection newInsert1Pos = ss + i*insertStrLen; newInsert2Pos = se + i*insertStrLen + insertStr1Len; equation.insert(newInsert1Pos, insert1); equation.insert(newInsert2Pos, insert2); } } /* Set Font Size */ QString latexFontSize; switch(mFileInfo.fontSize()){ case LATEX_FONT_TINY: latexFontSize="\\tiny "; break; case LATEX_FONT_SCRIPT: latexFontSize="\\scriptsize "; break; case LATEX_FONT_FOOTNOTE: latexFontSize="\\footnotesize "; break; case LATEX_FONT_SMALL: latexFontSize="\\small "; break; default: case LATEX_FONT_NORMAL: latexFontSize=""; break; case LATEX_FONT_LARGE: latexFontSize="\\large "; break; case LATEX_FONT_VERY_LARGE: latexFontSize="\\LARGE "; break; case LATEX_FONT_HUGE: latexFontSize="\\huge "; break; case LATEX_FONT_VERY_HUGE: latexFontSize="\\Huge "; break; } /* Set Environment */ QString envBegin, envEnd; switch(mFileInfo.environment()){ default: case LATEX_ENV_MODE_DISPLAY: envBegin = "\\["; envEnd = "\\]"; break; case LATEX_ENV_MODE_INLINE: envBegin = "$"; envEnd = "$"; break; case LATEX_ENV_MODE_ALIGN: envBegin = "\\begin{align*}"; envEnd = "\\end{align*}"; break; case LATEX_ENV_MODE_TEXT: envBegin = ""; envEnd = ""; break; } // compose whole content of latex file QString latexFileContent = mFileInfo.preamble()+"\n\\begin{document}"+latexFontSize+latexColors+latexHLColor+envBegin+equation+envEnd+"\\end{document}"; // write the content to file QFile texFile( TEMP_LATEX_FILE ); texFile.open(QIODevice::WriteOnly | QIODevice::Text); QTextStream out(&texFile); out << latexFileContent; out.flush(); texFile.close(); } void EqualX::File::writeLatexFileCropped(float llx, float lly, float urx, float ury) { qDebug() << "[File::writeLatexFileCropped] Boundingbox: ("<mMetadata, buf, XMP_SERIAL_OMITPACKETWRAPPER, 0); // write generated metadata to file QFile metadatafile( TEMP_METADATA_FILE ); metadatafile.open(QIODevice::WriteOnly | QIODevice::Text); QTextStream out(&metadatafile); out << "\n"; out << xmp_string_cstr(buf); out << ""; out.flush(); metadatafile.close(); xmp_string_free(buf); } bool EqualX::File::fetchInfo(const QString &filename, EqualX::FileInfo *info) { if(!info) info = new EqualX::FileInfo; QString fileExt = filename.section(".", -1); EqualX::File::OpenModes mode = EqualX::File::OPEN_READ; if(fileExt.contains("svg") || fileExt.contains("ps")){ mode = EqualX::File::OPEN_READ | EqualX::File::OPEN_SCAN; } EqualX::File f; f.open(filename, mode); bool readStatus = f.read(); if(readStatus) { *info = f.info(); } f.close(); return readStatus; } bool EqualX::File::fetchInfo(const char *buffer, size_t len, EqualX::FileInfo *info) { xmp_init(); XmpPtr metadata = xmp_new(buffer,len); if(!xmp_namespace_prefix(METADATA_NS, NULL) ){ qDebug() << "[EqualX::File::read] Namespace ["<setPreamble(preambleStr); info->setEquation(equationStr); info->setForegroundColor( c1 ); info->setBackgroundColor( c2 ); info->setEnvironment(environment); info->setFontSize((int)fontSize); xmp_string_free(preamble); xmp_string_free(equation); xmp_string_free(fgColor); xmp_string_free(bgColor); xmp_free(metadata); xmp_terminate(); return readStatus; } EqualX::FileInfo EqualX::File::info() const { return mFileInfo; } void EqualX::File::setInfo(const EqualX::FileInfo &fileinfo) { mFileInfo = fileinfo; xmp_free(mClassImpl->mMetadata); mClassImpl->mMetadata = xmp_new_empty(); // new packet pointer XmpStringPtr prefix = xmp_string_new(); // actual prefix xmp_register_namespace(METADATA_NS, METADATA_PREFIX, prefix); xmp_string_free(prefix); // escape chars QString preamble = mFileInfo.preamble(); preamble.replace("%", "#perc"); preamble.replace("\\", "#"); QString eq = mFileInfo.equation(); eq.replace("%", "#perc"); eq.replace("\\", "#"); QString fgCol, bgCol; EqualX::Util::colorToLatex(mFileInfo.fgColor(), fgCol); EqualX::Util::colorToLatex(mFileInfo.bgColor(), bgCol); xmp_set_property(mClassImpl->mMetadata, METADATA_NS, METADATA_PREAMBLE, preamble.toStdString().c_str(), 0); xmp_set_property(mClassImpl->mMetadata, METADATA_NS, METADATA_EQUATION, eq.toStdString().c_str(), 0); xmp_set_property_int32(mClassImpl->mMetadata, METADATA_NS, METADATA_ENV, mFileInfo.environment(), 0); xmp_set_property(mClassImpl->mMetadata, METADATA_NS, METADATA_FG, fgCol.toLatin1().constData(), 0); xmp_set_property(mClassImpl->mMetadata, METADATA_NS, METADATA_BG, bgCol.toLatin1().constData(), 0); xmp_set_property_int32(mClassImpl->mMetadata, METADATA_NS, METADATA_DOC_FONT_SIZE, mFileInfo.fontSize(), 0); } equalx-0.7.1/src/DialogAbout.cpp000644 001750 001750 00000004773 12314604155 016737 0ustar00mihaimihai000000 000000 /* * Copyright 2010 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include "DialogAbout.h" #include "defines.h" DialogAbout::DialogAbout(QWidget *parent) : QDialog(parent) { setupUi(this); QString appName = labelAppName->text(); labelAppName->setText(appName.arg(APP_NAME)); QString appFullName = labelAppFullName->text(); labelAppFullName->setText(appFullName.arg(APP_FULL_NAME)); QString appVersion = labelAppVersion->text(); labelAppVersion->setText(appVersion.arg(APP_VERSION)); frameLicense->setVisible(false); labelMore->setTextFormat(Qt::RichText); labelMore->setWordWrap(true); connect(licenseButton, SIGNAL(released()), this, SLOT(onClickedLicenseButton()) ); connect(thanksButton, SIGNAL(released()), this, SLOT(onClickedThanksButton()) ); adjustSize(); } DialogAbout::~DialogAbout() { } void DialogAbout::onClickedLicenseButton(bool show) { if(show){ QString licenseText; QFile file(":/LICENSE"); if (file.open(QIODevice::ReadOnly | QIODevice::Text)){ QTextStream stream(&file); licenseText = stream.readAll(); stream.flush(); file.close(); labelMore->setText(licenseText); } frameLicense->setVisible(show); adjustSize(); } } void DialogAbout::onClickedThanksButton(bool show) { if(show){ QString thanksText; QFile file(":/THANKS"); if (file.open(QIODevice::ReadOnly | QIODevice::Text)){ QTextStream stream(&file); thanksText = stream.readAll(); stream.flush(); file.close(); labelMore->setText(thanksText); } frameLicense->setVisible(show); adjustSize(); } } equalx-0.7.1/resources/icons/tabBar/algebra/eq01.png000644 001750 001750 00000001260 12314604155 022427 0ustar00mihaimihai000000 000000 PNG  IHDR;冦M pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;tEXtLatex\sqrt{a^2 + b^2}$tEXtResolution105J?GIDATXݖm0V aT l6@UF+0l0Ba-=}6n 65pU`{qہRfV{s2;Ĺ5К ؔ@Ey3)hW@5>=̕: t~NjBbUԬ*tF_QޘGπ(/Ȧ*%{ok;1AB{ NGT,Q<߹IENDB`equalx-0.7.1/include/DialogAbout.h000644 001750 001750 00000002202 12314604155 017221 0ustar00mihaimihai000000 000000 /* * Copyright 2010 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef DIALOGABOUT_H #define DIALOGABOUT_H #include #include "ui_dialogAbout.h" class DialogAbout : public QDialog, public Ui::DialogAboutUI { Q_OBJECT public: DialogAbout(QWidget *parent); virtual ~DialogAbout(); public slots: void onClickedLicenseButton(bool show=true); void onClickedThanksButton(bool show=true); }; #endif // DIALOGABOUT_H equalx-0.7.1/resources/icons/menu/history.png000644 001750 001750 00000002621 12314604155 021540 0ustar00mihaimihai000000 000000 PNG  IHDRĴl;bKGD pHYs  tIME=IDAT8ˍk[WƟu?ΕeKQ,Yr6N &E?dBa`Y?t酷 %tB7f10fVc%VP&uuPJsS4 (sY6Q.@)EXc䁓$%,Bla:7YK$UbD`'LMMr2Z .]$ vvvnQ /-AN *)_1!Nz1B4M\~޲,!OFkDh9VTʔSRۼbr* (͂a/ PښU.IENDB`equalx-0.7.1/resources/symbols/RelationOperators/smile.png000644 001750 001750 00000000274 12314604155 024237 0ustar00mihaimihai000000 000000 PNG  IHDROWsRGBbKGD pHYs  tIME):\H]4nm*;KtקtW{*cUBe™3i kc[o/ e$zzyR(RC^ ։VASbQº:1 ٮnܔ\>BuVV079u9ľz0w}7wbaJ-%?ʭ<ϡlw$k#f!j$O=Ͽ 2@'2qzҳ֑=O\XQx}dbZ_ĥp.J)!bUć)<UwX)t 딤-'{V D IK^ 1H e} Bzu7P|8@#F߄Ik3l`368Sŷ $Mt#0'FАY$uᣨ} |?'fEgBR?B<Qk8}5h4 4~iIFxeNu{d:`lS4(=H$557߂Jb ~L#eWKpK6 (:@8e:>53owk/…$Y~0#8+cPbA gs(@/ bF "V [SXr}{ۣ/&"0 J I#,=@Iә2 j<Xf<) fy56؅'>Z?(!3*?lIENDB`equalx-0.7.1/resources/symbols/RelationOperators/cong.png000644 001750 001750 00000000311 12314604155 024044 0ustar00mihaimihai000000 000000 PNG  IHDR K7sRGBbKGD pHYs  tIME,"ٍIIDAT(ݒK B5_YD$bDE1]{mę%xe7 dIN=^qS/!)cIENDB`equalx-0.7.1/src/WidgetFind.cpp000644 001750 001750 00000007214 12314604155 016562 0ustar00mihaimihai000000 000000 /* * Copyright 2010 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include "WidgetFind.h" #include "ui_widgetFind.h" WidgetFind::WidgetFind(QWidget *parent) : QWidget(parent), ui(new Ui::WidgetFind) { ui->setupUi(this); setSignals(); ui->findEntry->setFocus(); } WidgetFind::~WidgetFind() { delete ui; } void WidgetFind::changeEvent(QEvent *e) { QWidget::changeEvent(e); switch (e->type()) { case QEvent::LanguageChange: ui->retranslateUi(this); break; default: break; } } QString WidgetFind::getFindExpr() const { return ui->findEntry->text(); } void WidgetFind::onClose() { emit closing(); QWidget::close(); } void WidgetFind::onChangedFindText(const QString &expr) { bool findable = ! expr.isEmpty(); ui->findNextButton->setEnabled(findable); ui->findHLButton->setEnabled(findable); ui->findPrevButton->setEnabled(findable); QTextDocument::FindFlags searchFlags; if(ui->findOptMatchCase->isChecked() ) searchFlags = searchFlags | QTextDocument::FindCaseSensitively; emit changedFindText(expr); if( ui->findHLButton->isChecked() ){ emit findAll(expr, searchFlags); } else{ emit find(); emit find(expr, searchFlags); } } void WidgetFind::onPressedFindNext() { QString expr = ui->findEntry->text(); QTextDocument::FindFlags searchFlags; if(ui->findOptMatchCase->isChecked() ) searchFlags = searchFlags | QTextDocument::FindCaseSensitively; emit find(); emit find(expr, searchFlags); } void WidgetFind::onPressedFindPrev() { QString expr = ui->findEntry->text(); QTextDocument::FindFlags searchFlags; if(ui->findOptMatchCase->isChecked() ) searchFlags = searchFlags | QTextDocument::FindCaseSensitively; searchFlags = searchFlags | QTextDocument::FindBackward; emit find(); emit find(expr, searchFlags); } void WidgetFind::onToggledHighlight(bool activate) { QString expr = ui->findEntry->text(); QTextDocument::FindFlags searchFlags; if(ui->findOptMatchCase->isChecked() ) searchFlags = searchFlags | QTextDocument::FindCaseSensitively; emit toggledHighlight(activate); if(activate) emit findAll(expr, searchFlags); else emit findAll("", searchFlags); } void WidgetFind::setFindExpr(const QString &expr) { ui->findEntry->setText(expr); } void WidgetFind::setSignals() { connect(ui->findEntry, SIGNAL(textChanged(QString)), this, SLOT(onChangedFindText(QString)) ); connect(ui->findHLButton, SIGNAL(toggled(bool)), this, SLOT(onToggledHighlight(bool)) ); connect(ui->findNextButton, SIGNAL(released()), this, SLOT(onPressedFindNext()) ); connect(ui->findPrevButton, SIGNAL(released()), this, SLOT(onPressedFindPrev()) ); connect(ui->findCloseButton, SIGNAL(clicked()), this, SLOT(onClose()) ); } void WidgetFind::show() { QWidget::show(); ui->findEntry->setFocus(); ui->findHLButton->setChecked(false); } equalx-0.7.1/resources/icons/menu/fill-color.png000644 001750 001750 00000002645 12314604155 022107 0ustar00mihaimihai000000 000000 PNG  IHDRĴl;sBIT|d pHYsaa0UtEXtSoftwarewww.inkscape.org<"IDATxڍ{LW/_#n)Ee40#ё=9$3@]|$i NPl((-"BP,/,Z"Rݹnwn)Jw("Xg/I7Btƍic^J~-1KK[D"&{?6MZ[CC=H$!v;]nWRL“$-H*`1FSS!HxTUUőPdt#3W<L(VP(9!EkkE\<ƗFP$zFq"ږT*r###mmmna\$1wձ߽{EDFP2l9Pt"ҎPzվ1IEo >RW"h.pp "∣~"fO)Je0ktY ;IC.}$\.&N 122ł!C=0m@gP~5M|U 2V;Ppj eE>P X}ΊzKlbT9͕+4 Za<:0  1ލRՃ$]`ჷنs=3kz @[Cr["`&` ,3xR{:r#4<#.^ɟmj1; kod.<:Ļxݔ8iH`^uuXnVBb)0xä u^Ȏ[͌b"8vJ|Ş˗wj4PIO˱`VGUЗnF߃C05 WCYR26WPnxxLPoPt:)y50#TuwCW-/vvیsuLͅBoee 0qGg"T0|2w~u<ԜTz ^'I].U]:wmzF 䍉DIo}RjFZ3NgXettImlVЧII!6d޺GGF&QӫyHX?Y I*C(] J77ܥPێgt}X@HHᘘH 'Ndhڵ ??Uڶm17f|yc1CM3B'ؿ oVIENDB`equalx-0.7.1/resources/icons/tabBar/physics/eq02.png000644 001750 001750 00000002061 12314604155 022515 0ustar00mihaimihai000000 000000 PNG  IHDRX$ u pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;$tEXtLatex\oint \vec{F} \cdot d\vec{s}=0k*tEXtResolution116-'"IDATh홻v@?M:)B@(xLI'yC.y.t e8e:SZZy-⃬hv^X x<.ZܿS]\3`֜f̭m%oۈ2@mCJ88;}gπ&Ƞ{e}ifP QCu_%#Da} NMCdΚml o\ x`x모uD# XUD5j>92͔rN)JDƐ*[ +Ⱥrۑ!~lӼDu'^/s1v|ߔ[e,孌Bh_iv׾6-M[q^G7R>WH\I8TKpkY$O":Nn3kM߮yIL:QUrGG4( ~Ь9e9ܴԬ1W-#/z}V h/>[e,n|߅-WAZzuʲT^P~sƦ w:eGgġ%8LU& ۴1297{,[S=T:DڍO"Ghp|7vߘgx <> 2%_YSԒ!)#A"a8 Dr &m"#EU\`ulc#)۞ xƵ9Ђ:~B {^6lɜa =6_ _vD. _ |EQ0-ydې& } 7eIENDB`equalx-0.7.1/resources/symbols/Greek/zeta.png000644 001750 001750 00000000321 12314604155 021443 0ustar00mihaimihai000000 000000 PNG  IHDR B'sRGBbKGD pHYs  tIME 1DQIDAT(ŒA ! 3=DvbCH`['5t\rp;HRۤ2_˃+1OeilܳF})/q"x}IENDB`equalx-0.7.1/resources/symbols/Sets/mathcal_O.png000644 001750 001750 00000000344 12314604155 022255 0ustar00mihaimihai000000 000000 PNG  IHDR K7sRGBbKGD pHYs  tIME:[dIDAT(ݓ C}dݩ adzDR{>>1z%D@+*e{=9Sruíŷy#8(GV[IENDB`equalx-0.7.1/resources/icons/menu/find-replace.png000644 001750 001750 00000007627 12314604155 022403 0ustar00mihaimihai000000 000000 PNG  IHDRĴl; pHYs   OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3-gAMA|Q cHRMz%u0`:o_FIDATxڔOlU?͛l[Z[R #\)/ƻHM4^TDŤJE QA 5@w)vnwvfgy 6Qf2~{,j 5B i>7ʲƮG?WhޱhOiT"!1h﾿UU<1 CtzG[eqrGc*\úu4dz}" ,K1Y 3;eϞt$F 'n196)EDe]%iZ=TRn‘D̚SdR EMT bK4Zkm@&QBgr4R.GviEuupMÐ3"{Vrn45;,B˲C VZcI102 U6= 9{΍z4ZEy'w(m&!00|'NB*B.zEP?}@_`Z񼽷\ǝ3F nn>`*GIENDB`equalx-0.7.1/resources/symbols/BigGreek/xi2.png000644 001750 001750 00000000312 12314604155 021624 0ustar00mihaimihai000000 000000 PNG  IHDR F)sRGBbKGD pHYs  tIME SѰJIDAT(ϽQA 0NAVn%; 3G6 YDKFt1ηwˀS(0u}zs(-;\mIENDB`equalx-0.7.1/resources/symbols/Accents/dot.png000644 001750 001750 00000000306 12314604155 021614 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME&RSFIDAT8c?5 S@aJgDZ>`aHE,M?/P*o vSɀ w!K7jIENDB`equalx-0.7.1/resources/symbols/Miscellaneous/exists.png000644 001750 001750 00000000267 12314604155 023576 0ustar00mihaimihai000000 000000 PNG  IHDR B'sRGBbKGD pHYs  tIME 7F7IDAT(c?!@"FFF?# ML`s8\Pt8 L*o-CIENDB`equalx-0.7.1/resources/symbols/Operators/otimes.png000644 001750 001750 00000000352 12314604155 022725 0ustar00mihaimihai000000 000000 PNG  IHDR K7sRGBbKGD pHYs  tIME${jIDAT(ݓA0yHb(X@]!i$Q/tXe\.]+U/PRʁ)Ϡ UUD%<fO4۵IENDB`equalx-0.7.1/include/LatexHighlighter.h000644 001750 001750 00000002544 12314604155 020274 0ustar00mihaimihai000000 000000 /* * Copyright 2010 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef LATEXHIGHLIGHTER_H #define LATEXHIGHLIGHTER_H #include class LatexHighlighter : public QSyntaxHighlighter { Q_OBJECT public: LatexHighlighter(QTextDocument *parent=0); protected: void highlightBlock(const QString &text); private: struct HighlightingRule { QRegExp pattern; QTextCharFormat format; }; QVector rules; QTextCharFormat commentFormat; // starting with '%' QTextCharFormat controlFormat; // words starting with '\' QTextCharFormat bracesFormat; // {, } }; #endif // LATEXHIGHLIGHTER_H equalx-0.7.1/resources/icons/tabBar/trig/000755 001750 001750 00000000000 12314604155 020524 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/symbols/Accents/underrightarrow.png000644 001750 001750 00000000317 12314604155 024256 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME qOIDAT8c?5##rh~X0Ql޼LnQleRcf8U?a!a ҘG3ĀIENDB`equalx-0.7.1/include/equationimage.h000644 001750 001750 00000000277 12314604155 017671 0ustar00mihaimihai000000 000000 #ifndef EQUATIONIMAGE_H #define EQUATIONIMAGE_H #include class EquationImage : public QGraphicsPixmapItem { public: EquationImage(); }; #endif // EQUATIONIMAGE_H equalx-0.7.1/resources/icons/tabBar/stats/eq07.png000644 001750 001750 00000001121 12314604155 022172 0ustar00mihaimihai000000 000000 PNG  IHDR$,- pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;tEXtLatex\frac{x - \mu }{ \sigma} DtEXtResolution1066NHIDATHױM@_@Gi:J#6p6@l@Q6HV r:$t;g#PFvq7}Np|+q {+gxH] Ӏ2_V$"#),yB|cs-ax1Jd ֣>bQP&'1OC~W1.9a.]'󋘳xŽ t@m췅>}W)5 iXi-4-AGvZp|>bJL slf 5r~yr`RWYukT݆J4pk>sqxSz>W;%'kIENDB`equalx-0.7.1/resources/symbols/Arrows/updownarrow.png000644 001750 001750 00000000302 12314604155 023306 0ustar00mihaimihai000000 000000 PNG  IHDR\^sRGBbKGD pHYs  tIME &kXBIDAT(c?.ĀPI?VIkc,Fd`|zxeH)<(a#`A n4*A_IENDB`equalx-0.7.1/resources/symbols/Integrals/000755 001750 001750 00000000000 12314604155 020671 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/symbols/Miscellaneous/nabla.png000644 001750 001750 00000000331 12314604155 023324 0ustar00mihaimihai000000 000000 PNG  IHDR K7sRGBbKGD pHYs  tIME38YIDAT( DѹtGRhv.&ŶVB}ѼD`{iY93vW-7k-eY{0qU5 2vIENDB`equalx-0.7.1/resources/symbols/RelationOperators/in.png000644 001750 001750 00000000317 12314604155 023532 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME)^lOIDAT(ݒA _Z0jVpal¢r/eef9c2X?L(!uQIENDB`equalx-0.7.1/include/File.h000644 001750 001750 00000005317 12314604155 015720 0ustar00mihaimihai000000 000000 /* * Copyright 2013 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef EQUALXFILE_H #define EQUALXFILE_H #include #include "defines.h" #include "FileInfo.h" namespace EqualX{ /* * A EqualX File is any file which contains EqualX metadata * * This class is used for generating data/files required for reading/writing files with metadata specific for EqualX * The main purpose of this class is for I/O operations. The description of EqualX metadata is in class EqualX::FileInfo */ class File { public: enum OpenMode{ OPEN_READ=0x0, OPEN_UPDATE=0x1,// READ-WRITE OPEN_SMART=0x2, // use smart file handler OPEN_SCAN=0x4 // scan for metadata }; Q_DECLARE_FLAGS(OpenModes, OpenMode) File(); File(const EqualX::FileInfo& fileinfo); ~File(); void open(const QString& filename, EqualX::File::OpenModes mode=EqualX::File::OPEN_UPDATE); void close(); bool read(); // read metadata from the current file and set FileInfo and Metadata bool write();// write Metadata into the current file EqualX::FileInfo info() const; void setInfo(const EqualX::FileInfo& fileinfo); // write methods for the current FileInfo // the files are saved in the current working dir and named according to defines.h void writeLatexFile(bool withBackgroundColor=false); // create a latex file void writeLatexFileCropped(float llx, float lly, float urx, float ury); // boundingbox: lowerleft x, lowerleft y, upperright x, upperright y void writeMetadataFile(); // a metadata file to be embedded into files static bool fetchInfo(const QString& filename, EqualX::FileInfo* fileInfo); static bool fetchInfo(const char* buffer, size_t len, EqualX::FileInfo *info); protected: void __init(); private: QString mFileName; EqualX::FileInfo mFileInfo; struct FileImplementation; FileImplementation* mClassImpl; }; typedef QFlags EqualXFileOpenMode; Q_DECLARE_OPERATORS_FOR_FLAGS(File::OpenModes) } #endif // EQUALXFILE_H equalx-0.7.1/include/EquationArea.h000644 001750 001750 00000002243 12314604155 017412 0ustar00mihaimihai000000 000000 /* * Copyright 2014 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef EQUATIONAREA_H #define EQUATIONAREA_H #include class QDragEnterEvent; class QDropEvent; class EquationArea : public QScrollArea { Q_OBJECT public: explicit EquationArea(QWidget *parent = 0); signals: void dropped(const QString& filename); protected: void dragEnterEvent(QDragEnterEvent *event); void dropEvent(QDropEvent *event); }; #endif // EQUATIONAREA_H equalx-0.7.1/resources/icons/menu/help-contents.png000644 001750 001750 00000002036 12314604155 022622 0ustar00mihaimihai000000 000000 PNG  IHDRĴl;sBIT|d pHYsaa0UtEXtSoftwarewww.inkscape.org<IDATxڅKUs3= ӓh2A IpИ( Y՝d Vĵn"B"*р1:>0N_u[0Nw4拈9i2_ܼVocil.⮴~s QBں0 /4, 3@ P/~pcx»+?zzssV J)<z|o243(sZp0SٓuÉ`!b uZ16b:z>_Fӎ+`` cfFYTKWc Qha67[ "H,okCH1!kɍE\1*XXNp 1icAexh=J$|gP+2(} * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef EQUATIONTEMPLATEWIDGET_H #define EQUATIONTEMPLATEWIDGET_H #include class QSignalMapper; class EquationTemplateWidget : public QWidget { Q_OBJECT public: EquationTemplateWidget(QStringList paths, QWidget *parent = 0); signals: void clicked(const QString &text); private: QSignalMapper *signalMapper; }; #endif // EQUATIONTEMPLATEWIDGET_H equalx-0.7.1/resources/symbols/Operators/amalg.png000644 001750 001750 00000000302 12314604155 022501 0ustar00mihaimihai000000 000000 PNG  IHDR F)sRGBbKGD pHYs  tIME 45Vr BIDAT(ݒ1 _>'EEAAZZ%hsr$eqyP 8/9{@`E!UIENDB`equalx-0.7.1/resources/equalx.ico000644 001750 001750 00000016276 12314604155 017260 0ustar00mihaimihai000000 000000 00(0`ZZe@IIIIIIIOҤŴDIIIIIII9ٺܳ̐EXXXXXXX̸<;KOOOOOOEa۶;OOOOOOO@ƁڽҸ7GGGGGGG;ԪEBGGGGGG@Iڡ|8??????>ʲ9|8??????>ʱ5jcfW9GX9GX9GX9GX9GX9GX9GX9GX9GX9GX9GX9GX9GYMRE26666662VԷ46666666;4ҥ롡... !!!ZZZݱ4.......0/-......,bYYYSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSQQQѠĽ,%%%%%%%#%%%%%%$ư:pppmmm\ʹ-냃ccc8 ȃ뼻ڿӴ* G̮-ձ;UUUUUUUUKųMô@V[[[[[[[[[ֽFʐ}Z>K[=K[=K[=K[=K[=K[=K[=K[=K[=K[=K[=K[=K[=K[=K[=K[=K[=K^V[fPbbbbbbbbbba֯=666""""""""""""""""""""""""""""""""""""""""""""""""AAAҨǸGiiiiiiiiiiiiaέCeeeTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTUUU>nppppppkppppppYn뮮yyyyyyOhwwwwww_8vwwwwwwٶKԮ녅Ņ[~~~~~~wӮEʒW~~~~~~z׭BܢձHԅԅԅԅԅԅԅڲJڿUsԅԅԅԅԅԅqȴTEτӌӌӌӌӌӌjwBҊӌӌӌӌӌӌ۽`ȌfuӓӓӓӓӓӓϊԭEϞ¹\ӓӓӓӓӓӓӓܯIѤĸ]ҚҚҚҚҚҚҚܱM[ǀҚҚҚҚҚҚ͏ӮGݮHդ֧֧֧֧֧֧xzDԣ֧֧֧֧֧֧ƁûmR٦ۯKҨƿkaӪھһiiiiiiiiiLjiiiiiiiizequalx-0.7.1/resources/symbols/Operators/cap.png000644 001750 001750 00000000276 12314604155 022175 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME :K>IDAT(c?1H0 sQ #K1R3f˰ G2d?*#0TIENDB`equalx-0.7.1/resources/icons/filetypes/000755 001750 001750 00000000000 12314604155 020370 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/symbols/Miscellaneous/jmath.png000644 001750 001750 00000000301 12314604155 023347 0ustar00mihaimihai000000 000000 PNG  IHDRLsRGBbKGD pHYs  tIME':vBAIDAT(ݒ1 Ĩ_bW.K@#>@a^WdAҐ+殮j}*%aIENDB`equalx-0.7.1/resources/symbols/Accents/acute.png000644 001750 001750 00000000313 12314604155 022125 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME 52KIDAT81 'Tl.qJI")C@g7Zz@=sf ͧai/WA??-IENDB`equalx-0.7.1/src/BookmarksPanel/000755 001750 001750 00000000000 12314604155 016736 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/symbols/RelationOperators/prec.png000644 001750 001750 00000000314 12314604155 024052 0ustar00mihaimihai000000 000000 PNG  IHDR F)sRGBbKGD pHYs  tIME 9jLIDAT(1@ bl;u dQPsW[臓{g@$ٻTUh\u̙HAWѱF%bIENDB`equalx-0.7.1/resources/symbols/Miscellaneous/imath.png000644 001750 001750 00000000273 12314604155 023356 0ustar00mihaimihai000000 000000 PNG  IHDR|`sRGBbKGD pHYs  tIME)ɾy;IDAT͐K JRxmZv@ITILUpq@Uqo%GIENDB`equalx-0.7.1/resources/symbols/Arrows/leftrightarrow.png000644 001750 001750 00000000310 12314604155 023761 0ustar00mihaimihai000000 000000 PNG  IHDROWsRGBbKGD pHYs  tIME$#9AHIDAT81 -9i ht2kڭ=?aIbo(aI8߮{*{bYIENDB`equalx-0.7.1/equalx.1000644 001750 001750 00000001244 12314604155 014621 0ustar00mihaimihai000000 000000 .TH EQUALX 1 "December 14, 2010" .SH NAME equalx \- a feature rich equations editor .SH SYNOPSIS .B equalx .SH DESCRIPTION EqualX is a cool graphical interface to LaTeX and a bunch of conversion programs. It aids you write equations faster in latex and convert them to many file types:PDF, SVG, PNG, etc. The generated equations can be dragndrop, or exported to use in other applications: office, image processing, vector graphics,etc. .SH "SEE ALSO" .PP Website: http://equalx.sourceforge.net/index.html .SH AUTHOR EqualX was written by Mihai Niculescu . .PP This manual page was written by Dariusz Dwornikowski . equalx-0.7.1/resources/icons/tabBar/matrix/eq03.png000644 001750 001750 00000002147 12314604155 022345 0ustar00mihaimihai000000 000000 PNG  IHDRY/pfs pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;YzTXtLatexxIJM̫.M,)ʬJ64UPSIN/)VPSH6̫Q) )Ĥ@Y\ y\1y)pJ&)ZO tEXtResolution80>J~>$IDATx훱q0årH^T. t t r!o`5\(*rnQ$A(2* $\e+NԭTDY3[ž<*Q)p ́-u BU]ɹqn3dn.;.m, ^؝;qS~{[6O]L5ZD]p9oY9(soz#'j\=s⢥D7"g,$E-soȨF$-#eY65q:R9p[,gL_ Ϳ{dF|nsA%3C@斬SsvqԃԜa7!I0&eqW50֑ccy C)pa#%x60X_^'a!'1ȇ{ן e|[ ߖH cC|zW s:G뉇]eCh_} f/[c`#9 .*ΐd:]dR#}z':'AI>9cc#JȨyE ~ĉ rzy *VTX$ժR8vŽo6v&|wQ2T6|>ٸܚTA~`Jh'F 'uN%CC+gˎŠd3LWvNh}Sl4P%wRPo|R諾d TO}QUqoJqobF`8}[/nޱս}wIENDB`equalx-0.7.1/include/SearchLineEdit.h000644 001750 001750 00000004010 12314604155 017651 0ustar00mihaimihai000000 000000 /* This file is part of EqualX, based on LineEdit from Martin Rotter http://www.martin-rotter.8u.cz/2013/03/qlineedit-subclass-with-clear-button-in-english/ EqualX is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. EqualX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with EqualX. If not, see . Copyright 2012 - 2013 Martin Rotter Copyright 2014 Mihai Niculescu */ /**************************************************************************** ** ** Copyright (c) 2007 Trolltech ASA ** ** Use, modification and distribution is allowed without limitation, ** warranty, liability or support of any kind. ** ****************************************************************************/ #ifndef LINEEDIT_H #define LINEEDIT_H #include #include class SearchLineEdit : public QLineEdit { Q_OBJECT public: // Constructors and destructors SearchLineEdit(QWidget *parent = 0); ~SearchLineEdit(); public slots: // Disables or enables clear button. void setClearButtonEnabled(bool enable); // Tweak default implementations. void setEnabled(bool enable); void setReadOnly(bool read_only); protected slots: void onTextChanged(const QString &new_text); protected: // Places clear button into the correct position. void resizeEvent(QResizeEvent *event); // Returns width of QLineEdit frame. int frameWidth() const; private: QToolButton *mClearButton; bool mClearButtonEnabled; QCompleter *mCompleter; }; #endif // LIENEDIT_H equalx-0.7.1/resources/icons/menu/edit-delete.png000644 001750 001750 00000002141 12314604155 022221 0ustar00mihaimihai000000 000000 PNG  IHDRĴl;sBIT|d pHYsvv}ՂtEXtSoftwarewww.inkscape.org<IDATxڵkWǿw&3m6-ٙظhP]!B}1ITCPھXZBfڦ*(tk M4nD;e-e~s RUόՊ2}5^^*~G?Õoe2Qz:qp|!}F4P+h1z.>_fU=v]ifW+^ufIW*X/o%޸<էY&(@,؀360s S J%pb! JkdL{Ǐ;k7o1QBʜ\䤍'++67Lˆr钫XaTZ;gw%!(X=0}lPUɑLm{.| ԔmR[\k(#YT ?tt@g&&\][TO?ːԨM@?p]A(A DGZFk`djmk߂ԩ6jc5 c+]`hfWWpV|KЀŽG-sn:IF` Ah+Ptۑ#!ehMՅϕ]bcBWj"|:4Vh8VTCi^T ?_[: (#hC`ˈ^{2 \qva;q>6`19_/;ާ42LƖϞaƋ8$X'- n8L~S=}z![VxhXtNn)AFPrw gղ {{Q'-Top蓾^EЖFn<7reff܀҆Avi~ށGZX*]B2|FE}Ij코}Lz ^IENDB`equalx-0.7.1/resources/symbols/Delimiters/langle_rangle.png000644 001750 001750 00000000406 12314604155 024342 0ustar00mihaimihai000000 000000 PNG  IHDR_AsRGBbKGD pHYs B(xtIME 8reYxIDAT8 0 o"8O8(f][yTaNW!I{IXHsh-IPU^B9+797= AȭU)kpΚ*Ҵ@H}w/H4IENDB`equalx-0.7.1/resources/symbols/Operators/cup.png000644 001750 001750 00000000275 12314604155 022220 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME+.$=IDAT(ݒ1 @!8 ծ͒RTR5 U{ePe5J0 jm ~EIENDB`equalx-0.7.1/resources/symbols/BigGreek/psi2.png000644 001750 001750 00000000331 12314604155 022000 0ustar00mihaimihai000000 000000 PNG  IHDR F)sRGBbKGD pHYs  tIME13YIDAT(͒Q C}_9ڨ9̟־T$}= @_E?U.\L oUBC_<^Ei73LIENDB`equalx-0.7.1/resources/symbols/Products/coprod.png000644 001750 001750 00000000302 12314604155 022533 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME+85WUBIDAT(1 |nENzk.Bk@BEʅ&I\g!g1KYewW <Տ!eIENDB`equalx-0.7.1/resources/icons/tabBar/stats/eq05.png000644 001750 001750 00000002021 12314604155 022170 0ustar00mihaimihai000000 000000 PNG  IHDRW(fx pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;,tEXtLatex\sum_{i=1}^{n} (X_i - \overline{X} )^2ostEXtResolution1066NIDATh͑0?'9$7ہK`(@:`'dJHbs[` AB2^la<=Ȁ{_GC 0Eu|#Y.w@ z?*эQ:U 4YX_&Q LPVﯱsVw(UJwYdz,r"NZTlO]{ST?Kx(lJlԹW-rEuCsAi)^lJ@e4Z>PPw2Z}oۃLS:68X!h߹B6ϋ9.9#KݪСTSJ]d ~gOIYWi' 7k`]Ka ) w\(C_ld6xdl9j$l:v<g, 3ʘͥԸ3Pb @߇ sf8,[XhrC7^t ױϐ/hkeu~L9)O(x5*3%cHE*Ν+_Nuq'bRRJ/ &}x(C-s NVQ/+-@{7)픎ZNVέ=Ϟa*6np\)WoE_hutcZZRcUhL{駗_󸡡Vmq NؓS:c \J1 ,8]wQ]evvt[zɵ1oCKOq/Vc M\ó-:V(.4jn8&N\% ϭEzD` T#IҶVx<[Nq,ۜTѲqP an !())D"}-hP{. OqS&ƳL1N`oHx~ߩGux.p8A2n#y7!J`e6Ux6( "rKPZhaɶ@71pİ9zh-GCgCĮҧmc>UڧϖPF+?Y;v&v&Z>>2߯unԝ{XGZ[.hrIENDB`equalx-0.7.1/resources/symbols/Accents/underline.png000644 001750 001750 00000000274 12314604155 023017 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME &Zx<~[Sh˲ D~E&]52k Jd?IEGpAL 34'9T.V, 48:Taj1.>טx<~{R>1ica߯uczـV.`Ʊh4*_YsZG]]}:]=vfvkBV7^\=yX.,\Ԟwv@apƓ5_YЯH;"+ a{ 73e3z l6o`Љq ̥CwCI&^t</cKc͡L?~xvsFDf,IENDB`equalx-0.7.1/resources/symbols/Arrows/mapsto.png000644 001750 001750 00000000343 12314604155 022227 0ustar00mihaimihai000000 000000 PNG  IHDROWsRGBbKGD pHYs  tIME3.BjcIDAT8풱 0 D/ֵ?'8NsK4A1@Z 6O}̀ ozC=bg]3&L @)Fb{3KIENDB`equalx-0.7.1/resources/icons/menu/bookmarked.png000644 001750 001750 00000002140 12314604155 022151 0ustar00mihaimihai000000 000000 PNG  IHDRĴl;sBIT|d pHYsvv}ՂtEXtSoftwarewww.inkscape.org<IDATxڍ[he-dIDQ+/V+" T jA |Q|>EPBB>Ci ѶI61fv;RvsǙ9~|!q}ٱA,~Cg컕LhvRlj[C1ʹo?uE$]P~wmBaȽ|h߳JQ3qT'9~&12I 5u} nqX7fqaI#Fsx_,3#;Q^KD/oMV~U!^ò\RM@I9Dg\3@sp*kثSo ć$T̔B aQ "YLW@qmnZ69Z% {|R([\c 9ɹ r.A E(N^SF״DʁrXhd33#֥,j:o/o]{s=] 1"Lg4m(HݨmWr?8?Ϧ|BXT^qVC@%ÚH5v)@©`nz%lT/=:Qvt|T6 va/qZyhecnBK,o j X!,MX}r%I2HnX ZM pJJB+idz@ۊA2h"IDb~gfSP]$X [ywG*b9 j*+I ޏww3qڷWQ[I`,mfE6qzR׷^洸 c@x-iV&fͪ4Q9k'F6#1Sj\˵k$8_@]X@0c1Huq{_оCIENDB`equalx-0.7.1/resources/symbols/Operators/bigtriangledown.png000644 001750 001750 00000000325 12314604155 024604 0ustar00mihaimihai000000 000000 PNG  IHDR K7sRGBbKGD pHYs  tIME4iUIDAT(; CW"Z:>H)%a7 PM˽Kb ɀl][T޳w,!H5QIENDB`equalx-0.7.1/resources/symbols/RelationOperators/neq.png000644 001750 001750 00000000314 12314604155 023704 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME;LIDAT(͑A LeCm6pO9q' jw fMԷn&,0j}O_z3.ݭIENDB`equalx-0.7.1/resources/symbols/Decorations/underset.png000644 001750 001750 00000000270 12314604155 023551 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME g@8IDAT8c?5##rh~X0Ql޼Lke@EA$9IENDB`equalx-0.7.1/resources/symbols/Greek/sigma.png000644 001750 001750 00000000300 12314604155 021575 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME,~@IDAT(1 0 c| ,d+nb!4V'쨀x:bkE=˫n=!-wIENDB`equalx-0.7.1/resources/icons/preferences/render_mode_text.png000644 001750 001750 00000000645 12314604155 024727 0ustar00mihaimihai000000 000000 PNG  IHDRasBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<"IDAT8JPƿ7-;)tp˟BT (tC 8 >A_And&}RB $"R,s~0˲v8绐P4o] @L4[Q}@]ׯdv<ϻuld0{|<8~^e/kGp]0#B,^}>8$D!(֎0nLӧ ˲T0$R8O\(E7 +KJIENDB`equalx-0.7.1/resources/symbols/Arrows/longrightarrow.png000644 001750 001750 00000000302 12314604155 023767 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME5#jQBIDAT8ԡ@ @+t)?0k48O7PlRno*%Iu*LCxpIENDB`equalx-0.7.1/resources/symbols/Delimiters/lbarvert_rbarvert.png000644 001750 001750 00000000321 12314604155 025274 0ustar00mihaimihai000000 000000 PNG  IHDRĴl;sRGBbKGD pHYs B(xtIME 6 ^YQIDAT8핡 0 sUiMuT:uIA ÀZ @@qΗ7;p8k\ NбIENDB`equalx-0.7.1/src/BookmarksPanel/BookmarksView.cpp000644 001750 001750 00000006073 12314604155 022233 0ustar00mihaimihai000000 000000 /* * Copyright 2014 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include "BookmarkItem.h" #include "BookmarksPanel/BookmarksItemModel.h" #include "BookmarksPanel/BookmarksView.h" BookmarksView::BookmarksView(QWidget *parent) : QTreeView(parent), mModel(0) { } void BookmarksView::setModel(BookmarksItemModel *model) { mModel=model; QTreeView::setModel(model); } void BookmarksView::contextMenuEvent(QContextMenuEvent *ev) { qDebug() << "contextMenuEvent();"; QTreeView::contextMenuEvent(ev); } BookmarkItem *BookmarksView::currentItem() { QModelIndex curIdx = currentIndex(); return mModel->itemFromIndex(curIdx); } /* void BookmarksView::dragEnterEvent(QDragEnterEvent *event) { if (event->mimeData()->hasFormat("application/x-equalx-library-modeldata")) event->accept(); else event->ignore(); } void BookmarksView::dragMoveEvent(QDragMoveEvent *event) { if (event->mimeData()->hasFormat("application/x-equalx-library-modeldata")) { event->setDropAction(Qt::MoveAction); event->accept(); } else event->ignore(); } void BookmarksView::dropEvent(QDropEvent *event) { if (event->mimeData()->hasFormat("application/x-equalx-library-modeldata")) { QByteArray rowData = event->mimeData()->data("application/x-equalx-library-modeldata"); QDataStream dataStream(&rowData, QIODevice::ReadOnly); LibraryModelData rowModelData; dataStream >> rowModelData; addPiece(rowModelData); event->setDropAction(Qt::MoveAction); event->accept(); } else event->ignore(); } void BookmarksView::addPiece(const LibraryModelData &rowData) { BookmarkItem *item = new BookmarkItem(rowData); } void BookmarksView::startDrag(Qt::DropActions supportedActions) { BookmarkItem *item = currentItem(); QByteArray itemData; QDataStream dataStream(&itemData, QIODevice::WriteOnly); dataStream << item->data(); QMimeData *mimeData = new QMimeData; mimeData->setData("application/x-equalx-library-modeldata", itemData); QDrag *drag = new QDrag(this); drag->setMimeData(mimeData); //drag->setHotSpot(QPoint(pixmap.width()/2, pixmap.height()/2)); //drag->setPixmap(pixmap); drag->exec(Qt::MoveAction); // if (drag->exec(Qt::MoveAction) == Qt::MoveAction) delete takeItem(row(item)); } */ equalx-0.7.1/resources/icons/tabBar/matrix/eq01.png000644 001750 001750 00000001607 12314604155 022343 0ustar00mihaimihai000000 000000 PNG  IHDR? ߠ pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;FzTXtLatexxIJM̫.M,)ʬRH64UPSH64UQRH6 r)Ĥ54 \ tEXtResolution94 ,WXu%.R':mGPٟ1l<"-a*`=\ Uyv) ;HŐw.-"=/:[T9!sđ1}_<"b;]j}qa k8H=Cž{U. < ,,]˻>"<EtXa߇wIXY Q:GB ╊ @ȧDK$*HDQ '́񃅹6N,f)#Z[~1Nb1+5b{ 3ݛ} vi2\<Go\mnw(BG7?ϧx9̈́#y?{ 7Rykgp9Bzi{ʻƻg݀qo+Ʈxk`x!֙0ttDg‰`ACcc0(tՂwIENDB`equalx-0.7.1/resources/symbols/RelationOperators/mid.png000644 001750 001750 00000000244 12314604155 023674 0ustar00mihaimihai000000 000000 PNG  IHDR F)sRGBbKGD pHYs  tIME$y[Ă![Dʳ-po]5IķL)ݪ0۔H{ҝu ]'b 14T)20Wԣ:s rbN^DzA gxk'6xhPvL뱔FP e]AkJ\ ]xHnu 8NZ[eя %qJ&VNح&le '43}JZoȽ?@_r|՞}r{J/eN IZimy23] ow pI\2"ꅈ8-Rf;*ZĪ'UyǫU?hR~|Nb|Ù@?-C3ls$.c.D?XzCRIENDB`equalx-0.7.1/resources/symbols/Arrows/longleftrightarrow2.png000644 001750 001750 00000000326 12314604155 024732 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME57p,VIDAT8픱 D;_C8( 8SʰQ ()Co@Q * 5 _9>'ܔz9dMy{s+;N6b<IENDB`equalx-0.7.1/resources/symbols/Accents/underleftrightarrow.png000644 001750 001750 00000000324 12314604155 025127 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME 0CHTIDAT8c?5##rh~X0Ql޼LlXg¥ ?#6C1Lj, ĸ:&RC.T5.K9IENDB`equalx-0.7.1/src/BookmarksPanel/BookmarksViewItemDelegate.cpp000644 001750 001750 00000010334 12314604155 024500 0ustar00mihaimihai000000 000000 /* * Copyright 2014 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include "Library/LibraryData.h" #include "BookmarksPanel/BookmarksViewItemDelegate.h" BookmarksViewItemDelegate::BookmarksViewItemDelegate(QObject *parent) : QStyledItemDelegate(parent) { widthH = 80; heightH= 80; } QWidget *BookmarksViewItemDelegate::createEditor(QWidget* /* parent*/, const QStyleOptionViewItem& /*&option*/, const QModelIndex& /* index */) const { return 0; } void BookmarksViewItemDelegate::setEditorData(QWidget* /* editor */, const QModelIndex& /* index */) const { } void BookmarksViewItemDelegate::setModelData(QWidget* /* editor */, QAbstractItemModel* /*model*/, const QModelIndex& /* index */) const { } void BookmarksViewItemDelegate::updateEditorGeometry(QWidget* /* editor */, const QStyleOptionViewItem& /*option*/, const QModelIndex& /* index */) const { } void BookmarksViewItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex& index) const { LibraryModelData data = qvariant_cast(index.data(Qt::DisplayRole)); painter->save(); painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, true); painter->setPen(Qt::SolidLine); QRect drawArea = option.rect; if (option.state & QStyle::State_Selected){ painter->fillRect(drawArea, option.palette.highlight()); } if(data.isBookmark()){ QImage eq(data.name); int w = eq.width(); int h = eq.height(); float af = (float)w/(float)h; // aspect ratio int wmax = drawArea.height()*af; // represents the maximum width to draw at maximum possible height (and keep aspect ratio) if(drawArea.width()>=wmax){ w = qMin(wmax,w); h = qMin(drawArea.height(),h); } else { w = qMin(drawArea.width(),w); h = qMin(int(w/af),h); } int x = drawArea.x(); int y = (drawArea.height()- h)/2.0 + drawArea.y(); eq = eq.scaled(QSize(w, h), Qt::KeepAspectRatio, Qt::SmoothTransformation); painter->setPen(option.palette.buttonText().color()); painter->drawImage(x,y, eq); } if(data.isFolder()){ QIcon icon= QIcon::fromTheme("folder", QIcon("://resources/icons/bookmarks/folder.png")); QRect textBB(option.fontMetrics.boundingRect(data.name)); // text bounding box int titleH = textBB.height(); QRect titleArea(drawArea.x()+titleH+3, drawArea.y()+3, drawArea.width()-3,titleH+3); if (option.state & QStyle::State_Selected){ painter->setPen(option.palette.highlightedText().color()); } else { painter->setPen(option.palette.windowText().color()); } painter->setFont(option.font); painter->drawText(titleArea, Qt::AlignLeft, data.name); icon.paint(painter, drawArea.x(),drawArea.y(), titleH, titleH); } painter->restore(); } QSize BookmarksViewItemDelegate::sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const { LibraryModelData data = qvariant_cast(index.data()); if(data.isBookmark()){ LibraryModelData data = qvariant_cast(index.data(Qt::DisplayRole)); QPixmap pix(data.name); return QSize(qMin(widthH, pix.size().width()), heightH); } QRect r = option.fontMetrics.boundingRect(data.name); return QSize(r.width(),r.height()+6); } equalx-0.7.1/ui/widgetFind.ui000644 001750 001750 00000012545 12314604155 016306 0ustar00mihaimihai000000 000000 WidgetFind 0 0 650 33 0 0 Form 0 0 3 0 0 0 0 Qt::ClickFocus true background-color: rgba(255, 255, 255, 0); &Find: findEntry 175 0 false Find the previous occurance of the expression Find the previous occurance of the expression Previous true false Find the next occurance of the expression Find the next occurance of the expression Next false false true false Highlight all occurances of the expression Highlight all occurances of the expression Highlight &all :/resources/icons/menu/highlight.png:/resources/icons/menu/highlight.png true true false background-color: rgba(255, 255, 255, 0); &Match Case Qt::Horizontal QSizePolicy::MinimumExpanding 20 20 findCloseButton clicked() WidgetFind close() 621 22 324 22 equalx-0.7.1/resources/symbols/Accents/grave.png000644 001750 001750 00000000310 12314604155 022125 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME-:HIDAT8A 5ڰҋavPDRˬ>DV *fg30Ǐno Og~yRJ-F[6MIENDB`equalx-0.7.1/resources/icons/preferences/editor.png000644 001750 001750 00000002460 12314604155 022663 0ustar00mihaimihai000000 000000 PNG  IHDR DsBITO pHYsvv}ՂtEXtSoftwarewww.inkscape.org<^PLTEAAA[FsFV[ZX\[LB&[`a]abh`feagfhnlhmmjD<"tY:4 ٳ3|Ō1, vtn % .(=7&?5F<NG4WL&_XAbT'ec\kdHo_+yqR{i-xUt1|R{D}K}Bx)DRz:Tn04J1?_¦LŦEǭZȭXȲnʯX˫EϯGзfԽtֵJٶIMQDsT(tRNS %3@BKLRXYdhzx:IDATxڅnPDIMRhĊM}v/gtEh*,Jb)%sl3!>?)SR"aB.q\Kt$,5-$%bL "$吘 K N a\ D3؀9CM:@s$m`[(_%&[ޮܟC@WiyKyH=,~:OO\߽֟x1nA;l,kձ҉Z1'g.\aEtp;=C3ޚalFF;n5g4b2^6M(NPXjI sNBgZ\*ʹ++}A'jssoێxF!S~0rXTG'7z[1gayAÜ E [Uڂ7Yh.>|(Y Aexb.ZIENDB`equalx-0.7.1/resources/stylesheet.qss000644 001750 001750 00000004630 12314604155 020175 0ustar00mihaimihai000000 000000 /* Meaning of the string arguments */ /* %1 - text color */ /* %2 - text highlight color */ /* %3 - highlight color */ /* %4 - window color */ /* %5 - light color */ /* %6 - dark color */ /**************************/ /**** Equation Title ********/ /**************************/ QLineEdit#equationTitleWidget { background-color: %4; border:0px solid %6; color: %3; padding:3px; } QLineEdit#equationTitleWidget:hover { background-color: %4; border:1px solid %3; color: %3; } QLineEdit#equationTitleWidget:focus { background-color: white; border:1px solid %6; color: %1; } /**********************/ /**** Global CSS *******/ /**********************/ QSplitter::handle { width: 2px;height: 1px; } QSplitter::handle:hover { width: 2px;height: 1px; background-color: black; } QMainWindow::separator { width: 2px; height: 2px; } QMainWindow::separator:hover { width: 2px; height: 2px; background-color: black; } /****************************/ /**** Templates Panel *******/ /***************************/ QToolBar#templatesBar QWidget{ background-color: rgb(237, 237, 237); } QToolBar#templatesBar QTabWidget::pane { /* The tab widget frame */ border-top: 1px solid #C2C7CB; background-color: red; } QToolBar#templatesBar QTabWidget::tab-bar { left: 10px; /* move to the right by 5px */ background-color: blue; } /* Style the tab using the tab sub-control. Note that it reads QTabBar _not_ QTabWidget */ QToolBar#templatesBar QTabBar::tab{ min-width: 8ex; padding: 2px; padding-top:5px; border-color: #9B9B9B; border: 1px solid #C4C4C3; border-bottom-color: #C2C7CB; /* same as pane color */ } QToolBar#templatesBar QTabBar::tab:selected { background-color: white; border-bottom-color: #C2C7CB; /* same as the pane color */ } QToolBar#templatesBar QTabBar::tab:hover { background-color: white; border-bottom-color: #C2C7CB; /* same as the pane color */ } QToolBar#templatesBar QTabBar::tab:!selected{ background-color: #EDEDED; } QToolBar#templatesBar QPushButton { color: rgb(0, 0, 0); background-color: rgb(237, 237, 237); border: 1px solid rgb(182,182,182); padding: 5px; } QToolBar#templatesBar QPushButton:hover { color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); padding: 5px; } QToolBar#templatesBar QPushButton:pressed { color: rgb(0, 0, 0); background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(142, 142, 142, 255), stop:1 rgba(230, 230, 230, 255)); padding: 5px; } equalx-0.7.1/resources/symbols/Greek/nu.png000644 001750 001750 00000000305 12314604155 021124 0ustar00mihaimihai000000 000000 PNG  IHDR B'sRGBbKGD pHYs  tIME uEIDAT(I 3O+.'Z:$b[+m#@WXI͕ e*-9㌮_%N '<IENDB`equalx-0.7.1/src/MainWindow.cpp000644 001750 001750 00000126415 12314604155 016617 0ustar00mihaimihai000000 000000 /* * Copyright 2010 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "defines.h" #include "Util.h" #include "EquationView.h" #include "EquationTemplateWidget.h" #include "FileInfo.h" #include "LatexEditor.h" #include "Library/Library.h" #include "WidgetFind.h" #include "SymbolsPanel.h" #include "RenderEngine.h" #include "SearchLineEdit.h" #include "BookmarksPanel/DialogPreferencesBookmark.h" #include "DialogReplace.h" #include "DialogPreferences.h" #include "DialogAbout.h" #include "MainWindow.h" #include "ui_mainwindow.h" #include MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindowClass), mEquationView(0), mAutoUpdateTimer(), mSymbolsModel(0) { ui->setupUi(this); checkRequirements(); setWindowTitle(APP_FULL_NAME); mLatexEditor = ui->editEquation; mFindWidget = ui->findWidget; mDialogReplace = new DialogReplace(this); mDialogPreferences = new DialogPreferences(this); mDialogAbout = new DialogAbout(this); mDialogBookmark = new DialogPreferencesBookmark(this); mEquationData = new EqualX::FileInfo(this); mEquationView = new EquationView(this); mEquationView->setVisible(true); mEquationView->setAcceptDrops(true); renderModeButtonGroup = new QButtonGroup; renderModeButtonGroup->addButton(ui->renderModeDisplay, LATEX_ENV_MODE_DISPLAY); renderModeButtonGroup->addButton(ui->renderModeInline, LATEX_ENV_MODE_INLINE); renderModeButtonGroup->addButton(ui->renderModeAlign, LATEX_ENV_MODE_ALIGN); renderModeButtonGroup->addButton(ui->renderModeText, LATEX_ENV_MODE_TEXT); QStringList treeWidgetErrorsHeaderLabels; treeWidgetErrorsHeaderLabels.append(tr("Line")); treeWidgetErrorsHeaderLabels.append(tr("Message")); ui->treeWidgetErrors->setHeaderLabels(treeWidgetErrorsHeaderLabels); // this is the directory holding all files generated by the Render Engine QDir buildDir(QDir::tempPath()); buildDir.mkdir(APP_NAME); buildDir.cd(APP_NAME); mRenderer = new EqualX::RenderEngine; mRenderer->setBuildDir(buildDir.absolutePath()); mAnimationProgress = new QMovie(":/resources/icons/spinner.gif"); mAnimationProgress->setScaledSize(QSize(64,64)); /* TODO: add a search line edit to search for symbols mSearchLineEdit = new SearchLineEdit; mSearchLineEdit->setMaximumWidth(200); // mSearchLineEdit->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); QAction* searcherAction = ui->mainBar->addWidget(mSearchLineEdit); searcherAction->setVisible(true); QWidget* emptyToolBarWidget = new QWidget; emptyToolBarWidget->setMinimumWidth(0); emptyToolBarWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); ui->mainBar->insertWidget(searcherAction, emptyToolBarWidget)->setVisible(true); */ mLatexOutput = new QPlainTextEdit; mLatexOutput->setWindowTitle(tr("EqualX - LaTeX Output")); mLatexOutput->setWindowFlags(Qt::Tool); mLatexOutput->setReadOnly(true); mLatexOutput->setVisible(false); mLatexOutput->setLineWrapMode(QPlainTextEdit::NoWrap); ui->editPreamble->hide(); mFindWidget->hide(); mLatexEditor->setFocus(); ui->librarySidebar->setVisible(false); ui->equationArea->setWidget(mEquationView); mAutoUpdateTimer.setSingleShot(true); mExportActionsGroup = new QActionGroup(this); mExportActionsGroup->setExclusive(true); readSettings(); updateUIFromSettings(); setActions(); setSymbolsPanel(); setMathPanelTabsActions(); setSignals(); mLibrary = LibraryManager::Instance(); newEquation(); setCustomStyleSheets(); } MainWindow::~MainWindow() { delete ui; delete renderModeButtonGroup; delete mAnimationProgress; delete mRenderer; } void MainWindow::setActions() { ui->actionLibrary_BookmarkThisEquation->setEnabled(false); // actions on window ui->bookmarkAddButton->setDefaultAction(ui->actionLibrary_BookmarkThisEquation); ui->buttonNewEquation->setDefaultAction(ui->actionNew); ui->actionView_Refresh->setIconVisibleInMenu(true); // Set context menu actions on Equation QAction* copyEquationToClipoard = new QAction(QIcon::fromTheme("edit-copy", QIcon(":/resources/icons/menu/edit-copy.png")), tr("Copy"), this); copyEquationToClipoard->setIconVisibleInMenu(true); copyEquationToClipoard->setShortcut(QKeySequence(Qt::CTRL+Qt::ALT+Qt::Key_C)); // copy equation using CTRL+ALT+C connect(copyEquationToClipoard, SIGNAL(triggered()), this, SLOT(copyEquationToClipboard()) ); QAction* pasteEquationFromClipoard = new QAction(QIcon::fromTheme("edit-paste", QIcon(":/resources/icons/menu/edit-paste.png")), tr("Paste"), this); pasteEquationFromClipoard->setShortcut(QKeySequence(Qt::CTRL+Qt::ALT+Qt::Key_V)); // copy equation using CTRL+ALT+V connect(pasteEquationFromClipoard, SIGNAL(triggered()), this, SLOT(pasteEquationFromClipboard()) ); pasteEquationFromClipoard->setIconVisibleInMenu(true); QAction* actSep1 = new QAction(this); actSep1->setSeparator(true); QAction* actSep2 = new QAction(this); actSep2->setSeparator(true); QAction* actSep3 = new QAction(this); actSep3->setSeparator(true); ui->equationArea->addAction(ui->actionView_Refresh); ui->equationArea->addAction(actSep1); ui->equationArea->addAction(ui->actionLibrary_BookmarkThisEquation); // add the export types in context menu QAction* actExportTypes = new QAction("Export To..", this); ui->equationArea->addAction(actExportTypes); QMenu* menuExportTypes = new QMenu; QStringList fileTypes = mRenderer->fileTypes(); QString currentExportType = mDialogPreferences->currentExportType(); foreach(QString type, fileTypes){ QAction* actType = menuExportTypes->addAction(type.toUpper()); actType->setCheckable(true); actType->setData(type); mExportActionsGroup->addAction(actType); if(type.contains(currentExportType)){ actType->setChecked(true); } } actExportTypes->setMenu(menuExportTypes); ui->equationArea->addAction(actSep2); ui->equationArea->addAction(copyEquationToClipoard); ui->equationArea->addAction(pasteEquationFromClipoard); ui->equationArea->addAction(actSep3); ui->equationArea->addAction(ui->actionView_StyleToolbar); } void MainWindow::setSymbolsPanel() { if(mSymbolsModel) delete mSymbolsModel; mSymbolsModel = new QStandardItemModel; QSettings symsFile(QString("%1/symbols.ini").arg(SYMBOLS_PATH),QSettings::IniFormat); QStringList symsGroupsListName = symsFile.childGroups(); qDebug() << "INI Symbols File has "<< symsGroupsListName.size() << " groups"; int arraySize=0; for(int i=0; iid = i; symbolGroup->name = symsGroupsListName.at(i); //qDebug() << "Reading group ["<< symbolGroup->name<<"]"; symsFile.beginGroup(symbolGroup->name); arraySize = symsFile.beginReadArray("symbols"); LatexSymbol* symbol = new LatexSymbol[arraySize]; for(int j=0; jsymbols.append(&symbol[j]); QStandardItem *item = new QStandardItem(QIcon( QString("resources/symbols/%1/%2").arg(symbol[j].parent->name, symbol[j].icon)), symbol[j].latex); mSymbolsModel->appendRow(item); } symsFile.endArray(); ui->symbolsBar->appendSymbolsGroup(symbolGroup); // SymbolsPanel take ownership symsFile.endGroup(); } mLatexEditor->setModel(mSymbolsModel); } void MainWindow::addButtonToMathTabs(const QStringList &list, QWidget *tabWidget) { QHBoxLayout * tabLayout = (QHBoxLayout *)tabWidget->layout(); if(!tabLayout){ tabLayout = new QHBoxLayout; } EquationTemplateWidget *eqTemplate = new EquationTemplateWidget(list, tabWidget); connect(eqTemplate, SIGNAL(clicked(QString)), mLatexEditor, SLOT(replace(QString)) ); tabLayout->addWidget(eqTemplate); tabLayout->addStretch(0); tabLayout->setSpacing(0); tabLayout->setContentsMargins(0,0,0,0); tabWidget->setLayout(tabLayout); } void MainWindow::setMathPanelTabsActions() { // Algebra Tab QStringList listAlgebra; listAlgebra << ":/resources/icons/tabBar/algebra/eq01.png" << ":/resources/icons/tabBar/algebra/eq02.png" << ":/resources/icons/tabBar/algebra/eq03.png" << ":/resources/icons/tabBar/algebra/eq04.png" << ":/resources/icons/tabBar/algebra/eq05.png" << ":/resources/icons/tabBar/algebra/eq06.png" ; addButtonToMathTabs(listAlgebra,ui->templatesBar->widget(0) ); // Derivs Tab QStringList listDerivs; listDerivs << ":/resources/icons/tabBar/derivs/eq01.png" << ":/resources/icons/tabBar/derivs/eq02.png" << ":/resources/icons/tabBar/derivs/eq03.png" << ":/resources/icons/tabBar/derivs/eq04.png" << ":/resources/icons/tabBar/derivs/eq05.png" << ":/resources/icons/tabBar/derivs/eq06.png" ; addButtonToMathTabs(listDerivs, ui->templatesBar->widget(1)); // Stats Tab QStringList listStats; listStats << ":/resources/icons/tabBar/stats/eq01.png" << ":/resources/icons/tabBar/stats/eq02.png" << ":/resources/icons/tabBar/stats/eq03.png" << ":/resources/icons/tabBar/stats/eq04.png" << ":/resources/icons/tabBar/stats/eq05.png" << ":/resources/icons/tabBar/stats/eq06.png" << ":/resources/icons/tabBar/stats/eq07.png" ; addButtonToMathTabs(listStats, ui->templatesBar->widget(2)); // Matrix Tab QStringList listMatrix; listMatrix << ":/resources/icons/tabBar/matrix/eq01.png" << ":/resources/icons/tabBar/matrix/eq02.png" << ":/resources/icons/tabBar/matrix/eq03.png" << ":/resources/icons/tabBar/matrix/eq04.png"; addButtonToMathTabs(listMatrix, ui->templatesBar->widget(3)); // Sets Tab QStringList listSets; listSets << ":/resources/icons/tabBar/sets/eq01.png" << ":/resources/icons/tabBar/sets/eq02.png"; addButtonToMathTabs(listSets, ui->templatesBar->widget(4)); // Trig Tab QStringList listTrig; listTrig << ":/resources/icons/tabBar/trig/eq01.png" << ":/resources/icons/tabBar/trig/eq02.png" << ":/resources/icons/tabBar/trig/eq03.png" << ":/resources/icons/tabBar/trig/eq04.png"; addButtonToMathTabs(listTrig, ui->templatesBar->widget(5)); // Geometry Tab QStringList listGeometry; listGeometry << ":/resources/icons/tabBar/geometry/eq01.png" << ":/resources/icons/tabBar/geometry/eq02.png" << ":/resources/icons/tabBar/geometry/eq03.png" << ":/resources/icons/tabBar/geometry/eq04.png"; addButtonToMathTabs(listGeometry, ui->templatesBar->widget(6)); // Chemistry Tab QStringList listChemistry; listChemistry << ":/resources/icons/tabBar/chemistry/eq01.png" << ":/resources/icons/tabBar/chemistry/eq02.png" << ":/resources/icons/tabBar/chemistry/eq03.png" << ":/resources/icons/tabBar/chemistry/eq04.png" << ":/resources/icons/tabBar/chemistry/eq05.png"; addButtonToMathTabs(listChemistry, ui->templatesBar->widget(7)); // Physics Tab QStringList listPhysics; listPhysics << ":/resources/icons/tabBar/physics/eq01.png" << ":/resources/icons/tabBar/physics/eq02.png" << ":/resources/icons/tabBar/physics/eq03.png" << ":/resources/icons/tabBar/physics/eq04.png"; addButtonToMathTabs(listPhysics, ui->templatesBar->widget(8)); } void MainWindow::setSignals() { /* MainWindow */ // Menu Bar // File Menu connect(ui->actionNew, SIGNAL(triggered()), this, SLOT(newEquation()) ); connect(ui->actionOpen, SIGNAL(triggered()), this, SLOT(open()) ); connect(ui->actionSaveAs, SIGNAL(triggered()), this, SLOT(saveAs()) ); connect(ui->actionQuit, SIGNAL(triggered()), this, SLOT(close()) ); // Edit Menu connect(ui->actionEdit_Preferences, SIGNAL(triggered()), this, SLOT(onPreferences()) ); connect(ui->actionEdit_Delete, SIGNAL(triggered()), this, SLOT(onDeleteSelection()) ); // View Menu connect(ui->actionView_Refresh, SIGNAL(triggered()), this, SLOT(updateEquation()) ); connect(ui->actionView_LatexOutput, SIGNAL(triggered()), this, SLOT(showLatexOutputWindow()) ); // Search Menu connect(ui->actionFind, SIGNAL(triggered()), this, SLOT(showFindDialog())); connect(ui->actionFind_Next, SIGNAL(triggered()), mLatexEditor, SLOT(findNext()) ); connect(ui->actionFind_Previous, SIGNAL(triggered()), mLatexEditor, SLOT(findPrevious()) ); connect(ui->actionReplace, SIGNAL(triggered()), this, SLOT(showReplaceDialog()) ); connect(mFindWidget, SIGNAL(closing()), mLatexEditor, SLOT(clearSelections()) ); connect(mDialogReplace, SIGNAL(closing()), mLatexEditor, SLOT(clearSelections()) ); // Library Menu connect(ui->actionLibrary_ShowBookmarks, SIGNAL(triggered()), this, SLOT(showBookmarks()) ); connect(ui->actionLibrary_BookmarkThisEquation, SIGNAL(triggered()), this, SLOT(onBookmarkAdd()) ); //--- connect(ui->actionLibrary_ShowHistory, SIGNAL(triggered()), this, SLOT(showHistory()) ); connect(ui->actionLibrary_ClearAllHistory, SIGNAL(triggered()), LibraryManager::Instance(), SLOT(clearHistory()) ); // Help Menu connect(ui->actionHelp_About, SIGNAL(triggered()), this, SLOT(onAbout()) ); //connect(ui->actionAboutQt, SIGNAL(triggered()), qApp, SLOT(aboutQt()) ); // GUI connect(mLatexEditor, SIGNAL(textChanged()), this, SLOT(equationChanged()) ); connect(ui->editPreamble, SIGNAL(blockCountChanged(int)), mLatexEditor, SLOT(setStartCountingBlocks(int)) ); connect(ui->editPreamble, SIGNAL(textChanged()), this, SLOT(equationChanged()) ); connect(ui->renderButton, SIGNAL(released()), this, SLOT(updateEquation()) ); connect(renderModeButtonGroup, SIGNAL(buttonClicked(int)), this, SLOT(equationChanged()) ); connect(ui->equationArea, SIGNAL(dropped(QString)), this, SLOT(loadEquation(QString)) ); connect(ui->colorChooser, SIGNAL(fgColorChanged(QColor)), this, SLOT(equationChanged()) ); connect(ui->colorChooser, SIGNAL(bgColorChanged(QColor)), this, SLOT(equationChanged()) ); connect(ui->fontSizeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(equationChanged()) ); // Find widget connect(mFindWidget, SIGNAL(changedFindText(QString)), this, SLOT(onFindTextChanged(QString)) ); connect(mFindWidget, SIGNAL(find(QString,QTextDocument::FindFlags)), mLatexEditor, SLOT(find(QString,QTextDocument::FindFlags)) ); connect(mFindWidget, SIGNAL(findAll(QString,QTextDocument::FindFlags)), mLatexEditor, SLOT(findAll(QString,QTextDocument::FindFlags)) ); // Replace Dialog connect(mDialogReplace, SIGNAL(find(QString,QTextDocument::FindFlags)), mLatexEditor, SLOT(findAll(QString,QTextDocument::FindFlags)) ); connect(mDialogReplace, SIGNAL(replace(QString)), mLatexEditor, SLOT(replace(QString)) ); connect(mDialogReplace, SIGNAL(replaceAll(QString)), mLatexEditor, SLOT(replaceAll(QString)) ); // Symbols Toolbar connect(ui->symbolsBar, SIGNAL(triggered(LatexSymbol*)), this, SLOT(insertSymbol(LatexSymbol*)) ); // SearchLineEdit // MainToolbar // History Panel connect(ui->historyWidget, SIGNAL(activated(LibraryModelData)), this, SLOT(onActivatedHistoryRow(LibraryModelData)) ); // Bookmarks Panel connect(ui->bookmarksWidget, SIGNAL(activated(int)), this, SLOT(onActivatedBookmark(int)) ); // Other connect(mDialogPreferences->renderManualUpdate, SIGNAL(toggled(bool)), ui->renderButton, SLOT(setVisible(bool)) ); connect(mRenderer, SIGNAL(started()), this, SLOT(renderStarted()) ); connect(mRenderer, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(renderFinished(int,QProcess::ExitStatus)) ); connect(mRenderer, SIGNAL(error(QProcess::ProcessError)), this, SLOT(renderError(QProcess::ProcessError)) ); connect(ui->fontSizeComboBox, SIGNAL(currentIndexChanged(int)) , mEquationData, SLOT(setFontSize(int)) ); connect(ui->colorChooser, SIGNAL(fgColorChanged(QColor)), mEquationData, SLOT(setForegroundColor(QColor)) ); connect(ui->colorChooser, SIGNAL(bgColorChanged(QColor)), mEquationData, SLOT(setBackgroundColor(QColor)) ); connect(renderModeButtonGroup, SIGNAL(buttonClicked(int)), mEquationData, SLOT(setEnvironment(int)) ); connect(&mAutoUpdateTimer, SIGNAL(timeout()), this, SLOT(updateEquation()) ); connect(mExportActionsGroup, SIGNAL(triggered(QAction*)), mDialogPreferences, SLOT(setCurrentExportType(QAction*)) ); connect(mExportActionsGroup, SIGNAL(triggered(QAction*)), this, SLOT(updateEquation()) ); } void MainWindow::setCustomStyleSheets() { } void MainWindow::closeEvent(QCloseEvent *event) { writeSettings(); QMainWindow::closeEvent(event); } void MainWindow::showEquation() { const QMap *errors = mRenderer->latexErrors(); mLatexOutput->setPlainText(mRenderer->latexLog()); bool latexHasErrors = !errors->isEmpty(); if(!mLatexEditor->hasFocus()) mLatexEditor->setFocus(); if(!latexHasErrors){ // do not try to parse the string for errors when there are none mLatexEditor->selectLines(*errors); // clears any highlightings ui->editPreamble->selectLines(*errors); // clears any highlightings ui->stackedWidget->setCurrentIndex(0); mEquationView->setPixmap( mRenderer->file("png") ); mEquationView->setExportSource(mRenderer->file(mDialogPreferences->exportCBox->currentText())); ui->actionLibrary_BookmarkThisEquation->setEnabled(true); ui->actionSaveAs->setEnabled(true); // add equation to history if(!mLibrary->addHistoryItem(ui->equationTitleWidget->text(), mRenderer->file("png"))) QMessageBox::critical(this, "Error - EqualX", QString("Failed to add equation to history. %1").arg(mLibrary->errorStr()) ); } else{// show the Errors page ui->stackedWidget->setCurrentIndex(1); QMapIterator i(*errors); QList items; QStringList row; while (i.hasNext()) { i.next(); row.clear(); row << QString("%1").arg(i.key())<< i.value(); items.append(new QTreeWidgetItem((QTreeWidget*)0, row)); } ui->treeWidgetErrors->clear(); ui->treeWidgetErrors->insertTopLevelItems(0, items); mLatexEditor->selectLines(*errors); ui->editPreamble->selectLines(*errors); ui->actionLibrary_BookmarkThisEquation->setEnabled(false); ui->actionSaveAs->setEnabled(false); } } void MainWindow::newEquation() { QFile f(":/resources/templates/template-preamble.tex"); f.open(QIODevice::ReadOnly); QString preambleContent = f.readAll(); f.close(); ui->editPreamble->setPlainText(preambleContent); mLatexEditor->clear(); mEquationView->clear(); ui->actionLibrary_BookmarkThisEquation->setEnabled(false); updateUIFromSettings(); } void MainWindow::open() { if( curSaveDir.isEmpty() ) curSaveDir = QDir::homePath(); QString filter = mRenderer->fileTypes().join("|"); filter.replace("|", ");;(*."); filter = "(*."+filter+")"; QString allTypesFilter = mRenderer->fileTypes().join(" *."); filter = tr("All Supported files (*.")+allTypesFilter+");;"+filter; QString fileName = QFileDialog::getOpenFileName(this, tr("Open Equation"), curSaveDir, filter); QFileInfo fi(fileName); curSaveDir = fi.canonicalPath(); if (!fileName.isEmpty()) loadEquation(fileName); } bool MainWindow::saveAs() { if( curSaveDir.isEmpty() ) curSaveDir = QDir::homePath(); QString filter = mRenderer->fileTypes().join(";;"); filter.replace(";;", ");;(*."); filter = "(*."+filter+")"; QString selectedFilter; selectedFilter = "(*."+ mExportActionsGroup->checkedAction()->data().toString() +")"; QString fileName = QFileDialog::getSaveFileName(0, tr("Save Equation as..."), curSaveDir, filter, &selectedFilter ); if (fileName.isEmpty()) return false; QFileInfo fi(fileName); curSaveDir = fi.canonicalPath(); int s = selectedFilter.length()-3; QString fileExt = selectedFilter.mid(2,s); fileName+=fileExt; return saveEquation(fileName); } void MainWindow::preferencesAccepted() { writeSettings(); updateUIFromSettings(); } bool MainWindow::saveEquation(const QString &fileName) { qDebug() << "[MainWindow::saveEquation] Saving equation to: " << fileName; QString ext = fileName.section(".", -1); mRenderer->run(ext); QFile::remove(fileName); QFile::copy(mRenderer->file(ext), fileName); return true; } void MainWindow::onDeleteSelection() { mLatexEditor->textCursor().removeSelectedText(); } void MainWindow::onPreferences() { if(mDialogPreferences->exec()==QDialog::Accepted){ preferencesAccepted(); } } void MainWindow::onAbout() { mDialogAbout->exec(); } // read all settings from the Settings File and update preferencesDialog void MainWindow::readSettings() { QSettings settings(SETTINGS_DIR, SETTINGS_FILE); settings.beginGroup("CONVERTERS"); QString pdfLatexPath = settings.value("pdflatex", DEFAULT_PDFLATEX ).toString(); QString pdfCairoPath = settings.value("pdftocairo", DEFAULT_PDFCAIRO ).toString(); QString gsPath = settings.value("gs", DEFAULT_GS ).toString(); mDialogPreferences->pdfLatexEdit->setText(pdfLatexPath); mDialogPreferences->pdfCairoEdit->setText(pdfCairoPath); mDialogPreferences->gsEdit->setText(gsPath); settings.endGroup(); EqualX::Converter c; c.path = pdfCairoPath; c.opts = "-png -transp -singlefile %1 %2"; mRenderer->addConverter("png", c); EqualX::Converter c2; c2.path = pdfCairoPath; c2.opts = "-svg %1 %2.svg"; mRenderer->addConverter("svg", c2); EqualX::Converter c3; c3.path = pdfCairoPath; c3.opts = "-jpeg -singlefile %1 %2"; mRenderer->addConverter("jpg", c3); EqualX::Converter c4; c4.path = pdfCairoPath; c4.opts = "-ps -level2 %1 %2.ps"; //! need level 2 to insert xmp metadata mRenderer->addConverter("ps", c4); EqualX::Converter c5; c5.path = pdfCairoPath; c5.opts = "-eps %1 %2.eps"; mRenderer->addConverter("eps", c5); mDialogPreferences->exportCBox->addItems(mRenderer->fileTypes()); settings.beginGroup("MAIN"); mDialogPreferences->checkRememberLayout->setChecked( settings.value("remember_layout", DEFAULT_REMEMBER_LAYOUT).toBool() ); if( mDialogPreferences->checkRememberLayout->isChecked() ){ ui->actionView_MainToolbar->setChecked( settings.value("mainbar", DEFAULT_SHOW_MAIN_TOOLBAR).toBool() ); ui->actionView_SymbolsToolbar->setChecked( settings.value("panel_symbols", DEFAULT_SHOW_PANEL_SYMBOLS).toBool() ); ui->actionView_TemplatesToolbar->setChecked( settings.value("panel_templates", DEFAULT_SHOW_PANEL_TEMPLATES).toBool() ); ui->actionView_StyleToolbar->setChecked(settings.value("panel_properties", DEFAULT_SHOW_PANEL_PROPERTIES).toBool() ); ui->actionView_Sidebar->setChecked(settings.value("panel_sidebar", DEFAULT_SHOW_PANEL_SIDEBAR).toBool() ); QPoint pos = settings.value("position", QPoint(DEFAULT_WINDOW_X, DEFAULT_WINDOW_Y)).toPoint(); QSize size = settings.value("size", QSize(DEFAULT_WINDOW_WIDTH, DEFAULT_WINDOW_HEIGHT)).toSize(); resize(size); move(pos); } QString currentExportType = settings.value("export_type", DEFAULT_EXPORT_TYPE).toString() ; mDialogPreferences->setCurrentExportType(currentExportType); settings.endGroup(); settings.beginGroup("EDITOR"); mDialogPreferences->setCurrentFont(settings.value("font", DEFAULT_FONT).toString()); mDialogPreferences->checkSyntaxHighligthing->setChecked(settings.value("highlighting", DEFAULT_HIGHLIGHTING ).toBool()); mDialogPreferences->checkTextWrapping->setChecked( settings.value("textwrap", DEFAULT_WRAPPING).toBool() ); mDialogPreferences->groupBoxCompletion->setChecked( settings.value("completion", DEFAULT_COMPLETION).toBool() ); mDialogPreferences->checkSensitiveCompletion->setChecked( settings.value("case_sensitive_completion", DEFAULT_COMPLETION).toBool() ); settings.endGroup(); settings.beginGroup("PREVIEW"); mDialogPreferences->renderAutoUpdate->setChecked( settings.value("updateAuto", DEFAULT_UPDATE_AUTO ).toBool() ); mDialogPreferences->renderManualUpdate->setChecked(! settings.value("updateAuto", DEFAULT_UPDATE_AUTO ).toBool() ); mDialogPreferences->spinUpdateTime->setValue(settings.value("updateTime", DEFAULT_UPDATE_TIME ).toInt()); mDialogPreferences->bgPreviewColor->setColorName(settings.value("bgcolor", DEFAULT_PREVIEW_BG).toString() ); mDialogPreferences->fgColorPicker->setColorName( settings.value("render_fgcolor", DEFAULT_RENDER_FG).toString() ); mDialogPreferences->bgColorPicker->setColorName( settings.value("render_bgcolor", DEFAULT_RENDER_BG).toString() ); mDialogPreferences->renderFontSize->setCurrentIndex( settings.value("render_fontsize", DEFAULT_RENDER_FONT_SIZE).toInt() ); switch(settings.value("render_mode", DEFAULT_RENDER_MODE).toInt()){ case LATEX_ENV_MODE_INLINE: mDialogPreferences->renderModeInline->setChecked(true); break; case LATEX_ENV_MODE_ALIGN: mDialogPreferences->renderModeAlign->setChecked(true); break; case LATEX_ENV_MODE_TEXT: mDialogPreferences->renderModeText->setChecked(true); break; default: case LATEX_ENV_MODE_DISPLAY: mDialogPreferences->renderModeDisplay->setChecked(true); break; } settings.endGroup(); } void MainWindow::renderStarted() { ui->stackedWidget->setCurrentIndex(0); mEquationView->setMovie(mAnimationProgress); mAnimationProgress->start(); QApplication::setOverrideCursor(Qt::BusyCursor); } void MainWindow::renderFinished( int exitCode, QProcess::ExitStatus exitStatus) { qDebug() << "[Render Finished] exitCode:"<stop(); setEnabled(true); QApplication::restoreOverrideCursor(); if(exitCode!=0 || exitStatus != QProcess::NormalExit){ QString processErrStr; if(mRenderer->currentProcess()){ #if UNIX_PLATFORM #if QT_VERSION >= 0x050000 processErrStr = mRenderer->currentProcess()->arguments().join(";"); #endif #elif WIN_PLATFORM #if QT_VERSION >= 0x040700 processErrStr = mRenderer->currentProcess()->nativeArguments(); #endif #endif } QMessageBox::critical(this, "Error - EqualX", QString("Command failed to run. %1").arg(processErrStr) ); mEquationView->clear(); return; } showEquation(); } void MainWindow::renderError(QProcess::ProcessError /*e*/) { mAnimationProgress->stop(); mEquationView->clear(); setEnabled(true); QApplication::restoreOverrideCursor(); QString processErrStr; if(mRenderer->currentProcess()){ #if UNIX_PLATFORM #if QT_VERSION >= 0x050000 processErrStr = mRenderer->currentProcess()->arguments().join(";"); #endif #elif WIN_PLATFORM #if QT_VERSION >= 0x040700 processErrStr = mRenderer->currentProcess()->nativeArguments(); #endif #endif } QMessageBox::critical(this, "Error - EqualX", QString("Process failed. %1").arg(processErrStr) ); } void MainWindow::updateEquation() { qDebug() << "========== Update Equation ============="; mEquationView->clear(); if(mLatexEditor->toPlainText().isEmpty()){ // clear the view and do not launch renderer return; } setEnabled(false); mEquationData->setSelections(mLatexEditor->getSelections()); mEquationData->setPreamble(ui->editPreamble->toPlainText()); mEquationData->setEquation(mLatexEditor->toPlainText()); QStringList exportTypes; exportTypes << "png" << mExportActionsGroup->checkedAction()->data().toString(); mRenderer->setFileInfo(*mEquationData); mRenderer->run(exportTypes); mLatexEditor->setFocus(); } void MainWindow::updateUIFromSettings() { mLatexEditor->selectAll(); mLatexEditor->setHighLighting( mDialogPreferences->checkSyntaxHighligthing->isChecked() ); mLatexEditor->setCompletion( mDialogPreferences->groupBoxCompletion->isChecked() ); mLatexEditor->setCompletionSensitive( mDialogPreferences->checkSensitiveCompletion->isChecked() ); mLatexEditor->setFont(mDialogPreferences->getFont()); ui->editPreamble->setFont(mDialogPreferences->getFont()); if( mDialogPreferences->checkTextWrapping->isChecked() ) mLatexEditor->setLineWrapMode(QPlainTextEdit::WidgetWidth); else mLatexEditor->setLineWrapMode(QPlainTextEdit::NoWrap); ui->renderButton->setVisible( mDialogPreferences->renderManualUpdate->isChecked() ); QColor previewCol = mDialogPreferences->bgPreviewColor->getColor(); QString previewStyleSheet; if(previewCol.alpha()!=0) previewStyleSheet = QString("QScrollArea {background-color: %1} QLabel {background-color: %1}").arg(previewCol.name()); ui->equationArea->setStyleSheet( previewStyleSheet ); ui->fontSizeComboBox->setCurrentIndex( mDialogPreferences->renderFontSize->currentIndex() ); ui->colorChooser->setFgColor( mDialogPreferences->fgColorPicker->getColorName() ); ui->colorChooser->setBgColor( mDialogPreferences->bgColorPicker->getColorName() ); switch(mDialogPreferences->renderMode()){ case LATEX_ENV_MODE_INLINE: ui->renderModeInline->setChecked(true); break; case LATEX_ENV_MODE_ALIGN: ui->renderModeAlign->setChecked(true); break; case LATEX_ENV_MODE_TEXT: ui->renderModeText->setChecked(true); break; default: case LATEX_ENV_MODE_DISPLAY: ui->renderModeDisplay->setChecked(true); break; } mAutoUpdateTimer.setInterval(mDialogPreferences->spinUpdateTime->value()); mRenderer->setPDFLatex(mDialogPreferences->pdfLatexEdit->text()); mRenderer->setGS(mDialogPreferences->gsEdit->text()); QString currentExportType = mDialogPreferences->currentExportType(); foreach(QAction* act, mExportActionsGroup->actions()){ if(act->data().toString().contains(currentExportType, Qt::CaseInsensitive)){ act->setChecked(true); } } } // read all settings from preferencesDialog and write them to the Settings File void MainWindow::writeSettings() { QSettings settings(SETTINGS_DIR, SETTINGS_FILE); settings.beginGroup("MAIN"); settings.setValue("remember_layout", mDialogPreferences->checkRememberLayout->isChecked() ); settings.setValue("position", pos() ); settings.setValue("size", size()); settings.setValue("mainbar", ui->mainBar->isVisible() ); settings.setValue("panel_properties", ui->renderBar->isVisible() ); settings.setValue("panel_symbols", ui->symbolsBar->isVisible() ); settings.setValue("panel_templates", ui->templatesBar->isVisible() ); settings.setValue("panel_sidebar", ui->librarySidebar->isVisible() ); settings.setValue("export_type", mDialogPreferences->currentExportType() ); settings.endGroup(); settings.beginGroup("EDITOR"); settings.setValue("font", mDialogPreferences->getFont().toString()); settings.setValue("highlighting", mDialogPreferences->checkSyntaxHighligthing->isChecked() ); settings.setValue("textwrap", mDialogPreferences->checkTextWrapping->isChecked() ); settings.setValue("completion", mDialogPreferences->groupBoxCompletion->isChecked() ); settings.setValue("case_sensitive_completion", mDialogPreferences->checkSensitiveCompletion->isChecked() ); settings.endGroup(); settings.beginGroup("PREVIEW"); settings.setValue("updateAuto", mDialogPreferences->renderAutoUpdate->isChecked() ); settings.setValue("updateTime", mDialogPreferences->spinUpdateTime->value() ); settings.setValue("bgcolor", mDialogPreferences->bgPreviewColor->getColorName() ); settings.setValue("render_fgcolor", mDialogPreferences->fgColorPicker->getColorName() ); settings.setValue("render_bgcolor", mDialogPreferences->bgColorPicker->getColorName() ); settings.setValue("render_fontsize", mDialogPreferences->renderFontSize->currentIndex() ); settings.setValue("LATEX_ENV_MODE", mDialogPreferences->renderMode() ); settings.endGroup(); settings.beginGroup("CONVERTERS"); settings.setValue("pdflatex", mDialogPreferences->pdfLatexEdit->text() ); settings.setValue("pdfcairo", mDialogPreferences->pdfCairoEdit->text() ); settings.setValue("gs", mDialogPreferences->gsEdit->text() ); settings.endGroup(); } void MainWindow::equationChanged() { mCurrentBookmark.clear(); ui->bookmarkAddButton->setIcon(QIcon("://resources/icons/menu/bookmark.png")); ui->bookmarkAddButton->setToolTip(tr("Bookmark this equation")); if(mDialogPreferences->renderAutoUpdate->isChecked()) mAutoUpdateTimer.start(); } void MainWindow::onFindTextChanged(const QString &exp) { // if we have a expression to search bool findable = (! exp.isEmpty()) && !exp.isNull(); // Enable/Disable widgets from Search Menu accordingly ui->actionFind_Next->setEnabled(findable); ui->actionFind_Previous->setEnabled(findable); mLatexEditor->setTextCursor( QTextCursor(mLatexEditor->document()) ); } void MainWindow::showFindDialog() { mFindWidget->setFindExpr( mLatexEditor->selectedText() ); mFindWidget->show(); mLatexEditor->setTextCursor( QTextCursor(mLatexEditor->document()) ); } void MainWindow::showReplaceDialog() { mDialogReplace->setFindExpr( mLatexEditor->selectedText() ); mDialogReplace->show(); mLatexEditor->setTextCursor( QTextCursor(mLatexEditor->document()) ); } void MainWindow::showLatexOutputWindow() const { mLatexOutput->setVisible(!mLatexOutput->isVisible()); mLatexOutput->resize(500, 400); } void MainWindow::insertSymbol(LatexSymbol *symbol) { mLatexEditor->insertPlainText(symbol->latex); } void MainWindow::copyEquationToClipboard() { QClipboard *clipboard = QApplication::clipboard(); QList urls; urls.append( QUrl::fromLocalFile(mEquationView->exportSource()) ); QMimeData *mimeData = new QMimeData(); mimeData->setUrls(urls); /* special handling case for nautilus */ QString urlForNautilus("copy\nFile://"); urlForNautilus.append(mEquationView->exportSource()); mimeData->setData("x-special/gnome-copied-files", urlForNautilus.toLatin1()); clipboard->setMimeData(mimeData); } void MainWindow::pasteEquationFromClipboard() { QClipboard *clipboard = QApplication::clipboard(); const QMimeData *mimeData = clipboard->mimeData(); if(!mimeData) return; if(mimeData->hasUrls()){ QUrl url = mimeData->urls().at(0); if(!url.isLocalFile()) return; QString filename = url.toLocalFile(); loadEquation(filename); } } void MainWindow::onActivatedHistoryRow(const LibraryModelData &row) { loadEquation(row.name); } void MainWindow::onActivatedBookmark(int bookmarkId) { Bookmark b = mLibrary->getBookmark(bookmarkId); ui->equationTitleWidget->setText(b.title); loadEquation(b.filePath); mCurrentBookmark = b; ui->bookmarkAddButton->setIcon(QIcon("://resources/icons/menu/bookmarked.png")); ui->bookmarkAddButton->setToolTip(tr("Edit bookmark")); } void MainWindow::onBookmarkAdd() { if(!mCurrentBookmark.isValid()){ // bookmark is not in library mCurrentBookmark.title = ui->equationTitleWidget->text(); mCurrentBookmark.description=""; mCurrentBookmark.filePath = mRenderer->file("png"); // add the bookmark on the root item (meaning is unsorted) mCurrentBookmark.id = mLibrary->addBookmark(mCurrentBookmark); } else { // bookmark exists in library, we change its properties mDialogBookmark->setTitle(mCurrentBookmark.title); mDialogBookmark->setDescrition(mCurrentBookmark.description); mDialogBookmark->setParentFolder(mCurrentBookmark.idparent); if(mDialogBookmark->exec()==QDialog::Accepted){ int parentId = mDialogBookmark->parentFolder(); mCurrentBookmark.title = mDialogBookmark->title(); mCurrentBookmark.description=mDialogBookmark->description(); mLibrary->updateBookmark(mCurrentBookmark); if(parentId != mCurrentBookmark.idparent){ // if parent changed mLibrary->moveBookmark(mCurrentBookmark.id, parentId); mCurrentBookmark.idparent = parentId; } } } ui->bookmarkAddButton->setIcon(QIcon("://resources/icons/menu/bookmarked.png")); ui->bookmarkAddButton->setToolTip(tr("Edit bookmark")); } void MainWindow::showBookmarks() { ui->librarySidebar->setVisible(true); ui->libraryTabWidget->setCurrentIndex(0); } void MainWindow::showHistory() { ui->librarySidebar->setVisible(true); ui->libraryTabWidget->setCurrentIndex(1); } void MainWindow::loadEquation(const QString &fileName) { qDebug() << "[MainWindow::loadEquation] Loading file:"<< fileName; bool status = EqualX::File::fetchInfo(fileName, mEquationData); if(!status){ QMessageBox::warning(this, APP_NAME, tr("Can not load file: %1.\n" "Are you sure this file was created with EqualX?").arg(fileName), QMessageBox::Ok); return; } mLatexEditor->setPlainText(mEquationData->equation()); ui->editPreamble->setPlainText(mEquationData->preamble()); ui->colorChooser->setFgColor(mEquationData->fgColor()); ui->colorChooser->setBgColor(mEquationData->bgColor()); ui->fontSizeComboBox->setCurrentIndex(mEquationData->fontSize()); switch(mEquationData->environment()){ case LATEX_ENV_MODE_INLINE: ui->renderModeInline->setChecked(true); break; case LATEX_ENV_MODE_ALIGN: ui->renderModeAlign->setChecked(true); break; case LATEX_ENV_MODE_TEXT: ui->renderModeText->setChecked(true); break; default: case LATEX_ENV_MODE_DISPLAY: ui->renderModeDisplay->setChecked(true); break; } mLatexEditor->textCursor().clearSelection(); ui->editPreamble->textCursor().clearSelection(); if(!mAutoUpdateTimer.isActive()) updateEquation(); } QString MainWindow::strippedName(const QString &fullFileName) { return QFileInfo(fullFileName).fileName(); } void MainWindow::checkRequirements() { bool reqsAreMeet = true; bool checkPdfLatex, checkPdfCairo, checkGS; QString reqMessage = tr("EqualX can not find the applications it needs.\n" "You can set these from Edit->Preferences->Advanced." ); QSettings settings(SETTINGS_DIR, SETTINGS_FILE); settings.beginGroup("CONVERTERS"); QString pdfLatexPath = settings.value("pdflatex", DEFAULT_PDFLATEX ).toString(); QString pdfCairoPath = settings.value("pdftocairo", DEFAULT_PDFCAIRO ).toString(); QString gsPath = settings.value("gs", DEFAULT_GS ).toString(); // check for pdflatex checkPdfLatex = QFile::exists(pdfLatexPath); // check for pdftocairo checkPdfCairo = QFile::exists(pdfCairoPath); // check for ghostscript checkGS = QFile::exists(gsPath); // Requirements are meet if all checks are true reqsAreMeet = checkPdfLatex && checkPdfCairo && checkGS; if(reqsAreMeet) return ; // search MikTex in Path environment variable QString pathEnv(qgetenv("Path")); QStringList pathsList = pathEnv.split(";"); QString MikTexPath; foreach(QString path, pathsList){ if(path.contains("MikTex", Qt::CaseInsensitive)){ MikTexPath=path; break; } } qDebug() << "Found Miktex at: " << MikTexPath; pdfLatexPath = QDir::toNativeSeparators(MikTexPath+"pdflatex.exe"); gsPath = QDir::toNativeSeparators(MikTexPath+"mgs.exe"); //pdfCairoPath = QDir::toNativeSeparators("pdftocairo.exe"); settings.setValue("pdflatex", pdfLatexPath); settings.setValue("pdftocairo", pdfCairoPath); settings.setValue("gs", gsPath); settings.endGroup(); checkPdfLatex = QFile::exists(pdfLatexPath); checkGS = QFile::exists(gsPath); checkPdfCairo = QFile::exists(pdfCairoPath); if(!(checkPdfLatex && checkPdfCairo && checkGS)){ QMessageBox::critical(this, tr("Error - EqualX"), reqMessage, QMessageBox::Ok); } } equalx-0.7.1/resources/symbols/Integrals/intop.png000644 001750 001750 00000000310 12314604155 022522 0ustar00mihaimihai000000 000000 PNG  IHDR<sRGBbKGD pHYs  tIME(HIDAT81 s'AYR(uhۦuvҌC/"֕ V.I()B gIENDB`equalx-0.7.1/resources/icons/tabBar/trig/eq04.png000644 001750 001750 00000001536 12314604155 022010 0ustar00mihaimihai000000 000000 PNG  IHDR8ys5 pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;)tEXtLatex\left(\frac{\pi}{2}-\theta \right )]{tEXtResolution116-'JIDATX͘q0 @_}@nl$T##TNs7;B k INgi@A@g5[l$@aᙰ^puPy_8?-_FiO)% P,$ol?W{3=:0c%p|e1 Pk$G]N{~B&&^4W.dnaEXќ" $GZ" Qz8O5agNt.w's 8cMx6]q IpeK2 3%,cE2ug-Hp#l̻ۀ1nRr{UIENDB`equalx-0.7.1/resources/icons/menu/edit-undo.png000644 001750 001750 00000002406 12314604155 021730 0ustar00mihaimihai000000 000000 PNG  IHDRĴl;bKGDC pHYs oyxIDAT8˵MlTUssga)R*ZL0DX`\hB4Ѩ w,th ʊ\h@h *R- ;?. )KNr7O9OE%!iSsȳL֧hN&\eMO ڼ& ^ :n-]jï5 I Xsm@ݨOm_V"Mdf#x]X[f`R9b@(}y݆]ũ2{erZs0/y<;8^.|>wbp/۟޸sע U4NcDaYa,씧-z_;rI[okwo;KE \IH %3 %RUN+@wv@ƶ;X}/E T cŒ!$ @hQ~[}cLy_v /gkSy{y%lF(@(.!0ǃ"%<&@4%otpt-fP>@qNF.c"8`{(|p! /kaX,;l ~Vi%*4@ A>\ǃ!)9.8 nJڃ^[ I _ °fKU10GQNTf m@iN@d0pV9X8jL3V{qɓ;ps`zU2B&%{6Nrgv1;tQtjDȞ1]vj>3ۂ D{<.B , S7KA+Brc?=2| {ndO~|:^ 7>찪3pB!';`'(#@JIENDB`equalx-0.7.1/include/HLSelections.h000644 001750 001750 00000001704 12314604155 017371 0ustar00mihaimihai000000 000000 /* * Copyright 2013 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef HLSELECTIONS_H #define HLSELECTIONS_H #include struct SelectionIndex{ int start; int end; }; typedef QList HLSelections; #endif // HLSELECTIONS_H equalx-0.7.1/include/RenderEngine.h000644 001750 001750 00000013514 12314604155 017404 0ustar00mihaimihai000000 000000 /* This file RenderEngine.h is part of the EqualX project https://launchpad.net/equalx * Copyright (C) 2013 Mihai Niculescu * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ #ifndef RENDERENGINE_H #define RENDERENGINE_H #include #include #include #include #include #include #include #include "defines.h" #include "File.h" namespace EqualX{ /* * Converter: * opts - must include the input and output file name (as QString arg() identifieries: %1 - as input file %2 - as output file) */ struct Converter{ QString path; // path to the executable QString opts; // options to pass to the executable - must include %1 - input file, %2 - output file }; typedef QMap ConvertersList; // maps the export filetype of the converter to a converter settings typedef QMapIterator ConvertersListIterator; typedef QMap ErrorsList; // maps an error line number with an error string typedef QMapIterator ErrorsListIterator; // this class does... see RenderEngine::run() class RenderEngine : public QObject { Q_OBJECT public: explicit RenderEngine(QObject *parent = 0); ~RenderEngine(); // returns full path to the build directory, including the last directory separator // i.e: on linux it returns: /tmp/equalx/ QString buildDir() const; EqualX::ConvertersList converters() const; static bool isRunning(); QString latexLog() const; const EqualX::ErrorsList* latexErrors() const; // return parsed latex errors mapped by line number and error string // returns full path to a generated file based on its file extension (without the prefixed dot .) QString file(const QString& type) const; //! the string is empty if the file wasnt generated or if there's no converter for this type QStringList fileTypes() const; // a list of file extensions (without .) that this Engine can convert to /* build directory is the place to save all generated files * NOTE: the directory must exist and must have write permissions */ void setBuildDir(const QString& dir); void setFileInfo(const EqualX::FileInfo& info); // only registers the converters, do not run them void addConverter(const QString& type, const EqualX::Converter& converter); // do not add pdflatex or gs void registerConverters(const EqualX::ConvertersList& converters);//! pdflatex and gs must not be in this list void setPDFLatex(const QString& path); void setGS(const QString& path); /* Description of RenderEngine::run() * - generates a .xmpi file to be used by XMP (EqualX metadata) * - generates a latex file * - generate another latex file (latex-crop) for cropping the PDF (created previously by pdfLatex) and include the generated XMP file * - launches a list of applications (converters) on the output of pdfLatex (PDF file) * * NB: The order of starting the converters: * 1. runs pdfLatex on the generated latex file * 2. launch gs to compute the bounding box of PDF. Use the bounding box parameters in the latex-with-crop * 3. run again pdfLatex on the latex-with-crop => obtains a PDF-crop * 4. the other converters can now be launched in async on the PDF-crop * * RenderEngine starts the converters only after going through steps 1,2,3 - see above * */ // filetypes - run only (registered)converters for these file types. // freshRun - true to start a fresh run from beginning (latex->pdf->gs->pdfcrop), false - use existing PDF-crop file void run(const QStringList& filetypes=QStringList(), bool freshRun=true); //! this is asynchronos //overloaded convenience function void run(const QString& filetype); //! blocks main loop QProcess* currentProcess() const{ return mChildProcess; } signals: void started(); void finished(); void finished(int exitCode,QProcess::ExitStatus exitStatus); void error(QProcess::ProcessError err); private slots: void finishedPdfLatex(int exitCode,QProcess::ExitStatus exitStatus); void finishedGS(int, QProcess::ExitStatus); void finishedPdfCrop(int, QProcess::ExitStatus); void finishedConverter(int exitCode,QProcess::ExitStatus exitStatus); protected: bool parseLatexLog(); // Parse the latex log and return true if found latex errors in the log, false otherwise private: void stop(); void finish(int exitCode=0,QProcess::ExitStatus exitStatus=QProcess::NormalExit); void runConvertersOnFileTypes(); QString mPathPDFLatex; QString mPathGS; EqualX::ConvertersList mConverters; EqualX::File mFile; QStringList mConvertToFileTypes; // convert to these file types when run() QString mBuildDir; QString mAppDirSave; // save app current dir; the working dir is restored to this after the engine finishes QString mLatexLog; // contains whole output from pdflatex /* mLatexErrors - contains parsed errors from latex log mapped by line number and error string */ EqualX::ErrorsList mLatexErrors; QProcess* mChildProcess; int mRunningProcesses; // number of started processes static bool mIsRunning; // if Engine is Running }; } // end namespace EqualX #endif // RENDERENGINE_H equalx-0.7.1/resources/icons/menu/templates.png000644 001750 001750 00000001350 12314604155 022033 0ustar00mihaimihai000000 000000 PNG  IHDRĴl;sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<eIDAT8KkQd2yۊ)EXIBXpQ]?wۥ qH$P,mTĂEkMf:\7:pg3;=UGUUOA:aT![Z(YAi꒯^{rr2pjd]X CG"<666U,,R =.ޘhZ1;;Zk!`R`2h M(\,^^`8#OHsVW* H e: \̶UN!ȄB~y>yn+wcB!l !<&x>|Pb$Tq׷y\~ s(I"!$z]t=꯸xa%W|?!5 6l `{׵G61zm~oS! * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef LATEXEDITOR_H #define LATEXEDITOR_H #include #include "HLSelections.h" class QCompleter; class QAbstractItemModel; class LatexHighlighter; class LatexEditor; // class to have Line Number in LatexEditor class LatexEditorLineNumberArea : public QWidget { public: LatexEditorLineNumberArea(LatexEditor *editor); QSize sizeHint() const; protected: void paintEvent(QPaintEvent *event); private: LatexEditor *codeEditor; }; class LatexEditor : public QPlainTextEdit { Q_OBJECT public: LatexEditor(QWidget *parent = 0); ~LatexEditor(); HLSelections getSelections() const; void lineNumberAreaPaintEvent(QPaintEvent *event); int lineNumberAreaWidth(); void setHighLighting(bool activeHL=true); void setCompletion(bool activeCompletion=true); void setCompletionSensitive(bool caseSensitive=true); void setCompleter(QCompleter *c); void setModel(QAbstractItemModel *model); QCompleter *completer() const; QString selectedText() const; void selectLines(const QMap &errorsMap); // highlight these lines public slots: void clearSelections();// clear highlight of multiple find occurances void setMinCharMatch(int n) { minCompletionChars = n; } // set minimum of chars to match for completion void setStartCountingBlocks(int n); // start counting lineNumberArea from this bool find(const QString &expr, QTextDocument::FindFlags flags); bool findAll(const QString &expr, QTextDocument::FindFlags flags); bool findNext(); bool findPrevious(); void replace(const QString &expr); // replace current cursor selection with expr void replaceAll(const QString &expr);// replace All Selections with expr protected: void keyPressEvent(QKeyEvent *e); void focusInEvent(QFocusEvent *e); QString textUnderCursor() const; void resizeEvent(QResizeEvent *event); void mousePressEvent(QMouseEvent *e); private slots: void insertCompletion(const QString &completion); void updateLineNumberAreaWidth(int newBlockCount); void updateLineNumberArea(const QRect &, int); private: QAbstractItemModel *modelFromFile(const QString& fileName); LatexHighlighter *highlighter; QCompleter *c; int minCompletionChars; bool m_activeCompletion; // last find Expression & last find Flags HLSelections hlSelections; // highlight Selections QString findExpr; QTextDocument::FindFlags findFlags; QWidget *lineNumberArea; int lineNumberAreaStartCount; // start counting lines from this number QPixmap* pixError; QMap errors; }; #endif // LATEXEDITOR_H equalx-0.7.1/ui/BookmarksPanel/BookmarksWidget.ui000644 001750 001750 00000021425 12314604155 022223 0ustar00mihaimihai000000 000000 BookmarksWidget 0 0 314 546 BookmarksWidget 0 0 0 0 0 0 0 &Search: bookmarkSearchEdit Bookmarks B&y Qt::ToolButtonTextOnly Qt::DownArrow false 0 0 0 Search by Content 16777215 135 QWidget{ background-color: rgb(217, 231, 254); border:1px solid rgb(156, 176, 216); } QLabel {border:0px solid rgb(156, 176, 216);} QPushButton {border:0px solid rgb(156, 176, 216);} 2 2 2 2 0 0 130 130 16777215 16777215 Drop Equation here Qt::AlignCenter 0 0 :/resources/icons/menu/edit-delete.png:/resources/icons/menu/edit-delete.png 0 0 0 0 0 Qt::ScrollBarAsNeeded 5 QAbstractItemView::NoEditTriggers true QAbstractItemView::ScrollPerPixel 10 true true true false 0 0 0 0 BookmarksView QTreeView
BookmarksView.h
SearchLineEdit QLineEdit
SearchLineEdit.h
clearSearchImage clicked(bool) widgetSearch setHidden(bool) 480 122 254 21 clearSearchImage clicked(bool) widgetSearchImage setVisible(bool) 480 122 254 122 clearSearchImage released() bookmarkSearchEdit clear() 292 124 160 21
equalx-0.7.1/resources/symbols/RelationOperators/frown.png000644 001750 001750 00000000300 12314604155 024247 0ustar00mihaimihai000000 000000 PNG  IHDRgsRGBbKGD pHYs  tIME @IDAT8! YyMG-yQˣ P$;8S5t0x+@*ԙ> -~Z_IENDB`equalx-0.7.1/resources/icons/menu/view-refresh.png000644 001750 001750 00000007237 12314604155 022455 0ustar00mihaimihai000000 000000 PNG  IHDR00WsBIT|d pHYs11(RtEXtSoftwarewww.inkscape.org<IDATx՚{p\}ǿskw=,YOlapx@@ PB` !20) SfhICm~rs˹ǟxg?<5CGXqF\|%Xځ UX2N)~ϰ =d_GwϾ^z~k.UQYםw=RM)ecQxGRM/A!^X|7Ϲe_spt׈zܵc_9lhyS- OEp*~- + ng ­+@{-y)QLP?(\|>wlZu N]vŻ?QVw(uM_`F0/n2T=D6V\m0GKC2A ~@z*҃tpqs?Տl'IRڀL&*~R-9LyDc)q9`0J(~B4!\E<GWGBsp~`a(&A` إE]qfL 9u޷b(G:Ke'n44/#‡ELz~SWλSE,aA4gĞw,bzBP]}p7ڻ~z4fsA*A$^`df[2(,@a?,gd(A!cޱ^z9,o[`ȺZ HnJޤ8iͧOdy )Wf3!X+2X,*Q"HaZ=HGaյ-PY}GsRɖ6oNx)1xxj!-.̊/1Nqq^yt ^`R @2%B]r )7Î;f7p(`mܚۍЃS#v ߪ ^weI(jwĆx›VI֘@!} O/8i;vΆwDXM䵼-oXzum:L'Wsh'8#6 %\._`kC1c#aO.jHx1%$IU" `p*%=`>.Y>Q0 V3:څ fgAC@~DU)P1&sPZn\)Epsic!HE#D\Ds}XDn"TmH!:d&jh)PbgHvKb|+z,5 \T N!A":sGP2 '*e<43X_`U~rOW*>" c 4]+dXi,)tXk)_(I> @"?}Xwײ}忏a7"HL`I, X! d K/j]=wML.!@1\¶)B$A:lv4`G2W0> 3#{8֨1vቨ™q8ƺuC[ؓ 6Åh&𑵭~F@8 iALnLkSayc~pHpv:f,.O8N1+/f/!X!GPT` %yל2bē?)/FbB+KUɆ̠A.J4[B47H!2RPZJE"udN[Jbm`:+A! B@^HMڵPxvInȜv:n3[K,A$Q .pK\ϯ. }IM[ EKWAeOlz2|:n8W(+mNul),) D!$ 0 ( I:'Z"z/wKDjEo{c Vyrj}]BFd{MdV'K0ZywJDpHߞsx~5WZ\}A"΄e1% ӎD DRRi8=}Zu f,D j:ph*r)3bUGS!D.A)A<%$ջs" ?<[_򙙸#Nni̬Ыr03(Xj㙀3KI[G̀"PXªe T,3Nts/8=001 1Rh4~ՖY{E&9S5pΌZ0@v5qvRò3oA7]5-ڳVuRWw h UGP[*k0(|8cwr=07c䞘DCۖZ7{ga\֏KI(zc%u ֟o yrSoSu1yv\9JƆ0-3=F xpaȗ*c'#)}?5`2"1֘C)l){?J,O$*hF;(a:^~:9OԍIENDB`equalx-0.7.1/resources/icons/tabBar/chemistry/eq04.png000644 001750 001750 00000001415 12314604155 023046 0ustar00mihaimihai000000 000000 PNG  IHDR2 P!+! pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;7zTXtLatexxs)KI-*N-6/kc23JrRJˋkk[ZtEXtResolution116-'IDATX=N0b  7bclAz"`F#-'rjҺ@B$K=HG }Zʎ(RԥFK3j()2=%}*-;NS`/|# +# P!+65&Xz+"A %.a[`_X{:Ö^ !Sw* O`l#ήvzؖ^O:E͘g{ks{LHn a]}hJm?c5fֳk`; pCȝG^=O HfϤ b)ڇG73E<n7Ͽ'ϒ7{6;rjIENDB`equalx-0.7.1/resources/icons/tabBar/geometry/eq02.png000644 001750 001750 00000001141 12314604155 022664 0ustar00mihaimihai000000 000000 PNG  IHDRer pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;tEXtLatex\overleftrightarrow{AB} tEXtResolution116-'YIDAT8Ŕ1N@E$M,`T4Hʈ8705U# .t#)領18kA|i$N`O HHaO%p^'q%m_3}I w x=Gۅ xVY\7# ڕ > (k~Gi[/H-UnTh51խ>[䙃LVF6 ZHI'@T{hF҅ƌ1P=GitQFbHVHQ9pl!׀6R[OYٖ2PWe%:bا9pͦR2,KeH}yo~;RG8(gIENDB`equalx-0.7.1/resources/symbols/Delimiters/lceil_rceil.png000644 001750 001750 00000000264 12314604155 024020 0ustar00mihaimihai000000 000000 PNG  IHDR_AsRGBbKGD pHYs  tIME%;3AV4IDAT8!0 A3q2IV6&^|B * )|IENDB`equalx-0.7.1/resources/icons/tabBar/stats/eq01.png000644 001750 001750 00000001407 12314604155 022173 0ustar00mihaimihai000000 000000 PNG  IHDR'(} pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;tEXtLatex\sum_{i=1}^{n} X_ibtEXtResolution1066NIDATXAV0@.fvQoG`p x|`GpvN}\T#B B T‚ng+W=vB ,ŌHB 4F)9kv,2l8GB7œ =j@(zd}Jmtg#ۯV%ǰ{H:JsMQ}a_2B%A,=2 ?A̒zz١$Lk@j.kE1ﵣ>:G`AFY*" KF:nfd,AX0qO#3=~3cKD ӎSJXՏCs[;1G,KD)Qϳ * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include "ColorChooser.h" ColorChooser::ColorChooser(QWidget *parent, Qt::WindowFlags f) : QFrame(parent, f), mFgColor(Qt::black), mBgColor(Qt::white), mPadding(3), mSeparatorWidth(10) { mFgArea.setRect(mPadding, mPadding, 0,0); setMinimumSize(80,22); setFrameShadow(QFrame::Sunken); setFrameShape(QFrame::StyledPanel); connect(&mColorsMenu, SIGNAL(triggered(QAction*)), this, SLOT(onColorChosen(QAction*)) ); } ColorChooser::~ColorChooser() { } void ColorChooser::setFgColor(const QString &name) { mFgColor = QColor(name); } void ColorChooser::setFgColor(const QColor &color) { mFgColor = color; } void ColorChooser::setBgColor(const QString &name) { mBgColor = QColor(name); } void ColorChooser::setBgColor(const QColor &color) { mBgColor = color; } QSize ColorChooser::sizeHint() const { QSize sh; sh = QSize(2*mPadding+mSeparatorWidth+ mFgArea.width()+mBgArea.width(), 2*mPadding+mFgArea.height()); return sh; } void ColorChooser::paintEvent(QPaintEvent * /*event*/) { QPainter painter(this); painter.setRenderHint(QPainter::Antialiasing); QPen pen; pen.setWidth(1); pen.setColor(Qt::gray); pen.setStyle(Qt::SolidLine); painter.setPen(pen); // draw Foreground color selector painter.setBrush(mFgColor); painter.drawRect(mFgArea); // draw Separator painter.setPen(Qt::blue); painter.drawLine(mSeparator); // draw Background color selector painter.setPen(Qt::gray); painter.setBrush(mBgColor); painter.drawRect(mBgArea); } void ColorChooser::resizeEvent(QResizeEvent *event) { int widgetWidth = event->size().width(); int widgetHeight = event->size().height(); mSeparatorWidth = widgetWidth/6; int w = (int)((widgetWidth-2.0*mPadding-mSeparatorWidth)/2.0); int h = (int)(widgetHeight-2.0*mPadding); mFgArea.setRect(mPadding, mPadding, w, h); mBgArea.setRect(mPadding+w+mSeparatorWidth, mPadding, w,h); int x1 = mFgArea.topRight().x()+mSeparatorWidth-2; int y1 = mPadding+2; int x2 = mFgArea.bottomRight().x()+mPadding+2; int y2 = mFgArea.bottomRight().y()-2; mSeparator.setLine(x1,y1,x2,y2); } void ColorChooser::mousePressEvent(QMouseEvent *event) { if(mFgArea.contains( event->pos()) ) showMenu(CHOICE_FG); if(mBgArea.contains( event->pos()) ) showMenu(CHOICE_BG); } void ColorChooser::showMenu(ColorChooser::CHOICE chosen) { mSwatch = chosen; QPoint popupPoint; QString menuTitle; switch(chosen){ case CHOICE_FG: qDebug() << "clicked inside FG Area"; popupPoint = mapToGlobal( mFgArea.bottomLeft()); menuTitle = tr("Foreground Color:"); mActiveColor = mFgColor; break; case CHOICE_BG: qDebug() << "clicked inside BG Area"; popupPoint = mapToGlobal( mBgArea.bottomLeft()); menuTitle = tr("Background Color:"); mActiveColor = mBgColor; break; } //---------- Setup Colors Menu mColorsMenu.clear(); addMenuAction(Qt::transparent, tr("transparent") ); addMenuAction(Qt::black, tr("black") ); addMenuAction(Qt::white, tr("white") ); addMenuAction(Qt::red, tr("red") ); addMenuAction(Qt::darkRed, tr("dark red") ); addMenuAction(Qt::green, tr("green") ); addMenuAction(Qt::darkGreen, tr("dark green") ); addMenuAction(Qt::blue, tr("blue") ); addMenuAction(Qt::darkBlue, tr("dark blue") ); addMenuAction(Qt::cyan, tr("cyan") ); addMenuAction(Qt::magenta, tr("magenta") ); addMenuAction(Qt::yellow, tr("yellow") ); addMenuAction(Qt::gray, tr("gray") ); addMenuAction(Qt::darkGray, tr("dark gray") ); addMenuAction(Qt::lightGray, tr("light gray") ); mColorsMenu.addSeparator(); QAction* act = mColorsMenu.addAction(tr("Other Color..")); act->setData(mActiveColor); connect(act, SIGNAL(triggered()), this, SLOT(showColorsDialog()) ); // show menu mColorsMenu.setWindowTitle(menuTitle); mColorsMenu.popup(popupPoint); } inline void ColorChooser::addMenuAction(const QColor &fillColor, const QString &name) { QAction* act = mColorsMenu.addAction(createIcon(fillColor), name); act->setIconVisibleInMenu(true); act->setData(fillColor); } inline QIcon ColorChooser::createIcon(const QColor &colorName) const { QPixmap iconPixmap(32,32); iconPixmap.fill(QColor(colorName)); QIcon itemIcon(iconPixmap); return itemIcon; } void ColorChooser::onColorChosen(QAction *act) { QColor chosenColor = act->data().value(); if(mActiveColor == chosenColor) return; switch (mSwatch) { case CHOICE_FG:{ mFgColor = chosenColor; emit fgColorChanged(mFgColor); break; } case CHOICE_BG:{ mBgColor = chosenColor; emit bgColorChanged(mBgColor); break; } } update(); } void ColorChooser::showColorsDialog() { switch (mSwatch) { case CHOICE_FG:{ QColor selected = QColorDialog::getColor(mFgColor); if(selected.isValid()) { mFgColor = selected; emit fgColorChanged(mFgColor); } break; } case CHOICE_BG:{ QColor selected = QColorDialog::getColor(mBgColor); if(selected.isValid()) { mBgColor = selected; emit bgColorChanged(mBgColor); } break; } } update(); } equalx-0.7.1/resources/symbols/RelationOperators/subseteq.png000644 001750 001750 00000000316 12314604155 024756 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME6 .iNIDAT(͒1 0 se`Hc h$,$2DVcUJg""ow,MO/(/!x7IENDB`equalx-0.7.1/ui/000755 001750 001750 00000000000 12314604155 013654 5ustar00mihaimihai000000 000000 equalx-0.7.1/src/LatexEditor.cpp000644 001750 001750 00000033272 12314604155 016765 0ustar00mihaimihai000000 000000 /* * Copyright 2010 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include "LatexEditor.h" #include "LatexHighlighter.h" LatexEditorLineNumberArea::LatexEditorLineNumberArea(LatexEditor *editor) : QWidget(editor) { codeEditor = editor; } QSize LatexEditorLineNumberArea::sizeHint() const { return QSize(codeEditor->lineNumberAreaWidth(), 0); } void LatexEditorLineNumberArea::paintEvent(QPaintEvent *event) { codeEditor->lineNumberAreaPaintEvent(event); } LatexEditor::LatexEditor(QWidget *parent) : QPlainTextEdit(parent), c(0), minCompletionChars(2), lineNumberAreaStartCount(0) { setWindowTitle(tr("Latex Widget Editor")); c = new QCompleter(this); //c->setModel( modelFromFile(":/resources/templates/latexKeyWords.txt") ); c->setCaseSensitivity(Qt::CaseInsensitive); c->setWrapAround(false); highlighter = new LatexHighlighter( this->document() ); setCompleter(c); lineNumberArea = new LatexEditorLineNumberArea(this); connect(this, SIGNAL(blockCountChanged(int)), this, SLOT(updateLineNumberAreaWidth(int))); connect(this, SIGNAL(updateRequest(QRect,int)), this, SLOT(updateLineNumberArea(QRect,int))); // connect(this, SIGNAL(textChanged()), this, SLOT(findAll()) ); pixError = new QPixmap("://resources/icons/editor/error.png"); updateLineNumberAreaWidth(0); } LatexEditor::~LatexEditor() { delete pixError; } HLSelections LatexEditor::getSelections() const { return hlSelections; } void LatexEditor::setCompletion(bool activeCompletion) { m_activeCompletion = activeCompletion; } void LatexEditor::setCompletionSensitive(bool caseSensitive) { if(caseSensitive) c->setCaseSensitivity(Qt::CaseSensitive); else c->setCaseSensitivity(Qt::CaseInsensitive); } void LatexEditor::setHighLighting(bool activeHL) { if(activeHL) highlighter->setDocument( this->document() ); else highlighter->setDocument(0); } QAbstractItemModel *LatexEditor::modelFromFile(const QString& fileName) { QFile file(fileName); if(!file.open(QFile::ReadOnly) ) return new QStringListModel(c); QStringList words; while (!file.atEnd()) { QByteArray line = file.readLine(); if (!line.isEmpty()) words << line.trimmed(); } return new QStringListModel(words, c); } void LatexEditor::setCompleter(QCompleter *completer) { if(!completer){ QObject::disconnect(c, 0, this, 0); return; } if(c) QObject::disconnect(c, 0, this, 0); c = completer; c->setWidget(this); c->setCompletionMode(QCompleter::PopupCompletion); QObject::connect(c, SIGNAL(activated(const QString&)), this, SLOT(insertCompletion(QString))); } void LatexEditor::setModel(QAbstractItemModel *model) { c->setModel(model); c->setCompletionColumn(0); } QCompleter *LatexEditor::completer() const { return c; } void LatexEditor::setStartCountingBlocks(int n) { lineNumberAreaStartCount = n; updateLineNumberAreaWidth(n); update(); } void LatexEditor::clearSelections() { if( hlSelections.isEmpty() ) return; // Clear Highlight List for(int i=0; i< hlSelections.size(); i++){ SelectionIndex *si = hlSelections.at(i); delete si; } hlSelections.clear(); // Clear Highlights from editor QTextCursor tc( document() ); QTextCharFormat format = tc.charFormat(); format.setForeground( QBrush(QColor("black")) ); format.setBackground( QBrush(QColor("white")) ); selectAll(); tc = textCursor(); tc.setCharFormat( format ); tc.clearSelection(); setTextCursor(tc); } bool LatexEditor::find(const QString &expr, QTextDocument::FindFlags flags) { findExpr = expr; findFlags = flags; bool findResult = QPlainTextEdit::find(expr, flags); return findResult; } bool LatexEditor::findAll(const QString &expr, QTextDocument::FindFlags flags) { clearSelections(); if( expr.isEmpty() || expr.isNull() ) return false; findExpr = expr; findFlags = flags; // get a cursor at the begining of the document QTextCursor tc( document() ); // set highlight colors QPalette p = QApplication::palette(); QTextCharFormat selectedFormat = tc.charFormat(); selectedFormat.setForeground( p.highlightedText() ); selectedFormat.setBackground(p.highlight()); setTextCursor(tc); // store find results in SelectionIndex SelectionIndex *si; while( find(expr, flags) ){ tc = textCursor(); tc.setCharFormat( selectedFormat ); si = new SelectionIndex; si->start = tc.selectionStart() ; si->end = tc.selectionEnd(); hlSelections.append(si); } return true; } bool LatexEditor::findNext() { return find(findExpr, findFlags); } bool LatexEditor::findPrevious() { findFlags = findFlags | QTextDocument::FindBackward; return find(findExpr, findFlags); } void LatexEditor::insertCompletion(const QString &completion) { if(c->widget() != this) return; QTextCursor tc = textCursor(); //int extra = completion.length() - c->completionPrefix().length(); tc.select(QTextCursor::WordUnderCursor); tc.removeSelectedText(); tc.insertText(completion.trimmed()); setTextCursor(tc); } QString LatexEditor::textUnderCursor() const { QTextCursor tc = textCursor(); tc.select(QTextCursor::WordUnderCursor); //QString::SectionFlag flag = QString::SectionSkipEmpty | QString::SectionIncludeLeadingSep; QString selectedText = tc.selectedText(); QRegExp exp("[\\\\_]"); QString returnText = selectedText.section(exp, 0,0, QString::SectionSkipEmpty | QString::SectionIncludeLeadingSep); return returnText; } void LatexEditor::focusInEvent(QFocusEvent *e) { if(c) c->setWidget(this); QPlainTextEdit::focusInEvent(e); } /* The keyPressEvent() is reimplemented to ignore key events like Qt::Key_Enter, Qt::Key_Return, Qt::Key_Escape, Qt::Key_Tab, and Qt::Key_Backtab so the completer can handle them. If there is an active completer, we cannot process the shortcut, Ctrl+E.*/ void LatexEditor::keyPressEvent(QKeyEvent *e) { if(c && c->popup()->isVisible()) { switch(e->key()) { case Qt::Key_Enter: case Qt::Key_Return: case Qt::Key_Escape: case Qt::Key_Tab: case Qt::Key_Backtab: e->ignore(); return; default: break; } } bool isShortcut = ((e->modifiers() & Qt::ControlModifier) && e->key() == Qt::Key_E); // CTRL+E if(!c || !isShortcut) QPlainTextEdit::keyPressEvent(e); /* We also handle other modifiers and shortcuts for which we do not want the completer to respond to.*/ const bool ctrlOrShift = e->modifiers() & (Qt::ControlModifier | Qt::ShiftModifier); if (!c || (ctrlOrShift && e->text().isEmpty()) || !m_activeCompletion) return; static QString eow("~!@#$%&*()+|:\"<>?,./;'[]-="); // end of word bool hasModifier = (e->modifiers() != Qt::NoModifier) && !ctrlOrShift; QString completionPrefix = textUnderCursor(); if (!isShortcut && (hasModifier || e->text().isEmpty() || completionPrefix.length() < minCompletionChars || eow.contains(e->text().right(1)) ) ) { c->popup()->hide(); return; } if (completionPrefix != c->completionPrefix()) { c->setCompletionPrefix(completionPrefix); c->popup()->setCurrentIndex(c->completionModel()->index(0, 0)); } QRect cr = cursorRect(); cr.setWidth(c->popup()->sizeHintForColumn(0) + c->popup()->verticalScrollBar()->sizeHint().width()); c->complete(cr); // popup it up! } void LatexEditor::replace(const QString &expr) { QTextCursor tc = textCursor(); tc.insertText(expr); setTextCursor(tc); } void LatexEditor::replaceAll(const QString &expr) { QTextCursor tc = textCursor(); int replaceStrLength = expr.length() - findExpr.length(); int pos1,pos2, ss, se; for(int i=0; i < hlSelections.size(); i++){ SelectionIndex *selectionItem = hlSelections.at(i); ss = selectionItem->start; // start selection se = selectionItem->end; // end selection pos1 = ss + i*replaceStrLength; pos2 = se + i*replaceStrLength; tc.setPosition(pos1); tc.setPosition(pos2, QTextCursor::KeepAnchor); tc.insertText(expr); setTextCursor(tc); } clearSelections(); } QString LatexEditor::selectedText() const { QTextCursor tc = textCursor(); return tc.selectedText(); } int LatexEditor::lineNumberAreaWidth() { int digits = 1; int max = qMax(1, blockCount()+lineNumberAreaStartCount); while (max >= 10) { max /= 10; ++digits; } int space = 6 + fontMetrics().width(QLatin1Char('9')) * digits + pixError->width(); return space; } void LatexEditor::updateLineNumberAreaWidth(int /* newBlockCount */) { setViewportMargins(lineNumberAreaWidth(), 0, 0, 0); } void LatexEditor::updateLineNumberArea(const QRect &rect, int dy) { if (dy) lineNumberArea->scroll(0, dy); else lineNumberArea->update(0, rect.y(), lineNumberArea->width(), rect.height()); if (rect.contains(viewport()->rect())) updateLineNumberAreaWidth(0); } void LatexEditor::resizeEvent(QResizeEvent *e) { QPlainTextEdit::resizeEvent(e); QRect cr = contentsRect(); lineNumberArea->setGeometry(QRect(cr.left(), cr.top(), lineNumberAreaWidth(), cr.height())); } void LatexEditor::mousePressEvent(QMouseEvent *e) { QPlainTextEdit::mousePressEvent(e); if(e->button() == Qt::LeftButton && e->modifiers() ==Qt::ControlModifier){ qDebug() << "currentCompletion: " << c->currentCompletion(); QString completionPrefix = textUnderCursor(); if ( toPlainText().isEmpty() || completionPrefix.length() < minCompletionChars ) { c->popup()->hide(); return; } c->setCompletionPrefix(completionPrefix); c->popup()->setCurrentIndex(c->completionModel()->index(0, 0)); QRect cr = cursorRect(); cr.setWidth(c->popup()->sizeHintForColumn(0) + c->popup()->verticalScrollBar()->sizeHint().width()); c->complete(cr); // popup it up! } } void LatexEditor::lineNumberAreaPaintEvent(QPaintEvent *event) { QPainter painter(lineNumberArea); painter.fillRect(event->rect(), Qt::lightGray); //set background color QTextBlock block = firstVisibleBlock(); int blockNumber = block.blockNumber() + lineNumberAreaStartCount; int top = (int) blockBoundingGeometry(block).translated(contentOffset()).top(); int bottom = top + (int) blockBoundingRect(block).height(); while (block.isValid() && top <= event->rect().bottom()) { if (block.isVisible() && bottom >= event->rect().top()) { QString number = QString::number(blockNumber + 1); if(errors.contains(blockNumber+1)) painter.drawPixmap(0, top, *pixError); painter.drawText(0, top, lineNumberArea->width(), fontMetrics().height(), Qt::AlignRight, number); } block = block.next(); top = bottom; bottom = top + (int) blockBoundingRect(block).height(); ++blockNumber; } } void LatexEditor::selectLines(const QMap &errorsMap) { errors.clear(); errors = errorsMap; QList lines = errors.keys(); QList extraSelections; if(!lines.isEmpty()){ QColor hlLineColor = QColor(Qt::yellow).lighter(160); QTextCursor saveCursor = textCursor(); qSort(lines); moveCursor(QTextCursor::Start); int blockN=lineNumberAreaStartCount; int blocks = blockCount(); for (int i = 0; i < lines.size(); ++i) { int lineErrorNumber = lines.at(i); if(lineErrorNumber >= lineNumberAreaStartCount && lineErrorNumber <= blocks+lineNumberAreaStartCount){ while( !textCursor().atEnd()){ if( (blockN+lineNumberAreaStartCount) == lineErrorNumber ) { QTextEdit::ExtraSelection selection; selection.format.setBackground(hlLineColor); selection.format.setProperty(QTextFormat::FullWidthSelection, true); selection.cursor = textCursor(); extraSelections.append(selection); break; } QTextCursor cur = textCursor(); if(!cur.movePosition(QTextCursor::NextBlock)) break; setTextCursor(cur); blockN = textCursor().blockNumber()+1; } } } setTextCursor(saveCursor); } setExtraSelections(extraSelections); } equalx-0.7.1/resources/symbols/Greek/lambda.png000644 001750 001750 00000000305 12314604155 021722 0ustar00mihaimihai000000 000000 PNG  IHDR B'sRGBbKGD pHYs  tIME''EIDAT(͒ [XH!WMۅ I l\<|n {ځځx2p$#2r IENDB`equalx-0.7.1/include/ColorChooser.h000644 001750 001750 00000002763 12314604155 017444 0ustar00mihaimihai000000 000000 #ifndef COLORCHOOSER_H #define COLORCHOOSER_H #include #include #include class ColorChooser : public QFrame { Q_OBJECT public: enum CHOICE{ CHOICE_FG, CHOICE_BG }; ColorChooser(QWidget *parent = 0, Qt::WindowFlags f = 0); ~ColorChooser(); QColor fgColor() const { return mFgColor; } QColor bgColor() const {return mBgColor; } void setFgColor(const QString& name); void setFgColor(const QColor& color); void setBgColor(const QString& name); void setBgColor(const QColor& color); QSize sizeHint () const; signals: // SIGNALS void fgColorChanged(QColor); void bgColorChanged(QColor); private slots: void onColorChosen(QAction* act); void showColorsDialog(); protected: void paintEvent(QPaintEvent *event); void resizeEvent ( QResizeEvent * event ); void mousePressEvent ( QMouseEvent * event ); void showMenu(ColorChooser::CHOICE chosen); private: void setupColorsMenu(); void addMenuAction(const QColor& fillColor, const QString& name); QIcon createIcon(const QColor& fillcolor) const; QColor mFgColor; QColor mBgColor; QColor mActiveColor; // color of active Area QRect mFgArea; QRect mBgArea; QLine mSeparator; QMenu mColorsMenu; ColorChooser::CHOICE mSwatch; // identifies which swatch is active (FG or BG) int mPadding; // widgets padding int mSeparatorWidth; // spacer width between color swatches }; #endif // COLORCHOOSER_H equalx-0.7.1/resources/icons/editor/000755 001750 001750 00000000000 12314604155 017652 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/symbols/Products/prod3.png000644 001750 001750 00000000310 12314604155 022273 0ustar00mihaimihai000000 000000 PNG  IHDRgsRGBbKGD pHYs  tIME 5%#AHIDAT8c`$M/ I\1S4̀Di ,F#i9I'B?Xarq 62IENDB`equalx-0.7.1/resources/icons/tabBar/trig/eq02.png000644 001750 001750 00000001156 12314604155 022004 0ustar00mihaimihai000000 000000 PNG  IHDR/E? pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;tEXtLatex\sin^{-1}\thetatEXtResolution116-'nIDATHտRSQD*%W;so`,aL,-y/O BK vZf<ɠ8ٙ{v9͢BykD GƤʷyۮ5>a*2*MP-YBCb8Y͡BMV*opC3n{3Hd{":@APߊur#qLȺ_ uqJ:nQA*>D|D_ ]'Q"=G-5Dbƞ߃}ٕm?5&qzxaE;x=J3[1oAL xGXLIENDB`equalx-0.7.1/resources/icons/equalx/equalx-16x16.png000644 001750 001750 00000001240 12314604155 022450 0ustar00mihaimihai000000 000000 PNG  IHDRasBIT|d pHYs|4ktEXtSoftwarewww.inkscape.org<IDAT8SOHSqޟt<͐RlXQf,d" 塃CЎ)ұ:ba`i5h!*k^m{{QXL χ"`3Pm/J͡Vz_8l2WSJxlsh8tY_KnD/[K%O%{vQyՈI=Lre"b:׋HWove%76.7K ~4iPcdY9={@PI##L?#.S \P9YC(6!hF%ץmIENDB`equalx-0.7.1/resources/symbols/Operators/dagger.png000644 001750 001750 00000000270 12314604155 022655 0ustar00mihaimihai000000 000000 PNG  IHDR\^sRGBbKGD pHYs  tIME*=k8IDAT(͒1 8MrXԡ457z6tfv*~0+%fIENDB`equalx-0.7.1/resources/symbols/symbols.ini000644 001750 001750 00000060605 12314604155 021141 0ustar00mihaimihai000000 000000 [Decorations] symbols/size=4 symbols/1/name="Superscript" symbols/1/icon="super.png" symbols/1/package="" symbols/1/latex="^{x}" symbols/2/name="Underscript" symbols/2/icon="sub.png" symbols/2/package="" symbols/2/latex="_{x}" symbols/3/name="Overset" symbols/3/icon="overset.png" symbols/3/package="" symbols/3/latex="\\overset{x}{y}" symbols/4/name="Underset" symbols/4/icon="underset.png" symbols/4/package="" symbols/4/latex="\\underset{x}{y}" [Functions] symbols/size=4 symbols/1/name="fraction" symbols/1/icon="frac.png" symbols/1/package="" symbols/1/latex="\\frac{x}{y}" symbols/2/name="Root" symbols/2/icon="root.png" symbols/2/package="" symbols/2/latex="\\sqrt[x]{y}" symbols/3/name="Fraction without horizontal line" symbols/3/icon="frac_noHLine.png" symbols/3/package="" symbols/3/latex="{x \\atop y}" symbols/4/name="Square root" symbols/4/icon="sqrt.png" symbols/4/package="" symbols/4/latex="\\sqrt{x}" [Delimiters] symbols/size=8 symbols/1/name="Round brackets or parenthesis" symbols/1/icon="delim0.png" symbols/1/package="" symbols/1/latex="\\left( x \\right)" symbols/2/name="Curly brackets" symbols/2/icon="lbrace_rbrace.png" symbols/2/package="" symbols/2/latex="\\left\\{ x \\right\\}" symbols/3/name="Square brackets" symbols/3/icon="lbracket_rbracket.png" symbols/3/package="" symbols/3/latex="\\left[ x \\right]" symbols/4/name="Ceil brackets" symbols/4/icon="lceil_rceil.png" symbols/4/package="" symbols/4/latex="\\left\\lceil x \\right\\rceil" symbols/5/name="Floor brackets" symbols/5/icon="lfloor_rfloor.png" symbols/5/package="" symbols/5/latex="\\left\\lfloor x \\right\\rfloor" symbols/6/name="Angle brackets" symbols/6/icon="langle_rangle.png" symbols/6/package="" symbols/6/latex="\\left\\langle x \\right\\rangle" symbols/7/name="Vertical bars" symbols/7/icon="lbar_rbar.png" symbols/7/package="" symbols/7/latex="\\left| x \\right|" symbols/8/name="Double vertical bars" symbols/8/icon="lbarvert_rbarvert.png" symbols/8/package="" symbols/8/latex="\\left\\Vert x \\right\\Vert" [Accents] symbols/size=24 symbols/1/name="Hat" symbols/1/icon="hat.png" symbols/1/package="" symbols/1/latex="\\hat{ x }" symbols/2/name="Wide hat over" symbols/2/icon="widehat.png" symbols/2/package="" symbols/2/latex="\\widehat{ x }" symbols/3/name="Vee or check" symbols/3/icon="check.png" symbols/3/package="" symbols/3/latex="\\check{ x }" symbols/4/name="Tilde" symbols/4/icon="tilde.png" symbols/4/package="" symbols/4/latex="\\tilde{ x }" symbols/5/name="Wide Tilde" symbols/5/icon="widetilde.png" symbols/5/package="" symbols/5/latex="\\widetilde{ x }" symbols/6/name="Acute" symbols/6/icon="acute.png" symbols/6/package="" symbols/6/latex="\\acute{ x }" symbols/7/name="Grave" symbols/7/icon="grave.png" symbols/7/package="" symbols/7/latex="\\grave{ x }" symbols/8/name="Dot" symbols/8/icon="dot.png" symbols/8/package="" symbols/8/latex="\\dot{ x }" symbols/9/name="Double Dot" symbols/9/icon="ddot.png" symbols/9/package="" symbols/9/latex="\\ddot{ x }" symbols/10/name="Breve" symbols/10/icon="breve.png" symbols/10/package="" symbols/10/latex="\\breve{ x }" symbols/11/name="Macron or Bar over" symbols/11/icon="bar.png" symbols/11/package="" symbols/11/latex="\\bar{ x }" symbols/12/name="Vector" symbols/12/icon="vec.png" symbols/12/package="" symbols/12/latex="\\vec{ x }" symbols/13/name="Overline" symbols/13/icon="overline.png" symbols/13/package="" symbols/13/latex="\\overline{ x }" symbols/14/name="Brace Over" symbols/14/icon="overbrace.png" symbols/14/package="" symbols/14/latex="\\overbrace{ x }" symbols/15/name="Left Arrow Over" symbols/15/icon="overleftarrow.png" symbols/15/package="" symbols/15/latex="\\overleftarrow{ x }" symbols/16/name="Right Arrow Over" symbols/16/icon="overrightarrow.png" symbols/16/package="" symbols/16/latex="\\overrightarrow{ x }" symbols/17/name="Left Right Arrow Over" symbols/17/icon="overleftrightarrow.png" symbols/17/package="" symbols/17/latex="\\overleftrightarrow{ x }" symbols/18/name="Overset" symbols/18/icon="overset.png" symbols/18/package="" symbols/18/latex="\\overset{ x }" symbols/19/name="Under Line" symbols/19/icon="underline.png" symbols/19/package="" symbols/19/latex="\\underline{ x }" symbols/20/name="Under Brace" symbols/20/icon="underbrace.png" symbols/20/package="" symbols/20/latex="\\underbrace{ x }" symbols/21/name="Under Left Arrow" symbols/21/icon="underleftarrow.png" symbols/21/package="" symbols/21/latex="\\underleftarrow{ x }" symbols/22/name="Under Right Arrow" symbols/22/icon="underrightarrow.png" symbols/22/package="" symbols/22/latex="\\underrightarrow{ x }" symbols/23/name="Under Left Right Arrow" symbols/23/icon="underleftrightarrow.png" symbols/23/package="" symbols/23/latex="\\underleftrightarrow{ x }" symbols/24/name="Underset" symbols/24/icon="underset.png" symbols/24/package="" symbols/24/latex="\\underset{ x }" [Operators] symbols/size=31 symbols/1/name="Plus Minus" symbols/1/icon="pm.png" symbols/1/package="" symbols/1/latex="\\pm" symbols/2/name="Cap" symbols/2/icon="cap.png" symbols/2/package="" symbols/2/latex="\\cap" symbols/3/name="Diamond" symbols/3/icon="diamond.png" symbols/3/package="" symbols/3/latex="\\diamond" symbols/4/name="Circled Plus" symbols/4/icon="oplus.png" symbols/4/package="" symbols/4/latex="\\oplus" symbols/5/name="Minus Plus" symbols/5/icon="mp.png" symbols/5/package="" symbols/5/latex="\\mp" symbols/6/name="Cup" symbols/6/icon="cup.png" symbols/6/package="" symbols/6/latex="\\cup" symbols/7/name="Big Triangle Up" symbols/7/icon="bigtriangleup.png" symbols/7/package="" symbols/7/latex="\\bigtriangleup" symbols/8/name="Big Triangle Down" symbols/8/icon="bigtriangledown.png" symbols/8/package="" symbols/8/latex="\\bigtriangledown" symbols/9/name="Circled Minus" symbols/9/icon="ominus.png" symbols/9/package="" symbols/9/latex="\\ominus" symbols/10/name="Times or Multiplication" symbols/10/icon="times.png" symbols/10/package="" symbols/10/latex="\\times" symbols/11/name="U Plus" symbols/11/icon="uplus.png" symbols/11/package="" symbols/11/latex="\\uplus" symbols/12/name="Cicled Times" symbols/12/icon="otimes.png" symbols/12/package="" symbols/12/latex="\\otimes" symbols/13/name="Divide or Division" symbols/13/icon="div.png" symbols/13/package="" symbols/13/latex="\\div" symbols/14/name="Squared Cap" symbols/14/icon="sqcap.png" symbols/14/package="" symbols/14/latex="\\sqcap" symbols/15/name="Squared Cup" symbols/15/icon="sqcup.png" symbols/15/package="" symbols/15/latex="\\sqcup" symbols/16/name="Triangle Right" symbols/16/icon="triangleright.png" symbols/16/package="" symbols/16/latex="\\triangleright" symbols/17/name="Triangle Left" symbols/17/icon="triangleleft.png" symbols/17/package="" symbols/17/latex="\\triangleleft" symbols/18/name="Circled Slash" symbols/18/icon="oslash.png" symbols/18/package="" symbols/18/latex="\\oslash" symbols/19/name="Circled Dot" symbols/19/icon="odot.png" symbols/19/package="" symbols/19/latex="\\odot" symbols/20/name="Dot" symbols/20/icon="cdot.png" symbols/20/package="" symbols/20/latex="\\cdot" symbols/21/name="Star" symbols/21/icon="star.png" symbols/21/package="" symbols/21/latex="\\star" symbols/22/name="Vee" symbols/22/icon="vee.png" symbols/22/package="" symbols/22/latex="\\vee" symbols/23/name="Amalg" symbols/23/icon="amalg.png" symbols/23/package="" symbols/23/latex="\\amalg" symbols/24/name="Big Circle" symbols/24/icon="bigcirc.png" symbols/24/package="" symbols/24/latex="\\bigcirc" symbols/25/name="Set Minus" symbols/25/icon="setminus.png" symbols/25/package="" symbols/25/latex="\\setminus" symbols/26/name="Wedge" symbols/26/icon="wedge.png" symbols/26/package="" symbols/26/latex="\\wedge" symbols/27/name="Dagger" symbols/27/icon="dagger.png" symbols/27/package="" symbols/27/latex="\\dagger" symbols/28/name="Circle" symbols/28/icon="circ.png" symbols/28/package="" symbols/28/latex="\\circ" symbols/29/name="Bullet" symbols/29/icon="bullet.png" symbols/29/package="" symbols/29/latex="\\bullet" symbols/30/name="Wr" symbols/30/icon="wr.png" symbols/30/package="" symbols/30/latex="\\wr" symbols/31/name="Double Dagger" symbols/31/icon="ddagger.png" symbols/31/package="" symbols/31/latex="\\ddagger" [RelationOperators] symbols/size=35 symbols/1/name="Less or Equal than" symbols/1/icon="leq.png" symbols/1/package="" symbols/1/latex="\\leq" symbols/2/name="Greater or Equal than" symbols/2/icon="geq.png" symbols/2/package="" symbols/2/latex="\\geq" symbols/3/name="Equivalent" symbols/3/icon="equiv.png" symbols/3/package="" symbols/3/latex="\\equiv" symbols/4/name="Models" symbols/4/icon="models.png" symbols/4/package="" symbols/4/latex="\\models" symbols/5/name="Precedence" symbols/5/icon="prec.png" symbols/5/package="" symbols/5/latex="\\prec" symbols/6/name="Succedence" symbols/6/icon="succ.png" symbols/6/package="" symbols/6/latex="\\succ" symbols/7/name="Similar" symbols/7/icon="sim.png" symbols/7/package="" symbols/7/latex="\\sim" symbols/8/name="Perpendicular" symbols/8/icon="perp.png" symbols/8/package="" symbols/8/latex="\\perp" symbols/9/name="Precede Equal" symbols/9/icon="preceq.png" symbols/9/package="" symbols/9/latex="\\preceq" symbols/10/name="Succeeds Equal" symbols/10/icon="succeq.png" symbols/10/package="" symbols/10/latex="\\succeq" symbols/11/name="Similar Equal" symbols/11/icon="simeq.png" symbols/11/package="" symbols/11/latex="\\simeq" symbols/12/name="Middle" symbols/12/icon="mid.png" symbols/12/package="" symbols/12/latex="\\mid" symbols/13/name="Less Less" symbols/13/icon="ll.png" symbols/13/package="" symbols/13/latex="\\ll" symbols/14/name="Greater Greater" symbols/14/icon="gg.png" symbols/14/package="" symbols/14/latex="\\gg" symbols/15/name="Asymptote" symbols/15/icon="asymp.png" symbols/15/package="" symbols/15/latex="\\asymp" symbols/16/name="Parallel" symbols/16/icon="parallel.png" symbols/16/package="" symbols/16/latex="\\parallel" symbols/17/name="Subset" symbols/17/icon="subset.png" symbols/17/package="" symbols/17/latex="\\subset" symbols/18/name="Supset" symbols/18/icon="supset.png" symbols/18/package="" symbols/18/latex="\\supset" symbols/19/name="Approximate" symbols/19/icon="approx.png" symbols/19/package="" symbols/19/latex="\\approx" symbols/20/name="Smile" symbols/20/icon="smile.png" symbols/20/package="" symbols/20/latex="\\smile" symbols/21/name="Subset Equal" symbols/21/icon="subseteq.png" symbols/21/package="" symbols/21/latex="\\subseteq" symbols/22/name="Supset Equal" symbols/22/icon="supseteq.png" symbols/22/package="" symbols/22/latex="\\supseteq" symbols/23/name="Congruent" symbols/23/icon="cong.png" symbols/23/package="" symbols/23/latex="\\cong" symbols/24/name="Frown" symbols/24/icon="frown.png" symbols/24/package="" symbols/24/latex="\\frown" symbols/25/name="Squared Subset Equal" symbols/25/icon="sqsubseteq.png" symbols/25/package="" symbols/25/latex="\\sqsubseteq" symbols/26/name="Squared Supset Equal" symbols/26/icon="sqsupseteq.png" symbols/26/package="" symbols/26/latex="\\sqsupseteq" symbols/27/name="Dot Equal" symbols/27/icon="doteq.png" symbols/27/package="" symbols/27/latex="\\doteq" symbols/28/name="Not Equal" symbols/28/icon="neq.png" symbols/28/package="" symbols/28/latex="\\neq" symbols/29/name="In" symbols/29/icon="in.png" symbols/29/package="" symbols/29/latex="\\in" symbols/30/name="Ni" symbols/30/icon="ni.png" symbols/30/package="" symbols/30/latex="\\ni" symbols/31/name="Proportional" symbols/31/icon="propto.png" symbols/31/package="" symbols/31/latex="\\propto" symbols/32/name="Not In" symbols/32/icon="notin.png" symbols/32/package="" symbols/32/latex="\\notin" symbols/33/name="Vertical and dash" symbols/33/icon="vdash.png" symbols/33/package="" symbols/33/latex="\\vdash" symbols/34/name="Dash and Vertical" symbols/34/icon="dashv.png" symbols/34/package="" symbols/34/latex="\\dashv" symbols/35/name="Bowtie" symbols/35/icon="bowtie.png" symbols/35/package="" symbols/35/latex="\\bowtie" [Miscellaneous] symbols/size=13 symbols/1/name="Infinity" symbols/1/icon="infty.png" symbols/1/package="" symbols/1/latex="\\infty" symbols/2/name="For All" symbols/2/icon="forall.png" symbols/2/package="" symbols/2/latex="\\forall" symbols/3/name="Exists" symbols/3/icon="exists.png" symbols/3/package="" symbols/3/latex="\\exists" symbols/4/name="Nabla" symbols/4/icon="nabla.png" symbols/4/package="" symbols/4/latex="\\nabla" symbols/5/name="Partial" symbols/5/icon="partial.png" symbols/5/package="" symbols/5/latex="\\partial" symbols/6/name="Prime" symbols/6/icon="prime.png" symbols/6/package="" symbols/6/latex="\\prime" symbols/7/name="Mathematical L" symbols/7/icon="ell.png" symbols/7/package="" symbols/7/latex="\\ell" symbols/8/name="Empty Set" symbols/8/icon="emptyset.png" symbols/8/package="" symbols/8/latex="\\emptyset" symbols/9/name="Mathematical i" symbols/9/icon="imath.png" symbols/9/package="" symbols/9/latex="\\imath" symbols/10/name="Mathematical j" symbols/10/icon="jmath.png" symbols/10/package="" symbols/10/latex="\\jmath" symbols/11/name="Weierstrass p or pe" symbols/11/icon="wp.png" symbols/11/package="" symbols/11/latex="\\wp" symbols/12/name="Empty Set as text" symbols/12/icon="textrm_O.png" symbols/12/package="" symbols/12/latex="\\textrm \\O" symbols/13/name="H bar or stricked Plank constant" symbols/13/icon="hbar.png" symbols/13/package="" symbols/13/latex="\\hbar" [Sets] symbols/size=12 symbols/1/name="Mathematical Caligraph H" symbols/1/icon="mathcal_H.png" symbols/1/package="" symbols/1/latex="\\mathcal{H}" symbols/2/name="Mathematical Caligraph F" symbols/2/icon="mathcal_F.png" symbols/2/package="" symbols/2/latex="\\mathcal{F}" symbols/3/name="Mathematical Caligraph L" symbols/3/icon="mathcal_L.png" symbols/3/package="" symbols/3/latex="\\mathcal{L}" symbols/3/name="Mathematical Caligraph O" symbols/3/icon="mathcal_O.png" symbols/3/package="" symbols/3/latex="\\mathcal{O}" symbols/4/name="Real Set" symbols/4/icon="Re.png" symbols/4/package="" symbols/4/latex="\\Re" symbols/5/name="Imaginary Set" symbols/5/icon="Im.png" symbols/5/package="" symbols/5/latex="\\Im" symbols/6/name="Aleph" symbols/6/icon="aleph.png" symbols/6/package="" symbols/6/latex="\\aleph" symbols/7/name="Complex Set" symbols/7/icon="mathbb_C.png" symbols/7/package="" symbols/7/latex="\\mathbb{C}" symbols/8/name="Hilbert Set" symbols/8/icon="mathbb_H.png" symbols/8/package="" symbols/8/latex="\\mathbb{H}" symbols/9/name="Natural Set" symbols/9/icon="mathbb_N.png" symbols/9/package="" symbols/9/latex="\\mathbb{N}" symbols/10/name="Rational Set" symbols/10/icon="mathbb_Q.png" symbols/10/package="" symbols/10/latex="\\mathbb{Q}" symbols/11/name="Real Set" symbols/11/icon="mathbb_R.png" symbols/11/package="" symbols/11/latex="\\mathbb{R}" symbols/12/name="Integer Set" symbols/12/icon="mathbb_Z.png" symbols/12/package="" symbols/12/latex="\\mathbb{Z}" [Greek] symbols/size=29 symbols/1/name="Alpha" symbols/1/icon="alpha.png" symbols/1/package="" symbols/1/latex="\\alpha" symbols/2/name="Beta" symbols/2/icon="beta.png" symbols/2/package="" symbols/2/latex="\\beta" symbols/3/name="Gamma" symbols/3/icon="gamma.png" symbols/3/package="" symbols/3/latex="\\gamma" symbols/4/name="Delta" symbols/4/icon="delta.png" symbols/4/package="" symbols/4/latex="\\delta" symbols/5/name="Epsilon" symbols/5/icon="epsilon.png" symbols/5/package="" symbols/5/latex="\\epsilon" symbols/6/name="Zeta" symbols/6/icon="zeta.png" symbols/6/package="" symbols/6/latex="\\zeta" symbols/7/name="Eta" symbols/7/icon="eta.png" symbols/7/package="" symbols/7/latex="\\eta" symbols/8/name="Theta" symbols/8/icon="theta.png" symbols/8/package="" symbols/8/latex="\\theta" symbols/9/name="Iota" symbols/9/icon="iota.png" symbols/9/package="" symbols/9/latex="\\iota" symbols/10/name="Kappa" symbols/10/icon="kappa.png" symbols/10/package="" symbols/10/latex="\\kappa" symbols/11/name="Lambda" symbols/11/icon="lambda.png" symbols/11/package="" symbols/11/latex="\\lambda" symbols/12/name="Mu" symbols/12/icon="mu.png" symbols/12/package="" symbols/12/latex="\\mu" symbols/13/name="Nu" symbols/13/icon="nu.png" symbols/13/package="" symbols/13/latex="\\nu" symbols/14/name="Xi" symbols/14/icon="xi.png" symbols/14/package="" symbols/14/latex="\\xi" symbols/15/name="Pi" symbols/15/icon="pi.png" symbols/15/package="" symbols/15/latex="\\pi" symbols/16/name="Rho" symbols/16/icon="rho.png" symbols/16/package="" symbols/16/latex="\\rho" symbols/17/name="Tau" symbols/17/icon="tau.png" symbols/17/package="" symbols/17/latex="\\tau" symbols/18/name="Sigma" symbols/18/icon="sigma.png" symbols/18/package="" symbols/18/latex="\\sigma" symbols/19/name="Upsilon" symbols/19/icon="upsilon.png" symbols/19/package="" symbols/19/latex="\\upsilon" symbols/20/name="Phi" symbols/20/icon="phi.png" symbols/20/package="" symbols/20/latex="\\phi" symbols/21/name="Chi" symbols/21/icon="chi.png" symbols/21/package="" symbols/21/latex="\\chi" symbols/22/name="Psi" symbols/22/icon="psi.png" symbols/22/package="" symbols/22/latex="\\psi" symbols/23/name="Omega" symbols/23/icon="omega.png" symbols/23/package="" symbols/23/latex="\\omega" symbols/24/name="Var Epsilon" symbols/24/icon="varepsilon.png" symbols/24/package="" symbols/24/latex="\\varepsilon" symbols/25/name="Var Theta" symbols/25/icon="vartheta.png" symbols/25/package="" symbols/25/latex="\\vartheta" symbols/26/name="Var Pi" symbols/26/icon="varpi.png" symbols/26/package="" symbols/26/latex="\\varpi" symbols/27/name="Var Rho" symbols/27/icon="varrho.png" symbols/27/package="" symbols/27/latex="\\varrho" symbols/28/name="Var Sigma" symbols/28/icon="varsigma.png" symbols/28/package="" symbols/28/latex="\\varsigma" symbols/29/name="Var Phi" symbols/29/icon="varphi.png" symbols/29/package="" symbols/29/latex="\\varphi" [BigGreek] symbols/size=10 symbols/1/name="Big Gamma" symbols/1/icon="gamma2.png" symbols/1/package="" symbols/1/latex="\\Gamma" symbols/2/name="Big Delta" symbols/2/icon="delta2.png" symbols/2/package="" symbols/2/latex="\\Delta" symbols/3/name="Big Theta" symbols/3/icon="theta2.png" symbols/3/package="" symbols/3/latex="\\Theta" symbols/4/name="Big Lambda" symbols/4/icon="lambda2.png" symbols/4/package="" symbols/4/latex="\\Lambda" symbols/5/name="Big Xi" symbols/5/icon="xi2.png" symbols/5/package="" symbols/5/latex="\\Xi" symbols/6/name="Big Pi" symbols/6/icon="pi2.png" symbols/6/package="" symbols/6/latex="\\Pi" symbols/7/name="Big Sigma" symbols/7/icon="sigma2.png" symbols/7/package="" symbols/7/latex="\\Sigma" symbols/8/name="Big Upsilon" symbols/8/icon="upsilon2.png" symbols/8/package="" symbols/8/latex="\\Upsilon" symbols/9/name="Big Phi" symbols/9/icon="phi2.png" symbols/9/package="" symbols/9/latex="\\Phi" symbols/10/name="Big Psi" symbols/10/icon="psi2.png" symbols/10/package="" symbols/10/latex="\\Psi" [Sums] symbols/size=3 symbols/1/name="Summation" symbols/1/icon="sum.png" symbols/1/package="" symbols/1/latex="\\sum" symbols/2/name="Summation from a to b" symbols/2/icon="sum2.png" symbols/2/package="" symbols/2/latex="\\sum_{x}^{y}" symbols/3/name="Inline Summation from a to b" symbols/3/icon="sum3.png" symbols/3/package="" symbols/3/latex="\\textstyle \\sum_{x}^{y}" [Integrals] symbols/size=9 symbols/1/name="Integral" symbols/1/icon="int.png" symbols/1/package="" symbols/1/latex="\\int" symbols/2/name="Integral Operator" symbols/2/icon="intop.png" symbols/2/package="" symbols/2/latex="\\intop" symbols/3/name="Double Integral" symbols/3/icon="iint.png" symbols/3/package="" symbols/3/latex="\\iint" symbols/4/name="Triple Integral" symbols/4/icon="iiint.png" symbols/4/package="" symbols/4/latex="\\iiint" symbols/5/name="Quadruple Integral" symbols/5/icon="iiiint.png" symbols/5/package="" symbols/5/latex="\\iiiint" symbols/6/name="Integral Dots Integral" symbols/6/icon="dotsint.png" symbols/6/package="" symbols/6/latex="\\idonsint" symbols/7/name="Path Integral" symbols/7/icon="oint.png" symbols/7/package="" symbols/7/latex="\\oint" symbols/8/name="Path Integral Operator" symbols/8/icon="iiiint.png" symbols/8/package="" symbols/8/latex="\\iiiint" symbols/9/name="Path Integral from a to b" symbols/9/icon="oint2.png" symbols/9/package="" symbols/9/latex="\\oint_{x}^{y}" [Products] symbols/size=6 symbols/1/name="Product" symbols/1/icon="prod.png" symbols/1/package="" symbols/1/latex="\\prod" symbols/2/name="Product from a to b" symbols/2/icon="prod2.png" symbols/2/package="" symbols/2/latex="\\prod_{x}^{y}" symbols/3/name="Inline Product from a to b" symbols/3/icon="prod3.png" symbols/3/package="" symbols/3/latex="\\textstyle \\prod_{x}^{y}" symbols/4/name="Coproduct" symbols/4/icon="coprod.png" symbols/4/package="" symbols/4/latex="\\coprod" symbols/5/name="Coproduct from a to b" symbols/5/icon="coprod2.png" symbols/5/package="" symbols/5/latex="\\coprod_{x}^{y}" symbols/6/name="Inline Coproduct from a to b" symbols/6/icon="coprod3.png" symbols/6/package="" symbols/6/latex="\\textstyle \\coprod_{x}^{y}" [Arrows] symbols/size=31 symbols/1/name="Left Arrow" symbols/1/icon="leftarrow.png" symbols/1/package="" symbols/1/latex="\\leftarrow" symbols/2/name="Right Arrow" symbols/2/icon="rightarrow.png" symbols/2/package="" symbols/2/latex="\\rightarrow" symbols/3/name="Up Arrow" symbols/3/icon="uparrow.png" symbols/3/package="" symbols/3/latex="\\uparrow" symbols/4/name="Down Arrow" symbols/4/icon="downarrow.png" symbols/4/package="" symbols/4/latex="\\downarrow" symbols/5/name="Up and Down Arrow" symbols/5/icon="updownarrow.png" symbols/5/package="" symbols/5/latex="\\updownarrow" symbols/6/name="Left and Right Arrow" symbols/6/icon="leftrightarrow.png" symbols/6/package="" symbols/6/latex="\\leftrightarrow" symbols/7/name="Double Left Arrow" symbols/7/icon="leftarrow2.png" symbols/7/package="" symbols/7/latex="\\Leftarrow" symbols/8/name="Double Right Arrow" symbols/8/icon="rightarrow2.png" symbols/8/package="" symbols/8/latex="\\Rightarrow" symbols/9/name="Double Up Arrow" symbols/9/icon="uparrow2.png" symbols/9/package="" symbols/9/latex="\\Uparrow" symbols/10/name="Double Down Arrow" symbols/10/icon="downarrow2.png" symbols/10/package="" symbols/10/latex="\\Downarrow" symbols/11/name="Double Up and Down Arrow" symbols/11/icon="updownarrow2.png" symbols/11/package="" symbols/11/latex="\\Updownarrow" symbols/12/name="Double Left and Right Arrow" symbols/12/icon="leftrightarrow2.png" symbols/12/package="" symbols/12/latex="\\Leftrightarrow" symbols/13/name="Long Left and Right Arrow" symbols/13/icon="longleftrightarrow2.png" symbols/13/package="" symbols/13/latex="\\Longleftrightarrow" symbols/14/name="Long Left Arrow" symbols/14/icon="longleftarrow2.png" symbols/14/package="" symbols/14/latex="\\Longleftarrow" symbols/15/name="Long Right Arrow" symbols/15/icon="longrightarrow2.png" symbols/15/package="" symbols/15/latex="\\Longrightarrow" symbols/16/name="Long Left and Right Arrow" symbols/16/icon="longleftrightarrow.png" symbols/16/package="" symbols/16/latex="\\longleftrightarrow" symbols/17/name="Long Left Arrow" symbols/17/icon="longleftarrow.png" symbols/17/package="" symbols/17/latex="\\longleftarrow" symbols/18/name="Long Right Arrow" symbols/18/icon="longrightarrow.png" symbols/18/package="" symbols/18/latex="\\longrightarrow" symbols/19/name="Left Harpoon Down" symbols/19/icon="leftharpoondown.png" symbols/19/package="" symbols/19/latex="\\leftharpoondown" symbols/20/name="Right Harpoon Down" symbols/20/icon="rightharpoondown.png" symbols/20/package="" symbols/20/latex="\\rightharpoondown" symbols/21/name="Maps to Arrow" symbols/21/icon="mapsto.png" symbols/21/package="" symbols/21/latex="\\mapsto" symbols/22/name="Long Maps to Arrow" symbols/22/icon="longmapsto.png" symbols/22/package="" symbols/22/latex="\\longmapsto" symbols/23/name="North West Arrow" symbols/23/icon="nwarrow.png" symbols/23/package="" symbols/23/latex="\\nwarrow" symbols/24/name="North East Arrow" symbols/24/icon="nearrow.png" symbols/24/package="" symbols/24/latex="\\nearrow" symbols/25/name="Left Harpoon Up" symbols/25/icon="leftharpoonup.png" symbols/25/package="" symbols/25/latex="\\leftharpoonup" symbols/26/name="Right Harpoon Up" symbols/26/icon="rightharpoonup.png" symbols/26/package="" symbols/26/latex="\\rightharpoonup" symbols/27/name="Left Hook Arrow" symbols/27/icon="hookleftarrow.png" symbols/27/package="" symbols/27/latex="\\hookleftarrow" symbols/28/name="Right Hook Arrow" symbols/28/icon="hookrightarrow.png" symbols/28/package="" symbols/28/latex="\\hookrightarrow" symbols/29/name="South West Arrow" symbols/29/icon="swarrow.png" symbols/29/package="" symbols/29/latex="\\swarrow" symbols/30/name="South East Arrow" symbols/30/icon="searrow.png" symbols/30/package="" symbols/30/latex="\\searrow" symbols/31/name="Left Right Harpoons" symbols/31/icon="rightleftharpoons.png" symbols/31/package="" symbols/31/latex="\\rightleftharpoons" equalx-0.7.1/resources/symbols/Accents/overbrace.png000644 001750 001750 00000000323 12314604155 022775 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGDC pHYs  tIME :X5SIDAT8I *AD\z0HJIb拕avZucI6:kt;tiz.4FO "/gDR/kIENDB`equalx-0.7.1/resources/icons/tabBar/derivs/eq04.png000644 001750 001750 00000001163 12314604155 022333 0ustar00mihaimihai000000 000000 PNG  IHDR"B pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;tEXtLatex\frac{d^2 }{d x^2}]|tEXtResolution1066NpIDATH=R0rΒo^Aεs[+eKH2$ 8>3L?o>$_J%0W" _L"s)WRz#ε;Lƍ. X4i,zLfDZ8+7;5OE`O D 4M_#'Is̹@Ѥds`?;}tm3V>GGGU!T 90=z0mk8ށkL\ґ!,J}o50䙙Ѻa<3KsEBg":DoE0왅0"e3+hV[9XorIENDB`equalx-0.7.1/src/Library/LibraryData.cpp000644 001750 001750 00000011566 12314604155 020345 0ustar00mihaimihai000000 000000 /* * Copyright 2014 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include "Library/LibraryData.h" //______________LibraryModelData_____________________________ LibraryModelData::LibraryModelData() : id(0), idparent(0), name(""), type(TypeFolder) { created = QDateTime::currentMSecsSinceEpoch(); } LibraryModelData::LibraryModelData(const LibraryModelData &other) { id = other.id; idparent = other.idparent; name = QString(other.name); type = (LibraryModelData::Type)other.type; created = other.created; } LibraryModelData::~LibraryModelData() { } bool LibraryModelData::isFolder() const { return (type==TypeFolder); } bool LibraryModelData::isBookmark() const { return (type==TypeBookmark); } bool LibraryModelData::isHistory() const { return (type==TypeHistory); } bool LibraryModelData::isValid() const { return (id>0); } QDebug operator<<(QDebug dbg, const LibraryModelData &data) { QString output = QString("LibraryModelData( id:%1 idparent:%2 name:[%3] type:%4 created:%5 )").arg(data.id).arg(data.idparent).arg(data.name).arg(data.type).arg(data.created); dbg.nospace() << output; return dbg.maybeSpace(); } //______________History Row_____________________________ HistoryRow::HistoryRow() : id(0), title(""), filePath("") { created = QDateTime::currentMSecsSinceEpoch(); } HistoryRow::HistoryRow(const HistoryRow &other) : id(other.id), title(other.title), filePath(other.filePath), created(other.created) { } HistoryRow::~HistoryRow() { } LibraryModelData HistoryRow::basicData() const { LibraryModelData basic; basic.id = id; basic.idparent=0; basic.name= filePath; basic.type= LibraryModelData::TypeHistory; basic.created= created; return basic; } //_______________Bookmark Row______________________________ Bookmark::Bookmark() : id(0), idparent(0), title(""), description(""), filePath(""), dirPath("") { created = QDateTime::currentMSecsSinceEpoch(); modified= created; } Bookmark::Bookmark(const Bookmark& other) : id(other.id), idparent(other.idparent), title(other.title), description(other.description), filePath(other.filePath), dirPath(other.dirPath), created(other.created), modified(other.modified) { } Bookmark::Bookmark(const LibraryModelData &data) : id(data.id), idparent(data.idparent), title(""), description(""), filePath(data.name), dirPath(""), created(data.created), modified(data.created) { } Bookmark::~Bookmark() { } LibraryModelData Bookmark::basicData() const { LibraryModelData basic; basic.id = id; basic.idparent=idparent; basic.name= filePath; basic.type= LibraryModelData::TypeBookmark; basic.created= created; return basic; } bool Bookmark::isValid() const { return (id>0); } QString Bookmark::fileExt() const { QFileInfo finfo(filePath); return finfo.completeSuffix(); } void Bookmark::clear() { id = 0; idparent=0; title= ""; description=""; dirPath=""; filePath=""; } //_______________Bookmark Folder Row______________________________ BookmarkFolder::BookmarkFolder() : id(0), idparent(0), name(""), description(""), dirPath("") { created = QDateTime::currentMSecsSinceEpoch(); } BookmarkFolder::BookmarkFolder(const BookmarkFolder& other) : id(other.id), idparent(other.idparent), name(other.name), description(other.description), dirPath(other.dirPath), created(other.created) { } BookmarkFolder::BookmarkFolder(const LibraryModelData &data) : id(data.id), idparent(data.idparent), name(data.name), description(""), dirPath(""), created(data.created) { } BookmarkFolder::~BookmarkFolder() { } LibraryModelData BookmarkFolder::basicData() const { LibraryModelData basic; basic.id = id; basic.idparent=idparent; basic.name= name; basic.type= LibraryModelData::TypeFolder; basic.created= created; return basic; } bool BookmarkFolder::isValid() const { return (id>0); } equalx-0.7.1/resources/icons/tabBar/chemistry/000755 001750 001750 00000000000 12314604155 021566 5ustar00mihaimihai000000 000000 equalx-0.7.1/src/Library/Library.cpp000644 001750 001750 00000106236 12314604155 017552 0ustar00mihaimihai000000 000000 /* * Copyright 2014 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include #include #include "File.h" #include "Library/Library.h" #define DB_NAME "library.db" #define LIB_DIR_NAME ".equalx" #define BOOKMARKS_DIR "bookmarks" #define HISTORY_DIR "history" #define BOOKMARKSTOOLBAR_DIR "bookmarks-toolbar" LibraryManager* LibraryManager::mInstance=NULL; LibraryManager* LibraryManager::Instance() { if(!mInstance) mInstance = new LibraryManager; return mInstance; } LibraryManager::LibraryManager(QObject *parent) : QObject(parent) { mDB = QSqlDatabase::addDatabase("QSQLITE"); if(!mDB.driver()->hasFeature(QSqlDriver::QuerySize)){ qDebug() << "SQL Driver doesn't support QuerySize"; } if(!mDB.driver()->hasFeature(QSqlDriver::Transactions)){ qDebug() << "SQL Driver doesn't support transactions"; } setup(); } LibraryManager::~LibraryManager() { mDB.close(); } inline QString LibraryManager::path() const { QString libDirPath(QDir::homePath()); libDirPath.append(QDir::separator()).append(LIB_DIR_NAME); return QDir::toNativeSeparators(libDirPath); } bool LibraryManager::setup() { mBookmarksDirStr = path().append(QDir::separator()).append(BOOKMARKS_DIR).append(QDir::separator()); mHistoryDirStr = path().append(QDir::separator()).append(HISTORY_DIR).append(QDir::separator()); QString libDirPath(path()); QDir libDir(libDirPath); if(!libDir.exists()) createLibrary(libDirPath); // check existance and permissions of library database libDirPath.append(QDir::separator()).append(DB_NAME); QFileInfo lib(libDirPath); mDB.setDatabaseName(lib.filePath()); if(!mDB.open()) { qDebug() << "Couldn't Open the Database. Report:" << mDB.lastError().text(); } QSqlQuery query; if(!query.exec("PRAGMA foreign_keys=ON;")){ qDebug() << "SQL Driver Failed Trying set FOREIGN KEYS=ON"; } if(!query.exec("PRAGMA foreign_keys;")){ qDebug() << "SQL Driver Failed Trying get FOREIGN KEYS status"; } query.next(); qDebug() << "FOREIGN KEYS="<1){ // parent is a folder query.prepare("SELECT dirPath FROM bookmarks_folders WHERE id=?"); query.addBindValue(parentId); if(!query.exec()){ mErrStr = tr("Cannot add equation to Bookmarks because I can not find its parent path. Database Reports: ").arg(query.lastError().text()); return lastId; } // parent found query.next(); parentPath = QString("%1/%2").arg(query.value(0).toString()).arg(parentId); } QFileInfo fromFileInfo(bookmark.filePath); QString fileType = fromFileInfo.completeSuffix(); qint64 created=QDateTime::currentMSecsSinceEpoch(); qint64 modified=created; query.clear(); query.prepare("INSERT INTO bookmarks (idparent, title, description, fileType, dirPath, created, modified) " "values(?,?,?,?,?,?,?)"); query.addBindValue(parentId); query.addBindValue(bookmark.title); query.addBindValue(bookmark.description); query.addBindValue(fileType); query.addBindValue(parentPath); query.addBindValue(created); query.addBindValue(modified); if(!query.exec()){ mErrStr = tr("Cannot add equation to Bookmarks. Database Reports: ").arg(query.lastError().text()); return lastId; } // the query was successful, now copy the file to the bookmarks folder QString toFile = QString("%1/%2.%3").arg(mBookmarksDirStr, query.lastInsertId().toString(),fileType); // each file copyied is named after its index in the table qDebug() << "Copying [" << bookmark.filePath <<"] -> [" << toFile <<"] "; QFile::copy(bookmark.filePath, toFile); lastId = query.lastInsertId().toInt(); EqualX::FileInfo eqInfo; EqualX::File::fetchInfo(bookmark.filePath, &eqInfo); QString eqLatexContent = eqInfo.equation().simplified(); eqLatexContent=eqLatexContent.replace(" ",""); query.clear(); query.prepare("INSERT INTO bookmarks_content (refId, latexContent, created) " "values(?,?,?)"); query.addBindValue(lastId); query.addBindValue(eqLatexContent); query.addBindValue(created); if(!query.exec()){ mErrStr = tr("Cannot add equation content to Bookmarks. Database Reports: ").arg(query.lastError().text()); return -1; } emit bookmarkFolderChanged(parentPath); return lastId; } int LibraryManager::addBookmarkFolder(const QString &name, const QString& description, int parentId) { BookmarkFolder folder; folder.idparent=parentId; folder.name=name; folder.description=description; return addBookmarkFolder(folder, parentId); } int LibraryManager::addBookmarkFolder(const BookmarkFolder &folder, int parentId) { qDebug() << "LibraryManager::addBookmarkFolder() "<1){ // parent is an existing folder (and not the ROOT) query.prepare("SELECT dirPath FROM bookmarks_folders WHERE id=?"); query.addBindValue(parentId); if(!query.exec()){ mErrStr = tr("Cannot add folder to Bookmarks because I can not find its parent path. Database Reports: ").arg(query.lastError().text()); qDebug() << mErrStr; return lastId; } // parent found query.next(); parentPath = QString("%1/%2").arg(query.value(0).toString()).arg(parentId); } query.clear(); query.prepare("INSERT INTO bookmarks_folders (idparent,name,description,dirPath,created, modified) " "VALUES (?,?,?,?,?,?)"); query.addBindValue(parentId); query.addBindValue(folder.name); query.addBindValue(folder.description); query.addBindValue(parentPath); query.addBindValue(QDateTime::currentMSecsSinceEpoch()); query.addBindValue(QDateTime::currentMSecsSinceEpoch()); if(!query.exec()){ mErrStr = tr("Cannot add folder to Bookmarks. Database Reports: %1").arg(query.lastError().text()); qDebug() << mErrStr; return lastId; } lastId = query.lastInsertId().toInt(); qDebug() << "LibraryManager::addBookmarkFolder() lastInsertedId=" << lastId; emit bookmarkFolderChanged(parentPath); return lastId; } int LibraryManager::addHistoryItem(const QString &title, const QString &fromFile) { int lastId = -1; if(!mDB.isOpen()){ mErrStr = tr("Can not add equation to History because the database is closed."); qDebug() << mErrStr; return lastId; } QSqlQuery query; query.prepare("INSERT INTO history (title, created) values(?,?)"); query.addBindValue(title); query.addBindValue(QDateTime::currentMSecsSinceEpoch()); if(!query.exec()){ mErrStr = query.lastError().text(); qDebug() << mErrStr; return lastId; } // the query was successful, than copy the file to the history folder QString toFile(mHistoryDirStr); toFile.append(query.lastInsertId().toString()); // each file copyied is named after its index in the table qDebug() << "Copying [" << fromFile <<"] -> [" << toFile <<"] "; QFile::copy(fromFile, toFile); HistoryRow row; row.id = query.lastInsertId().toInt(); row.title=title; row.filePath = toFile; row.created = QDateTime::currentMSecsSinceEpoch(); emit historyChanged(); emit historyChanged(row); lastId = query.lastInsertId().toInt(); return lastId; } LibraryRowsList LibraryManager::getAllHistory() { LibraryRowsList rows; if(!mDB.isOpen()){ mErrStr = tr("Cannot access equations from History because the database is closed."); qDebug() << mErrStr; return rows; } QSqlQuery query; if(!query.exec("SELECT id,created FROM history ORDER BY id DESC")){ qDebug() << "Cannot access History. Error: " << query.lastError().text(); return rows; } while(query.next()){ LibraryModelData allocated; allocated.id = query.value(0).toInt(); allocated.name.append(mHistoryDirStr).append(query.value(0).toString()); allocated.created = query.value(1).toULongLong(); allocated.type = LibraryModelData::TypeHistory; rows.append(allocated); } return rows; } const HistoryRow LibraryManager::getHistoryRow(int id) { if(id<1) id=1; HistoryRow allocated; if(!mDB.isOpen()){ mErrStr = tr("Cannot access History because the database is closed."); qDebug() << mErrStr; return allocated; } QSqlQuery query; if(!query.exec(QString("SELECT id,title,created FROM history WHERE id=%1").arg(id))){ qDebug() << "Cannot access History. Error: " << query.lastError().text(); return allocated; } if(query.next()){ allocated.id = query.value(0).toInt(); allocated.title = query.value(1).toString(); allocated.filePath.append(mHistoryDirStr).append(query.value(0).toString()); allocated.created = query.value(2).toULongLong(); } return allocated; } bool LibraryManager::clearHistory() { if(!mDB.isOpen()){ mErrStr = tr("Cannot access History because the database is closed."); qDebug() << mErrStr; return false; } /* Remove db entries */ QSqlQuery query; if(query.exec("DELETE FROM history")){ query.clear(); query.exec("UPDATE sqlite_sequence SET seq=0 WHERE name='history' "); /* Remove files from history dir */ //save current working directory QString saveDir = QDir::currentPath(); QDir histDir(mHistoryDirStr); QDir::setCurrent(mHistoryDirStr); QStringList filesInHistory = histDir.entryList(); foreach(QString file, filesInHistory){ histDir.remove(file); } // restore working dir QDir::setCurrent(saveDir); emit historyChanged(); return true; } mErrStr = query.lastError().text(); qDebug() << mErrStr; return false; } Bookmark LibraryManager::getBookmark(int id) { if(id<1) id=1; if(!mDB.isOpen()){ mErrStr = tr("Cannot access Bookmarks because the database is closed."); qDebug() << mErrStr; return Bookmark(); } QSqlQuery query; query.prepare("SELECT idparent,title,description,fileType,dirPath,created,modified FROM bookmarks where id=?"); query.addBindValue(id); if(!query.exec()){ mErrStr = "Cannot query Bookmarks. Error: " + query.lastError().text(); qDebug() << mErrStr; return Bookmark(); } if(!query.next()){ mErrStr = "Cannot get bookmark from database. Error: " + query.lastError().text(); qDebug() << mErrStr; return Bookmark(); } Bookmark b; b.id = id; b.idparent = query.value(0).toInt(); b.title = query.value(1).toString(); b.description=query.value(2).toString(); b.filePath= QDir::toNativeSeparators(QString("%1%2.%3").arg(mBookmarksDirStr).arg(id).arg(query.value(3).toString())); b.dirPath=query.value(4).toString(); b.created = query.value(5).toULongLong(); b.modified = query.value(6).toULongLong(); return b; } LibraryRowsList LibraryManager::getChildren(int idparent) { LibraryRowsList rows; if(!mDB.isOpen()){ mErrStr = tr("Cannot access Bookmarks because the database is closed."); qDebug() << mErrStr; return rows; } if(idparent<1) idparent=1; /** First, retrieve Bookmarks folders **/ QSqlQuery query; query.prepare("SELECT id,name,created FROM bookmarks_folders WHERE idparent=? ORDER BY name ASC"); query.addBindValue(idparent); if(!query.exec()){ mErrStr = tr("Cannot query Bookmarks Folders. Error: ") + query.lastError().text(); qDebug() << mErrStr; return rows; } while(query.next()){ LibraryModelData allocated; allocated.id = query.value(0).toInt(); allocated.name=query.value(1).toString(); allocated.created = query.value(2).toULongLong(); allocated.type = LibraryModelData::TypeFolder; rows.append(allocated); } /** Finally, retrieve Bookmarks **/ query.clear(); if(!query.exec(QString("SELECT id,created FROM bookmarks WHERE idparent=%1 ORDER BY created ASC").arg(idparent) )){ mErrStr = "Cannot access Bookmarks. Error: " + query.lastError().text(); qDebug() << mErrStr; return rows; } while(query.next()){ LibraryModelData allocated; allocated.id = query.value(0).toInt(); allocated.name.append(mBookmarksDirStr).append(query.value(0).toString()); allocated.created = query.value(1).toULongLong(); allocated.type = LibraryModelData::TypeBookmark; rows.append(allocated); } return rows; } LibraryRowsList LibraryManager::getAllBookmarkedFolders() { LibraryRowsList rows; if(!mDB.isOpen()){ mErrStr = tr("Cannot access Bookmarks because the database is closed."); qDebug() << mErrStr; return rows; } /** First, retrieve Bookmarks folders **/ QSqlQuery query; if(!query.exec("SELECT id,name,created FROM bookmarks_folders WHERE id>1 ORDER BY created DESC")){ mErrStr = tr("Cannot query Bookmarks Folders. Error: ") + query.lastError().text(); qDebug() << mErrStr; return rows; } while(query.next()){ LibraryModelData allocated; allocated.id = query.value(0).toInt(); allocated.name=query.value(1).toString(); allocated.created = query.value(2).toULongLong(); allocated.type = LibraryModelData::TypeFolder; rows.append(allocated); } return rows; } BookmarkFolder LibraryManager::getBookmarkFolder(int id) { if(!mDB.isOpen()){ mErrStr = tr("Cannot access Bookmarks because the database is closed."); qDebug() << mErrStr; return BookmarkFolder(); } QSqlQuery query; query.prepare("SELECT idparent,name,description,dirPath,created,modified FROM bookmarks_folders where id=?"); query.addBindValue(id); if(!query.exec()){ mErrStr = tr("Cannot query Bookmarks. Error: ") + query.lastError().text(); qDebug() << mErrStr; return BookmarkFolder(); } if(!query.next()){ mErrStr = tr("Cannot get Folder. Error: ") + query.lastError().text(); qDebug() << mErrStr; return BookmarkFolder(); } BookmarkFolder f; f.id = id; f.idparent=query.value(0).toInt(); f.name = query.value(1).toString(); f.description=query.value(2).toString(); f.dirPath=query.value(3).toString(); f.created = query.value(4).toULongLong(); f.modified = query.value(5).toULongLong(); return f; } int LibraryManager::childrenCountInFolder(int id) { if(!mDB.isOpen()){ mErrStr = tr("Cannot access Bookmarked equations because the database is closed."); qDebug() << mErrStr; return false; } if(id<1) id=1; int nChildren=0; /** Count Bookmarks folders **/ QSqlQuery query; query.prepare("SELECT COUNT(id) FROM bookmarks_folders WHERE idparent=?"); query.addBindValue(id); if(!query.exec()){ mErrStr = tr("Couldnt count subfolders."); // qDebug() << mErrStr; } else { query.next(); nChildren = query.value(0).toInt(); } /** Count Bookmarks **/ query.clear(); query.prepare("SELECT COUNT(id) FROM bookmarks WHERE idparent=?"); query.addBindValue(id); if(!query.exec()){ mErrStr = tr("Couldnt count bookmarks in this folder."); // qDebug() << mErrStr; } else { query.next(); nChildren += query.value(0).toInt(); } // qDebug() << "Folder:"< Folder:"< [" << toFile <<"] "; QFile::copy(bookmark.filePath, toFile); // no need since addBookmark() above will emit the signal //emit bookmarkFolderChanged(parentDirPath); return getBookmark(newId); } return Bookmark(); } BookmarkFolder LibraryManager::copyBookmarkFolder(int id, int idparent) { qDebug() << "LibraryManager::copyBookmarkFolder("<0){ copyChildren(row.id, newId); } } else if(row.isBookmark()){ qDebug() << "\t Has Bookmark: " << row.name; copyBookmark(row.id, toNewFolderId); } } } bool LibraryManager::moveData(const LibraryModelData &data, int newParentId) { bool status = false; if(data.isValid()){ // if the object is already in database if(data.isFolder()) status = moveBookmarkFolder(data.id, newParentId); else if(data.isBookmark()) status = moveBookmark(data.id, newParentId); } else { if(data.isFolder()) status = addBookmarkFolder(BookmarkFolder(data), newParentId); else if(data.isBookmark()) status = addBookmark(Bookmark(data), newParentId); } return status; } bool LibraryManager::moveBookmark(int id, int newParentId) { /****************************************************************************************/ /* We want to re-parent the bookmark */ /*--------------------------------------------------------------------------------------*/ /* - we must also change the its field 'dirPath' in database */ /*--------------------------------------------------------------------------------------*/ // First lets find the current dirPath QSqlQuery query; QString oldDirPath; query.prepare("SELECT dirPath FROM bookmarks WHERE id=?"); query.addBindValue(id); if(!query.exec()){ qDebug() << "Cannot find bookmark with id="<< id <<" . Error: " << query.lastError().text(); return false; } if(!query.next()){ qDebug() << "Cannot fetch dirPath of bookmark. Error: " << query.lastError().text(); return false; } oldDirPath = query.value(0).toString(); QString newDirPath; if(newParentId>1){ // Now, find its new dirPath query.prepare("SELECT dirPath FROM bookmarks_folders WHERE id=?"); query.addBindValue(newParentId); if(!query.exec()){ qDebug() << "Cannot find Folder in Bookmarks. Error: " << query.lastError().text(); return false; } if(!query.next()){ qDebug() << "Cannot fetch dirPath of new parent Folder in Bookmarks. Error: " << query.lastError().text(); return false; } newDirPath = QString("%1/%2").arg(query.value(0).toString()).arg(newParentId); } // now update bookmark to the new parent ID and new dirPath query.clear(); query.prepare("UPDATE bookmarks SET idparent=?,dirPath=?,modified=? WHERE id=?"); query.addBindValue(newParentId); query.addBindValue(newDirPath); query.addBindValue(QDateTime::currentMSecsSinceEpoch()); query.addBindValue(id); if(!query.exec()){ qDebug() << "Cannot reparent bookmark . Error: " << query.lastError().text(); return false; } emit bookmarkFolderChanged(oldDirPath); emit bookmarkFolderChanged(newDirPath); return true; } bool LibraryManager::moveBookmarkFolder(int id, int newParentId) { /****************************************************************************************/ /* We want to re-parent the folder */ /*--------------------------------------------------------------------------------------*/ /* - we must also change the field 'dirPath' in database of its subfolders and bookmarks*/ /*--------------------------------------------------------------------------------------*/ // First lets find the current folders 'dirPath' QSqlQuery query; query.prepare("SELECT dirPath FROM bookmarks_folders WHERE id=?"); query.addBindValue(id); if(!query.exec()){ qDebug() << "Cannot find Folder in Bookmarks. Error: " << query.lastError().text(); return false; } query.next(); QString oldDirPath = QString("%1/%2").arg(query.value(0).toString()).arg(id); QString newDirPath; if(newParentId>1){ // then lets find the new parents 'dirPath' query.clear(); query.prepare("SELECT dirPath FROM bookmarks_folders WHERE id=?"); query.addBindValue(newParentId); if(!query.exec()){ qDebug() << "Cannot find parent of Folder from Bookmarks. Error: " << query.lastError().text(); return false; } query.next(); newDirPath = QString("%1/%2").arg(query.value(0).toString()).arg(newParentId); } // now update folder to the new parent ID and new dirPath query.clear(); query.prepare("UPDATE bookmarks_folders SET idparent=?,dirPath=? WHERE id=?"); query.addBindValue(newParentId); query.addBindValue(newDirPath); query.addBindValue(id); if(!query.exec()){ qDebug() << "Cannot reparent Folder from Bookmarks. Error: " << query.lastError().text(); return false; } // now update all subfolders to the new dirPath newDirPath = QString("%1/%2").arg(newDirPath).arg(id); query.clear(); query.prepare("UPDATE bookmarks_folders SET dirPath=replace(dirPath,?,?) WHERE dirPath LIKE ? || '%' "); query.addBindValue(oldDirPath); query.addBindValue(newDirPath); query.addBindValue(oldDirPath); if(!query.exec()){ qDebug() << "Cannot reparent subfolders of this Folder from Bookmarks. Error: " << query.lastError().text(); return false; } // now update all bookmarks from this folder and its subfolders to the new dirPath query.clear(); query.prepare("UPDATE bookmarks SET dirPath=replace(dirPath,?,?) WHERE dirPath LIKE ? || '%' "); query.addBindValue(oldDirPath); query.addBindValue(newDirPath); query.addBindValue(oldDirPath); if(!query.exec()){ qDebug() << "Cannot reparent subfolders of this Folder from Bookmarks. Error: " << query.lastError().text(); return false; } emit bookmarkFolderChanged(oldDirPath); emit bookmarkFolderChanged(newDirPath); return true; } bool LibraryManager::updateData(const LibraryModelData &data) { bool status = false; if(data.isValid()){ // if the object is already in database if(data.isFolder()) status = updateBookmarkFolder(BookmarkFolder(data)); else if(data.isBookmark()) status = updateBookmark(Bookmark(data)); } return status; } bool LibraryManager::updateBookmark(const Bookmark &bookmark) { qDebug() << "updateing Bookmark id:" << bookmark.id << " parentid=" << bookmark.idparent; if(!mDB.isOpen()){ mErrStr = tr("Cannot access Bookmarks because the database is closed."); return false; } // we dont want to re-parent the bookmark, we simply want to update its own fields QSqlQuery query; query.prepare("UPDATE bookmarks SET title=?,description=?,modified=? WHERE id=?"); query.addBindValue(bookmark.title); query.addBindValue(bookmark.description); query.addBindValue(QVariant(QDateTime::currentMSecsSinceEpoch())); query.addBindValue(bookmark.id); if(!query.exec()){ qDebug() << "Cannot update Bookmarks. Error: " << query.lastError().text(); return false; } return true; } bool LibraryManager::updateBookmarkFolder(const BookmarkFolder &folder) { qDebug() << "updateing Folder in id:" << folder.id << " with parentid=" << folder.idparent; if(!mDB.isOpen()){ mErrStr = tr("Cannot access Bookmarks because the database is closed."); return false; } // we dont want to re-parent the folder, we simply want to update its own fields QSqlQuery query; query.prepare("UPDATE bookmarks_folders SET name=?,description=?,modified=? WHERE id=?"); query.addBindValue(QVariant(folder.name)); query.addBindValue(QVariant(folder.description)); query.addBindValue(QVariant(QDateTime::currentMSecsSinceEpoch())); query.addBindValue(folder.id); if(!query.exec()){ qDebug() << "Cannot update Folders from Bookmarks. Error: " << query.lastError().text(); return false; } emit bookmarkFolderChanged(folder.dirPath); return true; } bool LibraryManager::removeBookmark(int id) { qDebug() << "LibraryManager::removeBookmark("<< id <<")"; if(!mDB.isOpen()){ mErrStr = tr("Cannot access Library because the database is closed."); return false; } QString parentDirPath; QSqlQuery query; query.prepare("SELECT fileType,dirPath FROM bookmarks WHERE id=?"); query.addBindValue(id); if(!query.exec()){ mErrStr = tr("Cannot find bookmark. Error: ") + query.lastError().text(); qDebug() << mErrStr; return false; } if(!query.next()){ mErrStr = tr("Cannot get bookmark. Error: ") + query.lastError().text(); qDebug() << mErrStr; return false; } QString fileType = query.value(0).toString(); parentDirPath = query.value(1).toString(); query.clear(); query.prepare("DELETE FROM bookmarks WHERE id=?"); query.addBindValue(id); if(!query.exec()){ mErrStr = tr("Cannot delete bookmark. Error: ") + query.lastError().text(); qDebug() << mErrStr; return false; } emit bookmarkFolderChanged(parentDirPath); return removeBookmarkFromFS(id, fileType); } bool LibraryManager::removeBookmarkFolder(int id) { qDebug() << "LibraryManager::removeBookmarkFolder("<< id <<")"; if(!mDB.isOpen()){ mErrStr = tr("Cannot access Library because the database is closed."); return false; } if(id<=1) return false; // fetch the dirPath of the folder QString dirPath; QString parentDirPath; //mDB.transaction(); QSqlQuery query; query.prepare("SELECT dirPath FROM bookmarks_folders WHERE id=?"); query.addBindValue(id); if(!query.exec()){ qDebug() << "Cannot select Folder from Bookmarks. Error: " << query.lastError().text(); return false; } query.next(); parentDirPath = query.value(0).toString(); dirPath = QString("%1/%2").arg(parentDirPath).arg(id); //! before deleteing the bookmarks, we must remove the bookmarks files from file system // find all bookmarks in this folder and its subfolders query.clear(); query.prepare("SELECT id,fileType FROM bookmarks WHERE dirPath LIKE ? || '%' "); query.addBindValue(dirPath); if(!query.exec()){ qDebug() << "Cannot find bookmarks in this Folder in Library. Error: " << query.lastError().text(); return false; } int fileId; QString fileType; while(query.next()){ fileId = query.value(0).toInt(); fileType = query.value(1).toString(); removeBookmarkFromFS(fileId, fileType); } /****************************************/ /* delete the folder from the database */ /****************************************/ query.clear(); query.prepare("DELETE FROM bookmarks_folders WHERE id=?"); query.addBindValue(id); if(!query.exec()){ qDebug() << "Cannot delete Folder from Bookmarks. Error: " << query.lastError().text(); return false; } // mDB.commit(); emit bookmarkFolderChanged(parentDirPath); return true; } bool LibraryManager::removeSystemDir(const QString &dirName) { bool result = true; QDir dir(dirName); if (dir.exists(dirName)) { foreach(QFileInfo info, dir.entryInfoList(QDir::NoDotAndDotDot | QDir::System | QDir::Hidden | QDir::AllDirs | QDir::Files, QDir::DirsFirst)) { if (info.isDir()) { result = removeSystemDir(info.absoluteFilePath()); } else { result = QFile::remove(info.absoluteFilePath()); } if (!result) { return result; } } result = dir.rmdir(dirName); } return result; } inline bool LibraryManager::removeBookmarkFromFS(int id, const QString &filetype) { QString filePath = QDir::toNativeSeparators(QString("%1/%2.%3").arg(mBookmarksDirStr).arg(id).arg(filetype)); return QFile::remove(filePath); } LibraryRowsList LibraryManager::searchBookmarks(QString searchText, SEARCH_MODE searchType) { qDebug() << "LibraryManager::searchBookmarks("<< searchText <<") Search Mode="<Q} O9~W{ GFM ݑǜ~QhK]*2TZ7{ʑ8Gq!Dqn*.(*mwj/#z(w.9AutM>8 @sl=d[/_gH}H |@pJs@ƚGw tn`sQF-mOC (j.[o/,/dQ.ܫQF+c%t/:c;6e[om KP$mXM _}"8}[t3EQHsJnbaG~l|@F{Zi.rMp %ͷ܂[}/So:P?=ӱ@qiI8P}5 62L7qLǦ !niTJ/*CMשs0/ DEeJn|_頭Q#srZp[ 'GJ03_nMq] mn,ZR.866@hOIENDB`equalx-0.7.1/include/SymbolsGroupMenu.h000644 001750 001750 00000002562 12314604155 020332 0ustar00mihaimihai000000 000000 /* * Copyright 2010 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef WIDGETFRAMEPOPUP_H #define WIDGETFRAMEPOPUP_H #include #include class QGridLayout; class SymbolsGroupMenu : public QMenu { Q_OBJECT public: // methods SymbolsGroupMenu(QWidget* parent, int cols); void appendWidget(QWidget* widget); bool isEmpty(); void popup(); void showMenu(); public slots: void hideMenu(); private: // Data Members QGridLayout *m_grid; int mMaxCols; int mCurCol; int mCurRow; bool mHide; protected: virtual void enterEvent(QEvent *event); virtual void leaveEvent(QEvent *event); }; #endif // WIDGETFRAMEPOPUP_H equalx-0.7.1/resources/icons/editor/error.png000644 001750 001750 00000001360 12314604155 021511 0ustar00mihaimihai000000 000000 PNG  IHDRasBIT|d pHYsvv}ՂtEXtSoftwarewww.inkscape.org<mIDATxeMOQ3R/ mhQiBblaUM1q ?օ$ߠ!Ƶ P)tZ[(GZơ9)pZHM0ΞKܵ-R;%zvpf0832 AY6f޼U;3_3|}vxЂmP[wzvrm /R](STH Ux bk7׆aAf_D'KV+UH8<"*%"soԀe.Z^ϑQa}DQs7cRiZ toVp |'cA!q¸Kƭנ̦ЦY.w  * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef BookmarkItem_H #define BookmarkItem_H #include #include "Library/LibraryData.h" class BookmarksItemModel; class BookmarkItem { friend class BookmarksItemModel; public: BookmarkItem(BookmarkItem* parent=0); // the item is added automatically to its parents children BookmarkItem(const LibraryModelData &data, BookmarkItem *parent=0); // the item is added automatically to its parents children //BookmarkItem(const BookmarkItem& other); ~BookmarkItem(); void appendChild(BookmarkItem *child); void insertChild(int row, BookmarkItem* child); BookmarkItem *child(int row); BookmarkItem *constChild(int row) const; void clear(); int childCount() const; int columnCount() const; LibraryModelData data(int column=0) const; void setData(const LibraryModelData& data); QModelIndex index() const; bool hasChildren() const; int row() const; int rowCount() const; BookmarkItem *parent() const; BookmarksItemModel* model() const; void removeChild(int row); // remove child from list (but not delete) void setChildren(const QList childList); protected: BookmarksItemModel *mModel; private: QList mChildren; LibraryModelData mData; BookmarkItem *mParent; }; #endif // BookmarkItem_H equalx-0.7.1/include/BookmarksPanel/BookmarksWidget.h000644 001750 001750 00000004315 12314604155 023042 0ustar00mihaimihai000000 000000 /* * Copyright 2014 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef BOOKMARKSWIDGET_H #define BOOKMARKSWIDGET_H #include #include #include namespace Ui { class BookmarksWidget; } class QStandardItemModel; class QActionGroup; class QAction; class BookmarksItemModel; class DialogPreferencesFolder; class DialogPreferencesBookmark; class LibraryManager; class LibraryModelData; class BookmarksWidget : public QWidget { Q_OBJECT public: explicit BookmarksWidget(QWidget *parent = 0); ~BookmarksWidget(); public slots: void onDoubleClick(const QModelIndex& index); void onOpen(); void onNewFolder(); void onCut(); void onCopy(); void onPaste(); void onDelete(); void onProperties(); void resetAutoSearchTimer(const QString&); protected slots: void searchBookmarks(); signals: void activated(int); protected: void setupContextMenuActions(); void setupBookmarksSearchFields(); /* void dragEnterEvent(QDragEnterEvent *event); void dragLeaveEvent(QDragLeaveEvent *); void dropEvent(QDropEvent *ev); */ private: Ui::BookmarksWidget *ui; BookmarksItemModel* mModel; QStandardItemModel* mSearchModel; DialogPreferencesFolder* mDgPreferencesFolder; DialogPreferencesBookmark* mDgPreferencesBookmark; QActionGroup * mActionsGroupSearchBy; QAction* mActionSearchByContent; QModelIndex mCopiedRow; bool mIsCutActive; QTimer mAutoSearchTimer; }; #endif // BOOKMARKSWIDGET_H equalx-0.7.1/resources/symbols/Operators/diamond.png000644 001750 001750 00000000303 12314604155 023034 0ustar00mihaimihai000000 000000 PNG  IHDR B'sRGBbKGD pHYs  tIME'3*Ej3V ^ b2IBC7nd] p* 3eOIENDB`equalx-0.7.1/resources/symbols/Sums/000755 001750 001750 00000000000 12314604155 017670 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/symbols/Accents/overleftrightarrow.png000644 001750 001750 00000000327 12314604155 024770 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIMEl)WIDAT8A 0w*J!;"2F{LIm Wìs8ê/ެ :ʔȒ'{.pm|q]-~IENDB`equalx-0.7.1/include/MainWindow.h000644 001750 001750 00000011033 12314604155 017105 0ustar00mihaimihai000000 000000 /* * Copyright 2010 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef MAINWINDOW_H #define MAINWINDOW_H #include #include #include #include #include "defines.h" #include "Symbol.h" #include "LibraryData.h" class QAction; class QActionGroup; class QButtonGroup; class QCloseEvent; class QMenu; class QModelIndex; class QMovie; class QPushButton; class QToolButton; class QSignalMapper; class QProcess; class QStandardItemModel; class QPlainTextEdit; class DialogPreferencesBookmark; class DialogPreferences; class DialogReplace; class DialogAbout; class EquationView; class LatexEditor; class WidgetFind; class SearchLineEdit; class LibraryManager; namespace EqualX { class RenderEngine; class FileInfo; } namespace Ui { class MainWindowClass; } class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow(QWidget *parent = 0); ~MainWindow(); void setWindowModified(bool mod=true); public slots: void updateEquation(); // updates tex, png, and scene void onFindTextChanged(const QString &exp); void showFindDialog(); void showReplaceDialog(); void showLatexOutputWindow() const; void insertSymbol(LatexSymbol *symbol); void copyEquationToClipboard(); void pasteEquationFromClipboard(); void onActivatedHistoryRow(const LibraryModelData &row); void onActivatedBookmark(int bookmarkId); void onBookmarkAdd(); void showBookmarks(); void showHistory(); private slots: void equationChanged(); void newEquation(); void onAbout(); void onDeleteSelection(); // delete selected text from editor void onPreferences(); // show preferences dialog void open(); bool saveAs(); void loadEquation(const QString &fileName); void preferencesAccepted(); void renderStarted(); void renderFinished(int exitCode, QProcess::ExitStatus exitStatus); void renderError(QProcess::ProcessError); void writeSettings(); //read all settings from preferencesDialog and write them to the Settings File void readSettings(); // read all settings from the Settings File and update preferencesDialog protected: void showEquation(); void clearCurrentHighlight(); void setActions(); void setSymbolsPanel(); void setMathPanelTabsActions(); void setSignals(); void setCustomStyleSheets(); bool saveEquation(const QString &fileName); void closeEvent(QCloseEvent *); /* Adds ToolButtons with Actions conforming the file found by file name at eqImage to the widget */ void addButtonToMathTabs(const QString &eqImage, QWidget *widget); void addButtonToMathTabs(const QStringList &list, QWidget *widget); void updateUIFromSettings(); // update Main Window UI according to settings QString strippedName(const QString &fullFileName); private: void checkRequirements(); // check if the requirements are fulfilled /* MainWindow widgets */ Ui::MainWindowClass *ui; EqualX::FileInfo *mEquationData; EquationView *mEquationView; LatexEditor *mLatexEditor; WidgetFind *mFindWidget; QButtonGroup* renderModeButtonGroup; QMovie* mAnimationProgress; QTimer mAutoUpdateTimer; SearchLineEdit* mSearchLineEdit; QPlainTextEdit* mLatexOutput; LibraryManager* mLibrary; QActionGroup* mExportActionsGroup; EqualX::RenderEngine* mRenderer; QStandardItemModel* mSymbolsModel; // the symbols model used for completion in editor and searcher // Dialogs DialogReplace *mDialogReplace; DialogPreferences *mDialogPreferences; DialogAbout *mDialogAbout; DialogPreferencesBookmark *mDialogBookmark; Bookmark mCurrentBookmark; // holds the loaded bookmark from library (and which is currently displayed) // data QString curSaveDir; // current file // flags bool highlightAll; }; #endif // MAINWINDOW_H equalx-0.7.1/resources/icons/menu/arrow-right.png000644 001750 001750 00000001017 12314604155 022302 0ustar00mihaimihai000000 000000 PNG  IHDRasBIT|d pHYs:tEXtSoftwarewww.inkscape.org<IDATxڥ?KQy\Ӕ(.!8j@ɤT'3ss&EQXA(D{ߣY-lK++?cc[ɂfPn!<|8iP,…f$?IA!}@^T"!7/gGHY%A@[M㣞-^BC; +ȆhK o=VPl`@Qpesc80u QzZA8p!WCƃ_͑;N#xBqKpgW6 4" sUiTgxv5J$ZY{TNΦ8I(!%pvZU.}ʇ@4h57=K3KIENDB`equalx-0.7.1/resources/symbols/Arrows/000755 001750 001750 00000000000 12314604155 020216 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/symbols/Delimiters/lbar_rbar.png000644 001750 001750 00000000302 12314604155 023471 0ustar00mihaimihai000000 000000 PNG  IHDRĴl;sRGBbKGD pHYs B(xtIME 5DBIDAT8c?- fddd`dd$:|322Ǡ HŨ'ie3tjt Uk0<IENDB`equalx-0.7.1/include/BookmarksPanel/000755 001750 001750 00000000000 12314604155 017572 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/symbols/Operators/ddagger.png000644 001750 001750 00000000267 12314604155 023027 0ustar00mihaimihai000000 000000 PNG  IHDR\^sRGBbKGD pHYs  tIME) 7IDAT(͒1 8MT(#M%`lg԰{^ S*IENDB`equalx-0.7.1/resources/icons/tabBar/derivs/.directory000644 001750 001750 00000000065 12314604155 023061 0ustar00mihaimihai000000 000000 [Dolphin] AdditionalInfo=3 Timestamp=2010,2,6,18,3,9 equalx-0.7.1/resources/symbols/Arrows/longmapsto.png000644 001750 001750 00000000305 12314604155 023105 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME5,EIDAT8Ա PsWTHNx` J.ʵo$74*4@Јy0G:#ar/IENDB`equalx-0.7.1/ui/HistoryPanel/000755 001750 001750 00000000000 12314604155 016275 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/symbols/Arrows/uparrow.png000644 001750 001750 00000000265 12314604155 022426 0ustar00mihaimihai000000 000000 PNG  IHDR\^sRGBbKGD pHYs  tIME ;5IDAT(c?.ĀPI?VIkc,Fd`|zxehK2K B&IENDB`equalx-0.7.1/resources/icons/tabBar/derivs/eq02.png000644 001750 001750 00000001222 12314604155 022325 0ustar00mihaimihai000000 000000 PNG  IHDR#v*1a pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;#tEXtLatex\frac{\partial y}{\partial x}(tEXtResolution118- IDATH;R@ ? &470 ' 5-Gt) 7-%(#$)әb,o63g<ؕ"(7>y ]24u!KୋWuvDq2톞NL,G`%+eWר&o2y F$g4+ M-f6ɮ5rydƑC'S IQ7K_g=.+\ٝX뷙ʼ+gIENDB`equalx-0.7.1/resources/symbols/RelationOperators/preceq.png000644 001750 001750 00000000321 12314604155 024376 0ustar00mihaimihai000000 000000 PNG  IHDR F)sRGBbKGD pHYs  tIME2 MhQIDAT(Ւ10 }ZehU@tk,DZ8"~ $ju#vrTTR58RfUw" wIXL8] IENDB`equalx-0.7.1/resources/000755 001750 001750 00000000000 12314604155 015251 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/icons/equalx/equalx-48x48.png000644 001750 001750 00000003766 12314604155 022501 0ustar00mihaimihai000000 000000 PNG  IHDR00WsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<sIDAThXkP>ZYH`la q0ngc`i&qB&nc&S8cc3u$<ꇰ)4%!B+t5ͮZ.~i{0|/uOeKeKeKeK ""d"x 68nٝ~ywL;AϷowx REzuίt0iU&T-/IaLk'ۍZ 4H%_j:~w38Ԉ}NNd),p`9IK# ӠF젿at=7pld`֠E*.R4NC(!l_)i?min^c%skzv鿱5"x!ę7UrgVjK+DSs}ffbnEE-W DœdnSFxs0hJϊ A$Va%?|opϽE)BU9B-M/wT}#jH&+AU#Iu_忸p ks6)z9 q|q/Onq *Z-;)I&$.u=z}'e:FLQ~xQgsdр KKҐEU>:;;/\BXub]&eC6NTaAZoT|I>c0l۶m"(u2q\'^?-o>3t6Efmw +,KI@bX,~&&+'SWJr{]&<9p(N@v%l566:;nՏca :ҡ1G;#qNXӗnK`%-ۻ)*q\}s|BO c>:<)/y]D ބ׺ie/D7(Bs$3FN@##!bF}<:# |Z?Tf_Z+C86Sb[0 EȌXYwУ󡡡`2jbF*U ;~eodvUV}YP<6kX,^%syR E_=uN&#Yvvv\.21':::hu6pўLs=)mJk %%v(jѣa sB1)CÞlM 5|ѷknO*:VP&8<>{tsWW1֖ !}Gڼv߯(?f(&;SC?,>ڜmM9D40熖]&P~/If(DL:F64fZW;8vrU$cF[>鯎 4pl1FE8!*AĹ7||GU3Pj2rcxO~dxd=wrY1-/b<3{k ꍬrEg"]QV߈\m,üshEM>tk)O k*5L/2f*9!<>>'(n1NNv?@i>!CA7-+6IeQ,ǁ.,;jӨv籾>?I8< f`|:55# x, F/W^HkIGW :\YJ4z8/~KCʱO?ksw}lSI@NN! [Gm$ަ)GPkH&%u*kMe+ Їh!qBXz~ }g{O'Pl)wH[\\H-7SGzc GͶI`f-|A^f{Ͷ7Rks3PO@Уl!^XeM2[@O ~KI[B5s2P"^KJs=H5 0$bmȞ>NpڞS =J`"0tUfqh qKAa&!7}>O@)_ *o#Y<.0CCQ_=`KU &1GHvz=-&e{Ax>XE!xo@֙ q=/o' $ 'kwC! Qw6[ C+4dr4{Hi9 9YNzfG7&Gã~doH~)B^6и0 bف`˖j_$3RXG@m5 oՒc= ˕ &z֭"m]KÇ_$oDd!$IQ$Ď]r.C@fR[ȿ6 ¯:֚cDr*=LB{ݮےډtw-9nL2 )"Z@QMӄ_Hٯ\mMY [ӥ% R@BlAwgTà$`nRC BeH;bl:c 76yN2*Bڢdw 9͵Rz۳Fy.#`X!~ +w ,#U5 0}F?K1F܈lnH*ԁ/1~rI5?#4UTodKڨ EZ.ICn/^ pя_TR]NIRmnHa|>\R{Mj~rwv?he"zTXtSoftwarex+//.NN,H/J6XS\IENDB`equalx-0.7.1/src/000755 001750 001750 00000000000 12314604155 014026 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/symbols/BigGreek/delta2.png000644 001750 001750 00000000311 12314604155 022274 0ustar00mihaimihai000000 000000 PNG  IHDR K7sRGBbKGD pHYs  tIME(+hlIIDAT(1 @ ?c`*,N^ jvd U:i(IiUUښT)6%ޮ_?|M+IENDB`equalx-0.7.1/resources/icons/equalx/000755 001750 001750 00000000000 12314604155 017663 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/icons/000755 001750 001750 00000000000 12314604155 016364 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/symbols/Arrows/rightarrow2.png000644 001750 001750 00000000310 12314604155 023170 0ustar00mihaimihai000000 000000 PNG  IHDR<sRGBbKGD pHYs  tIME/HIDAT81 0 CQ?SB)jj`d# lA;L PY|{;\Φ[%vIENDB`equalx-0.7.1/resources/icons/preferences/render_mode_display.png000644 001750 001750 00000000751 12314604155 025406 0ustar00mihaimihai000000 000000 PNG  IHDRasBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<fIDAT8K@_ ɡc=z!``-t(tjbHJs"ǻ}8 rpۣL,✟Aq-Ji.ʴvi:Fď$I")C;ְ.nzwǚU[(] ${xǷn ./NvkdHs ˁԐ9>5.c [4 ?l@h>?z6 ^BO)嚔H)}OBp8 :N0?Bc3ƌ1fB:0 r8N~R?!x&(d:;/ʻOIENDB`equalx-0.7.1/resources/icons/tabBar/sets/eq01.png000644 001750 001750 00000001256 12314604155 022015 0ustar00mihaimihai000000 000000 PNG  IHDR%&C R pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;tEXtLatex\bigcup_{i=1}^{n}{X_i}QtEXtResolution101MRIDATXm0 AYn# aco ` ITPl<@"`7Oa*P7r V lSo΢)/q蜢8kvy}j[ hP)@D)]Ϧ1PO& Wc;} I#y\Br}wqp.(ݓ.?ocEqT{*VVH E>NToPǸVW֞GJ ~dط" l]u:ww@AUW^K%2DY٥7ȳw:՝Mx>݌2%B]JFex ԛx+?rޤfw OA Od{O/lGXiӔIENDB`equalx-0.7.1/src/equationimage.cpp000644 001750 001750 00000000077 12314604155 017366 0ustar00mihaimihai000000 000000 #include "equationimage.h" EquationImage::EquationImage() { } equalx-0.7.1/resourceFiles.qrc000644 001750 001750 00000013572 12314604155 016570 0ustar00mihaimihai000000 000000 resources/icons/tabBar/derivs/eq01.png resources/icons/tabBar/derivs/eq02.png resources/icons/tabBar/derivs/eq03.png resources/icons/tabBar/derivs/eq04.png resources/icons/tabBar/derivs/eq05.png resources/icons/tabBar/derivs/eq06.png resources/icons/tabBar/matrix/eq01.png resources/icons/tabBar/matrix/eq02.png resources/icons/tabBar/matrix/eq03.png resources/icons/tabBar/matrix/eq04.png resources/icons/tabBar/stats/eq01.png resources/icons/tabBar/stats/eq02.png resources/icons/tabBar/stats/eq03.png resources/icons/tabBar/stats/eq04.png resources/icons/tabBar/stats/eq05.png resources/icons/tabBar/stats/eq06.png resources/icons/tabBar/stats/eq07.png resources/icons/tabBar/chemistry/eq01.png resources/icons/tabBar/chemistry/eq02.png resources/icons/tabBar/chemistry/eq03.png resources/icons/tabBar/chemistry/eq04.png resources/icons/tabBar/chemistry/eq05.png resources/icons/tabBar/sets/eq01.png resources/icons/tabBar/sets/eq02.png resources/icons/tabBar/geometry/eq01.png resources/icons/tabBar/geometry/eq02.png resources/icons/tabBar/geometry/eq03.png resources/icons/tabBar/geometry/eq04.png resources/icons/tabBar/trig/eq01.png resources/icons/tabBar/trig/eq02.png resources/icons/tabBar/trig/eq03.png resources/icons/tabBar/trig/eq04.png resources/icons/tabBar/physics/eq01.png resources/icons/tabBar/physics/eq02.png resources/icons/tabBar/physics/eq03.png resources/icons/tabBar/physics/eq04.png resources/icons/menu/help-about.png resources/icons/menu/help-contents.png resources/icons/menu/symbols-panel.png resources/icons/menu/document-save-as.png resources/icons/menu/document-open.png resources/icons/menu/application-exit.png resources/icons/menu/document-new.png resources/icons/menu/document-save.png resources/icons/menu/bookmarks-organize.png resources/templates/template-preamble.tex resources/icons/menu/fill-color.png resources/icons/tabBar/algebra/eq01.png resources/icons/tabBar/algebra/eq02.png resources/icons/tabBar/algebra/eq03.png resources/icons/tabBar/algebra/eq04.png resources/icons/tabBar/algebra/eq05.png resources/icons/tabBar/algebra/eq06.png LICENSE resources/icons/menu/configure.png resources/icons/menu/edit-copy.png resources/icons/menu/edit-cut.png resources/icons/menu/edit-delete.png resources/icons/menu/edit-paste.png resources/icons/menu/edit-redo.png resources/icons/menu/edit-undo.png resources/icons/menu/templates.png resources/icons/menu/find.png resources/icons/menu/find-replace.png resources/icons/menu/arrow-left.png resources/icons/menu/arrow-right.png resources/icons/menu/dialog-close.png resources/icons/menu/highlight.png resources/icons/menu/view-refresh.png resources/icons/editor/error.png resources/icons/preamble.png resources/icons/preferences/properties.svg resources/icons/spinner.gif resources/icons/preferences/render_mode_align.png resources/icons/preferences/render_mode_display.png resources/icons/preferences/render_mode_inline.png resources/icons/preferences/render_mode_text.png resources/icons/equalx/equalx-128x128.png resources/icons/filetypes/eps.png resources/icons/filetypes/jpg.png resources/icons/filetypes/pdf.png resources/icons/filetypes/png.png resources/icons/filetypes/ps.png resources/icons/filetypes/svg.png resources/icons/filetypes/txt.png resources/symbols/symbols.ini resources/icons/menu/clear_left.png resources/icons/editor/arrow-down.png resources/icons/editor/arrow-up.png resources/icons/menu/bookmark.png resources/stylesheet.qss resources/icons/preferences/advanced.png resources/icons/preferences/editor.png resources/icons/preferences/general.png resources/icons/preferences/preview.png resources/icons/menu/bookmarked.png resources/icons/bookmarks/bookmarks.png resources/icons/bookmarks/folder.png resources/icons/menu/history.png resources/createLibraryTables.sql resources/equalx.ico THANKS equalx-0.7.1/resources/icons/tabBar/geometry/000755 001750 001750 00000000000 12314604155 021412 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/icons/tabBar/algebra/eq06.png000644 001750 001750 00000000614 12314604155 022436 0ustar00mihaimihai000000 000000 PNG  IHDRF3 pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;tEXtLatex\frac{ 1}{ 2}  tEXtResolution95W;IDAT(ұ0 Зl))S]2BfBKP -,hbk,`uYp-68uT1oPHXp}V0`tb#jĄcǤhC@U4оzO6?#\FIENDB`equalx-0.7.1/resources/symbols/Sets/mathbb_Q.png000644 001750 001750 00000000347 12314604155 022106 0ustar00mihaimihai000000 000000 PNG  IHDR K7sRGBbKGD pHYs  tIME27?gIDAT(SA 039D0*6FI5ZS(I KO}0{w%%b;zMDhCՊ2%hb xYIENDB`equalx-0.7.1/resources/symbols/Greek/upsilon.png000644 001750 001750 00000000304 12314604155 022172 0ustar00mihaimihai000000 000000 PNG  IHDR B'sRGBbKGD pHYs  tIME 2)DIDAT(1 0IAڱЌ!j"AV\JB UڦJMxJGmd(#xIENDB`equalx-0.7.1/resources/symbols/Accents/bar.png000644 001750 001750 00000000300 12314604155 021564 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME3>@IDAT8c?5 >IFFF?#V=˴7n C|1KLJu G M^b77T&2IENDB`equalx-0.7.1/include/000755 001750 001750 00000000000 12314605347 014666 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/symbols/Arrows/downarrow2.png000644 001750 001750 00000000306 12314604155 023027 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME$ zFIDAT(Ւ 1}*R((e@f!^v/ͼ,ힰD\7qݓk#ӄGMm٩IENDB`equalx-0.7.1/resources/symbols/RelationOperators/bowtie.png000644 001750 001750 00000000331 12314604155 024411 0ustar00mihaimihai000000 000000 PNG  IHDROWsRGBbKGD pHYs  tIME ;4t·vYIDAT8S K).3URfq`HfIDZ L8%ZՒ!ihjSn! A/9öIENDB`equalx-0.7.1/ui/BookmarksPanel/DialogPreferencesFolder.ui000644 001750 001750 00000004762 12314604155 023651 0ustar00mihaimihai000000 000000 DialogPreferencesFolder Qt::WindowModal 0 0 343 280 0 0 Dialog true &Name: editName Qt::Horizontal QDialogButtonBox::Cancel|QDialogButtonBox::Save &Description: editDescription buttonBox accepted() DialogPreferencesFolder accept() 248 254 157 274 buttonBox rejected() DialogPreferencesFolder reject() 316 260 286 274 equalx-0.7.1/src/BookmarksPanel/BookmarksWidget.cpp000644 001750 001750 00000031752 12314604155 022546 0ustar00mihaimihai000000 000000 /* * Copyright 2014 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include #include "File.h" #include "FileInfo.h" #include "Library/Library.h" #include "BookmarksPanel/BookmarkItem.h" #include "BookmarksPanel/BookmarksItemModel.h" #include "BookmarksPanel/BookmarksViewItemDelegate.h" #include "BookmarksPanel/BookmarksWidget.h" #include "BookmarksPanel/DialogPreferencesFolder.h" #include "BookmarksPanel/DialogPreferencesBookmark.h" #include "ui_BookmarksWidget.h" BookmarksWidget::BookmarksWidget(QWidget *parent) : QWidget(parent), ui(new Ui::BookmarksWidget), mCopiedRow(), mIsCutActive(false) { ui->setupUi(this); ui->widgetSearchImage->setHidden(true); mDgPreferencesFolder = new DialogPreferencesFolder(this); mDgPreferencesBookmark= new DialogPreferencesBookmark(this); // Bookmarks View Page mModel = new BookmarksItemModel(LibraryManager::Instance()); BookmarksViewItemDelegate *bviDelegate = new BookmarksViewItemDelegate(this); ui->treeView->setItemDelegate(bviDelegate); ui->treeView->setAlternatingRowColors(true); //ui->treeView->setHeaderHidden(true); ui->treeView->setContextMenuPolicy(Qt::ActionsContextMenu); ui->treeView->setSelectionMode(QAbstractItemView::SingleSelection); ui->treeView->setDragEnabled(true); ui->treeView->setAcceptDrops(true); ui->treeView->setDropIndicatorShown(true); ui->treeView->setDragDropMode(QAbstractItemView::InternalMove); ui->treeView->setExpandsOnDoubleClick ( true ); ui->treeView->setItemsExpandable(true); ui->treeView->setModel(mModel); // Search Page mSearchModel = new QStandardItemModel(this); BookmarksViewItemDelegate *bviDelegate2 = new BookmarksViewItemDelegate(this); ui->listView->setItemDelegate(bviDelegate2); ui->listView->setModel(mSearchModel); setWindowTitle("Bookmarks"); setupContextMenuActions(); setupBookmarksSearchFields(); connect(ui->treeView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(onDoubleClick(QModelIndex)) ); connect(ui->listView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(onDoubleClick(QModelIndex)) ); connect(ui->bookmarkSearchEdit, SIGNAL(textChanged(QString)), this, SLOT(resetAutoSearchTimer(QString)) ); connect(&mAutoSearchTimer, SIGNAL(timeout()), this, SLOT(searchBookmarks()) ); setAcceptDrops(true); } BookmarksWidget::~BookmarksWidget() { delete ui; mModel->deleteLater(); } void BookmarksWidget::setupContextMenuActions() { QAction* actOpen = new QAction("Open", ui->treeView); ui->treeView->addAction(actOpen); QAction* actSep1 = new QAction(ui->treeView); actSep1->setSeparator(true); ui->treeView->addAction(actSep1); QAction* actNewFolder = new QAction("New Folder", ui->treeView); ui->treeView->addAction(actNewFolder); QAction* actSep2 = new QAction(ui->treeView); actSep2->setSeparator(true); ui->treeView->addAction(actSep2); QAction* actCut = new QAction("Cut", ui->treeView); ui->treeView->addAction(actCut); QAction* actCopy = new QAction("Copy", ui->treeView); actCopy->setShortcut(Qt::CTRL | Qt::Key_C); ui->treeView->addAction(actCopy); QAction* actPaste = new QAction("Paste", ui->treeView); ui->treeView->addAction(actPaste); QAction* actSep3 = new QAction(ui->treeView); actSep3->setSeparator(true); ui->treeView->addAction(actSep3); QAction* actDelete = new QAction("Delete", ui->treeView); ui->treeView->addAction(actDelete); QAction* actSep4 = new QAction(ui->treeView); actSep4->setSeparator(true); ui->treeView->addAction(actSep4); QAction* actProp = new QAction("Properties", ui->treeView); ui->treeView->addAction(actProp); connect(actOpen, SIGNAL(triggered()), this, SLOT(onOpen()) ); connect(actNewFolder, SIGNAL(triggered()), this, SLOT(onNewFolder()) ); connect(actCut, SIGNAL(triggered()), this, SLOT(onCut()) ); connect(actCopy, SIGNAL(triggered()), this, SLOT(onCopy()) ); connect(actPaste, SIGNAL(triggered()), this, SLOT(onPaste()) ); connect(actDelete, SIGNAL(triggered()), this, SLOT(onDelete()) ); connect(actProp, SIGNAL(triggered()), this, SLOT(onProperties()) ); } void BookmarksWidget::setupBookmarksSearchFields() { ui->bookmarkSearchByButton->setPopupMode(QToolButton::InstantPopup); QMenu *searchByMenu = new QMenu(ui->bookmarkSearchByButton); QAction * actSearchByTD = searchByMenu->addAction(tr("By Title and Description")); actSearchByTD->setData(LibraryManager::SEARCH_BY_TITLE_DESCRIPTION); actSearchByTD->setCheckable(true); QAction * actSearchByT = searchByMenu->addAction(tr("By Title") ); actSearchByT->setData(LibraryManager::SEARCH_BY_TITLE); actSearchByT->setCheckable(true); QAction * actSearchByD = searchByMenu->addAction(tr("By Description") ); actSearchByD->setData(LibraryManager::SEARCH_BY_DESCRIPTION); actSearchByD->setCheckable(true); mActionSearchByContent = searchByMenu->addAction(tr("By Content") ); mActionSearchByContent->setData(LibraryManager::SEARCH_BY_CONTENT); mActionSearchByContent->setCheckable(true); mActionsGroupSearchBy = new QActionGroup(searchByMenu); mActionsGroupSearchBy->addAction(actSearchByTD); mActionsGroupSearchBy->addAction(actSearchByT); mActionsGroupSearchBy->addAction(actSearchByD); mActionsGroupSearchBy->addAction(mActionSearchByContent); actSearchByTD->setChecked(true); connect(mActionsGroupSearchBy, SIGNAL(triggered(QAction*)), this, SLOT(searchBookmarks()) ); ui->bookmarkSearchByButton->setMenu(searchByMenu); } /*! This doesnt always work, * because the dropped files can be SVG, PDF, EPS, TXT * void BookmarksWidget::dragEnterEvent(QDragEnterEvent *event) { if (event->mimeData()->hasUrls()){ event->acceptProposedAction(); ui->labelSearchImage->clear(); ui->labelSearchImage->setText(tr("Drop Equation Here")); ui->widgetSearch->setVisible(false); ui->widgetSearchImage->setVisible(true); } } void BookmarksWidget::dragLeaveEvent(QDragLeaveEvent *event) { if(!(ui->labelSearchImage->pixmap()) ){ ui->widgetSearch->setVisible(true); ui->widgetSearchImage->setVisible(false); } } void BookmarksWidget::dropEvent(QDropEvent *ev) { QUrl droppedUrl = ev->mimeData()->urls().at(0); if(!droppedUrl.isValid()) return; EqualX::FileInfo eqMetaData; QString filePath = droppedUrl.toLocalFile(); if(!EqualX::File::fetchInfo(filePath, &eqMetaData)){ qDebug() << "BookmarksWidget::dropEvent() Couldn't read File metadata!"; ui->labelSearchImage->setText("Not an EqualX equation"); return; } // dropped Url is an EqualX file // showing the equation QImage eqImg(filePath); eqImg = eqImg.scaled(QSize(134,134), Qt::KeepAspectRatio, Qt::SmoothTransformation); ui->labelSearchImage->setPixmap(QPixmap::fromImage(eqImg)); // searching bookmarks ui->bookmarkSearchEdit->setText(eqMetaData.equation()); mActionSearchByContent->setChecked(true); // signals are emitted and handled in searchBookmarks(); } */ void BookmarksWidget::onDoubleClick(const QModelIndex& index) { LibraryModelData curRow = qvariant_cast(index.data()); if(curRow.isBookmark()){ emit activated(curRow.id); } } void BookmarksWidget::onOpen() { QModelIndex selected = ui->treeView->selectionModel()->currentIndex(); if(!selected.isValid()) return; LibraryModelData curRow = qvariant_cast(selected.data()); if(curRow.isFolder()){ ui->treeView->setExpanded(selected, !ui->treeView->isExpanded(selected)); } if(curRow.isBookmark()){ emit activated(curRow.id); } } void BookmarksWidget::onNewFolder() { LibraryManager::Instance()->addBookmarkFolder(tr("New Folder")); } void BookmarksWidget::onCut() { onCopy(); mIsCutActive = true; } void BookmarksWidget::onCopy() { mIsCutActive = false; qDebug() << "onCopy()"; QModelIndex selected = ui->treeView->selectionModel()->currentIndex(); if(!selected.isValid()) return; mCopiedRow = selected; } void BookmarksWidget::onPaste() { qDebug() << "onPaste()"; //const QModelIndexList indexList = ui->treeView->selectionModel()->selectedIndexes(); QModelIndex selected = ui->treeView->selectionModel()->currentIndex(); if(!selected.isValid() || !mCopiedRow.isValid()) return; qDebug() << "BookmarksItemModel::copy()"; BookmarkItem* item = mModel->itemFromIndex(mCopiedRow); BookmarkItem* parentItem = mModel->itemFromIndex(selected); if(!item || !parentItem) return; int itemId = item->data().id; int parentId = parentItem->data().id; switch(item->data().type){ case LibraryModelData::TypeFolder:{ LibraryManager::Instance()->copyBookmarkFolder(itemId, parentId); if(mIsCutActive){ LibraryManager::Instance()->removeBookmarkFolder(itemId); mIsCutActive = false; } break; } case LibraryModelData::TypeBookmark:{ LibraryManager::Instance()->copyBookmark(itemId, parentId); if(mIsCutActive){ LibraryManager::Instance()->removeBookmark(itemId); mIsCutActive = false; } break; } default: break; } } void BookmarksWidget::onDelete() { QModelIndex index = ui->treeView->selectionModel()->currentIndex(); if(!index.isValid()) return; BookmarkItem* item = mModel->itemFromIndex(index); if(item->data().isFolder()) LibraryManager::Instance()->removeBookmarkFolder(item->data().id); if(item->data().isBookmark()) LibraryManager::Instance()->removeBookmark(item->data().id); } void BookmarksWidget::onProperties() { QModelIndex selected = ui->treeView->selectionModel()->currentIndex(); if(!selected.isValid()) return; LibraryModelData itemData = mModel->itemFromIndex(selected)->data(); if(itemData.isFolder()){ BookmarkFolder folder = LibraryManager::Instance()->getBookmarkFolder(itemData.id); mDgPreferencesFolder->setName(folder.name); mDgPreferencesFolder->setDescription(folder.description); int status = mDgPreferencesFolder->exec(); if(status==QDialog::Accepted){ folder.name = mDgPreferencesFolder->name(); folder.description = mDgPreferencesFolder->description(); LibraryManager::Instance()->updateBookmarkFolder(folder); } } else if(itemData.isBookmark()){ Bookmark b = LibraryManager::Instance()->getBookmark(itemData.id); mDgPreferencesBookmark->setTitle(b.title); mDgPreferencesBookmark->setDescrition(b.description); mDgPreferencesBookmark->setParentFolder(b.idparent); if(mDgPreferencesBookmark->exec()==QDialog::Accepted){ int parentId = mDgPreferencesBookmark->parentFolder(); b.title = mDgPreferencesBookmark->title(); b.description=mDgPreferencesBookmark->description(); LibraryManager::Instance()->updateBookmark(b); if(parentId != b.idparent){ // if parent changed LibraryManager::Instance()->moveBookmark(b.id, parentId); b.idparent = parentId; } } } } void BookmarksWidget::resetAutoSearchTimer(const QString &/*text*/) { mAutoSearchTimer.start(400); } void BookmarksWidget::searchBookmarks() { mAutoSearchTimer.stop(); QString searchText = ui->bookmarkSearchEdit->text(); qDebug() << "Searching bookmarks for:"<stackedWidget->setCurrentIndex(0); return; } mSearchModel->clear(); ui->stackedWidget->setCurrentIndex(1); LibraryManager::SEARCH_MODE searchMode = (LibraryManager::SEARCH_MODE)mActionsGroupSearchBy->checkedAction()->data().toInt(); LibraryRowsList rows = LibraryManager::Instance()->searchBookmarks(searchText, searchMode); if(rows.isEmpty()){ //ui->stackedWidget->setCurrentIndex(0); return; } foreach(LibraryModelData row, rows){ QStandardItem* item = new QStandardItem(); item->setData(row, Qt::DisplayRole); mSearchModel->appendRow(item); } } equalx-0.7.1/resources/icons/filetypes/svg.png000644 001750 001750 00000003722 12314604155 021701 0ustar00mihaimihai000000 000000 PNG  IHDR szzsBIT|d pHYskhtEXtSoftwarewww.inkscape.org<OIDATXLT?!8b͸ 2҈1jQ$11XehcӲ6$ֶY ښ`n]WHB%4(U0Λ9$7{;tr5O* )I)iGx O8BD{v/ y!ϗ]W*= TlX?(@ _3VVV& 'U`5AɊq"O s#B˓0AEUѣGsY>B AMBHhP#$'_ٳgjEtGP~^T;~^L KzuP: Xh`hhɣ288OVgeeQTTDTtZ 04ժ۷oȃ R]]4޽N?G,en5+Wd՚hvmf6Z۷NeX~=(~Vus"&JJJ$''2N+WDOh{~s }xeeejUVQ__b"y1jJ ccԫPQQAjj*׮MfP"߸qT:/-jȗ@.|hG vL&zIh4\DA,K>y9 @RcRqܹN(s.iiiO?`dL_|mP:`0H$`0$%DQ8~KNNfÆ XVΝ;GII VÏ?IVy… yrrrePFiSN~'hڴiam=}tF#PP(ll6( ^z䁥UxZ̟?Ş={hnnBii).#G(//rr(//'p\.innfϞ=\.N'3g 2LzvVZY|9f͢[mgZ߯呗ǁhnn&%%;w`+ChD6 aǎ\t[riv܉ ''G{<vSغu+/wz=Ʉ %xv͛G4̙3PUU`h4266c8fϞb0sL^|QӧOk-W&C8 ap:( Ntn7ddd, ({o!* ttt`4bTTTp->|H}}==== <k^7Ɋ+(((ǎc`` F'&~?>2k׮e޽TUUaimm͛23gwܡO=]4J(pPPP 9HVVlٲEED] dddH @ ""/""Ȓ%Kd EDdݺut:%))I>Ys$^&6M9):N:;;):N֬Y`b j qbݎgpp\@~& p8֦ٴ!"xŋktRf̘(|/Zt:/^ѣ`6ijjҒ]{^0pa.\@mm-.233v\"^Wrss5bMV\\sssغň1 y<ٴiϧzzz4SYY'޽{qFx q7A:9<Õ'Dg$<^~2`jc) !2t`}IENDB`equalx-0.7.1/resources/icons/tabBar/algebra/.directory000644 001750 001750 00000000066 12314604155 023163 0ustar00mihaimihai000000 000000 [Dolphin] AdditionalInfo=3 Timestamp=2010,2,1,18,2,51 equalx-0.7.1/src/HistoryPanel/000755 001750 001750 00000000000 12314604155 016447 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/symbols/Operators/vee.png000644 001750 001750 00000000310 12314604155 022176 0ustar00mihaimihai000000 000000 PNG  IHDR F)sRGBbKGD pHYs  tIME ;>HIDAT(A PEQo@B#rQom%~.t:+={ee6G:L'ÔIENDB`equalx-0.7.1/resources/symbols/Arrows/longleftarrow.png000644 001750 001750 00000000274 12314604155 023614 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME6] * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef LIBRARY_H #define LIBRARY_H #include #include #include "LibraryData.h" class LibraryManager : public QObject { Q_OBJECT public: enum SEARCH_MODE{ SEARCH_BY_TITLE_DESCRIPTION, SEARCH_BY_TITLE, SEARCH_BY_DESCRIPTION, SEARCH_BY_CONTENT }; static LibraryManager* Instance(); QString errorStr() const {return mErrStr;} /* Add an equation with 'title' and 'description' in bookmarks * which its parent is specified by 'parentId'. If successful, * it copies the file 'file' to the folder which is represented * in the database by 'parentId'. If 'parentId'= 1, then its * parent is the root node. * * If everything went well, it returns the id of the equation in DB. * If not it returns -1; */ int addBookmark(const QString& title, const QString& description, const QString& file, int parentId=1); int addBookmark(const Bookmark& bookmark, int parentId=1); /* Add a folder to bookmarks in database. If successful, create * a subfolder to the folder which has id. If 'parentId'= 1, then its * parent is the root node. * * If everything went well it returns the id of the folder in DB * If not it returns -1; */ int addBookmarkFolder(const QString& name, const QString& description=QString(""), int parentId=1); int addBookmarkFolder(const BookmarkFolder& folder, int parentId=1); /* Add an equation specified by 'title' and 'file' in history. If successful, * it copies the file 'file' to history folder. * * If everything went well, it returns the id of the equation in history. * If not it returns -1; */ int addHistoryItem(const QString& title, const QString& file); LibraryRowsList getAllHistory(); const HistoryRow getHistoryRow(int id); Bookmark getBookmark(int id); BookmarkFolder getBookmarkFolder(int id); // returns a list with all children (all bookmarks and subfolders) contained in parent folder LibraryRowsList getChildren(int idparent=1); // returns a list with all folders in bookmarks LibraryRowsList getAllBookmarkedFolders(); int childrenCountInFolder(int id=1); // returns the direct number of children of folder (subfolders+bookmarks) int historySize(); // returns the number of items in history // copy bookmark with id 'id' to folder with id 'idparent' // returns the new copied bookmark Bookmark copyBookmark(int id, int idparent=1); // copy folder (including all subnodes) with 'id' to folder 'idparent' // returns the new copied folder BookmarkFolder copyBookmarkFolder(int id, int idparent=1); /* Move Actions */ // these will emit 2 bookmarkFolderChanged() signals: // one for the old folder, second for the new folder bool moveData(const LibraryModelData& data, int newParentId); bool moveBookmark(int id, int newParentId); bool moveBookmarkFolder(int id, int newParentId); /* Update fields (no reparenting) */ bool updateData(const LibraryModelData& data); bool updateBookmark(const Bookmark &bookmark); bool updateBookmarkFolder(const BookmarkFolder &folder); /* Remove Actions */ bool removeBookmark(int id); bool removeBookmarkFolder(int id); // returns the absolute path to the root library directory QString path() const; LibraryRowsList searchBookmarks(QString searchText, SEARCH_MODE searchType=SEARCH_BY_TITLE_DESCRIPTION); public slots: bool clearHistory(); signals: void bookmarkAdded(const Bookmark &); void bookmarksChanged(); void bookmarkFolderChanged(const QString& dirPath); void historyChanged(); void historyChanged(const HistoryRow &); private: explicit LibraryManager(QObject *parent = 0); LibraryManager(LibraryManager const&); // copy constructor not implemented LibraryManager& operator=(LibraryManager const&); // assignment operator not implemented virtual ~LibraryManager(); bool setup(); bool createLibrary(const QString& path); bool createDatabaseTablesFromFile(const QString& sqlFile); int lastId(const QString& tableName); bool removeSystemDir(const QString& dirName); // removes a system directory recursively bool removeBookmarkFromFS(int id, const QString &filetype); void copyChildren(int ofFolderId, int toNewFolderId); protected: QSqlDatabase mDB; QString mErrStr; // error string QString mBookmarksDirStr; // absolute path to the library dir QString mHistoryDirStr; // absolute path to history dir private: static LibraryManager* mInstance; }; #endif // LIBRARY_H equalx-0.7.1/resources/symbols/Accents/widehat.png000644 001750 001750 00000000334 12314604155 022454 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGDC pHYs  tIME 9m]\IDAT8 0CJ"tՋBcjp3JnR#@s]'f{6L(vv@:3\6zTM E͟)Df) YIENDB`equalx-0.7.1/resources/symbols/Sets/Im.png000644 001750 001750 00000000347 12314604155 020736 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME 7 rprgIDAT(R1 3rTL !(HNhHb ȹyOκfV"Ie&Ƙ!\TP\y{_RIENDB`equalx-0.7.1/resources/symbols/Arrows/swarrow.png000644 001750 001750 00000000333 12314604155 022427 0ustar00mihaimihai000000 000000 PNG  IHDRgsRGBbKGD pHYs  tIME 2K9[IDAT8; DAy4]M0!dLN@7$ ̱ 2p%?W|qUYek<xAF?R3:'oIENDB`equalx-0.7.1/resources/symbols/Arrows/searrow.png000644 001750 001750 00000000342 12314604155 022405 0ustar00mihaimihai000000 000000 PNG  IHDRgsRGBbKGD pHYs  tIME-bIDAT8A@ PW/Ai7lNdɬ$#" QdAY"fdF/ŕ醸xBQ/͂uyf*: #59'NzIENDB`equalx-0.7.1/resources/symbols/RelationOperators/dashv.png000644 001750 001750 00000000257 12314604155 024234 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME)+xt /IDAT(c?1H0 v7 *?p5Hf 'wIENDB`equalx-0.7.1/resources/symbols/Greek/omega.png000644 001750 001750 00000000310 12314604155 021566 0ustar00mihaimihai000000 000000 PNG  IHDR F)sRGBbKGD pHYs  tIME/^GHIDAT( C{?bT țn1ER٭ZS2Ȱ$2q8r1ha}:zG~ !#gIENDB`equalx-0.7.1/resources/symbols/Arrows/rightharpoondown.png000644 001750 001750 00000000275 12314604155 024324 0ustar00mihaimihai000000 000000 PNG  IHDRgsRGBbKGD pHYs  tIME.;d=IDAT81 0äY]K^:Fۊ.69#Ep=W:Z;Y€|Ԅʮ!*ڐ5NN8uc]탣Twړ|K+<IENDB`equalx-0.7.1/resources/symbols/Operators/div.png000644 001750 001750 00000000270 12314604155 022206 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME&:nPH48IDAT(A _N.*jt nfʰ w~鱵5E!]yIENDB`equalx-0.7.1/resources/icons/tabBar/algebra/eq04.png000644 001750 001750 00000001745 12314604155 022442 0ustar00mihaimihai000000 000000 PNG  IHDRKysBIT|d pHYs  tEXtBackgroundtransparent]tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.5.1ke(tEXtLatex\frac{-b \pm \sqrt{b^2 -4ac} }{2a}WzTXtPreamblex;0 CO!wxP1,!]8<^'ʂtYcFp XF$Teٽ֙* 'ci`BeA=~g+Xbi]Pƙ18 ,-~dA tEXtResolution3Ly"IDATXq0ˤ&@@;x.w'd.BIฃawpܙ^ehu+݊@ XE'@ 8Sj ງ;@#o?]F#_2dui%H %}sP$ @SNYNE<Ŧ S]Zڶuk,= 2Mo XSC^8N kʁΐpVŴ*dyDf%15$WѾR V^WL3>7Mny #U:|y~&^(-X`۰o=컸N=Ӕg d 9j:4cihJvא.HK$X}1a2UpXBX1]oul2~Dͽۂ"3Hq8y 99 Y%KgUKepsI搆F|v۱j)g[dvs'eyr92>F>!¸u IENDB`equalx-0.7.1/resources/symbols/Delimiters/lbracket_rbracket.png000644 001750 001750 00000000306 12314604155 025213 0ustar00mihaimihai000000 000000 PNG  IHDR V2/sRGBbKGD pHYs  tIME&CZFIDAT8퓱 9s]*pk߿eAL2NbzTy>{.t㠯=M?x=qDIENDB`equalx-0.7.1/resources/icons/menu/document-save-as.png000644 001750 001750 00000002321 12314604155 023207 0ustar00mihaimihai000000 000000 PNG  IHDRĴl;sBIT|d pHYsvv}ՂtEXtSoftwarewww.inkscape.org<NIDATxڵmlE{* J[l b@LK/Z*؊Zb%! /@BP 1AH  UFP- \KKzwۻٻu6Yf63>8t]`ieUO ȱm}s=N%~C((J 7[عm H`NCC]ݔc~\ ]ะ0b3veeb{#yi:!( Wҭ D.1԰g{W+oM_&<Ӏ?\D$*k]Op,LWC dYú Rlm0XZC$GoX茅g; TmcaS-o9+9_U$` `9=13i?:#&uJ.=qgzV,QXE (3y[lfױs3ޢy&xf*65A!I\Ī-R>EF~&ol%A&+ޱ,sBV^⦪du]2nL0$28"R̚ZH<4iΟ"+/;n~LKNK/OSiڗjG͵YHE D~*Sn1M|guR\m s]_ҥ%0< * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include "MainWindow.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; QFile file(":/resources/stylesheet.qss"); if(file.open(QIODevice::ReadOnly | QIODevice::Text)) { QString customQSS = file.readAll(); QPalette p = w.palette(); QColor colorText = p.text().color(); QColor colorTextHL = p.highlightedText().color(); QColor colorHL = p.highlight().color(); QColor colorWin= p.window().color(); QColor colorLight = p.light().color(); QColor colorDark = p.dark().color(); customQSS = customQSS.arg(colorText.name(), colorTextHL.name(), colorHL.name(), colorWin.name(), colorLight.name(), colorDark.name()); a.setStyleSheet(customQSS); file.close(); } w.show(); return a.exec(); } equalx-0.7.1/resources/symbols/Greek/kappa.png000644 001750 001750 00000000311 12314604155 021573 0ustar00mihaimihai000000 000000 PNG  IHDR B'sRGBbKGD pHYs  tIME'0\\IIDAT(9 0=Ǖ@TbQqySTYvIE*(!&IENDB`equalx-0.7.1/resources/symbols/BigGreek/pi2.png000644 001750 001750 00000000301 12314604155 021612 0ustar00mihaimihai000000 000000 PNG  IHDR F)sRGBbKGD pHYs  tIMEjAIDAT(咱 s$[ԡ4c!!Aͪl;% 0 B/R??`]\x,%hԫIENDB`equalx-0.7.1/resources/symbols/Operators/mp.png000644 001750 001750 00000000267 12314604155 022046 0ustar00mihaimihai000000 000000 PNG  IHDR K7sRGBbKGD pHYs  tIME7IDAT(! Еp+%"5U-hIlwWaʃ!PzU:RIENDB`equalx-0.7.1/resources/symbols/RelationOperators/ni.png000644 001750 001750 00000000320 12314604155 023524 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIMEPIDAT(ݑK DtԨP1@ld.I#ی;U@)m̥i,3 |_?n&%"IENDB`equalx-0.7.1/resources/symbols/RelationOperators/asymp.png000644 001750 001750 00000000316 12314604155 024254 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME/$۾NIDAT(1!]yn,l2!mm~o"Tfe׀I\Ҩ}ę )4TIENDB`equalx-0.7.1/resources/icons/menu/highlight.png000644 001750 001750 00000002316 12314604155 022007 0ustar00mihaimihai000000 000000 PNG  IHDRĴl;sBIT|d pHYsaa0UtEXtSoftwarewww.inkscape.org<KIDATxڭoLeǟݵH Ա,eC$d lbLgѹ&ƨ{%0c4N/tHl6UB:&uﰐ<|}+ikkL&[pRF)%r{4H,vkQQý nttn4(WMBEagXNPoq WҖV}vWWWK===@Rӵ5X$8VL06Y>dny~IӉPWP\V?}`z~Mp{}Cn1N>{s~i+dߏ?tӹټ7苺Bwlù_>d #~8K.D,RX0~>BSdž'`sػE48aQV.c91hh2UDIYY2Y4,'cWWwFR ENCsVIENDB`equalx-0.7.1/resources/symbols/Products/coprod3.png000644 001750 001750 00000000315 12314604155 022622 0ustar00mihaimihai000000 000000 PNG  IHDRgsRGBbKGD pHYs  tIME 2RMIDAT81 A !Pz0 TL4tl2ؤr{jAf,Bl" :IENDB`equalx-0.7.1/resources/symbols/BigGreek/sigma2.png000644 001750 001750 00000000334 12314604155 022310 0ustar00mihaimihai000000 000000 PNG  IHDR F)sRGBbKGD pHYs  tIME+,a\IDAT(Ւ1 }QewJE% aP0vU@$y`&+wIb]: V/ĬBʔp;Xq|mb/zK9!'IENDB`equalx-0.7.1/resources/symbols/RelationOperators/doteq.png000644 001750 001750 00000000321 12314604155 024233 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME&,XQIDAT(Ր 0} C!![ ӟm%i 0%x}m:WmQ%$9QG ܳK$84;stIENDB`equalx-0.7.1/resources/icons/filetypes/ps.png000644 001750 001750 00000003104 12314604155 021516 0ustar00mihaimihai000000 000000 PNG  IHDR szztEXtSoftwareAdobe ImageReadyqe<IDATxڴWMlTU J[XH*i+ iFӰ#ƅQcZĝpGڴMQAр`-фʏPδ3s{ofZ;9y9smB{  ]]]t)W!w޵{zzI [|$qG#PX\ ||oI/xWi^[[oΞ!A*¡r43-Ņs#}_%Cl7 2Zy3ioG;)F__|RXXxC%\'Dp!Vz TqٕuK˵ %9XM{(~(,\nnߐΧ7" O~VhGdf'ȲKTigs=օ'xmi:ܺ/b;EzܸıYW<+jɼ~ eY\)zh#AsW_nsя"!)Tz.Dqke`zmHDtj (OWZ]e:9YsXP-XϢ~fSᅦHoW%nN}8vNJDinlON*+ŭW0k(26_ƅ$ꦞD6hcPeXNz(JJ^g?æȼ! m(j]vF Z3l)mMתQP ߃g)ݐ ݄/¢NX5}+ˤO•n1a<{;k!|߻GuC\ n`qVTm‘ }A61X]nPOI>|TqǍ-SV4K4mf&`1y2#ai\=IENDB`equalx-0.7.1/resources/icons/about/000755 001750 001750 00000000000 12314604155 017476 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/symbols/Miscellaneous/wp.png000644 001750 001750 00000000317 12314604155 022701 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME *OIDAT( C[:bҵt(U[ %& ?<N--m3n{BAe2u*aj=<0IENDB`equalx-0.7.1/resources/symbols/RelationOperators/equiv.png000644 001750 001750 00000000257 12314604155 024260 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME! s'/IDAT(c?)D0HTd7@wIENDB`equalx-0.7.1/resources/icons/tabBar/derivs/000755 001750 001750 00000000000 12314604155 021053 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/symbols/Arrows/leftharpoonup.png000644 001750 001750 00000000270 12314604155 023611 0ustar00mihaimihai000000 000000 PNG  IHDROWsRGBbKGD pHYs  tIME$:]@8IDAT81 L DialogPreferencesUI Qt::WindowModal 0 0 420 440 0 0 EqualX Preferences false 6 0 0 16777215 50 false QAbstractItemView::NoEditTriggers QListView::Static QListView::LeftToRight QListView::IconMode QFrame::NoFrame 0 Check this to use last window settings: - window size and position - visible toolbars and panels Remember &Layout true <html><head/><body><p>Specify the default file type when exporting. This affects: <br/>- Save / Save As.. <br/>- Drag n drop <br/>- clipoard operations (copy image to clipboard)</p></body></html> <html><head/><body><p>Specify the default file type when exporting. This affects: <br/>- Save / Save As.. <br/>- Drag n drop <br/>- clipoard operations (copy image to clipboard)</p></body></html> Default E&xport exportCBox <html><head/><body><p>Specify the default file type when exporting. This affects: <br/>- Save / Save As.. <br/>- Drag n drop <br/>- clipoard operations (copy image to clipboard)</p></body></html> <html><head/><body><p>Specify the default file type when exporting. This affects: <br/>- Save / Save As.. <br/>- Drag n drop <br/>- clipoard operations (copy image to clipboard)</p></body></html> Qt::Horizontal 40 20 Clear History Qt::Horizontal 40 20 Qt::Vertical 20 6 This settings only affect the editor and NOT Equation Preview Font Fa&mily comboFontFamily Arial 10 &Size comboFontSize 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 24 26 30 32 36 40 48 56 64 Qt::Horizontal 10 20 Display Check to enable LaTeX highlighting in equation editor box. Syntax &Highligthing true Check to enable text wrapping in equation editor box. Text &Wrapping Completion false true true &Case-sensitive completion true <html><head/><body><p><span style=" font-weight:600;">Tip:</span> Completion under cursor - Hold Control Key + Left Click a LaTex command in Editor </p></body></html> true Qt::Vertical 20 0 Preview Tip: Press anytime the F5 key to force refresh &Automatic after true 9999 100 1000 milliseconds Qt::Horizontal 0 20 true Update Equation after clicking the "Render" button &Manual - Press Refresh button &Background bgPreviewColor Qt::Horizontal 0 20 Equation Properties &Foreground fgColorPicker Bac&kground bgColorPicker Qt::Horizontal 0 20 Font &Size renderFontSize 0 0 Font size in pixels 4 QComboBox::AdjustToContents Tiny Script Footnote Small Normal Large Very Large Huge Very Huge Qt::Horizontal 0 20 Environment 0 0 Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop 0 0 0 Display :/resources/icons/preferences/render_mode_display.png:/resources/icons/preferences/render_mode_display.png true true Qt::ToolButtonTextUnderIcon true Inline :/resources/icons/preferences/render_mode_inline.png:/resources/icons/preferences/render_mode_inline.png true Qt::ToolButtonTextUnderIcon true Align :/resources/icons/preferences/render_mode_align.png:/resources/icons/preferences/render_mode_align.png true Qt::ToolButtonTextUnderIcon true Text :/resources/icons/preferences/render_mode_text.png:/resources/icons/preferences/render_mode_text.png true Qt::ToolButtonTextUnderIcon true Qt::Horizontal 0 20 Qt::Vertical 20 0 Configuration 0 /usr/bin/gs true pdf&latex browsePDFLatex /usr/bin/pdftocairo true Change... false Change... false pdftoc&airo browsePDFtoCairo /usr/bin/pdflatex true &ghostscript browseGS Change... Qt::Vertical 20 10 Qt::Horizontal QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::RestoreDefaults false WidgetColorPicker QComboBox
WidgetColorPicker.h
buttonBox checkRememberLayout exportCBox clearHistoryButton comboFontFamily comboFontSize checkSyntaxHighligthing checkTextWrapping groupBoxCompletion checkSensitiveCompletion renderAutoUpdate spinUpdateTime renderManualUpdate bgPreviewColor fgColorPicker bgColorPicker renderFontSize renderModeDisplay renderModeInline renderModeAlign renderModeText pdfLatexEdit browsePDFLatex pdfCairoEdit browsePDFtoCairo gsEdit browseGS buttonBox accepted() DialogPreferencesUI accept() 257 410 157 274 buttonBox rejected() DialogPreferencesUI reject() 325 410 286 274
equalx-0.7.1/include/DialogPreferences.h000644 001750 001750 00000003527 12314604155 020423 0ustar00mihaimihai000000 000000 /* * Copyright 2010 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef DIALOGPREFERENCES_H #define DIALOGPREFERENCES_H #include #include "ui_dialogPreferences.h" class QAbstractButton; class QButtonGroup; class DialogPreferences : public QDialog, public Ui::DialogPreferencesUI { Q_OBJECT enum PREFERENCES_ITEM{ ITEM_GENERAL=0, ITEM_EDITOR, ITEM_PREVIEW, ITEM_ADVANCED }; public: DialogPreferences(QWidget *parent=0); virtual ~DialogPreferences(); const QFont getFont() const; int renderMode() const; QString currentExportType() const; public slots: void setCurrentExportType(const QString &fileType); void setCurrentExportType(QAction *actionType); void setCurrentFont(const QString &fontDescription); private slots: void onClickedButtonBox(QAbstractButton* b); void onBrowsePdfLatex(); void onBrowsePdfToCairo(); void onBrowseGS(); void onPreferencesItemActivated(QListWidgetItem *item); protected: void resetDefaults(); private: void setupPreferencesListWidget(); QButtonGroup* renderModeButtonGroup; }; #endif // DIALOGPREFERENCES_H equalx-0.7.1/resources/icons/filetypes/jpg.png000644 001750 001750 00000003020 12314604155 021651 0ustar00mihaimihai000000 000000 PNG  IHDR szztEXtSoftwareAdobe ImageReadyqe<IDATxڴW]lTEfv@ JQƐB$4EIL! h'5&Hb|A [ƿOWMZZ]˖ew3J |:7VrS@)ռHY09۱iӦ'N>*aƶQ-Jo#o$'V烰jŲZHL"d uv0*|{߽kq]abNP[F'I7;f7О~~kR33:AR'=@9Nңo%.sXϓk޶Q4=W b&C2>G=i/a,]ah'$I\:FVku8 E,Cߚ1BϴPKps 2Pﵿ"G{uetXXUHȨB/dG^B czB5dh= wY#$8fd CQƠA829ܸ173q;+hNZ:aǻu xh!(Fw/GC:<DR7 MOIHY1\$hNW6|,a,d!K1,@.t)8"6LdT# 2 2SS 5;[4GQ,&sV1;&E׮gh\͢:j]DnvƬF5 #^ǿ8U56PQlT1R4.o&bZ\8w!\`5+{Mf轌k6܏K/쁘Պ䲨$ A Oj48vthN"d`[2 Tc z&q\' 9xsn<(3H嫧w{(-`[^' MzQz0\(EH; ?upyok?>϶HQ׎Rv]ֽ0TtVhC[vXY [_çze%V6;DDQ`Ujm+⟦ td ]֯4 sYu:|3l]r~-MU.׹~7$ݤyc[~:-SW|M䳈=i]I!c9ᧈ'q/G=Y3fyҩIQ@%6ݿ@THҌ}% 18i-%hmҬs9e̯×UIGET#pt9A͟#L-ٲ1vXCde_P[48'&l? m? XIENDB`equalx-0.7.1/resources/symbols/Products/000755 001750 001750 00000000000 12314604155 020544 5ustar00mihaimihai000000 000000 equalx-0.7.1/src/BookmarksPanel/DialogPreferencesFolder.cpp000644 001750 001750 00000003055 12314604155 024162 0ustar00mihaimihai000000 000000 /* * Copyright 2014 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include "BookmarksPanel/DialogPreferencesFolder.h" #include "ui_DialogPreferencesFolder.h" DialogPreferencesFolder::DialogPreferencesFolder(QWidget *parent) : QDialog(parent), ui(new Ui::DialogPreferencesFolder) { ui->setupUi(this); } DialogPreferencesFolder::~DialogPreferencesFolder() { delete ui; } const QString DialogPreferencesFolder::name() const { return ui->editName->text(); } const QString DialogPreferencesFolder::description() const { return ui->editDescription->toPlainText(); } void DialogPreferencesFolder::setName(const QString &name) { ui->editName->setText(name); setWindowTitle(tr("Properties for - ").append(name) ); } void DialogPreferencesFolder::setDescription(const QString &description) { ui->editDescription->setPlainText(description); } equalx-0.7.1/src/HistoryPanel/HistoryWidget.cpp000644 001750 001750 00000003136 12314604155 021763 0ustar00mihaimihai000000 000000 /* * Copyright 2014 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include "Library/Library.h" #include "HistoryPanel/HistoryWidget.h" #include "HistoryPanel/HistoryListModel.h" #include "ui_HistoryWidget.h" HistoryWidget::HistoryWidget(QWidget *parent) : QWidget(parent), ui(new Ui::HistoryWidget) { ui->setupUi(this); LibraryManager* lib = LibraryManager::Instance(); mModel = new HistoryListModel(lib); ui->listView->setModel(mModel); setWindowTitle("History"); connect(ui->listView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(onViewItemActivated(QModelIndex)) ); } HistoryWidget::~HistoryWidget() { delete ui; mModel->deleteLater(); } void HistoryWidget::onViewItemActivated(QModelIndex index) { LibraryModelData row = qvariant_cast(index.data(Qt::DisplayRole)); emit activated(row); } equalx-0.7.1/resources/symbols/Decorations/super.png000644 001750 001750 00000000332 12314604155 023055 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME )qZIDAT8A ! jEМub)%!Sz,a` YƢg&3}9t}_"_Inm fo 1!GIENDB`equalx-0.7.1/resources/symbols/Arrows/hookleftarrow.png000644 001750 001750 00000000311 12314604155 023605 0ustar00mihaimihai000000 000000 PNG  IHDRvsRGBbKGD pHYs  tIME*; ]IIDAT81 ! Q'Xu4E9\v|ME ,-~?H)&ƹIENDB`equalx-0.7.1/resources/icons/menu/find.png000644 001750 001750 00000001656 12314604155 020766 0ustar00mihaimihai000000 000000 PNG  IHDRj sBITO pHYs B(xtEXtSoftwarewww.inkscape.org<PLTE.../// ;;;,,,777777???111CCCTTTuuuSSRUTS<62KKKPPPWWW BBBJJJQ;)rrr{s   !!!"""#$&&&----0'!6 888>>>AAAD GGGIIIK( N( RD9RRRTTTUUUX(YVT]]]_<"`-`?%dH0fbagREic`l4ooopVFtG!w8xDxxx{]C|A |eP`4b9c:rKyUgFtRNS #'.3CYfaڴ*IDATxڵMR0F$m!H-Pʀٸrƅ'p9qԊEhJ6:зo=DeZZ>duؠY鯆ӶaFշ6zBT?SmN( vxTzp*˥Ȼo$uS=ұq]/9)>Q}=x|YO]O&do+3FL+[+r:esT-;L?UvE3`,XLsC!]# fh| isƷtj2B-6_29, IENDB`equalx-0.7.1/resources/icons/tabBar/algebra/eq02.png000644 001750 001750 00000001172 12314604155 022432 0ustar00mihaimihai000000 000000 PNG  IHDR#2 pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;tEXtLatex\lim_{x \to \infty }1tEXtResolution125x %vuIDATHQ0?xL. `:0CvP'ӁȉaWM{HB`x3ϒY+.4#/10(>/b.EW11Pxfms BܘX[|7v&).J 5HrL{BDTnb_}rњq)uQ_ ?07VI\g;rd&)D8 U6 4+mO!!p *]{hC5<&7a1'*zRF>!&%rBMHm3ʐXEnu=kc'Tdl!IENDB`equalx-0.7.1/resources/icons/preferences/advanced.png000644 001750 001750 00000003454 12314604155 023146 0ustar00mihaimihai000000 000000 PNG  IHDR szzsBIT|d pHYsvv}ՂtEXtSoftwarewww.inkscape.org<IDATxڝ[le=eg1 ^1^!l耢C&0v6+c26ع1ns6CaKⴴɓ{y<6b5@X0Z='6l>]{KmbU"O*_vVkU߼'x^JN> mbKhL2::zF09uzUc/+&*f=-61%N.hS_~ٝ3<<"rٻ7R|rgWW(q@}p' )ɓ~d]X_<Dž?\4MLۃY';޽'\4zhA ̴$ZO.X\h2wwۃcwK.\KV&Oh6x)xOHo\r/'Q'~]~yGIDY&&F197b)&xo/'x(**alڴ]ɺu%22j&F<7sOIpɬ3gͱ㏿F#j/rѢE O}'`❅ w:ɯуk7r:h^މM۾} K0Ͳcuk||KZh3z9OUoddb8r@˖-?UC.^= O)`J^^iY~z]&MK9r$Cwhp! x'fAATV6zn%`5g<ᘘ@ Khx/<񦀹))Ejjdf':9q@Oݻw\\rE-4›^ͤ22rcժ#G R9wV%111!Kh&x'buŇ}MjjBurXVemx'p%&P $=XZ[n&UKg.9mm]ZU(BAe 5~H(1AS*zf䩾STT2nKNQQΡ2Al>$;o}VHZkFJKmrKuO׫M`tY5 !A뒫r`X<8Xog͚ybbÇw BAߪOg]z1_)uuRUe!!]X))o 8cŊL+WF兄|l ly8M*ެC".`rF׮b8BŋMzOXmA ͈uy_NjN\{cCõNg+]qt“ׯ)ϭ~uٹ3 D>5jPLuTpԹЭ<(Vhs+jJϮ漹[.]ah4v: %˖-u)?3` xq۶)55 m>?HJJ'61:hgHCR Ι3g}{pL mbPA.h=nWP'>]!s@}"zP@Ăh[^~IENDB`equalx-0.7.1/resources/symbols/RelationOperators/sqsubseteq.png000644 001750 001750 00000000274 12314604155 025325 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME7* * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include "WidgetColorPicker.h" WidgetColorPicker::WidgetColorPicker(QWidget *parent) : QComboBox(parent) { init(); } WidgetColorPicker::~WidgetColorPicker() { } void WidgetColorPicker::init() { setMaxCount(21); disconnect(this,SIGNAL(activated(int)),this,SLOT(on_comboBox_currentIndexChanged(int))); addItem("Custom Color.."); addItem(createIcon("transparent"),"transparent",QColor(Qt::transparent)); addItem(createIcon("#000000"),"black",QColor("#000000")); addItem(createIcon("#FFFFFF"),"white",QColor("#FFFFFF")); addItem(createIcon("#FF0000"),"red",QColor("#FF0000")); addItem(createIcon("#800000"),"dark red",QColor("#800000")); addItem(createIcon("#00ff00"),"green",QColor("#00ff00")); addItem(createIcon("#008000"),"dark green",QColor("#008000")); addItem(createIcon("#0000ff"),"blue",QColor("#0000ff")); addItem(createIcon("#000080"),"dark blue",QColor("#000080")); addItem(createIcon("#00ffff"),"cyan",QColor("#00ffff")); addItem(createIcon("#ff00ff"),"magenta",QColor("#ff00ff")); addItem(createIcon("#ffff00"),"yellow",QColor("#ffff00")); addItem(createIcon("#a0a0a4"),"gray",QColor("#a0a0a4")); addItem(createIcon("#808080"),"dark gray",QColor("#808080")); addItem(createIcon("#c0c0c0"),"light gray",QColor("#c0c0c0")); m_Color = QColor(0,0,0,0); m_ColorName = "transparent"; setCurrentIndex(1); connect(this,SIGNAL(currentIndexChanged(int)),this,SLOT(on_comboBox_currentIndexChanged(int))); } QIcon WidgetColorPicker::createIcon(const QString &colorName) const { QPixmap iconPixmap(32,32); iconPixmap.fill(QColor(colorName)); QIcon itemIcon(iconPixmap); return itemIcon; } void WidgetColorPicker::on_comboBox_currentIndexChanged(int index) { if(index==0) { QColor chosen = QColorDialog::getColor(m_Color,this); if(!chosen.isValid() || chosen == m_Color){ setCurrentIndex(m_currentColorIndex); } else{ m_Color = chosen; m_ColorName = m_Color.name(); addColor(m_Color); } } else { m_ColorName = itemText(index); m_Color = itemData(index).value(); m_currentColorIndex = index; } emit colorSelectionChanged(m_ColorName); emit colorSelectionChanged(m_Color); } void WidgetColorPicker::setCurrentIndex(int index) { m_currentColorIndex = index; QComboBox::setCurrentIndex(index); } void WidgetColorPicker::setColorName(const QString &colorName) { if(!colorName.isEmpty()) { if(QColor(colorName).isValid()) { m_ColorName = colorName; m_Color = QColor(colorName); addColor(colorName); } } } void WidgetColorPicker::setColor(const QColor& color) { if(color.isValid()) { m_ColorName = color.name(); m_Color = color; addColor(color); } } QColor WidgetColorPicker::getColor() const { return m_Color; } QString WidgetColorPicker::getColorName() const { return m_ColorName; } void WidgetColorPicker::addColor(QColor color) { int index; if((index = findData(color)) > -1) setCurrentIndex(index); else { QString colorName = color.name().toUpper(); insertItem(1,createIcon(colorName),colorName,color); setCurrentIndex(1); } } void WidgetColorPicker::addColor(QString colorName) { int index; if((index = findText(colorName)) > -1) setCurrentIndex(index); else { insertItem(1,createIcon(colorName),colorName,QColor(colorName)); setCurrentIndex(1); } } equalx-0.7.1/include/HistoryPanel/HistoryListModel.h000644 001750 001750 00000003203 12314604155 022730 0ustar00mihaimihai000000 000000 /* * Copyright 2014 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef HISTORYITEMMODEL_H #define HISTORYITEMMODEL_H #include #include "Library/LibraryData.h" class LibraryManager; class HistoryListModel : public QAbstractListModel { Q_OBJECT public: HistoryListModel(LibraryManager* lib, QObject *parent = 0); ~HistoryListModel(); QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const; bool canFetchMore(const QModelIndex &) const; void fetchMore(const QModelIndex &); int rowCount(const QModelIndex &/*parent = QModelIndex()*/) const; // drag n drop support Qt::DropActions supportedDropActions() const; Qt::DropActions supportedDragActions() const; Qt::ItemFlags flags(const QModelIndex &index) const; public slots: void onHistoryChanged(); private: LibraryManager *mLibrary; int mChildren; int mHistorySize; }; #endif // HISTORYITEMMODEL_H equalx-0.7.1/resources/symbols/Delimiters/lfloor_rfloor.png000644 001750 001750 00000000263 12314604155 024431 0ustar00mihaimihai000000 000000 PNG  IHDR_AsRGBbKGD pHYs  tIME!Ŷ3IDAT8ձ ;x#5fSD.f( *T;$8:7q )*AIENDB`equalx-0.7.1/resources/icons/preferences/render_mode_align.png000644 001750 001750 00000000577 12314604155 025041 0ustar00mihaimihai000000 000000 PNG  IHDRasBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8ӽJ@7YhZPYxނcBSfոDZY >wq12 U 񃓣hus+ oa]N `s 69~]@^T ŋI!/m܉gҬ1TW:4꾓|7W[{ KnߡPf;6|hoxegWKP5Iyl.')f5N\"j^^tWnE4"9'5%fIENDB`equalx-0.7.1/src/SymbolsPanel.cpp000644 001750 001750 00000003204 12314604155 017141 0ustar00mihaimihai000000 000000 /* * Copyright 2014 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include "SymbolsPanel.h" #include "SymbolsGroupWidget.h" //_________________________________________________________________________ SymbolsPanel::SymbolsPanel(QWidget *parent, int cols) : QWidget(parent), mMaxCols(cols), mCurCol(0), mCurRow(0) { // allocate all widgets on the panel mLayout = new QGridLayout(this); mLayout->setContentsMargins(0,0,0,0); mLayout->setSpacing(0); setLayout(mLayout); } SymbolsPanel::~SymbolsPanel() { } void SymbolsPanel::appendSymbolsGroup(LatexSymbolsGroup* group) { SymbolsGroupWidget* grWidget = new SymbolsGroupWidget(2, this); grWidget->addSymbols(group); if(mCurCol>=mMaxCols) {mCurCol=0; mCurRow++;} mLayout->addWidget(grWidget, mCurRow, mCurCol); mCurCol++; connect(grWidget, SIGNAL(triggered(LatexSymbol*)), this, SIGNAL(triggered(LatexSymbol*)) ); } equalx-0.7.1/resources/symbols/RelationOperators/models.png000644 001750 001750 00000000265 12314604155 024411 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME(q5IDAT(c?)D@' H,01?# 2g8ij`$5%![yIENDB`equalx-0.7.1/resources/icons/tabBar/physics/eq03.png000644 001750 001750 00000002163 12314604155 022521 0ustar00mihaimihai000000 000000 PNG  IHDRuB pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;@zTXtLatexx)(T(ѴH,)(άMԈMMOT(Q)ȍQ)H-IԬm_tEXtResolution116-'HIDATh;r@?P 3BaN8r'70؄DrdόF)f[/f <޵[ױC`Y?^U)J3ѡذN{ mxʡuad==|Hqjfqn63u*{}Dz8f)}NM*:[~t#!il .f)cf $^qhvpllx|D9vd^ōgmD;v-.lu]uIc9XU+M0=_m!f9R붚&k+2s_-zVdG.9p8=!} ƺ%#$5c^ kqؔŞOa]:Y*Gf̞ K<7!F+\|G)(4r`X'lC$ \jV31/K4w?1k4B:)-%m*/QH޳-~G@f3udha9~JEke{s[dMP"r@ ˪*g˸Q`͊M"ŖxenujˑhݔK1q%MptFMB-5|l׸:5t6ڵf9 &:o-V#G%㑚H]?EإFM4ߡLF/JD^îhNwH)]D.c8?_-uj )SSҲ5Cզ?:bTtWEk3eIENDB`equalx-0.7.1/ui/mainwindow.ui000644 001750 001750 00000127470 12314604155 016402 0ustar00mihaimihai000000 000000 Mihai Niculescu MainWindowClass 0 0 795 740 0 0 0 0 0 0 EqualX Editor Qt::ToolButtonIconOnly false false QTabWidget::Rounded true 0 0 0 0 QFrame::StyledPanel QFrame::Sunken Qt::Vertical false 0 0 0 0 0 0 0 0 0 0 Algebra Derivs Stats Matrix Sets Trig Geometry Chemistry Physics 0 0 0 32 0 New Equation ... :/resources/icons/menu/document-new.png:/resources/icons/menu/document-new.png true 0 Qt::AlignCenter Untitled Equation :/resources/icons/menu/bookmark.png :/resources/icons/bookmarks/bookmarks.png:/resources/icons/menu/bookmark.png 18 18 true 0 0 0 0 0 0 0 Qt::ActionsContextMenu true QFrame::NoFrame QFrame::Plain 0 false Qt::AlignCenter 0 0 724 192 0 0 0 true 2 1 2 0 QLayout::SetDefaultConstraint 0 QLayout::SetDefaultConstraint 0 3 0 0 Toggle Preamble Preamble true true Qt::DownArrow Refresh Qt::Horizontal 40 20 0 0 QFrame::NoFrame QFrame::Raised 6 QLayout::SetMinimumSize 9 0 9 0 QFrame::StyledPanel QFrame::Sunken 0 0 Font size in pixels 4 QComboBox::AdjustToContentsOnFirstShow false Tiny Script Footnote Small Normal Large Very Large Huge Very Huge 0 0 <html><head/><body><p><span style=" font-weight:600;">Display Environment: \[ ... \] </span></p><p>is used when displaying equations separate from other paragraphs; on a single line of its own</p></body></html> Display :/resources/icons/preferences/render_mode_display.png:/resources/icons/preferences/render_mode_display.png true Qt::ToolButtonIconOnly true Qt::NoArrow 0 0 <html><head/><body><p><span style=" font-weight:600;">Align Environment: \\begin{align*}... \\end{align*}</span></p><p><span style=" font-weight:600;"/>is used for arranging equations on multiple lines. As with matrices and tables, <span style=" font-weight:600;">\\ </span>specifies a line break, and <span style=" font-weight:600;">&amp;</span> is used to indicate the point at which the lines should be aligned.</p></body></html> Align :/resources/icons/preferences/render_mode_align.png:/resources/icons/preferences/render_mode_align.png true Qt::ToolButtonIconOnly true 0 0 <html><head/><body><p><span style=" font-weight:600;">Inline Environment: $...$</span></p><p>is used when inlining equations inside text</p></body></html> Inline :/resources/icons/preferences/render_mode_inline.png:/resources/icons/preferences/render_mode_inline.png true Qt::ToolButtonIconOnly true 0 0 <html><head/><body><p><span style=" font-weight:600;">Simple Text</span></p><p>Environment text without mathemathics possibilities</p></body></html> Text :/resources/icons/preferences/render_mode_text.png:/resources/icons/preferences/render_mode_text.png true Qt::ToolButtonIconOnly true 0 0 16777215 16777215 0 0 0 0 0 0 795 21 Qt::PreventContextMenu Hel&p true &Edit &View Toolbars &File &Library 0 0 200 75 Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea Library 2 0 0 QTabWidget::South 0 Bookmarks 0 0 History 0 0 :/resources/icons/menu/document-new.png:/resources/icons/menu/document-new.png &New New Equation Create a new equation Ctrl+N :/resources/icons/menu/application-exit.png:/resources/icons/menu/application-exit.png Quit Quit application Quit Ctrl+Q :/resources/icons/menu/document-open.png:/resources/icons/menu/document-open.png &Open Open an existing equation Open an existing equation Ctrl+O :/resources/icons/menu/document-save-as.png:/resources/icons/menu/document-save-as.png Save As... Save Equation As... Save equation as... :/resources/icons/menu/help-about.png:/resources/icons/menu/help-about.png &About :/resources/icons/menu/edit-undo.png:/resources/icons/menu/edit-undo.png &Undo Ctrl+Z true :/resources/icons/menu/edit-redo.png:/resources/icons/menu/edit-redo.png &Redo Ctrl+Shift+Z true :/resources/icons/menu/configure.png:/resources/icons/menu/configure.png &Preferences :/resources/icons/menu/edit-cut.png:/resources/icons/menu/edit-cut.png &Cut Ctrl+X :/resources/icons/menu/edit-copy.png:/resources/icons/menu/edit-copy.png Copy Ctrl+C :/resources/icons/menu/edit-paste.png:/resources/icons/menu/edit-paste.png Paste Ctrl+V :/resources/icons/menu/edit-delete.png:/resources/icons/menu/edit-delete.png &Delete Del :/resources/icons/menu/find.png:/resources/icons/menu/find.png &Find... Ctrl+F false Find Ne&xt false Find Previous... :/resources/icons/menu/find-replace.png:/resources/icons/menu/find-replace.png Replace... Ctrl+H :/resources/icons/menu/view-refresh.png:/resources/icons/menu/view-refresh.png Refresh Force Refresh Equation F5 false :/resources/icons/menu/bookmark.png :/resources/icons/menu/bookmarked.png:/resources/icons/menu/bookmark.png Bookmark This Equation Latex Output true true :/resources/icons/menu/symbols-panel.png:/resources/icons/menu/symbols-panel.png Symbols Toolbar true true :/resources/icons/menu/templates.png:/resources/icons/menu/templates.png Templates Toolbar A ToolBar with predefined equations true true :/resources/icons/menu/fill-color.png:/resources/icons/menu/fill-color.png Style Toolbar Equation Style Toolbar true true Main Toolbar Main Toolbar true false Library Panel The Library contains your Bookmarks & History :/resources/icons/menu/bookmarks-organize.png:/resources/icons/menu/bookmarks-organize.png Show Bookmarks :/resources/icons/menu/history.png:/resources/icons/menu/history.png Show History :/resources/icons/menu/clear_left.png:/resources/icons/menu/clear_left.png Clear All History WidgetFind QWidget
WidgetFind.h
1
LatexEditor QPlainTextEdit
LatexEditor.h
EquationArea QScrollArea
EquationArea.h
1
ColorChooser QFrame
ColorChooser.h
1
SymbolsPanel QWidget
SymbolsPanel.h
1
BookmarksWidget QWidget
BookmarksPanel/BookmarksWidget.h
1
HistoryWidget QWidget
HistoryPanel/HistoryWidget.h
1
actionView_StyleToolbar toggled(bool) renderBar setVisible(bool) -1 -1 493 323 actionView_MainToolbar toggled(bool) mainBar setVisible(bool) -1 -1 581 49 actionView_Sidebar toggled(bool) librarySidebar setVisible(bool) -1 -1 129 424 librarySidebar visibilityChanged(bool) actionView_Sidebar setChecked(bool) 129 424 -1 -1 buttonShowPreamble toggled(bool) editPreamble setVisible(bool) 273 326 581 437 actionView_SymbolsToolbar toggled(bool) symbolsBar setVisible(bool) -1 -1 201 28 actionView_TemplatesToolbar toggled(bool) templatesBar setVisible(bool) -1 -1 528 57
equalx-0.7.1/resources/symbols/Arrows/hookrightarrow.png000644 001750 001750 00000000311 12314604155 023770 0ustar00mihaimihai000000 000000 PNG  IHDRvsRGBbKGD pHYs  tIME*1TIIDAT81 ČsuE\QijyCUTve>UQ!~XgL:w! i&(FIENDB`equalx-0.7.1/resources/icons/preferences/000755 001750 001750 00000000000 12314604155 020665 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/icons/equalx/equalx-24x24.png000644 001750 001750 00000001717 12314604155 022457 0ustar00mihaimihai000000 000000 PNG  IHDRw=sBIT|d pHYsu85tEXtSoftwarewww.inkscape.org<LIDATH[LWǿ{SڋF8Ykp11I3de) MMMA,K0HtCʨ-+wiB[={ 6RL{]s~C(x¼V#Lgdl1dHG%Hlȥۿe)9=z;V4ykN8)TXɢ=Gz͡D( u>r]AVJZ#a =P%~G3mc}sѪH&R\@ І{n-:+l(#kfd-y4<_VEPJQ^^nj]B0e9@,/s鳭kZufg_Ƨ±*%ӻkw9R<5J"L) +?m,D>gL#[;]<|>7(x`榧m_ X<౼dAAh& Ă'DKBAZ$%ȿvl6'mx<śl>QaRAԐ1laPm4q1J)l6E$uB2˲,˖U5X%oģss`((~+ݿ9oeˮlWEY ՙ8\mA`e$;g};/,$'q2E.\ټO{8mՕc.|ɀaSgoUšmV[%9aA42П(_ߘnүӞr'bi4+r21թP跏{jj4j%0?? -8?o Ju>IENDB`equalx-0.7.1/resources/symbols/RelationOperators/notin.png000644 001750 001750 00000000335 12314604155 024253 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME $]IDAT(ϽA <0؂`[tـ*ꭨU93R9A%L!eVqG=>e_멈?B#IENDB`equalx-0.7.1/resources/symbols/Arrows/leftrightarrow2.png000644 001750 001750 00000000321 12314604155 024045 0ustar00mihaimihai000000 000000 PNG  IHDROWsRGBbKGD pHYs  tIME$eQIDAT8A0;ySl#ޔ#˲4b4ǬAeV#&VDja-\c%?c1|)6껣IENDB`equalx-0.7.1/resources/icons/spinner.gif000644 001750 001750 00000023700 12314604155 020533 0ustar00mihaimihai000000 000000 GIF89aY777888999;;;<<<===>>>@@@AAABBBFFFGGGHHHIIILLLQQQTTTUUUVVVWWWXXXYYYZZZ[[[^^^___```aaabbbcccdddeeefffggghhhiiikkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~! NETSCAPE2.0!Created with GIMP! ,Ƈ.'.ǯ,,άت++ߝ54ԊWW HA}J[#4 B.ȃ@('A#CD()b9&6;$. ӠrxC EA)6p(*>1R8"5C^!*"@ytJ_CWva "*,zFIMfQ[DZ`1SQIz+--͛Y(c? 825m/sXN_&-+q*˪ax [ici/k0V3)|Ov|'#>LlBCsH'L7PG-TWmXg\wmW ! ,ƈ4ǰ77̬֪88ݝDً*,C1,,-C҉'&4Ht [_!#whP,?-$Fup8`;"0HJ)"Bњc p."C7i@Di@u!!8✊CN/8W͐EAH6 \b(ȆUVhk[Hhi#˕'^aP*#))Ţ+bͻȓEaĂKۊrդ7o&‰(WNy$P&ھ}o"O>]be'~Ǟ׊bDι`}@ o w@9 .P܇zgE0`oAJ [,X\Qcd8<#%RL!UTL9CKCJA..w \Nem_f)Lyhb)Q)'x]: ydG㢌6裐X#Lf0H(.XhG,wbiZgff,`᪦jaꚯzj+k z~ǞjɹډB;rb!{Y+:Kf*I&J[jdpr,!:$܋貓 ȋ | '-e,"b<p'L11#gLp *"0 -NlrЍL4-J7PG-TWmXg\w`-v.! ,ƈCDZ/,/̭-,-ԫ۪׋5ߎPGEEFPщ53HE0,0MGýBKcw?h? *A_D(N` H$E ߞT?D.\R H}GYyR;3"dD:½ǡT!DXNfS#!6E&Xb+j(,4ur㵏^Pw Y,$UˆiF$2贺(Ĉ\SBO%"a*ZA+lI-zB̘ph&8aш]U6E'qQDK@˸q\keݺڵ;ݻ,‡jv\P֥@_=WuJB{M { RJz wwBBG} !vd0L(R <`ba8<$W) )d*F&y`<$.R*ePނel9$^ye`yJbj^kifqڂ&pVd/NbdE㠄j衈β䒲80V.XX!%,*iŞvn ˛銨ʝxj*:g+ҧ +VrNZkV,rd'&l"FPK˗*٬$r H[-iI^ī S7+`n9ao!*! -3pp0> `l91p0W|yH&Spl3)7\'q F'L7PG-TWmXg\w! ,ƈQDZGEG̭ԫ٪֋DݏTSSRщC-,,0Aӈ5 h"K ǐE $xA'j4dB\LanU@h%ȖRe=t\6!B \ jJo @RSZnC̀Xf(R1eiɵ&/H;(J6z`fQPK3b`F+ɖ̒pPAZ3hO bDLyB-,UTﮦ ]*BAv ZSQܹmaݻ,gM&ޛ,eI`Ns]M:vݭs |fWO(+!|pn 䫹uȶKt) sjXB Fׅf*$y p4{4أ->9 -*i$(yKNe)R2YI 9=^Dyd8ȣ@b//褍7'"&b|矀*蠓<,.L0pVh{ad٨ ک(h+j*aZ~F7 "ul"fqv&&l w$>[{ hB7m$:} ,~n6k+!f6.R/!1$Li7 0Å[{/1̭ \25yHɉ+HZ;1"ܲrLqΐds#>BmH'L7PG-TWmXg5]! ,ǿRSRȭЪSۛXWވPFEEGO߉̉EHTÇɾ?"B "% Kp^9{%nn3k xV>fCtD$>'OS {F&ʔWa6TwpIҝI5fh(8M!'7`$c%" Kj%$"s.#WCqЅL@L7PG-TWmXg\w! ,ǿWȭΫӪכX҉͉RSSRۊSXUWʗܶ#{!0>gVZ8и.: (Аā ݝ#y^4$at(gx$NC35CS$ m\sEN SII 22R[GrTpѓprljNT.bZUi%wMZGE",BE],ȑ\d̊9wv4\ѕ]{UMOnzJfn+$k&ît %NJN)6,·H9.2Z_ΞiPϾ>o߿~)-h_XK )aM8J`(2,ה/ѷ{&ŝw݌4h8,/dl Y$)oiPB 8֊ Qf 4*h5V[*b)EBAZ LgX+YX˛wh`'^*J&`fT'$@% 42R T&CPN7jAc#""ؐK>9JIj#0p̉< Lw&Q ´>B bl!Pb!:˘Cӑ!J5V:j(0!\j0fnĂ,J{/!Җ;kYKBH/ֹoǂ @"?bq #8/PG-TWmXg\w`-غ! ,ǿWȭΫӪכX҉ۈWX?wࡻfE5p}bl y7𠵍MDh2`jK2 )I!b12QP[C!BgRgT4JerIO$FʲVW4ɞ}H-6\lvWo_o]ٽ{j0rW0)X+$L8ϠCMaULY=EJ*TuὶH͛5*÷z wὋrŲ~vK:ZY{_Kp۷]K=}˟Of̲ QdiVELXY!E}եăNJvaeƩaF)H"p5,)xD,'nbOb, Z+IxL$p ,6az0`™,+"V)d*R.br6` x#Nh@"6Djh4*gp9iNh*'" 2jrp9+p+pIǂ~AZ9M"d A- >Lck b{,"5 A  _!,g!5Ȫ&;"#l;"CJg:@"{A"-Ih&'$/B CƂ "Dԇ:$;Г`4%4D-TWmXg\w`-dmh! ,ǿWȭΫӪכX҉ۈWX?wࡻfE5p}bl y7𠵍MDh2`jK2 )I!b12QP[C!BgRgT4JerIO$FʲVW4ɞ}H-6\lvWo_o]ٽ{j0rW0)X+$L8ϠCMaGղ(ÓTv)fm}Xj߲x[mౄFxZ:Xسkν;Ue *2XS˧+0%|)ق P߂rh@ 2(E,D! TXᅮa0b~"ʼn |0 4p,9N!#.`Kh.'R,B Fa"8 0"@`& E&H @{Hp/X򄛀n g#Syf *R` $"ĦB$ģyH,j8*IxB{"҂ȫ2!S I"H98D)CpɺIN""ZyHmF Ϛ!!G[Ӡn*"PȻ4zv{:Įٚ e"!l&+ Ҁ!g(:A"0t C""! )A tj"XyѬzG BSҮ- 4%CD-TWmXg\w`-dmh! ,ǿWȭΫӪכX҉ۈWX?wࡻfE5p}bl y7𠵍MDh2`jK2 )I!b12QP[C!BgRgT4JerIO$FʲVW4ɞ}H-6\lvWo_o]ٽ{j0rW0)X+$L8ϠCb)NcIPMvXj9 ˰.rULnN9tґRe:fCo oXlsn; 5m֮)f&B/0)PKl B,-cfA,B\%R-HAe"A5*5h"dş*y NިZt $a 7 +%".BP1śY-4bA ž,ȠɛJKذ#h%U*b /.B|`ɤ2X01pʧ *`*D!jN:'"FZ*L?g+lp!FKNvҊR:ᲀgҊNQ4Ɇ"ʋkNC[D"nCրn{HcëC K *h ajhAg k) D,23 Rsϕ 4%&ЖDH7PG-TWmXg\w`Mu ! ,ǿWȭΫӪכX҉ۈWX?wࡻfE5p}bl y7𠵍MDh2`jK2 )I!Nb#B0J9\+@`"|SwkҥFZF`; }9mE2Wm`04ᡏaYOy+yr̎W-J`dJ< ,iM  Pă",Iքq#ĨkR֛X`D'ulz"־3[Ha(]-..-A+>[f=mjfo8U5.[Y4>L -fJ\)(pd 2Ͽ?,= q V 쥙) VXa =r)CX^gJz(-X(X +2x"j.cXK/`# ]) ~ H) H<ߕXf\H+Xf sM5̷׼ oȲ7oN!ojLKqp*MpaN^LL-T27kH;nBLtL7PG-TWmXg\w׾;equalx-0.7.1/resources/symbols/Delimiters/delim0.png000644 001750 001750 00000000314 12314604155 022720 0ustar00mihaimihai000000 000000 PNG  IHDRO>zbKGD X pHYsHHFk>lIDATX øs>Bl AY Ϸ?Z@v:|%Q˫ u; * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /* * This is the implementation of EqualX::File when using XMP SDK API (intended for Windows) */ #include #define TXMP_STRING_TYPE std::string #define XMP_INCLUDE_XMPFILES 1 #define WIN_ENV 1 #include #include #include #include #include #include #include "defines.h" #include "File.h" #include "Util.h" namespace EqualX{ /* Theft code from GPL code pdfcropxmp.pl by Johannes Grosse - Copyright (C) 2007 */ const char* __templateLatexCropFile = "\\def\\pdffile{%1}\n" "\\csname pdfmapfile\\endcsname{}\n" "\\newread\\instream\n" "\\def\\includexmp#1{%\n" "\\openin\\instream=#1\n" "\\ifeof\\instream\\else \n" "\\closein\\instream\n" "% file exists\n" "\\begingroup\n" "\\pdfcompresslevel=0\n" "\\immediate\\pdfobj stream attr {/Type /Metadata /Subtype /XML}\n" "file{#1}\n" "\\pdfcatalog{/Metadata \\the\\pdflastobj\\space 0 R}\n" "\\endgroup %/\n" "\\fi\n" "}\n" "\\def\\page #1 [#2 #3 #4 #5]{%\n" "\\count0=#1\\relax\n" "\\setbox0=\\hbox{%\n" "\\pdfximage page #1{\\pdffile}%\n" "\\pdfrefximage\\pdflastximage\n" "}%\n" "\\pdfhorigin=-#2bp\\relax\n" "\\pdfvorigin=#3bp\\relax\n" "\\pdfpagewidth=#4bp\\relax\n" "\\advance\\pdfpagewidth by -#2bp\\relax\n" "\\pdfpageheight=#5bp\\relax\n" "\\advance\\pdfpageheight by -#3bp\\relax\n" "\\ht0=\\pdfpageheight\n" "\\shipout\\box0\\relax\n" "}\n" "\\def\\pageclip #1 [#2 #3 #4 #5][#6 #7 #8 #9]{%\n" "\\count0=#1\\relax\n" "\\ndimen0=#4bp\\relax \\advance\\dimen0 by -#2bp\\relax\n" "\\edef\\imagewidth{\\the\\dimen0}%\n" "\\dimen0=#5bp\\relax \\advance\\ndimen0 by -#3bp\\relax\n" "\\edef\\imageheight{\\the\\dimen0}%\n" "\\pdfximage page #1{\\pdffile}%\n" "\\setbox0=\\hbox{%\n" "\\kern -#2bp\\relax\n" "\\lower #3bp\\hbox{\\pdfrefximage\\pdflastximage}%\n" "}%\n" "\\wd0=\\imagewidth\\relax\n" "\\ht0=\\imageheight\\relax\n" "\\dp0=0pt\\relax\n" "\\pdfhorigin=#6pt\\relax\n" "\\pdfvorigin=#7bp\\relax\n" "\\pdfpagewidth=\\imagewidth\n" "\\advance\\pdfpagewidth by #6bp\\relax\n" "\\advance\\pdfpagewidth by #8bp\\relax\n" "\\pdfpageheight=\\imageheight\\relax\n" "\\advance\\pdfpageheight by #7bp\\relax\n" "\\advance\\pdfpageheight by #9bp\\relax\n" "\\pdfxform0\\relax\n" "\\shipout\\hbox{\\pdfrefxform\\pdflastxform}%\n" "}%\n" "\\includexmp{%2}\n" "\\page %3 [%4 %5 %6 %7]\n" "\\csname @@end\\endcsname\n\\end\n"; /* * Identifiers for __templateLatexCropFile: * - input pdf file * - input xmp metadata file * - page number * - llx: lower left x * - lly: lower left y * - urx: upper right x * - ury: upper right y * (gs has the coordinate system with origin in the lower left corner) */ /* End Theft */ const char* __templatePSwithXMP = "/currentdistillerparams where\n" "{pop currentdistillerparams /CoreDistVersion get 5000 lt} {true} ifelse\n" "{ userdict /pdfmark /cleartomark load put\n" "userdict /metafile_pdfmark {flushfile cleartomark } bind put}\n" "{ userdict /metafile_pdfmark {/PUT pdfmark} bind put} ifelse\n" "[/_objdef {%2} /type /stream /OBJ pdfmark\n" "[{%2}\n" "currentfile 0 (% &&end XMP packet marker&&)\n" "/SubFileDecode filter metafile_pdfmark\n" "\n" "%1\n" "\n" "% &&end XMP packet marker&&\n" "[{%2}\n" "2 dict begin /Type /Metadata def /Subtype /XML currentdict end\n" "/PUT pdfmark\n"; /* * Identifiers for __templatePSwithXMP: * %1 - the XMP packet * %2 - equalx_metadata_stream dependant on timestamp */ } struct EqualX::File::FileImplementation{ SXMPMeta mMetadata; SXMPFiles mFile; }; EqualX::File::File() : mFileName(), mFileInfo(0) { __init(); } EqualX::File::File(const EqualX::FileInfo &fileinfo) : mFileName(), mFileInfo(fileinfo) { __init(); } EqualX::File::~File() { close(); // Terminate the toolkit SXMPFiles::Terminate(); SXMPMeta::Terminate(); delete mClassImpl; } void EqualX::File::__init() { if(SXMPMeta::Initialize()){ mClassImpl = new FileImplementation; } } void EqualX::File::open(const QString &filename, EqualX::File::OpenModes mode) { XMP_OptionBits options=0; if (!SXMPFiles::Initialize(options)) { qDebug() << "Could not initialize SXMPFiles."; return; } mFileName = filename; qDebug() << "[EqualX::File::open] Openning file:"<mFile.CloseFile(); mClassImpl->mFile.OpenFile(filename.toStdString(), kXMP_UnknownFile, opts); } void EqualX::File::close() { mClassImpl->mFile.CloseFile(); } bool EqualX::File::read() { mClassImpl->mFile.GetXMP(&mClassImpl->mMetadata); if(!mClassImpl->mMetadata.GetNamespacePrefix(METADATA_NS, NULL) ){ qDebug() << "[EqualX::File::read] Namespace ["<mMetadata.GetNamespaceURI(METADATA_PREFIX, NULL) ){ qDebug() << "[EqualX::File::read] Prefix ["<mMetadata.GetProperty(METADATA_NS, METADATA_PREAMBLE, &preamble,0); readStatus = mClassImpl->mMetadata.GetProperty(METADATA_NS, METADATA_EQUATION, &equation,0); readStatus = mClassImpl->mMetadata.GetProperty_Int(METADATA_NS, METADATA_ENV, &environment, 0); readStatus = mClassImpl->mMetadata.GetProperty(METADATA_NS, METADATA_FG, &fgColor, 0); readStatus = mClassImpl->mMetadata.GetProperty(METADATA_NS, METADATA_BG, &bgColor, 0); readStatus = mClassImpl->mMetadata.GetProperty_Int(METADATA_NS, METADATA_DOC_FONT_SIZE, &fontSize, 0); QString preambleStr = QString::fromStdString(preamble); preambleStr.replace( "#perc", "%"); preambleStr.replace( "#", "\\"); QString equationStr = QString::fromStdString(equation); equationStr.replace("#perc", "%"); equationStr.replace( "#", "\\"); QColor c1; QColor c2; EqualX::Util::LatexToColor(fgColor.c_str(), c1); EqualX::Util::LatexToColor(bgColor.c_str(), c2); mFileInfo.setPreamble(preambleStr); mFileInfo.setEquation(equationStr); mFileInfo.setForegroundColor( c1 ); mFileInfo.setBackgroundColor( c2 ); mFileInfo.setEnvironment(environment); mFileInfo.setFontSize(fontSize); return readStatus; } bool EqualX::File::write() { bool status = false; QString filetype = mFileName.section(".",-1); qDebug() << "[EqualX::File::write] Trying to insert metadata into "<mMetadata.SerializeToBuffer(&buf, kXMP_OmitPacketWrapper); QString metadataStr=QString::fromStdString(buf); qDebug() << "[EqualX::File::write] \tOpenning file"; //mClassImpl->mFile.PutXMP(mClassImpl->mMetadata); mClassImpl->mFile.CloseFile(); QFile file( mFileName ); file.open(QIODevice::ReadWrite | QIODevice::Text); if(!file.isOpen()){ qDebug() << file.errorString(); return false; } QTextStream stream(&file); qDebug() << "[EqualX::File::write] \tSearching for EOF"; QString line; qint64 pos; do{ pos = stream.pos(); line = stream.readLine(); qDebug() << "line: " << line; } while (!line.contains("")); qDebug() << "[EqualX::File::write] \tFound EOF. Flushing metadata..."; stream.seek(pos); stream << "\n"<"<< "]]>\n"; stream << ""; stream.flush(); file.close(); qDebug() << "[EqualX::File::write] \tFlushing Done."; status = true; } else if(filetype.contains("ps")){ // for ps and eps documents, level 2 std::string buf ; mClassImpl->mMetadata.SerializeToBuffer(&buf, kXMP_OmitPacketWrapper); QString metadataStr=QString::fromStdString(buf); QFile in(mFileName); QFile out(mFileName+"~"); in.open(QIODevice::ReadOnly); out.open(QIODevice::WriteOnly); QTextStream stream(&out); QString line; QString curTimeStamp = QString::number(QDateTime::currentDateTime().toTime_t()); while(!in.atEnd()){ line = in.readLine(); stream << line; if(line.contains("%%BeginPageSetup")){ stream << QString(__templatePSwithXMP).arg(metadataStr, curTimeStamp); } stream.flush(); } in.close(); out.close(); QFile::remove(mFileName); QFile::rename(mFileName+"~", mFileName); status = true; } else if(mClassImpl->mFile.CanPutXMP(mClassImpl->mMetadata)){ mClassImpl->mFile.PutXMP(mClassImpl->mMetadata); status=true; } else{ status = false; } if(status) qDebug() << "[EqualX::File::write] inserted metadata to file:" << mFileName; return status; } void EqualX::File::writeLatexFile(bool withBackgroundColor) { QString latexColors; // sets font color QString latexHLColor; // sets HighLight color QString latexFGColor, latexBGColor; EqualX::Util::colorToLatex(mFileInfo.fgColor(), latexFGColor); EqualX::Util::colorToLatex(mFileInfo.bgColor(), latexBGColor); latexColors = QString("\\definecolor{fgC}{rgb}{%1}\\color{fgC}").arg(latexFGColor); if(withBackgroundColor){ QString bgColor = QString("\\definecolor{bgC}{rgb}{%1}\\pagecolor{bgC} ").arg(latexBGColor); latexColors.append(bgColor); } QString equation = mFileInfo.equation(); // we modify it if we have selections /* Highlight selections */ if(!mFileInfo.selections().isEmpty()){ if(withBackgroundColor){ latexHLColor = QString("\\definecolor{selC}{rgb}{%1}").arg(latexBGColor); } else { latexHLColor = QString("\\definecolor{selC}{rgb}{1,1,1}"); } QString insert1 = "\\colorbox{fgC}{\\color{selC} $"; QString insert2 = "$}"; int insertStr1Len = insert1.length(); int insertStr2Len = insert2.length(); int insertStrLen = insertStr1Len + insertStr2Len; int newInsert1Pos, newInsert2Pos; for(int i=0; i < mFileInfo.selections().size(); i++){ SelectionIndex *selectionItem = mFileInfo.selections().at(i); int ss = selectionItem->start; // start selection int se = selectionItem->end; // end selection newInsert1Pos = ss + i*insertStrLen; newInsert2Pos = se + i*insertStrLen + insertStr1Len; equation.insert(newInsert1Pos, insert1); equation.insert(newInsert2Pos, insert2); } } /* Set Font Size */ QString latexFontSize; switch(mFileInfo.fontSize()){ case LATEX_FONT_TINY: latexFontSize="\\tiny "; break; case LATEX_FONT_SCRIPT: latexFontSize="\\scriptsize "; break; case LATEX_FONT_FOOTNOTE: latexFontSize="\\footnotesize "; break; case LATEX_FONT_SMALL: latexFontSize="\\small "; break; default: case LATEX_FONT_NORMAL: latexFontSize=""; break; case LATEX_FONT_LARGE: latexFontSize="\\large "; break; case LATEX_FONT_VERY_LARGE: latexFontSize="\\LARGE "; break; case LATEX_FONT_HUGE: latexFontSize="\\huge "; break; case LATEX_FONT_VERY_HUGE: latexFontSize="\\Huge "; break; } /* Set Environment */ QString envBegin, envEnd; switch(mFileInfo.environment()){ default: case LATEX_ENV_MODE_DISPLAY: envBegin = "\\["; envEnd = "\\]"; break; case LATEX_ENV_MODE_INLINE: envBegin = "$"; envEnd = "$"; break; case LATEX_ENV_MODE_ALIGN: envBegin = "\\begin{align*}"; envEnd = "\\end{align*}"; break; case LATEX_ENV_MODE_TEXT: envBegin = ""; envEnd = ""; break; } // compose whole content of latex file QString latexFileContent = mFileInfo.preamble()+"\n\\begin{document}"+latexFontSize+latexColors+latexHLColor+envBegin+equation+envEnd+"\\end{document}"; // write the content to file QFile texFile( TEMP_LATEX_FILE ); texFile.open(QIODevice::WriteOnly | QIODevice::Text); QTextStream out(&texFile); out << latexFileContent; out.flush(); texFile.close(); } void EqualX::File::writeLatexFileCropped(float llx, float lly, float urx, float ury) { qDebug() << "[File::writeLatexFileCropped] Boundingbox: ("<mMetadata.SerializeToBuffer(&buf, kXMP_OmitPacketWrapper); //QString metadataStr=QString::fromStdString(buf); // write generated metadata to file QFile metadatafile( TEMP_METADATA_FILE ); metadatafile.open(QIODevice::WriteOnly | QIODevice::Text); QTextStream out(&metadatafile); out << "\n"; out << buf.c_str(); out << ""; out.flush(); metadatafile.close(); } bool EqualX::File::fetchInfo(const QString &filename, EqualX::FileInfo *info) { if(!info) info = new EqualX::FileInfo; QString fileExt = filename.section(".", -1); EqualX::File::OpenModes mode = EqualX::File::OPEN_READ; if(fileExt.contains("svg") || fileExt.contains("ps")){ mode = EqualX::File::OPEN_READ | EqualX::File::OPEN_SCAN; } EqualX::File f; f.open(filename, mode); bool readStatus = f.read(); if(readStatus) { *info = f.info(); } f.close(); return readStatus; } EqualX::FileInfo EqualX::File::info() const { return mFileInfo; } void EqualX::File::setInfo(const EqualX::FileInfo &fileinfo) { mFileInfo = fileinfo; mClassImpl->mMetadata.Erase(); std::string prefix ; // actual prefix mClassImpl->mMetadata.RegisterNamespace(METADATA_NS, METADATA_PREFIX, &prefix); // escape chars QString preamble = mFileInfo.preamble(); preamble.replace("%", "#perc"); preamble.replace("\\", "#"); QString eq = mFileInfo.equation(); eq.replace("%", "#perc"); eq.replace("\\", "#"); QString fgCol, bgCol; EqualX::Util::colorToLatex(mFileInfo.fgColor(), fgCol); EqualX::Util::colorToLatex(mFileInfo.bgColor(), bgCol); mClassImpl->mMetadata.SetProperty(METADATA_NS, METADATA_PREAMBLE, preamble.toStdString().c_str(), 0); mClassImpl->mMetadata.SetProperty(METADATA_NS, METADATA_EQUATION, eq.toStdString().c_str(), 0); mClassImpl->mMetadata.SetProperty_Int(METADATA_NS, METADATA_ENV, mFileInfo.environment(), 0); mClassImpl->mMetadata.SetProperty(METADATA_NS, METADATA_FG, fgCol.toLatin1().constData(), 0); mClassImpl->mMetadata.SetProperty(METADATA_NS, METADATA_BG, bgCol.toLatin1().constData(), 0); mClassImpl->mMetadata.SetProperty_Int(METADATA_NS, METADATA_DOC_FONT_SIZE, mFileInfo.fontSize(), 0); } equalx-0.7.1/include/SymbolsGroupWidget.h000644 001750 001750 00000003774 12314604155 020657 0ustar00mihaimihai000000 000000 /* * Copyright 2010 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __WIDGETTOOLMENU_H_ #define __WIDGETTOOLMENU_H_ #include #include class QAction; class QHBoxLayout; class QToolButton; class QSignalMapper; class SymbolsGroupMenu; class SymbolsGroupWidget : public QFrame { Q_OBJECT public: // Methods SymbolsGroupWidget(QWidget * parent = 0); SymbolsGroupWidget(int nVisibleCols, QWidget * parent = 0); virtual ~SymbolsGroupWidget(); void addSymbols(LatexSymbolsGroup* gr); void setIconSize(const QSize &size); public slots: void showMenu(); protected: // methods void init(int ncols); void addButton(QWidget *button); void addSymbol(LatexSymbol* sym); private: // data Members QHBoxLayout *mLayout; // layout used in container widget LatexSymbolsGroup* mSymbolsGroup; SymbolsGroupMenu *mMenu; QToolButton *mShowMenuButton; QSignalMapper *mSignalMapper; QSize mIconSize; int mMaxCols; // total number of visible columns shown by widget int mCurCol; protected: // virtual void mousePressEvent(QMouseEvent *event); virtual void enterEvent(QEvent *); virtual void leaveEvent(QEvent *); private slots: void symbolTriggered(int id); signals: void triggered(LatexSymbol*); }; #endif // WIDGETTOOLMENU_H equalx-0.7.1/resources/symbols/BigGreek/upsilon2.png000644 001750 001750 00000000306 12314604155 022700 0ustar00mihaimihai000000 000000 PNG  IHDR F)sRGBbKGD pHYs  tIME 'i(FIDAT(͑ 0lB`2UQA-@€@(0yj3 2t*{,9^b1$1IENDB`equalx-0.7.1/src/Library/000755 001750 001750 00000000000 12314604155 015432 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/symbols/Integrals/oint2.png000644 001750 001750 00000000322 12314604155 022427 0ustar00mihaimihai000000 000000 PNG  IHDR<sRGBbKGD pHYs  tIME ( 7,RIDAT8˽SA L2'2!,H+@MhՂp5-Pd&7eQNʱS9dOx` +s IENDB`equalx-0.7.1/resources/symbols/Operators/000755 001750 001750 00000000000 12314604155 020717 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/icons/preamble.png000644 001750 001750 00000001234 12314604155 020661 0ustar00mihaimihai000000 000000 PNG  IHDRasBIT|d pHYs:tEXtSoftwarewww.inkscape.org<IDATxڅIhA%UEIA/zbb`D2x!F# `"DQ ̹8sT J mz}7(~/UU 0$FABA{V\M6~ỷ(?x* N \ pFʩ8pDOut."Ɂ.J8odq$LjfHt={kBH`H>-խ3"[:T8gsB6Ϫt~[`CRU_-NMn*]3,p!va32Hrr?MJ.^D~v@B{:\ }qW WAF?F$ yt7}~UfIENDB`equalx-0.7.1/resources/symbols/RelationOperators/perp.png000644 001750 001750 00000000260 12314604155 024067 0ustar00mihaimihai000000 000000 PNG  IHDR F)sRGBbKGD pHYs  tIME.0IDAT(ݒ!0(sggcT\zQ%dp23 ^FX*IENDB`equalx-0.7.1/resources/symbols/Operators/odot.png000644 001750 001750 00000000342 12314604155 022371 0ustar00mihaimihai000000 000000 PNG  IHDR K7sRGBbKGD pHYs  tIME dbIDAT(͓10c;!UC)( i׏8rˌ$X* p*Њzk@R*k㜺Yq%EtZ9!ƗEusIENDB`equalx-0.7.1/include/WidgetColorPicker.h000644 001750 001750 00000004151 12314604155 020414 0ustar00mihaimihai000000 000000 /* * Copyright 2013 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __WIDGETCOLORPICKER_H_ #define __WIDGETCOLORPICKER_H_ #include #include class WidgetColorPicker : public QComboBox { Q_OBJECT public: //Methods WidgetColorPicker(QWidget *parent = 0); ~WidgetColorPicker(); QColor getColor() const; QString getColorName() const; void setCurrentIndex(int index); /* setColor(const QColor& color) * setColorName(const QString& colorName); * * try to select this color if it is in the list, otherwise add a new color * it will emit signals: * - currentIndexChanged(int index) * - colorSelectionChanged(QString name) * - colorSelectionChanged(QColor color) * * color name is a Qt named color */ void setColor(const QColor& color); void setColorName(const QString& colorName); private: //Methods void init(); QIcon createIcon(const QString& colorName) const; void addColor(QString colorName); void addColor(QColor color); private: //Data Members QColor m_Color; QString m_ColorName; int m_currentColorIndex; private slots: //Slots void on_comboBox_currentIndexChanged(int index); signals: //Signal void colorSelectionChanged(QString); void colorSelectionChanged(QColor); }; #endif /*__WIDGETCOLORPICKER_H_*/ equalx-0.7.1/resources/icons/preferences/general.png000644 001750 001750 00000003057 12314604155 023015 0ustar00mihaimihai000000 000000 PNG  IHDR szzsBIT|d pHYs|4ktEXtSoftwarewww.inkscape.org<IDATXŗkI?݊l$XCd2Q!3 V\6K'CB&` G]smfYAޫA4Oh.p~' @.>y䧫W\V qdYf~& 2efts  ={˅ z!@ף^y&u]m~k4%I^.X^^n!HӔ4ML&<|\dqS.Y\\T*})Je4h, u+al6C)eI& ^{$GGLSvu OZFʕ+52vwwt:{L&:`=8Xc 8RJOPJ)dB\!Eg;i vLG'I$IPJz7r]L4GQ04MMGQŋT*<NןezֆrsKR1ahб!qL3@ۥV!qh4c:GS $cn޼ɍ7x-+++ܻw( @نy4e EF v GbT*OVSTJgmJ)fq5g|}<l(ҥKܿr`0ܹsDQ իǨ@aq v>9<<۷odYF}._lXXXJ)A@h}JP@7oX]]5yI>aD""|5WHtsJ C! nllǏp\rp0ZЀݮ,cmm 8n PT}6>|jQV;V9 (LB$u]#8m:[R$If'|%nW,$"SJwV)ͤwޱRF8ˉkkklmm nݺEm.05d΁\:RJRLSjqsڵvD,//3 8#j/NJ9c }~8Mj iy4M=&zΨy .R4M)I cdt$u]M-MSs5"Q}?`4q8FIz6~Wx * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef DIALOGPREFERENCESFOLDER_H #define DIALOGPREFERENCESFOLDER_H #include namespace Ui { class DialogPreferencesFolder; } class DialogPreferencesFolder : public QDialog { Q_OBJECT public: explicit DialogPreferencesFolder(QWidget *parent = 0); ~DialogPreferencesFolder(); const QString name() const; const QString description() const; void setName(const QString& name); void setDescription(const QString& description); private: Ui::DialogPreferencesFolder *ui; }; #endif // DIALOGPREFERENCESFOLDER_H equalx-0.7.1/resources/symbols/Arrows/uparrow2.png000644 001750 001750 00000000304 12314604155 022502 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME /DIDAT(A yZ .˥>>(JE+K UTV#ڥO0V8&G6NK˃?~xh_ #3IENDB`equalx-0.7.1/resources/symbols/Accents/ddot.png000644 001750 001750 00000000313 12314604155 021756 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME)KIDAT8c?5>IFF5 ]3.q&$aHÈX~^Ɨ$IB.ur,PE9Z/IENDB`equalx-0.7.1/include/Util.h000644 001750 001750 00000002515 12314604155 015753 0ustar00mihaimihai000000 000000 /* * Copyright 2013 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef UTIL_H #define UTIL_H class QString; class QColor; namespace EqualX{ namespace Util{ // compute font resolution from Font Size in Points int getFontResolution(int fontSizePt); // computer the scale factor from the zoom slider // NOTE: this assumes the slider varies from (-10,10) and scale=1.0 for value 0 float getScaleFactor(int sliderValue); bool colorToLatex(const QColor &fromColor, QString &toLatexStr); void LatexToColor(const char* fromColor,QColor &toColor); QColor oppositeColor(const QColor& color); // returns the complementary color } } #endif // UTIL_H equalx-0.7.1/resources/icons/bookmarks/bookmarks.png000644 001750 001750 00000026377 12314604155 023071 0ustar00mihaimihai000000 000000 PNG  IHDR00% pHYs7\7\Ǥ vpAg00WbKGD X,\IDATxwp׷'=3MRA@ƀa I&clc0& &`"&A $BYB9kRվW~J;9Vuwl(}P!zP:m{Xdh" ~@_l"[F˾pV/?_2f4X_ ݝIh1ǧ@ⴕ~>ZV[XE @U.Ơ#''>^mOuDv"½OpAI &%`lDA_%m-t9 mikƳR۟qH8Z 4j^KGYwƐV3šKi<-kNgMV>֔?1(' 5uEug>Y[Vα妇L#Oi#ã5StvǬkYeda LVMJ>׊|/䚭!wƲn^vl9SE⽹_~0z*QQ1`~dRij?07 $DPGa |Fspve@jSY-VO{ CBm(A-Iwd/r4j3b\pzlٹ>?XD̚Lp6?mܚc+a7'bhЛt{E9`qinG㚇>ᷔp㫀;G9k\kˊfk,%K@ݏ&u &{v.Lg; %ON/IzU_O[EޖK_@5v}幫 [x C-N%h5SQ݀a<6MiQ`stt @@(r>*lRf`=yj)RE!ɷY}3Y[8ɣmCOIx`ې(J!<~3(\_%H'Қ=f*tgEmѾł ~/)̯-v?{ `]l@!*sKoK#\_t,͖=:۔ JMjݚ8QP5(mm_i J Y3>~p= C4Mb)quew5Qi-ZvĿmL_@,<^G/g=,t m(~T#`^d =xbE#clK?kwxv:v%rw1Tg_YX~'tm@Z}Gl i=Ԃd=kP{@AN䕦j$'K!8=nHw]Foj:.I'/)? zKkm~}ves,c#@1hfGTv>K1cOդ8Y]MAMc\L|aL4oMq~x@hgD{;Wl1;#+JMW5[K&2[vU ΍ +FʯUT=I[j,~YtN1y@Cr^Ư"rB}os1ВLK#Wɖ:R G! d7 'L.g8M;]GmȢ !Lx$"26BFchnu=S"P{ӌao 'Pd-q:T˞a!G3wPvt:u:{n8j*e13JDڄ.<3UrZӢYK_yY<~>Sz{Oul_o~leyH&X,PgFG$%tnw)I]Jfax>%Qp&.ٗjfzQ?0. qk\?!sNrk}Bk]te;j=,C[Ԥ$m}aK˖9!|V 2.Y˯z/.t%@8,<co0KX6wtnsK\_u5D FOҁFhYad=#"]JA`AsiO\3 ˒._)]6T9fԡ k/QLTQܥI, dY&XQ:׊?t6K̡aTr*}^6?y|DCBLZ'!Zvst-MRmX<9YΟ+.Ŋ/l1_ԗ"ɘ.7Iѿ?duvo{-[f&93 Ŋ؇2h}':}hvk7lChug3& 9_< δhmȻj ZV~yYmL塍O6E(@#| 5}ܙBWt9NE>ZPmpWrێq nxIKfX7u.![B"o|wMsل~h\Ҩ -ul:օ,t[i]+vS=\K6E `dnd@ 5xNNWV5l}瘮-˨5m;Py\" h[(v|odM{]s}#(yhM)`EHQ6lKO]F9&AC,7CfPQ窲o'ޗVEϽ)ըRd*.IV9)Yܐs ^xw{V"L<SnS/Ie]vMM3%_- lK>:)8UvP)>%W\O Q7,C֞za#|Y5ԭ/,ϋo:r BgBid_(϶~)98~yLf<_"\:ߡ}gBIO):T&4x7l($EI?7ǪOҨCAfA x V#g;""˖hch#|&ԃ/^r*lgnNm+UpX!7Yu3f2W_j*Jo.cgϔ(]㑪`hqUiƠ;RϖLnC_+<ȍTX5)SlXه;Z(n UbWEGnG !"ɸC|n?%J315OBG<ې4تe1Oɧr$GAgc)ucȋwn] }t_YvX.7!+Phvl^jZ9H\[f]P-EW^LOTZc;֚RSԔ>Yr߷kPVMh"4spcU+{sc*aUew7|]۪(y39Ui=B1U@˵KIok6pOj+ ڒ|cϩh0RUܫl>OYVI:afI8caәo3Wۺ^H zg9k0BwFؠQY7yΓY77d u:p蹼czЖOv6?$?j'Wy4M}.3h4 NGGW`?eOJ~3$+#SE:s+p1!P* 1PMq? ?4CרƦyh:I'-};DdGr<29ؽ}l틊 d9{ORB24-kqݥedX(Tnوg;q:'ٻWOMZ4;Pt-w3zЍ`J4KsMv`{=4?ODZ{Mx456vVM;(\~*q ա+7h-dwI*}T ԪBi?>us_^p0gsiI>c]$`(YHF$mg=>ܜVͥu!}e,6Cj%YVwps}i0-Vs fe,;(v`oȋ.OڒԘf=M5-?$FY? 3c+ԾҋtFNr%,›/nNx -߬{if$ U$MLT].h_>⡆cgR*ImhtN̻ \)Bb CwҔŻMzx*9 {]Y~WNEJ|.}&A8pbxzǣiY=Υ4 j8inq%xp?5¸:n2Dۚ:e|i~]{>MV _o$`aOVO䨖y8:"_^)`>=w c =y=[Tw33nDg#@8gyg:I *5BB=Xgb\|3zDhrŦ.hđ~dt4{f*6Ub;@B2Ɓj~Ji -r40Oy"MyxLg}33L]!$(E"4jhѦڂX;}iKPKChRR4H]Į$9~5sÝ?>ם\ə;w&}2U ebut#Q,ڝ[*(*`UQ"T[)-P"MJa/cEJC+K*q./5C%׸]:K䐀Y hC%h/'[|sQVLM3]/l5< > 7U-&Ӛ):u H4.)ً+2~=,mC1D@|\zTTES_q]7fvrR O [~I?D!$l-UJzR7H1t gk9S1YּHٔä/՗ەEoԤV~g.^#/oqWq~ӧ{6[#3w~jv 1bAuE_H%nE۹ޙ.PMD3@k$ƪlm H/faЕ=f/伵ә< 8 @\7ITKM7D ګv ̕ t4H0 bA..^$ hN+QfYiW򣱯T;Wu^Y29{\8e8gEBC Z5z^T֮?ڠ'{曘a>ʻ~OϻXWp%kl+ijG߰w(Ԉ?*mƯX7pa@aK?~|ٷ;{}l}4ߘZEQQHJ9wy+Mk8qBrG7OFk_Fk|02#5@U9+NL;z8(S2 :yԭav/s˚V-=M$LweMGQMGH;CH p 0ivG˸au2=Jָ3E-j~3jhkS ?ӱ*gLZ?hi- u##m\*"X>]^ )rŋJ3M~4,S]uq̀49Rl-ypB+^tʇ;f(4Dbp]rfgMnM q0fHWafSE]8Q~\lCÂus 2ˈ>8V ֎ 51CI Ёqa 3U; TZeUC:@qe4N@;7](ltm5ݾ34^ i*D-[qIznǗXuE{Gi\|`R.p Nō=J>α RqSb;:#TV]5;U'1Xݾ ,,1xs v x6{i!M c&!Z5ƏT^)}+sdS蝰]N%A1ɩ= b a'5d6I..ć^C0W7:h si QX}M:HFj!d ٻ MJ=te?ND!|sG|HlS5ƟE WdǦ{>$rE W-N+0 J!AJa7:%1E۝bpEN'lb[gWxKFI_f= nw*O 'VWΣIENDB`equalx-0.7.1/resources/icons/menu/symbols-panel.png000644 001750 001750 00000001114 12314604155 022620 0ustar00mihaimihai000000 000000 PNG  IHDRn pHYs^tIME 8`{bKGD̿IDATxڕMkQ{33|IIRVuq%.St}WrJPʅ_++(آ1&2fbc$sp}9w/;q4A{{k:xzwri"mk"Å| s  JтN**GH J)gpkGҒl n%-:))x"C!bB{L ~LͲ?H0?UNT d\L{aw=֏HAf$*Ym膶CqzN;D4{:R}&Z]J5I("-ZcLJ$h2uIENDB`equalx-0.7.1/src/Symbol.cpp000644 001750 001750 00000001624 12314604155 016002 0ustar00mihaimihai000000 000000 /* * Copyright 2014 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include "Symbol.h" LatexSymbol::LatexSymbol() : id(0), parent(0) {} LatexSymbolsGroup::LatexSymbolsGroup() : id(0), parent(0) {} equalx-0.7.1/resources/symbols/RelationOperators/succeq.png000644 001750 001750 00000000316 12314604155 024406 0ustar00mihaimihai000000 000000 PNG  IHDR F)sRGBbKGD pHYs  tIME5 J/NIDAT(͒A 0 êY; ¶ϲ QGUI0`OJ%cPYoSJA TmuQ}J7D,IENDB`equalx-0.7.1/resources/symbols/Accents/overrightarrow.png000644 001750 001750 00000000316 12314604155 024113 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME)G|tgNIDAT8A 03{j1" jPG+JfCo gcǗfӄ"\} pM-IENDB`equalx-0.7.1/resources/symbols/Arrows/updownarrow2.png000644 001750 001750 00000000326 12314604155 023376 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME hVIDAT(Ւ ,݉E .'G-PA'~**0*8'GȻkwjXy|frmt 7iA8IENDB`equalx-0.7.1/resources/icons/tabBar/matrix/eq04.png000644 001750 001750 00000001462 12314604155 022345 0ustar00mihaimihai000000 000000 PNG  IHDR,"$;q pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;8zTXtLatexxIJM̫.M,)ʬR0TPS0PQR0PPS0RIK+pLD tEXtResolution99^IDATX՘U0F/*G*j66 %  tЅIز(qU,)'ӿ.73@/%h`O1}(V!s)ྡL0~7@}I2X]3w| KJ`@Py<_imcY| F G`b#_)3~^>̠GJ|~O &Jn&"v@h1%n ;[{öN O0%@kD^nK% 0Qqf1_HCLAyS{}A-3p86G'gF?$x!-T\.P[q8H؄;%PױPV2\ m^XV/p,AW 8B[*9j$ 9죗ݢvh5SY.!$(4P Oj5C"<Uo;DgdIENDB`equalx-0.7.1/resources/symbols/Operators/times.png000644 001750 001750 00000000314 12314604155 022544 0ustar00mihaimihai000000 000000 PNG  IHDR B'sRGBbKGD pHYs  tIME ;LIDAT(A 0 کfqPM$cy`,v38t|ݺv:XOK,4!5IENDB`equalx-0.7.1/resources/symbols/Operators/oplus.png000644 001750 001750 00000000342 12314604155 022566 0ustar00mihaimihai000000 000000 PNG  IHDR K7sRGBbKGD pHYs  tIME hkEbIDAT(ݓI 0 3z -Cu2&c #=U#x8)&@zʁd8D vKUJ'iFYΏ#\TI!iJIENDB`equalx-0.7.1/src/Util.cpp000644 001750 001750 00000004551 12314604155 015454 0ustar00mihaimihai000000 000000 /* * Copyright 2013 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include "defines.h" #include "Util.h" namespace EqualX{ int Util::getFontResolution(int fontSizePt) { int fontResolution; int dpi = QApplication::desktop()->logicalDpiX(); fontResolution = int(fontSizePt*dpi*72.27/720); return fontResolution; } float Util::getScaleFactor(int sliderValue) { float scale=1.0; if(sliderValue==0){ scale = (float)0.1; } else{ scale = (float)sliderValue/10.0; } return scale; } bool Util::colorToLatex(const QColor &fromColor, QString &toLatexStr) { // handle case for alpha - latex does not show alpha background if(fromColor.alpha()==0){ toLatexStr.clear(); return true; } toLatexStr = QString("%1,%2,%3").arg(QString::number(fromColor.redF()), QString::number(fromColor.greenF()), QString::number(fromColor.blueF()) ); return true; } void Util::LatexToColor(const char* fromColor,QColor &toColor) { QString fromLatexColor(fromColor); if(fromLatexColor.isEmpty() || fromLatexColor.isNull()){ toColor = QColor(Qt::transparent); return; } QStringList sl = fromLatexColor.split(",", QString::SkipEmptyParts); toColor.setRedF(sl.at(0).toFloat()); toColor.setGreenF(sl.at(1).toFloat()); toColor.setBlueF(sl.at(2).toFloat()); } QColor Util::oppositeColor(const QColor& color) { QColor op =color.toHsl(); int h, s, l; op.getHsl(&h,&s,&l); h+= 180; s=1; l=1; op.setHsl(h,s,l); op.toRgb(); return op; } } // end namespace EqualX equalx-0.7.1/resources/icons/tabBar/matrix/.directory000644 001750 001750 00000000102 12314604155 023061 0ustar00mihaimihai000000 000000 [Dolphin] AdditionalInfo=3 Timestamp=2010,2,9,13,37,33 ViewMode=1 equalx-0.7.1/resources/icons/tabBar/stats/eq06.png000644 001750 001750 00000001105 12314604155 022173 0ustar00mihaimihai000000 000000 PNG  IHDRG} pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;tEXtLatexX_1, \dots, X_ntEXtResolution1066NEIDATH՗Q0E@ 0ǔt\9iL Rs؝b,Y J՗+ΩώQ[z* J_U\ON,yeKIzn={xױ2)ݮǯk$?XDhjy-B>5' &0.͉Emu5Gb.oO` <::oA_XkϞz YR CjPz cרk\s=r4.lED#*Ѩ_;ʇhlF͙[GtJ?O5xIENDB`equalx-0.7.1/src/HistoryPanel/HistoryView.cpp000644 001750 001750 00000002053 12314604155 021447 0ustar00mihaimihai000000 000000 /* * Copyright 2014 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include "HistoryPanel/HistoryView.h" #include "HistoryPanel/HistoryViewItemDelegate.h" #include "HistoryPanel/HistoryListModel.h" HistoryView::HistoryView(QWidget *parent) : QListView(parent) { setItemDelegate(new HistoryViewItemDelegate(this)); setAlternatingRowColors(true); } equalx-0.7.1/resources/symbols/Operators/ominus.png000644 001750 001750 00000000335 12314604155 022740 0ustar00mihaimihai000000 000000 PNG  IHDR K7sRGBbKGD pHYs  tIME-K]IDAT(ݓA 03y{ I zGUfB|x) U@4* =#"J76^_w'Xf۞"87Ѐ>%`vIENDB`equalx-0.7.1/include/Symbol.h000644 001750 001750 00000003515 12314604155 016304 0ustar00mihaimihai000000 000000 /* * Copyright 2014 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef SYMBOL_H #define SYMBOL_H #include "defines.h" #include #include #include class LatexSymbolsGroup; class LatexSymbol { public: LatexSymbol(); virtual ~LatexSymbol() { parent = 0; packages.clear(); } int id; // internal counter LatexSymbolsGroup* parent; // pointer to parent group QString name; QString icon; // icon file name QString latex; // latex symbol QStringList packages; // required latex packages }; class LatexSymbolsGroup { public: LatexSymbolsGroup(); virtual ~LatexSymbolsGroup() { parent = 0; while(!symbols.isEmpty()) delete symbols.takeFirst(); symbols.clear(); } unsigned int id; LatexSymbolsGroup* parent; QString name; QList symbols; }; class LatexEquation : public LatexSymbol { public: LatexEquation(); virtual ~LatexEquation(); QString preamble; QStringList tags; //QColor fg; //QColor bg; LATEX_ENV_MODE envMode; LATEX_FONT_SIZE fontSize; }; #endif // SYMBOL_H equalx-0.7.1/resources/symbols/Miscellaneous/infty.png000644 001750 001750 00000000334 12314604155 023403 0ustar00mihaimihai000000 000000 PNG  IHDRvsRGBbKGD pHYs  tIME(3ͷ)\IDAT8TA X ;iS YNQH?4-\CCwq7(񦮞:Y?ĄՖ5"4zA~t2UIENDB`equalx-0.7.1/resources/symbols/Sets/mathbb_Z.png000644 001750 001750 00000000330 12314604155 022107 0ustar00mihaimihai000000 000000 PNG  IHDR F)sRGBbKGD pHYs  tIME2-pXIDAT(ՒA 0 wx*Ԋm=@YԬ䆾[ޒr"A_mJ#sL(3j0,NFtBaLSIENDB`equalx-0.7.1/resources/symbols/Greek/epsilon.png000644 001750 001750 00000000301 12314604155 022147 0ustar00mihaimihai000000 000000 PNG  IHDR\^sRGBbKGD pHYs  tIME"$3SAIDAT(ՑA _Nu&)]8HOm $Lڼ^+o%jݤ L !4sIENDB`equalx-0.7.1/resources/symbols/Accents/check.png000644 001750 001750 00000000320 12314604155 022077 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME-;iPIDAT8A 0w?O%FC)f/*IwEN~ TU#tK;Z\Vnv_>L5rIENDB`equalx-0.7.1/resources/icons/editor/arrow-down.png000644 001750 001750 00000001015 12314604155 022454 0ustar00mihaimihai000000 000000 PNG  IHDRasBIT|d pHYs:tEXtSoftwarewww.inkscape.org<IDATxݓ1K\Aϼ7nPWd?VHBU? haZ6e&F"j#*ogW8<(B\0p8;W~Z p`y<#GG?Yaa\~ IDtoE^2RY0 `IӥR_kQ5Uhz!jd淡#gpfov SBBup:j4gY ?XtwoJaTO}xMWh;#v0 9.;o\Xq* AK zBc ]}mgmT](NrI'Q$~wߐ-IFJr47to ܄}js*4q.SQLⅯ|?xt $mt IENDB`equalx-0.7.1/resources/symbols/Accents/underleftarrow.png000644 001750 001750 00000000315 12314604155 024071 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME 9:WMIDAT8c?5##rh~X0Ql޼LnX51 raH pHnG3"[3IENDB`equalx-0.7.1/resources/symbols/Sets/mathcal_L.png000644 001750 001750 00000000320 12314604155 022244 0ustar00mihaimihai000000 000000 PNG  IHDR F)sRGBbKGD pHYs  tIME10OPIDAT(Ւ C|z*BCP> NjX؈{8*J*Д\^ǤU瓳[}CW^4+#)_IENDB`equalx-0.7.1/resources/symbols/Arrows/nearrow.png000644 001750 001750 00000000342 12314604155 022400 0ustar00mihaimihai000000 000000 PNG  IHDRgsRGBbKGD pHYs  tIMEbIDAT8; ]_yEAc"y#@649l0\zmޑVp3 6@OQ< d']?SC[IENDB`equalx-0.7.1/resources/icons/menu/edit-copy.png000644 001750 001750 00000001003 12314604155 021725 0ustar00mihaimihai000000 000000 PNG  IHDRj sBITO pHYsvv}ՂtEXtSoftwarewww.inkscape.org<PLTE%%$&&&(((ĮWvtRNS$'017LMeevW9%IDATx]A! D; W|ݺEI>JX< zٿ 6C0s$ftJb`{fi v//F٫/Ds!UՍ4`Ҽ8j\(l+P7>v yhũL0o{͑WxR/)E}JIENDB`equalx-0.7.1/resources/icons/filetypes/txt.png000644 001750 001750 00000002615 12314604155 021721 0ustar00mihaimihai000000 000000 PNG  IHDR szztEXtSoftwareAdobe ImageReadyqe</IDATxڴW]LU>3sg]v[۴JBSJ? `$cC&Mjy>5a.,TS)MXHAUIZ@-眙;;n޿s9{F, (" ֭i)(PF:HܗN'644dݫ233cPHxB#( 6Z,G}}} 1 ի9  ](ֱP??A}}}c*&p4M+TP$ oByy9D0Mc`6ojըƎ=k||NR5\U|PU;㱣*|hgvnjjj:kF4.L/,-" V9 @ 4bkۄF8?zΝc~OaM}O8U TMM&R hFgNqbf6 R##| l[oϸ%M͐X9;xUмwʊ0 ôaB:= çNq:%&Prc 6sxj }ok8~Ԁ#50ȻDGg' Rk8ɓБH`\}eܘkU4 j B@=|!03rGNdC0KA 1 EDޒ|!R~ >2^㼿*RTgr9c>zsCU0656PP lС,.e20qOnͳhWY@ L1M!$M H z^~!T퀱OpYhzr*L݄wO| %XY/X6x hѵқҝ |vu8|(Lg᱇_;vnCfy>?h$Ĺ>`_ni )z)&j?Dp?0x"r>JĢg0B!UJƵAd81R;tΊs|'>"ZUE¾>BACﮪ 'Oq[Q^k6 ɾY1%L#p1: 2c'؄ƒж!y>+G/3u <>F ?O^>Կ>=1bA~7|D{8*^zj/68ai }=tEZDZ+GY#IENDB`equalx-0.7.1/resources/symbols/Accents/hat.png000644 001750 001750 00000000312 12314604155 021577 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME+()-JIDAT81! ab&wYTTxmh0IJzFP/OZ=g 2<9iI9gnIENDB`equalx-0.7.1/ui/BookmarksPanel/DialogPreferencesBookmark.ui000644 001750 001750 00000010005 12314604155 024166 0ustar00mihaimihai000000 000000 DialogPreferencesBookmark Qt::ApplicationModal 0 0 303 325 Edit Bookmark true QFormLayout::AllNonFixedFieldsGrow 0 4 :/resources/icons/bookmarks/bookmarks.png Qt::AlignCenter <html><head/><body><p><span style=" font-size:12pt; font-weight:600;">Edit Bookmark</span></p></body></html> &Title: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter editTitle &Folder: folderCombobox &Description: editDescription Qt::Horizontal QDialogButtonBox::Cancel|QDialogButtonBox::Ok true editTitle editDescription buttonBox buttonBox accepted() DialogPreferencesBookmark accept() 248 254 157 274 buttonBox rejected() DialogPreferencesBookmark reject() 316 260 286 274 equalx-0.7.1/resources/symbols/Greek/pi.png000644 001750 001750 00000000307 12314604155 021114 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME"/GIDAT(1 ! 3<*hp%,52*ԛuXJU7 zh~f B-{aIENDB`equalx-0.7.1/resources/icons/tabBar/matrix/eq02.png000644 001750 001750 00000002300 12314604155 022333 0ustar00mihaimihai000000 000000 PNG  IHDRQ)MŚ pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;SzTXtLatexxIJM̫.M,)ʬRH64UPSH641kcb㫍`F0I#1L&il\˥ J#s tEXtResolution80>J~>IDAThAR0zd { \ 477h#nK`OHd[ä?!{ܱؑ"` 5^ &.) ep](dp6quP<):a}Oiy1 q'q-6:b4R+`7R+v 8)yjm~fJv #P<74p4k9l) rX-gpGM`+>G1@-Ax&j۫g;v3S$As-ǀ-&L"4e%pC38"ʅŌ&_)L/ϣ7O|EFphu~^F& LXn ΀3at-hʡ[fȗg(/OJp$-] v[Ojb&O,BoGQǯf ö'vW%A^R~ԅ*(By`L/}'lzF3V? HN )闖؎8*c$!<+1s`L̤"C7 L%B-@<pOP L{g[aRuꂩ܅ӳFIENDB`equalx-0.7.1/resources/symbols/Operators/bigcirc.png000644 001750 001750 00000000346 12314604155 023032 0ustar00mihaimihai000000 000000 PNG  IHDRvsRGBbKGD pHYs  tIME&ĜfIDAT8͔A!r=VQrEjK$ J@(tJb d <}׳[NŊ;sl'r2lHn1mPOTIENDB`equalx-0.7.1/resources/symbols/Arrows/leftarrow2.png000644 001750 001750 00000000307 12314604155 023013 0ustar00mihaimihai000000 000000 PNG  IHDR<sRGBbKGD pHYs  tIME%=GIDAT81 plJ0[gEVӊ,UN "Moz8eU֑G7UH3xL"N+fIENDB`equalx-0.7.1/resources/symbols/Products/prod.png000644 001750 001750 00000000303 12314604155 022212 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME1 #kCIDAT(1 !3jߦE8Q~~&~ bh3,GN3ѓ(E})P@IENDB`equalx-0.7.1/resources/symbols/Accents/tilde.png000644 001750 001750 00000000316 12314604155 022130 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGDC pHYs  tIME .R\NIDAT8A _Ntn1\ B5Er`n+!JORGW)*͈rU< wڅ}E;[ IENDB`equalx-0.7.1/ui/dialogAbout.ui000644 001750 001750 00000021673 12314604155 016456 0ustar00mihaimihai000000 000000 DialogAboutUI Qt::WindowModal 0 0 507 323 0 0 About EqualX true 0 true 0 0 487 69 0 0 <html><head/><body><p>%1</p></body></html> Qt::RichText true true Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse 0 0 <html><head/><body><p><span style=" font-size:26pt; font-weight:600;">%1</span></p></body></html> 0 0 128 128 :/resources/icons/equalx/equalx-128x128.png false Qt::AlignCenter 0 0 <html><head/><body><p>%1</p></body></html> 0 0 EqualX is just a graphical interface to latex and a bunch of conversion programs for aiding you write equations faster in latex and generate export files to use them in other applications. Qt::PlainText false Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop false Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse 0 0 <html><head/><body><p><a href="http://equalx.sourceforge.net/">EqualX Web Site</a></p></body></html> Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter true Qt::TextBrowserInteraction 0 0 <html><head/><body><p><span style=" font-size:12pt; font-weight:600;">%1</span></p></body></html> Qt::Horizontal 40 20 License false false Thanks Qt::Horizontal 40 20 0 0 OK true closeButton released() DialogAboutUI reject() 72 299 253 196 equalx-0.7.1/resources/symbols/BigGreek/theta2.png000644 001750 001750 00000000335 12314604155 022316 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME 0T]IDAT(RA0*f2;5hze DArLù/x1EVJP,*ܰn?ZmJiۃ3 4) ]{kF%ڀIENDB`equalx-0.7.1/resources/symbols/Greek/mu.png000644 001750 001750 00000000307 12314604155 021125 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME GIDAT(1 }2 DNdKQb+FMWO1̄=vr5jP?|j&- XVIENDB`equalx-0.7.1/resources/symbols/Greek/000755 001750 001750 00000000000 12314604155 017776 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/icons/tabBar/stats/eq04.png000644 001750 001750 00000000645 12314604155 022201 0ustar00mihaimihai000000 000000 PNG  IHDR 5 pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;tEXtLatex\frac{1}{n}?\rtEXtResolution1066NIDAT8ӽAQȤJ0t@PԠ-PqI '93;=wnóǼ FTP#| Zhc'!n⻪OU'5Sm Q&0 ,`5膟QdNhc}dēʘoSz/I \$)7>IENDB`equalx-0.7.1/resources/symbols/Operators/bigtriangleup.png000644 001750 001750 00000000315 12314604155 024260 0ustar00mihaimihai000000 000000 PNG  IHDR K7sRGBbKGD pHYs  tIME hȄMIDAT( -_^ H#CxJI H*T")Iw xZ^KIiJsZ>|s-'mIENDB`equalx-0.7.1/resources/icons/menu/arrow-left.png000644 001750 001750 00000001000 12314604155 022107 0ustar00mihaimihai000000 000000 PNG  IHDRasBIT|d pHYs:tEXtSoftwarewww.inkscape.org<}IDATxڥSKBQ>{Rz% ih2k)]ZBfA֦(C)O}wqs A9v1 穭L;5JRAPmQz#}*&CΖ#:-s_Z[+kQ<ڪ)S}cJ].iw`RAx{p:Ju Xn LbГ{SH|uR+d,&g+vKƦ{py]̒Ų0!sdze߫4,? IP{IEfmĵ0@ 䥇EyCb/ rV>C\VC¤(~]8jIENDB`equalx-0.7.1/resources/symbols/Miscellaneous/hbar.png000644 001750 001750 00000000324 12314604155 023165 0ustar00mihaimihai000000 000000 PNG  IHDR B'sRGBbKGD pHYs  tIME+?TIDAT(͒A @6I(j{)s zX/pT$%"Y`vWn**w0*Ӗ/WLӏ^23kIENDB`equalx-0.7.1/resources/icons/equalx/equalx-32x32.png000644 001750 001750 00000002420 12314604155 022445 0ustar00mihaimihai000000 000000 PNG  IHDR szzsBIT|d pHYs : :dJtEXtSoftwarewww.inkscape.org<IDATXVmLW>oߖRؖR@WZi؆$&$BfuL.u3 8qbCXc 7ɢˢ$#Jl˧ X)ݟ/Pe&$ysss=b!JlimlB)-p2 <#>yu8p%a=ryQW]+s=XH+;Kmw:l7&4_0/1r2?_cHFd>fsҼGXwǪBN <6^gwQUX%^J%׍9`M~zQ@w9<1I~y})(fp ?ZTZ~(LWKYZgT-`L<"<8˨^\ p4jO]9Z%fxfG4ު_7sܠE1`>_) Ru웼|GM^CAzz:fƬ[_ RjkkSV֤$KQ5.j-+1*9=OaS7",cc6뉆Xl-nSǠ~=_"Q7C%<ΕXu>4z<ǐqW_h-4%8X1LeI0VpohccXAH>wp-b7|ѧTJW-bxCM822bLymÉ`UjrvZX8`0v2M`⋮3wLOk\]'Ga@!S%T H+_y5⽒egn72pQtEze`ob;◀OB~S_b,>[+/7TeWQ/d_mc>-(IENDB`equalx-0.7.1/resources/symbols/Greek/varpi.png000644 001750 001750 00000000326 12314604155 021626 0ustar00mihaimihai000000 000000 PNG  IHDR<sRGBbKGD pHYs  tIME 9&;VIDAT8K D\ ܔf!y*`XCAW@+T]mqHw.[H1 I\IENDB`equalx-0.7.1/resources/symbols/Operators/pm.png000644 001750 001750 00000000266 12314604155 022045 0ustar00mihaimihai000000 000000 PNG  IHDR K7sRGBbKGD pHYs  tIME6IDAT(1 3MlSU85 RzFU*qq uwp'IENDB`equalx-0.7.1/resources/icons/tabBar/stats/.directory000644 001750 001750 00000000102 12314604155 022713 0ustar00mihaimihai000000 000000 [Dolphin] AdditionalInfo=3 Timestamp=2010,2,9,13,37,43 ViewMode=1 equalx-0.7.1/resources/symbols/Miscellaneous/ell.png000644 001750 001750 00000000312 12314604155 023022 0ustar00mihaimihai000000 000000 PNG  IHDR B'sRGBbKGD pHYs  tIME#(JIDAT(͒1 0=tT @ @%H ݕ6e*_"/ y0!^&IENDB`equalx-0.7.1/resources/symbols/Greek/theta.png000644 001750 001750 00000000316 12314604155 021611 0ustar00mihaimihai000000 000000 PNG  IHDRLsRGBbKGD pHYs  tIME 9};NIDAT(͑A 0 ìY;JuP,(fW-/UT jct\7L&Wל?,#,%mIENDB`equalx-0.7.1/resources/icons/menu/document-new.png000644 001750 001750 00000001551 12314604155 022445 0ustar00mihaimihai000000 000000 PNG  IHDRĴl;sBIT|d pHYsvv}ՂtEXtSoftwarewww.inkscape.org<IDATxڕk` uXv*  "d/QAt? VwUP:h=̥6ٮi/n{ǛᗗjBփvO {_$$ZDKn!7ma=d7Iah@Z8@;}  ] ]?S<,Ick@w&{S=uy"LN<=A#=g!$_5&'2.W\~>3 G?G"C.|{ٲQ(N _s8|$/@W]R-'UHa~74Xףk8omoUѽ&r(ʶk{ چ4"Sw5 "Tj+Pmq=yo' Nw"~w>!vI)lvBЀfwV&wSeuiv;,˒."t%#7 #̂n¾I,// aT*NժNԱs}||G}kڧlW(PxzҼvL6MM4KDtr98xB<~"7ZlŋRt * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include "FileInfo.h" EqualX::FileInfo::FileInfo(QObject *parent) : QObject(parent), mPreamble(), mEquation(), mFontSize(LATEX_FONT_NORMAL), mFGColor(Qt::black), mBGColor(Qt::transparent), mSelections(), mEnvironment(LATEX_ENV_MODE_DISPLAY) { } EqualX::FileInfo::FileInfo(const EqualX::FileInfo &other) : QObject(0) { mPreamble = other.preamble(); mEquation = other.equation(); mFontSize = other.fontSize(); mFGColor = other.fgColor(); mBGColor = other.bgColor(); mSelections = other.selections(); mEnvironment= other.environment(); } QString EqualX::FileInfo::equation() const { return mEquation; } QString EqualX::FileInfo::preamble() const { return mPreamble; } HLSelections EqualX::FileInfo::selections() const { return mSelections; } LATEX_FONT_SIZE EqualX::FileInfo::fontSize() const { return mFontSize; } QColor EqualX::FileInfo::fgColor() const { return mFGColor; } QColor EqualX::FileInfo::bgColor() const { return mBGColor; } LATEX_ENV_MODE EqualX::FileInfo::environment() const { return mEnvironment; } void EqualX::FileInfo::setEquation(const QString &equation) { mEquation = equation; } void EqualX::FileInfo::setPreamble(const QString &preamble) { mPreamble = preamble; } void EqualX::FileInfo::setSelections(const HLSelections &selections) { mSelections = selections; } void EqualX::FileInfo::setFontSize(int size) { mFontSize = (LATEX_FONT_SIZE)size; } void EqualX::FileInfo::setForegroundColor(const QColor &color) { qDebug() << "FG Color changed to " << color.name(); mFGColor = color; } void EqualX::FileInfo::setBackgroundColor(const QColor &color) { qDebug() << "BG Color changed to " << color.name(); mBGColor = color; } void EqualX::FileInfo::setEnvironment(int env) { mEnvironment = (LATEX_ENV_MODE)env; } EqualX::FileInfo &EqualX::FileInfo::operator =(const EqualX::FileInfo &other) { if(&other==this) return *this; mPreamble = other.preamble(); mEquation = other.equation(); mFontSize = other.fontSize(); mFGColor = other.fgColor(); mBGColor = other.bgColor(); mSelections = other.selections(); mEnvironment= other.environment(); return *this; } equalx-0.7.1/resources/symbols/RelationOperators/gg.png000644 001750 001750 00000000331 12314604155 023515 0ustar00mihaimihai000000 000000 PNG  IHDRgsRGBbKGD pHYs  tIME. RYIDAT8A ! /VRnL iTNTˡ~@:fL * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef BOOKMARKSVIEW_H #define BOOKMARKSVIEW_H #include #include "Library/LibraryData.h" class BookmarkItem; class BookmarksItemModel; class BookmarksView : public QTreeView { Q_OBJECT public: explicit BookmarksView(QWidget *parent = 0); void setModel(BookmarksItemModel *model); protected: virtual void contextMenuEvent(QContextMenuEvent *ev); BookmarkItem* currentItem(); /* void addPiece(const LibraryModelData &rowData); void dragEnterEvent(QDragEnterEvent *event); void dragMoveEvent(QDragMoveEvent *event); void dropEvent(QDropEvent *event); void startDrag(Qt::DropActions supportedActions); */ private: BookmarksItemModel* mModel; }; #endif // BOOKMARKSVIEW_H equalx-0.7.1/resources/icons/menu/bookmarks-organize.png000644 001750 001750 00000002037 12314604155 023644 0ustar00mihaimihai000000 000000 PNG  IHDRĴl;sBIT|d pHYsvv}ՂtEXtSoftwarewww.inkscape.org<IDAT8MESw|'`1H$(b0.u]ٸq97ND 7qkwDD03`&oWW9.Q,h,ziJ̌[k"mK x4Q߈!^z}+ƹ?¹iy贈+ϼ[&&:ds*}{ϟ7?ܠgO2@L9G G+9)^8yÁ[pKVVV*-]_kkC/3C&)se䝳c(SjXM8g.jbfx2ULSb)ړs^ 035`jݜA *;>b{;)hg jT* lSRaH)-2^Xj2Mq1ږ"' DunJnD=J,2i"ў!%Ё밚XYY١yeJ{Qڈ2g wx(,(4f0QM9m0 o2[[[j^Waf=b`,5C%H&ܸ,7S4EjBe3eԹq;tf,YBDPSb߃)GJ ZeU(<hSI8q Zp@PZ2k7W,ц 3c BDEAEK"P"l,-ݧze^Z.F^q5BX>O8 Ѐk#y=Mkߤ Q,qּH!B7bDq4@x,( M,2>F޳ #"8l#8rfd2AϯB姷=;e1xbp4GP󏁁A? X$%4u& 00Dv2?9?[B!)\Jdl c8I@y|D3)fͨ CIENDB`equalx-0.7.1/src/DialogPreferences.cpp000644 001750 001750 00000016626 12314604155 020126 0ustar00mihaimihai000000 000000 /* * Copyright 2010 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include "defines.h" #include "DialogPreferences.h" #include "Library/Library.h" DialogPreferences::DialogPreferences(QWidget *parent) : QDialog(parent) { setupUi(this); setupPreferencesListWidget(); connect(browsePDFLatex, SIGNAL(released()), this, SLOT(onBrowsePdfLatex()) ); connect(browsePDFtoCairo, SIGNAL(released()), this, SLOT(onBrowsePdfToCairo()) ); connect(browseGS, SIGNAL(released()), this, SLOT(onBrowseGS()) ); connect(buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(onClickedButtonBox(QAbstractButton*)) ); renderModeButtonGroup = new QButtonGroup; renderModeButtonGroup->addButton(renderModeDisplay, LATEX_ENV_MODE_DISPLAY); renderModeButtonGroup->addButton(renderModeInline, LATEX_ENV_MODE_INLINE); renderModeButtonGroup->addButton(renderModeAlign, LATEX_ENV_MODE_ALIGN); renderModeButtonGroup->addButton(renderModeText, LATEX_ENV_MODE_TEXT); connect(clearHistoryButton, SIGNAL(clicked()), LibraryManager::Instance(), SLOT(clearHistory()) ); } DialogPreferences::~DialogPreferences() { delete renderModeButtonGroup; } const QFont DialogPreferences::getFont() const { QFont font; font.setFamily(comboFontFamily->currentText()); font.setPointSize(comboFontSize->currentText().toInt()); return font; } int DialogPreferences::renderMode() const { return renderModeButtonGroup->checkedId(); } QString DialogPreferences::currentExportType() const { return exportCBox->currentText(); } void DialogPreferences::setCurrentExportType(const QString &fileType) { int idx = exportCBox->findText(fileType,Qt::MatchExactly); exportCBox->setCurrentIndex(idx); } void DialogPreferences::setCurrentExportType(QAction *actionType) { setCurrentExportType(actionType->data().toString()); } void DialogPreferences::setCurrentFont(const QString &fontDescription) { QStringList fontDescList = fontDescription.split(","); QString fontFamily = fontDescList.at(0); int idx = comboFontFamily->findText(fontFamily, Qt::MatchExactly); comboFontFamily->setCurrentIndex(idx); QString size = fontDescList.at(1); idx = comboFontSize->findText(size, Qt::MatchExactly); comboFontSize->setCurrentIndex(idx); } void DialogPreferences::onClickedButtonBox(QAbstractButton *b) { if(buttonBox->button(QDialogButtonBox::RestoreDefaults)==b) resetDefaults(); } void DialogPreferences::onBrowsePdfLatex() { QString filePath = QFileDialog::getOpenFileName(this, tr("Select Executable (pdflatex)"), QDir::homePath(), "pdflatex (*.exe, .*)"); if(!filePath.isEmpty()) pdfLatexEdit->setText(filePath); } void DialogPreferences::onBrowsePdfToCairo() { QString filePath = QFileDialog::getOpenFileName(this, tr("Select Executable (pdftocairo)"), QDir::homePath(), "pdftocairo (*.exe, .*)"); if(!filePath.isEmpty()) pdfCairoEdit->setText(filePath); } void DialogPreferences::onBrowseGS() { QString filePath = QFileDialog::getOpenFileName(this, tr("Select Executable (gs)"), QDir::homePath(), "gs (*.exe, .*)"); if(!filePath.isEmpty()) gsEdit->setText(filePath); } void DialogPreferences::resetDefaults() { // GENERAL checkRememberLayout->setChecked( DEFAULT_REMEMBER_LAYOUT ); int idx = exportCBox->findData(DEFAULT_EXPORT_TYPE, Qt::UserRole, Qt::MatchExactly); exportCBox->setCurrentIndex(idx); // EDITOR QFont font(DEFAULT_FONT, DEFAULT_FONT_SIZE); comboFontFamily->setCurrentFont( font ); comboFontSize->setCurrentIndex( DEFAULT_FONT_SIZE ); checkSyntaxHighligthing->setChecked( DEFAULT_HIGHLIGHTING ); checkTextWrapping->setChecked( DEFAULT_WRAPPING ); groupBoxCompletion->setChecked( DEFAULT_COMPLETION ); checkSensitiveCompletion->setChecked( DEFAULT_COMPLETION ); // PREVIEW renderAutoUpdate->setChecked( DEFAULT_UPDATE_AUTO ); renderManualUpdate->setChecked( DEFAULT_UPDATE_AUTO ); spinUpdateTime->setValue(DEFAULT_UPDATE_TIME ); bgPreviewColor->setColorName(DEFAULT_PREVIEW_BG); // Equation fgColorPicker->setColorName( DEFAULT_RENDER_FG ); bgColorPicker->setColorName( DEFAULT_RENDER_BG ); renderFontSize->setCurrentIndex( DEFAULT_RENDER_FONT_SIZE ); switch(DEFAULT_RENDER_MODE){ case LATEX_ENV_MODE_INLINE: renderModeInline->setChecked(true); break; case LATEX_ENV_MODE_ALIGN: renderModeAlign->setChecked(true); break; case LATEX_ENV_MODE_TEXT: renderModeText->setChecked(true); break; default: case LATEX_ENV_MODE_DISPLAY: renderModeDisplay->setChecked(true); break; } // COMMANDS pdfLatexEdit->setText( DEFAULT_PDFLATEX ); pdfCairoEdit->setText( DEFAULT_PDFCAIRO ); gsEdit->setText( DEFAULT_GS); } void DialogPreferences::setupPreferencesListWidget() { preferencesListWidget->setViewMode(QListView::IconMode); preferencesListWidget->setFlow(QListView::TopToBottom); preferencesListWidget->setSelectionMode(QAbstractItemView::SingleSelection); preferencesListWidget->setIconSize(QSize(32,32)); preferencesListWidget->setSpacing(0); preferencesListWidget->setDragEnabled(false); preferencesListWidget->setSelectionRectVisible(false); preferencesListWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); preferencesListWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); QListWidgetItem* item = new QListWidgetItem(QIcon("://resources/icons/preferences/general.png"), tr("General"), preferencesListWidget); item->setData(Qt::UserRole+1, ITEM_GENERAL); preferencesListWidget->setCurrentItem(item); item = new QListWidgetItem(QIcon("://resources/icons/preferences/editor.png"), tr("Editor"), preferencesListWidget); item->setData(Qt::UserRole+1, ITEM_EDITOR); item = new QListWidgetItem(QIcon("://resources/icons/preferences/preview.png"), tr("Preview"), preferencesListWidget); item->setData(Qt::UserRole+1, ITEM_PREVIEW); item = new QListWidgetItem(QIcon("://resources/icons/preferences/advanced.png"), tr("Advanced"), preferencesListWidget); item->setData(Qt::UserRole+1, ITEM_ADVANCED); //QRect r = preferencesListWidget->visualItemRect(item); preferencesListWidget->setMaximumHeight(preferencesListWidget->sizeHintForRow(0)+2); connect(preferencesListWidget, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(onPreferencesItemActivated(QListWidgetItem*)) ); } void DialogPreferences::onPreferencesItemActivated(QListWidgetItem *item) { stackedWidget->setCurrentIndex(item->data(Qt::UserRole+1).toInt()); } equalx-0.7.1/include/Library/000755 001750 001750 00000000000 12314604155 016266 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/symbols/Accents/overleftarrow.png000644 001750 001750 00000000320 12314604155 023723 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIMEvePIDAT8I 1DΕmh d $qOAl+ `h0$mR'[yE3Ҧp%;Sv j1\,M-}IENDB`equalx-0.7.1/src/BookmarksPanel/DialogPreferencesBookmark.cpp000644 001750 001750 00000005216 12314604155 024515 0ustar00mihaimihai000000 000000 /* * Copyright 2014 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include "Library/LibraryData.h" #include "Library/Library.h" #include "DialogPreferencesBookmark.h" #include "ui_DialogPreferencesBookmark.h" DialogPreferencesBookmark::DialogPreferencesBookmark(QWidget *parent) : QDialog(parent), ui(new Ui::DialogPreferencesBookmark), mPIdx(0) { ui->setupUi(this); } DialogPreferencesBookmark::~DialogPreferencesBookmark() { delete ui; } QString DialogPreferencesBookmark::title() const { return ui->editTitle->text(); } QString DialogPreferencesBookmark::description() const { return ui->editDescription->toPlainText(); } int DialogPreferencesBookmark::parentFolder() const { int idx = ui->folderCombobox->currentIndex(); if(idx>1){ return ui->folderCombobox->itemData(idx).toInt(); } return 1; } void DialogPreferencesBookmark::setTitle(const QString &title) { ui->editTitle->setText(title); } void DialogPreferencesBookmark::setDescrition(const QString &desc) { ui->editDescription->setPlainText(desc); } void DialogPreferencesBookmark::setParentFolder(int id) { mPIdx = id; } void DialogPreferencesBookmark::show() { populateFolderCombobox(); QDialog::show(); } int DialogPreferencesBookmark::exec() { populateFolderCombobox(); return QDialog::exec(); } void DialogPreferencesBookmark::populateFolderCombobox() { ui->folderCombobox->clear(); ui->folderCombobox->addItem(tr("Unsorted Bookmarks")); ui->folderCombobox->insertSeparator(1); LibraryRowsList foldersList = LibraryManager::Instance()->getAllBookmarkedFolders(); foreach(LibraryModelData folderData, foldersList){ ui->folderCombobox->addItem(QIcon::fromTheme("folder", QIcon("://resources/icons/bookmarks/folder.png")), folderData.name, folderData.id); } int curIdx = 0; if(mPIdx>1) curIdx = ui->folderCombobox->findData(mPIdx); ui->folderCombobox->setCurrentIndex(curIdx); } equalx-0.7.1/resources/symbols/Arrows/leftharpoondown.png000644 001750 001750 00000000275 12314604155 024141 0ustar00mihaimihai000000 000000 PNG  IHDRgsRGBbKGD pHYs  tIME%h @=IDAT8퓱 b/X`%RFiA f=RRI2HY18yIENDB`equalx-0.7.1/resources/symbols/RelationOperators/geq.png000644 001750 001750 00000000323 12314604155 023675 0ustar00mihaimihai000000 000000 PNG  IHDR F)sRGBbKGD pHYs  tIME.57SIDAT(͑A ! xt ji 21 *)6QP%2hh(*gPOs/1vRWE;ʹIENDB`equalx-0.7.1/src/SymbolsGroupMenu.cpp000644 001750 001750 00000004603 12314604155 020027 0ustar00mihaimihai000000 000000 /* * Copyright 2010 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include "SymbolsGroupMenu.h" SymbolsGroupMenu::SymbolsGroupMenu(QWidget * parent, int cols) : QMenu(parent), mMaxCols(cols), mCurCol(0), mCurRow(0), mHide(true) { m_grid = new QGridLayout; m_grid->setContentsMargins(0 ,0, 0, 0); m_grid->setSpacing(0); //setFrameShadow(QFrame::Sunken); //setFrameShape(QFrame::Box); setLayout(m_grid); } void SymbolsGroupMenu::appendWidget(QWidget *widget) { m_grid->addWidget(widget, mCurRow, mCurCol); mCurCol++; if(mCurCol >= mMaxCols) { mCurCol=0; mCurRow++; } } bool SymbolsGroupMenu::isEmpty() { if(m_grid->count() > 0 ) return false; else return true; } void SymbolsGroupMenu::popup() { mHide = false; QWidget *parentWidget = (QWidget*)parent(); if(parentWidget){ QPoint p = parentWidget->mapToGlobal( QPoint(0,0)); setGeometry(p.x(), p.y() + parentWidget->height(), parentWidget->width(), sizeHint().height() ); } show(); } void SymbolsGroupMenu::enterEvent(QEvent *event) { showMenu(); QMenu::enterEvent(event); } void SymbolsGroupMenu::leaveEvent(QEvent *event) { if( event->type() == QEvent::Leave ){ QTimer::singleShot(200, this, SLOT(hideMenu()) ); } QMenu::leaveEvent(event); } void SymbolsGroupMenu::showMenu() { mHide = false; if(isHidden() ) show(); } void SymbolsGroupMenu::hideMenu() { //keep it if mouse is over parent widget if( !((QWidget*)parent())->underMouse() || underMouse()){ QTimer::singleShot(200, this, SLOT(hideMenu()) ); } } equalx-0.7.1/resources/symbols/Miscellaneous/prime.png000644 001750 001750 00000000260 12314604155 023364 0ustar00mihaimihai000000 000000 PNG  IHDRXcsRGBbKGD pHYs  tIME1+H0IDATŐ! ÖA 0K+C@Tydn!̦2IENDB`equalx-0.7.1/resources/symbols/RelationOperators/propto.png000644 001750 001750 00000000316 12314604155 024446 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME1 oNIDAT(;0C_u2VE;c`eCRP&TdRoʮ?ؒu[3]4&IENDB`equalx-0.7.1/resources/icons/menu/clear_left.png000644 001750 001750 00000005764 12314604155 022152 0ustar00mihaimihai000000 000000 PNG  IHDRĴl; pHYs  #u OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3-gAMA|Q cHRMz%u0`:o_FIDATxTA0^{|BpS_]XЃك/'g6ܦ!tu)!g O‹rHz=(=u XE:cdY㕴,Km 510:cFUUne[kieQµwB?oU]y/Qi"I4M$|SqUJaGW{ J)Lt * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef HISTORYVIEW_H #define HISTORYVIEW_H #include #include "Library/LibraryData.h" class HistoryView : public QListView { Q_OBJECT public: explicit HistoryView(QWidget *parent = 0); }; #endif // HISTORYVIEW_H equalx-0.7.1/include/HistoryPanel/HistoryWidget.h000644 001750 001750 00000002634 12314604155 022266 0ustar00mihaimihai000000 000000 /* * Copyright 2014 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef HISTORYWIDGET_H #define HISTORYWIDGET_H #include #include #include "Library/LibraryData.h" namespace Ui { class HistoryWidget; } class HistoryListModel; class HistoryWidget : public QWidget { Q_OBJECT public: explicit HistoryWidget(QWidget *parent = 0); ~HistoryWidget(); signals: void activated(const LibraryModelData); // emited when an item is double clicked from the history view; it emits the id of the history row (from history table) protected slots: void onViewItemActivated(QModelIndex index); private: HistoryListModel *mModel; Ui::HistoryWidget *ui; }; #endif // HISTORYWIDGET_H equalx-0.7.1/include/SymbolsPanel.h000644 001750 001750 00000002447 12314604155 017452 0ustar00mihaimihai000000 000000 /* * Copyright 2014 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef SYMBOLSPANEL_H #define SYMBOLSPANEL_H #include #include "Symbol.h" class QGridLayout; class SymbolsPanel : public QWidget { Q_OBJECT public: explicit SymbolsPanel(QWidget *parent, int cols=7); virtual ~SymbolsPanel(); void appendSymbolsGroup(LatexSymbolsGroup *group); signals: void triggered(LatexSymbol*); public slots: protected: QGridLayout* mLayout; int mMaxCols; // # of cols (of panel widgets) int mCurCol; // # of current column int mCurRow; }; #endif // SYMBOLSPANEL_H equalx-0.7.1/resources/icons/tabBar/chemistry/eq05.png000644 001750 001750 00000001730 12314604155 023047 0ustar00mihaimihai000000 000000 PNG  IHDRF$4L pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;DzTXtLatexxs)KI-*N-6I,JuV/ kc23JrRJˋkke%^tEXtResolution116-'IDATh;r0@@.2=9A (g`tKvκr|X I|D $ %  b=^-{Ɛe@{@K܊I[d/~:eɁ4uO4I ,-䓉b Ya6*N6OՆV?Z}zElSjME%QM!_7ۼH! 0~_(Ks/G !*n֐|y~U(]y<SpN<)A~392=-U) uZodO{c)ФPY1WLIx#>";Q,G[o;k$)ﰛ3Cpxq$;9G|=4Dƺ)qX/vCǀ"/SJEye}CQPw+˫ Q&oIXQ6=x_ߘ KmJ[y+cc57G$v$mV-α+Zю􈣋ޱcԍȑ-lp@oEXVQVtxgfffflpbI8lr4d#\/G]Nr*Eb4Õ- ;%>Sr?$و1UhiXoy.oZa"IENDB`equalx-0.7.1/resources/symbols/Accents/underset.png000644 001750 001750 00000000270 12314604155 022657 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME g@8IDAT8c?5##rh~X0Ql޼Lke@EA$9IENDB`equalx-0.7.1/resources/icons/tabBar/geometry/eq03.png000644 001750 001750 00000001122 12314604155 022664 0ustar00mihaimihai000000 000000 PNG  IHDR( pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;tEXtLatex\widehat{AB}B'tEXtResolution116-'UIDAT81NA 8 T@V 7n@7Qb&/v8-9/pC!Ƹ]WJRƥ=lacTDؿ⹞t/b% N$?YgGjplJ-1e *Kbȡ)`8/IߢPKϒm 0Šo*VjsI$Y2~ERg2l62HkJ_sq1ۙ$})h7`aKnVN@RepO5#"MeUa^US&e2i|WJKI* fFMp{IENDB`equalx-0.7.1/changelog000644 001750 001750 00000013375 12314604155 015122 0ustar00mihaimihai000000 000000 equalx (0.62-0) oneiric; urgency=low - corrected transparent background bug for latex - corrected square brackets - corrected quadratic formula from templates - Equation font size defaults to size 20 - empty text in equation editor shows information text - solved minor bugs in output of latex log * Implemented zoom & zoom slider * Preferences Dialog allows to show/hide Log * Latex output visible in Log Tab - polished GUI * Now Preamble can be toggle from a button in mainwindow * Preferences allows to show/hide only the latex log tab * LatexEditor shows line numbers, same for the Preamble editor. But, in Equation editor the counting starts from where preamble finishes. * Reported errors by latex output are highlighted in Equation editor and Preamble editor. A nice sign shows along the line number also. - fixed warnings * some modifications to About Dialog. Included Like button for the EqualX Facebook page * Fixed About Dialog links - corrected "Remeber" in Preferences Dialog * Added class ConfigButton required for a polished GUI in the Modified tab "Commands" from Preferences Dialog. * Added the GPL 3 License boilerplate to all remaining files * Added a check for the requirements (latex, dvipng,etc) - commands paths in Preferences Dialog are now readonly. They can be changed only the "Change" buttons - Change buttons for the commands select only the specific executables (filters other files) * Added fg color, bg color, preview font size and mode in Preferences dialog. which are saved in the settings * Added button "Reset Defaults" to the Preferences dialog and works - removed Util function from defines.h and moved the Util functions in Util.h - fixed a bug in Preferences dialog to set Font family and size for the equation editor - corrected UpdateEquation and UpdateImage to call runCommand(). Preparing to run the commands in a separete thread * Added more environments: display, inline(which were before) and align and text. Select them from the Mainwindow and Preferences * modified UI mainwindow and polished it for better smaller layout * removed Latex log output and tabs from mainwindow. There is no need since the error parser is enough * removed Parser and latex-template. * Modified Zoom slider to show zoom level in a tooltip - solved bug for find and highlight when dealing with transparent background color. If color is transparent than highlight in white. - fixed WidgetColorPicker.h to show real swatch transparent color. - fixed custom color selection in WidgetColorPicker - Modified foreground color combobox to not show transparent option (latex can not render transparent color) * Implemented a RenderEngine class to deal with the rendering and programs execution * Fixed RenderEngine * Added a nice preloader to show instead of the equation while the RenderEngine generates the files - cleaned up some obsolete and unused code in MainWindow - Modified RenderEngine to not take care of latex exitcode. This is required so that we parse and display the latex errors - changed preloader image with a nicer one - Functional preview of the generated image PNG - Modified RenderEngine to do check for the latex errors and stop if errors are found. - Modified EquationItem to clear if no image is available. Equation item now shows a grab cursor (hand) if it is possible to drag it, normal cursor otherwise - Modified Mainwindow and Equation item in order to not be possible to drag empty equation - Mainwindow shows a busy cursor while the RenderEngine is running -- Mihai Niculescu Sat, 22 Oct 2011 17:50:00 +0200 equalx (0.51-0) oneiric; urgency=low - Solved some minor bugs * Solved Recent Equations List bug (no empty equations in list) - add equation to Recent Files List after saved * Solved a bug from WidgetColor Picker * Added Changelog to EqualX Qt project file * Modified initial main window layout * Solved export bugs * Created binary packages for Windows & Ubuntu -- Mihai Niculescu Sat, 22 Oct 2011 17:50:00 +0200 equalx (0.50-1) oneiric; urgency=low * Redesigned Main window layout * Added Find Widget and a Replace Dialog * Added Search Menu items * Added Export Menu items * Added Export commands in Preferences Dialog * Added Manual Preview mode (available in Main Window & Preferences Dialog) * Added Preview button for manual Preview * Added Forced Preview available when pressing F5 key * Added Forced Preview in View menu item * Modified font size computed accordingly to desktop font DPI * Modified About Dialog * Removed Help->Manual menu item * Modified Symbols & Math Panel - make them 2 different toolbars * Modified background Symbols Toolbar to a stylesheet * Modified source code structure -- Mihai Niculescu Sat, 22 Oct 2011 01:08:00 +0200 equalx (0.42-1) lucid; urgency=low * Added an icon for EqualX in Windows * Changed Main window GUI * ported to Windows * Drag and drop bugs resolved - minor bugs solved -- Mihai Niculescu Sun, 24 Nov 2010 02:24:00 +0200 equalx (0.4-1) lucid; urgency=low * Removed Library Classes, no need for them yet. * Removed sqlite dependency in the project file, no need yet * Added Preferences Dialog UI (functionality almost complete) * New possible ways to customize the layout of the window * New About Dialog * Added Recent Files in Equation Menu * Fixed some bugs for writing and loading the equation from PNG metadata * Added undo, redo, copy, etc... - Modified Symbols & Math Panel -- Mihai Niculescu Sun, 21 Nov 2010 14:36:00 +0200 equalx (0.3-1) karmic; urgency=low * Initial release -- Mihai Niculescu Wed, 03 Mar 2010 15:59:39 +0200 equalx-0.7.1/resources/icons/tabBar/stats/eq02.png000644 001750 001750 00000001471 12314604155 022175 0ustar00mihaimihai000000 000000 PNG  IHDR+(gn pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;tEXtLatex\sum_{i=1}^{n} X_i^2űtEXtResolution1066N4IDATXq0M|Hn`KI[ I@ ɦ|-cnQEIx=f~X&*/v'AdsE`BgǧY0fp/{)?,&љ3&?Jisq̺w\'5?A tvd@)u!.<+le6p>yRL 5A\o;ֺ=;e@`2SGW:mjظdYε9tT:ϞP*9;=PU \6kS,tUIԫhֹTٯc|m|Kmw =%7'!V5igAoCe}dhLO8BW12XEiWfٙCBZ:յĢ +9L\q8=pH\y |jY<,MfT'o#_-ًS#>|eWGow~º7xq.{R)?}F1 IENDB`equalx-0.7.1/include/WidgetFind.h000644 001750 001750 00000003323 12314604155 017060 0ustar00mihaimihai000000 000000 /* * Copyright 2010 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef WIDGETFIND_H #define WIDGETFIND_H #include #include namespace Ui { class WidgetFind; } class WidgetFind : public QWidget { Q_OBJECT public: WidgetFind(QWidget *parent = 0); ~WidgetFind(); public: QString getFindExpr() const; void setFindExpr(const QString &expr); public slots: void show(); private slots: void onClose(); void onChangedFindText(const QString &expr); void onPressedFindNext(); void onPressedFindPrev(); void onToggledHighlight(bool activate); signals: void changedFindText(const QString &expr); void find(); void find(const QString expr, QTextDocument::FindFlags flags); void findAll(const QString expr, QTextDocument::FindFlags flags); // find all ocurrances void toggledHighlight(bool active); void closing(); protected: void changeEvent(QEvent *e); void setSignals(); private: Ui::WidgetFind *ui; }; #endif // WIDGETFIND_H equalx-0.7.1/resources/icons/editor/arrow-up.png000644 001750 001750 00000000744 12314604155 022141 0ustar00mihaimihai000000 000000 PNG  IHDRasBIT|d pHYs:tEXtSoftwarewww.inkscape.org<aIDATxݓ?/CaƟE{{oҁQ: LF `E:wbH_G0HϢA%LT"~Ot_NNa ?,c+h×;dž Oxj`_U;SbĀysU{5f:pt2i~x4#LiYs}+0/x1OB(0I4MiH" 8'mjj ԣNZb{SgX({PR@@ukw +fCH4Y2Њ6B@%x+3kt"}#DL2^T.hORBk7C0#4L/m2j8IENDB`equalx-0.7.1/resources/icons/menu/dialog-close.png000644 001750 001750 00000001455 12314604155 022405 0ustar00mihaimihai000000 000000 PNG  IHDRabKGD pHYs B(xtIME IDATxe[hήlGjc9-.EXJ22ɱ( ||H  XZLnvss m~}DC}1qj 7ZwMc12l.w~`K߷n߯ʊ+gθ6223Gx\lK&>X..TJKK%=믱%Oj zYanJG"8$8bMy椚mu:f.37#;;{-MNHK{4GtԷόZҾi[٧ic]Ⴋ5LO),WD\qO5AZ JAtW?̪j̊R*ZuUJK,Sz|@·;zUj&RC 1 9&BVsO30u.~uTm2Cfw))X8ZE&>K%W?v#jSvv@3yw)n)buYWH_d%@oЄe.|QQ`[~1|Ɋt]Q"Qd?8ɛ 6 @z#̔Y@%Z[QIENDB`equalx-0.7.1/resources/icons/menu/000755 001750 001750 00000000000 12314604155 017330 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/symbols/Arrows/nwarrow.png000644 001750 001750 00000000347 12314604155 022427 0ustar00mihaimihai000000 000000 PNG  IHDRgsRGBbKGD pHYs  tIMEgIDAT8Ŕ9 Le ĀlqώN]hH3$ΝwP0q+d:Yхl=p GNVyIe!4CJi|CZG@ IENDB`equalx-0.7.1/src/BookmarksPanel/BookmarksItemModel.cpp000644 001750 001750 00000030125 12314604155 023173 0ustar00mihaimihai000000 000000 /* * Copyright 2014 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include "Library/Library.h" #include "BookmarksPanel/BookmarkItem.h" #include "BookmarksPanel/BookmarksItemModel.h" BookmarksItemModel::BookmarksItemModel(LibraryManager *lib, QObject *parent) : QAbstractItemModel(parent) { mLibrary = lib; LibraryModelData rootData; rootData.id=1; rootData.name = "ROOT ITEM"; rootData.type = LibraryModelData::TypeFolder; mRootItem = new BookmarkItem(rootData, 0); mRootItem->mModel = this; connect(mLibrary, SIGNAL(bookmarkFolderChanged(QString)), this, SLOT(onFolderChanged(QString)) ); } BookmarksItemModel::~BookmarksItemModel() { delete mRootItem; } QVariant BookmarksItemModel::data(const QModelIndex &index, int role) const { //qDebug() << "data() "; if (!index.isValid()) return QVariant(); if (role != Qt::DisplayRole) return QVariant(); BookmarkItem *item = static_cast(index.internalPointer()); if(!item){ qDebug() << "data() item does not exists"; } if(item==mRootItem){ qDebug() << "data() item == mRootItem"; } // qDebug() << "data() returning value"; return QVariant::fromValue(item->data()); } bool BookmarksItemModel::canFetchMore(const QModelIndex &parent) const { BookmarkItem *item = static_cast(parent.internalPointer()); if(!item) item = mRootItem; //qDebug() << "canFetchMore("<< item->data().name <<") childCount=" << item->childCount() << " In DB= " << mLibrary->childrenCountInFolder(item->data().id); if(!item->data().isFolder()) return false; return (item->childCount() < mLibrary->childrenCountInFolder(item->data().id)); } void BookmarksItemModel::fetchMore(const QModelIndex &parent) { BookmarkItem* parentItem = static_cast(parent.internalPointer()); if(!parentItem) parentItem = mRootItem; LibraryModelData curData = parentItem->data(); LibraryRowsList rows = mLibrary->getChildren(curData.id); qDebug() << "fetchMore("<< parentItem->data().name <<") children: "<< parentItem->rowCount() <<" has in DB List size " << rows.size(); beginInsertRows(parent, 0, rows.count()); foreach(LibraryModelData row, rows){ parentItem->appendChild(new BookmarkItem(row, parentItem) ); } endInsertRows(); } bool BookmarksItemModel::hasChildren(const QModelIndex &parent) const { BookmarkItem *item = static_cast(parent.internalPointer()); if(!item){ item = mRootItem; } if(!item->data().isFolder()) return false; //qDebug() << "hasChildren("<< item->data().name <<") In DB= " << mLibrary->childrenCountInFolder(item->data().id); return mLibrary->childrenCountInFolder(item->data().id); } Qt::ItemFlags BookmarksItemModel::flags(const QModelIndex &index) const { if (!index.isValid()) return Qt::NoItemFlags; Qt::ItemFlags itemFlags = Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsDragEnabled; LibraryModelData itemData = qvariant_cast(data(index)); if(itemData.type == LibraryModelData::TypeFolder) itemFlags = itemFlags | Qt::ItemIsDropEnabled; return itemFlags; } QStringList BookmarksItemModel::mimeTypes() const { QStringList types; types << "application/x-equalx-library-modeldata"; return types; } QMimeData *BookmarksItemModel::mimeData(const QModelIndexList &indexes) const { QMimeData *mimeData = new QMimeData(); QByteArray encodedData; QDataStream stream(&encodedData, QIODevice::WriteOnly); foreach (const QModelIndex &index, indexes) { if (index.isValid()) { LibraryModelData itemData = qvariant_cast(data(index)); stream << itemData; } } mimeData->setData("application/x-equalx-library-modeldata", encodedData); return mimeData; } bool BookmarksItemModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) { qDebug() << "dropMimeData() row="< 0) return false; int beginRow; BookmarkItem* parentItem = static_cast(parent.internalPointer()); if(!parentItem){ parentItem = mRootItem; } if (row != -1) beginRow = row; else if (parent.isValid()) beginRow = parentItem->childCount(); else beginRow = rowCount(QModelIndex()); qDebug() << "dropMimeData() beginRow="<data("application/x-equalx-library-modeldata"); QDataStream stream(&encodedData, QIODevice::ReadOnly); LibraryRowsList newItems; while (!stream.atEnd()) { LibraryModelData rowData; stream >> rowData; newItems.append(rowData); } qDebug() << "dropMimeData() on "<< parentItem->data().name <<" From:"< insertChild"<moveData(rowData, parentItem->data().id); ++i; } return true; } QVariant BookmarksItemModel::headerData(int /*section*/, Qt::Orientation orientation, int role) const { if (orientation == Qt::Horizontal && role == Qt::DisplayRole) return QVariant::fromValue(mRootItem->data()); return QVariant(); } QModelIndex BookmarksItemModel::index(int row, int column, const QModelIndex &parent) const { if (!hasIndex(row, column, parent)) return QModelIndex(); BookmarkItem *parentItem; if (!parent.isValid()) parentItem = mRootItem; else parentItem = static_cast(parent.internalPointer()); BookmarkItem *childItem = parentItem->child(row); if (childItem) return createIndex(row, column, childItem); else return QModelIndex(); } BookmarkItem *BookmarksItemModel::invisibleRootItem() const { if(mRootItem) return mRootItem; return 0; } BookmarkItem *BookmarksItemModel::itemFromIndex(const QModelIndex &index) const { if(!index.isValid()) return mRootItem; return static_cast(index.internalPointer()); } QModelIndex BookmarksItemModel::parent(const QModelIndex &index) const { if (!index.isValid()) return QModelIndex(); BookmarkItem *childItem = static_cast(index.internalPointer()); BookmarkItem *parentItem = childItem->parent(); if(!parentItem) return QModelIndex(); if (parentItem == mRootItem) return QModelIndex(); return createIndex(parentItem->row(), 0, parentItem); } int BookmarksItemModel::rowCount(const QModelIndex &parent) const { BookmarkItem *parentItem; if (parent.column() > 0) return 0; if (!parent.isValid()) parentItem = mRootItem; else parentItem = static_cast(parent.internalPointer()); return parentItem->childCount(); } int BookmarksItemModel::columnCount(const QModelIndex &/*parent*/) const { return 1; } bool BookmarksItemModel::insertRow(int row, const QModelIndex &parent) { return insertRows(row, 1, parent); } bool BookmarksItemModel::insertRows(int row, int count, const QModelIndex &parent) { qDebug() << "insertRows() row=" << row<<" count="<(parent.internalPointer()); if(!parent.isValid()) parentItem = mRootItem; LibraryModelData rowData; rowData.id = -1; rowData.name=tr("Undefined Item"); rowData.type=LibraryModelData::TypeUndefined; beginInsertRows(parentItem->index(),row, row+count); for(int i=row; iinsertChild(row, new BookmarkItem(rowData, parentItem)); } endInsertRows(); return true; } bool BookmarksItemModel::removeRow(int row, const QModelIndex &parent) { return removeRows(row,1,parent); } bool BookmarksItemModel::removeRows(int row, int count, const QModelIndex &parent) { qDebug() << "removeRows() row=" << row<<" count="<(parentIdx.internalPointer()); } qDebug() << "removeRows() row=" << row<<" count="<data().name; beginRemoveRows(parentIdx,row,row+count); for(int i=row; i<(row+count); i++){ qDebug() << "removeRows() Remove Row:" << i; BookmarkItem *child = parentItem->child(i); if(!child){ qDebug() << "removeRows() No child in "<< parentItem->data().name << " at row:" << i; continue; } } endRemoveRows(); return true; } Qt::DropActions BookmarksItemModel::supportedDropActions() const { return Qt::CopyAction | Qt::MoveAction; } Qt::DropActions BookmarksItemModel::supportedDragActions() const { return Qt::CopyAction | Qt::MoveAction; } QVariant BookmarksItemModel::getCompleteData(const QModelIndex &index) const { LibraryModelData row = qvariant_cast(data(index)); qDebug() << "getCompleteData for row " << row.id << " name:" << row.name; switch(row.type){ case LibraryModelData::TypeFolder:{ return QVariant::fromValue(mLibrary->getBookmarkFolder(row.id)); } case LibraryModelData::TypeBookmark: return QVariant::fromValue(mLibrary->getBookmark(row.id)); break; default: ; } return QVariant(); } void BookmarksItemModel::onFolderChanged(const QString &dirPath) { qDebug() << "BookmarksItemModel::onFolderChanged() Folder changed of dirPath="<(folderIndex.internalPointer()); } qDebug() << "BookmarksItemModel::onFolderChanged() Found Folder Changed "<data().name; beginRemoveRows(folderIndex,0, folderItem->rowCount()); folderItem->clear(); endRemoveRows(); } BookmarkItem* __findItemWithId(BookmarkItem* item, int id) { if(!item) return 0; if(item->data().id==id) return item; for(int i=0; irowCount(); ++i){ BookmarkItem *childItem = item->child(i); if(__findItemWithId(childItem, id)!=0) return childItem; } return 0; } QModelIndex BookmarksItemModel::findItem(const QString &dirPath) { qDebug() << "BookmarksItemModel::findItem() Searching for item at dirPath=["<mimeData()->hasUrls()) event->acceptProposedAction(); } void EquationArea::dropEvent(QDropEvent *event) { QUrl url = event->mimeData()->urls().at(0); event->acceptProposedAction(); emit dropped(url.toLocalFile()); } equalx-0.7.1/resources/symbols/Miscellaneous/000755 001750 001750 00000000000 12314604155 021544 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/icons/tabBar/trig/eq03.png000644 001750 001750 00000001012 12314604155 021774 0ustar00mihaimihai000000 000000 PNG  IHDRE pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;tEXtLatexe^{i \theta}08tEXtResolution146ZJ IDAT8ԿM1BAiJJ.5e =a!#6DA%¶8t,Kٿyp^p>=ƸgmMmf}XUNWbb>l4Gɗryo-k!틴J6vKvY.AD]NLmrY}OqsKx6xKLL;iZzz'icm?ʻd&9WmǦ_;۾>. hh9?i_㩯02 2IENDB`equalx-0.7.1/resources/symbols/Miscellaneous/partial.png000644 001750 001750 00000000327 12314604155 023710 0ustar00mihaimihai000000 000000 PNG  IHDR B'sRGBbKGD pHYs  tIMEDS:WIDAT(͒ 0 CiC<[KB֓6\m#I pc۔2Vm 4sd̪~*̜:nIENDB`equalx-0.7.1/resources/symbols/Operators/wedge.png000644 001750 001750 00000000302 12314604155 022513 0ustar00mihaimihai000000 000000 PNG  IHDR F)sRGBbKGD pHYs  tIME ˨hJBIDAT(1 C~:lڹt۪foʀKe3BLɧޒyE7E$#bI|IENDB`equalx-0.7.1/resources/icons/menu/bookmark.png000644 001750 001750 00000001571 12314604155 021647 0ustar00mihaimihai000000 000000 PNG  IHDRĴl;sBIT|d pHYstEXtSoftwarewww.inkscape.org<IDAT8QHSQǿsݹ׻62h$BIBzB1}!zU02hA0bOBOBC 2ICQcvvϽLqQp|9!hb:>=118s@FQ#rtww}\MCwvvx<$(ʭFjSJuvv6G"p8L^ B!`PU`Jp8L!@)`01!9${A|6)y+c200@n7  1;P,k1iYב@zN)vuu!I@EE$I˵0T*n0܆aeX\\9[{&''DQ|ʂ wZV077W4sZ=::@UU򶹹z__S#bfffJ؈qv5>>_BM---5[[[0;;3Gġy͕J2&|>o^7JyEQ6#z`UUi^mXYY|>,L"pbt9t:,S0`aaZNeMӮlCB=@̳٬ZiOr癢(.qOMFd>ض}y?}$mW!_#ǂUUuwQ7JE=+J1}P+J +e3;J __pl=IENDB`equalx-0.7.1/resources/icons/filetypes/eps.png000644 001750 001750 00000002745 12314604155 021675 0ustar00mihaimihai000000 000000 PNG  IHDR szztEXtSoftwareAdobe ImageReadyqe<IDATxڴW]lU.HѶ& #OMD^ 1!"M `cL К}h-> DP?w춳V6{gsܹ|߇43<< Qb1@n8q+~=r,sA4V#$㼗U0::7A}$:A*hllD&g,J bL,]^’2U?0A.'6rry/y_2WѨ>O? 9WkHݎk#h G]wLL8WYA hiόTu x%mdGG%gN}ދX:cIh|~*#O65Z?qs/n(ܾkn+r_PGHt$B`Q?LD(ެHF\yfcTE (营VlE+lYvs~xi$N* Ǎ@i 4㤂wߓFr6 *(OAfve̔e7t뽫ߜLE%OEL}Sb+&/wA@,hp59>+Cl|_TIENDB`equalx-0.7.1/resources/symbols/Sets/mathcal_H.png000644 001750 001750 00000000327 12314604155 022247 0ustar00mihaimihai000000 000000 PNG  IHDR K7sRGBbKGD pHYs  tIME1:jWIDAT(͓Q !DW~%DE cJV&p$ d[(T{B[F?уS^W_3o]Fd椻?1)ılIENDB`equalx-0.7.1/resources/symbols/Functions/frac.png000644 001750 001750 00000000471 12314604155 022334 0ustar00mihaimihai000000 000000 PNG  IHDR sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8Փ1 1D߈o`#x;,-- @",YV$6];t ۧ, P]Lp"iX^,i39GF4ƙ+Eo`_ 8X.Y7I_I}a9pIENDB`equalx-0.7.1/resources/icons/tabBar/sets/000755 001750 001750 00000000000 12314604155 020535 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/icons/equalx/equalx-128x128.png000644 001750 001750 00000013334 12314604155 022627 0ustar00mihaimihai000000 000000 PNG  IHDR>asBIT|d pHYs$$P$tEXtSoftwarewww.inkscape.org<YIDATx{tTǿ;2I!!^%a*Zm. $lAo냐U]ZBB$`$$0Eyݿ?.Kɐ |:dn>w"x;bp<>CaXf/PuG9!gЇUؒ1c[~"~P1,h-*ak`{^|Nc `%4l)Sn˲WZ=&Y|H5~UӮLҤnn=OW:[ñd2I([;؋*"cf[-8~$}^g+^`) 4qRmq\rNȴʶ. e7ï0 #&4ͅ{QXа{ ]u⻪#v_1=Ąd̲>1 xҌpC6<;coHUo*W>OZX~ TU5>\mo୧*2o.pE9(F, Kcgo=. 0_[3]o4qo`t^CJSAD+_;xWŽ1R"ū{ |Ax]@|W#@ACΓ><ЉO ye# BpXwom@WZ(~%f0+sϧGQ l@ZɞmGt ܶ@ #0e^NbgizүG5L?װCtRTR0sS] i|_w눘f^9TUZ|>-:`0n\w|G;~uҏ(P ^0dRho_ ҝx+ڗő CZ0ݎX ܲ^tKwcʳ1fLyԘ+`q nLVO=w#6RH``K yeylD~C4aPOӃKj IٓŪ~+x.c i(B)"]Wׁ;vB"H[?k@#ybqvl="u5ap3ܶ>b1a]j >DZ'pGʞ>~/ BM{+pVAR 3 X}/M*J!3$3A"ÑT5@wZOM̙BD116mڴkm\}oΛ7Ϥ^Ayy9vQƍ]Tt^F[cr3x=hiq3 "9]7_pℛ_4|mvKgϾV~ff&ƞ^0 ].WYLLUoVVmo9<Ӧ\.-NA "| (/ksVTU5kVV`ft^n'9 t u1oҗM6+R;.:W$QYEtEڨTZNt;w*"Z1d/ hkk3t]]ZZ0}lfQbSōdPdD ?^  rߖe;MVQUոK o~ ͛7llk,O<IݵTJ탣P~=2mU1KD$,K\ږD퉘I{;1vUhjm?` 0gΜO<Ϥcǎ]>=l6#!! 7m0kErQ D3Р f@x[3Ș~n>Y8Gɓ^bbg扥]a/\4 32aR/5*~ .0gΜ'ʺⰢ*7n <[ܖfrg+ 3ˠ1b0´D]YCW:H/|آe[=NBQ5+~caoU>V(U-K 5`]0~]g+?L*nIQ &Njw?`nmC{[YfBHGAD1g&߱mſkmp̈́tiKg>MϭunhL~DT%oe`Zdd0;u][Գ_ڻŷ0?Ⰳ[;z4tp=p g=!`M㽵}̌ϧKvtl`Վ%/}݋@жFh?ѽ`0^q1@U #O&#}X8P hI[:P$2b(d.ՒMDg0JGyBg8+ '+mH On1X_Zo 4V ~)mxxkucj+Dwݥ˅ s!3+**6niv-tp9}"fЕWѪGw9l٢?>WUԈ>rT+Sǻ6cSE ]M 8Edw}%_.l6=K.ӛA{<7˻ ZPDǟx㬫ƽJ'13֠Z(u8;vCĎ_]x_ݻL }(u3:Y@SVe;^dСCq q|'^ow}(IH1 )P%%q_ixuWZ/v@322~ܼBїoݷo_gV ʭB!@@ adDK4458LmT~ OݳG)򥪪 zSe3ˊ.-K0\1]E͎8UޔWS "a3k9];>b?^S[z6q-xH%vB#Gvy8u`1We֏XcLD s |c42ekvM3pD6 @'c#;Qå}Y 5a->*HOB% ϧl?>^*,a<#ᅗڙo5 U4"yAy{T Vw=1:  5Pr|Nj.} 9fee_KEufVTTtG45.|I:~Mʯ_T˓OU S I5V6 6̜]АKବq%&<{9vZu555]$*VgOJA,i-mef~!gi~-4s45۪ (8ee-qNاsuĜX3@^x/Aq)Yco>iW8'8VyGFƦӌf3}c FOy4Wev Xnal d[P}#E9>m(-AR>7,ؓ$Žφ`6&WPLdѸ!; 0xv4!XZpd'#$6<xb@;29x^>y𦂆ܳ&q~}MI {bpyl* a=,K,a2PIZqzOc99 V/@˗Ǫq{BjLYL -up:R%OP6LN rj_BHÎ#eS+?+ϭn\agwiRL N |dHQzwbw &[% CRlQޓ 9i|kNT]%1( g}IaqMtD42fJ}M8|5 ]w1/ _AcQ1D5=>l+ً3(_#@15}UƧ~XqssZ"Ce5|RE0idMf0<{ub7Xe[A73eRtU .6;r9x{뫝RcDc⨉0L?d FVb`tҠ$]6Sg*8T =emQ\+5IH 6PkB+ ob=&O+$xt/d/\鼣]V+K\BN[jcGea`T44oYCɯؘzibT-Rӝ{ 22pNgu 4 .5vŤbr֕BřXEf v壑(nACS=G+z>Z_ Շzd\1[D7gXgIH.WbaO=xlٳR%-m$lht1o+ '">&iҤi%o *Bss5EOH5˓?H$Zc({^>t+t`雙Lƻ\iWK6EVYhyR&szqŤgvIc|IIUzՏОP0M,4,wgͯ}!>= q?BxIENDB`equalx-0.7.1/resources/icons/menu/help-about.png000644 001750 001750 00000002021 12314604155 022071 0ustar00mihaimihai000000 000000 PNG  IHDRĴl;sBIT|d pHYsaa0UtEXtSoftwarewww.inkscape.org<IDATxڵkTWǿ;g"8M!VZL!n,%-H@.7jB˺&iTږt#13I̼̼NaHCw{>ν13v2_( rh9]1eg27] v'",,:X-wR?ɫ{ p3q=9e(n,8| qK|qtc[0ΑG A6W$'l3S9߸~_oTE/ w @X_ć#LE+0VVܛ ᴁNv.cQyZ9>Qa,}4_Ve;,%[.ק|#(MlgWmc:sk_&O@Fhhy"QՔeu??<`T'|!Wك2C= ?=Jxz _(@ /ׁ.R1F: ,ӳ0z^g E,1:Ac_SC\)'[cRC{!Q+XC!g>5mC!`Ȯ;Z` ċ;/bB MeF>.h 8jіJZ@O _ePK qL ;"$R8aa<0p"x`;c(4' JBTRfU qܵ {'Qq X?MD$ĴZ@&%մjlcmL~IENDB`equalx-0.7.1/resources/symbols/Accents/overline.png000644 001750 001750 00000000275 12314604155 022656 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME5S}((=IDAT8c?5 ###N?#\2 !4Xu G M^77IENDB`equalx-0.7.1/resources/symbols/Greek/phi.png000644 001750 001750 00000000323 12314604155 021262 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIMESIDAT(ŒA wKchC,TN,a0J46F咤3#S:6GSz2='t;CE'IENDB`equalx-0.7.1/resources/icons/tabBar/derivs/eq05.png000644 001750 001750 00000001300 12314604155 022325 0ustar00mihaimihai000000 000000 PNG  IHDR %#G pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;tEXtLatex\frac{d^2 }{dx dy}) tEXtResolution1066NIDATX헡V0?6 !7XT{x HpQ$Y7Mm϶kך{$4hR@+PVLP;E|cST<u1 VPM>zdSq,Hm;9NbKoHo07|y ׍ շ@b@z[_! C8^XvbNψfV6i#жpkMN\' <8#LcZ;ߤ"4LSƷP2rķl*z/ 6~6\zT{*r<.|mw@ zXyO IkWSΑ > jrL#-d#uu$K+~&xR8^IENDB`equalx-0.7.1/resources/symbols/Greek/rho.png000644 001750 001750 00000000315 12314604155 021273 0ustar00mihaimihai000000 000000 PNG  IHDR B'sRGBbKGD pHYs  tIME/(`MIDAT(ݒI . */ #include #include #include #include #include #include "Util.h" #include "RenderEngine.h" namespace EqualX{ bool RenderEngine::mIsRunning = false; bool RenderEngine::isRunning() { return mIsRunning; } /************************************************************** * RenderEngine implementation **************************************************************/ RenderEngine::RenderEngine(QObject *parent) : QObject(parent), mPathPDFLatex(), mPathGS(), mConverters(), mConvertToFileTypes(), mBuildDir(""), mLatexLog(""), mLatexErrors(), mChildProcess(0), mRunningProcesses(0) { } RenderEngine::~RenderEngine() { stop(); } void RenderEngine::stop() { if(mChildProcess) { if(mRunningProcesses>0){ for(int i=0; iclose(); delete p; p=0; } } mRunningProcesses=0; delete [] mChildProcess; } else{ mChildProcess->close(); //delete mChildProcess; } mChildProcess=0; } mConvertToFileTypes.clear(); mIsRunning = false; // restore app current dir QDir::setCurrent(mAppDirSave); qDebug() << "[RenderEngine] - Engine Stoppped"; } QString RenderEngine::buildDir() const { return mBuildDir; } EqualX::ConvertersList RenderEngine::converters() const { return mConverters; } QString RenderEngine::latexLog() const { return mLatexLog; } const ErrorsList *RenderEngine::latexErrors() const { return &mLatexErrors; } QString RenderEngine::file(const QString &type) const { QString filePath; if(!fileTypes().contains(type)){ qDebug() << "[RenderEngine::file] File type:"<0){ pos2 = mLatexLog.indexOf("\n", pos1); message = mLatexLog.mid(pos1+1, pos2-pos1-1); pos1 = mLatexLog.indexOf("l.", pos2, Qt::CaseSensitive); pos2 = mLatexLog.indexOf(" ", pos1); lineNumber = (mLatexLog.mid(pos1+2, pos2-pos1-2)).toInt(); qDebug() << "[RenderEngine] Latex Error - line: " << lineNumber<<" message: ["<setProcessChannelMode(QProcess::MergedChannels); connect(mChildProcess, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(finishedPdfLatex(int,QProcess::ExitStatus)) ); connect(mChildProcess, SIGNAL(error(QProcess::ProcessError)), this, SIGNAL(error(QProcess::ProcessError)) ); mChildProcess->start(com); //if(mChildProcess->state()==QProcess::NotRunning) finish(-1, QProcess::CrashExit); } void RenderEngine::runConvertersOnFileTypes() { mRunningProcesses = mConvertToFileTypes.size(); if(mRunningProcesses<=0){ qDebug() << "[RenderEngine::runConvertersOnFileTypes] No converters available to run. Aborting..."; finish(-1, QProcess::NormalExit); return; } mChildProcess = new QProcess[mRunningProcesses]; for(int i=0; idisconnect(); // not interested of latex exitCode since latex exitCode!=0 if there are latex errors // and we want to parse and display them if(exitStatus != QProcess::NormalExit){ qDebug() << "[RenderEngine::finishedPdfLatex] pdfLatex crashed with error:"<errorString(); finish(0, exitStatus); return; } mLatexLog = mChildProcess->readAll(); if(parseLatexLog()) { // if latex has errors qDebug() << "[RenderEngine::finishedPdfLatex] latex has errors.Aborting..."; finish(0,QProcess::NormalExit); return; } mChildProcess->close(); delete mChildProcess; mChildProcess=0; qDebug() << "[RenderEngine::finishedPdfLatex] Running ghostscript to compute the bounding box of the generated pdf"; QString com = QString("\"%1\" -DBATCH -DNOPAUSE -sDEVICE=bbox %2").arg(mPathGS,TEMP_PDF_FILE); qDebug() << "[RenderEngine::finishedPdfLatex] Starting command:["<setProcessChannelMode(QProcess::MergedChannels); connect(mChildProcess, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(finishedGS(int,QProcess::ExitStatus)) ); mChildProcess->start(com); } void RenderEngine::finishedGS(int /*exitCode*/, QProcess::ExitStatus /*exitStatus*/) { mChildProcess->disconnect(); QString gsoutput(mChildProcess->readAll()); // gs output gsoutput = gsoutput.simplified(); int idxS = gsoutput.indexOf("%%BoundingBox:"); int idxE = gsoutput.indexOf("%%HiResBoundingBox:"); int len = QString("%%BoundingBox:").length(); QString bboxParamsStr = gsoutput.mid(idxS+len, idxE-idxS-len); qDebug() << "[RenderEngine::finishedGS] gs returned boundingbox: "<close(); delete mChildProcess; mChildProcess=0; //parse the output from gs float llx, lly, urx, ury; // will hold the boundingbox params llx = bboxParamsStrList.at(0).toFloat()-5; lly = bboxParamsStrList.at(1).toFloat()-5; urx = bboxParamsStrList.at(2).toFloat()+5; ury = bboxParamsStrList.at(3).toFloat()+5; // now include the background color in the .tex file QString com; // if we have a background with color, we need to regenerate the PDF including pagecolor and then we apply the boundingbox if(mFile.info().bgColor().alpha()!=0){ mFile.writeLatexFile(true); com = QString("\"%1\" -interaction=nonstopmode -jobname %2 %3").arg(mPathPDFLatex, TEMP_FILE_NAME, TEMP_LATEX_FILE); qDebug() << "[RenderEngine::finishedGS] Starting pdfLatex converter on the latex with background: " << com; QProcess::execute(com); } mFile.writeLatexFileCropped(llx,lly,urx,ury); com = QString("\"%1\" -interaction=nonstopmode -jobname %2 %3").arg(mPathPDFLatex, TEMP_FILE_NAME"-cropped", TEMP_LATEX_CROP_FILE); qDebug() << "[RenderEngine::finishedGS] Starting pdfLatex converter on the latex-cropped: " << com; mChildProcess = new QProcess(this); mChildProcess->setProcessChannelMode(QProcess::MergedChannels); connect(mChildProcess, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(finishedPdfCrop(int,QProcess::ExitStatus)) ); mChildProcess->start(com); } void RenderEngine::finishedPdfCrop(int /*exitCode*/,QProcess::ExitStatus /*exitStatus*/) { mChildProcess->disconnect(); // leave only one PDF file in the build dir - this file will be retrieved by generatedFile("pdf") QFile::remove(TEMP_PDF_FILE); qDebug() << "[RenderEngine::finishedPdfCrop] Rename ["<< TEMP_PDFCROP_FILE<<"] to ["<< TEMP_PDF_FILE << "]"; if(!QFile::rename(TEMP_PDFCROP_FILE, TEMP_PDF_FILE) ) qDebug() << "[RenderEngine::finishedPdfCrop] couldn't rename ["<< TEMP_PDFCROP_FILE<<"] to ["<< TEMP_PDF_FILE << "]"; mChildProcess->close(); delete mChildProcess; mChildProcess=0; runConvertersOnFileTypes(); } void RenderEngine::finishedConverter(int /*exitCode*/, QProcess::ExitStatus /*exitStatus*/) { // release allocated memory QProcess* proc = static_cast(QObject::sender()); QString filename = proc->objectName(); proc->close(); mRunningProcesses--; mFile.open(filename); mFile.write(); mFile.close(); //check if we have other converters running if(mRunningProcesses==0){ finish(0, QProcess::NormalExit); return; } } void RenderEngine::finish(int exitCode,QProcess::ExitStatus exitStatus) { qDebug() << "[RenderEngine] - Finish Rendering: cleaning up resources..."; stop(); qDebug() << "[RenderEngine] - emitting signals..."; emit finished(); emit finished(exitCode, exitStatus); } } // end namespace EqualX equalx-0.7.1/resources/symbols/Greek/psi.png000644 001750 001750 00000000326 12314604155 021300 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME1K2VIDAT(Փ 0 ;OQ.d@Y b̞U6STYːI)>fȠwTMV4ݏ;+N;@IENDB`equalx-0.7.1/resources/symbols/Operators/triangleright.png000644 001750 001750 00000000307 12314604155 024270 0ustar00mihaimihai000000 000000 PNG  IHDR B'sRGBbKGD pHYs  tIME 5HGIDAT(A yz"jգBCPN%@-IQIr맛T * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include "Library/LibraryData.h" #include "HistoryPanel/HistoryViewItemDelegate.h" HistoryViewItemDelegate::HistoryViewItemDelegate(QObject *parent) : QStyledItemDelegate(parent) { widthH = 80; heightH= 80; } QWidget *HistoryViewItemDelegate::createEditor(QWidget* /* parent*/, const QStyleOptionViewItem& /*&option*/, const QModelIndex& /* index */) const { return 0; } void HistoryViewItemDelegate::setEditorData(QWidget* /* editor */, const QModelIndex& /* index */) const { } void HistoryViewItemDelegate::setModelData(QWidget* /* editor */, QAbstractItemModel* /*model*/, const QModelIndex& /* index */) const { } void HistoryViewItemDelegate::updateEditorGeometry(QWidget* /* editor */, const QStyleOptionViewItem& /*option*/, const QModelIndex& /* index */) const { } void HistoryViewItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex& index) const { LibraryModelData data = qvariant_cast(index.data(Qt::DisplayRole)); painter->save(); painter->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, true); painter->setPen(Qt::SolidLine); QRect drawArea = option.rect; QString titleStr; QRect textBB(0,0,0,0); // Title Dimensions titleStr = QDateTime::fromMSecsSinceEpoch(data.created).toString(); textBB = option.fontMetrics.boundingRect(titleStr); textBB.setHeight(textBB.height()+6); QRect titleArea(drawArea.x(), drawArea.y(), drawArea.width(), textBB.height()); if (option.state & QStyle::State_Selected) { painter->fillRect(drawArea, option.palette.highlight()); } else{ painter->fillRect(drawArea, option.palette.light()); painter->setPen(option.palette.dark().color()); painter->drawRect(drawArea); } /** Draw the Equation **/ QImage eq(data.name); int w = eq.width(); int h = eq.height(); float af = (float)w/(float)h; // aspect ratio int wmax = drawArea.height()*af; // represents the maximum width to draw at maximum possible height (and keep aspect ratio) if(drawArea.width()>=wmax){ w = qMin(wmax,w); h = qMin(drawArea.height(),h); } else { w = qMin(drawArea.width(),w); h = qMin(int(w/af),h); } eq = eq.scaled(QSize(w, h), Qt::KeepAspectRatio, Qt::SmoothTransformation); int x = (drawArea.width() - w)/2.0 + drawArea.x(); int y = (drawArea.height() + titleArea.height() -h)/2.0 + drawArea.y(); painter->setPen(option.palette.buttonText().color()); painter->drawImage(x,y, eq); /** Draw Titlebar Area **/ // qDebug() << "painting row: " << data.id << " title:" << data.title << " filepath: " << data.filePath << " Date: " << titleStr << " Size: " << x << " " << y << " " << w << " " << h; QLinearGradient gradient(titleArea.topLeft(), titleArea.bottomLeft() ); // diagonal gradient from top-left to bottom-right if (option.state & QStyle::State_Selected){ gradient.setColorAt(0, option.palette.highlightedText().color()); gradient.setColorAt(1, option.palette.highlight().color()); } else{ gradient.setColorAt(0, option.palette.light().color()); gradient.setColorAt(1, option.palette.dark().color()); } painter->fillRect(titleArea, gradient); if (option.state & QStyle::State_Selected){ painter->setPen(option.palette.highlightedText().color()); } else { painter->setPen(option.palette.windowText().color()); } painter->setFont(option.font); painter->drawText(titleArea, Qt::AlignCenter, titleStr); painter->restore(); //painter->end(); } QSize HistoryViewItemDelegate::sizeHint(const QStyleOptionViewItem& /*option*/, const QModelIndex& /*index*/) const { return QSize(widthH, heightH); } equalx-0.7.1/resources/icons/tabBar/geometry/eq01.png000644 001750 001750 00000001135 12314604155 022666 0ustar00mihaimihai000000 000000 PNG  IHDRer pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;tEXtLatex\overrightarrow{AB}ʔ<tEXtResolution116-'YIDAT8=NAЊ8DD ؑG{L A\vHhJ`^UMzݼcw?Vp K$}FV vhw8Zꀃ,)^s=4;~F:C.j'p5LJ phC|O<ԠoI)5; 0/4zؓ~+-?W$fԓ(B\&&y.f%oLFX.VOIODfjKlUjw}*hl۸ K}{*B̩y5GAnKG9؜Z0Լİ W< JiDbzX+-+` KE%FbfIENDB`equalx-0.7.1/resources/icons/tabBar/chemistry/eq03.png000644 001750 001750 00000001412 12314604155 023042 0ustar00mihaimihai000000 000000 PNG  IHDR? pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;:zTXtLatexxs)KI-*N-N/kcrsRJ23JkkQtEXtResolution116-'IDATXM0"A n e#&t2٪I&N-P_)ja{;p=Øo B`끃DD& :,pGX!# {@𨫒crқ*C&R纽-uBrsCULWKIι(k({wb>BfhuYgHޙ@ٻ>^z5FP9*b[Zhd"gnN`1nJ&4"F 80Xx;gXȕKKb$6," &ƌ "|mo5= z7uh ]u7#6CQ nChH~z2)豳;))]C`ϣ2^o6—S )aOʇԯr2mAz\$5r7]IENDB`equalx-0.7.1/resources/icons/menu/document-save.png000644 001750 001750 00000001436 12314604155 022614 0ustar00mihaimihai000000 000000 PNG  IHDRĴl;sBIT|d pHYsvv}ՂtEXtSoftwarewww.inkscape.org<IDATxڵ]kAMo&闔ŏkZ?oMAH?@HHJAkۚݝYa Bp朰s}lvyP׮oGQ4>lLZRJ[hig2YJ3NR`st>6>uqݼ09R(DBsA8p<\C097Y+$ƱEKM,qsѕ)d2'qXc:`fI`ݚոڗCqjQ8ma8{ʂ5'wt BPi>9ɍ S;~v\4ĹaV:r#dd̰\fw0:[dp}@VQl4?O!0T8) C<}iZًr^z{{%~!"8ȢvaCpN@XX z S pnh_o4us1c~"IIQQs[,fjoLv}/3 [ kʃHyoRO58@~;Bb4T[woN tR%tJTCgRM7uZPՁ4!@@=`LB&Bbf {fns èRw9ow)NWT==/NKwI))eMͶJ(S..t%WUǎ;|GO?K1**%~]oi(_=ohDVl6lnNj;.nMI&\<%.d"A' <?%_ ++XaZ]d0n O~a4ޫCrE$w!\B^7GW !+,̌d4d&.[b%윍~k~ɸ$Fb J^vք2*gL3#99DRT@lk3ɍ{{3o"z#TDR4*-N"ˆU& L9>=TQ|Eggcxx&Xސcmm7'?&ξIz@BF3^Y kւiN-n֌7LXRX%V; `c~ݼiʹ%Q 筐jxކGZ+( I K5: r</]*H|}rlXkOT͛Q1 (% zZ4>3a],.mll,(8F$_;.r=WTjљQ'-X SCHV#/}{:tz!s os&μ/Y$,ZQOzThQ-\)SR}w+ sCt"|BmV\BbCת lنR,!Q7 ѱ݌{677oC*Ć⒍_Ι"/pXhC?`e;jlYFѪjTA mf-2y)B܁drlB-廝"0H#f 4@ΎTvOJr ;y`ygmՏ#GUS w2ΙvHƍPjhF.uAV! =`'9'7ʶvIENDB`equalx-0.7.1/resources/symbols/Products/prod2.png000644 001750 001750 00000000307 12314604155 022300 0ustar00mihaimihai000000 000000 PNG  IHDRgsRGBbKGD pHYs  tIME 33cSnGIDAT8c`0OZǥ30wr?3QQ0 `$5 F * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include #include #include #include #include #include "SymbolsGroupWidget.h" #include "SymbolsGroupMenu.h" #include "defines.h" SymbolsGroupWidget::SymbolsGroupWidget(QWidget *parent) : QFrame(parent) { init(1); } SymbolsGroupWidget::SymbolsGroupWidget( int nVisibleCols, QWidget *parent) : QFrame(parent) { init(nVisibleCols); mSignalMapper = new QSignalMapper(this); connect(mSignalMapper, SIGNAL(mapped(int)), this, SLOT(symbolTriggered(int))); } SymbolsGroupWidget::~SymbolsGroupWidget() { } void SymbolsGroupWidget::init(int ncols) { mSymbolsGroup = 0; setFrameStyle(QFrame::Panel | QFrame::Sunken); mMaxCols = ncols; mCurCol = 0; mIconSize = QSize(20, 20); mLayout = new QHBoxLayout; mLayout->setContentsMargins(3 , 3, 3, 3); mLayout->setSpacing(0); mMenu = new SymbolsGroupMenu(this, mMaxCols); mShowMenuButton = new QToolButton(this); mShowMenuButton->setMaximumWidth(15); mShowMenuButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding); mShowMenuButton->setArrowType(Qt::DownArrow); mShowMenuButton->setPopupMode(QToolButton::InstantPopup); mShowMenuButton->setToolButtonStyle(Qt::ToolButtonIconOnly); mShowMenuButton->setAutoRaise(true); mShowMenuButton->setVisible(false); QHBoxLayout *hbox = new QHBoxLayout(this); hbox->setContentsMargins(0, 0,0,0); hbox->setSpacing(0); hbox->addLayout(mLayout); hbox->addSpacerItem(new QSpacerItem(3,3, QSizePolicy::Preferred)); hbox->addWidget(mShowMenuButton); setLayout(hbox); connect(mShowMenuButton, SIGNAL(clicked()), this, SLOT(showMenu()) ); } void SymbolsGroupWidget::addSymbol(LatexSymbol *symbol) { QToolButton * button = new QToolButton(this); button->setAutoRaise(true); button->setIconSize(mIconSize); symbol->icon = QString("%1/%2/%3").arg( SYMBOLS_PATH, symbol->parent->name, symbol->icon); button->setIcon(QIcon(symbol->icon) ); button->setText(symbol->name); button->setToolTip(QString("

Name: %1

Group:%2

Latex:%3

Package:%4

").arg(symbol->name, symbol->parent->name, symbol->latex, symbol->packages.join(","), symbol->icon )); mSignalMapper->setMapping(button, symbol->id); connect(button, SIGNAL(clicked()), mSignalMapper, SLOT(map()) ); addButton(button); } void SymbolsGroupWidget::addSymbols(LatexSymbolsGroup* gr) { mSymbolsGroup = gr; for(int i=0; i < gr->symbols.size(); ++i){ addSymbol( gr->symbols.at(i) ); } } void SymbolsGroupWidget::addButton(QWidget *button) { // first add Button to widget if(mCurCol < mMaxCols){ // add this button in widget mLayout->addWidget(button); } else { // add this button in Menu mMenu->appendWidget(button); mShowMenuButton->setVisible(true); } mCurCol++; } void SymbolsGroupWidget::symbolTriggered(int id) { LatexSymbol* symbol = mSymbolsGroup->symbols.at(id); emit triggered(symbol); } void SymbolsGroupWidget::showMenu() { if(!mMenu->isEmpty() && mMenu->isHidden() ){ mMenu->popup(); } } void SymbolsGroupWidget::enterEvent(QEvent* /*event*/) { if(mMenu->isVisible()) mMenu->showMenu(); } void SymbolsGroupWidget::leaveEvent(QEvent* /*event*/) { QTimer::singleShot(200, mMenu, SLOT(hideMenu()) ); } equalx-0.7.1/resources/symbols/Sets/mathcal_F.png000644 001750 001750 00000000344 12314604155 022244 0ustar00mihaimihai000000 000000 PNG  IHDR<sRGBbKGD pHYs  tIME2zR՞dIDAT8ՓQ C[vv_.]1@I0)D0CH|. ՅmN+wGQF}ȍT^k;?Z`07-ߑ~IENDB`equalx-0.7.1/resources/symbols/Decorations/overset.png000644 001750 001750 00000000304 12314604155 023405 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME:fzDIDAT8ӱ DQw. b"א@ A@" @VxOҽ$vyB#U'\M K_kO9@x5IENDB`equalx-0.7.1/resources/icons/filetypes/png.png000644 001750 001750 00000003142 12314604155 021662 0ustar00mihaimihai000000 000000 PNG  IHDR szztEXtSoftwareAdobe ImageReadyqe<IDATxڴW[lTE=^D^DAAcڀEMHFL >i4&&( *A%A$Bby"/&xn`vwe^Pɟ9gia.T__glPG_gg+)ڵKz߾}tOOO/jDqOxzissۖ`׮]Ɗ+: ˮU՘b?OC8̳J ~po477cw0j'P$H)/Bb p}޽{:H%6N"#A6RT9 WPiQtB$<BŅ nĞOz &LLE NZz\h|zI ƛ0AKR%~@4~Zy Vg%(?"pU9\@)lE)aD Y&8C˄1!8] t*1 bVE\:CfyıPb=;3o'Ae9DŽYDŒaNO@T 9P'Vo|4voǚyfcM)eB2 Bq>"#7%7H3ZlMY½О h7PjGq` HBsdZ.P%Ԩ1T51 n #C=*j0qf<]rXXΎ5.1Ac!;poRIzC dixq62c.Wv~r(Fƻt_nL}gQʞL ֜s瀧o@T1*eCR,XT(N9vm 0f"}ˈ< cG6(]弅TQycCp)Modb{5j* `W*Яu.MzJgjU,:8\3G=ݪaan_,[v~;щG="=i1( &/УR)mEF e mʂ)Ij0GF:BA%YKGv-?qF;I=ͺH{R-ixf}1Ў>kAPcj9R`cY 7·2u/f|u'{E(w+!Gx\|z!njf1 %L&nJVn=nXkH?瓮ߤ6dZ 9¯h%dBT9mKnFdk #o;9G,_۾g41}TU*ˀmYZ>wkg qԺ=!aoq.0 z(*:IU -M T]`&qÎUNi 4uWy,7l:[w\ȹVɶ\1w<^Xq2f+Nq;̏gv/s sP~gz弲eOĀqIDAT(Ւ10NmL,!x*ۼjQsHni[ɘa?@m_W:w_ %>IENDB`equalx-0.7.1/resources/symbols/Integrals/iiiint.png000644 001750 001750 00000000274 12314604155 022667 0ustar00mihaimihai000000 000000 PNG  IHDR<sRGBbKGD pHYs  tIME*B(\ʨ)+`${OW- FIENDB`equalx-0.7.1/resources/symbols/Greek/varsigma.png000644 001750 001750 00000000311 12314604155 022310 0ustar00mihaimihai000000 000000 PNG  IHDRLsRGBbKGD pHYs  tIME IIDAT(ݒ;0BW~]t+ i(GbEއˆr,*hCH&%rIENDB`equalx-0.7.1/resources/symbols/Arrows/rightharpoonup.png000644 001750 001750 00000000275 12314604155 024001 0ustar00mihaimihai000000 000000 PNG  IHDROWsRGBbKGD pHYs  tIME.0wɑ=IDAT8!0YETU%QyA* IOvT .P_kIENDB`equalx-0.7.1/THANKS000644 001750 001750 00000001330 12314604155 014147 0ustar00mihaimihai000000 000000 Thanks to:

  • - Qt project for the marvelous GUI toolkit
  • - Crystal Project for some of the icons
  • - FatCow Icon Theme for some of the icons
  • - pdfcropxmp.pl by Johannes Grosse (the code was adapted in EqualX::File implementation)
  • - Lyx for symbols icons
  • - Adobe XMP
  • - exempi (Linux XMP API) and Hubert Figuiere (original author)
  • - Poppler
  • - Poppler for Windows, authors: Ilya Kitaev, Todd Hubers, David Arken
  • Parts or features of EqualX might not be possible without help or feedback from users:

    James Diaz - for suggesting Search/Replace tool

    To All of You who reported bugs and improvements ideas

    equalx-0.7.1/resources/symbols/Greek/tau.png000644 001750 001750 00000000303 12314604155 021271 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME (*CCIDAT(c?1H028,0EgDքg````Dlk\֒d"HfU-&IENDB`equalx-0.7.1/resources/icons/tabBar/chemistry/eq01.png000644 001750 001750 00000001227 12314604155 023044 0ustar00mihaimihai000000 000000 PNG  IHDR'+ pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;tEXtLatex_{10}^{5}C^{16}tEXtResolution116-'IDATH1N0?21nUbc 1Rq"NڑrrrhGfd `p'%,Y7&1.0@,HP+iK`Ӣ9,m61jQL,ʟԓ>(vFM0 S{ʿPrK5m\r/W.挀IG&>: Fy]br$$RgW:(y˚tIn28NeҤTޝ.Ϝ\ǘFRO6!$+.srk2존?c>‹cDѬ3mg[K*M2wqԄ^ENalx&$ykI)0mS\]E:)ycSnP%.!oFJ_ک1zcV]w?IENDB`equalx-0.7.1/resources/symbols/Operators/uplus.png000644 001750 001750 00000000314 12314604155 022573 0ustar00mihaimihai000000 000000 PNG  IHDR F)sRGBbKGD pHYs  tIME :BLIDAT(Ւ C{: 4Nz7CҸ9 Ӗ #1F2E% IO6"ejo]aE7x'! IENDB`equalx-0.7.1/resources/icons/equalx/equalx.svg000644 001750 001750 00000027113 12314604155 021707 0ustar00mihaimihai000000 000000 image/svg+xml x equalx-0.7.1/include/DialogReplace.h000644 001750 001750 00000003446 12314604155 017535 0ustar00mihaimihai000000 000000 /* * Copyright 2010 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef DIALOGFINDNREPLACE_H #define DIALOGFINDNREPLACE_H #include #include #include "ui_dialogReplace.h" class DialogReplace : public QDialog, public Ui::DialogReplace { Q_OBJECT public: DialogReplace(QWidget *parent = 0); ~DialogReplace(); QString getFindExpr() const; QString getReplaceExpr() const; QTextDocument::FindFlags getFindOptions() const; void setFindExpr(const QString &expr) { findEntry->setText(expr); } public slots: void onFindEntryChanged(const QString &findExpr); void onReplaceEntryChanged(const QString &); void show(); protected slots: void onClosing(); void onClickedFindButton(); void onClickedReplaceButton(); void onClickedReplaceAllButton(); signals: void find(const QString expr, QTextDocument::FindFlags flags); void replace(const QString expr); void replaceAll(const QString expr); void closing(); protected: void changeEvent(QEvent *e); void init(); void setSignals(); }; #endif // DIALOGFINDNREPLACE_H equalx-0.7.1/resources/icons/tabBar/stats/000755 001750 001750 00000000000 12314604155 020715 5ustar00mihaimihai000000 000000 equalx-0.7.1/src/DialogReplace.cpp000644 001750 001750 00000006663 12314604155 017240 0ustar00mihaimihai000000 000000 /* * Copyright 2010 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include "DialogReplace.h" #include "ui_dialogReplace.h" DialogReplace::DialogReplace(QWidget *parent) : QDialog(parent) { setupUi(this); init(); } DialogReplace::~DialogReplace() { } void DialogReplace::init() { setSignals(); } void DialogReplace::changeEvent(QEvent *e) { QWidget::changeEvent(e); switch (e->type()) { case QEvent::LanguageChange: retranslateUi(this); break; default: break; } } void DialogReplace::onClosing() { emit closing(); QDialog::close(); } QString DialogReplace::getFindExpr() const { return findEntry->text(); } QString DialogReplace::getReplaceExpr() const { return replaceEntry->text(); } QTextDocument::FindFlags DialogReplace::getFindOptions() const { QTextDocument::FindFlags opts; if( checkCase->isChecked() ) opts = QTextDocument::FindCaseSensitively; if( checkBackwards->isChecked() ) opts = opts | QTextDocument::FindBackward; if( checkWholeWords->isChecked() ) opts = opts | QTextDocument::FindWholeWords; return opts; } void DialogReplace::onFindEntryChanged(const QString &findExpr) { bool findable = !findExpr.isEmpty(); findButton->setEnabled( findable ); replaceButton->setEnabled( findable ); replaceAllButton->setEnabled( findable ); } void DialogReplace::onReplaceEntryChanged(const QString& /*replaceExpr*/) { } void DialogReplace::onClickedFindButton() { QString expr = findEntry->text(); QTextDocument::FindFlags searchFlags; if( checkCase->isChecked() ) searchFlags = searchFlags | QTextDocument::FindCaseSensitively; if( checkBackwards->isChecked() ) searchFlags = searchFlags | QTextDocument::FindBackward; if( checkWholeWords->isChecked() ) searchFlags = searchFlags | QTextDocument::FindWholeWords; emit find(expr, searchFlags); } void DialogReplace::onClickedReplaceButton() { QString expr = replaceEntry->text(); emit replace(expr); } void DialogReplace::onClickedReplaceAllButton() { QString expr = replaceEntry->text(); emit replaceAll(expr); } void DialogReplace::setSignals() { connect(findEntry, SIGNAL(textChanged(QString)), this, SLOT(onFindEntryChanged(QString)) ); connect(replaceEntry, SIGNAL(textChanged(QString)), this, SLOT(onReplaceEntryChanged(QString)) ); connect(findButton, SIGNAL(clicked()), this, SLOT(onClickedFindButton()) ); connect(replaceButton, SIGNAL(clicked()), this, SLOT(onClickedReplaceButton()) ); connect(replaceAllButton, SIGNAL(clicked()), this, SLOT(onClickedReplaceAllButton()) ); connect(closeButton, SIGNAL(clicked()), this, SLOT(onClosing()) ); } void DialogReplace::show() { QDialog::show(); findEntry->setFocus(); } equalx-0.7.1/resources/symbols/Accents/vec.png000644 001750 001750 00000000316 12314604155 021604 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME V NIDAT8A @!EѮmYFćߛ8I9 do2aWOM-lӾIENDB`equalx-0.7.1/resources/symbols/Greek/eta.png000644 001750 001750 00000000302 12314604155 021250 0ustar00mihaimihai000000 000000 PNG  IHDR B'sRGBbKGD pHYs  tIME!BIDAT(c?!@!# aldq&(I#nB6O `ĖTЭul1I1WIENDB`equalx-0.7.1/resources/symbols/RelationOperators/sim.png000644 001750 001750 00000000277 12314604155 023721 0ustar00mihaimihai000000 000000 PNG  IHDR K7sRGBbKGD pHYs  tIME+Q7?IDAT(c? 0ijbddYH  Mf```@1`4R u%!%g+sIENDB`equalx-0.7.1/ui/BookmarksPanel/000755 001750 001750 00000000000 12314604155 016564 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/icons/tabBar/sets/eq02.png000644 001750 001750 00000001254 12314604155 022014 0ustar00mihaimihai000000 000000 PNG  IHDR%&C R pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;tEXtLatex\bigcap_{i=1}^{n}{X_i}tEXtResolution101MRIDATXm0?@ݠ30BY! UGH7HW ȵG8[{mH)I HFyB3bG˘pܶB>d% .~ 322<=c \K(:4#$5/n;$=#̣oS%e&Z(9RmH@'(I+Շ.Nѕ. ݣRː\ 'FBCI,^ZlP2}2Y9*O6ARʽ`߈eLS?KD/90/ ׸H7*5?/x_GF.EJRإ Zr,-VӍf1åz/ncfDVo"R )w3MdҷX[PiMLIENDB`equalx-0.7.1/resources/symbols/Accents/overset.png000644 001750 001750 00000000304 12314604155 022513 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME:fzDIDAT8ӱ DQw. b"א@ A@" @VxOҽ$vyB#U'\M K_kO9@x5IENDB`equalx-0.7.1/ui/HistoryPanel/HistoryWidget.ui000644 001750 001750 00000002105 12314604155 021437 0ustar00mihaimihai000000 000000 HistoryWidget 0 0 283 366 HistoryWidget 0 0 0 0 0 HistoryView QListView
    HistoryView.h
    equalx-0.7.1/resources/symbols/Sets/mathbb_R.png000644 001750 001750 00000000377 12314604155 022112 0ustar00mihaimihai000000 000000 PNG  IHDR K7sRGBbKGD pHYs  tIME39.IDAT(͒0DY^2v5ۢRN* @H\Sdۊm <.^Y{M#zPsp-#b-ag[_Q9kb:{n>#z ImXQ}IENDB`equalx-0.7.1/resources/symbols/RelationOperators/vdash.png000644 001750 001750 00000000262 12314604155 024230 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME `[r2IDAT(c?1H@#,0>3}8#tIENDB`equalx-0.7.1/resources/symbols/Operators/wr.png000644 001750 001750 00000000266 12314604155 022061 0ustar00mihaimihai000000 000000 PNG  IHDRXcsRGBbKGD pHYs  tIME ?I6IDATӵA DE<-|%7ReLsvI۟W!wIENDB`equalx-0.7.1/resources/symbols/Functions/root.png000644 001750 001750 00000000362 12314604155 022403 0ustar00mihaimihai000000 000000 PNG  IHDRUsRGBbKGD pHYs  tIME-(6rIDAT8͔Q 0 CdrS[`a[3g)%1mN b$HGG,ҁܓ_iJ+jQ/}zo醄kS)GtHV`A"ˎIENDB`equalx-0.7.1/resources/symbols/RelationOperators/supset.png000644 001750 001750 00000000314 12314604155 024444 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME U;LIDAT(1 0 ue2@I̓,K2jvpe$IGEt`|.IC0G֠.ٳ`ΉqwQ3%Ŋ"a= )J_gb<+MvGuՁoQi{hLB_" |NhΑ\SxUuߴ;.@,] ̊Vjݑ4'09KKK')Yz{b=..'@Zx wьH+iu7_GYsl,+V(}EF1ӻ` oo5.kՇHJ_# ȈQ54t8!3#FQ&S?lg7,]4Bќ7o^"pVcǎ/ڢ,BN|vN|4KxX8ZyX͟( >)H$w!&ȭߦU~d,ֽ}.q 4 %|q5oPrB  N?~<_J{(+]Mߥ[!bXp:+Vkfj,^xɓ'wO]i"taA}8BvǞ g X)ܭ^Q@RǙ՗6_K?/Zx$ rGkN/D~Z8JT&A*++7)]R8}˭k~Oȑ#<,wmk;3"-ݨvkK`Fb"_ᙦ^X,#7M7|^Nxr;`AcJ> Q͵K69@Y*UI/ I2+I#`Ͷ*NjD >w`,'8k'ۏ;Z}7, 瓛6mʑJ "TTTXZZZ}H^2E&VA*D34ׄ &`Dl{ܔIQfXިUB)V܇K# vԙbM׼ϰ#dwv݂hުX-(ː%PXs z'~yRk(h RSpfvߏӔ -=A9?mUa8߿w~>ܼ1_J#vlWdʰ2gVɕ ѷBsW.\sWKw+'U(),7l8%p]ژĄDh-@mv=9Ȏcz6qhb!!&QǑҽCy&]mSaNVIp[/8pwq[J pߗ-iIѶIA-)<")Dj mֶ.@c&@j)XM:?!%a~"%A^4yKSȕK n`x]6o i$-Pf1h9wu85 浟N輸?14;~0P3 uƴ Ԙ :PcZPjҬE\IENDB`equalx-0.7.1/resources/icons/bookmarks/folder.png000644 001750 001750 00000000612 12314604155 022334 0ustar00mihaimihai000000 000000 PNG  IHDR(-SsBITO pHYs B(xtEXtSoftwarewww.inkscape.org<PLTEAIBDۆBAABDFHJLOQSUiuꂱ펺k(tRNS "<>?f4^IDAT]1AE{? `IՄjLKFusx^.Z{7^̖WK2 eTAcɠ13>i+]ʬiBLIENDB`equalx-0.7.1/resources/icons/filetypes/pdf.png000644 001750 001750 00000002620 12314604155 021647 0ustar00mihaimihai000000 000000 PNG  IHDR szztEXtSoftwareAdobe ImageReadyqe<2IDATxڴWkL\Eν[Tj*C ( 6$ ?nibj|D+AkbCPZ >~ $hXl҄&Pgm ;3]XB'wq7B)XB}}}ي hp^#nujyjĄ>Are&fʘ;rvO1`Ih5UAkk+MKS5Z RY+ӄp*#6H$RJͣ;LMSi62uPQ0Q[[[{϶&& :PX&'5y%J)/$03[@f%|G߃2Љ9DtLbK>BV1i @YHl5H uk*eC W[\LZ% QRղ A~v<QXA6sz=hF Yua_}5 I T=F(ru-|H{X^Z=]@c|4$!  N! F'֜5d Dp_๧m%GWfG,36[~'jr ?| D@~ VYsP @GZ]q#PB,][⚛qLv ) F}0E0$LKBŅrX+}'bgpSyn^:&?oEmq{t͈@))y=I$*RFY~P1;fbd u7n\Ƽ߈/ce\IENDB`equalx-0.7.1/resources/icons/tabBar/derivs/eq01.png000644 001750 001750 00000001125 12314604155 022326 0ustar00mihaimihai000000 000000 PNG  IHDR! T pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;tEXtLatex\frac{dy}{dx}SPtEXtResolution118- WIDATHկNAD*!A dE,\$^ONf۹EML6i&5w]\&ZNmI+^5U$D(] S*88E;H +n52fIϴ6|PG64ub8nӘ7iX]lnքiLxm#?ijo|M=JW2bE{}? U ?nWX;nN ֩kc(v68:f_GL2WEJ̝dVy*R3+RlF6i`*X IENDB`equalx-0.7.1/resources/icons/bookmarks/000755 001750 001750 00000000000 12314604155 020354 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/symbols/Greek/chi.png000644 001750 001750 00000000331 12314604155 021244 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME-0mqxYIDAT(S11g:q r`% x"wV{L1\:xޛ:TR0 mNvwϙ?GEIENDB`equalx-0.7.1/resources/symbols/BigGreek/000755 001750 001750 00000000000 12314604155 020420 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/createLibraryTables.sql000644 001750 001750 00000002557 12314604155 021726 0ustar00mihaimihai000000 000000 BEGIN TRANSACTION; CREATE TABLE bookmarks (id INTEGER primary key AUTOINCREMENT, idparent INTEGER, title VARCHAR(255), description TEXT, fileType CHAR(50), dirPath TEXT, created INTEGER, modified INTEGER,FOREIGN KEY(idparent) REFERENCES bookmarks_folders(id) ON DELETE CASCADE ON UPDATE CASCADE ); CREATE TABLE bookmarksToolbar (id INTEGER primary key AUTOINCREMENT, idparent INTEGER, title VARCHAR(255), created INTEGER,FOREIGN KEY(idparent) REFERENCES bookmarksToolbar_folders(id) ON DELETE CASCADE ON UPDATE CASCADE); CREATE TABLE bookmarksToolbar_folders (id INTEGER primary key AUTOINCREMENT, name VARCHAR(255), created INTEGER); CREATE TABLE bookmarks_content (id INTEGER primary key AUTOINCREMENT, refId INTEGER, latexContent TEXT, created INTEGER,FOREIGN KEY(refId) REFERENCES bookmarks(id) ON DELETE CASCADE ON UPDATE CASCADE ); CREATE TABLE bookmarks_folders (id INTEGER primary key AUTOINCREMENT, idparent INTEGER, name VARCHAR(255), description VARCHAR(255), dirPath TEXT, created INTEGER, modified INTEGER,FOREIGN KEY(idparent) REFERENCES bookmarks_folders(id) ON DELETE CASCADE ON UPDATE CASCADE); CREATE TABLE equalx (id INTEGER primary key, version VARCHAR(10), created INTEGER, modified INTEGER); CREATE TABLE history (id INTEGER primary key AUTOINCREMENT, title VARCHAR(255), created INTEGER); INSERT INTO bookmarks_folders VALUES(1,NULL,'ROOT','',NULL,NULL,NULL); COMMIT; equalx-0.7.1/resources/symbols/Integrals/iint.png000644 001750 001750 00000000274 12314604155 022345 0ustar00mihaimihai000000 000000 PNG  IHDR F)sRGBbKGD pHYs  tIME)#a * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef EXEQUATIONITEMDELEGATE_H #define EXEQUATIONITEMDELEGATE_H #include class BookmarksViewItemDelegate : public QStyledItemDelegate { Q_OBJECT public: explicit BookmarksViewItemDelegate(QObject *parent = 0); /** Editor is disabled since this delegate purpose is to display data **/ QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const; void setEditorData(QWidget *editor, const QModelIndex &index) const; void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const; void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const; /** Only these methods are actually used **/ void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const; QSize sizeHint( const QStyleOptionViewItem & option, const QModelIndex & index ) const; int widthH; int heightH; }; #endif // EXEQUATIONITEMDELEGATE_H equalx-0.7.1/resources/symbols/RelationOperators/succ.png000644 001750 001750 00000000311 12314604155 024053 0ustar00mihaimihai000000 000000 PNG  IHDR F)sRGBbKGD pHYs  tIME5$@vIIDAT(1 <P Ap)) cV/Tp[QPf̠n<g %NIENDB`equalx-0.7.1/resources/symbols/Greek/varrho.png000644 001750 001750 00000000321 12314604155 022001 0ustar00mihaimihai000000 000000 PNG  IHDR B'sRGBbKGD pHYs  tIME &QIDAT(ݒ; C}_N"~p h4 ܢD jsI"Yo))Twue@:X҅ʟ:l4pވIENDB`equalx-0.7.1/resources/icons/preferences/properties.svg000644 001750 001750 00000011737 12314604155 023613 0ustar00mihaimihai000000 000000 equalx-0.7.1/resources/symbols/Greek/varphi.png000644 001750 001750 00000000325 12314604155 021775 0ustar00mihaimihai000000 000000 PNG  IHDR F)sRGBbKGD pHYs  tIME ߮YUIDAT(;0CPewBJQ!S c[] }4/gn6McUl߼<(I*TaV rM0!c1IENDB`equalx-0.7.1/resources/symbols/.directory000644 001750 001750 00000000046 12314604155 020746 0ustar00mihaimihai000000 000000 [Dolphin] Timestamp=2010,1,27,11,59,6 equalx-0.7.1/src/LatexHighlighter.cpp000644 001750 001750 00000003631 12314604155 017771 0ustar00mihaimihai000000 000000 /* * Copyright 2010 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include "LatexHighlighter.h" LatexHighlighter::LatexHighlighter(QTextDocument *parent) : QSyntaxHighlighter(parent) { HighlightingRule rule; commentFormat.setForeground(Qt::gray); commentFormat.setFontWeight(QFont::Normal); rule.pattern = QRegExp("%.*"); rule.format = commentFormat; rules.append(rule); controlFormat.setForeground(Qt::blue); controlFormat.setFontWeight(QFont::Bold); rule.pattern = QRegExp("\\\\[A-Za-z]*"); rule.format = controlFormat; rules.append(rule); bracesFormat.setForeground(Qt::red); bracesFormat.setFontWeight(QFont::Normal); rule.pattern = QRegExp("[\\{\\}\\(\\)\\[\\]\\^\\_]"); rule.format = bracesFormat; rules.append(rule); } void LatexHighlighter::highlightBlock(const QString &text) { foreach (HighlightingRule rule, rules) { QRegExp expression(rule.pattern); int index = text.indexOf(expression); while (index >= 0) { int length = expression.matchedLength(); setFormat(index, length, rule.format); index = text.indexOf(expression, index + length); } } setCurrentBlockState(0); } equalx-0.7.1/resources/icons/menu/document-open.png000644 001750 001750 00000001434 12314604155 022615 0ustar00mihaimihai000000 000000 PNG  IHDRĴl;sBIT|d pHYsvv}ՂtEXtSoftwarewww.inkscape.org<IDATxڵjAS6DР(AV\$H|"t% DшD$LgRt:3ATMM}]d!y)LVEB. ...-͆"9JL{F9.TN ~0N:1}4|ϓo@UU̬p@8pn\9 A]ںrgo>|rZ ̻(2TZ~X?TQ| cJs g:-%F)}>:qg2] ߑ}:`[:'Tkl2tC)hXk Pڕ|gr|sY&O Z"P_, uJinsO˩=5<FZ7ȶzcu#FL7 5\lАR4(n 6W560v$t# 0 oŠ^pJ=(dDF`E2g" wWT| 5ï?;S0 V$`!'nMBtf͆QG(\eY^lw1Z ou"fتghꭼ<}D0#WM;JW/pj]{8tg{8xK/qTyIENDB`equalx-0.7.1/resources/icons/tabBar/algebra/eq05.png000644 001750 001750 00000001321 12314604155 022431 0ustar00mihaimihai000000 000000 PNG  IHDR6.( pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;+tEXtLatex\frac{ n! }{ r! \left( n-r \right)! }5 tEXtResolution90'QOIDATXQ0E^fTוB+1c \;nWznY.S+J%UC8me*wE6\0Ce=7vDLe<.,`Bq{?"4ճ-RO+oQ<F[[3]=]Mo}xOɃK 2Ya~-}u3J;vMai[DǢ 5MvMS&16Ύ{ W93Ğ XWc^+ZLf4,UTRFBxfq?e$aֺu&"-ϊ=^ml 3d4uC@TL}] _D)ԪעV P5uj@+*8hElS<6pm[H{ jwB5u[`UCY* `+ nT99ݠ@ެUZD8~r_Ta4 =ʦ.\$uŒ .|1s =KY _!4B{S9GƿyE"0!y|Wyӊn<)ZO * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef LIBRARYDATA_H #define LIBRARYDATA_H #include #include #include #include /** These data is intended to be used for fast viewing (and low memory consumption in models) **/ class LibraryModelData { public: enum Type { TypeUndefined, TypeFolder, TypeHistory, TypeBookmark }; LibraryModelData(); LibraryModelData(const LibraryModelData& other); virtual ~LibraryModelData(); bool isFolder() const; bool isBookmark() const; bool isHistory() const; bool isValid() const; // is valid if the object is in database operator QVariant() const { return QVariant::fromValue(*this); } int id; int idparent; QString name; // this field can be (depending on context) the title of a library folder or the absolute path to an equation file LibraryModelData::Type type; qint64 created; }; Q_DECLARE_METATYPE(LibraryModelData) typedef QList LibraryRowsList; inline QDataStream& operator<<(QDataStream& out, const LibraryModelData& object) { out << object.id; out << object.idparent; out << object.name; out << (quint32)object.type; out << object.created; return out; } inline QDataStream& operator>>(QDataStream& in, LibraryModelData& object) { in >> object.id; in >> object.idparent; in >> object.name; quint32 typeIntVal; in >> typeIntVal; object.type= (LibraryModelData::Type)typeIntVal; in >> object.created; return in; } QDebug operator<<(QDebug dbg, const LibraryModelData &data); //_____________________________________________________________________________________________________ /** ** The data types below are intended for complete editing/viewing of a specific library item ** **/ class HistoryRow { public: HistoryRow(); HistoryRow(const HistoryRow& other); virtual ~HistoryRow(); LibraryModelData basicData() const; int id; QString title; QString filePath; qint64 created; }; Q_DECLARE_METATYPE(HistoryRow) class Bookmark { public: Bookmark(); Bookmark(const Bookmark& other); Bookmark(const LibraryModelData& data); virtual ~Bookmark(); LibraryModelData basicData() const; bool isValid() const; QString fileExt() const; void clear(); // set members to default values (invalidates the bookmark) int id; int idparent; QString title; QString description; QString filePath; QString dirPath; qint64 created; qint64 modified; }; Q_DECLARE_METATYPE(Bookmark) class BookmarkFolder { public: BookmarkFolder(); BookmarkFolder(const BookmarkFolder& other); BookmarkFolder(const LibraryModelData& data); virtual ~BookmarkFolder(); LibraryModelData basicData() const; bool isValid() const; int id; int idparent; QString name; QString description; QString dirPath; qint64 created; qint64 modified; }; Q_DECLARE_METATYPE(BookmarkFolder) #endif // LIBRARYDATA_H equalx-0.7.1/resources/symbols/Operators/sqcup.png000644 001750 001750 00000000254 12314604155 022561 0ustar00mihaimihai000000 000000 PNG  IHDR F)sRGBbKGD pHYs  tIME8D>A,IDAT(c?0d322  (fAK=(D '= IENDB`equalx-0.7.1/src/HistoryPanel/HistoryListModel.cpp000644 001750 001750 00000005212 12314604155 022431 0ustar00mihaimihai000000 000000 /* * Copyright 2014 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include "Library/Library.h" #include "HistoryPanel/HistoryListModel.h" HistoryListModel::HistoryListModel(LibraryManager *library, QObject *parent) : QAbstractListModel(parent), mLibrary(library), mChildren(0) { mHistorySize = mLibrary->historySize(); connect(mLibrary, SIGNAL(historyChanged()), this, SLOT(onHistoryChanged()) ); } HistoryListModel::~HistoryListModel() { } QVariant HistoryListModel::data(const QModelIndex &index, int role) const { if (!index.isValid()) return QVariant(); if (index.row() >= mHistorySize || index.row() < 0) return QVariant(); if (role == Qt::DisplayRole){ return mLibrary->getHistoryRow(mHistorySize-index.row()).basicData(); } return QVariant(); } bool HistoryListModel::canFetchMore(const QModelIndex &/*parent*/) const { if(mChildren < mHistorySize){ return true; } else { return false; } } void HistoryListModel::fetchMore(const QModelIndex &/*parent*/) { int remainder = mHistorySize - mChildren; int itemsToFetch = qMin(10, remainder); beginInsertRows(QModelIndex(), mChildren, mChildren+itemsToFetch-1); mChildren += itemsToFetch; endInsertRows(); } int HistoryListModel::rowCount(const QModelIndex &/*parent*/) const { return mChildren; } Qt::DropActions HistoryListModel::supportedDropActions() const { return Qt::IgnoreAction; } Qt::DropActions HistoryListModel::supportedDragActions() const { return Qt::IgnoreAction; } Qt::ItemFlags HistoryListModel::flags(const QModelIndex &index) const { if (!index.isValid()) return Qt::NoItemFlags; Qt::ItemFlags itemFlags = Qt::ItemIsEnabled | Qt::ItemIsSelectable; return itemFlags; } void HistoryListModel::onHistoryChanged() { beginResetModel(); mHistorySize = mLibrary->historySize(); if(mHistorySize==0) mChildren = 0; endResetModel(); } equalx-0.7.1/resources/symbols/Greek/delta.png000644 001750 001750 00000000323 12314604155 021573 0ustar00mihaimihai000000 000000 PNG  IHDR B'sRGBbKGD pHYs  tIME(uSIDAT(͒1 0 ĬY &iɃ8ƨ4#^aUr:E$juoY/f5?| 0#ҼIENDB`equalx-0.7.1/resources/templates/000755 001750 001750 00000000000 12314604155 017247 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/equalx.desktop000755 001750 001750 00000000621 12314604155 020145 0ustar00mihaimihai000000 000000 [Desktop Entry] Version=0.7.0 Exec=equalx Terminal=false Type=Application StartupNotify=false MimeType=image/png;image/svg+xml;image/jpg; Icon=equalx-64x64.png Categories=Qt;KDE;Office;Math; X-DBUS-StartupType=Unique Name=EqualX Name[ro]=EgalX GenericName=LaTeX Equation Editor GenericName[ro]=Editor LaTeX de ecuații Comment=Create equations in LaTeX Comment[ro]=Creează ecuații folosind LaTeX equalx-0.7.1/resources/symbols/Sets/aleph.png000644 001750 001750 00000000326 12314604155 021457 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME 5"xVIDAT(Ւ Bg:宥&u`F|Gm쌰9?$_MMAjL5$\Κ֍q GAsIENDB`equalx-0.7.1/README000644 001750 001750 00000002225 12314604155 014120 0ustar00mihaimihai000000 000000 README for EqualX Equation Editor === About EqualX === EqualX is just a graphical interface to latex and a bunch of conversion programs for aiding you write equations faster in latex and export them to other applications. === Requirements for EqualX === EqualX use a TeXLive distribution system. The recommended TeX distribution for for Windows is MiKTeX. You can download it for free from http://miktex.org/ On GNU/Linux use a TeX live distribution provided with your distribution. === Installation === 1. Install MiKTeX distribution 2. Install EqualX === Troubleshooting === - If you don't install MiKTeX in the default directory, you should tell EqualX where MiKTeX is installed: - Run EqualX - Edit->Preferences - Converters Tab - Browse for external programs === Compiling === If you want to compile EqualX from source, you need these: Required libraries for compilation: - Qt4 (or Qt5) - exempi (or Adobe XMP for Windows) Also, you need to make sure the following programs are installed and EqualX can find them: Required external programs: - pdflatex - gs - pdftocairo (from poppler-utils) equalx-0.7.1/include/defines.h000644 001750 001750 00000007735 12314605347 016470 0ustar00mihaimihai000000 000000 /* * Copyright 2010 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef DEFINES_H #define DEFINES_H #define APP_FULL_NAME "EqualX - The LaTeX Equation Editor" #define APP_NAME "EqualX" #define APP_VERSION "0.7.1" #define APP_SITE "http://equalx.sourceforge.net/" #define AUTHOR_NAME "Mihai Niculescu" #define AUTHOR_EMAIL "q.quark@gmail.com" /* * DEFAULT FACTORY SETTINGS for QSettings */ // GENERAL defaults #define SETTINGS_DIR "equalx" #define SETTINGS_FILE "settings" #define DEFAULT_REMEMBER_LAYOUT true #define DEFAULT_WINDOW_WIDTH 400 #define DEFAULT_WINDOW_HEIGHT 500 #define DEFAULT_WINDOW_X 200 #define DEFAULT_WINDOW_Y 200 #define DEFAULT_SHOW_TOOLBAR true #define DEFAULT_SHOW_MAIN_TOOLBAR true #define DEFAULT_SHOW_PANEL_SYMBOLS true #define DEFAULT_SHOW_PANEL_TEMPLATES true #define DEFAULT_SHOW_PANEL_PROPERTIES true #define DEFAULT_SHOW_PANEL_SIDEBAR false #define DEFAULT_EXPORT_TYPE "SVG" // EDITOR defaults #ifdef UNIX_PLATFORM #define DEFAULT_FONT "Monospace,10,-1,5,50,0,0,0,0,0" #endif #ifdef WIN_PLATFORM #define DEFAULT_FONT "Arial,10,-1,5,50,0,0,0,0,0" #endif // represents the index in the font combobox #define DEFAULT_FONT_SIZE 4 #define DEFAULT_HIGHLIGHTING true #define DEFAULT_WRAPPING true #define DEFAULT_COMPLETION true // PREVIEW defaults #define DEFAULT_UPDATE_AUTO true #define DEFAULT_UPDATE_TIME 1500 #define DEFAULT_PREVIEW_BG "transparent" #define DEFAULT_RENDER_FG "black" #define DEFAULT_RENDER_BG "transparent" // represents the index in the font combobox #define DEFAULT_RENDER_FONT_SIZE LATEX_FONT_NORMAL #define DEFAULT_RENDER_MODE LATEX_ENV_MODE_DISPLAY // LATEX #ifdef UNIX_PLATFORM #define DEFAULT_PDFLATEX "/usr/bin/pdflatex" #define DEFAULT_PDFLATEX_ARGS "-interaction=nonstopmode" #define DEFAULT_PDFCAIRO "/usr/bin/pdftocairo" #define DEFAULT_PDFCAIRO_ARGS "" #define DEFAULT_GS "/usr/bin/gs" #define DEFAULT_GS_ARGS "" //where to look for symbols.ini and the actual symbols #define SYMBOLS_PATH "/usr/share/equalx/resources/symbols" #endif #ifdef WIN_PLATFORM #define DEFAULT_PDFLATEX "pdflatex.exe" #define DEFAULT_PDFLATEX_ARGS "-interaction=nonstopmode" #define DEFAULT_PDFCAIRO "poppler\\pdftocairo.exe" #define DEFAULT_PDFCAIRO_ARGS "" #define DEFAULT_GS "gs.exe" #define DEFAULT_GS_ARGS "" #define SYMBOLS_PATH "resources/symbols" #endif // environment for the latex equation enum LATEX_ENV_MODE{ LATEX_ENV_MODE_DISPLAY, LATEX_ENV_MODE_INLINE, LATEX_ENV_MODE_ALIGN, LATEX_ENV_MODE_TEXT }; enum LATEX_FONT_SIZE{ LATEX_FONT_TINY=0, LATEX_FONT_SCRIPT, LATEX_FONT_FOOTNOTE, LATEX_FONT_SMALL, LATEX_FONT_NORMAL, LATEX_FONT_LARGE, LATEX_FONT_VERY_LARGE, LATEX_FONT_HUGE, LATEX_FONT_VERY_HUGE }; /* * defines for parsing the .tex file */ #define TEMP_FILE_NAME "equation" #define TEMP_LATEX_FILE "equation.tex" #define TEMP_LATEX_CROP_FILE "equation-cropped.tex" #define TEMP_PDF_FILE "equation.pdf" #define TEMP_PDFCROP_FILE "equation-cropped.pdf" #define TEMP_METADATA_FILE "metadata.xmp" // METADATA #define METADATA_NS "http://ns.equalx/meta" // XMP schema #define METADATA_PREFIX "equalx" #define METADATA_PREAMBLE "preamble" #define METADATA_EQUATION "equation" #define METADATA_ENV "environment" #define METADATA_FG "color" #define METADATA_BG "background" #define METADATA_DOC_FONT_SIZE "fontsize" #endif // DEFINES_H equalx-0.7.1/resources/symbols/Arrows/longleftrightarrow.png000644 001750 001750 00000000307 12314604155 024647 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME6 QDGIDAT81 0"S1qB4΄3Vwco%a2n N?.|$1IENDB`equalx-0.7.1/resources/symbols/Functions/000755 001750 001750 00000000000 12314604155 020711 5ustar00mihaimihai000000 000000 equalx-0.7.1/resources/symbols/Operators/star.png000644 001750 001750 00000000303 12314604155 022372 0ustar00mihaimihai000000 000000 PNG  IHDR B'sRGBbKGD pHYs  tIME66CIDAT(1 =s*T(N&Тz;g"M;Y*D5,σ2!SIENDB`equalx-0.7.1/src/SearchLineEdit.cpp000644 001750 001750 00000007547 12314604155 017372 0ustar00mihaimihai000000 000000 /* This file is part of EqualX, based on LineEdit from Martin Rotter http://www.martin-rotter.8u.cz/2013/03/qlineedit-subclass-with-clear-button-in-english/ EqualX is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. EqualX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with EqualX. If not, see . Copyright 2012 - 2013 Martin Rotter Copyright 2014 Mihai Niculescu */ /**************************************************************************** ** ** Copyright (c) 2007 Trolltech ASA ** ** Use, modification and distribution is allowed without limitation, ** warranty, liability or support of any kind. ** ****************************************************************************/ #include #include #include #include #include #include "SearchLineEdit.h" SearchLineEdit::SearchLineEdit(QWidget *parent) : QLineEdit(parent) { mClearButton = new QToolButton(this); int frame_width = frameWidth(); mClearButton->setIcon(QIcon::fromTheme("edit-clear", QIcon(":/resources/icons/menu/clear_left.png"))); int SH = sizeHint().height() - 4 * frame_width; mClearButton->setIconSize(QSize( SH,SH)); mClearButton->setCursor(Qt::ArrowCursor); mClearButton->setStyleSheet("QToolButton { border: none; padding: 0px; }"); mClearButton->setToolTip(tr("Clear")); mClearButton->hide(); mClearButtonEnabled = true; // Create necessary connections. connect(mClearButton, SIGNAL(clicked()), this, SLOT(clear()) ); connect(this, SIGNAL(textChanged(const QString&)), this, SLOT(onTextChanged(const QString&)) ); // Add extra padding to the right of the line edit. It looks better. setStyleSheet(QString("QLineEdit { padding-right: %1px; }").arg(mClearButton->sizeHint().width() + frame_width + 1)); QSize min_size_hint = minimumSizeHint(); setMinimumSize(qMax(min_size_hint.width(), mClearButton->sizeHint().height() + frame_width), qMax(min_size_hint.height(), mClearButton->sizeHint().height() + frame_width)); setContextMenuPolicy(Qt::NoContextMenu); mCompleter = new QCompleter(this); } SearchLineEdit::~SearchLineEdit() { delete mClearButton; } void SearchLineEdit::onTextChanged(const QString &new_text) { // If line edit is not read only (or not enabled) and clear button // is enabled, then make sure it's displayed. if (isReadOnly() == false && isEnabled() == true && mClearButtonEnabled == true) { mClearButton->setVisible(new_text.isEmpty() == false); } } void SearchLineEdit::setClearButtonEnabled(bool enable) { mClearButtonEnabled = enable; } void SearchLineEdit::setEnabled(bool enable) { QLineEdit::setEnabled(enable); onTextChanged(text()); } void SearchLineEdit::setReadOnly(bool read_only) { QLineEdit::setReadOnly(read_only); onTextChanged(text()); } int SearchLineEdit::frameWidth() const { return style()->pixelMetric(QStyle::PM_DefaultFrameWidth, 0, this); } void SearchLineEdit::resizeEvent(QResizeEvent *event) { Q_UNUSED(event); // Place clear button correctly, according to size of line edit. QSize sz = mClearButton->sizeHint(); mClearButton->move(rect().right() - sz.width(), rect().bottom() - sz.height() ); QLineEdit::resizeEvent(event); } equalx-0.7.1/include/EquationView.h000644 001750 001750 00000002672 12314604155 017462 0ustar00mihaimihai000000 000000 /* * Copyright 2010 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef EQUATIONPIXMAPITEM_H #define EQUATIONPIXMAPITEM_H #include class QMouseEvent; class EquationView : public QLabel { public: EquationView(QWidget * parent=0); void clear(); QSize sizeHint() const; QString exportSource() const; void setExportSource(const QString& filename); void setPixmap(const QString &fileName); void show(); protected: // Methods void mousePressEvent( QMouseEvent *event ); void mouseMoveEvent( QMouseEvent *event ); void paintEvent(QPaintEvent *); protected: // Data QPointF mDragPosition; QString mDragFileSource; QSize mAnimStartSize; QSize mAnimEndSize; }; #endif // EQUATIONPIXMAPITEM_H equalx-0.7.1/resources/icons/tabBar/chemistry/.directory000644 001750 001750 00000000102 12314604155 023564 0ustar00mihaimihai000000 000000 [Dolphin] AdditionalInfo=3 Timestamp=2010,2,8,22,29,12 ViewMode=1 equalx-0.7.1/resources/symbols/Integrals/dotsint.png000644 001750 001750 00000000313 12314604155 023060 0ustar00mihaimihai000000 000000 PNG  IHDR<sRGBbKGD pHYs  tIME%._ϊKIDAT8 gHK'eLU 5z 3S?x vWcϙۯ(c` %H^IENDB`equalx-0.7.1/include/BookmarksPanel/BookmarksItemModel.h000644 001750 001750 00000005740 12314604155 023501 0ustar00mihaimihai000000 000000 /* * Copyright 2014 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef BOOKMARKSITEMMODEL_H #define BOOKMARKSITEMMODEL_H #include #include #include "Library/LibraryData.h" class BookmarkItem; class LibraryManager; class BookmarksItemModel : public QAbstractItemModel { Q_OBJECT public: BookmarksItemModel(LibraryManager* lib, QObject *parent = 0); ~BookmarksItemModel(); QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const; bool canFetchMore(const QModelIndex &parent) const; void fetchMore(const QModelIndex &parent); bool hasChildren(const QModelIndex &parent) const; QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; BookmarkItem* invisibleRootItem() const; BookmarkItem* itemFromIndex(const QModelIndex &index) const; QModelIndex parent(const QModelIndex &index) const; int rowCount(const QModelIndex &parent = QModelIndex()) const; int columnCount(const QModelIndex &parent = QModelIndex()) const; bool insertRow(int row, const QModelIndex &parent); bool insertRows(int row, int count, const QModelIndex &parent); // insert undefined rows into model, but not in library (use setData to make them valid) bool removeRow(int row, const QModelIndex & parent = QModelIndex()); bool removeRows(int row, int count, const QModelIndex &parent); // drag n drop support Qt::DropActions supportedDropActions() const; Qt::DropActions supportedDragActions() const; Qt::ItemFlags flags(const QModelIndex &index) const; QStringList mimeTypes() const; QMimeData *mimeData(const QModelIndexList &indexes) const; bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent); // Specific methods to this model QVariant getCompleteData(const QModelIndex &index) const; // returns complete data from DB of this index public slots: void onFolderChanged(const QString &dirPath); private: QModelIndex findItem(const QString &dirPath); BookmarkItem *mRootItem; LibraryManager *mLibrary; }; #endif // BOOKMARKSITEMMODEL_H equalx-0.7.1/resources/symbols/Miscellaneous/forall.png000644 001750 001750 00000000320 12314604155 023524 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME2nMPIDAT(͒ 0 s$I kۣ AMEGڴ<> FTQUDGT$9g]2Q)zwjv*Q[IENDB`equalx-0.7.1/resources/icons/tabBar/algebra/eq03.png000644 001750 001750 00000001275 12314604155 022437 0ustar00mihaimihai000000 000000 PNG  IHDR?m7 pHYs!3tEXtBackground#000000& #tEXtForegroundblack\tEXtGeneratorequalxJзtEXtGenerator_Version0.1X3;tEXtLatex\sqrt{b^2 - 4ac} 0tEXtResolution100:U{IDATX?V1*e%r\nGq7;KkhɘlTv7I/3,,V!#/oLL#UA rQFfkw$rE2aS}BzN^ ~]ՄM?mtd%% T2Ed o#w7Yl %Cj`ڪKccEA12GP4L4V e"v=&~˰s,*pE' ѻ2 \5E.8fO{J͕t_JB~4}Q$شwK,#!{1Gg!zwp\y.3pyDW} ʌ_I#nm,X?f3IENDB`equalx-0.7.1/resources/symbols/Sets/mathbb_N.png000644 001750 001750 00000000331 12314604155 022074 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME3YIDAT(ݒ C[牄u1q(b@;Ѵ$پ y~jZw{eY~}ceʐA~z:R\\#C%IENDB`equalx-0.7.1/include/HistoryPanel/HistoryViewItemDelegate.h000644 001750 001750 00000003515 12314604155 024226 0ustar00mihaimihai000000 000000 /* * Copyright 2014 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef EXEQUATIONITEMDELEGATE_H #define EXEQUATIONITEMDELEGATE_H #include class HistoryViewItemDelegate : public QStyledItemDelegate { Q_OBJECT public: explicit HistoryViewItemDelegate(QObject *parent = 0); /** Editor is disabled since this delegate purpose is to display data **/ QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const; void setEditorData(QWidget *editor, const QModelIndex &index) const; void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const; void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const; /** Only these methods are actually used **/ void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const; QSize sizeHint( const QStyleOptionViewItem & option, const QModelIndex & index ) const; int widthH; int heightH; }; #endif // EXEQUATIONITEMDELEGATE_H equalx-0.7.1/resources/symbols/Integrals/int.png000644 001750 001750 00000000267 12314604155 022176 0ustar00mihaimihai000000 000000 PNG  IHDR sRGBbKGD pHYs  tIME((~7IDAT(풱 45 m,h: E5IJk `_ `+ + IENDB`equalx-0.7.1/src/BookmarksPanel/BookmarkItem.cpp000644 001750 001750 00000006142 12314604155 022031 0ustar00mihaimihai000000 000000 /* * Copyright 2014 Mihai Niculescu * * This file is part of EqualX Project (https://launchpad.net/equalx/) * * EqualX is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EqualX is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include #include "BookmarksPanel/BookmarkItem.h" #include "BookmarksPanel/BookmarksItemModel.h" BookmarkItem::BookmarkItem(BookmarkItem *parent) : mModel(0), mParent(parent) { if(mParent) mModel = mParent->model(); } BookmarkItem::BookmarkItem(const LibraryModelData &data, BookmarkItem *parent) : mModel(0), mData(data), mParent(parent) { if(mParent) mModel = mParent->model(); } BookmarkItem::~BookmarkItem() { qDeleteAll(mChildren); } void BookmarkItem::appendChild(BookmarkItem *child) { mChildren.append(child); } void BookmarkItem::insertChild(int row, BookmarkItem *child) { mChildren.insert(row, child); } BookmarkItem *BookmarkItem::child(int row) { int minSize = 0; int maxSize = mChildren.size()-1; if(rowmaxSize) row = maxSize; return mChildren.value(row); } BookmarkItem *BookmarkItem::constChild(int row) const { return mChildren.value(row); } void BookmarkItem::clear() { if(!mChildren.isEmpty()){ qDeleteAll(mChildren); mChildren.clear(); } } int BookmarkItem::childCount() const { return mChildren.size(); } int BookmarkItem::columnCount() const { return 1; } LibraryModelData BookmarkItem::data(int /*column*/) const { return mData; } void BookmarkItem::setData(const LibraryModelData &data) { mData.id = data.id; mData.name = data.name; mData.type = data.type; mData.created = data.created; } QModelIndex BookmarkItem::index() const { if(mParent==0) return QModelIndex(); return mModel->index(row(),0, mParent->index()); } bool BookmarkItem::hasChildren() const { return (!mChildren.isEmpty()); } int BookmarkItem::row() const { if(mParent){ return mParent->mChildren.indexOf(const_cast(this)); } return 0; } int BookmarkItem::rowCount() const { return childCount(); } BookmarkItem *BookmarkItem::parent() const { return mParent; } BookmarksItemModel *BookmarkItem::model() const { return mModel; } void BookmarkItem::removeChild(int row) { int minSize = 0; int maxSize = mChildren.size()-1; if(rowmaxSize) row = maxSize; mChildren.removeAt(row); } void BookmarkItem::setChildren(const QList childList) { mChildren = childList; }