formating fixes / copyright update...
This commit is contained in:
parent
fe5b358ace
commit
d6ec7a7e1c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Albert S. <mail at quitesimple dot org>
|
||||
* Copyright (c) 2018-2019 Albert S. <mail at quitesimple dot org>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Albert S. <mail at quitesimple dot org>
|
||||
* Copyright (c) 2018-2019 Albert S. <mail at quitesimple dot org>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Albert S. <mail at quitesimple dot org>
|
||||
* Copyright (c) 2018-2019 Albert S. <mail at quitesimple dot org>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@ -87,12 +87,8 @@ EntryConfig ConfigReader::readFromDesktopFile(const QString &path)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
2
config.h
2
config.h
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Albert S. <mail at quitesimple dot org>
|
||||
* Copyright (c) 2018-2019 Albert S. <mail at quitesimple dot org>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Albert S. <mail at quitesimple dot org>
|
||||
* Copyright (c) 2018-2019 Albert S. <mail at quitesimple dot org>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Albert S. <mail at quitesimple dot org>
|
||||
* Copyright (c) 2018-2019 Albert S. <mail at quitesimple dot org>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
2
main.cpp
2
main.cpp
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Albert S. <mail at quitesimple dot org>
|
||||
* Copyright (c) 2018-2019 Albert S. <mail at quitesimple dot org>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
20
window.cpp
20
window.cpp
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Albert S. <mail at quitesimple dot org>
|
||||
* Copyright (c) 2018-2019 Albert S. <mail at quitesimple dot org>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@ -43,8 +43,6 @@ Window::Window(ConfigProvider &configProvider)
|
||||
calculationResultLabel.setAlignment(Qt::AlignCenter);
|
||||
calculationResultLabel.setContextMenuPolicy(Qt::ContextMenuPolicy::CustomContextMenu);
|
||||
connect(&calculationResultLabel, &QLabel::customContextMenuRequested, this, &Window::showCalculationResultContextMenu);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Window::~Window()
|
||||
@ -53,9 +51,6 @@ Window::~Window()
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void Window::initFromConfig()
|
||||
{
|
||||
try
|
||||
@ -233,11 +228,9 @@ void Window::lineEditTextChanged(QString text)
|
||||
QString input = text.mid(1);
|
||||
if(text[0] == '=')
|
||||
{
|
||||
|
||||
addCalcResult(input);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
filterGridFor(text);
|
||||
@ -246,7 +239,6 @@ void Window::lineEditTextChanged(QString text)
|
||||
addPATHSuggestion(text);
|
||||
if(this->grid->count() == 0)
|
||||
{
|
||||
|
||||
QStringList arguments = text.split(" ");
|
||||
EntryConfig e;
|
||||
e.name = "Execute: " + text;
|
||||
@ -273,7 +265,6 @@ void Window::keyReleaseEvent(QKeyEvent *event)
|
||||
{
|
||||
button->showName();
|
||||
}
|
||||
|
||||
}
|
||||
QWidget::keyReleaseEvent(event);
|
||||
|
||||
@ -288,20 +279,17 @@ void Window::keyPressEvent(QKeyEvent *event)
|
||||
|
||||
if(event->modifiers() & Qt::ControlModifier && buttonsInGrid.count() > 0)
|
||||
{
|
||||
|
||||
if(event->key() == Qt::Key_L)
|
||||
{
|
||||
this->lineEdit->setFocus();
|
||||
this->lineEdit->selectAll();
|
||||
}
|
||||
|
||||
|
||||
for(EntryPushButton *button : buttonsInGrid)
|
||||
{
|
||||
button->showShortcut();
|
||||
}
|
||||
|
||||
|
||||
QKeySequence seq(event->key());
|
||||
QString key = seq.toString().toLower();
|
||||
|
||||
@ -394,12 +382,8 @@ void Window::setSystemConfig(const QVector<EntryConfig> &config)
|
||||
this->systemEntryButtons = generateEntryButtons(config);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool Window::eventFilter(QObject *obj, QEvent *event)
|
||||
{
|
||||
|
||||
if(obj == this->lineEdit)
|
||||
{
|
||||
if (event->type() == QEvent::KeyPress)
|
||||
@ -413,14 +397,12 @@ bool Window::eventFilter(QObject *obj, QEvent *event)
|
||||
this->lineEdit->setText(suggestions[0] + " ");
|
||||
this->lineEdit->setCursorPosition(this->lineEdit->text().length()+1);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return QObject::eventFilter(obj, event);
|
||||
|
||||
}
|
||||
|
||||
void Window::focusInput()
|
||||
|
2
window.h
2
window.h
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Albert S. <mail at quitesimple dot org>
|
||||
* Copyright (c) 2018-2019 Albert S. <mail at quitesimple dot org>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
Loading…
Reference in New Issue
Block a user