I have a similar on/off switch/battery/charger/level monitor module that I used in my project.
If the power is off, closing a momentary contact on/off switch turns on the 5V (@1.5A) output. If it is on closing the on/off switch asserts a GPIO pin so shutdown can be initiated. As a fail-safe, closing the switch a second time immediately powers down.
At any time, the Raspi can also turn-off the power, for example, when it is signaled by the battery level comparator that the battery is about to die via GPIO. You can programmatically adjust the battery level comparator to determine the current battery level. The module includes a charger circuit. The kit includes the module and a 2000 mAh battery. All GPIO signals are 3V compliant.
http://www.redoakcanyon.com/2-informati ... el-b-512mb