summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/pwmview.h
Side-by-side diff
Diffstat (limited to 'pwmanager/pwmanager/pwmview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwmview.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/pwmanager/pwmanager/pwmview.h b/pwmanager/pwmanager/pwmview.h
index 75cce51..e42b17a 100644
--- a/pwmanager/pwmanager/pwmview.h
+++ b/pwmanager/pwmanager/pwmview.h
@@ -20,48 +20,49 @@
#ifndef PWMVIEW_H
#define PWMVIEW_H
//US ENH: wouldn't it be a good idea if we could use this consts everywhere else.
//US ENH: for examle in listviewpwm.cpp
//US ENH: Because of that I transfer them into the headerfile.
#define COLUMN_DESC 0
#define COLUMN_NAME 1
#define COLUMN_PW 2
#define COLUMN_URL 3
#define COLUMN_LAUNCHER 4
#include "listviewpwm.h"
#include "pwmdoc.h"
#include "pwmviewstyle.h"
#include <kconfig.h>
#include <klocale.h>
#include <kdialogbase.h>
#include <qevent.h>
#include <qfont.h>
#include <qobject.h>
+#include <qtextbrowser.h>
#include <vector>
#include <string>
using std::string;
using std::vector;
class PwM;
class ConfFile;
class PwMStatusBar;
/** View class for PwM */
class PwMView : public PwMViewStyle
{
Q_OBJECT
friend class PwMViewStyle;
public:
/** construtor */
PwMView(PwM *_mainClass, QWidget* parent, PwMDoc *_doc,
const char *name = 0);
/** destructor */
~PwMView();
@@ -128,45 +129,69 @@ protected slots:
void copyPwToClip();
/** copy name to clipboard */
void copyNameToClip();
/** copy desc to clipboard */
void copyDescToClip();
/** copy url to clipboard */
void copyUrlToClip();
/** copy launcher to clipboard */
void copyLauncherToClip();
/** copy comment to clipboard */
void copyCommentToClip();
/** reorganize the "listViewPos" positions in the document
* (for the current category only!)
*/
void reorgLp();
private:
/** document */
PwMDoc *doc;
/** pointer to the main class "PwM" */
PwM *mainClass;
};
+//US ENH basic widget to view an password entry. We need it for the sync stuff.
+//But might be oif interest for other functionalities as well.
+class PwMDataItemView : public QTextBrowser
+{
+ public:
+ PwMDataItemView( QWidget *parent = 0, const char *name = 0 );
+
+ /**
+ Sets the PwMDataItem object. It is displayed immediately.
+
+ @param a The PwMDataItem object.
+ */
+ void setPwMDataItem( const PwMDataItem& a );
+
+ /**
+ Returns the current PwMDataItem object.
+ */
+ PwMDataItem pwmdataitem() const;
+
+ private:
+ PwMDataItem mItem;
+};
+
+
//US ENH we need this chooser when syncing results in a conflict
class PwMDataItemChooser : public KDialogBase
{
Q_OBJECT
public:
PwMDataItemChooser( PwMDataItem loc, PwMDataItem rem, bool takeloc, QWidget *parent = 0, const char *name = 0 );
int executeD( bool local );
private:
int mSyncResult;
private slots:
void slot_remote();
void slot_local();
};
#endif