Skip to content

Commit

Permalink
typewriter sound plays only on text change.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stepan Kuzmin committed Aug 2, 2011
1 parent 16d5587 commit 1423adf
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 18 deletions.
11 changes: 0 additions & 11 deletions main.cpp
Expand Up @@ -5,18 +5,7 @@ int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setApplicationName("ZenWriter");

ZenWriter w;

// Set default background
/*
QPalette palette;
QString appDir = QApplication::applicationDirPath();
palette.setBrush(w.backgroundRole(),QBrush(QImage(appDir +"/images/winter.jpg")));
w.setPalette(palette);
*/

w.show();
//w.showFullScreen();
return a.exec();
}
2 changes: 1 addition & 1 deletion zenwriter.cpp
Expand Up @@ -48,7 +48,7 @@ void ZenWriter::on_actionSave_as_activated()
on_actionSave_activated();
}

void ZenWriter::on_plainTextEdit_cursorPositionChanged()
void ZenWriter::on_plainTextEdit_textChanged()
{
this->typewriter->play();
}
Expand Down
2 changes: 1 addition & 1 deletion zenwriter.h
Expand Up @@ -28,7 +28,7 @@ private slots:

void on_actionQuit_activated();

void on_plainTextEdit_cursorPositionChanged();
void on_plainTextEdit_textChanged();

private:
QFile file;
Expand Down
5 changes: 0 additions & 5 deletions zenwriter.ui
Expand Up @@ -105,11 +105,6 @@ background: url(:/images/winter.jpg) no-repeat top left;
<string>Ctrl+Shift+S</string>
</property>
</action>
<action name="action">
<property name="text">
<string>-</string>
</property>
</action>
<action name="actionQuit">
<property name="text">
<string>Quit</string>
Expand Down

0 comments on commit 1423adf

Please sign in to comment.