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
master
tarek_saidi 18 years ago
parent c991307ef8
commit 83d561d3a4
  1. 12
      src/forms/CollectEntropyDlg.ui
  2. 102
      src/forms/MainWindow.ui
  3. 8
      src/lib/WaitAnimationWidget.cpp
  4. 3
      src/mainwindow.cpp
  5. 1
      src/mainwindow.h

@ -35,9 +35,9 @@ Please move the mouse and/or press some keys until enought entropy for a reseed
<widget class="QProgressBar" name="progressBar" >
<property name="geometry" >
<rect>
<x>90</x>
<x>70</x>
<y>140</y>
<width>371</width>
<width>391</width>
<height>23</height>
</rect>
</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" >
<property name="geometry" >
<rect>
<x>10</x>
<y>140</y>
<width>61</width>
<height>51</height>
<x>420</x>
<y>10</y>
<width>41</width>
<height>41</height>
</rect>
</property>
</widget>

@ -1,7 +1,5 @@
<ui version="4.0" >
<author>Tarek Saidi</author>
<comment></comment>
<exportmacro></exportmacro>
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow" >
<property name="geometry" >
@ -120,49 +118,6 @@
<height>29</height>
</rect>
</property>
<widget class="QMenu" name="menuAnsicht" >
<property name="title" >
<string>&amp;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" >
<property name="title" >
<string>&amp;Edit</string>
@ -216,11 +171,6 @@
</property>
<addaction name="FileExpPlainTextAction" />
</widget>
<widget class="QMenu" name="FileNewMenu" >
<property name="title" >
<string>&amp;New Database</string>
</property>
</widget>
<addaction name="FileNewAction" />
<addaction name="FileOpenAction" />
<addaction name="FileCloseAction" />
@ -236,9 +186,46 @@
<addaction name="separator" />
<addaction name="FileExitAction" />
</widget>
<widget class="QMenu" name="ViewMenu" >
<property name="title" >
<string>&amp;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="menuBearbeiten" />
<addaction name="menuAnsicht" />
<addaction name="ViewMenu" />
<addaction name="menuExtras" />
<addaction name="menuHilfe" />
</widget>
@ -352,14 +339,6 @@
<string>Search in this group...</string>
</property>
</action>
<action name="ViewShowToolbarAction" >
<property name="checkable" >
<bool>true</bool>
</property>
<property name="text" >
<string>Show Toolbar</string>
</property>
</action>
<action name="ViewShowEntryDetailsAction" >
<property name="checkable" >
<bool>true</bool>
@ -542,21 +521,16 @@
</property>
</action>
</widget>
<pixmapfunction></pixmapfunction>
<customwidgets>
<customwidget>
<class>KeepassGroupView</class>
<extends>QTreeWidget</extends>
<header>../../src/lib/GroupView.h</header>
<container>0</container>
<pixmap></pixmap>
</customwidget>
<customwidget>
<class>KeepassEntryView</class>
<extends>QTreeWidget</extends>
<header>../../src/lib/EntryView.h</header>
<container>0</container>
<pixmap></pixmap>
</customwidget>
</customwidgets>
<resources/>

@ -45,7 +45,9 @@ void WaitAnimationWidget::refreshAnimation(){
float diff=CurAngle-i*0.16666667f;
if(diff>0.5f)
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();
}
@ -53,8 +55,10 @@ void WaitAnimationWidget::refreshAnimation(){
void WaitAnimationWidget::paintEvent(QPaintEvent* event){
QPainter painter(this);
painter.setRenderHints(QPainter::Antialiasing,true);
painter.setBrush(QColor(255,255,255));
painter.setPen(QColor(255,255,255));
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);
painter.drawEllipse(rect);

@ -157,6 +157,7 @@ void KeepassMainWindow::setupToolbar(){
toolBar=new QToolBar(this);
addToolBar(toolBar);
toolBar->setIconSize(QSize(config.ToolbarIconSize,config.ToolbarIconSize));
ViewShowToolbarAction=toolBar->toggleViewAction();
toolBar->addAction(FileNewAction);
toolBar->addAction(FileOpenAction);
toolBar->addAction(FileSaveAction);
@ -223,6 +224,8 @@ void KeepassMainWindow::setupMenus(){
EntryView->ContextMenu->addAction(EditCloneEntryAction);
EntryView->ContextMenu->addAction(EditDeleteEntryAction);
ViewShowToolbarAction->setText(tr("Show Toolbar"));
ViewMenu->insertAction(ViewShowEntryDetailsAction,ViewShowToolbarAction);
ViewShowToolbarAction->setChecked(config.Toolbar);
ViewShowEntryDetailsAction->setChecked(config.EntryDetails);
ViewHidePasswordsAction->setChecked(config.ListView_HidePasswords);

@ -117,6 +117,7 @@ private:
QLabel* StatusBarSelection;
QToolBar* toolBar;
QSystemTrayIcon* SysTray;
QAction* ViewShowToolbarAction;
bool ShutingDown;
protected:
void closeEvent(QCloseEvent* event);