#ifndef CAMERAHANDLER_H_
#define CAMERAHANDLER_H_
#include <QtCore/QObject>
class CameraHandler: public QObject
{
Q_OBJECT
public:
//… constructor destructor etc
void setupControls(const QString &camName, const QString &vfButtonName);
Q_INVOKABLE void camerastart();
Q_INVOKABLE void camerastop();
private slots:
void onOpenSuccess(); //when camera is opened successfully
void onShutterFired(); //when we get shutterfired event
void onButtonClick(); //when the button is clicked
void onStopVfSuccess(); //when viewfinder has been stopped
void onStartVfSuccess(); //when viewfinder has been started
private:
Camera* m_camera;
Button* m_camButton;
bool m_ViewfinderOn;
bool m_cameraopen;
//const bb::cascades::AbstractPane *m_abstractPane;
};
#endif /* CAMERAHANDLER_H_ */
我在src文件夹Cascades Framework中有文件Camerahandler.h文件来开发BB10 app。
但我收到错误&#34;&#39;相机&#39;没有命名类型&#34; &安培; &#34;&#39;按钮&#39;没有命名 类型&#34 ;.请帮我解决!
答案 0 :(得分:0)
如果添加这两个怎么样?
#include <bb/cascades/multimedia/Camera>
#include <bb/cascades/Button>