author | drw <drw> | 2002-12-22 17:03:27 (UTC) |
---|---|---|
committer | drw <drw> | 2002-12-22 17:03:27 (UTC) |
commit | c8a5bdd7d4b7de88708e88df797bd494eb6f7e71 (patch) (side-by-side diff) | |
tree | 7e3468f1dd9afab3a1ccad2978c628b2d737fc1d /core/pim/todo/mainwindow.cpp | |
parent | 5377a2c897ae67ec2cd0cf8e57da9037366efe67 (diff) | |
download | opie-c8a5bdd7d4b7de88708e88df797bd494eb6f7e71.zip opie-c8a5bdd7d4b7de88708e88df797bd494eb6f7e71.tar.gz opie-c8a5bdd7d4b7de88708e88df797bd494eb6f7e71.tar.bz2 |
QWhatsThis for main task view and toolbars.
Diffstat (limited to 'core/pim/todo/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/todo/mainwindow.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index 0ccf73e..d16d1ac 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp @@ -18,35 +18,35 @@ ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <unistd.h> -#include <stdio.h> #include <qmenubar.h> #include <qmessagebox.h> #include <qtoolbar.h> #include <qpopupmenu.h> #include <qwidgetstack.h> #include <qaction.h> #include <qtimer.h> #include <qvbox.h> #include <qlineedit.h> +#include <qwhatsthis.h> #include <qpe/applnk.h> #include <qpe/config.h> #include <qpe/ir.h> #include <qpe/resource.h> #include <qpe/qpemessagebox.h> #include <qpe/qpetoolbar.h> #include <opie/orecur.h> #include <opie/otodoaccessvcal.h> #include "quickeditimpl.h" @@ -54,27 +54,26 @@ #include "templateeditor.h" #include "tableview.h" #include "textviewshow.h" #include "todoeditor.h" #include "mainwindow.h" using namespace Todo; MainWindow::MainWindow( QWidget* parent, const char* name ) - : OPimMainWindow("Todolist", parent, name) + : OPimMainWindow( "Todolist", parent, name, WType_TopLevel | WStyle_ContextHelp ) { - m_syncing = false; m_counter = 0; m_tempManager = new TemplateManager(); m_tempManager->load(); initUI(); initConfig(); initViews(); initActions(); initEditor(); initShow(); initTemplate(); @@ -87,46 +86,49 @@ void MainWindow::initTemplate() { m_curTempEd = new TemplateEditor( this, templateManager() ); } void MainWindow::initActions() { // Data menu m_edit->insertItem(tr("New from template"), m_template, -1, 0 ); QAction* a = new QAction( tr("New Task" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 ); connect(a, SIGNAL( activated() ), this, SLOT( slotNew() ) ); + a->setWhatsThis( tr( "Click here to create a new task." ) ); a->addTo(m_tool ); a->addTo(m_edit ); a = new QAction( tr("Edit Task"), Resource::loadIconSet( "edit" ), QString::null, 0, this, 0 ); connect(a, SIGNAL(activated() ), this, SLOT( slotEdit() ) ); + a->setWhatsThis( tr( "Click here to modify the current task." ) ); a->addTo( m_tool ); a->addTo( m_edit ); m_editAction = a; a = new QAction( QString::null, tr("View Task"), 0, this, 0 ); connect(a, SIGNAL( activated() ), this, SLOT( slotShowDetails() ) ); a->addTo( m_edit ); m_edit->insertSeparator(); a = new QAction( tr("Delete..."), Resource::loadIconSet( "trash" ), QString::null, 0, this, 0 ); connect(a, SIGNAL(activated() ), this, SLOT(slotDelete() ) ); + a->setWhatsThis( tr( "Click here to remove the current task." ) ); a->addTo( m_tool ); a->addTo( m_edit ); m_deleteAction = a; a = new QAction( QString::null, tr("Delete all..."), 0, this, 0 ); connect(a, SIGNAL( activated() ), this, SLOT( slotDeleteAll() ) ); a->addTo(m_edit ); m_deleteAllAction = a; a = new QAction( QString::null, tr("Delete completed"), 0, this, 0 ); @@ -138,30 +140,29 @@ void MainWindow::initActions() { m_edit->insertSeparator(); a = new QAction( QString::null, tr("Duplicate"), 0, this, 0 ); connect(a, SIGNAL( activated() ), this, SLOT( slotDuplicate() ) ); a->addTo(m_edit ); m_duplicateAction = a; m_edit->insertSeparator(); if ( Ir::supported() ) { - a = new QAction( tr( "Beam" ), Resource::loadPixmap( "beam" ), - QString::null, 0, this, 0 ); - connect( a, SIGNAL( activated() ), - this, SLOT( slotBeam() ) ); - a->addTo( m_edit ); - a->addTo( m_tool ); + a = new QAction( tr( "Beam" ), Resource::loadPixmap( "beam" ), QString::null, 0, this, 0 ); + connect( a, SIGNAL( activated() ), this, SLOT( slotBeam() ) ); + a->setWhatsThis( tr( "Click here to send the current task to another device." ) ); + a->addTo( m_edit ); + a->addTo( m_tool ); } // Options menu a = new QAction( tr("Find"), Resource::loadIconSet( "mag" ), QString::null, 0, this, 0 ); connect(a, SIGNAL( activated() ), this, SLOT( slotFind() ) ); a->addTo( m_options ); m_findAction = a; m_options->insertSeparator(); m_completedAction = new QAction( QString::null, tr("Show completed tasks"), @@ -227,24 +228,25 @@ void MainWindow::initUI() { m_template = new QPopupMenu( this ); m_catMenu->setCheckable( TRUE ); m_template->setCheckable( TRUE ); connect(m_catMenu, SIGNAL(activated(int) ), this, SLOT(setCategory(int) ) ); connect(m_template, SIGNAL(activated(int) ), this, SLOT(slotNewFromTemplate(int) ) ); } void MainWindow::initViews() { TableView* tableView = new TableView( this, m_stack ); + QWhatsThis::add( tableView, tr( "This is a listing of all current tasks.\n\nThe list displays the following information:\n1. Completed - A green checkmark indicates task is completed. Click here to complete a task.\n2. Priority - a graphical representation of task priority. Double-click here to modify.\n3. Description - description of task. Click here to select the task.\n4. Deadline - shows when task is due. This column can be shown or hidden by selecting Options->'Show task deadlines' from the menu above." ) ); m_stack->addWidget( tableView, m_counter++ ); m_views.append( tableView ); m_curView = tableView; connectBase( tableView ); /* add QString type + QString configname to * the View menu * and subdirs for multiple views */ } void MainWindow::initEditor() { m_curEdit = new Editor(); } |