summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-01 14:36:05 (UTC)
committer zautrix <zautrix>2005-03-01 14:36:05 (UTC)
commit611f97f6d17f6c4e1944ffe39cd74d2a4cd1f2ae (patch) (unidiff)
treebeeb9aebeec2d6829f0c7342ed290e16d56c19b3
parent81e2fbd0c031a3db209de68c190ddf4c0350d14a (diff)
downloadkdepimpi-611f97f6d17f6c4e1944ffe39cd74d2a4cd1f2ae.zip
kdepimpi-611f97f6d17f6c4e1944ffe39cd74d2a4cd1f2ae.tar.gz
kdepimpi-611f97f6d17f6c4e1944ffe39cd74d2a4cd1f2ae.tar.bz2
tab fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/addentrywnd_emb.cpp7
-rw-r--r--pwmanager/pwmanager/commentbox.cpp1
-rw-r--r--pwmanager/pwmanager/pwm.cpp2
-rw-r--r--pwmanager/pwmanager/pwmview.cpp1
-rw-r--r--pwmanager/pwmanager/pwmviewstyle.cpp11
-rw-r--r--pwmanager/pwmanager/pwmviewstyle.h11
6 files changed, 30 insertions, 3 deletions
diff --git a/pwmanager/pwmanager/addentrywnd_emb.cpp b/pwmanager/pwmanager/addentrywnd_emb.cpp
index f065058..c2590f0 100644
--- a/pwmanager/pwmanager/addentrywnd_emb.cpp
+++ b/pwmanager/pwmanager/addentrywnd_emb.cpp
@@ -166,12 +166,19 @@ addEntryWnd::addEntryWnd( PwMDoc* d, QWidget* parent, const char* name)
166 166
167 mTabWidget->addTab( tab3, i18n( "&Launcher" ) ); 167 mTabWidget->addTab( tab3, i18n( "&Launcher" ) );
168 168
169 // signals and slots connections 169 // signals and slots connections
170 connect( generateButton, SIGNAL( clicked() ), this, SLOT( generateButton_slot() ) ); 170 connect( generateButton, SIGNAL( clicked() ), this, SLOT( generateButton_slot() ) );
171 connect( revealButton, SIGNAL( toggled(bool) ), this, SLOT( revealButton_slot() ) ); 171 connect( revealButton, SIGNAL( toggled(bool) ), this, SLOT( revealButton_slot() ) );
172
173#if 0
174 if ( QApplication::desktop()->width() <= 640 && QApplication::desktop()->width() >= 480 ) {
175 resize ( 440, 400 );
176 }
177#endif
178
172} 179}
173 180
174/* 181/*
175 * Destroys the object and frees any allocated resources 182 * Destroys the object and frees any allocated resources
176 */ 183 */
177addEntryWnd::~addEntryWnd() 184addEntryWnd::~addEntryWnd()
diff --git a/pwmanager/pwmanager/commentbox.cpp b/pwmanager/pwmanager/commentbox.cpp
index e2d2d2b..0f32561 100644
--- a/pwmanager/pwmanager/commentbox.cpp
+++ b/pwmanager/pwmanager/commentbox.cpp
@@ -229,12 +229,13 @@ QSize CommentBox::size()
229 229
230CommentBox::CommentBox(QWidget *_parentWidget) 230CommentBox::CommentBox(QWidget *_parentWidget)
231 : QMultiLineEdit(_parentWidget) 231 : QMultiLineEdit(_parentWidget)
232 232
233{ 233{
234 this->setReadOnly(true); 234 this->setReadOnly(true);
235 setFocusPolicy( QWidget::ClickFocus );
235} 236}
236 237
237CommentBox::~CommentBox() 238CommentBox::~CommentBox()
238{ 239{
239} 240}
240 241
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp
index fc6837f..aed8ec0 100644
--- a/pwmanager/pwmanager/pwm.cpp
+++ b/pwmanager/pwmanager/pwm.cpp
@@ -656,12 +656,13 @@ void PwM::addPwd_slot1(QString *pw, PwMDoc *_doc)
656 } 656 }
657 w.setCurrCategory(view->getCurrentCategory()); 657 w.setCurrCategory(view->getCurrentCategory());
658 if (pw) 658 if (pw)
659 w.pwLineEdit->setText(*pw); 659 w.pwLineEdit->setText(*pw);
660 660
661 tryAgain: 661 tryAgain:
662 w.descLineEdit->setFocus();
662 if (w.exec() == 1) 663 if (w.exec() == 1)
663 { 664 {
664 PwMDataItem d; 665 PwMDataItem d;
665 666
666 //US BUG: to initialize all values of curEntr with meaningfulldata, 667 //US BUG: to initialize all values of curEntr with meaningfulldata,
667 // we call clear on it. Reason: Metadata will be uninitialized otherwise. 668 // we call clear on it. Reason: Metadata will be uninitialized otherwise.
@@ -756,12 +757,13 @@ void PwM::editPwd_slot3(const QString *category, const int *index,
756 w.setDescription(currItem.desc.c_str()); 757 w.setDescription(currItem.desc.c_str());
757 w.setUsername(currItem.name.c_str()); 758 w.setUsername(currItem.name.c_str());
758 w.setPassword(currItem.pw.c_str()); 759 w.setPassword(currItem.pw.c_str());
759 w.setUrl(currItem.url.c_str()); 760 w.setUrl(currItem.url.c_str());
760 w.setLauncher(currItem.launcher.c_str()); 761 w.setLauncher(currItem.launcher.c_str());
761 w.setComment(currItem.comment.c_str()); 762 w.setComment(currItem.comment.c_str());
763 w.descLineEdit->setFocus();
762 if (w.exec() == 1) { 764 if (w.exec() == 1) {
763 currItem.desc = w.getDescription().latin1(); 765 currItem.desc = w.getDescription().latin1();
764 currItem.name = w.getUsername().latin1(); 766 currItem.name = w.getUsername().latin1();
765 currItem.pw = w.getPassword().latin1(); 767 currItem.pw = w.getPassword().latin1();
766 currItem.comment = w.getComment().latin1(); 768 currItem.comment = w.getComment().latin1();
767 currItem.url = w.getUrl().latin1(); 769 currItem.url = w.getUrl().latin1();
diff --git a/pwmanager/pwmanager/pwmview.cpp b/pwmanager/pwmanager/pwmview.cpp
index 8c4d9cc..7f7dd6f 100644
--- a/pwmanager/pwmanager/pwmview.cpp
+++ b/pwmanager/pwmanager/pwmview.cpp
@@ -62,12 +62,13 @@ PwMView::PwMView(PwM *_mainClass,
62 mainClass = _mainClass; 62 mainClass = _mainClass;
63 resize(_mainClass->size()); 63 resize(_mainClass->size());
64 initStyle(conf()->confWndMainViewStyle()); 64 initStyle(conf()->confWndMainViewStyle());
65 initCtxMenu(); 65 initCtxMenu();
66 doc->setCurrentView(this); 66 doc->setCurrentView(this);
67 connect(doc, SIGNAL(dataChanged(PwMDoc *)), this, SLOT(updateView())); 67 connect(doc, SIGNAL(dataChanged(PwMDoc *)), this, SLOT(updateView()));
68 connect(this, SIGNAL(editPW()), mainClass, SLOT(editPwd_slot()));
68} 69}
69 70
70PwMView::~PwMView() 71PwMView::~PwMView()
71{ 72{
72} 73}
73 74
diff --git a/pwmanager/pwmanager/pwmviewstyle.cpp b/pwmanager/pwmanager/pwmviewstyle.cpp
index 0af1473..5f25880 100644
--- a/pwmanager/pwmanager/pwmviewstyle.cpp
+++ b/pwmanager/pwmanager/pwmviewstyle.cpp
@@ -58,12 +58,18 @@ PwMViewStyle::~PwMViewStyle()
58 PWMPrefs::instance()->writeConfig(); 58 PWMPrefs::instance()->writeConfig();
59 59
60 delete_ifnot_null(s0); 60 delete_ifnot_null(s0);
61 delete_ifnot_null(s1); 61 delete_ifnot_null(s1);
62} 62}
63 63
64void PwMViewStyle::editPassWord( QListViewItem * i )
65{
66 if ( !i )
67 return;
68 emit editPW();
69}
64void PwMViewStyle::initStyle(style_t style) 70void PwMViewStyle::initStyle(style_t style)
65{ 71{
66 printDebug(string("initializing style ") + tostr(style)); 72 printDebug(string("initializing style ") + tostr(style));
67 bool wasMaximized = v->isMaximized(); 73 bool wasMaximized = v->isMaximized();
68 if (v->isVisible()) 74 if (v->isVisible())
69 v->hide(); 75 v->hide();
@@ -90,12 +96,17 @@ void PwMViewStyle::initStyle(style_t style)
90 connect(lv, SIGNAL(pressed(QListViewItem *)), 96 connect(lv, SIGNAL(pressed(QListViewItem *)),
91 v, SLOT(handleToggle(QListViewItem *))); 97 v, SLOT(handleToggle(QListViewItem *)));
92 connect(lv, SIGNAL(rightButtonClicked(QListViewItem *, const QPoint &, int)), 98 connect(lv, SIGNAL(rightButtonClicked(QListViewItem *, const QPoint &, int)),
93 v, SLOT(handleRightClick(QListViewItem *, const QPoint &, int))); 99 v, SLOT(handleRightClick(QListViewItem *, const QPoint &, int)));
94 connect(lv, SIGNAL(clicked(QListViewItem *)), 100 connect(lv, SIGNAL(clicked(QListViewItem *)),
95 v, SLOT(refreshCommentTextEdit(QListViewItem *))); 101 v, SLOT(refreshCommentTextEdit(QListViewItem *)));
102 connect(lv, SIGNAL(returnPressed(QListViewItem *)),
103 this, SLOT(editPassWord(QListViewItem *)));
104 connect(lv, SIGNAL(doubleClicked(QListViewItem *)),
105 this, SLOT(editPassWord(QListViewItem *)));
106
96 lv->addColumn(i18n("Description"), 180); 107 lv->addColumn(i18n("Description"), 180);
97 lv->addColumn(i18n("Username"), 150); 108 lv->addColumn(i18n("Username"), 150);
98 lv->addColumn(i18n("Password"), 150); 109 lv->addColumn(i18n("Password"), 150);
99 lv->addColumn(i18n("URL"), 180); 110 lv->addColumn(i18n("URL"), 180);
100 lv->addColumn(i18n("Launcher"), 120); 111 lv->addColumn(i18n("Launcher"), 120);
101 v->tmpReEnableSort(); 112 v->tmpReEnableSort();
diff --git a/pwmanager/pwmanager/pwmviewstyle.h b/pwmanager/pwmanager/pwmviewstyle.h
index bf5ce91..5656cbc 100644
--- a/pwmanager/pwmanager/pwmviewstyle.h
+++ b/pwmanager/pwmanager/pwmviewstyle.h
@@ -39,12 +39,13 @@
39#include <qsize.h> 39#include <qsize.h>
40 40
41class ListViewPwM; 41class ListViewPwM;
42class PwMViewStyle_0; 42class PwMViewStyle_0;
43class PwMViewStyle_1; 43class PwMViewStyle_1;
44class PwMView; 44class PwMView;
45class QListViewItem;
45class CommentBox; 46class CommentBox;
46 47
47class PwMViewStyle : public QWidget 48class PwMViewStyle : public QWidget
48{ 49{
49 Q_OBJECT 50 Q_OBJECT
50 51
@@ -86,23 +87,27 @@ protected:
86 * This value dosn't say anything about the number of 87 * This value dosn't say anything about the number of
87 * categories in the document. 88 * categories in the document.
88 */ 89 */
89 int numCategories(); 90 int numCategories();
90 /** resize the view */ 91 /** resize the view */
91 void resizeView(const QSize &size); 92 void resizeView(const QSize &size);
93 ListViewPwM *lv;
94 CommentBox *commentBox;
95
96protected slots:
97 void editPassWord( QListViewItem * );
92 98
93private: 99private:
94 /** which style has the view? 100 /** which style has the view?
95 * KListBox on the left, 101 * KListBox on the left,
96 * or QComboBox on the top? 102 * or QComboBox on the top?
97 */ 103 */
98 style_t curStyle; 104 style_t curStyle;
99 105
100 PwMViewStyle_0 *s0; 106 PwMViewStyle_0 *s0;
101 PwMViewStyle_1 *s1; 107 PwMViewStyle_1 *s1;
102 PwMView *v; 108 PwMView *v;
109 signals:
110 void editPW();
103 111
104protected:
105 ListViewPwM *lv;
106 CommentBox *commentBox;
107}; 112};
108#endif 113#endif