-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Can now add pages and save them, but not see them
- Loading branch information
matiu
committed
Jun 11, 2011
1 parent
73982b9
commit 052efba
Showing
310 changed files
with
41,439 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* ===================================================================================== | ||
* | ||
* Filename: ControlPanel.cpp | ||
* | ||
* Description: Control Panel code goes here | ||
* | ||
* Version: 1.0 | ||
* Created: 06/03/2011 09:39:46 AM | ||
* Revision: none | ||
* Compiler: gcc | ||
* | ||
* Author: Matthew Sherborne (), msherborne@gmail.com | ||
* Company: | ||
* | ||
* ===================================================================================== | ||
*/ | ||
|
||
#include "ControlPanel.hpp" | ||
#include "PageEdit.hpp" | ||
#include <Wt/WDialog> | ||
#include"App.hpp" | ||
|
||
using Wt::WDialog; | ||
|
||
namespace vidanueva { | ||
|
||
const string ControlPanel::addPageURL = "/newPage"; | ||
|
||
/** | ||
* Called when the user hits the add page button. Shows the add a new page dialog. | ||
*/ | ||
void ControlPanel::addNewPage() { | ||
PageEdit* pageEdit = new PageEdit(); | ||
getApp()->mainWindow()->setBody(pageEdit); | ||
} | ||
|
||
/** | ||
* @brief If someone navigates to /page/new .. show a new page dialog. | ||
* | ||
* @param path | ||
*/ | ||
void ControlPanel::urlChanged(const std::string& path) { | ||
if (path == addPageURL) { | ||
addNewPage(); | ||
} | ||
} | ||
|
||
} // namespace vidanueva |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* ===================================================================================== | ||
* | ||
* Filename: DialogButtonBar.hpp | ||
* | ||
* Description: Gives you an OK and cancel button to sit at the bottom of a dialog | ||
* | ||
* Version: 1.0 | ||
* Created: 06/04/2011 09:49:11 AM | ||
* Revision: none | ||
* Compiler: gcc | ||
* | ||
* Author: Matthew Sherborne (), msherborne@gmail.com | ||
* Company: | ||
* | ||
* ===================================================================================== | ||
*/ | ||
|
||
#ifndef DIALOG_BUTTON_BAR_HPP | ||
#define DIALOG_BUTTON_BAR_HPP | ||
|
||
#include <Wt/WDialog> | ||
#include <Wt/WPushButton> | ||
#include "MoreAwesomeTemplate.hpp" | ||
|
||
using Wt::WPushButton; | ||
using Wt::WDialog; | ||
|
||
namespace vidanueva { | ||
|
||
class DialogButtonBar : public MoreAwesomeTemplate { | ||
private: | ||
WPushButton* _okBtn; | ||
WPushButton* _cancelBtn; | ||
public: | ||
DialogButtonBar(WDialog& dialog) : MoreAwesomeTemplate(dialog.contents()) { | ||
setTemplateText(tr("dialog-button-bar")); | ||
bindAndCreateWidget(_okBtn, "ok-btn", tr("ok-btn")); | ||
bindAndCreateWidget(_cancelBtn, "cancel-btn", tr("cancel-btn")); | ||
_okBtn->clicked().connect(&dialog, &WDialog::accept); | ||
_cancelBtn->clicked().connect(&dialog, &WDialog::reject); | ||
} | ||
}; | ||
|
||
} | ||
|
||
#endif // DIALOG_BUTTON_BAR_HPP |
Oops, something went wrong.