[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenonbeta/karchiver
From:       Eric Coquelle <eric.coquelle () unice ! fr>
Date:       2006-09-10 2:21:02
Message-ID: 1157854862.308610.28600.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 582689 by coquelle:


Reorganized the ItemProperties dialog box


 M  +1 -0      ChangeLog  
 M  +1 -1      Makefile.am  
 M  +68 -8     cproprietes.cpp  
 M  +12 -21    cproprietes.h  
 D             cproprietesdata.cpp  
 M  +14 -13    karchiveur.cpp  


--- trunk/kdenonbeta/karchiver/ChangeLog #582688:582689
@@ -7,6 +7,7 @@
 Added a connection to an anti-virus scanner
 Improved the CheckForUpdates component
 Improved the Compilation & Installation wizard
+Reorganized the ItemProperties dialog box
 Fixed compilation pb on Solaris
 Fixed contextual menu Extract Here...
 Fixed annoying behavior of "Overwrite remaining files"
--- trunk/kdenonbeta/karchiver/Makefile.am #582688:582689
@@ -31,7 +31,7 @@
 
 libkarchiver_la_SOURCES = ctar.cpp carj.cpp cbz2.cpp cgz.cpp clha.cpp crar.cpp c7z.cpp\
 	czip.cpp ctarbz2.cpp ctargz.cpp carchive.cpp chistorique.cpp karchiveurpart.cpp \
-	caddfilesdata.cpp caddfiles.cpp ktipofday.cpp cfinddata.cpp cfind.cpp cproprietesdata.cpp \
+	caddfilesdata.cpp caddfiles.cpp ktipofday.cpp cfinddata.cpp cfind.cpp \
 	cproprietes.cpp cpreferencesdata.cpp cpreferences.cpp clistview.cpp car.cpp csit.cpp\
 	cwizardstep3data.cpp cwizardstep3.cpp \
 	cwizardstep1patch.cpp cwizardinstallation.cpp cwizardcutt.cpp \
--- trunk/kdenonbeta/karchiver/cproprietes.cpp #582688:582689
@@ -14,15 +14,20 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
+ 
 #include "cproprietes.h"
 
+#include <qfont.h>
+#include <qlayout.h>
+
+#include <klocale.h>
+
+
 CProprietes::CProprietes(QWidget *parent, const char *name) : QDialog(parent,name,true){
 	initDialog();
 	
 	//Aditionnal init
 	setCaption(i18n("Properties"));
-	lTaille->setAlignment(Qt::AlignRight);
-	cbPermissions->setChecked(false);
 	
 	connect(QPushButton_1,SIGNAL(clicked()), SLOT(accept()) );
 }
@@ -30,27 +35,82 @@
 CProprietes::~CProprietes(){
 }
 
+void  CProprietes::initDialog(){
+  
+  QGridLayout* layout=new QGridLayout(this, 5, 2, 12);
+  
+  QLabel* QLabel_1= new QLabel(this,"NoName");
+  QLabel_1->setText(i18n("The file:"));
+  layout->addMultiCellWidget(QLabel_1, 0, 0, 0, 1);
+
+  lfilename= new QLabel(this,"NoName");
+  lfilename->setFont(QFont("helvetica", 12, 75,true));
+  layout->addMultiCellWidget(lfilename, 1, 1, 0, 1);
+
+  
+  QLabel* QLabel_3= new QLabel(this,"NoName");
+  QLabel_3->setText(i18n("Will be extracted in:"));
+  layout->addWidget(QLabel_3, 0, 2);
+
+  lPath= new QLabel(this,"NoName");
+  lPath->setFont(QFont("helvetica", 12, 75,true));
+  layout->addWidget(lPath, 1, 2);
+
+  
+  QLabel* QLabel_4= new QLabel(this,"NoName");
+  QLabel_4->setText(i18n("It will occupy:"));
+  layout->addMultiCellWidget(QLabel_4, 2, 2, 0, 1);
+
+  lSize= new QLabel(this,"NoName");
+  lSize->setFont(QFont("helvetica", 12, 75,true));
+  lSize->setAlignment(Qt::AlignRight);
+  layout->addWidget(lSize, 3, 0);
+
+  QLabel* QLabel_9= new QLabel(this,"NoName");
+  QLabel_9->setText(i18n("bytes on disk"));
+  layout->addWidget(QLabel_9, 3, 1);
+
+  
+  lPermissiontxt= new QLabel(this,"NoName");
+  lPermissiontxt->setText(i18n("It has these permissions:"));
+  layout->addMultiCellWidget(lPermissiontxt, 4, 4, 0,  1);
+  
+  lPermission= new QLabel(this,"NoName");
+  lPermission->setFont(QFont("helvetica", 12, 75,true));
+  layout->addMultiCellWidget(lPermission, 5, 5, 0,  1);
+
+  lPermissiontxt->setEnabled(false);
+  lPermission->setEnabled(false);
+
+  QPushButton_1= new QPushButton(this,"NoName");
+  QPushButton_1->setText(i18n("OK"));
+  layout->addMultiCellWidget(QPushButton_1, 4, 5, 2,  2);
+}
+
 /** set the path to be displayed of selected
 item in the listview */
 void CProprietes::setFilePath( QString path ){
-	lPath->setText(path);
+  if(path.startsWith("/"))
+    path.remove(0,1);
+  lPath->setText(path);
 }
 
 /** set the name of the selected file */
-void CProprietes::setFileName( QString nom ){
-	lNomFichier->setText(nom);
+void CProprietes::setFileName( QString name ){
+  lfilename->setText(name);
 }
 
 /** set the permissions of the selected file */
 void CProprietes::setPermission( QString perm ){
-	cbPermissions->setChecked(true);
-	lPermission->setText(perm);
+  lPermissiontxt->setEnabled(true);
+  lPermission->setEnabled(true);
+  lPermission->setText(perm);
 }
 
 /** set the size which the selected file will
 occupy on disk */
 void CProprietes::setSize( QString size ){
-	lTaille->setText(size);
+  lSize->setText(size);
 }
 
 #include "cproprietes.moc"
--- trunk/kdenonbeta/karchiver/cproprietes.h #582688:582689
@@ -18,16 +18,11 @@
 #ifndef CPROPRIETES_H
 #define CPROPRIETES_H
 
-//Generated area. DO NOT EDIT!!!(begin)
 #include <qwidget.h>
 #include <qlabel.h>
-#include <qcheckbox.h>
 #include <qpushbutton.h>
-//Generated area. DO NOT EDIT!!!(end)
-
 #include <qdialog.h>
 
-#include <klocale.h>
 
 /**
   *@author Eric Coquelle
@@ -40,29 +35,25 @@
 	~CProprietes();
   /** set the size which the selected file will
       occupy on disk */
-  void setSize( QString taille );
+  void setSize( QString  );
   /** set the permissions of the selected file */
-  void setPermission( QString perm );
+  void setPermission( QString  );
   /** set the name of the selected file */
-  void setFileName( QString nom );
+  void setFileName( QString  );
   /** set the path to be displayed of selected
-item in the listview */
-  void setFilePath( QString path );
+      item in the listview */
+  void setFilePath( QString  );
 
 protected: 
-	void initDialog();
+  void initDialog();
 
 private:
-  QLabel *QLabel_1;
-	QLabel *lNomFichier;
-	QLabel *QLabel_3;
-	QLabel *lPath;
-	QCheckBox *cbPermissions;
-	QLabel *lPermission;
-	QLabel *QLabel_7;
-	QLabel *lTaille;
-	QLabel *QLabel_9;
-	QPushButton *QPushButton_1;
+  QLabel *lfilename;
+  QLabel *lPath;
+  QLabel *lPermission;
+  QLabel* lPermissiontxt;
+  QLabel *lSize;
+  QPushButton *QPushButton_1;
 };
 
 #endif
--- trunk/kdenonbeta/karchiver/karchiveur.cpp #582688:582689
@@ -1325,20 +1325,21 @@
 /** Display in a dialog box some informations
 concerning the selected file */
 void KarchiveurApp::slotDisplayFileProprieties(){
-	CProprietes propr;
-	QListViewItem* l;
-	int kindofCompressor;
+  CProprietes propr;
+  QListViewItem* l;
+  int kindofCompressor;
+  
+  l=view->currentItem();
+  archivechoice->findKindOfCompressor();
+  kindofCompressor=archivechoice->getKindOfCompressor();
 
-	l=view->currentItem();
-	kindofCompressor=archivechoice->getKindOfCompressor();
-
-	propr.setFileName(l->text(0));
-	propr.setFilePath(l->text(6));
-	propr.setSize(l->text(1));
-	if((kindofCompressor==TAR)||(kindofCompressor==TARGZ)||(kindofCompressor==TARBZ2))
-		propr.setPermission(l->text(5));
-
-	propr.exec();
+  propr.setFileName(l->text(0));
+  propr.setFilePath(l->text(6));
+  propr.setSize(l->text(1));
+  if((kindofCompressor==TAR)||(kindofCompressor==TARGZ)||(kindofCompressor==TARBZ2))
+          propr.setPermission(l->text(5));
+  
+  propr.exec();
 }
 
 void KarchiveurApp::keyPressEvent ( QKeyEvent * e )
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic