Adjust layout

This commit is contained in:
kaetemi 2015-03-06 19:06:10 +01:00
parent 9523abfe92
commit 0c1bba4540
2 changed files with 17 additions and 10 deletions

View file

@ -122,10 +122,13 @@ void CCrashReportWidget::setup( const std::vector< std::pair< std::string, std::
connect( cb, SIGNAL( stateChanged( int ) ), this, SLOT( onSendCBClicked() ) );
}
hbl->addStretch();
QPushButton *alwaysIgnoreButton = new QPushButton( tr( "Always Ignore" ), this );
QPushButton *ignoreButton = new QPushButton( tr( "Ignore" ), this );
QPushButton *abortButton = new QPushButton( tr( "Abort" ), this );
QPushButton *breakButton = new QPushButton(tr("Break"), this);
breakButton->setAutoDefault(true);
hbl->addWidget( alwaysIgnoreButton );
hbl->addWidget( ignoreButton );
@ -141,19 +144,22 @@ void CCrashReportWidget::setup( const std::vector< std::pair< std::string, std::
}
else
{
hbl->addStretch();
// If -host is specified, offer the send function
if( !m_socket->url().isEmpty() && !m_fileName.isEmpty() )
{
QPushButton *sendButton = new QPushButton( tr( "Send report" ), this );
connect( sendButton, SIGNAL( clicked( bool ) ), this, SLOT( onSendClicked() ) );
hbl->addWidget( sendButton );
if (!m_forceSend)
{
QPushButton *cancelButton = new QPushButton(tr("Don't send report"), this);
connect(cancelButton, SIGNAL(clicked(bool)), this, SLOT(onCancelClicked()));
hbl->addWidget(cancelButton);
}
QPushButton *sendButton = new QPushButton( tr( "Send report" ), this );
sendButton->setAutoDefault(true);
connect( sendButton, SIGNAL( clicked( bool ) ), this, SLOT( onSendClicked() ) );
hbl->addWidget( sendButton );
}
// Otherwise only offer exit
else
@ -161,6 +167,7 @@ void CCrashReportWidget::setup( const std::vector< std::pair< std::string, std::
QPushButton *exitButton = new QPushButton( tr( "Exit" ), this );
connect( exitButton, SIGNAL( clicked( bool ) ), this, SLOT( onCancelClicked() ) );
hbl->addWidget(exitButton);
exitButton->setAutoDefault(true);
}
m_ui.gridLayout->addLayout( hbl, 6, 0, 1, 3 );

View file

@ -14,7 +14,7 @@
</rect>
</property>
<property name="windowTitle">
<string>NeL Error Report</string>
<string>NeL report</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">