Wittyshare  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WsLogo.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-Today Guy Deleeuw
3  *
4  * See the LICENSE file for terms of use.
5 */
6 
7 #include <Wt/WApplication>
8 #include <Wt/WLogger>
9 #include <Wt/WTheme>
10 
11 #include <gdcore/gdImage.h>
12 
14 
15 #include "WsLogo.h"
16 
17 using namespace Wt;
18 
19 WsLogo::WsLogo(WContainerWidget* parent)
20  : WImage(parent)
21 {
22  std::string curImgUrl(wApp->theme()->resourcesUrl() + "wittyshare/Images/logo.png");
23  setImageRef(curImgUrl);
24  gdImageProperties imgProp = gdImage_size(wApp->docRoot() + curImgUrl);
25  setWidth(WLength(imgProp.width, WLength::Pixel));
26  setHeight(WLength(imgProp.height, WLength::Pixel));
27  clicked().connect(SLOT(this, WsLogo::doLogoClicked));
28 }
29 
31 { }
32 
34 {
35  if ( WsLayoutProperties::instance()->get("global", "use_content_directory_view", "false") == "false" ) return wApp->setInternalPath("/", true);
36  wApp->setInternalPath("/Logo", true);
37 }
38 
void doLogoClicked()
Definition: WsLogo.cpp:33
static WsLayoutProperties * instance()
Get the singleton instance.
~WsLogo()
Definition: WsLogo.cpp:30
WsLogo(Wt::WContainerWidget *parent=0)
Definition: WsLogo.cpp:19