KoVersionDialog::KoVersionDialog(QWidget* parent, KoDocument *doc)
        : KoDialog(parent)
{
    setCaption(i18n("Version"));
    setButtons(Close);
    setDefaultButton(Close);
    m_doc = doc;

    QWidget* page = new QWidget(this);
    setMainWidget(page);
    setModal(true);

    QGridLayout* grid1 = new QGridLayout(page);

    list = new QTreeWidget(page);
    list->setColumnCount(3);
    QStringList h;
    h.append(i18n("Date & Time"));
    h.append(i18n("Saved By"));
    h.append(i18n("Comment"));
    list->setHeaderLabels(h);

    updateVersionList();

    grid1->addWidget(list, 0, 0, 9, 1);

    m_pAdd = new QPushButton(i18n("&Add"), page);
    grid1->addWidget(m_pAdd, 1, 2);

    m_pRemove = new QPushButton(i18n("&Remove"), page);
    grid1->addWidget(m_pRemove, 2, 2);

    m_pModify = new QPushButton(i18n("&Modify"), page);
    grid1->addWidget(m_pModify, 3, 2);

    m_pOpen = new QPushButton(i18n("&Open"), page);
    grid1->addWidget(m_pOpen, 4, 2);


    connect(m_pRemove, SIGNAL(clicked()), this, SLOT(slotRemove()));
    connect(m_pAdd, SIGNAL(clicked()), this, SLOT(slotAdd()));
    connect(m_pOpen, SIGNAL(clicked()), this, SLOT(slotOpen()));
    connect(m_pModify, SIGNAL(clicked()), this, SLOT(slotModify()));
    connect(list, SIGNAL(itemActivated(QTreeWidgetItem *, int)), this, SLOT(slotOpen()));

    updateButton();

    resize(600, 250);

}
Beispiel #2
0
BGAdvancedDialog::BGAdvancedDialog(KBackgroundRenderer *_r,
                                   QWidget *parent,
                                   bool m_multidesktop)
    : KDialogBase(parent, "BGAdvancedDialog",
                  true, i18n("Advanced Background Settings"),
                  Ok | Cancel, Ok, true),
      r(_r)
{
   dlg = new BGAdvancedBase(this);
   setMainWidget(dlg);

   dlg->m_listPrograms->header()->setStretchEnabled ( true, 1 );
   dlg->m_listPrograms->setAllColumnsShowFocus(true);

   connect(dlg->m_listPrograms, SIGNAL(clicked(QListViewItem *)),
         SLOT(slotProgramItemClicked(QListViewItem *)));

   // Load programs
   QStringList lst = KBackgroundProgram::list();
   QStringList::Iterator it;
   for (it=lst.begin(); it != lst.end(); ++it)
      addProgram(*it);

   if (m_multidesktop)
   {
      KConfig cfg(desktopConfigname(), false, false);
      cfg.setGroup( "General" );
      if (!cfg.readBoolEntry( "Enabled", true ))
      {
         dlg->m_groupIconText->hide();
      }

      dlg->m_spinCache->setSteps(512, 1024);
      dlg->m_spinCache->setRange(0, 40960);
      dlg->m_spinCache->setSpecialValueText(i18n("Unlimited"));
      dlg->m_spinCache->setSuffix(i18n(" KB"));

      connect(dlg->m_buttonAdd, SIGNAL(clicked()),
         SLOT(slotAdd()));
      connect(dlg->m_buttonRemove, SIGNAL(clicked()),
         SLOT(slotRemove()));
      connect(dlg->m_buttonModify, SIGNAL(clicked()),
         SLOT(slotModify()));

      connect(dlg->m_listPrograms, SIGNAL(doubleClicked(QListViewItem *)),
         SLOT(slotProgramItemDoubleClicked(QListViewItem *)));
   }
   else
   {
Beispiel #3
0
int qtbook::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QMainWindow::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: slotResizeColumns(); break;
        case 1: slotDisplaySummary(); break;
        case 2: slotExit(); break;
        case 3: slotAbout(); break;
        case 4: slotAllGo(); break;
        case 5: slotQuery(); break;
        case 6: slotReset(); break;
        case 7: slotDelete(); break;
        case 8: slotModify(); break;
        case 9: slotSearch(); break;
        case 10: slotRefresh(); break;
        case 11: slotRequest(); break;
        case 12: slotAddAdmin(); break;
        case 13: slotCheckout(); break;
        case 14: slotCDSearch(); break;
        case 15: slotInsertCD(); break;
        case 16: slotNextPage(); break;
        case 17: slotSaveUser(); break;
        case 18: slotSetFonts(); break;
        case 19: slotShowGrid(); break;
        case 20: slotShowMenu(); break;
        case 21: slotShowNext(); break;
        case 22: slotShowPrev(); break;
        case 23: slotConnectDB(); break;
        case 24: slotCopyError(); break;
        case 25: slotDVDSearch(); break;
        case 26: slotDuplicate(); break;
        case 27: slotInsertMag(); break;
        case 28: slotInsertDVD(); break;
        case 29: slotMagSearch(); break;
        case 30: slotPrintView(); break;
        case 31: slotBookSearch(); break;
        case 32: slotChangeView((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 33: slotDisconnect(); break;
        case 34: slotInsertBook(); break;
        case 35: slotSaveConfig(); break;
        case 36: slotSetColumns(); break;
        case 37: slotAddBorrower(); break;
        case 38: slotDeleteAdmin(); break;
        case 39: slotExportAsCSV(); break;
        case 40: slotJournSearch(); break;
        case 41: slotPageClicked((*reinterpret_cast< const QString(*)>(_a[1]))); break;
        case 42: slotViewDetails(); break;
        case 43: slotReserveCopy(); break;
        case 44: slotShowColumns(); break;
        case 45: slotShowHistory(); break;
        case 46: slotInsertJourn(); break;
        case 47: slotPreviousPage(); break;
        case 48: slotRemoveMember(); break;
        case 49: slotSavePassword(); break;
        case 50: slotCancelAddUser(); break;
        case 51: slotBranchChanged(); break;
        case 52: slotPrintReserved(); break;
        case 53: slotResetErrorLog(); break;
        case 54: slotModifyBorrower(); break;
        case 55: slotSectionResized((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3]))); break;
        case 56: slotAutoPopOnFilter(); break;
        case 57: slotClearSqliteMenu((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 58: slotGrantPrivileges(); break;
        case 59: slotInsertVideoGame(); break;
        case 60: slotShowAdminDialog(); break;
        case 61: slotShowCustomQuery(); break;
        case 62: slotShowErrorDialog(); break;
        case 63: slotVideoGameSearch(); break;
        case 64: slotListOverdueItems(); break;
        case 65: slotRefreshAdminList(); break;
        case 66: slotResetLoginDialog(); break;
        case 67: slotShowConnectionDB(); break;
        case 68: slotListReservedItems(); break;
        case 69: slotExecuteCustomQuery(); break;
        case 70: slotSaveAdministrators(); break;
        case 71: slotSelectDatabaseFile(); break;
        case 72: slotShowChangePassword(); break;
        case 73: slotShowDbEnumerations(); break;
        case 74: slotShowMembersBrowser(); break;
        case 75: slotSqliteFileSelected((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 76: slotCloseMembersBrowser(); break;
        case 77: slotAdminCheckBoxClicked((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 78: slotSceneSelectionChanged(); break;
        case 79: slotCloseCustomQueryDialog(); break;
        case 80: slotDisplayNewSqliteDialog(); break;
        case 81: slotPopulateMembersBrowser(); break;
        case 82: slotResizeColumnsAfterSort(); break;
        case 83: slotUpdateIndicesAfterSort((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 84: slotPrintReservationHistory(); break;
        default: ;
        }
        _id -= 85;
    }
    return _id;
}