void operator()( Wt::WContainerWidget* pcw ) { std::cout << "callback "; auto pMemberTop( new Wt::WText( "member top" ) ); pMemberTop->setStyleClass( "MemmberTop" ); pcw->addWidget( pMemberTop ); m_f( pcw ); auto pMemberBottom( new Wt::WText( "member bottom" ) ); pMemberBottom->setStyleClass( "MemberBottom" ); pcw->addWidget( pMemberBottom ); }
void CSVSortList::initForm() { setStyleClass("t5"); createTitle(); createContent(); createOperate(); }
void AppNodeStar::TemplatePage(Wt::WContainerWidget* pcw, FTemplate f) { std::string sTitle( "NodeStar: Network Infrastructure Data Management" ); setTitle( sTitle ); auto pTitle( new Wt::WText( "NodeStar: Network Infrastructure Data Management" ) ); pTitle->setStyleClass( "MainTitle" ); pcw->addWidget( pTitle ); // should show up to the right of the title if ( this->internalPathMatches( "/auth/signin" ) ) { // don't show sign in status } else { if ( m_pAuth->LoggedIn() ) { //pcw->addWidget( m_pAuth->NewAuthWidget() ); AddLink( pcw, "member", "/auth/signout", "Sign Out" ); AddLink( pcw, "member", "/member/home", "Home" ); } else { AddLink( pcw, "admin", "/auth/signin", "Sign In" ); AddLink( pcw, "default", "/home", "Home" ); } } f( pcw ); }
void operator()( Wt::WContainerWidget* pcw ) { auto pAddresses( new Wt::WText( "Addresses:" ) ); pAddresses->setStyleClass( "MemberShowAddresses" ); pcw->addWidget( pAddresses ); auto p( new ::ShowAddresses( pcw, m_session ) ); }
PaintedSlider::PaintedSlider(WSlider *slider) : WPaintedWidget(), slider_(slider), sliderReleased_(this, "released") { setStyleClass("Wt-slider-bg"); slider_->addStyleClass (std::string("Wt-slider-") + (slider_->orientation() == Orientation::Horizontal ? "h" : "v")); if (slider_->positionScheme() == PositionScheme::Static) { slider_->setPositionScheme(PositionScheme::Relative); slider_->setOffsets(0, Side::Left | Side::Top); } manageWidget(fill_, std::unique_ptr<WInteractWidget>(new WContainerWidget())); manageWidget(handle_, slider_->createHandle()); fill_->setPositionScheme(PositionScheme::Absolute); fill_->setStyleClass("fill"); handle_->setPositionScheme(PositionScheme::Absolute); handle_->setStyleClass("handle"); connectSlots(); }
PaintedSlider::PaintedSlider(WSlider *slider) : WPaintedWidget(), slider_(slider), sliderReleased_(this, "released") { setStyleClass("Wt-slider-bg"); slider_->addStyleClass(std::string("Wt-slider-") + (slider_->orientation() == Horizontal ? "h" : "v")); if (slider_->positionScheme() == Static) { slider_->setPositionScheme(Relative); slider_->setOffsets(0, Left | Top); } addChild(handle_ = new WContainerWidget()); handle_->setPopup(true); handle_->setPositionScheme(Absolute); handle_->mouseWentDown().connect(mouseDownJS_); handle_->mouseMoved().connect(mouseMovedJS_); handle_->mouseWentUp().connect(mouseUpJS_); slider->clicked().connect(this, &PaintedSlider::onSliderClick); sliderReleased_.connect(this, &PaintedSlider::onSliderReleased); }
WDefaultLoadingIndicator::WDefaultLoadingIndicator() { setImplementation(std::unique_ptr<WWidget> (new WText(tr("Wt.WDefaultLoadingIndicator.Loading")))); setInline(false); setStyleClass("Wt-loading"); WApplication *app = WApplication::instance(); app->styleSheet().addRule("div.Wt-loading", "background-color: red; color: white;" "font-family: Arial,Helvetica,sans-serif;" "font-size: small;" "position: absolute; right: 0px; top: 0px;"); app->styleSheet().addRule("body div > div.Wt-loading", "position: fixed;"); if (app->environment().userAgent().find("MSIE 5.5") != std::string::npos || app->environment().userAgent().find("MSIE 6") != std::string::npos) app->styleSheet().addRule ("div.Wt-loading", "right: expression(((" "ignoreMe2 = document.documentElement.scrollLeft ? " "document.documentElement.scrollLeft : " "document.body.scrollLeft )) + 'px' );" "top: expression(((" "ignoreMe = document.documentElement.scrollTop ? " "document.documentElement.scrollTop : " "document.body.scrollTop)) + 'px' );"); }
PopupChatWidget::PopupChatWidget(SimpleChatServer& server, const std::string& id) : SimpleChatWidget(server), missedMessages_(0) { setId(id); if (Wt::WApplication::instance()->environment().agentIsIE()) { if (Wt::WApplication::instance()->environment().agent() == Wt::WEnvironment::IE6) setPositionScheme(Wt::Absolute); else setPositionScheme(Wt::Fixed); } implementJavaScript (&PopupChatWidget::toggleSize, "{" """var s = $('#" + id + "');" """s.toggleClass('chat-maximized chat-minimized');" "}"); online_ = false; minimized_ = true; setStyleClass("chat-widget chat-minimized"); clear(); addWidget(createBar()); updateUsers(); connect(); }
///////////////////////////////////////////////////////////////////////////////////////////////////////////// // 构造函数 ///////////////////////////////////////////////////////////////////////////////////////////////////////////// CEccAddMonitor1st::CEccAddMonitor1st(WContainerWidget *parent): CEccBaseTable(parent), m_szDTName("") { setStyleClass("panel"); initForm(false); connect(&m_MTMapper, SIGNAL(mapped(int)), this, SLOT(AddMonitorByType(int))); }
PlannerCalendar::PlannerCalendar(dbo::ptr<UserAccount> user) : WCalendar(), user_(user) { setStyleClass(styleClass() + " calendar"); setSelectionMode(SelectionMode::None); }
/** * @brief Gives you a nice pair of buttons * * @param parent Parent Widget */ ButtonBar(const WString& button1Text="", const WString& button2Text="", WContainerWidget* parent=0) : MoreAwesomeTemplate(parent) { WString btn1Text = button1Text.empty() ? WString::tr("OK") : button1Text; WString btn2Text = button2Text.empty() ? WString::tr("Cancel") : button2Text; setTemplateText(tr("button-bar")); setStyleClass("yui-gb button-bar"); bindAndCreateWidget(_btn1, "btn-1", btn1Text); bindAndCreateWidget(_btn2, "btn-2", btn2Text); }
void SVConditionParam::SetMapNode(MAPNODE &mapnode) { setStyleClass("t3"); EnumParam(mapnode); setDefaultValue(); SetCondition(mapnode); }
WToolBar::WToolBar(WContainerWidget *parent) : WCompositeWidget(parent), compact_(true), lastGroup_(0) { setImplementation(impl_ = new WContainerWidget()); setStyleClass("btn-group"); }
////////////////////////////////////////////////////////////////////////////////// // start receive widget element at CSVMainForm::CSVMainForm(WContainerWidget * parent): WTable(parent) { //Resource OBJECT objRes=LoadResource("default", "localhost"); if( objRes !=INVALID_VALUE ) { MAPNODE ResNode=GetResourceNode(objRes); if( ResNode != INVALID_VALUE ) { FindNodeValue(ResNode,"IDS_Report_Edit",strEditReport); FindNodeValue(ResNode,"IDS_Report_Add",strAddReport); } CloseResource(objRes); } setStyleClass("t6"); m_pfrSmsSend = NULL; m_pfrAddPhone = NULL; //elementAt(1, 0)->setContentAlignment(AlignCenter); elementAt(1, 0)->setVerticalAlignment(AlignTop); m_pmainStack = new WStackedWidget(elementAt(1, 0)); m_pmainStack->setPadding(WLength(0)); //m_pmainStack->addWidget(m_pfrSmsSet = new CSVTopnReportSet()); m_pfrSmsSet = new CSVTopnReportSet(); //m_pmainStack->addWidget(m_pfrSmsSet); //OutputDebugString("------CSVMainForm0---------\n"); //m_pmainStack->addWidget(m_pfrSmsSet = new CSVTopnReportSet()); //OutputDebugString("------CSVMainForm1---------\n"); if (!m_pfrAddPhone) { m_pmainStack->addWidget(m_pfrAddPhone = new CSVAddTopnReport()); WObject::connect(m_pfrAddPhone, SIGNAL(BackTo(std::string)), this, SLOT(ShowSetForm(std::string))); WObject::connect(m_pfrAddPhone, SIGNAL(SaveTopnReport(SAVE_REPORT_LIST)), this, SLOT(Save_Phone(SAVE_REPORT_LIST))); WObject::connect(m_pfrAddPhone, SIGNAL(ExChangeAddEvent()), this, SLOT(ExChangeRefresh())); } WObject::connect(m_pfrSmsSet, SIGNAL(AddNewPhone()), this, SLOT(ShowAddForm())); WObject::connect(m_pfrSmsSet, SIGNAL(EditPhone(SAVE_REPORT_LIST)), this, SLOT(Edit_Phone(SAVE_REPORT_LIST))); WObject::connect(m_pfrSmsSet, SIGNAL(ExChangeEvent()), this, SLOT(ExChangeRefresh())); m_pmainStack->addWidget(m_pfrSmsSet); showSmsSet(); }
SVDeviceList::SVDeviceList(WContainerWidget * parent,string szIDCUser, string szIDCPwd): WTable(parent) { setStyleClass("t5"); // 样式表 m_pContentTable = NULL; // 内容表 m_pSubContent= NULL; // 子内容表 m_szIDCUser = szIDCUser; // m_szIDCPwd = szIDCPwd; // initForm(); // 初始化页面 }
/* **************************************************************************** * Edit Users */ EditUsers::EditUsers(Wt::Dbo::Session& aSession, const std::string& basePath) : session_(aSession), basePath_(basePath) { setStyleClass("user-editor"); setTemplateText(tr("edit-users-list")); limitEdit_ = new Wt::WLineEdit; Wt::WPushButton* goLimit = new Wt::WPushButton(tr("go-limit")); goLimit->clicked().connect(SLOT(this, EditUsers::LimitList)); bindWidget("limit-edit",limitEdit_); bindWidget("limit-button",goLimit); LimitList(); } // end EditUsers::EditUsers
ContactList::ContactList(Wt::WContainerWidget *parent) : Wt::WContainerWidget(parent), mpLastEntryClicked(0) { setStyleClass("ContactList"); mpOpenContactSignal = new Wt::Signal<ContactInfo>(this); mpOpenContactSignalForceOpen = new Wt::Signal<ContactInfo>(this); createDebugContactGroup(); }
WSVButton::WSVButton(WContainerWidget * parent, const std::string strTitle, const std::string strImg, const std::string strTip ,const bool bVip ) :WTable(parent) { if(parent) { parent->setStyleClass("padding_3"); } setStyleClass("button_img_font"); std::string strFullPathImg; strFullPathImg ="/Images/"+strImg; if(!bVip) { new WImage("/Images/space.gif","",(WContainerWidget *) elementAt(0,0)); elementAt(0,0)->setStyleClass("but_img_bg_l_blue"); strcpy(elementAt(0,0)->contextmenu_,"nowrap"); new WImage(strFullPathImg,"",(WContainerWidget *)elementAt(0,1)); pBtnTxt =new WText(strTitle,(WContainerWidget *)elementAt(0,2)); elementAt(0,2)->setStyleClass("but_img_bg_m_blue"); strcpy(elementAt(0,2)->contextmenu_,"nowrap"); if(!strTip.empty()) pBtnTxt->setToolTip( strTip); new WImage("/Images/space.gif","",(WContainerWidget *)elementAt(0,3)); elementAt(0,3)->setStyleClass("but_img_bg_r_blue"); strcpy(elementAt(0,3)->contextmenu_,"nowrap"); } else { new WImage("/Images/space.gif","",(WContainerWidget *) elementAt(0,0)); elementAt(0,0)->setStyleClass("but_img_bg_l_black"); strcpy(elementAt(0,0)->contextmenu_,"nowrap"); new WImage(strFullPathImg,"",(WContainerWidget *)elementAt(0,1)); pBtnTxt =new WText(strTitle,(WContainerWidget *)elementAt(0,2)); elementAt(0,2)->setStyleClass("but_img_bg_m_black"); strcpy(elementAt(0,2)->contextmenu_,"nowrap"); if(!strTip.empty()) pBtnTxt->setToolTip( strTip); new WImage("/Images/space.gif","",(WContainerWidget *)elementAt(0,3)); elementAt(0,3)->setStyleClass("but_img_bg_r_black"); strcpy(elementAt(0,3)->contextmenu_,"nowrap"); } }
void WTreeNode::create() { setImplementation(layout_ = new WTable()); setStyleClass("Wt-tree"); layout_->setSelectable(false); if (WApplication::instance()->environment().agentIsOpera()) layout_->setAttributeValue("style", "table-layout: auto"); implementStateless(&WTreeNode::doExpand, &WTreeNode::undoDoExpand); implementStateless(&WTreeNode::doCollapse, &WTreeNode::undoDoCollapse); WApplication *app = WApplication::instance(); expandIcon_ = new WIconPair(WApplication::resourcesUrl() + "themes/" + app->cssTheme() + "/" + imagePlus_, WApplication::resourcesUrl() + "themes/" + app->cssTheme() + "/" + imageMin_); noExpandIcon_ = new WText(); noExpandIcon_->setStyleClass("Wt-noexpand"); layout_->rowAt(1)->hide(); if (labelText_) // "treenodelabel" is for backwards compatibility with Wt < 3.1.1 labelText_->setStyleClass("Wt-label treenodelabel"); childCountLabel_ = 0; layout_->elementAt(0, 0)->setStyleClass("Wt-trunk"); layout_->elementAt(0, 0)->addWidget(noExpandIcon_); if (labelIcon_) { layout_->elementAt(0, 1)->addWidget(labelIcon_); labelIcon_->setVerticalAlignment(AlignMiddle); } if (labelText_) layout_->elementAt(0, 1)->addWidget(labelText_); layout_->elementAt(0, 0)->setContentAlignment(AlignLeft | AlignTop); layout_->elementAt(0, 1)->setContentAlignment(AlignLeft | AlignMiddle); layout_->rowAt(0)->setStyleClass("Wt-node"); childrenLoaded_ = false; setLoadPolicy(LazyLoading); }
WAutoCompleteSuggestion ::WAutoCompleteSuggestion(WAutoCompleteLineEdit *lineEdit, int suggestionIndex, WContainerWidget *parent) : lineEdit_(lineEdit), suggestionIndex_(suggestionIndex) { setImplementation(impl_ = new WContainerWidget(parent)); setStyleClass("suggestion"); new WText(" " + lineEdit->suggestions_[suggestionIndex]+ " ", impl_); connect(parent, SIGNAL(clicked()), this, SLOT(gotClick()), STATIC); }
void WToolBar::setCompact(bool compact) { if (compact != compact_) { compact_ = compact; if (compact) { if (impl_->count() > 0) LOG_INFO("setCompact(true): not implemented"); setStyleClass("btn-group"); } else { setStyleClass("btn-toolbar"); WContainerWidget *group = new WContainerWidget(); group->setStyleClass("btn-group"); while (impl_->count() > 0) { WWidget *w = impl_->widget(0); impl_->removeWidget(w); group->addWidget(w); } impl_->addWidget(group); lastGroup_ = group; } } }
///////////////////////////////////////////////////////////////////////////////////////////////////////////// // 函数 SVDependTable // 说明 构造函数 // 参数 WContainerWidget * parent,父页面 // 返回 无 ///////////////////////////////////////////////////////////////////////////////////////////////////////////// SVDependTable::SVDependTable(WContainerWidget * parent): WTable(parent) { m_pSub = NULL; m_pShow = NULL; m_pHide = NULL; m_pHideEdit = NULL; m_pHideButton = NULL; // 加载文字 //loadString(); // 样式表 setStyleClass("t2"); //初始化界面 initForm(); }
SVSEView::SVSEView(WContainerWidget *parent, CUser * pUser, string szIDCUser, string szIDCPwd): WTable(parent) { m_szIDCUser = szIDCUser; m_szIDCPwd = szIDCPwd; m_pSVUser = pUser; //m_pBtnHideDel = NULL; //m_pAdd = NULL; //m_pDel = NULL; //m_pDel_g = NULL; //loadString(); initForm(); setStyleClass("t1"); }
Character::Character(const std::wstring name, WContainerWidget *parent) : WText(parent), name_(name), redDrops_(0), blueDrops_(0) { setText(name_ + L" got no pills"); setStyleClass(L"character"); /* * Accept drops, and indicate this with a change in CSS style class. */ acceptDrops("red-pill", L"red-drop-site"); acceptDrops("blue-pill", L"blue-drop-site"); setInline(false); }
LoginWindow::LoginWindow(Wt::WContainerWidget *parent) : Wt::WContainerWidget(parent), mpLoginSignal(new Wt::Signal<unsigned int, std::string>(this)) { mpUinEdit = new Wt::WLineEdit(this); mpUinEdit->setText("48493448"); mpUinEdit->setValidator(new Wt::WIntValidator()); new Wt::WBreak(this); mpPassEdit = new Wt::WLineEdit(this); mpPassEdit->setText("haslo1"); mpPassEdit->setEchoMode(Wt::WLineEdit::Password); new Wt::WBreak(this); mpLoginButton = new Wt::WPushButton("Log In", this); mpLoginButton->clicked().connect(this,&LoginWindow::onLoginButton); setStyleClass("LoginWindow"); }
WPopupMenu::WPopupMenu() : WCompositeWidget(), parentItem_(0), result_(0), location_(0), aboutToHide_(this), triggered_(this), cancel_(this, "cancel"), recursiveEventLoop_(false), autoHideDelay_(-1) { const char *TEMPLATE = "${shadow-x1-x2}" "${contents}"; setImplementation(impl_ = new WTemplate(WString::fromUTF8(TEMPLATE))); impl_->setLoadLaterWhenInvisible(false); setPositionScheme(Absolute); setStyleClass("Wt-popupmenu Wt-outset"); impl_->bindString("shadow-x1-x2", WTemplate::DropShadow_x1_x2); WContainerWidget *content = new WContainerWidget(); content->setStyleClass("content"); impl_->bindWidget("contents", content); const char *CSS_RULES_NAME = "Wt::WPopupMenu"; WApplication *app = WApplication::instance(); if (!app->styleSheet().isDefined(CSS_RULES_NAME)) app->styleSheet().addRule (".Wt-notselected .Wt-popupmenu", "visibility: hidden;", CSS_RULES_NAME); app->domRoot()->addWidget(this); hide(); }
WTreeTable::WTreeTable() { setImplementation(std::unique_ptr<WContainerWidget>(impl_ = new WContainerWidget())); setStyleClass("Wt-treetable"); setPositionScheme(PositionScheme::Relative); headers_ = impl_->addWidget(cpp14::make_unique<WContainerWidget>()); headers_->setStyleClass("Wt-header header"); /* * spacer for when a scroll bar is visible */ WContainerWidget *spacer = headers_->addWidget(cpp14::make_unique<WContainerWidget>()); spacer->setStyleClass("Wt-sbspacer"); headerContainer_ = headers_->addWidget(cpp14::make_unique<WContainerWidget>()); headerContainer_->setFloatSide(Side::Right); headers_->addWidget(cpp14::make_unique<WText>()); columnWidths_.push_back(WLength::Auto); WContainerWidget *content = impl_->addWidget(cpp14::make_unique<WContainerWidget>()); content->setStyleClass("Wt-content"); if (!wApp->environment().agentIsIE()) content->setOverflow(Overflow::Auto); else content->setAttributeValue ("style", "overflow-y: auto; overflow-x: hidden; zoom: 1"); tree_ = content->addWidget(cpp14::make_unique<WTree>()); tree_->setMargin(3, Side::Top); tree_->resize(WLength(100, LengthUnit::Percentage), WLength::Auto); }
WTreeTable::WTreeTable(WContainerWidget *parent) : WCompositeWidget(parent) { setImplementation(impl_ = new WContainerWidget()); setStyleClass("Wt-treetable"); setPositionScheme(Relative); headers_ = new WContainerWidget(impl_); headers_->setStyleClass("Wt-header header"); /* * spacer for when a scroll bar is visible */ WContainerWidget *spacer = new WContainerWidget(headers_); spacer->setStyleClass("Wt-sbspacer"); headerContainer_ = new WContainerWidget(headers_); headerContainer_->setFloatSide(Right); headers_->addWidget(new WText()); columnWidths_.push_back(WLength::Auto); WContainerWidget *content = new WContainerWidget(impl_); content->setStyleClass("Wt-content"); if (!wApp->environment().agentIsIE()) content->setOverflow(WContainerWidget::OverflowAuto); else content->setAttributeValue ("style", "overflow-y: auto; overflow-x: hidden; zoom: 1"); content->addWidget(tree_ = new WTree()); tree_->setMargin(3, Top); tree_->resize(WLength(100, WLength::Percentage), WLength::Auto); }
////////////////////////////////////////////////////////////////////////////////// // start CMainForm::CMainForm(WContainerWidget * parent):WTable(parent) //CMainForm::CMainForm(WContainerWidget * parent):WContainerWidget(parent) { //setStyleClass("bg_Border"); //Resource OBJECT objRes=LoadResource("default", "localhost"); if( objRes !=INVALID_VALUE ) { MAPNODE ResNode=GetResourceNode(objRes); if( ResNode != INVALID_VALUE ) { FindNodeValue(ResNode,"IDS_Plan",szTitle); FindNodeValue(ResNode,"IDS_Translate",strTranslate); FindNodeValue(ResNode,"IDS_Translate_Tip",strTranslateTip); FindNodeValue(ResNode,"IDS_Refresh",strRefresh); FindNodeValue(ResNode,"IDS_Refresh_Tip",strRefreshTip); } CloseResource(objRes); } setStyleClass("t1"); new WText("", (WContainerWidget*)elementAt(0,0)); elementAt(0,0)->setStyleClass("t1title"); elementAt(1, 0) -> setContentAlignment(AlignTop | AlignRight); pTranslateBtn = new WPushButton(strTranslate, (WContainerWidget *)elementAt(1, 0)); pTranslateBtn->setToolTip(strTranslateTip); pTranslateBtn->hide(); new WText(" ", (WContainerWidget *)elementAt(1, 0)); pExChangeBtn = new WPushButton(strRefresh, (WContainerWidget *)elementAt(1,0)); pExChangeBtn->setToolTip(strRefreshTip); pExChangeBtn->hide(); new WText(" ", (WContainerWidget *)elementAt(1, 0)); //·Òë int bTrans = GetIniFileInt("translate", "translate", 0, "general.ini"); if(bTrans == 1) { pTranslateBtn->show(); WObject::connect(pTranslateBtn, SIGNAL(clicked()), this, SLOT(Translate())); pExChangeBtn->show(); WObject::connect(pExChangeBtn, SIGNAL(clicked()), this, SLOT(ExChange())); } else { pTranslateBtn->hide(); pExChangeBtn->hide(); } m_pAddPlan = NULL; m_pAddAbsolutePlan = NULL; m_pMainStack = new WStackedWidget(elementAt(1, 0)); m_pMainStack->setPadding(WLength(0)); m_pPlanSet = new CSVPlanSet(); m_pMainStack->addWidget(m_pPlanSet); WObject::connect(m_pPlanSet, SIGNAL(AddNewPlan()), this, SLOT(showAddform())); WObject::connect(m_pPlanSet, SIGNAL(EditPlanList(ADD_PLAN_OK)), this, SLOT(EditNewPlanList(ADD_PLAN_OK))); WObject::connect(m_pPlanSet, SIGNAL(AddNewPlan1()), this, SLOT(showAddform1())); WObject::connect(m_pPlanSet, SIGNAL(EditPlanList1(ADD_PLAN_OK)), this, SLOT(EditNewPlanList1(ADD_PLAN_OK))); showPlanSet(); /* // new WText("<SCRIPT language='JavaScript' src='/basic.js'></SCRIPT>", this); new WText("<SCRIPT language='JavaScript' src='/Script.js'></SCRIPT>", this); new WText("<div id='view_panel' class='panel_view'>", this); pMainTable = new WSVMainTable(this, szTitle, false); //// szTitle = "ÈÎÎñ¼Æ»®"; // setStyleClass("t1"); // // new WText(szTitle, (WContainerWidget*)elementAt(0,0)); // elementAt(0,0)->setStyleClass("t1title"); // // elementAt(1, 0) -> setContentAlignment(AlignTop | AlignRight); pTranslateBtn = new WPushButton(strTranslate, (WContainerWidget *)pMainTable->elementAt(0, 0)); pTranslateBtn->setToolTip(strTranslateTip); pTranslateBtn->hide(); new WText(" ", (WContainerWidget *)pMainTable->elementAt(0, 0)); pExChangeBtn = new WPushButton(strRefresh, (WContainerWidget *)pMainTable->elementAt(0,0)); pExChangeBtn->setToolTip(strRefreshTip); pExChangeBtn->hide(); new WText(" ", (WContainerWidget *)pMainTable->elementAt(0, 0)); //·Òë int bTrans = GetIniFileInt("translate", "translate", 0, "general.ini"); //bTrans = 1; if(bTrans == 1) { pTranslateBtn->show(); WObject::connect(pTranslateBtn, SIGNAL(clicked()), this, SLOT(Translate())); pExChangeBtn->show(); WObject::connect(pExChangeBtn, SIGNAL(clicked()), this, SLOT(ExChange())); } else { pTranslateBtn->hide(); pExChangeBtn->hide(); } m_pAddPlan = NULL; m_pAddAbsolutePlan = NULL; //m_pMainStack = new WStackedWidget(elementAt(1, 0)); m_pMainStack = new WStackedWidget((WContainerWidget *)pMainTable->elementAt(1,0)); m_pMainStack->setPadding(WLength(0)); m_pPlanSet = new CSVPlanSet(pMainTable); m_pMainStack->addWidget(m_pPlanSet); WObject::connect(m_pPlanSet, SIGNAL(AddNewPlan()), this, SLOT(showAddform())); WObject::connect(m_pPlanSet, SIGNAL(EditPlanList(ADD_PLAN_OK)), this, SLOT(EditNewPlanList(ADD_PLAN_OK))); WObject::connect(m_pPlanSet, SIGNAL(AddNewPlan1()), this, SLOT(showAddform1())); WObject::connect(m_pPlanSet, SIGNAL(EditPlanList1(ADD_PLAN_OK)), this, SLOT(EditNewPlanList1(ADD_PLAN_OK))); showPlanSet(); new WText("</div>",this); */ }
Label::Label(const WString& text, WContainerWidget *parent) : WText(text, parent) { setStyleClass(L"label"); parent->setContentAlignment(AlignRight); }