
#include "cal.h"

#include <qapplication.h>
#include <qlayout.h>
#include <qpushbutton.h>

#include <qpixmap.h>

int main( int argc, char **argv )
{
    QApplication a( argc, argv );

	// Create Buttons
	// Layout
	// Main widget.
	QWidget *widget = new QWidget(); 
	QVBoxLayout *l = new QVBoxLayout(widget);
	QPushButton *top_button = new QPushButton(widget);
	l->addWidget(top_button);
	top_button->setText(QString("/\\"));

    Cal *cal = new Cal(widget);
	l->addWidget(cal);

	QPushButton *bottom_button = new QPushButton(widget);
	l->addWidget(bottom_button);
	bottom_button->setText(QString("\\/"));

	QObject::connect( top_button, SIGNAL(clicked()), cal, SLOT(scrollBack()));
	QObject::connect( bottom_button, SIGNAL(clicked()), cal, SLOT(scrollForward()));
//	KMultiTabBar *k = new KMultiTabBar(widget,KMultiTabBar::Vertical);
//	k->showActiveTabTexts(true);
//	k->setPosition(KMultiTabBar::Left);
//	QPixmap pixmap;
//	k->appendTab(pixmap,1, QString("Text goes here"));
//	k->setTab(1,true);
//
//	l->addWidget(k);

	a.setMainWidget(widget);
    widget->show();

//	a.connect( &a, SIGNAL(lastWindowClosed()), &a , SLOT(quit()) );
    return a.exec();
}

