#include <kapplication.h>
#include <kcmdlineargs.h>
#include <kdebug.h>
#include <kwin.h>

#include "kasitem.h"
#include "kastasker.h"

int main( int argc, char **argv )
{
  KCmdLineArgs::init( argc, argv, "testkas", "", "" );
  KApplication app;

  kdDebug(1345) << "Kasbar starting..." << endl;

#if 0
  // Test Everything
  int wflags = Qt::WStyle_Customize | Qt::WStyle_Tool | Qt::WStyle_StaysOnTop;
  KasTasker *kasbar = new KasTasker( Qt::Vertical, 0, "testkas", wflags );
  kasbar->refreshAll();
#endif
#if 1
  // Test Everything
  int wflags = Qt::WStyle_Customize | Qt::WStyle_Tool | Qt::WStyle_StaysOnTop;
  KasTasker *kasbar = new KasTasker( Qt::Vertical, 0, "testkas", wflags );
#endif
#if 0
  // Test Basic Item Handling
  KasBar *kasbar = new KasBar( Qt::Vertical, 0, "testkas" );
  kasbar->append( new KasItem(kasbar) );
  kasbar->append( new KasItem(kasbar) );
  kasbar->append( new KasItem(kasbar) );

#endif
  kasbar->setItemSize( KasBar::Large );
//  kasbar->move( 1200, 512 );

  kdDebug(1345) << "Kasbar about to show" << endl;
  app.setMainWidget( kasbar );
  kasbar->show();

  kasbar->setTransparent( true );
  KWin::setOnAllDesktops( kasbar->winId(), true );
  kdDebug() << "kasbar: Window id is " << kasbar->winId() << endl;

  app.connect( &app, SIGNAL( lastWindowClosed() ), SLOT(quit()) );

  return app.exec();
}


// Test Basic Item Handling
//
//    KasBar *kasbar = new KasBar( Qt::Vertical, 0, "testkas" );
//    kasbar->append( new KasItem(kasbar) );
//    kasbar->append( new KasItem(kasbar) );
//    kasbar->append( new KasItem(kasbar) );
