0.4.00.4.10.4.2
|
Last change
on this file since 440c0cb was
9567d4b,
checked in by Michael Medin <michael@…>, 5 years ago
|
|
2008-05-?? MickeM
- BREAKING CHANGE! -- THe API function NSCLoadPlugin has been changed to take an integer to define the load-status
2008-06-?? MickeM
- BREAKING CHANGE! -- New settings API as well as new WEBConfiguration UI (nothing is finnished yet but I wanted to check things into the SVN since it is a lot of changes now :)
2008-05-14 MickeM
- Fixed memoryleak in the service checker.
I am really sorry I usualy write better code then this.
2008-05-11 MickeM
- BREAKING CHANGE! -- Changed PDH options to a more uniform design:
auto_detect_pdh and dont_use_pdh_index has been removed and instead there is a new method option that takes various values.
|
-
Property mode set to
100644
|
|
File size:
1.1 KB
|
| Line | |
|---|
| 1 | /* |
|---|
| 2 | * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium. |
|---|
| 3 | * |
|---|
| 4 | * See the LICENSE file for terms of use. |
|---|
| 5 | */ |
|---|
| 6 | #include "stdafx.h" |
|---|
| 7 | #include <WPanel> |
|---|
| 8 | |
|---|
| 9 | #include "PanelList.h" |
|---|
| 10 | |
|---|
| 11 | using namespace Wt; |
|---|
| 12 | |
|---|
| 13 | PanelList::PanelList(WContainerWidget *parent) |
|---|
| 14 | : WContainerWidget(parent) |
|---|
| 15 | { } |
|---|
| 16 | |
|---|
| 17 | WPanel *PanelList::addWidget(const WString& text, WWidget *w) |
|---|
| 18 | { |
|---|
| 19 | WPanel *p = new WPanel(); |
|---|
| 20 | p->setTitle(text); |
|---|
| 21 | p->setCentralWidget(w); |
|---|
| 22 | |
|---|
| 23 | addPanel(p); |
|---|
| 24 | |
|---|
| 25 | return p; |
|---|
| 26 | } |
|---|
| 27 | |
|---|
| 28 | void PanelList::addPanel(WPanel *panel) |
|---|
| 29 | { |
|---|
| 30 | panel->setCollapsible(true); |
|---|
| 31 | panel->collapse(); |
|---|
| 32 | |
|---|
| 33 | panel->expandedSS.connect(SLOT(this, PanelList::onExpand)); |
|---|
| 34 | |
|---|
| 35 | WContainerWidget::addWidget(panel); |
|---|
| 36 | } |
|---|
| 37 | |
|---|
| 38 | void PanelList::onExpand(bool notUndo) |
|---|
| 39 | { |
|---|
| 40 | WPanel *panel = dynamic_cast<WPanel *>(sender()); |
|---|
| 41 | |
|---|
| 42 | if (notUndo) { |
|---|
| 43 | wasExpanded_ = -1; |
|---|
| 44 | |
|---|
| 45 | for (unsigned i = 0; i < children().size(); ++i) { |
|---|
| 46 | WPanel *p = dynamic_cast<WPanel *>(children()[i]); |
|---|
| 47 | if (p != panel) { |
|---|
| 48 | if (!p->isCollapsed()) |
|---|
| 49 | wasExpanded_ = i; |
|---|
| 50 | p->collapse(); |
|---|
| 51 | } |
|---|
| 52 | } |
|---|
| 53 | } else { |
|---|
| 54 | if (wasExpanded_ != -1) { |
|---|
| 55 | WPanel *p = dynamic_cast<WPanel *>(children()[wasExpanded_]); |
|---|
| 56 | p->expand(); |
|---|
| 57 | } |
|---|
| 58 | } |
|---|
| 59 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.