Fixed show/hide bug while window locked
This commit is contained in:
parent
0ebfae4da2
commit
9bae66a55b
3 changed files with 21 additions and 2 deletions
|
|
@ -66,7 +66,9 @@ public:
|
||||||
|
|
||||||
/** handy way to flip all the flags at once */
|
/** handy way to flip all the flags at once */
|
||||||
void setModified(bool modified = true);
|
void setModified(bool modified = true);
|
||||||
|
/** flips menus in locking situation */
|
||||||
|
void setLocked();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/** save general Options like all bar positions and status as well as the geometry and the recent file list to the configuration
|
/** save general Options like all bar positions and status as well as the geometry and the recent file list to the configuration
|
||||||
* file
|
* file
|
||||||
|
|
@ -224,3 +226,4 @@ private:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,10 @@
|
||||||
#include "kpasman.h"
|
#include "kpasman.h"
|
||||||
#include "kpasentrydlg.h"
|
#include "kpasentrydlg.h"
|
||||||
|
|
||||||
KpasmanView::KpasmanView(QWidget *parent, const char* name) : QListView(parent, name){
|
KpasmanView::KpasmanView(QWidget *parent, const char* name) : QListView(parent, name)
|
||||||
|
{
|
||||||
|
m_parent = (KpasmanApp*)parent;
|
||||||
|
|
||||||
setBackgroundMode( PaletteBase );
|
setBackgroundMode( PaletteBase );
|
||||||
setAllColumnsShowFocus(true);
|
setAllColumnsShowFocus(true);
|
||||||
|
|
||||||
|
|
@ -54,6 +57,12 @@ void KpasmanView::hidePassword(bool mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
void KpasmanView::lockWindow(bool mode)
|
void KpasmanView::lockWindow(bool mode)
|
||||||
|
{
|
||||||
|
lockWindowMode(mode);
|
||||||
|
m_parent->setLocked();
|
||||||
|
}
|
||||||
|
|
||||||
|
void KpasmanView::lockWindowMode(bool mode)
|
||||||
{
|
{
|
||||||
if (mode && !m_bLocked) {
|
if (mode && !m_bLocked) {
|
||||||
if (getDocument()->lock()) {
|
if (getDocument()->lock()) {
|
||||||
|
|
@ -180,3 +189,5 @@ void KpasmanView::mousePressEvent(QMouseEvent* event)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
#include <qlistview.h>
|
#include <qlistview.h>
|
||||||
#include <qwidget.h>
|
#include <qwidget.h>
|
||||||
|
|
||||||
|
class KpasmanApp;
|
||||||
class KpasmanDoc;
|
class KpasmanDoc;
|
||||||
|
|
||||||
/** The KpasmanView class provides the view widget for the KpasmanApp instance.
|
/** The KpasmanView class provides the view widget for the KpasmanApp instance.
|
||||||
|
|
@ -47,6 +48,7 @@ public:
|
||||||
|
|
||||||
/** locks/unlocks the window */
|
/** locks/unlocks the window */
|
||||||
void lockWindow(bool mode);
|
void lockWindow(bool mode);
|
||||||
|
void lockWindowMode(bool mode);
|
||||||
/** returns if window is locked */
|
/** returns if window is locked */
|
||||||
bool isLocked() {return m_bLocked;};
|
bool isLocked() {return m_bLocked;};
|
||||||
|
|
||||||
|
|
@ -72,6 +74,7 @@ protected:
|
||||||
void mousePressEvent(QMouseEvent* event);
|
void mousePressEvent(QMouseEvent* event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
KpasmanApp* m_parent;
|
||||||
/** stores password column number */
|
/** stores password column number */
|
||||||
int m_iPWColumn;
|
int m_iPWColumn;
|
||||||
/** stores whether or not the password column is "hidden" */
|
/** stores whether or not the password column is "hidden" */
|
||||||
|
|
@ -86,3 +89,5 @@ private:
|
||||||
|
|
||||||
#endif // KPASMANVIEW_H
|
#endif // KPASMANVIEW_H
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue