summaryrefslogtreecommitdiff
authortille <tille>2003-05-24 17:03:27 (UTC)
committer tille <tille>2003-05-24 17:03:27 (UTC)
commit58947769d80d49faaccac1703da0e66c90158957 (patch) (unidiff)
tree4ba8961b94ca5cd74265346bf9b48afdb126c07a
parentea6b12007f4b5af926f6732637cb159904c4da7a (diff)
downloadopie-58947769d80d49faaccac1703da0e66c90158957.zip
opie-58947769d80d49faaccac1703da0e66c90158957.tar.gz
opie-58947769d80d49faaccac1703da0e66c90158957.tar.bz2
layout fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/edit.cpp54
-rw-r--r--noncore/settings/networksettings/ppp/pppdargs.cpp26
2 files changed, 42 insertions, 38 deletions
diff --git a/noncore/settings/networksettings/ppp/edit.cpp b/noncore/settings/networksettings/ppp/edit.cpp
index 6132b80..eee643d 100644
--- a/noncore/settings/networksettings/ppp/edit.cpp
+++ b/noncore/settings/networksettings/ppp/edit.cpp
@@ -62,25 +62,25 @@ DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name )
62 62
63 QWhatsThis::add(connect_label,tmp); 63 QWhatsThis::add(connect_label,tmp);
64 QWhatsThis::add(connectname_l,tmp); 64 QWhatsThis::add(connectname_l,tmp);
65 65
66 66
67 number_label = new QLabel(i18n("Phone number:"), this); 67 number_label = new QLabel(i18n("Phone number:"), this);
68 number_label->setAlignment(AlignTop|AlignLeft); 68 number_label->setAlignment(AlignTop|AlignLeft);
69 tl->addWidget(number_label, 1, 0); 69 tl->addWidget(number_label, 1, 0);
70 70
71 QHBoxLayout *lpn = new QHBoxLayout(5); 71 QHBoxLayout *lpn = new QHBoxLayout(5);
72 tl->addLayout(lpn, 1, 1); 72 tl->addLayout(lpn, 1, 1);
73 numbers = new QListBox(this); 73 numbers = new QListBox(this);
74 numbers->setMinimumSize(120, 70); 74// numbers->setMinimumSize(120, 70);
75 lpn->addWidget(numbers); 75 lpn->addWidget(numbers);
76 QVBoxLayout *lpn1 = new QVBoxLayout; 76 QVBoxLayout *lpn1 = new QVBoxLayout;
77 lpn->addLayout(lpn1); 77 lpn->addLayout(lpn1);
78 add = new QPushButton(i18n("&Add..."), this); 78 add = new QPushButton(i18n("&Add..."), this);
79 del = new QPushButton(i18n("&Remove"), this); 79 del = new QPushButton(i18n("&Remove"), this);
80 80
81 up = new QPushButton(this); 81 up = new QPushButton(this);
82//FIXME: QPixmap pm = BarIcon("up"); 82//FIXME: QPixmap pm = BarIcon("up");
83// up->setPixmap(pm); 83// up->setPixmap(pm);
84 down = new QPushButton(this); 84 down = new QPushButton(this);
85//FIXME: pm = BarIcon("down"); 85//FIXME: pm = BarIcon("down");
86// down->setPixmap(pm); 86// down->setPixmap(pm);
@@ -817,56 +817,54 @@ void GatewayWidget::hitGatewaySelect( int i ) {
817 else { 817 else {
818 gatewayaddr->setEnabled(true); 818 gatewayaddr->setEnabled(true);
819 gatewayaddr->setText(""); 819 gatewayaddr->setText("");
820 gate_label->setEnabled(true); 820 gate_label->setEnabled(true);
821 } 821 }
822} 822}
823 823
824 824
825 825
826ScriptWidget::ScriptWidget( QWidget *parent, bool isnewaccount, const char *name ) 826ScriptWidget::ScriptWidget( QWidget *parent, bool isnewaccount, const char *name )
827 : QWidget(parent, name) 827 : QWidget(parent, name)
828{ 828{
829 QVBoxLayout *tl = new QVBoxLayout(this, 0 );//, KDialog::spacingHint()); 829
830 QVBoxLayout *tl = new QVBoxLayout(this, 0 );
830 se = new ScriptEdit(this); 831 se = new ScriptEdit(this);
831 connect(se, SIGNAL(returnPressed()), SLOT(addButton())); 832 connect(se, SIGNAL(returnPressed()), SLOT(addButton()));
832 tl->addWidget(se); 833 tl->addWidget(se);
833 834
834 // insert equal-sized buttons 835 // insert equal-sized buttons
835 QButtonGroup *bbox = new QButtonGroup(this); 836 QHBoxLayout *hl = new QHBoxLayout( this );
836 add = new QPushButton( bbox, i18n("Add") ); 837 tl->addLayout( hl );
837 bbox->insert(add); 838 add = new QPushButton( i18n("Add"), this );
839 hl->addWidget( add );
838 connect(add, SIGNAL(clicked()), SLOT(addButton())); 840 connect(add, SIGNAL(clicked()), SLOT(addButton()));
839// bbox->addStretch(1); 841 insert = new QPushButton( i18n("Insert"), this );
840 insert = new QPushButton( bbox, i18n("Insert") ); 842 hl->addWidget( insert );
841 bbox->insert(insert);
842 connect(insert, SIGNAL(clicked()), SLOT(insertButton())); 843 connect(insert, SIGNAL(clicked()), SLOT(insertButton()));
843// bbox->addStretch(1); 844 remove = new QPushButton( i18n("Remove"), this );
844 remove = new QPushButton( bbox, i18n("Remove") ); 845 hl->addWidget( remove );
845 bbox->insert(remove);
846 connect(remove, SIGNAL(clicked()), SLOT(removeButton())); 846 connect(remove, SIGNAL(clicked()), SLOT(removeButton()));
847 bbox->layout();
848 tl->addWidget(bbox);
849 847
850 QHBoxLayout *l12 = new QHBoxLayout(0); 848 QHBoxLayout *l12 = new QHBoxLayout(0);
851 tl->addLayout(l12); 849 tl->addLayout(l12);
852 stl = new QListBox(this); 850 stl = new QListBox(this);
853 stl->setVScrollBarMode( QScrollView::AlwaysOff ); 851// stl->setVScrollBarMode( QScrollView::AlwaysOff );
854 connect(stl, SIGNAL(highlighted(int)), SLOT(stlhighlighted(int))); 852 connect(stl, SIGNAL(highlighted(int)), SLOT(stlhighlighted(int)));
855 stl->setMinimumSize(QSize(70, 140)); 853// stl->setMinimumSize(QSize(70, 140));
856 854
857 sl = new QListBox(this); 855 sl = new QListBox(this);
858 sl->setVScrollBarMode( QScrollView::AlwaysOff ); 856// sl->setVScrollBarMode( QScrollView::AlwaysOff );
859 connect(sl, SIGNAL(highlighted(int)), SLOT(slhighlighted(int))); 857 connect(sl, SIGNAL(highlighted(int)), SLOT(slhighlighted(int)));
860 sl->setMinimumSize(QSize(150, 140)); 858// sl->setMinimumSize(QSize(150, 140));
861 859
862 slb = new QScrollBar(this); 860 slb = new QScrollBar(this);
863// slb->setFixedWidth(slb->sizeHint().width()); 861// slb->setFixedWidth(slb->sizeHint().width());
864 connect(slb, SIGNAL(valueChanged(int)), SLOT(scrolling(int))); 862 connect(slb, SIGNAL(valueChanged(int)), SLOT(scrolling(int)));
865 863
866 l12->addWidget(stl, 1); 864 l12->addWidget(stl, 1);
867 l12->addWidget(sl, 3); 865 l12->addWidget(sl, 3);
868 l12->addWidget(slb, 0); 866 l12->addWidget(slb, 0);
869 867
870 //load data from gpppdata 868 //load data from gpppdata
871 if(!isnewaccount) { 869 if(!isnewaccount) {
872 QStringList &comlist = PPPData::data()->scriptType(); 870 QStringList &comlist = PPPData::data()->scriptType();
@@ -1145,45 +1143,51 @@ void ScriptWidget::removeButton() {
1145 remove->setEnabled(sl->currentItem() != -1); 1143 remove->setEnabled(sl->currentItem() != -1);
1146 } 1144 }
1147} 1145}
1148 1146
1149 1147
1150 1148
1151///////////////////////////////////////////////////////////////////////////// 1149/////////////////////////////////////////////////////////////////////////////
1152// 1150//
1153// Used to specify a new phone number 1151// Used to specify a new phone number
1154// 1152//
1155///////////////////////////////////////////////////////////////////////////// 1153/////////////////////////////////////////////////////////////////////////////
1156PhoneNumberDialog::PhoneNumberDialog(QWidget *parent) 1154PhoneNumberDialog::PhoneNumberDialog(QWidget *parent)
1157 : QDialog(parent,"PhoneNumberDialog",true) { 1155 : QDialog(parent,"PhoneNumberDialog",true)
1156{
1158 setCaption( i18n("Add Phone Number") ); 1157 setCaption( i18n("Add Phone Number") );
1159// KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
1160 1158
1161 QHBox *hbox = new QHBox(this); 1159
1160 QVBoxLayout *layout = new QVBoxLayout( this );
1161 layout->setSpacing( 3 );
1162 layout->setMargin( 3 );
1163
1164// QHBox *hbox = new QHBox(this);
1162// setMainWidget(hbox); 1165// setMainWidget(hbox);
1163 1166
1164 hbox->setSpacing( 2 );//KDialog::spacingHint()); 1167// hbox->setSpacing( 2 );//KDialog::spacingHint());
1165 1168
1166 new QLabel(i18n("Enter a phone number:"), hbox); 1169 QLabel *label = new QLabel(this, tr("Enter a phone number:"));
1170 layout->addWidget( label );
1167 1171
1168 le = new QLineEdit(hbox); 1172 le = new QLineEdit(this, "lineEdit");
1169// le->setMinimumWidth(125); 1173 layout->addWidget( le );
1170 1174
1171 connect(le, SIGNAL(textChanged(const QString &)), 1175 connect(le, SIGNAL(textChanged(const QString &)),
1172 this, SLOT(textChanged(const QString &))); 1176 this, SLOT(textChanged(const QString &)));
1173 1177
1174 le->setFocus(); 1178 le->setFocus();
1175 textChanged(""); 1179 textChanged("");
1176 1180
1177// enableButtonSeparator(true); 1181
1178} 1182}
1179 1183
1180 1184
1181QString PhoneNumberDialog::phoneNumber() { 1185QString PhoneNumberDialog::phoneNumber() {
1182 QString s = le->text(); 1186 QString s = le->text();
1183 1187
1184 return s; 1188 return s;
1185} 1189}
1186 1190
1187 1191
1188void PhoneNumberDialog::textChanged(const QString &s) { 1192void PhoneNumberDialog::textChanged(const QString &s) {
1189// enableButtonOK(s.length() > 0); 1193// enableButtonOK(s.length() > 0);
diff --git a/noncore/settings/networksettings/ppp/pppdargs.cpp b/noncore/settings/networksettings/ppp/pppdargs.cpp
index b7fca3f..4039939 100644
--- a/noncore/settings/networksettings/ppp/pppdargs.cpp
+++ b/noncore/settings/networksettings/ppp/pppdargs.cpp
@@ -72,37 +72,37 @@ PPPdArguments::PPPdArguments(QWidget *parent, const char *name)
72 l2->addStretch(1); 72 l2->addStretch(1);
73 73
74 remove = new QPushButton(i18n("Remove"), this); 74 remove = new QPushButton(i18n("Remove"), this);
75 connect(remove, SIGNAL(clicked()), SLOT(removebutton())); 75 connect(remove, SIGNAL(clicked()), SLOT(removebutton()));
76 l2->addWidget(remove); 76 l2->addWidget(remove);
77 77
78 defaults = new QPushButton(i18n("Defaults"), this); 78 defaults = new QPushButton(i18n("Defaults"), this);
79 connect(defaults, SIGNAL(clicked()), SLOT(defaultsbutton())); 79 connect(defaults, SIGNAL(clicked()), SLOT(defaultsbutton()));
80 l2->addWidget(defaults); 80 l2->addWidget(defaults);
81 81
82 l->addSpacing(5); 82 l->addSpacing(5);
83 83
84 QButtonGroup *bbox = new QButtonGroup(this); 84// QButtonGroup *bbox = new QButtonGroup(this);
85// bbox->addStretch(1); 85// // bbox->addStretch(1);
86 closebtn = new QPushButton( bbox, i18n("OK")); 86// closebtn = new QPushButton( bbox, i18n("OK"));
87 bbox->insert(closebtn); 87// bbox->insert(closebtn);
88 connect(closebtn, SIGNAL(clicked()), SLOT(closebutton())); 88// connect(closebtn, SIGNAL(clicked()), SLOT(closebutton()));
89 QPushButton *cancel = new QPushButton( bbox, i18n("Cancel")); 89// QPushButton *cancel = new QPushButton( bbox, i18n("Cancel"));
90 bbox->insert(cancel); 90// bbox->insert(cancel);
91 connect(cancel, SIGNAL(clicked()), 91// connect(cancel, SIGNAL(clicked()),
92 this, SLOT(reject())); 92 // this, SLOT(reject()));
93 bbox->layout(); 93// bbox->layout();
94 l->addWidget(bbox); 94// l->addWidget(bbox);
95 95
96 setFixedSize(sizeHint()); 96// setFixedSize(sizeHint());
97 97
98 //load info from gpppdata 98 //load info from gpppdata
99 init(); 99 init();
100 100
101 add->setEnabled(false); 101 add->setEnabled(false);
102 remove->setEnabled(false); 102 remove->setEnabled(false);
103 argument->setFocus(); 103 argument->setFocus();
104} 104}
105 105
106 106
107void PPPdArguments::addbutton() { 107void PPPdArguments::addbutton() {
108 if(!argument->text().isEmpty() && arguments->count() < MAX_PPPD_ARGUMENTS) { 108 if(!argument->text().isEmpty() && arguments->count() < MAX_PPPD_ARGUMENTS) {