[Digikam-devel] extragear/graphics/digikam/utilities/cameragui

Gilles Caulier caulier.gilles at free.fr
Tue Mar 28 07:37:23 BST 2006


SVN commit 523419 by cgilles:

digikam from trunk : Camera GUI : moving 'Advanced settings to the right side bar. removed left sidebar to optimized thumb area. 

'Advanced Settings' tab is behing 'Properties' and 'Metadata' tabs for technical reasons. Actually, SideBar can only add a new tab to the bottom of tabs list. The current implementation is simple. Moving 'Advanced Settings' tab to the top requires sustentials changes in source codes. Please test the current implementation and give me a feedback.

CCMAIL: digikam-devel at kde.org

 M  +11 -19    cameraui.cpp  
 M  +16 -12    renamecustomizer.cpp  


--- trunk/extragear/graphics/digikam/utilities/cameragui/cameraui.cpp #523418:523419
@@ -99,7 +99,6 @@
         cancelBtn    = 0;
         splitter     = 0;
         rightSidebar = 0;
-        leftSidebar  = 0;
     }
 
     bool                          busy;
@@ -133,8 +132,6 @@
     AnimWidget                   *anim;
 
     ImagePropertiesSideBarCamGui *rightSidebar;
-    
-    Sidebar                      *leftSidebar;
 };    
 
 CameraUI::CameraUI(QWidget* parent, const QString& title,
@@ -150,22 +147,26 @@
     d = new CameraUIPriv;
     setHelp("camerainterface.anchor", "digikam");
 
-    // -- setup view -----------------------------------------
+    // -------------------------------------------------------------------------
     
     QGridLayout* viewBoxLayout = new QGridLayout(plainPage(), 2, 3);
     viewBoxLayout->setColStretch( 0, 0 );
     viewBoxLayout->setColStretch( 1, 3 );
     viewBoxLayout->setColStretch( 2, 1 );
     viewBoxLayout->setColStretch( 3, 0 );
-    QHBox* widget = new QHBox(plainPage());
-
+    QHBox* widget   = new QHBox(plainPage());
+    d->splitter     = new QSplitter(widget);
+    d->view         = new CameraIconView(this, d->splitter);
+    d->rightSidebar = new ImagePropertiesSideBarCamGui(widget, "CameraGui Sidebar Right", d->splitter,
+                                                       Digikam::Sidebar::Right, true);
+    d->splitter->setOpaqueResize(false);
+    
     // -------------------------------------------------------------------------
 
-    d->leftSidebar      = new Sidebar(widget, "CameraGui Sidebar Left", Digikam::Sidebar::Left, true);
-    d->splitter         = new QSplitter(widget);
-    d->advBox           = new QWidget(d->leftSidebar);
+    d->advBox           = new QWidget(d->rightSidebar);
     QGridLayout* grid   = new QGridLayout( d->advBox, 2, 1, KDialog::marginHint());
     d->renameCustomizer = new RenameCustomizer(d->advBox);
+    d->view->setRenameCustomizer(d->renameCustomizer);
     grid->addMultiCellWidget(d->renameCustomizer, 0, 0, 0, 1);
         
     QVGroupBox* exifBox = new QVGroupBox(i18n("Use Camera Information"), d->advBox);
@@ -181,20 +182,12 @@
     grid->addMultiCellWidget(exifBox, 1, 1, 0, 1);
     grid->setRowStretch(2, 10);
 
-    d->leftSidebar->setSplitter(d->splitter);
-    d->leftSidebar->appendTab(d->advBox, SmallIcon("configure"), i18n("Advanced Settings"));
+    d->rightSidebar->appendTab(d->advBox, SmallIcon("configure"), i18n("Advanced Settings"));
     
     // -------------------------------------------------------------------------
-
-    d->view = new CameraIconView(this, d->splitter);
-    d->view->setRenameCustomizer(d->renameCustomizer);
     
-    d->rightSidebar = new ImagePropertiesSideBarCamGui(widget, "CameraGui Sidebar Right", d->splitter,
-                                                       Digikam::Sidebar::Right, true);
     viewBoxLayout->addMultiCellWidget(widget, 0, 0, 0, 3);
     viewBoxLayout->setRowSpacing(1, spacingHint());
-    d->splitter->setOpaqueResize(false);
-    d->leftSidebar->loadViewState();
     d->rightSidebar->loadViewState();
         
     // -------------------------------------------------------------------------
@@ -346,7 +339,6 @@
 
 CameraUI::~CameraUI()
 {
-    delete d->leftSidebar;
     delete d->rightSidebar;
     delete d;
 }
--- trunk/extragear/graphics/digikam/utilities/cameragui/renamecustomizer.cpp #523418:523419
@@ -95,9 +95,9 @@
 
     // ----------------------------------------------------------------
 
-    d->renameDefault = new QRadioButton(i18n("Camera file names"), this);
+    d->renameDefault = new QRadioButton(i18n("Camera filenames"), this);
     QWhatsThis::add( d->renameDefault, i18n("<p>Toogle on this option to use camera "
-                                            "provided image file names without modifications."));
+                                            "provided image filenames without modifications."));
     mainLayout->addMultiCellWidget(d->renameDefault, 0, 0, 0, 1);
 
     d->renameDefaultBox = new QGroupBox( this );
@@ -105,7 +105,7 @@
     d->renameDefaultBox->setInsideMargin(0);
     d->renameDefaultBox->setColumnLayout(0, Qt::Vertical);
 
-    d->renameDefaultCase = new QLabel( i18n("Change case to"), d->renameDefaultBox );
+    d->renameDefaultCase = new QLabel( i18n("Change case to:"), d->renameDefaultBox );
     d->renameDefaultCase->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Preferred );
 
     d->renameDefaultCaseType = new QComboBox( d->renameDefaultBox );
@@ -113,7 +113,9 @@
     d->renameDefaultCaseType->insertItem(i18n("Upper"), 1);
     d->renameDefaultCaseType->insertItem(i18n("Lower"), 2);
     d->renameDefaultCaseType->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
-
+    QWhatsThis::add( d->renameDefaultCaseType, i18n("<p>Set here the method to use to change case "
+                                                    "of image filenames."));
+                                           
     QHBoxLayout* boxLayout = new QHBoxLayout( d->renameDefaultBox->layout() );
     boxLayout->addSpacing( 10 );
     boxLayout->addWidget( d->renameDefaultCase );
@@ -124,9 +126,9 @@
     // -------------------------------------------------------------
 
     d->renameCustom = new QRadioButton(i18n("Customize"), this);
-    QWhatsThis::add( d->renameCustom, i18n("<p>Toogle on this option to customize image file names "
+    mainLayout->addMultiCellWidget(d->renameCustom, 2, 2, 0, 1);
+    QWhatsThis::add( d->renameCustom, i18n("<p>Toogle on this option to customize image filenames "
                                            "during download."));
-    mainLayout->addMultiCellWidget(d->renameCustom, 2, 2, 0, 1);
 
     d->renameCustomBox = new QGroupBox(this);
     d->renameCustomBox->setFrameStyle(QFrame::NoFrame|QFrame::Plain);
@@ -141,17 +143,19 @@
 
     d->renameCustomPrefix = new KLineEdit(d->renameCustomBox);
     renameCustomBoxLayout->addMultiCellWidget(d->renameCustomPrefix, 0, 0, 2, 2);
-
+    QWhatsThis::add( d->renameCustomPrefix, i18n("<p>Set here the string to use like a prefix of "
+                                                 "image filenames."));
+                                                 
     d->renameCustomExif = new QCheckBox(i18n("Add date and time"), d->renameCustomBox);
+    renameCustomBoxLayout->addMultiCellWidget(d->renameCustomExif, 1, 1, 1, 2);
     QWhatsThis::add( d->renameCustomExif, i18n("<p>Toogle on this option to add to filename the "
-                                               "camera provided date and time"));
-    renameCustomBoxLayout->addMultiCellWidget(d->renameCustomExif, 1, 1, 1, 2);
+                                               "camera provided date and time."));
 
     d->renameCustomSeq = new QCheckBox(i18n("Add sequence number"), d->renameCustomBox);
-    QWhatsThis::add( d->renameCustomSeq, i18n("<p>Toogle on this option to add to filename a "
-                                              "sequence number"));
     renameCustomBoxLayout->addMultiCellWidget(d->renameCustomSeq, 2, 2, 1, 2);
-
+    QWhatsThis::add( d->renameCustomSeq, i18n("<p>Toogle on this option to add to filenames a "
+                                              "sequence number."));
+    
     mainLayout->addMultiCellWidget(d->renameCustomBox, 3, 3, 0, 1);
 
     // -- setup connections -------------------------------------------------



More information about the Digikam-devel mailing list