#define QT_NO_DRAGANDDROP
#define QT_NO_PROPERTIES
#include <ZApplication.h>
#include <ZKbMainWidget.h>
#include <ZLabel.h>
#include <ZSoftKey.h>
#include <ZScrollPanel.h>

class MyDialog : public ZKbMainWidget
{
	Q_OBJECT
	public:
		MyDialog() : ZKbMainWidget((ZHeader::HEADER_TYPE)3, NULL, "MyDialog", 0)
		{
			setMainWidgetTitle(QString("Hello World!"));
			ZSoftKey* softkey = new ZSoftKey(NULL, this, this);
			softkey->setText(ZSoftKey::LEFT, QString("Hi!"), (ZSoftKey::TEXT_PRIORITY)0);
			softkey->setText(ZSoftKey::RIGHT, QString("Quit"), (ZSoftKey::TEXT_PRIORITY)0);
			softkey->setClickedSlot(ZSoftKey::RIGHT, qApp, SLOT(quit()));
			ZLabel* mainlabel = new ZLabel(QString("This is hello world application!"), this, "mainlabel", 0, (ZSkinService::WidgetClsID)4);
			mainlabel->setPreferredWidth(240);
			mainlabel->setAutoResize(true);
			QVBoxLayout* layout = getVBoxLayout();
			ZScrollPanel* panel = new ZScrollPanel(this, NULL, 0, (ZSkinService::WidgetClsID)4);
			panel->addChild(mainlabel, 10, 50);
			layout->addWidget(panel);
			setSoftKey(softkey);
		}
};

int main(int argc, char **argv)
{
	ZApplication* a = new ZApplication(argc, argv);
	MyDialog* dlg = new MyDialog();
	a->setMainWidget(dlg);
	dlg->show();
	a->exec();
	return 0;
}
#include "hello3.moc"
