created shortcuts for main functions... i'm not shure, if this is crossplatform conform and if a macUser is happy with these shortcuts...

--HG--
branch : develop
This commit is contained in:
cosina 2014-01-16 14:54:01 +01:00
parent b89582897f
commit f25ae9384f
3 changed files with 43 additions and 13 deletions

View File

@ -261,7 +261,7 @@ void MainWindow::SetToolButton(bool checked, Tool::Tools t, const QString &curso
{ {
if (checked) if (checked)
{ {
CanselTool(); CancelTool();
tool = t; tool = t;
QPixmap pixmap(cursor); QPixmap pixmap(cursor);
QCursor cur(pixmap, 2, 3); QCursor cur(pixmap, 2, 3);
@ -453,7 +453,7 @@ void MainWindow::ToolDetail(bool checked)
{ {
if (checked) if (checked)
{ {
CanselTool(); CancelTool();
tool = Tool::Detail; tool = Tool::Detail;
QPixmap pixmap("://cursor/new_detail_cursor.png"); QPixmap pixmap("://cursor/new_detail_cursor.png");
QCursor cur(pixmap, 2, 3); QCursor cur(pixmap, 2, 3);
@ -731,7 +731,7 @@ void MainWindow::mouseMove(const QPointF &scenePos)
mouseCoordinate->setText(string); mouseCoordinate->setText(string);
} }
void MainWindow::CanselTool() void MainWindow::CancelTool()
{ {
switch ( tool ) switch ( tool )
{ {
@ -863,7 +863,7 @@ void MainWindow::CanselTool()
void MainWindow::ArrowTool() void MainWindow::ArrowTool()
{ {
CanselTool(); CancelTool();
ui->actionArrowTool->setChecked(true); ui->actionArrowTool->setChecked(true);
tool = Tool::ArrowTool; tool = Tool::ArrowTool;
QCursor cur(Qt::ArrowCursor); QCursor cur(Qt::ArrowCursor);
@ -1057,7 +1057,7 @@ void MainWindow::Clear()
doc->clear(); doc->clear();
sceneDraw->clear(); sceneDraw->clear();
sceneDetails->clear(); sceneDetails->clear();
CanselTool(); CancelTool();
comboBoxDraws->clear(); comboBoxDraws->clear();
fileName.clear(); fileName.clear();
ui->actionOptionDraw->setEnabled(false); ui->actionOptionDraw->setEnabled(false);
@ -1300,7 +1300,7 @@ void MainWindow::AutoSavePattern()
MainWindow::~MainWindow() MainWindow::~MainWindow()
{ {
CanselTool(); CancelTool();
delete ui; delete ui;
delete pattern; delete pattern;

View File

@ -523,7 +523,7 @@ private:
/** /**
* @brief CanselTool * @brief CanselTool
*/ */
void CanselTool(); void CancelTool();
/** /**
* @brief ArrowTool * @brief ArrowTool
*/ */

View File

@ -48,7 +48,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>150</width> <width>150</width>
<height>150</height> <height>144</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -303,7 +303,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>150</width> <width>150</width>
<height>58</height> <height>56</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -379,7 +379,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>150</width> <width>150</width>
<height>104</height> <height>100</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -507,7 +507,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>150</width> <width>150</width>
<height>58</height> <height>56</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -580,7 +580,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>150</width> <width>150</width>
<height>58</height> <height>56</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -664,7 +664,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1100</width> <width>1100</width>
<height>25</height> <height>21</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menuFile"> <widget class="QMenu" name="menuFile">
@ -764,6 +764,9 @@
<property name="toolTip"> <property name="toolTip">
<string>Create a new pattern</string> <string>Create a new pattern</string>
</property> </property>
<property name="shortcut">
<string>Ctrl+N</string>
</property>
</action> </action>
<action name="actionOpen"> <action name="actionOpen">
<property name="icon"> <property name="icon">
@ -793,6 +796,9 @@
<property name="toolTip"> <property name="toolTip">
<string>Save pattern</string> <string>Save pattern</string>
</property> </property>
<property name="shortcut">
<string>Ctrl+S</string>
</property>
</action> </action>
<action name="actionSaveAs"> <action name="actionSaveAs">
<property name="enabled"> <property name="enabled">
@ -809,6 +815,9 @@
<property name="toolTip"> <property name="toolTip">
<string>Save not yet saved pattern</string> <string>Save not yet saved pattern</string>
</property> </property>
<property name="shortcut">
<string>Ctrl+Shift+S</string>
</property>
</action> </action>
<action name="actionDraw"> <action name="actionDraw">
<property name="checkable"> <property name="checkable">
@ -830,6 +839,9 @@
<property name="toolTip"> <property name="toolTip">
<string>Draw mode</string> <string>Draw mode</string>
</property> </property>
<property name="shortcut">
<string>Ctrl+W</string>
</property>
</action> </action>
<action name="actionDetails"> <action name="actionDetails">
<property name="checkable"> <property name="checkable">
@ -848,6 +860,9 @@
<property name="toolTip"> <property name="toolTip">
<string>Details mode</string> <string>Details mode</string>
</property> </property>
<property name="shortcut">
<string>Ctrl+E</string>
</property>
</action> </action>
<action name="actionArrowTool"> <action name="actionArrowTool">
<property name="checkable"> <property name="checkable">
@ -878,6 +893,9 @@
<property name="toolTip"> <property name="toolTip">
<string>Add new pattern piece</string> <string>Add new pattern piece</string>
</property> </property>
<property name="shortcut">
<string>Ctrl+Shift+N</string>
</property>
</action> </action>
<action name="actionOptionDraw"> <action name="actionOptionDraw">
<property name="icon"> <property name="icon">
@ -905,6 +923,9 @@
<property name="toolTip"> <property name="toolTip">
<string>Tables of variables</string> <string>Tables of variables</string>
</property> </property>
<property name="shortcut">
<string>Ctrl+T</string>
</property>
</action> </action>
<action name="actionHistory"> <action name="actionHistory">
<property name="checkable"> <property name="checkable">
@ -917,6 +938,9 @@
<property name="text"> <property name="text">
<string>History</string> <string>History</string>
</property> </property>
<property name="shortcut">
<string>Ctrl+H</string>
</property>
</action> </action>
<action name="actionLayout"> <action name="actionLayout">
<property name="icon"> <property name="icon">
@ -929,6 +953,9 @@
<property name="toolTip"> <property name="toolTip">
<string>Create layout</string> <string>Create layout</string>
</property> </property>
<property name="shortcut">
<string>Ctrl+L</string>
</property>
</action> </action>
<action name="actionAbout_Qt"> <action name="actionAbout_Qt">
<property name="text"> <property name="text">
@ -944,6 +971,9 @@
<property name="text"> <property name="text">
<string>Exit</string> <string>Exit</string>
</property> </property>
<property name="shortcut">
<string>Ctrl+Q</string>
</property>
</action> </action>
</widget> </widget>
<layoutdefault spacing="6" margin="11"/> <layoutdefault spacing="6" margin="11"/>