Beispiel #1
0
ConfigDlg::ConfigDlg(QWidget *parent, const char *name, bool modal) : QDialog(parent, name, modal)
{
	setCaption( tr( "Options" ) );
	QVBoxLayout *vbox_layout = new QVBoxLayout( this );
	search_tab = new QWidget( this , "search_tab" );
	QVBoxLayout *vbox_layout_searchtab = new QVBoxLayout( search_tab, 4 , 4 ,"blah" );

	QHBox *hbox = new QHBox( search_tab );
	list = new QListView( hbox );
	list->addColumn( tr( "Searchmethod" ) );
	loadSearchMethodNames();

	QVBox *vbox = new QVBox( hbox );
	new_button = new QPushButton( tr( "New" ) , vbox );
	change_button = new QPushButton( tr( "Change" ) , vbox );
	delete_button = new QPushButton( tr( "Delete" ) , vbox );
	connect( new_button, SIGNAL( clicked() ), this, SLOT( slotNewMethod() ) );
	connect( change_button, SIGNAL( clicked() ), this, SLOT( slotChangeMethod() ));
	connect( delete_button, SIGNAL( clicked() ), this, SLOT( slotDeleteMethod() ));

	vbox_layout_searchtab->addWidget( hbox );

	vbox_layout->addWidget( search_tab );

 	QPEApplication::showDialog( this );
}
ProjectsEditDialog::ProjectsEditDialog( QWidget * parent )
: QDialog( parent )
{
	setupUi( this );
	mModel = new RecordSuperModel(mTreeView);
	new ProjectsEditTranslator(mModel->treeBuilder());
	mTreeView->setModel(mModel);
	mModel->setHeaderLabels( QStringList() << "Key" << "Name" << "Status");
	mModel->listen( Project::table() );
	connect( mTreeView, SIGNAL( currentChanged( const Record & ) ), SLOT( slotCurrentChanged( const Record & ) ) );
	connect( mNewMethodButton, SIGNAL( clicked() ), SLOT( slotNewMethod() ) );
	connect( mRemoveMethodButton, SIGNAL( clicked() ), SLOT( slotRemoveMethod() ) );
	refresh();
}