author | harlekin <harlekin> | 2002-10-24 18:41:09 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-10-24 18:41:09 (UTC) |
commit | 94573faf2e89723a49bbaf3630f1d19f80ba6b27 (patch) (side-by-side diff) | |
tree | 52a5258e3ba595179fc240ee883effb05417c88a | |
parent | 3773cd825129f1cc6fa7a4ecb4129634f5189984 (diff) | |
download | opie-94573faf2e89723a49bbaf3630f1d19f80ba6b27.zip opie-94573faf2e89723a49bbaf3630f1d19f80ba6b27.tar.gz opie-94573faf2e89723a49bbaf3630f1d19f80ba6b27.tar.bz2 |
fixed layout and disabled advanced options since htey are not all implemented
-rw-r--r-- | noncore/apps/opie-console/terminalwidget.cpp | 20 | ||||
-rw-r--r-- | noncore/apps/opie-console/terminalwidget.h | 6 |
2 files changed, 14 insertions, 12 deletions
diff --git a/noncore/apps/opie-console/terminalwidget.cpp b/noncore/apps/opie-console/terminalwidget.cpp index fc0f3ce..eb14a3f 100644 --- a/noncore/apps/opie-console/terminalwidget.cpp +++ b/noncore/apps/opie-console/terminalwidget.cpp @@ -1,123 +1,123 @@ #include <qbuttongroup.h> #include <qlabel.h> #include <qcheckbox.h> #include <qcombobox.h> #include <qradiobutton.h> #include <qgroupbox.h> #include <qvbox.h> #include <qhgroupbox.h> +#include <qhbuttongroup.h> #include <qlayout.h> +#include <qhbox.h> #include "terminalwidget.h" namespace { enum TermIds { id_term_vt100 = 0, id_term_vt102, id_term_linux, id_term_xterm }; enum ColourIds { id_term_black, id_term_white, id_term_green, id_term_orange }; enum FontIds { id_size_small, id_size_medium, id_size_large }; }; TerminalWidget::TerminalWidget( const QString& name, QWidget* parent, const char* na ) : ProfileDialogTerminalWidget( name, parent, na ) { m_terminal = new QLabel(tr("Terminal Type"), this ); m_terminalBox = new QComboBox(this); m_colorLabel = new QLabel(tr("Color scheme"), this); m_colorCmb = new QComboBox(this ); - m_groupSize = new QButtonGroup(tr("Font size"), this ); - m_sizeSmall = new QRadioButton(tr("small"), m_groupSize ); - m_sizeMedium = new QRadioButton(tr("medium"), m_groupSize ); - m_sizeLarge = new QRadioButton(tr("large"), m_groupSize ); + m_groupSize = new QHButtonGroup(tr("Font size"), this ); + m_sizeSmall = new QRadioButton(tr("small"), m_groupSize ); + m_sizeMedium = new QRadioButton(tr("medium"), m_groupSize ); + m_sizeLarge = new QRadioButton(tr("large"), m_groupSize ); m_groupConv = new QHGroupBox(tr("Line-break conversions"), this ); m_convInbound = new QCheckBox(tr("Inbound"), m_groupConv ); m_convOutbound = new QCheckBox(tr("Outbound"), m_groupConv ); + m_groupConv->hide(); m_groupOptions = new QHGroupBox( tr("Options"), this ); m_optionEcho = new QCheckBox(tr("Local echo"), m_groupOptions ); m_optionWrap = new QCheckBox(tr("Line wrap"), m_groupOptions ); + m_groupOptions->hide(); - m_lroot = new QVBoxLayout(this, 2 ); + m_lroot = new QVBoxLayout( this ); m_typeBox = new QVBoxLayout( m_lroot ); - m_hbox = new QHBoxLayout( m_groupSize, 2 ); m_colorBox = new QVBoxLayout( m_lroot ); // Layout m_typeBox->add(m_terminal ); m_typeBox->add(m_terminalBox ); - - m_hbox->add(m_sizeSmall ); - m_hbox->add(m_sizeMedium ); - m_hbox->add(m_sizeLarge ); m_lroot->add(m_groupSize ); m_colorBox->add( m_colorLabel ); m_colorBox->add( m_colorCmb ); m_lroot->add(m_groupConv ); m_lroot->add(m_groupOptions ); + m_lroot->addStretch( 0 ); // Fill in some options qWarning("Options for terminal box"); m_terminalBox->insertItem( tr("VT 100"), 0 ); // /*, id_term_vt100*/ ); m_terminalBox->insertItem( tr("VT 102"), 1 ); // /* , id_term_vt102 */); m_terminalBox->insertItem( tr("Linux Console"), 2 ); //, id_term_linux ); m_terminalBox->insertItem( tr("X-Terminal"), 3 ); //, id_term_xterm ); //m_terminalBox->insertItem( tr("ANSI"), id_term_ansi ); m_colorCmb->insertItem( tr("black on white"), id_term_black ); m_colorCmb->insertItem( tr("white on black"), id_term_white ); m_colorCmb->insertItem( tr("green on black"), id_term_green ); m_colorCmb->insertItem( tr("orange on black"), id_term_orange ); // signals + slots /* connect(m_terminalBox, SIGNAL(activated(int) ), this, SLOT(slotTermTerm(int) ) ); connect(m_colorBox, SIGNAL(activated(int) ), tis, SLOT(slotTermColor(int) ) ); connect(m_groupSize, SIGNAL(activated(int) ), this, SLOT(slotTermFont(int) ) ); connect(m_optionEcho, SIGNAL(toggled(bool) ), this, SLOT(slotTermEcho(bool) ) ); connect(m_optionWrap, SIGNAL(toggled(bool) ), this, SLOT(slotTermWrap(bool) ) ); connect(m_convInbound, SIGNAL(toggled(bool) ), this, SLOT(slotTermInbound(bool) ) ); connect(m_convOutbound, SIGNAL(toggled(bool) ), this, SLOT(slotTermOutbound(bool) ) ); */ } TerminalWidget::~TerminalWidget() { } void TerminalWidget::load( const Profile& prof ) { int term = prof.readNumEntry("Terminal"); int color = prof.readNumEntry("Color"); int fontsize = prof.readNumEntry("Font"); int opt_echo = prof.readNumEntry("Echo"); int opt_wrap = prof.readNumEntry("Wrap"); int opt_inbound = prof.readNumEntry("Inbound"); int opt_outbound = prof.readNumEntry("Outbound"); switch( term ) { case Profile::VT100: m_terminalBox->setCurrentItem(id_term_vt100 ); break; diff --git a/noncore/apps/opie-console/terminalwidget.h b/noncore/apps/opie-console/terminalwidget.h index c6c2be2..217fea7 100644 --- a/noncore/apps/opie-console/terminalwidget.h +++ b/noncore/apps/opie-console/terminalwidget.h @@ -1,46 +1,48 @@ #ifndef OPIE_TERMINAL_WIDGET_H #define OPIE_TERMINAL_WIDGET_H #include "profiledialogwidget.h" class QComboBox; class QLabel; class QVBoxLayout; class QHBoxLayout; class QButtonGroup; class QRadioButton; class QCheckBox; class QHGroupBox; +class QHBox; class TerminalWidget : public ProfileDialogTerminalWidget { + Q_OBJECT + public: TerminalWidget(const QString& name, QWidget* wid, const char* na ) ; ~TerminalWidget(); void load( const Profile& ); void save( Profile& ); + private: QVBoxLayout* m_lroot, *m_typeBox, *m_colorBox; - QHBoxLayout* m_hbox; - QLabel* m_terminal, *m_colorLabel; QComboBox* m_terminalBox, *m_colorCmb; QButtonGroup* m_groupSize; QRadioButton* m_sizeSmall, *m_sizeMedium, *m_sizeLarge; QHGroupBox *m_groupConv, *m_groupOptions; QCheckBox *m_convInbound, *m_convOutbound, *m_optionEcho, *m_optionWrap; }; #endif |