Esempio n. 1
0
// -------------------------------------------------------
// -------- WGDownloadOptionsDlg
// -------------------------------------------------------
WGDownloadOptionsDlg::WGDownloadOptionsDlg( QWidget* parent, const char* name, bool modal, WFlags fl ): WGDownloadOptionsDlgBase( parent, name, modal, fl )
{
	QIconSet image_open( QPixmap((const char**)image_open_data) );
	image_open.setPixmap( QPixmap((const char**)image_open_d_data), QIconSet::Automatic, QIconSet::Disabled );

	DirectoryB->setIconSet( image_open );
	LogDirectoryB->setIconSet( image_open );

	RetriesNumberLE->setValidator( new WGIntValidator( RetriesNumberLE ) );
	RetriesWaitLE->setValidator( new WGIntValidator( RetriesWaitLE ) );

	connect( OkB            , SIGNAL(clicked())      , this, SLOT(slot_ok())              );
	connect( CancelB        , SIGNAL(clicked())      , this, SLOT(slot_cancel())          );
	connect( DirectoryB     , SIGNAL(clicked())      , this, SLOT(slot_directory())       );
	connect( RestartCB      , SIGNAL(clicked())      , this, SLOT(slot_restart())         );
	connect( PasswordCB     , SIGNAL(clicked())      , this, SLOT(slot_password())        );
	connect( LogCB          , SIGNAL(clicked())      , this, SLOT(slot_log())             );
	connect( LogDirectoryB  , SIGNAL(clicked())      , this, SLOT(slot_log_directory())   );
	connect( URLLE          , SIGNAL(returnPressed()), this, SLOT(slot_ok())              );
	connect( PasswordUsrLE  , SIGNAL(returnPressed()), this, SLOT(slot_ok())              );
	connect( PasswordPassLE , SIGNAL(returnPressed()), this, SLOT(slot_ok())              );
	connect( RetriesNumberLE, SIGNAL(returnPressed()), this, SLOT(slot_ok())              );
	connect( RetriesWaitLE  , SIGNAL(returnPressed()), this, SLOT(slot_ok())              );

	updateControls();

	URLLE->setFocus();
}
Esempio n. 2
0
void WGDownloadOptionsDlg::updateControls()
{
	slot_restart();
	slot_password();
	slot_log();
}
Esempio n. 3
0
WndTask::WndTask( const af::MCTaskPos & i_tp, ListTasks * i_parent):
	Wnd("Task"),
	m_parent( i_parent),
	m_pos( i_tp),
	m_log_te( NULL),
	m_errhosts_te( NULL),
	m_output_te( NULL),
	m_outputs_count(-1),
	m_output_current(-1),
	m_tab_current( NULL),
	m_listening( false)
{
	ms_wndtasks.push_back( this);

	QVBoxLayout * layout = new QVBoxLayout( this);

	//
	// Progess brief:
	//
	m_progress_te = new QTextEdit( this);
	layout->addWidget( m_progress_te);
	m_progress_te->setReadOnly( true);
	m_progress_te->setLineWrapMode( QTextEdit::NoWrap);
	m_progress_te->setFocusPolicy( Qt::NoFocus);

	m_progress_te->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff);
	m_progress_te->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff);
	m_progress_te->setFixedHeight( 28);


	//
	// Buttons:
	//
	QHBoxLayout * layoutB = new QHBoxLayout();
	layout->addLayout( layoutB);

	m_btn_skip = new QPushButton("Skip", this);
	layoutB->addWidget( m_btn_skip);
	m_btn_skip->setEnabled( false);
	m_btn_skip->setFixedWidth( 88);
	connect( m_btn_skip, SIGNAL( pressed()), this, SLOT( slot_skip()));

	m_btn_restart = new QPushButton("Restart", this);
	layoutB->addWidget( m_btn_restart);
	m_btn_restart->setEnabled( false);
	m_btn_restart->setFixedWidth( 88);
	connect( m_btn_restart, SIGNAL( pressed()), this, SLOT( slot_restart()));

	layoutB->addStretch();

	m_btn_output = new QPushButton("Output", this);
	layoutB->addWidget( m_btn_output);
	m_btn_output->setEnabled( false);
	m_btn_output->setFixedWidth( 111);
	m_output_menu = new QMenu( m_btn_output);
	m_btn_output->setMenu( m_output_menu);


	//
	// Output tabs:
	//
	m_tab_widget = new QTabWidget( this);
	layout->addWidget( m_tab_widget);
	//m_tab_widget->setTabsClosable( true);

	createTab("Executable",  &m_tab_exec,      NULL          ); 
	createTab("Output",      &m_tab_output,   &m_output_te   ); 
	createTab("Log",         &m_tab_log,      &m_log_te      ); 
	createTab("Error Hosts", &m_tab_errhosts, &m_errhosts_te ); 
	createTab("Listen",      &m_tab_listen,   &m_listen_te   ); 

	m_tab_output->setEnabled( false);

	connect( m_tab_widget, SIGNAL( currentChanged( int)), this, SLOT( slot_currentChanged( int)));

	getTaskInfo("info");
//	slot_currentChanged(0);
}