summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnne Jan Brouwer <brouwer@annejan.com>2016-10-18 15:20:58 +0200
committerAnne Jan Brouwer <brouwer@annejan.com>2016-10-18 15:20:58 +0200
commit29385ceb731ce943699904d1c6a3c419f0a24c47 (patch)
treec17ac7e6c83b83e01fbeed2a5cc5a09cca412071
parentff4b585f3595509aa0e1ad450af7c524747ffc1a (diff)
Missing documentation
-rw-r--r--Doxyfile2
-rw-r--r--mainwindow.h28
-rw-r--r--qprogressindicator.cpp32
-rw-r--r--qprogressindicator.h9
-rw-r--r--singleapplication.h4
-rw-r--r--usersdialog.h36
6 files changed, 102 insertions, 9 deletions
diff --git a/Doxyfile b/Doxyfile
index d046c262..22b7a09c 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -661,7 +661,7 @@ SHOW_FILES = YES
# Folder Tree View (if specified).
# The default value is: YES.
-SHOW_NAMESPACES = NO
+SHOW_NAMESPACES = YES
# The FILE_VERSION_FILTER tag can be used to specify a program or script that
# doxygen should invoke to get the current version for each file (typically from
diff --git a/mainwindow.h b/mainwindow.h
index e4aff0d0..2b2f1463 100644
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -25,8 +25,17 @@ class MainWindow;
\brief Execution queue items for non-interactive ordered execution.
*/
struct execQueueItem {
+ /**
+ * @brief app executable path.
+ */
QString app;
+ /**
+ * @brief args arguments for executable.
+ */
QString args;
+ /**
+ * @brief input stdio input.
+ */
QString input;
};
@@ -37,8 +46,17 @@ struct UserInfo;
\brief holds the Password configuration settings
*/
struct passwordConfiguration {
+ /**
+ * @brief passwordConfiguration::selected character set.
+ */
int selected;
+ /**
+ * @brief passwordConfiguration::length of password.
+ */
int length;
+ /**
+ * @brief passwordConfiguration::Characters the different character sets.
+ */
QString Characters[4];
passwordConfiguration() {
length = 16;
@@ -69,6 +87,12 @@ class MainWindow : public QMainWindow {
enum actionType { GPG, GIT, EDIT, DELETE, GPG_INTERNAL, PWGEN };
public:
+ /**
+ * @brief MainWindow::clipBoardType enum
+ * 0 Never
+ * 1 Always
+ * 2 On demand
+ */
enum clipBoardType {
CLIPBOARD_NEVER = 0,
CLIPBOARD_ALWAYS = 1,
@@ -91,6 +115,10 @@ public:
void config();
void executePassGitInit();
+ /**
+ * @brief MainWindow::pwdConfig instance of passwordConfiguration.
+ * @sa MainWindow::passwordConfiguration
+ */
passwordConfiguration pwdConfig;
protected:
diff --git a/qprogressindicator.cpp b/qprogressindicator.cpp
index f00b084c..009981f3 100644
--- a/qprogressindicator.cpp
+++ b/qprogressindicator.cpp
@@ -1,6 +1,10 @@
#include "qprogressindicator.h"
#include <QPainter>
+/**
+ * @brief QProgressIndicator::QProgressIndicator constructor.
+ * @param parent widget the indicator is placed in.
+ */
QProgressIndicator::QProgressIndicator(QWidget *parent)
: QWidget(parent), m_angle(0), m_timerId(-1), m_delay(40),
m_displayedWhenStopped(false), m_color(Qt::black) {
@@ -52,16 +56,31 @@ void QProgressIndicator::setColor(const QColor &color) {
update();
}
+/**
+ * @brief QProgressIndicator::sizeHint default minimum size.
+ * @return QSize(20, 20)
+ */
QSize QProgressIndicator::sizeHint() const { return QSize(20, 20); }
+/**
+ * @brief QProgressIndicator::heightForWidth square ratio.
+ * @param w requested width
+ * @return w returned height
+ */
int QProgressIndicator::heightForWidth(int w) const { return w; }
+/**
+ * @brief QProgressIndicator::timerEvent do the actual animation.
+ */
void QProgressIndicator::timerEvent(QTimerEvent * /*event*/) {
m_angle = (m_angle + 30) % 360;
update();
}
+/**
+ * @brief QProgressIndicator::paintEvent draw the spinner.
+ */
void QProgressIndicator::paintEvent(QPaintEvent * /*event*/) {
if (!m_displayedWhenStopped && !isAnimated())
return;
@@ -71,22 +90,23 @@ void QProgressIndicator::paintEvent(QPaintEvent * /*event*/) {
QPainter p(this);
p.setRenderHint(QPainter::Antialiasing);
- int outerRadius = (width - 1) * 0.5;
- int innerRadius = (width - 1) * 0.5 * 0.38;
+ int outerRadius = int((width - 1) * 0.5);
+ int innerRadius = int((width - 1) * 0.5 * 0.38);
int capsuleHeight = outerRadius - innerRadius;
- int capsuleWidth = (width > 32) ? capsuleHeight * .23 : capsuleHeight * .35;
+ int capsuleWidth =
+ (width > 32) ? int(capsuleHeight * 0.23) : int(capsuleHeight * 0.35);
int capsuleRadius = capsuleWidth / 2;
for (int i = 0; i < 12; ++i) {
QColor color = m_color;
- color.setAlphaF(1.0f - (i / 12.0f));
+ color.setAlphaF(int(1.0f - (i / 12.0f)));
p.setPen(Qt::NoPen);
p.setBrush(color);
p.save();
p.translate(rect().center());
- p.rotate(m_angle - i * 30.0f);
- p.drawRoundedRect(-capsuleWidth * 0.5, -(innerRadius + capsuleHeight),
+ p.rotate(int(m_angle - i * 30.0f));
+ p.drawRoundedRect(int(-capsuleWidth * 0.5), -(innerRadius + capsuleHeight),
capsuleWidth, capsuleHeight, capsuleRadius,
capsuleRadius);
p.restore();
diff --git a/qprogressindicator.h b/qprogressindicator.h
index b4a8b1b7..f3f61e66 100644
--- a/qprogressindicator.h
+++ b/qprogressindicator.h
@@ -15,9 +15,18 @@
*/
class QProgressIndicator : public QWidget {
Q_OBJECT
+ /**
+ * @brief QProgressIndicator::delay in miliseconds.
+ */
Q_PROPERTY(int delay READ animationDelay WRITE setAnimationDelay)
+ /**
+ * @brief QProgressIndicator::displayedWhenStopped render when not spinning.
+ */
Q_PROPERTY(bool displayedWhenStopped READ isDisplayedWhenStopped WRITE
setDisplayedWhenStopped)
+ /**
+ * @brief QProgressIndicator::color of the component..
+ */
Q_PROPERTY(QColor color READ color WRITE setColor)
public:
diff --git a/singleapplication.h b/singleapplication.h
index ea7b4cf6..59640979 100644
--- a/singleapplication.h
+++ b/singleapplication.h
@@ -22,6 +22,10 @@ public slots:
void receiveMessage();
signals:
+ /**
+ * @brief messageAvailable notification from commandline
+ * @param message args sent to qtpass executable
+ */
void messageAvailable(QString message);
private:
diff --git a/usersdialog.h b/usersdialog.h
index b1f042b2..521bc935 100644
--- a/usersdialog.h
+++ b/usersdialog.h
@@ -20,18 +20,50 @@ class QListWidgetItem;
struct UserInfo {
UserInfo() : validity('-'), have_secret(false), enabled(false) {}
- // see
- // http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob_plain;f=doc/DETAILS
+ /**
+ * @brief UserInfo::fullyValid when validity is f or u.
+ * http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob_plain;f=doc/DETAILS
+ */
bool fullyValid() { return validity == 'f' || validity == 'u'; }
+ /**
+ * @brief UserInfo::marginallyValid when validity is m.
+ * http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob_plain;f=doc/DETAILS
+ */
bool marginallyValid() { return validity == 'm'; }
+ /**
+ * @brief UserInfo::isValid when fullyValid or marginallyValid.
+ */
bool isValid() { return fullyValid() || marginallyValid(); }
+ /**
+ * @brief UserInfo::name full name
+ */
QString name;
+ /**
+ * @brief UserInfo::key_id hexadecimal representation
+ */
QString key_id;
+ /**
+ * @brief UserInfo::validity GnuPG representation of validity
+ * http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob_plain;f=doc/DETAILS
+ */
char validity;
+ /**
+ * @brief UserInfo::have_secret secret key is available
+ * (can decrypt with this key)
+ */
bool have_secret;
+ /**
+ * @brief UserInfo::enabled
+ */
bool enabled;
+ /**
+ * @brief UserInfo::expiry date/time key expires
+ */
QDateTime expiry;
+ /**
+ * @brief UserInfo::created date/time key was created
+ */
QDateTime created;
};