author | tille <tille> | 2003-06-02 12:36:00 (UTC) |
---|---|---|
committer | tille <tille> | 2003-06-02 12:36:00 (UTC) |
commit | 2d0134f0bee1c0d33fc8cdc66ecc390080adba25 (patch) (side-by-side diff) | |
tree | 430950574b78a060940fc1a00942550fb5d84cf6 | |
parent | ed171b266b1f42b358b2b814deb33be21c220683 (diff) | |
download | opie-2d0134f0bee1c0d33fc8cdc66ecc390080adba25.zip opie-2d0134f0bee1c0d33fc8cdc66ecc390080adba25.tar.gz opie-2d0134f0bee1c0d33fc8cdc66ecc390080adba25.tar.bz2 |
disable the profile tab and add some whatsthis
-rw-r--r-- | noncore/settings/networksettings/mainwindow.ui | 24 | ||||
-rw-r--r-- | noncore/settings/networksettings/mainwindowimp.cpp | 8 |
2 files changed, 31 insertions, 1 deletions
diff --git a/noncore/settings/networksettings/mainwindow.ui b/noncore/settings/networksettings/mainwindow.ui index f61a1ae..a730dd5 100644 --- a/noncore/settings/networksettings/mainwindow.ui +++ b/noncore/settings/networksettings/mainwindow.ui @@ -25,24 +25,28 @@ <number>0</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget> <class>QTabWidget</class> <property stdset="1"> <name>name</name> <cstring>tabWidget</cstring> </property> + <property stdset="1"> + <name>enabled</name> + <bool>true</bool> + </property> <property> <name>layoutMargin</name> </property> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>Widget3</cstring> </property> <attribute> <name>title</name> <string>Connections</string> @@ -127,24 +131,28 @@ <name>resizeable</name> <bool>true</bool> </property> </column> <property stdset="1"> <name>name</name> <cstring>connectionList</cstring> </property> <property stdset="1"> <name>allColumnsShowFocus</name> <bool>true</bool> </property> + <property> + <name>whatsThis</name> + <string>A list of network settings to be choosen from</string> + </property> </widget> <widget> <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout2</cstring> </property> <property> <name>layoutMargin</name> </property> <grid> <property stdset="1"> @@ -156,57 +164,73 @@ <number>6</number> </property> <widget row="1" column="0" > <class>QPushButton</class> <property stdset="1"> <name>name</name> <cstring>addConnectionButton</cstring> </property> <property stdset="1"> <name>text</name> <string>&Add</string> </property> + <property> + <name>whatsThis</name> + <string>Add a new interface to the list.</string> + </property> </widget> <widget row="0" column="0" > <class>QPushButton</class> <property stdset="1"> <name>name</name> <cstring>informationConnectionButton</cstring> </property> <property stdset="1"> <name>text</name> <string>&Start/Stop</string> </property> + <property> + <name>whatsThis</name> + <string>Start and Stop the current interface, gives additional information about the interface.</string> + </property> </widget> <widget row="0" column="1" > <class>QPushButton</class> <property stdset="1"> <name>name</name> <cstring>configureConnectionButton</cstring> </property> <property stdset="1"> <name>text</name> <string>&Configure</string> </property> + <property> + <name>whatsThis</name> + <string>Configure the current interface</string> + </property> </widget> <widget row="1" column="1" > <class>QPushButton</class> <property stdset="1"> <name>name</name> <cstring>removeConnectionButton</cstring> </property> <property stdset="1"> <name>text</name> <string>&Remove</string> </property> + <property> + <name>whatsThis</name> + <string>Remove the current interface from the list.</string> + </property> </widget> </grid> </widget> </vbox> </widget> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>tab</cstring> </property> <attribute> diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp index 63b9603..abf5663 100644 --- a/noncore/settings/networksettings/mainwindowimp.cpp +++ b/noncore/settings/networksettings/mainwindowimp.cpp @@ -2,24 +2,25 @@ #include "addconnectionimp.h" #include "interfaceinformationimp.h" #include "interfacesetupimp.h" #include "interfaces.h" #include "module.h" #include <qpushbutton.h> #include <qlistbox.h> #include <qlineedit.h> #include <qlistview.h> #include <qheader.h> #include <qlabel.h> +#include <qtabwidget.h> // in order to disable the profiles tab #include <qmessagebox.h> #ifdef QWS #include <qpe/config.h> #include <qpe/qlibrary.h> #include <qpe/resource.h> #include <qpe/qpeapplication.h> #else #include <klibloader.h> #define QLibrary KLibrary #include <kconfig.h> @@ -49,24 +50,28 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(parent, name), advancedUserMode(true), scheme(DEFAULT_SCHEME){ connect(addConnectionButton, SIGNAL(clicked()), this, SLOT(addClicked())); connect(removeConnectionButton, SIGNAL(clicked()), this, SLOT(removeClicked())); connect(informationConnectionButton, SIGNAL(clicked()), this, SLOT(informationClicked())); connect(configureConnectionButton, SIGNAL(clicked()), this, SLOT(configureClicked())); connect(newProfileButton, SIGNAL(clicked()), this, SLOT(addProfile())); connect(removeProfileButton, SIGNAL(clicked()), this, SLOT(removeProfile())); connect(setCurrentProfileButton, SIGNAL(clicked()), this, SLOT(changeProfile())); connect(newProfile, SIGNAL(textChanged(const QString&)), this, SLOT(newProfileChanged(const QString&))); + + //FIXME: disable profiles for the moment: + tabWidget->setTabEnabled( tab, false ); + // Load connections. // /usr/local/kde/lib/libinterfaces.la #ifdef QWS loadModules(QPEApplication::qpeDir() + "/plugins/networksettings"); #else loader = KLibLoader::self(); loadModules(QString("/usr/")+KStandardDirs::kde_default("lib")); #endif getAllInterfaces(); Interfaces i; QStringList list = i.getInterfaceList(); @@ -85,25 +90,26 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par interfaceNames.insert(i->getInterfaceName(), i); updateInterface(i); connect(i, SIGNAL(updateInterface(Interface *)), this, SLOT(updateInterface(Interface *))); } } } //getInterfaceList(); connectionList->header()->hide(); Config cfg("NetworkSetup"); profiles = QStringList::split(" ", cfg.readEntry("Profiles", "All")); - for ( QStringList::Iterator it = profiles.begin(); it != profiles.end(); ++it) + for ( QStringList::Iterator it = profiles.begin(); + it != profiles.end(); ++it) profilesList->insertItem((*it)); currentProfileLabel->setText(cfg.readEntry("CurrentProfile", "All")); advancedUserMode = cfg.readBoolEntry("AdvancedUserMode", false); scheme = cfg.readEntry("SchemeFile", DEFAULT_SCHEME); QFile file(scheme); if ( file.open(IO_ReadOnly) ) { // file opened successfully QTextStream stream( &file ); // use a text stream while ( !stream.eof() ) { // until end of file... QString line = stream.readLine(); // line of text excluding '\n' if(line.contains("SCHEME")){ line = line.mid(7, line.length()); |