Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread Display Modes
Old Jun 4, 2012, 06:10 PM   #1
macrumors 68020
pilotError's Avatar
Join Date: Apr 2006
Location: Long Island
Need some Advice on Status Indicator

I'm working on an Open Source project to interface to a battery charger.

This particular charger only comes with Windows Software, and that's just not right...

Either way, I've reverse engineered a large part of the communications protocol and have a basic front end up and running.

I wanted to get fancy with it, but I have two issues. I'm not a front end developer by any means. I don't have a lot of coding time on Mac / Xcode and the various libraries.

Given that, I have two things I would like to accomplish.

I want to create a Battery Charge Indicator, similar to what the iPhone has when it's plugged in. That giant green battery, not the one on the status bar. I don't even know how to begin / what API's to use; create a set of jpg's and display them?, core graphics? Any good tutorials for this type of thing? It's asking a lot, I know...

The second issue is I want to create real time graphs of various variables. Anyone recommend a good open source charting library?
pilotError is offline   0 Reply With Quote
Old Jun 5, 2012, 01:01 PM   #2
macrumors 68000
Sydde's Avatar
Join Date: Aug 2009
For the charge display, you want NSLevelIndicator, which produces a green image just like Apple's battery display (which you would have to embed in a battery graphic).

Seems to me that NSBezierPath would handle most of the grunt work you would need for graphing. You might define a class that contains a path object and a color that updates and draws itself in its view. Bear in mind, though, that the view for paths should be flipped so that its Y value increases visibly upward instead of downward.
You got to be a spirit. You can't be no ghost.
Sydde is offline   0 Reply With Quote

MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
indicator LED Tech198 Mac mini 8 Dec 20, 2013 05:26 PM
Status/Sleep Indicator light c3rberu5 MacBook Pro 0 Sep 10, 2013 08:45 AM
Bluetooth status indicator too big when connected to device. eaglesteve iOS 7 4 Jun 12, 2013 07:26 PM
iPhone: How to stop status bar from showing location icon in status bar? Zmanbaseball2 Jailbreaks and iOS Hacks 7 Apr 11, 2013 07:14 PM
Battery Status on the menu indicator Woodcrest64 OS X 10.8 Mountain Lion 2 Aug 3, 2012 10:37 AM

Forum Jump

All times are GMT -5. The time now is 04:59 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2015, MacRumors.com, LLC