Added helpwindow

fixed wersions
edited PKGBUILD
edited scripts
This commit is contained in:
arcan1s
2013-09-01 14:16:23 +04:00
parent cdbaa00d06
commit cd3857adc1
16 changed files with 316 additions and 18 deletions

View File

@ -6,7 +6,7 @@ pkgver=1.0.3
pkgrel=1
pkgdesc="Software package for analysis of molecular dynamics trajectories"
arch=(any)
url="https://github.com/arcan1s/moldyn/mathmech"
url="https://github.com/arcan1s/moldyn"
license=('GPL')
depends=('qt4' 'qwt')
makedepends=('unzip' 'cmake' 'automoc4')

1
mathmech/mathmech/mathmech.desktop Normal file → Executable file
View File

@ -1,3 +1,4 @@
#!/usr/bin/env xdg-open
[Desktop Entry]
Name=Mathematical Molecular Mechanics
Comment=GUI for mathmech program pack

View File

@ -29,7 +29,7 @@ p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Liberation Serif'; font-size:10pt; font-weight:400; font-style:normal;">
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Mathematical Molecular Mechanics</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Version:</span> 1.0.0</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Version:</span> 1.0.3</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">License:</span> GPL</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Author:</span> Evgeniy Alekseev</p>

View File

@ -29,7 +29,7 @@ p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Liberation Serif'; font-size:10pt; font-weight:400; font-style:normal;">
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Mathematical Molecular Mechanics</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Версия:</span> 1.0.0</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Версия:</span> 1.0.3</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Лицензия:</span> GPL</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Автор:</span> Evgeniy Alekseev</p>
@ -230,7 +230,7 @@ p, li { white-space: pre-wrap; }
<location filename="../../build/src/ui_aglallwindow.h" line="252"/>
<location filename="../../build/src/ui_aglallwindow.h" line="254"/>
<source>Mask of output files</source>
<translation>Маска выходных файлов</translation>
<translation>Маска файлов</translation>
</message>
<message>
<location filename="../../build/src/ui_aglallwindow.h" line="257"/>

View File

@ -0,0 +1,21 @@
#include "helpwindow.h"
#include "ui_helpwindow.h"
HelpWindow::HelpWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::HelpWindow)
{
ui->setupUi(this);
}
HelpWindow::~HelpWindow()
{
delete ui;
}
// ESC press event
void HelpWindow::keyPressEvent(QKeyEvent *pressedKey)
{
if (pressedKey->key() == Qt::Key_Escape)
close();
}

View File

@ -0,0 +1,25 @@
#ifndef HELPWINDOW_H
#define HELPWINDOW_H
#include <QMainWindow>
namespace Ui {
class HelpWindow;
}
class HelpWindow : public QMainWindow
{
Q_OBJECT
public:
explicit HelpWindow(QWidget *parent = 0);
~HelpWindow();
private:
Ui::HelpWindow *ui;
// ESC pressed event
void keyPressEvent(QKeyEvent *pressedKey);
};
#endif /* HELPWINDOW_H */

View File

@ -0,0 +1,218 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>HelpWindow</class>
<widget class="QMainWindow" name="HelpWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>598</width>
<height>456</height>
</rect>
</property>
<property name="windowTitle">
<string>Help</string>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QToolBox" name="toolBox">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="page_general">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>580</width>
<height>233</height>
</rect>
</property>
<property name="toolTip">
<string>General help</string>
</property>
<attribute name="label">
<string>General</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QTextBrowser" name="textBrowser_general"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_trj">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>580</width>
<height>233</height>
</rect>
</property>
<property name="toolTip">
<string>Help about trj</string>
</property>
<attribute name="label">
<string>trj</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QTextBrowser" name="textBrowser_trj"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_statgen">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>580</width>
<height>233</height>
</rect>
</property>
<property name="toolTip">
<string>Help about statgen</string>
</property>
<attribute name="label">
<string>statgen</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QTextBrowser" name="textBrowser_statgen"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_envir">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>580</width>
<height>233</height>
</rect>
</property>
<property name="toolTip">
<string>Help about envir</string>
</property>
<attribute name="label">
<string>envir</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<widget class="QTextBrowser" name="textBrowser_envir"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_radf">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>580</width>
<height>233</height>
</rect>
</property>
<property name="toolTip">
<string>Help about radf</string>
</property>
<attribute name="label">
<string>radf</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="0">
<widget class="QTextBrowser" name="textBrowser_radf"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_trj2pdb">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>580</width>
<height>233</height>
</rect>
</property>
<property name="toolTip">
<string>Help about trj2pdb</string>
</property>
<attribute name="label">
<string>trj2pdb</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="0">
<widget class="QTextBrowser" name="textBrowser_trj2pdb"/>
</item>
</layout>
</widget>
</widget>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButton">
<property name="minimumSize">
<size>
<width>80</width>
<height>23</height>
</size>
</property>
<property name="toolTip">
<string>Close window</string>
</property>
<property name="text">
<string>Close</string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
<tabstops>
<tabstop>textBrowser_general</tabstop>
<tabstop>pushButton</tabstop>
<tabstop>textBrowser_trj</tabstop>
<tabstop>textBrowser_statgen</tabstop>
<tabstop>textBrowser_envir</tabstop>
<tabstop>textBrowser_radf</tabstop>
<tabstop>textBrowser_trj2pdb</tabstop>
</tabstops>
<resources/>
<connections>
<connection>
<sender>pushButton</sender>
<signal>clicked()</signal>
<receiver>HelpWindow</receiver>
<slot>close()</slot>
<hints>
<hint type="sourcelabel">
<x>545</x>
<y>431</y>
</hint>
<hint type="destinationlabel">
<x>598</x>
<y>414</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -5,10 +5,11 @@
#include "agglwindow.h"
#include "aglallwindow.h"
#include "atomtypeswindow.h"
#include "helpwindow.h"
#include "settingswindow.h"
#include "statgengraphwindow.h"
#include "clear_items.h"
#include "start_events.h"
#include "statgengraphwindow.h"
#include "update_fields.h"
#include "mainwindow.h"
@ -928,9 +929,10 @@ void MainWindow::createActions()
{
connect(ui->actionAtom_types_file, SIGNAL(triggered()), this, SLOT(createAtomTypes()));
connect(ui->actionAgglomerate_file, SIGNAL(triggered()), this, SLOT(createAgglFile()));
connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(aboutWin()));
connect(ui->actionSettings, SIGNAL(triggered()), this, SLOT(settingsWinShow()));
connect(ui->actionAgl_all, SIGNAL(triggered()), this, SLOT(aglallWinShow()));
connect(ui->actionHelp, SIGNAL(triggered()), this, SLOT(helpWindow()));
connect(ui->actionSettings, SIGNAL(triggered()), this, SLOT(settingsWinShow()));
connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(aboutWin()));
}
void MainWindow::createAtomTypes()
@ -967,3 +969,10 @@ void MainWindow::aglallWinShow()
aglallWin = new AglAllWindow(this, mm_agl_path);
aglallWin->show();
}
void MainWindow::helpWindow()
{
HelpWindow *helpWindow;
helpWindow = new HelpWindow(this);
helpWindow->show();
}

View File

@ -86,11 +86,12 @@ private slots:
// completion
void on_tabWidget_currentChanged(int index);
// window signals
void createAtomTypes();
void createAgglFile();
void aboutWin();
void settingsWinShow();
void aglallWinShow();
void createAgglFile();
void createAtomTypes();
void settingsWinShow();
void helpWindow();
private:
Ui::MainWindow *ui;

View File

@ -3710,6 +3710,7 @@
<property name="title">
<string>Help</string>
</property>
<addaction name="actionHelp"/>
<addaction name="actionAbout"/>
</widget>
<addaction name="menuMenu"/>
@ -3755,6 +3756,14 @@
<string>agl_all</string>
</property>
</action>
<action name="actionHelp">
<property name="text">
<string>&amp;Help</string>
</property>
<property name="shortcut">
<string>F1</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<tabstops>

View File

@ -19,7 +19,8 @@ HEADERS += mainwindow.h \
aboutwindow.h \
statgengraphwindow.h \
settingswindow.h \
aglallwindow.h
aglallwindow.h \
helpwindow.h
FORMS += mainwindow.ui \
errorwindow.ui \
atomtypeswindow.ui \
@ -27,7 +28,8 @@ FORMS += mainwindow.ui \
aboutwindow.ui \
statgengraphwindow.ui \
settingswindow.ui \
aglallwindow.ui
aglallwindow.ui \
helpwindow.ui
SOURCES += main.cpp mainwindow.cpp \
errorwindow.cpp \
clear_items.cpp \
@ -38,7 +40,8 @@ SOURCES += main.cpp mainwindow.cpp \
aboutwindow.cpp \
statgengraphwindow.cpp \
settingswindow.cpp \
aglallwindow.cpp
aglallwindow.cpp \
helpwindow.cpp
TRANSLATIONS += rus.ts \
eng.ts

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 2.8.1, 2013-08-30T19:09:45. -->
<!-- Written by QtCreator 2.8.1, 2013-08-30T20:53:17. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>

View File

@ -127,7 +127,7 @@ int printing_head (const char *output, const int log, const int quiet, const int
FILE *f_out;
f_out = fopen (output, "w");
fprintf (f_out, "radf ::: V.1.0.1 ::: 2013-07-23\n\n");
fprintf (f_out, "radf ::: V.1.0.3\n\n");
fprintf (f_out, "CONFIGURATION\n");
fprintf (f_out, "LOG=%i\nQUIET=%i\nMATRIX=%i\n", log, quiet, matrix);

View File

@ -92,7 +92,7 @@ int printing_head (const char *output, const int log, const int quiet,
FILE *f_out;
f_out = fopen (output, "w");
fprintf (f_out, "statgen ::: V.1.0.1 ::: 2013-07-23\n\n");
fprintf (f_out, "statgen ::: V.1.0.3\n\n");
fprintf (f_out, "CONFIGURATION\n");
fprintf (f_out, "LOG=%i\nQUIET=%i\n", log, quiet);

View File

@ -2,8 +2,8 @@
func_help() {
echo -e "\nUsage: update_ver.sh -o OLDVER -n NEWVER"
echo -e "\nRequired parameters:"
echo -e " -o --oldver - path to GIT repository"
echo -e " -n --newver - time to sleep"
echo -e " -o --oldver - old version"
echo -e " -n --newver - new version"
echo -e "\nAdditional parametrs:"
echo -e " -h --help - show this help and exit"
exit 1
@ -38,10 +38,21 @@ fi
# work block
COMPONENTS=(mm_agl mm_envir mm_radf mm_statgen mm_trj mm_trj2pdb)
for COMPONENT in ${COMPONENTS[*]}; do
# help message
sed -i "s/Version : $OLDVER/Version : $NEWVER/g" $COMPONENT/src/main.c
# head in output
sed -i "s/V.$OLDVER/V.$NEWVER/g" $COMPONENT/src/add_main.c
# readme
sed -i "s/Version: $OLDVER/Version: $NEWVER/g" $COMPONENT/README
# documentation
sed -i "s/V.$OLDVER/V.$NEWVER/g" $COMPONENT/$COMPONENT.doxygen
done
# update documentation
./update_docs.sh
COMPONENT=mathmech
# about window
sed -i "s/$OLDVER/$NEWVER/g" $COMPONENT/resources/translations/eng.ts
sed -i "s/$OLDVER/$NEWVER/g" $COMPONENT/resources/translations/rus.ts
# readme
sed -i "s/Version: $OLDVER/Version: $NEWVER/g" $COMPONENT/README