Skip to content

Commit

Permalink
Windows fixes and editing and adding functionality.
Browse files Browse the repository at this point in the history
Merge branch 'rdoeffinger-master'
  • Loading branch information
annejan committed Mar 29, 2015
2 parents 9e148fe + 1fe14ea commit 04a5ba4
Show file tree
Hide file tree
Showing 29 changed files with 1,907 additions and 199 deletions.
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ TODO
----
1. ~~non-blocking actions~~
2. ~~multi-lingual~~
3. filtering and autocomplete
4. edit, insert
3. ~~filtering and autocomplete~~
5. gpg-id management (per-folder)

Instalation
-----------
On most systems all you need is:
`qmake && make && make install`

On MacOsX:
`qmake && make && macdeployqt QtPass.app -dmg `

Further reading
---------------
[Documentation](http://ijhack.github.io/qtpass/)

[Source code](https://github.com/IJHack/qtpass)
41 changes: 40 additions & 1 deletion dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Dialog::Dialog(QWidget *parent) :
*/
Dialog::~Dialog()
{
delete ui;
}

/**
Expand Down Expand Up @@ -215,6 +214,8 @@ void Dialog::on_checkBoxClipboard_clicked()
{
if (ui->checkBoxClipboard->isChecked()) {
ui->checkBoxAutoclear->setEnabled(true);
ui->checkBoxHidePassword->setEnabled(true);
ui->checkBoxHideContent->setEnabled(true);
if (ui->checkBoxAutoclear->isChecked()) {
ui->spinBoxAutoclearSeconds->setEnabled(true);
ui->labelSeconds->setEnabled(true);
Expand All @@ -226,6 +227,8 @@ void Dialog::on_checkBoxClipboard_clicked()
ui->checkBoxAutoclear->setEnabled(false);
ui->spinBoxAutoclearSeconds->setEnabled(false);
ui->labelSeconds->setEnabled(false);
ui->checkBoxHidePassword->setEnabled(false);
ui->checkBoxHideContent->setEnabled(false);
}
}

Expand Down Expand Up @@ -291,3 +294,39 @@ void Dialog::on_checkBoxAutoclear_clicked()
{
on_checkBoxClipboard_clicked();
}

/**
* @brief Dialog::hidePassword
* @return
*/
bool Dialog::hidePassword()
{
return ui->checkBoxHidePassword->isChecked();
}

/**
* @brief Dialog::hideContent
* @return
*/
bool Dialog::hideContent()
{
return ui->checkBoxHideContent->isChecked();
}

/**
* @brief Dialog::hidePassword
* @param hidePassword
*/
void Dialog::hidePassword(bool hidePassword)
{
ui->checkBoxHidePassword->setChecked(hidePassword);
}

/**
* @brief Dialog::hideContent
* @param hideContent
*/
void Dialog::hideContent(bool hideContent)
{
ui->checkBoxHideContent->setChecked(hideContent);
}
6 changes: 5 additions & 1 deletion dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ class Dialog : public QDialog
void useClipboard(bool);
void useAutoclear(bool);
void setAutoclear(int);
void hidePassword(bool);
void hideContent(bool);
QString getPassPath();
QString getGitPath();
QString getGpgPath();
Expand All @@ -31,6 +33,8 @@ class Dialog : public QDialog
bool useClipboard();
bool useAutoclear();
int getAutoclear();
bool hidePassword();
bool hideContent();

private slots:
void on_radioButtonNative_clicked();
Expand All @@ -45,7 +49,7 @@ private slots:
void on_checkBoxAutoclear_clicked();

private:
Ui::Dialog *ui;
QScopedPointer<Ui::Dialog> ui;
void setGroupBoxState();
QString selectExecutable();
QString selectFolder();
Expand Down
70 changes: 42 additions & 28 deletions dialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>469</width>
<height>370</height>
<width>507</width>
<height>446</height>
</rect>
</property>
<property name="windowTitle">
Expand All @@ -20,9 +20,6 @@
<string>Pass</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="1">
<widget class="QLineEdit" name="passPath"/>
</item>
<item row="0" column="2">
<widget class="QToolButton" name="toolButtonPass">
<property name="text">
Expand All @@ -37,6 +34,9 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="passPath"/>
</item>
</layout>
</widget>
</item>
Expand Down Expand Up @@ -101,13 +101,23 @@
</item>
</layout>
</item>
<item row="5" column="0">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Other</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<widget class="QLabel" name="labelStorePath">
Expand All @@ -116,59 +126,63 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="storePath"/>
</item>
<item row="0" column="2">
<widget class="QToolButton" name="toolButtonStore">
<property name="text">
<string>...</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="storePath"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<item row="1" column="0">
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="0">
<widget class="QCheckBox" name="checkBoxClipboard">
<property name="text">
<string>Clipboard</string>
</property>
</widget>
</item>
<item>
<item row="0" column="1">
<widget class="QCheckBox" name="checkBoxAutoclear">
<property name="text">
<string>Autoclear</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBoxAutoclearSeconds"/>
</item>
<item>
<item row="0" column="3">
<widget class="QLabel" name="labelSeconds">
<property name="text">
<string>Seconds</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QSpinBox" name="spinBoxAutoclearSeconds"/>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="checkBoxHidePassword">
<property name="text">
<string>Hide password</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="checkBoxHideContent">
<property name="text">
<string>Hide content</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="5" column="0">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
Expand Down
Loading

0 comments on commit 04a5ba4

Please sign in to comment.