Diffstat (limited to 'pwmanager/pwmanager/pwmviewstyle_0.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | pwmanager/pwmanager/pwmviewstyle_0.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pwmanager/pwmanager/pwmviewstyle_0.cpp b/pwmanager/pwmanager/pwmviewstyle_0.cpp index 1fc8a34..d82eb15 100644 --- a/pwmanager/pwmanager/pwmviewstyle_0.cpp +++ b/pwmanager/pwmanager/pwmviewstyle_0.cpp | |||
@@ -58,12 +58,32 @@ PwMViewStyle_0::PwMViewStyle_0(PwMView *view) | |||
58 | view, SLOT(renCatButton_slot())); | 58 | view, SLOT(renCatButton_slot())); |
59 | connect(delCatButton, SIGNAL(clicked()), | 59 | connect(delCatButton, SIGNAL(clicked()), |
60 | view, SLOT(delCatButton_slot())); | 60 | view, SLOT(delCatButton_slot())); |
61 | connect(lv, SIGNAL(toggleOverview()), | ||
62 | this, SLOT(toggleSplitter())); | ||
61 | } | 63 | } |
62 | 64 | ||
63 | PwMViewStyle_0::~PwMViewStyle_0() | 65 | PwMViewStyle_0::~PwMViewStyle_0() |
64 | { | 66 | { |
65 | delete vbox1; | 67 | delete vbox1; |
66 | } | 68 | } |
69 | void PwMViewStyle_0::toggleSplitter() | ||
70 | { | ||
71 | |||
72 | QValueList<int> si = splitter1->sizes(); | ||
73 | splitter1->toggle(); | ||
74 | QValueList<int> si2 = splitter1->sizes(); | ||
75 | //qDebug("PwMViewStyle_0::toggleSplitter() %d %d %d %d", si[0],si[1],si2[0],si2[1] ); | ||
76 | if ( si[0] == si2[0] && si[1] == si2[1] && si2[1] == 1 ) { | ||
77 | int diff = si[0]/2; | ||
78 | if ( diff > 200 ) | ||
79 | diff = 200; | ||
80 | si[0] -= diff; | ||
81 | si[1] += diff; | ||
82 | splitter1->toggle(); | ||
83 | splitter1->setSizes( si ); | ||
84 | } | ||
85 | |||
86 | } | ||
67 | 87 | ||
68 | void PwMViewStyle_0::delCategory(const QString &cat) | 88 | void PwMViewStyle_0::delCategory(const QString &cat) |
69 | { | 89 | { |