Changeset 7d416a0d in OpenModelica


Ignore:
Timestamp:
2016-04-08T16:46:04+02:00 (8 years ago)
Author:
Adeel Asghar <adeel.asghar@…>
Branches:
Added-citation-metadata, maintenance/v1.14, maintenance/v1.15, maintenance/v1.16, maintenance/v1.17, maintenance/v1.18, maintenance/v1.19, maintenance/v1.20, maintenance/v1.21, maintenance/v1.22, maintenance/v1.23, master, omlib-staging
Children:
0a1303a
Parents:
08c9f97
Message:

documentation & formatting.

Location:
OMEdit/OMEditGUI
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • OMEdit/OMEditGUI/Options/NotificationsDialog.cpp

    r08c9f97 r7d416a0d  
    3939
    4040/*!
    41   \class NotificationsDialog
    42   \brief Creates a notification dialog.
    43 
    44   Define a new notification type if you want to add a new Dialog.\n
    45   Also add the notification to NotificationPage class.\n
    46   Save the notification in omedit.ini settings file by defining a new key in notifications section.
    47   */
    48 
    49 /*!
    50   \param notificationType - specifies what type of notification dialog should be created.
    51   \param notificationIcon - specifies which icon should be used.
    52   \param pMainWindow - pointer to MainWindow.
    53   */
     41 * \class NotificationsDialog
     42 * \brief Creates a notification dialog.
     43
     44 * Define a new notification type if you want to add a new Dialog.\n
     45 * Also add the notification to NotificationPage class.\n
     46 * Save the notification in omedit.ini settings file by defining a new key in notifications section.
     47 */
     48/*!
     49 * \brief NotificationsDialog::NotificationsDialog
     50 * \param notificationType - specifies what type of notification dialog should be created.
     51 * \param notificationIcon - specifies which icon should be used.
     52 * \param pMainWindow - pointer to MainWindow.
     53 */
    5454NotificationsDialog::NotificationsDialog(NotificationType notificationType, NotificationIcon notificationIcon, MainWindow *pMainWindow)
    5555  : QDialog(pMainWindow)
     
    9494
    9595/*!
    96   Sets the notification dialog message.
    97   \param label - the message to set.
    98   */
     96 * \brief NotificationsDialog::setNotificationLabelString
     97 * Sets the notification dialog message.
     98 * \param label - the message to set.
     99 */
    99100void NotificationsDialog::setNotificationLabelString(QString label)
    100101{
     
    103104
    104105/*!
    105   Returns the notification icon.
    106   \param notificationIcon - the notificaiton icon to set.
    107   \return the notificaiton icon as QPixmap
    108   */
     106 * \brief NotificationsDialog::getNotificationIcon
     107 * Returns the notification icon.
     108 * \param notificationIcon - the notificaiton icon to set.
     109 * \return the notificaiton icon as QPixmap
     110 */
    109111QPixmap NotificationsDialog::getNotificationIcon(NotificationsDialog::NotificationIcon notificationIcon)
    110112{
     
    112114  int iconSize = pStyle->pixelMetric(QStyle::PM_MessageBoxIconSize, 0, this);
    113115  QIcon tmpIcon;
    114   switch (notificationIcon)
    115   {
     116  switch (notificationIcon) {
    116117    case NotificationsDialog::InformationIcon:
    117118      tmpIcon = pStyle->standardIcon(QStyle::SP_MessageBoxInformation, 0, this);
     
    128129      break;
    129130  }
    130   if (!tmpIcon.isNull())
     131  if (!tmpIcon.isNull()) {
    131132    return tmpIcon.pixmap(iconSize, iconSize);
     133  }
    132134  return QPixmap();
    133135}
    134136
    135137/*!
    136   Returns the notification dialog title.
    137   \return the title string.
    138   */
     138 * \brief NotificationsDialog::getNotificationTitleString
     139 * Returns the notification dialog title.
     140 * \return the title string.
     141 */
    139142QString NotificationsDialog::getNotificationTitleString()
    140143{
    141   switch (mNotificationType)
    142   {
     144  switch (mNotificationType) {
    143145    case NotificationsDialog::QuitApplication:
    144146      return tr("Confirm Quit");
     
    155157
    156158/*!
    157   Returns the notification dialog message.
    158   \return the message string.
    159   */
     159 * \brief NotificationsDialog::getNotificationLabelString
     160 * Returns the notification dialog message.
     161 * \return the message string.
     162 */
    160163QString NotificationsDialog::getNotificationLabelString()
    161164{
    162   QString tmpPath, OMCCommunicationLogFilePath, OMCCommandsLogFilePath, OMCOutputFile, stackTraceFile;
    163   switch (mNotificationType)
    164   {
     165  switch (mNotificationType) {
    165166    case NotificationsDialog::QuitApplication:
    166167      return tr("Are you sure you want to quit?");
     
    179180
    180181/*!
    181   Returns the notification dialog checkbox.
    182   \return the checkbox.
    183   */
    184 QCheckBox* NotificationsDialog::getNotificationCheckBox()
    185 {
    186   return mpNotificationCheckBox;
    187 }
    188 
    189 /*!
    190   Returns the notification dialog checkbox message.
    191   \return the checkbox message string.
    192   */
     182 * \brief NotificationsDialog::getNotificationCheckBoxString
     183 * Returns the notification dialog checkbox message.
     184 * \return the checkbox message string.
     185 * \return
     186 */
    193187QString NotificationsDialog::getNotificationCheckBoxString()
    194188{
    195   switch (mNotificationType)
    196   {
     189  switch (mNotificationType) {
    197190    case NotificationsDialog::QuitApplication:
    198191      return tr("Always quit without prompt");
     
    209202
    210203/*!
    211   Saves the promptQuitApplication key settings to omedit.ini file.
    212   */
     204 * \brief NotificationsDialog::saveQuitNotificationSettings
     205 * Saves the promptQuitApplication key settings to omedit.ini file.
     206 */
    213207void NotificationsDialog::saveQuitNotificationSettings()
    214208{
     
    218212
    219213/*!
    220   Saves the notifications/itemDroppedOnItself key settings to omedit.ini file.\n
    221   Sets the notifications/itemDroppedOnItself notification checkbox on the NotificationsPage.
    222   */
     214 * \brief NotificationsDialog::saveItemDroppedOnItselfNotificationSettings
     215 * Saves the notifications/itemDroppedOnItself key settings to omedit.ini file.\n
     216 * Sets the notifications/itemDroppedOnItself notification checkbox on the NotificationsPage.
     217 */
    223218void NotificationsDialog::saveItemDroppedOnItselfNotificationSettings()
    224219{
     
    229224
    230225/*!
    231   Saves the notifications/replaceableIfPartial key settings to omedit.ini file.\n
    232   Sets the notifications/replaceableIfPartial notification checkbox on the NotificationsPage.
    233   */
     226 * \brief NotificationsDialog::saveReplaceableIfPartialNotificationSettings
     227 * Saves the notifications/replaceableIfPartial key settings to omedit.ini file.\n
     228 * Sets the notifications/replaceableIfPartial notification checkbox on the NotificationsPage.
     229 */
    234230void NotificationsDialog::saveReplaceableIfPartialNotificationSettings()
    235231{
     
    240236
    241237/*!
    242   Saves the notifications/innerModelNameChanged key settings to omedit.ini file.\n
    243   Sets the notifications/innerModelNameChanged notification checkbox on the NotificationsPage.
    244   */
     238 * \brief NotificationsDialog::saveInnerModelNameChangedNotificationSettings
     239 * Saves the notifications/innerModelNameChanged key settings to omedit.ini file.\n
     240 * Sets the notifications/innerModelNameChanged notification checkbox on the NotificationsPage.
     241 */
    245242void NotificationsDialog::saveInnerModelNameChangedNotificationSettings()
    246243{
     
    251248
    252249/*!
    253   Saves the notifications/saveModelForBitmapInsertion key settings to omedit.ini file.\n
    254   Sets the notifications/saveModelForBitmapInsertion notification checkbox on the NotificationsPage.
    255   */
     250 * \brief NotificationsDialog::saveModelForBitmapInsertionNotificationSettings
     251 * Saves the notifications/saveModelForBitmapInsertion key settings to omedit.ini file.\n
     252 * Sets the notifications/saveModelForBitmapInsertion notification checkbox on the NotificationsPage.
     253 */
    256254void NotificationsDialog::saveModelForBitmapInsertionNotificationSettings()
    257255{
     
    262260
    263261/*!
    264   Slot activated when mpOkButton clicked signal is raised.\n
    265   Checks the notification type and calls the appropriate method.
    266   */
     262 * \brief NotificationsDialog::saveNotification
     263 * Slot activated when mpOkButton clicked signal is raised.\n
     264 * Checks the notification type and calls the appropriate method.
     265 */
    267266void NotificationsDialog::saveNotification()
    268267{
  • OMEdit/OMEditGUI/Options/NotificationsDialog.h

    r7639b9b6 r7d416a0d  
    5555  NotificationsDialog(NotificationType notificationType, NotificationIcon notificationIcon, MainWindow *pMainWindow);
    5656  void setNotificationLabelString(QString label);
    57   QCheckBox* getNotificationCheckBox();
     57  QCheckBox* getNotificationCheckBox() {mpNotificationCheckBox;}
    5858private:
    5959  MainWindow *mpMainWindow;
  • OMEdit/OMEditGUI/Resources/css/stylesheet.qss

    r08c9f97 r7d416a0d  
    2828 * See the full OSMC Public License conditions for more details.
    2929 *
     30 */
     31/*
     32 * @author Adeel Asghar <adeel.asghar@liu.se>
    3033 */
    3134
Note: See TracChangeset for help on using the changeset viewer.