Diffstat (limited to 'pwmanager/pwmanager/pwmviewstyle.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | pwmanager/pwmanager/pwmviewstyle.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/pwmanager/pwmanager/pwmviewstyle.cpp b/pwmanager/pwmanager/pwmviewstyle.cpp index ee35472..b6d930f 100644 --- a/pwmanager/pwmanager/pwmviewstyle.cpp +++ b/pwmanager/pwmanager/pwmviewstyle.cpp | |||
@@ -48,74 +48,74 @@ PwMViewStyle::~PwMViewStyle() | |||
48 | s0->saveSettings(PWMPrefs::instance()); | 48 | s0->saveSettings(PWMPrefs::instance()); |
49 | break; | 49 | break; |
50 | case style_1: | 50 | case style_1: |
51 | s1->saveSettings(PWMPrefs::instance()); | 51 | s1->saveSettings(PWMPrefs::instance()); |
52 | break; | 52 | break; |
53 | default: | 53 | default: |
54 | BUG(); | 54 | BUG(); |
55 | } | 55 | } |
56 | 56 | ||
57 | 57 | ||
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 | ||
64 | void PwMViewStyle::editPassWord( QListViewItem * i ) | 64 | void PwMViewStyle::editPassWord( Q3ListViewItem * i ) |
65 | { | 65 | { |
66 | if ( !i ) | 66 | if ( !i ) |
67 | return; | 67 | return; |
68 | emit editPW(); | 68 | emit editPW(); |
69 | } | 69 | } |
70 | void PwMViewStyle::initStyle(style_t style) | 70 | void PwMViewStyle::initStyle(style_t style) |
71 | { | 71 | { |
72 | printDebug(string("initializing style ") + tostr(style)); | 72 | printDebug(string("initializing style ") + tostr(style)); |
73 | bool wasMaximized = v->isMaximized(); | 73 | bool wasMaximized = v->isMaximized(); |
74 | if (v->isVisible()) | 74 | if (v->isVisible()) |
75 | v->hide(); | 75 | v->hide(); |
76 | switch (style) { | 76 | switch (style) { |
77 | case style_0: | 77 | case style_0: |
78 | delete_ifnot_null(s0); | 78 | delete_ifnot_null(s0); |
79 | delete_ifnot_null(s1); | 79 | delete_ifnot_null(s1); |
80 | s0 = new PwMViewStyle_0(v); | 80 | s0 = new PwMViewStyle_0(v); |
81 | lv = s0->getLv(); | 81 | lv = s0->getLv(); |
82 | commentBox = s0->getCommentBox(); | 82 | commentBox = s0->getCommentBox(); |
83 | break; | 83 | break; |
84 | case style_1: | 84 | case style_1: |
85 | delete_ifnot_null(s0); | 85 | delete_ifnot_null(s0); |
86 | delete_ifnot_null(s1); | 86 | delete_ifnot_null(s1); |
87 | s1 = new PwMViewStyle_1(v); | 87 | s1 = new PwMViewStyle_1(v); |
88 | lv = s1->getLv(); | 88 | lv = s1->getLv(); |
89 | commentBox = s1->getCommentBox(); | 89 | commentBox = s1->getCommentBox(); |
90 | break; | 90 | break; |
91 | default: | 91 | default: |
92 | BUG(); | 92 | BUG(); |
93 | return; | 93 | return; |
94 | } | 94 | } |
95 | curStyle = style; | 95 | curStyle = style; |
96 | connect(lv, SIGNAL(pressed(QListViewItem *)), | 96 | connect(lv, SIGNAL(pressed(Q3ListViewItem *)), |
97 | v, SLOT(handleToggle(QListViewItem *))); | 97 | v, SLOT(handleToggle(Q3ListViewItem *))); |
98 | connect(lv, SIGNAL(rightButtonClicked(QListViewItem *, const QPoint &, int)), | 98 | connect(lv, SIGNAL(rightButtonClicked(Q3ListViewItem *, const QPoint &, int)), |
99 | v, SLOT(handleRightClick(QListViewItem *, const QPoint &, int))); | 99 | v, SLOT(handleRightClick(Q3ListViewItem *, const QPoint &, int))); |
100 | connect(lv, SIGNAL(clicked(QListViewItem *)), | 100 | connect(lv, SIGNAL(clicked(Q3ListViewItem *)), |
101 | v, SLOT(refreshCommentTextEdit(QListViewItem *))); | 101 | v, SLOT(refreshCommentTextEdit(Q3ListViewItem *))); |
102 | connect(lv, SIGNAL(returnPressed(QListViewItem *)), | 102 | connect(lv, SIGNAL(returnPressed(Q3ListViewItem *)), |
103 | this, SLOT(editPassWord(QListViewItem *))); | 103 | this, SLOT(editPassWord(Q3ListViewItem *))); |
104 | connect(lv, SIGNAL(doubleClicked(QListViewItem *)), | 104 | connect(lv, SIGNAL(doubleClicked(Q3ListViewItem *)), |
105 | this, SLOT(editPassWord(QListViewItem *))); | 105 | this, SLOT(editPassWord(Q3ListViewItem *))); |
106 | connect(lv, SIGNAL(insertPW()), | 106 | connect(lv, SIGNAL(insertPW()), |
107 | this, SIGNAL( insertPW() )); | 107 | this, SIGNAL( insertPW() )); |
108 | connect(lv, SIGNAL(deletePW()), | 108 | connect(lv, SIGNAL(deletePW()), |
109 | this, SIGNAL( deletePW() )); | 109 | this, SIGNAL( deletePW() )); |
110 | 110 | ||
111 | lv->addColumn(i18n("Description"), 180); | 111 | lv->addColumn(i18n("Description"), 180); |
112 | lv->addColumn(i18n("Username"), 150); | 112 | lv->addColumn(i18n("Username"), 150); |
113 | lv->addColumn(i18n("Password"), 150); | 113 | lv->addColumn(i18n("Password"), 150); |
114 | lv->addColumn(i18n("URL"), 180); | 114 | lv->addColumn(i18n("URL"), 180); |
115 | lv->addColumn(i18n("Launcher"), 120); | 115 | lv->addColumn(i18n("Launcher"), 120); |
116 | v->tmpReEnableSort(); | 116 | v->tmpReEnableSort(); |
117 | 117 | ||
118 | //US ENH : load the size of the listviewcolumns | 118 | //US ENH : load the size of the listviewcolumns |
119 | switch (curStyle) | 119 | switch (curStyle) |
120 | { | 120 | { |
121 | case style_0: | 121 | case style_0: |
@@ -236,19 +236,19 @@ void PwMViewStyle::selectCategory(const QString &cat) | |||
236 | 236 | ||
237 | int PwMViewStyle::numCategories() | 237 | int PwMViewStyle::numCategories() |
238 | { | 238 | { |
239 | switch (curStyle) { | 239 | switch (curStyle) { |
240 | case style_0: | 240 | case style_0: |
241 | PWM_ASSERT(s0); | 241 | PWM_ASSERT(s0); |
242 | return s0->numCategories(); | 242 | return s0->numCategories(); |
243 | case style_1: | 243 | case style_1: |
244 | PWM_ASSERT(s1); | 244 | PWM_ASSERT(s1); |
245 | return s1->numCategories(); | 245 | return s1->numCategories(); |
246 | default: | 246 | default: |
247 | BUG(); | 247 | BUG(); |
248 | } | 248 | } |
249 | return 0; | 249 | return 0; |
250 | } | 250 | } |
251 | 251 | ||
252 | #ifndef PWM_EMBEDDED | 252 | #ifndef PWM_EMBEDDED_ |
253 | #include "pwmviewstyle.moc" | 253 | #include "moc_pwmviewstyle.cpp" |
254 | #endif | 254 | #endif |