Replaced 'ShowToolbarAction' with the predefined toggleViewAction(),
some work on the entropy collection dialog. git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@108 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
		
							parent
							
								
									c991307ef8
								
							
						
					
					
						commit
						83d561d3a4
					
				| 
						 | 
					@ -35,9 +35,9 @@ Please move the mouse and/or press some keys until enought entropy for a reseed
 | 
				
			||||||
  <widget class="QProgressBar" name="progressBar" >
 | 
					  <widget class="QProgressBar" name="progressBar" >
 | 
				
			||||||
   <property name="geometry" >
 | 
					   <property name="geometry" >
 | 
				
			||||||
    <rect>
 | 
					    <rect>
 | 
				
			||||||
     <x>90</x>
 | 
					     <x>70</x>
 | 
				
			||||||
     <y>140</y>
 | 
					     <y>140</y>
 | 
				
			||||||
     <width>371</width>
 | 
					     <width>391</width>
 | 
				
			||||||
     <height>23</height>
 | 
					     <height>23</height>
 | 
				
			||||||
    </rect>
 | 
					    </rect>
 | 
				
			||||||
   </property>
 | 
					   </property>
 | 
				
			||||||
| 
						 | 
					@ -67,10 +67,10 @@ Please move the mouse and/or press some keys until enought entropy for a reseed
 | 
				
			||||||
  <widget class="WaitAnimationWidget" native="1" name="Animation" >
 | 
					  <widget class="WaitAnimationWidget" native="1" name="Animation" >
 | 
				
			||||||
   <property name="geometry" >
 | 
					   <property name="geometry" >
 | 
				
			||||||
    <rect>
 | 
					    <rect>
 | 
				
			||||||
     <x>10</x>
 | 
					     <x>420</x>
 | 
				
			||||||
     <y>140</y>
 | 
					     <y>10</y>
 | 
				
			||||||
     <width>61</width>
 | 
					     <width>41</width>
 | 
				
			||||||
     <height>51</height>
 | 
					     <height>41</height>
 | 
				
			||||||
    </rect>
 | 
					    </rect>
 | 
				
			||||||
   </property>
 | 
					   </property>
 | 
				
			||||||
  </widget>
 | 
					  </widget>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,5 @@
 | 
				
			||||||
<ui version="4.0" >
 | 
					<ui version="4.0" >
 | 
				
			||||||
 <author>Tarek Saidi</author>
 | 
					 <author>Tarek Saidi</author>
 | 
				
			||||||
 <comment></comment>
 | 
					 | 
				
			||||||
 <exportmacro></exportmacro>
 | 
					 | 
				
			||||||
 <class>MainWindow</class>
 | 
					 <class>MainWindow</class>
 | 
				
			||||||
 <widget class="QMainWindow" name="MainWindow" >
 | 
					 <widget class="QMainWindow" name="MainWindow" >
 | 
				
			||||||
  <property name="geometry" >
 | 
					  <property name="geometry" >
 | 
				
			||||||
| 
						 | 
					@ -120,49 +118,6 @@
 | 
				
			||||||
     <height>29</height>
 | 
					     <height>29</height>
 | 
				
			||||||
    </rect>
 | 
					    </rect>
 | 
				
			||||||
   </property>
 | 
					   </property>
 | 
				
			||||||
   <widget class="QMenu" name="menuAnsicht" >
 | 
					 | 
				
			||||||
    <property name="title" >
 | 
					 | 
				
			||||||
     <string>&View</string>
 | 
					 | 
				
			||||||
    </property>
 | 
					 | 
				
			||||||
    <widget class="QMenu" name="menuSpalten" >
 | 
					 | 
				
			||||||
     <property name="title" >
 | 
					 | 
				
			||||||
      <string>Columns</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
     <addaction name="ViewColumnsTitleAction" />
 | 
					 | 
				
			||||||
     <addaction name="ViewColumnsUsernameAction" />
 | 
					 | 
				
			||||||
     <addaction name="ViewColumnsUrlAction" />
 | 
					 | 
				
			||||||
     <addaction name="ViewColumnsPasswordAction" />
 | 
					 | 
				
			||||||
     <addaction name="ViewColumnsCommentAction" />
 | 
					 | 
				
			||||||
     <addaction name="separator" />
 | 
					 | 
				
			||||||
     <addaction name="ViewColumnsExpireAction" />
 | 
					 | 
				
			||||||
     <addaction name="ViewColumnsCreationAction" />
 | 
					 | 
				
			||||||
     <addaction name="ViewColumnsLastChangeAction" />
 | 
					 | 
				
			||||||
     <addaction name="ViewColumnsLastAccessAction" />
 | 
					 | 
				
			||||||
     <addaction name="ViewColumnsAttachmentAction" />
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
    <widget class="QMenu" name="menuType_Here" >
 | 
					 | 
				
			||||||
     <property name="title" >
 | 
					 | 
				
			||||||
      <string>Type Here</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
    <widget class="QMenu" name="menuTool_Button_Sizes" >
 | 
					 | 
				
			||||||
     <property name="title" >
 | 
					 | 
				
			||||||
      <string>Toolbar Icon Size</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
     <addaction name="ViewToolButtonSize16Action" />
 | 
					 | 
				
			||||||
     <addaction name="ViewToolButtonSize22Action" />
 | 
					 | 
				
			||||||
     <addaction name="ViewToolButtonSize28Action" />
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
    <addaction name="ViewShowToolbarAction" />
 | 
					 | 
				
			||||||
    <addaction name="ViewShowEntryDetailsAction" />
 | 
					 | 
				
			||||||
    <addaction name="ViewShowStatusbarAction" />
 | 
					 | 
				
			||||||
    <addaction name="separator" />
 | 
					 | 
				
			||||||
    <addaction name="ViewHideUsernamesAction" />
 | 
					 | 
				
			||||||
    <addaction name="ViewHidePasswordsAction" />
 | 
					 | 
				
			||||||
    <addaction name="separator" />
 | 
					 | 
				
			||||||
    <addaction name="menuSpalten" />
 | 
					 | 
				
			||||||
    <addaction name="menuTool_Button_Sizes" />
 | 
					 | 
				
			||||||
   </widget>
 | 
					 | 
				
			||||||
   <widget class="QMenu" name="menuBearbeiten" >
 | 
					   <widget class="QMenu" name="menuBearbeiten" >
 | 
				
			||||||
    <property name="title" >
 | 
					    <property name="title" >
 | 
				
			||||||
     <string>&Edit</string>
 | 
					     <string>&Edit</string>
 | 
				
			||||||
| 
						 | 
					@ -216,11 +171,6 @@
 | 
				
			||||||
     </property>
 | 
					     </property>
 | 
				
			||||||
     <addaction name="FileExpPlainTextAction" />
 | 
					     <addaction name="FileExpPlainTextAction" />
 | 
				
			||||||
    </widget>
 | 
					    </widget>
 | 
				
			||||||
    <widget class="QMenu" name="FileNewMenu" >
 | 
					 | 
				
			||||||
     <property name="title" >
 | 
					 | 
				
			||||||
      <string>&New Database</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
    <addaction name="FileNewAction" />
 | 
					    <addaction name="FileNewAction" />
 | 
				
			||||||
    <addaction name="FileOpenAction" />
 | 
					    <addaction name="FileOpenAction" />
 | 
				
			||||||
    <addaction name="FileCloseAction" />
 | 
					    <addaction name="FileCloseAction" />
 | 
				
			||||||
| 
						 | 
					@ -236,9 +186,46 @@
 | 
				
			||||||
    <addaction name="separator" />
 | 
					    <addaction name="separator" />
 | 
				
			||||||
    <addaction name="FileExitAction" />
 | 
					    <addaction name="FileExitAction" />
 | 
				
			||||||
   </widget>
 | 
					   </widget>
 | 
				
			||||||
 | 
					   <widget class="QMenu" name="ViewMenu" >
 | 
				
			||||||
 | 
					    <property name="title" >
 | 
				
			||||||
 | 
					     <string>&View</string>
 | 
				
			||||||
 | 
					    </property>
 | 
				
			||||||
 | 
					    <widget class="QMenu" name="menuSpalten" >
 | 
				
			||||||
 | 
					     <property name="title" >
 | 
				
			||||||
 | 
					      <string>Columns</string>
 | 
				
			||||||
 | 
					     </property>
 | 
				
			||||||
 | 
					     <addaction name="ViewColumnsTitleAction" />
 | 
				
			||||||
 | 
					     <addaction name="ViewColumnsUsernameAction" />
 | 
				
			||||||
 | 
					     <addaction name="ViewColumnsUrlAction" />
 | 
				
			||||||
 | 
					     <addaction name="ViewColumnsPasswordAction" />
 | 
				
			||||||
 | 
					     <addaction name="ViewColumnsCommentAction" />
 | 
				
			||||||
 | 
					     <addaction name="separator" />
 | 
				
			||||||
 | 
					     <addaction name="ViewColumnsExpireAction" />
 | 
				
			||||||
 | 
					     <addaction name="ViewColumnsCreationAction" />
 | 
				
			||||||
 | 
					     <addaction name="ViewColumnsLastChangeAction" />
 | 
				
			||||||
 | 
					     <addaction name="ViewColumnsLastAccessAction" />
 | 
				
			||||||
 | 
					     <addaction name="ViewColumnsAttachmentAction" />
 | 
				
			||||||
 | 
					    </widget>
 | 
				
			||||||
 | 
					    <widget class="QMenu" name="menuTool_Button_Sizes" >
 | 
				
			||||||
 | 
					     <property name="title" >
 | 
				
			||||||
 | 
					      <string>Toolbar Icon Size</string>
 | 
				
			||||||
 | 
					     </property>
 | 
				
			||||||
 | 
					     <addaction name="ViewToolButtonSize16Action" />
 | 
				
			||||||
 | 
					     <addaction name="ViewToolButtonSize22Action" />
 | 
				
			||||||
 | 
					     <addaction name="ViewToolButtonSize28Action" />
 | 
				
			||||||
 | 
					    </widget>
 | 
				
			||||||
 | 
					    <addaction name="ViewShowEntryDetailsAction" />
 | 
				
			||||||
 | 
					    <addaction name="ViewShowStatusbarAction" />
 | 
				
			||||||
 | 
					    <addaction name="separator" />
 | 
				
			||||||
 | 
					    <addaction name="ViewHideUsernamesAction" />
 | 
				
			||||||
 | 
					    <addaction name="ViewHidePasswordsAction" />
 | 
				
			||||||
 | 
					    <addaction name="separator" />
 | 
				
			||||||
 | 
					    <addaction name="menuSpalten" />
 | 
				
			||||||
 | 
					    <addaction name="menuTool_Button_Sizes" />
 | 
				
			||||||
 | 
					   </widget>
 | 
				
			||||||
   <addaction name="menuDatei" />
 | 
					   <addaction name="menuDatei" />
 | 
				
			||||||
   <addaction name="menuBearbeiten" />
 | 
					   <addaction name="menuBearbeiten" />
 | 
				
			||||||
   <addaction name="menuAnsicht" />
 | 
					   <addaction name="ViewMenu" />
 | 
				
			||||||
   <addaction name="menuExtras" />
 | 
					   <addaction name="menuExtras" />
 | 
				
			||||||
   <addaction name="menuHilfe" />
 | 
					   <addaction name="menuHilfe" />
 | 
				
			||||||
  </widget>
 | 
					  </widget>
 | 
				
			||||||
| 
						 | 
					@ -352,14 +339,6 @@
 | 
				
			||||||
    <string>Search in this group...</string>
 | 
					    <string>Search in this group...</string>
 | 
				
			||||||
   </property>
 | 
					   </property>
 | 
				
			||||||
  </action>
 | 
					  </action>
 | 
				
			||||||
  <action name="ViewShowToolbarAction" >
 | 
					 | 
				
			||||||
   <property name="checkable" >
 | 
					 | 
				
			||||||
    <bool>true</bool>
 | 
					 | 
				
			||||||
   </property>
 | 
					 | 
				
			||||||
   <property name="text" >
 | 
					 | 
				
			||||||
    <string>Show Toolbar</string>
 | 
					 | 
				
			||||||
   </property>
 | 
					 | 
				
			||||||
  </action>
 | 
					 | 
				
			||||||
  <action name="ViewShowEntryDetailsAction" >
 | 
					  <action name="ViewShowEntryDetailsAction" >
 | 
				
			||||||
   <property name="checkable" >
 | 
					   <property name="checkable" >
 | 
				
			||||||
    <bool>true</bool>
 | 
					    <bool>true</bool>
 | 
				
			||||||
| 
						 | 
					@ -542,21 +521,16 @@
 | 
				
			||||||
   </property>
 | 
					   </property>
 | 
				
			||||||
  </action>
 | 
					  </action>
 | 
				
			||||||
 </widget>
 | 
					 </widget>
 | 
				
			||||||
 <pixmapfunction></pixmapfunction>
 | 
					 | 
				
			||||||
 <customwidgets>
 | 
					 <customwidgets>
 | 
				
			||||||
  <customwidget>
 | 
					  <customwidget>
 | 
				
			||||||
   <class>KeepassGroupView</class>
 | 
					   <class>KeepassGroupView</class>
 | 
				
			||||||
   <extends>QTreeWidget</extends>
 | 
					   <extends>QTreeWidget</extends>
 | 
				
			||||||
   <header>../../src/lib/GroupView.h</header>
 | 
					   <header>../../src/lib/GroupView.h</header>
 | 
				
			||||||
   <container>0</container>
 | 
					 | 
				
			||||||
   <pixmap></pixmap>
 | 
					 | 
				
			||||||
  </customwidget>
 | 
					  </customwidget>
 | 
				
			||||||
  <customwidget>
 | 
					  <customwidget>
 | 
				
			||||||
   <class>KeepassEntryView</class>
 | 
					   <class>KeepassEntryView</class>
 | 
				
			||||||
   <extends>QTreeWidget</extends>
 | 
					   <extends>QTreeWidget</extends>
 | 
				
			||||||
   <header>../../src/lib/EntryView.h</header>
 | 
					   <header>../../src/lib/EntryView.h</header>
 | 
				
			||||||
   <container>0</container>
 | 
					 | 
				
			||||||
   <pixmap></pixmap>
 | 
					 | 
				
			||||||
  </customwidget>
 | 
					  </customwidget>
 | 
				
			||||||
 </customwidgets>
 | 
					 </customwidgets>
 | 
				
			||||||
 <resources/>
 | 
					 <resources/>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -45,7 +45,9 @@ void WaitAnimationWidget::refreshAnimation(){
 | 
				
			||||||
		float diff=CurAngle-i*0.16666667f;
 | 
							float diff=CurAngle-i*0.16666667f;
 | 
				
			||||||
		if(diff>0.5f)
 | 
							if(diff>0.5f)
 | 
				
			||||||
			diff=1.0f-diff;
 | 
								diff=1.0f-diff;
 | 
				
			||||||
		CircSizes[i]=1.0+exp(-10.0f*diff*diff);		
 | 
							if(diff<-0.5f)
 | 
				
			||||||
 | 
								diff=1.0f+diff;
 | 
				
			||||||
 | 
							CircSizes[i]=1.0+exp(-14.0f*diff*diff);		
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	repaint();	
 | 
						repaint();	
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -53,8 +55,10 @@ void WaitAnimationWidget::refreshAnimation(){
 | 
				
			||||||
void WaitAnimationWidget::paintEvent(QPaintEvent* event){
 | 
					void WaitAnimationWidget::paintEvent(QPaintEvent* event){
 | 
				
			||||||
	QPainter painter(this);
 | 
						QPainter painter(this);
 | 
				
			||||||
	painter.setRenderHints(QPainter::Antialiasing,true);
 | 
						painter.setRenderHints(QPainter::Antialiasing,true);
 | 
				
			||||||
 | 
						painter.setBrush(QColor(255,255,255));	
 | 
				
			||||||
 | 
						painter.setPen(QColor(255,255,255));
 | 
				
			||||||
	for(int i=0;i<6;i++){
 | 
						for(int i=0;i<6;i++){
 | 
				
			||||||
		float d=CircSizes[i]*6;
 | 
							float d=CircSizes[i]*5.0;
 | 
				
			||||||
		QRectF rect(CircPositions[i].x()-d/2,CircPositions[i].y()-d/2,d,d);
 | 
							QRectF rect(CircPositions[i].x()-d/2,CircPositions[i].y()-d/2,d,d);
 | 
				
			||||||
		painter.drawEllipse(rect);	
 | 
							painter.drawEllipse(rect);	
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -157,6 +157,7 @@ void KeepassMainWindow::setupToolbar(){
 | 
				
			||||||
	toolBar=new QToolBar(this);
 | 
						toolBar=new QToolBar(this);
 | 
				
			||||||
	addToolBar(toolBar);
 | 
						addToolBar(toolBar);
 | 
				
			||||||
	toolBar->setIconSize(QSize(config.ToolbarIconSize,config.ToolbarIconSize));
 | 
						toolBar->setIconSize(QSize(config.ToolbarIconSize,config.ToolbarIconSize));
 | 
				
			||||||
 | 
						ViewShowToolbarAction=toolBar->toggleViewAction();
 | 
				
			||||||
	toolBar->addAction(FileNewAction);
 | 
						toolBar->addAction(FileNewAction);
 | 
				
			||||||
	toolBar->addAction(FileOpenAction);
 | 
						toolBar->addAction(FileOpenAction);
 | 
				
			||||||
	toolBar->addAction(FileSaveAction);
 | 
						toolBar->addAction(FileSaveAction);
 | 
				
			||||||
| 
						 | 
					@ -223,6 +224,8 @@ void KeepassMainWindow::setupMenus(){
 | 
				
			||||||
	EntryView->ContextMenu->addAction(EditCloneEntryAction);
 | 
						EntryView->ContextMenu->addAction(EditCloneEntryAction);
 | 
				
			||||||
	EntryView->ContextMenu->addAction(EditDeleteEntryAction);
 | 
						EntryView->ContextMenu->addAction(EditDeleteEntryAction);
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
 | 
						ViewShowToolbarAction->setText(tr("Show Toolbar"));
 | 
				
			||||||
 | 
						ViewMenu->insertAction(ViewShowEntryDetailsAction,ViewShowToolbarAction);
 | 
				
			||||||
	ViewShowToolbarAction->setChecked(config.Toolbar);
 | 
						ViewShowToolbarAction->setChecked(config.Toolbar);
 | 
				
			||||||
	ViewShowEntryDetailsAction->setChecked(config.EntryDetails);
 | 
						ViewShowEntryDetailsAction->setChecked(config.EntryDetails);
 | 
				
			||||||
	ViewHidePasswordsAction->setChecked(config.ListView_HidePasswords);
 | 
						ViewHidePasswordsAction->setChecked(config.ListView_HidePasswords);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -117,6 +117,7 @@ private:
 | 
				
			||||||
 QLabel* StatusBarSelection;
 | 
					 QLabel* StatusBarSelection;
 | 
				
			||||||
 QToolBar* toolBar;
 | 
					 QToolBar* toolBar;
 | 
				
			||||||
 QSystemTrayIcon* SysTray;
 | 
					 QSystemTrayIcon* SysTray;
 | 
				
			||||||
 | 
					 QAction* ViewShowToolbarAction;
 | 
				
			||||||
 bool ShutingDown;
 | 
					 bool ShutingDown;
 | 
				
			||||||
protected:
 | 
					protected:
 | 
				
			||||||
 void closeEvent(QCloseEvent* event);
 | 
					 void closeEvent(QCloseEvent* event);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue