reformating (no functional change)
This commit is contained in:
parent
7379cff7db
commit
6c67c11481
@ -18,7 +18,8 @@
|
|||||||
|
|
||||||
CalculationEngine::CalculationEngine()
|
CalculationEngine::CalculationEngine()
|
||||||
{
|
{
|
||||||
if (!CALCULATOR) {
|
if (!CALCULATOR)
|
||||||
|
{
|
||||||
new Calculator();
|
new Calculator();
|
||||||
CALCULATOR->terminateThreads();
|
CALCULATOR->terminateThreads();
|
||||||
CALCULATOR->setPrecision(16);
|
CALCULATOR->setPrecision(16);
|
||||||
@ -52,6 +53,4 @@ QString CalculationEngine::evaluate(const QString &expression)
|
|||||||
MathStructure result = CALCULATOR->calculate(ctext, this->eo);
|
MathStructure result = CALCULATOR->calculate(ctext, this->eo);
|
||||||
result.format(po);
|
result.format(po);
|
||||||
return result.print(po).c_str();
|
return result.print(po).c_str();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
6
config.h
6
config.h
@ -24,7 +24,7 @@
|
|||||||
#include <QKeySequence>
|
#include <QKeySequence>
|
||||||
class EntryConfig
|
class EntryConfig
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QString key;
|
QString key;
|
||||||
QString name;
|
QString name;
|
||||||
QString command;
|
QString command;
|
||||||
@ -39,12 +39,12 @@ class EntryConfig
|
|||||||
|
|
||||||
class ConfigReader
|
class ConfigReader
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
QStringList configPaths;
|
QStringList configPaths;
|
||||||
EntryConfig readFromFile(const QString &path);
|
EntryConfig readFromFile(const QString &path);
|
||||||
EntryConfig readFromDesktopFile(const QString &path);
|
EntryConfig readFromDesktopFile(const QString &path);
|
||||||
QStringList desktopIgnoreArgs;
|
QStringList desktopIgnoreArgs;
|
||||||
public:
|
public:
|
||||||
ConfigReader(QStringList paths);
|
ConfigReader(QStringList paths);
|
||||||
QVector<EntryConfig> readConfig();
|
QVector<EntryConfig> readConfig();
|
||||||
};
|
};
|
||||||
|
@ -14,7 +14,7 @@ private slots:
|
|||||||
public:
|
public:
|
||||||
SingleInstanceServer();
|
SingleInstanceServer();
|
||||||
bool listen(QString socketPath);
|
bool listen(QString socketPath);
|
||||||
signals:
|
signals:
|
||||||
void receivedMaximizationRequest();
|
void receivedMaximizationRequest();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -151,7 +151,6 @@ QStringList Window::generatePATHSuggestions(const QString &text)
|
|||||||
QString entry = info.baseName();
|
QString entry = info.baseName();
|
||||||
if(entry.startsWith(text))
|
if(entry.startsWith(text))
|
||||||
{
|
{
|
||||||
|
|
||||||
results.append(entry);
|
results.append(entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
6
window.h
6
window.h
@ -38,7 +38,7 @@
|
|||||||
class Window : public QWidget
|
class Window : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private:
|
private:
|
||||||
ConfigProvider *configProvider;
|
ConfigProvider *configProvider;
|
||||||
CalculationEngine calcEngine;
|
CalculationEngine calcEngine;
|
||||||
QString calculationresult;
|
QString calculationresult;
|
||||||
@ -66,10 +66,10 @@ class Window : public QWidget
|
|||||||
void addCalcResult(const QString & expression);
|
void addCalcResult(const QString & expression);
|
||||||
void initTreeWidgets();
|
void initTreeWidgets();
|
||||||
QStringList generatePATHSuggestions(const QString &text);
|
QStringList generatePATHSuggestions(const QString &text);
|
||||||
private slots:
|
private slots:
|
||||||
void lineEditReturnPressed();
|
void lineEditReturnPressed();
|
||||||
void showCalculationResultContextMenu(const QPoint &point);
|
void showCalculationResultContextMenu(const QPoint &point);
|
||||||
public:
|
public:
|
||||||
Window(ConfigProvider &configProvider);
|
Window(ConfigProvider &configProvider);
|
||||||
void setSystemConfig(const QVector<EntryConfig> &config);
|
void setSystemConfig(const QVector<EntryConfig> &config);
|
||||||
bool eventFilter(QObject *obj, QEvent *event);
|
bool eventFilter(QObject *obj, QEvent *event);
|
||||||
|
Loading…
Reference in New Issue
Block a user