Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 08:33 AM.

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

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013,, LLC