//! QT Hello world program

#include <kcmdlineargs.h>
#include <kaboutdata.h>
#include <kapplication.h>
#include <klocale.h>

#include <qtranslator.h>

#include <qlistview.h>
#include <qheader.h>
#include <qiconset.h>
#include <qpixmap.h>

static const char description[] =
    I18N_NOOP("A KDE KPart Application");

static const char version[] = "0.1";

static KCmdLineOptions options[] = {
  // { "+[URL]", I18N_NOOP( "Document to open" ), 0 },
  KCmdLineLastOption
};

int main(int argc, char **argv) {
  KAboutData about( "hello", I18N_NOOP("a hellow world application"), 
		    version, description, KAboutData::License_GPL, 
		    "(C) 2006 Chen Levy", 0, 0, "contirb@chenlevy.com");
  KCmdLineArgs::init(argc, argv, &about);
  KCmdLineArgs::addCmdLineOptions( options);
  
  KApplication app( argv, argc) ;

  QTranslator trans(0) ;
  trans.load( "tt2_he") ;
  app.installTranslator( &trans) ;

  QPixmap pm( "icon.png") ;
  QIconSet is( pm) ;
  QListView* lv= new QListView() ;
  // good:
  // lv->addColumn( is, QObject::tr("Hello, world!")) ;
  // bad:
  lv->addColumn( QObject::tr("Hello, world!")) ;
  lv->header()->setLabel( 0, is, QObject::tr("Hello, world!")) ;
  app.setMainWidget( lv) ;
  lv->show() ;
  return app.exec() ;
}

