author | leseb <leseb> | 2002-07-08 14:58:34 (UTC) |
---|---|---|
committer | leseb <leseb> | 2002-07-08 14:58:34 (UTC) |
commit | 8b6a15ef84bc6b1c9c1a82689788c6e281780495 (patch) (side-by-side diff) | |
tree | 1d2c2f416aab46103d244a0b9d5b1c764c9f5452 | |
parent | c92049007eaf6615a059425073b03a827d11831e (diff) | |
download | opie-8b6a15ef84bc6b1c9c1a82689788c6e281780495.zip opie-8b6a15ef84bc6b1c9c1a82689788c6e281780495.tar.gz opie-8b6a15ef84bc6b1c9c1a82689788c6e281780495.tar.bz2 |
Sync with 1.2 version + some bug fixes
-rw-r--r-- | noncore/settings/tabmanager/app.cpp | 83 | ||||
-rw-r--r-- | noncore/settings/tabmanager/app.h | 41 | ||||
-rw-r--r-- | noncore/settings/tabmanager/opie-tabmanager.control | 8 | ||||
-rw-r--r-- | noncore/settings/tabmanager/tabapplnk.h | 0 | ||||
-rw-r--r-- | noncore/settings/tabmanager/tablistview.h | 0 | ||||
-rw-r--r-- | noncore/settings/tabmanager/tabmainwindow.h | 7 | ||||
-rw-r--r-- | noncore/settings/tabmanager/tabmanager.cpp | 127 | ||||
-rw-r--r-- | noncore/settings/tabmanager/tabmanager.h | 4 | ||||
-rw-r--r-- | noncore/settings/tabmanager/tabmanager.pro | 7 | ||||
-rw-r--r-- | noncore/settings/tabmanager/tabmanagerbase.cpp | 9 | ||||
-rw-r--r-- | noncore/settings/tabmanager/tabmanagerbase.ui | 22 |
11 files changed, 114 insertions, 194 deletions
diff --git a/noncore/settings/tabmanager/app.cpp b/noncore/settings/tabmanager/app.cpp deleted file mode 100644 index 30ba9a5..0000000 --- a/noncore/settings/tabmanager/app.cpp +++ b/dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** Form implementation generated from reading ui file 'app.ui' -** -** Created: Fri May 3 14:38:15 2002 -** by: The User Interface Compiler (uic) -** -** WARNING! All changes made in this file will be lost! -****************************************************************************/ -#include "app.h" - -#include <qlabel.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qvariant.h> -#include <qtooltip.h> -#include <qwhatsthis.h> - -/* - * Constructs a AppEdit which is a child of 'parent', with the - * name 'name' and widget flags set to 'f' - * - * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. - */ -AppEdit::AppEdit( QWidget* parent, const char* name, bool modal, WFlags fl ) - : QDialog( parent, name, modal, fl ) -{ - if ( !name ) - setName( "AppEdit" ); - resize( 211, 241 ); - setCaption( tr( "Application" ) ); - AppEditLayout = new QGridLayout( this ); - AppEditLayout->setSpacing( 6 ); - AppEditLayout->setMargin( 11 ); - - TextLabel3 = new QLabel( this, "TextLabel3" ); - TextLabel3->setText( tr( "Exec" ) ); - - AppEditLayout->addWidget( TextLabel3, 2, 0 ); - - TextLabel4 = new QLabel( this, "TextLabel4" ); - TextLabel4->setText( tr( "Comment" ) ); - - AppEditLayout->addWidget( TextLabel4, 3, 0 ); - - TextLabel2 = new QLabel( this, "TextLabel2" ); - TextLabel2->setText( tr( "Icon" ) ); - - AppEditLayout->addWidget( TextLabel2, 1, 0 ); - - TextLabel1 = new QLabel( this, "TextLabel1" ); - TextLabel1->setText( tr( "Name" ) ); - - AppEditLayout->addWidget( TextLabel1, 0, 0 ); - - iconLineEdit = new QLineEdit( this, "iconLineEdit" ); - - AppEditLayout->addWidget( iconLineEdit, 1, 1 ); - - nameLineEdit = new QLineEdit( this, "nameLineEdit" ); - - AppEditLayout->addWidget( nameLineEdit, 0, 1 ); - - commentLineEdit = new QLineEdit( this, "commentLineEdit" ); - - AppEditLayout->addWidget( commentLineEdit, 3, 1 ); - - execLineEdit = new QLineEdit( this, "execLineEdit" ); - - AppEditLayout->addWidget( execLineEdit, 2, 1 ); - QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); - AppEditLayout->addItem( spacer, 4, 1 ); -} - -/* - * Destroys the object and frees any allocated resources - */ -AppEdit::~AppEdit() -{ - // no need to delete child widgets, Qt does it all for us -} - diff --git a/noncore/settings/tabmanager/app.h b/noncore/settings/tabmanager/app.h deleted file mode 100644 index ffa6222..0000000 --- a/noncore/settings/tabmanager/app.h +++ b/dev/null @@ -1,41 +0,0 @@ -/**************************************************************************** -** Form interface generated from reading ui file 'app.ui' -** -** Created: Fri May 3 14:38:09 2002 -** by: The User Interface Compiler (uic) -** -** WARNING! All changes made in this file will be lost! -****************************************************************************/ -#ifndef APPEDIT_H -#define APPEDIT_H - -#include <qvariant.h> -#include <qdialog.h> -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QLabel; -class QLineEdit; - -class AppEdit : public QDialog -{ - Q_OBJECT - -public: - AppEdit( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); - ~AppEdit(); - - QLabel* TextLabel3; - QLabel* TextLabel4; - QLabel* TextLabel2; - QLabel* TextLabel1; - QLineEdit* iconLineEdit; - QLineEdit* nameLineEdit; - QLineEdit* commentLineEdit; - QLineEdit* execLineEdit; - -protected: - QGridLayout* AppEditLayout; -}; - -#endif // APPEDIT_H diff --git a/noncore/settings/tabmanager/opie-tabmanager.control b/noncore/settings/tabmanager/opie-tabmanager.control index 0d5c1e7..610a281 100644 --- a/noncore/settings/tabmanager/opie-tabmanager.control +++ b/noncore/settings/tabmanager/opie-tabmanager.control @@ -1,9 +1,11 @@ Package: opie-tabmanager Files: bin/tabmanager apps/Settings/tabmanager.desktop pics/tabmanager/tabmanager.png Priority: optional -Version: 1.0 +Section: opie/settings +Version: $QPE_VERSION-$SUB_VERSION-1.0 +Depends: opie-base ($QPE_VERSION) Architecture: arm Maintainer: Benjamin Meyer <meyerb@sharpsec.com> -Section: Settings Description: Tab Manager - Helps to manage the Applications tab + Create new tabs, remove old tabs. Edit tab's name, comment and icon. + Edit applications name, exec, comment and icon. Add/remove applications. diff --git a/noncore/settings/tabmanager/tabapplnk.h b/noncore/settings/tabmanager/tabapplnk.h index 9333e87..375d33b 100644 --- a/noncore/settings/tabmanager/tabapplnk.h +++ b/noncore/settings/tabmanager/tabapplnk.h diff --git a/noncore/settings/tabmanager/tablistview.h b/noncore/settings/tabmanager/tablistview.h index 97f9dec..dfd88f7 100644 --- a/noncore/settings/tabmanager/tablistview.h +++ b/noncore/settings/tabmanager/tablistview.h diff --git a/noncore/settings/tabmanager/tabmainwindow.h b/noncore/settings/tabmanager/tabmainwindow.h index c76ad9f..69fb15d 100644 --- a/noncore/settings/tabmanager/tabmainwindow.h +++ b/noncore/settings/tabmanager/tabmainwindow.h @@ -1,35 +1,38 @@ #ifndef TABMAINWINDOW_H #define TABMAINWINDOW_H #include "tabmanager.h" #include <qmainwindow.h> #include <qtoolbar.h> #include <qtoolbutton.h> #include <qpe/resource.h> class TabMainWindow : public QMainWindow { public: TabMainWindow( QWidget* parent = 0, const char* name = 0) : QMainWindow(parent, name){ tabManager = new TabManager(this, "TabManger"); setCaption("Tab Manager"); + setToolBarsMovable(false); this->setCentralWidget(tabManager); QToolBar *newToolBar = new QToolBar("toolbar", this); + QToolBar *emptyToolBar = new QToolBar("empty", this); + emptyToolBar->setHorizontalStretchable(true); // Insert all of the buttons. QToolButton *newFolder = new QToolButton(Resource::loadPixmap("fileopen"), "New Folder", 0, tabManager, SLOT(newFolder()), newToolBar); - QToolButton *newFile = new QToolButton(Resource::loadPixmap("new"), "New Folder", 0, tabManager, SLOT(newApplication()), newToolBar); + QToolButton *newFile = new QToolButton(Resource::loadPixmap("new"), "New Application", 0, tabManager, SLOT(newApplication()), newToolBar); QToolButton *editItem = new QToolButton(Resource::loadPixmap("edit"), "Edit", 0, tabManager, SLOT(editCurrentItem()), newToolBar); - QToolButton *deleteItem = new QToolButton(Resource::loadPixmap("reset"), "Deelete", 0, tabManager, SLOT(removeItem()), newToolBar); + QToolButton *deleteItem = new QToolButton(Resource::loadPixmap("trash"), "Delete", 0, tabManager, SLOT(removeItem()), newToolBar); }; protected: TabManager *tabManager; }; #endif // tabmainwindow.h diff --git a/noncore/settings/tabmanager/tabmanager.cpp b/noncore/settings/tabmanager/tabmanager.cpp index 13aae81..5f0899c 100644 --- a/noncore/settings/tabmanager/tabmanager.cpp +++ b/noncore/settings/tabmanager/tabmanager.cpp @@ -1,73 +1,76 @@ #include "tabmanager.h" #include "app.h" +#include "wait.h" #include "tabapplnk.h" #include <qpe/applnk.h> -#include <qpe/qpeapplication.h> #include <qdir.h> #include <qfile.h> #include <qtextstream.h> #include <qlistview.h> #include <qheader.h> +#include <qcombobox.h> #include <qlineedit.h> #include <qlabel.h> #include <qmessagebox.h> #include <stdlib.h> #include <qpe/qcopenvelope_qws.h> +#include <qpe/qpeapplication.h> +#include <qpe/resource.h> + -#define HOME_APP_DIR QPEApplication::qpeDir()+"/apps" // <-- made this a little more flexible +#define HOME_APP_DIR QPEApplication::qpeDir()+"/apps" #define HOME_APP_INSTALL_DIR "/usr/lib/ipkg/info" #define NEW_FOLDER "EmptyTab" #define NEW_APPLICATION "NewApp" #define APPLICATION_EXTENSION ".desktop" #define APPLICATION_EXTENSION_LENGTH 8 /** * Constructor. Sets up signals. Performs initial scan of applications * and tabs */ -TabManager::TabManager( QWidget* parent, const char* name):TabManagerBase(parent, name), changed(false){ +TabManager::TabManager( QWidget* parent, const char* name):TabManagerBase(parent, name), changed(false), application(NULL){ rescanFolder(HOME_APP_DIR); // Connect the signals and slots - connect(tabList, SIGNAL(doubleClicked(QListViewItem *)), - this, SLOT(editItem(QListViewItem*))); + connect(tabList, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(editItem(QListViewItem*))); (tabList->header())->hide(); - connect(tabList, SIGNAL(moveItem(QListViewItem *, QListViewItem *)), - this, SLOT(moveApplication(QListViewItem *, QListViewItem *))); + connect(tabList, SIGNAL(moveItem(QListViewItem *, QListViewItem *)), this, SLOT(moveApplication(QListViewItem *, QListViewItem *))); } /** * If anything in the tab's have been changed then update the system or alert * the user. */ TabManager::~TabManager(){ if(changed){ - //QMessageBox::critical(this, tr("Message"), tr("Please restart Qtopia to see all new changes."),tr("Ok") ); - //filename = fn; + // Prompt. + //int answer = QMessageBox::warning(this, "Message", "Should your desktop be","Yes", "Cancel", 0, 1 ); + //if (answer) + // return; QCopEnvelope e("QPE/System", "linkChanged(QString)"); - //e << description << filename << mimetype; QString link; //we'll just send an empty string e << link; } } /** * Scans root directory for any tabs or applications. Will recursivly go down, * but will not follow symlinks. * @param directory - the directory to look in. * @param parent - the parent to place any new tabs or apps into. If parent is * NULL then the item is a tab and should be placed as a child of the window. */ void TabManager::rescanFolder(QString directory, QListViewItem* parent){ //qDebug(QString("rescanFolder: ") + directory.latin1()); QDir d; d.setPath(directory); // Show hidden files for .directories d.setFilter( QDir::Files | QDir::Hidden | QDir::Dirs); const QFileInfoList *list = d.entryInfoList(); QFileInfoListIterator it( *list ); // create list iterator QFileInfo *fi; // pointer for traversing @@ -155,153 +158,202 @@ void TabManager::newApplication(){ system((QString("echo Type=") + folderName + " | cat >> " + homeLocation).latin1()); // Insert into the tree QListViewItem *newItem = new QListViewItem(item, NEW_APPLICATION); itemList.insert(newItem, homeLocation ); // We have changed something. changed = true; } /** * Remove the item. * Check if we can * Prompt user * Delete physical file (Dir, remove .dir, then dir. File, remove file) * Remove from installer if need too. */ void TabManager::removeItem(){ // Make sure we can delete QListViewItem *item = tabList->currentItem(); if(!item) return; if(item->childCount() > 0){ - QMessageBox::critical(this, tr("Message"), tr("Can't remove with applications\nstill in the group."), - tr("Ok") ); + QMessageBox::critical(this, tr("Message"), tr("Can't remove with applications\nstill in the group."), tr("Ok") ); return; } // Prompt. - int answer = QMessageBox::warning(this, tr("Message"), tr("Are you sure you want to delete?"), - tr("Yes"), tr("Cancel"), 0, 1 ); + int answer = QMessageBox::warning(this, tr("Message"), tr("Are you sure you want to delete?"), tr("Yes"), tr("Cancel"), 0, 1 ); if (answer) return; bool removeSuccessfull = true; QString location = itemList[item]; // Remove file (.directory in a Directory case) if(!QFile::remove(location)) removeSuccessfull = false; // Remove directory if(item->parent() == NULL){ // Remove .directory file string location = location.mid(0,location.length()-10); QDir dir; if(!dir.rmdir(location)) removeSuccessfull = false; else removeSuccessfull = true; - } // If removing failed. if(!removeSuccessfull){ qDebug((QString("removeItem: ") + location).latin1()); - QMessageBox::critical(this, tr("Message"), tr("Can't remove."), - tr("Ok") ); + QMessageBox::critical(this, tr("Message"), tr("Can't remove."), tr("Ok") ); return; } // Remove from the installer so it wont fail. // Don't need to do this sense the current install uses rm -f so no error // Remove from the gui list. itemList.remove(item); if(item->parent()) item->parent()->takeItem(item); delete item; // We have changed something. changed = true; } /** * Helper function. Edits the current item. * calls editItem with the currently selected item. */ void TabManager::editCurrentItem(){ editItem(tabList->currentItem()); } /** * Edit the item that is passed in. * Show application dialog and if anything changed * @param item the item to edit. */ void TabManager::editItem( QListViewItem * item){ if(!item) return; TabAppLnk app(itemList[item]); if(!app.isValid()){ qDebug(QString("editItem: Not a valid applnk file: ") + itemList[item].latin1()); return; } - AppEdit application(this, tr("Application edit"), true); - application.nameLineEdit->setText(app.name()); - application.iconLineEdit->setText(app.pixmapString()); - application.execLineEdit->setText(app.exec()); - application.commentLineEdit->setText(app.comment()); + // Fill with all of the icons + if(!application){ + Wait waitDialog(this, "Wait dialog"); + waitDialog.waitLabel->setText(tr("Gathering icons...")); + waitDialog.show(); + qApp->processEvents(); + application = new AppEdit(this, "Application edit", true); + + QDir d(QPEApplication::qpeDir() + "/pics/"); + d.setFilter( QDir::Files); + + const QFileInfoList *list = d.entryInfoList(); + QFileInfoListIterator it( *list ); // create list iterator + QFileInfo *fi; // pointer for traversing + + while ( (fi=it.current()) ) { // for each file... + QString fileName = fi->fileName(); + if(fileName.right(4) == ".png"){ + fileName = fileName.mid(0,fileName.length()-4); + QPixmap imageOfFile(Resource::loadPixmap(fileName)); + QImage foo = imageOfFile.convertToImage(); + foo = foo.smoothScale(16,16); + imageOfFile.convertFromImage(foo); + application->iconLineEdit->insertItem(imageOfFile,fileName); + } + //qDebug(fi->fileName().latin1()); + ++it; + } + waitDialog.hide(); + } + int pixmap = -1; + QString pixmapText = app.pixmapString(); + QComboBox *f = application->iconLineEdit; + for(int i = 0; i < application->iconLineEdit->count(); i++){ + if(f->text(i) == pixmapText){ + pixmap = i; + break; + } + } + if(pixmap != -1) + application->iconLineEdit->setCurrentItem(pixmap); + else{ + QPixmap imageOfFile(Resource::loadPixmap(pixmapText)); + QImage foo = imageOfFile.convertToImage(); + foo = foo.smoothScale(16,16); + imageOfFile.convertFromImage(foo); + application->iconLineEdit->insertItem(imageOfFile,pixmapText,0); + application->iconLineEdit->setCurrentItem(0); + } + + application->nameLineEdit->setText(app.name()); + application->execLineEdit->setText(app.exec()); + application->commentLineEdit->setText(app.comment()); if(item->parent() == NULL){ - application.execLineEdit->setEnabled(false); - application.TextLabel3->setEnabled(false); - application.setCaption(tr("Tab")); + application->execLineEdit->setEnabled(false); + application->TextLabel3->setEnabled(false); + application->setCaption(tr("Tab")); + } + else{ + application->execLineEdit->setEnabled(true); + application->TextLabel3->setEnabled(true); + application->setCaption(tr("Application")); } // Only do somthing if they hit OK - if(application.exec() == 0) + application->showMaximized(); + if(application->exec() == 0) return; // If nothing has changed exit (hmmm why did they hit ok?) - if(app.name() == application.nameLineEdit->text() && - app.pixmapString() == application.iconLineEdit->text() && - app.comment() == application.commentLineEdit->text() && - app.exec() == application.execLineEdit->text()) + if(app.name() == application->nameLineEdit->text() && + app.pixmapString() == application->iconLineEdit->currentText() && + app.comment() == application->commentLineEdit->text() && + app.exec() == application->execLineEdit->text()) return; // Change the applnk file QString oldName = app.name(); - app.setName(application.nameLineEdit->text()); - app.setIcon(application.iconLineEdit->text()); - app.setComment(application.commentLineEdit->text()); - app.setExec(application.execLineEdit->text()); + app.setName(application->nameLineEdit->text()); + app.setIcon(application->iconLineEdit->currentText()); + app.setComment(application->commentLineEdit->text()); + app.setExec(application->execLineEdit->text()); if(!app.writeLink()){ - QMessageBox::critical(this, tr("Message"), tr("Can't save."), - tr("Ok") ); + QMessageBox::critical(this, tr("Message"), "Can't save.", tr("Ok") ); return; } // Update the gui icon and name item->setText(0,app.name()); item->setPixmap(0,app.pixmap()); // We have changed something. changed = true; // If we were dealing with a new folder or new application change // the file names. Also change the item location in itemList if(oldName == NEW_FOLDER){ QDir r; QString oldName = itemList[item]; oldName = oldName.mid(0,oldName.length()-11); QString newName = oldName.mid(0,oldName.length()-9); newName = newName + "/" + app.name(); r.rename(oldName, newName); itemList.remove(item); itemList.insert(item, newName + "/.directory" ); } else if(oldName == NEW_APPLICATION){ if(!item->parent()) @@ -323,50 +375,49 @@ void TabManager::editItem( QListViewItem * item){ * @param item the application to move * @pearam newGroup the new parent of this application */ void TabManager::moveApplication(QListViewItem *item, QListViewItem *newGroup){ // Can we even move it? if(!item || !item->parent() || newGroup->parent()) return; if(item->parent() == newGroup) return; // Get the new folder, new file name, QString newFolder = itemList[newGroup]; newFolder = newFolder.mid(0,newFolder.length()-11); int slash = newFolder.findRev('/', -1); QString folderName = newFolder.mid(slash+1, newFolder.length()); QString desktopFile = itemList[item]; slash = desktopFile.findRev('/', -1); desktopFile = desktopFile.mid(slash, desktopFile.length()); newFolder = newFolder + desktopFile; // Move file QDir r; if(!r.rename(itemList[item], newFolder)){ - QMessageBox::critical(this, tr("Message"), tr("Can't move application."), - tr("Ok") ); + QMessageBox::critical(this, tr("Message"), "Can't move application.", tr("Ok") ); return; } //qDebug((QString("moveApplication: ") + itemList[item]).latin1()); //qDebug((QString("moveApplication: ") + newFolder).latin1()); // Move in the gui item->parent()->takeItem(item); newGroup->insertItem(item); newGroup->setOpen(true); // Move file in the installer QString installedAppFile; if(findInstalledApplication(desktopFile, installedAppFile)) swapInstalledLocation(installedAppFile, desktopFile, newFolder); else qDebug("moveApplication: No installed app found for dekstop file"); // Move application type AppLnk app(newFolder); app.setType(folderName); app.writeLink(); // Move in our internal list itemList.remove(item); diff --git a/noncore/settings/tabmanager/tabmanager.h b/noncore/settings/tabmanager/tabmanager.h index 39865b0..7f8a65e 100644 --- a/noncore/settings/tabmanager/tabmanager.h +++ b/noncore/settings/tabmanager/tabmanager.h @@ -1,39 +1,43 @@ #ifndef TABMANAGER_H #define TABMANAGER_H #include "tabmanagerbase.h" #include <qmap.h> #include <qevent.h> class QListViewItem; +class AppEdit; class TabManager : public TabManagerBase { Q_OBJECT public: TabManager( QWidget* parent = 0, const char* name = 0); ~TabManager(); bool changed; public slots: void newFolder(); void newApplication(); void removeItem(); void editCurrentItem(); private slots: void moveApplication(QListViewItem *, QListViewItem *); void editItem(QListViewItem * item); protected: void rescanFolder(QString directory, QListViewItem* parent=NULL); QMap<QListViewItem *, QString> itemList; bool findInstalledApplication(QString desktopFile, QString &installedAppFile); void swapInstalledLocation( QString installedAppFile, QString desktopFile, QString newLocation ); +private: + AppEdit *application; + }; #endif // tabmanager.h diff --git a/noncore/settings/tabmanager/tabmanager.pro b/noncore/settings/tabmanager/tabmanager.pro index 999c8b4..5c65a1d 100644 --- a/noncore/settings/tabmanager/tabmanager.pro +++ b/noncore/settings/tabmanager/tabmanager.pro @@ -1,26 +1,25 @@ TEMPLATE = app -#CONFIG = qt warn_on debug CONFIG = qt warn_on release -HEADERS = tabmanager.h tabmainwindow.h app.h tablistview.h tabmanagerbase.h tabapplnk.h -SOURCES = main.cpp tabmanager.cpp app.cpp tabmanagerbase.cpp +HEADERS = tabmanager.h tabmainwindow.h tablistview.h tabmanagerbase.h tabapplnk.h +SOURCES = main.cpp tabmanager.cpp tabmanagerbase.cpp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -#INTERFACES = tabmanagerbase.ui +INTERFACES = app.ui wait.ui TARGET = tabmanager DESTDIR = $(OPIEDIR)/bin TRANSLATIONS = ../../../i18n/de/tabmanager.ts \ ../../../i18n/en/tabmanager.ts \ ../../../i18n/es/tabmanager.ts \ ../../../i18n/fr/tabmanager.ts \ ../../../i18n/hu/tabmanager.ts \ ../../../i18n/ja/tabmanager.ts \ ../../../i18n/ko/tabmanager.ts \ ../../../i18n/no/tabmanager.ts \ ../../../i18n/pl/tabmanager.ts \ ../../../i18n/pt/tabmanager.ts \ ../../../i18n/pt_BR/tabmanager.ts \ ../../../i18n/sl/tabmanager.ts \ ../../../i18n/zh_CN/tabmanager.ts \ ../../../i18n/zh_TW/tabmanager.ts diff --git a/noncore/settings/tabmanager/tabmanagerbase.cpp b/noncore/settings/tabmanager/tabmanagerbase.cpp index a899529..29ec3a5 100644 --- a/noncore/settings/tabmanager/tabmanagerbase.cpp +++ b/noncore/settings/tabmanager/tabmanagerbase.cpp @@ -5,44 +5,43 @@ ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! ****************************************************************************/ #include "tabmanagerbase.h" #include <qheader.h> #include <qlistview.h> #include <qpushbutton.h> #include <qlayout.h> #include <qvariant.h> #include <qtooltip.h> #include <qwhatsthis.h> /* * Constructs a TabManagerBase which is a child of 'parent', with the * name 'name' and widget flags set to 'f' */ TabManagerBase::TabManagerBase( QWidget* parent, const char* name, WFlags fl ) : QWidget( parent, name, fl ) { if ( !name ) setName( "TabManagerBase" ); resize( 289, 228 ); - setCaption( tr( "Tab Manger" ) ); + setCaption( tr( "Tab Manager" ) ); TabManagerBaseLayout = new QVBoxLayout( this ); - TabManagerBaseLayout->setSpacing( 6 ); - TabManagerBaseLayout->setMargin( 0 ); + TabManagerBaseLayout->setSpacing( 4 ); + TabManagerBaseLayout->setMargin( 4 ); tabList = new TabListView( this, "tabList" ); - tabList->addColumn( tr( "Groups" ) ); - tabList->addColumn( tr( "Applications" ) ); + tabList->addColumn( tr( "Hierarchy" ) ); tabList->setRootIsDecorated( TRUE ); TabManagerBaseLayout->addWidget( tabList ); } /* * Destroys the object and frees any allocated resources */ TabManagerBase::~TabManagerBase() { // no need to delete child widgets, Qt does it all for us } diff --git a/noncore/settings/tabmanager/tabmanagerbase.ui b/noncore/settings/tabmanager/tabmanagerbase.ui index 2fd10dd..5ac0ff3 100644 --- a/noncore/settings/tabmanager/tabmanagerbase.ui +++ b/noncore/settings/tabmanager/tabmanagerbase.ui @@ -1,75 +1,61 @@ <!DOCTYPE UI><UI> <class>TabManagerBase</class> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>TabManagerBase</cstring> </property> <property stdset="1"> <name>geometry</name> <rect> <x>0</x> <y>0</y> <width>289</width> <height>228</height> </rect> </property> <property stdset="1"> <name>caption</name> - <string>Tab Manger</string> + <string>Tab Manager</string> </property> <property> <name>layoutMargin</name> </property> <vbox> <property stdset="1"> <name>margin</name> - <number>0</number> + <number>4</number> </property> <property stdset="1"> <name>spacing</name> - <number>6</number> + <number>4</number> </property> <widget> <class>QListView</class> <column> <property> <name>text</name> - <string>Groups</string> - </property> - <property> - <name>clickable</name> - <bool>true</bool> - </property> - <property> - <name>resizeable</name> - <bool>true</bool> - </property> - </column> - <column> - <property> - <name>text</name> - <string>Applications</string> + <string>Hierarchy</string> </property> <property> <name>clickable</name> <bool>true</bool> </property> <property> <name>resizeable</name> <bool>true</bool> </property> </column> <property stdset="1"> <name>name</name> <cstring>tabList</cstring> </property> <property stdset="1"> <name>rootIsDecorated</name> <bool>true</bool> </property> </widget> </vbox> </widget> </UI> |