1 #include <kapplication.h>
2 #include <kcmdlineargs.h>
8 #include "k3listview.h"
10 int main( int argc
, char **argv
)
12 KCmdLineArgs::init( argc
, argv
, "klistviewtest", 0, ki18n("K3ListViewTest"), "1.0", ki18n("klistview test app"));
15 K3ListView
*view
= new K3ListView();
16 dialog
.setMainWidget(view
);
17 view
->setSelectionModeExt( K3ListView::FileManager
);
18 view
->setDragEnabled( true );
19 view
->setItemsMovable( false );
20 view
->setAcceptDrops( true );
21 view
->addColumn("Column 1");
22 view
->addColumn("Column 2");
23 view
->addColumn("Column 3");
25 new K3ListViewItem( view
, "Item 1");
26 new K3ListViewItem( view
, "Item 1");
27 new K3ListViewItem( view
, "Item 1");
28 new K3ListViewItem( view
, "Item 1");
29 new K3ListViewItem( view
, "Item 1");
30 new K3ListViewItem( view
, "Item 1");
31 new K3ListViewItem( view
, "Item 1");
32 new K3ListViewItem( view
, "Item 1");
33 new K3ListViewItem( view
, "Item 1");
34 new K3ListViewItem( view
, "Item 2", "Some more", "Hi Mom :)" );
36 view
->restoreLayout( KGlobal::config().data(), "ListView" );
38 new K3ListViewItem( view
, "Item 3" );
41 view
->saveLayout( KGlobal::config().data(), "ListView" );