示例#1
0
EvaQunMemberPicker::EvaQunMemberPicker(TQWidget * parent, const char * name, WFlags fl, Qun *qun )
	: EvaQunMemberPickerUI( parent, name, fl )
{
	mQun = qun;
	initListView();
	updateBuddyListView();
}
示例#2
0
文件: UI.cpp 项目: baokuanze/UIdemo
bool UI::initWithTag(int tag){
    if (!cocos2d::Scene::init()) {
        return false;
    }
    switch (tag) {
        case 1:
            initScale9Sprite();
            break;
            
        case 2:
            initListView();
            break;
            
        case 3:
            initLoadingBar();
            break;
            
        case 4:
            initPageView();
            break;
            
        case 5:
            initSliderView();
            break;
            
        case 6:
            initButton();
            break;
            
        case 7:
            initCheckBox();
            break;
            
        case 8:
            initImageView();
            break;
            
        case 9:
            initEditBox();
            break;
            
        case 10:
            initSrollView();
            break;
            
        case 11:
            initLayout();
            break;
        
            
        default:
            break;
    }
    
    
    
    
    return true;
}
示例#3
0
MyShareFilesDialog::MyShareFilesDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::MyShareFilesDialog)
{
    ui->setupUi(this);
    initListView();
    createActions();
}
DirMappingWidget::DirMappingWidget(QWidget* parent, const char* name)
  : QWidget(parent, name)
{
  QVBoxLayout* mainLayout = new QVBoxLayout(this, 10, 10);

  m_listView = new KListView(this);
  mainLayout->addWidget(m_listView);

  QGridLayout* grid = new QGridLayout(0, 2, 2, 3, 5);

  QLabel* label = new QLabel(this);
  label->setText(i18n("Local dir:"));
  grid->addWidget(label, 0, 0);

  m_edLocalDir = new KURLRequester(this);
  m_edLocalDir->setMode(KFile::Directory);
  grid->addWidget(m_edLocalDir, 0, 1);

  label = new QLabel(this);
  label->setText(i18n("Remote dir:"));
  grid->addWidget(label, 1, 0);

  m_edRemoteDir = new KLineEdit(this);
  grid->addWidget(m_edRemoteDir, 1, 1);


  mainLayout->addLayout(grid);

  QHBoxLayout* hbox = new QHBoxLayout(this, 0, 3);

  m_btAdd = new QPushButton(this);
  m_btAdd->setText(i18n("Add"));
  hbox->addWidget(m_btAdd);

  m_btUpdate = new QPushButton(this);
  m_btUpdate->setText(i18n("Update"));
  hbox->addWidget(m_btUpdate);

  m_btRemove = new QPushButton(this);
  m_btRemove->setText(i18n("Remove"));
  hbox->addWidget(m_btRemove);

  mainLayout->addLayout(hbox);

  initListView();

  connect(m_btAdd, SIGNAL(clicked()), this, SLOT(slotAdd()));
  connect(m_btUpdate, SIGNAL(clicked()), this, SLOT(slotUpdate()));
  connect(m_btRemove, SIGNAL(clicked()), this, SLOT(slotRemove()));
  
  connect(m_listView, SIGNAL(selectionChanged()), this, 
      SLOT(slotSelectionChanged()));

  m_btRemove->setEnabled(false);
  m_btUpdate->setEnabled(false);
}
HiddenFileView::HiddenFileView(ShareDlgImpl* shareDlg, SambaShare* share)
{
  _share = share;
  _dlg = shareDlg;

  _hiddenActn = new KToggleAction(i18n("&Hide"));
  _vetoActn = new KToggleAction(i18n("&Veto"));
  _vetoOplockActn = new KToggleAction(i18n("&Veto Oplock"));

  initListView();

  _dlg->hiddenChk->setTristate(true);
  _dlg->vetoChk->setTristate(true);

  connect( _dlg->hiddenChk, SIGNAL(toggled(bool)), this, SLOT( hiddenChkClicked(bool) ));
  connect( _dlg->vetoChk, SIGNAL(toggled(bool)), this, SLOT( vetoChkClicked(bool) ));
  connect( _dlg->vetoOplockChk, SIGNAL(toggled(bool)), this, SLOT( vetoOplockChkClicked(bool) ));

  _dlg->hiddenEdit->setText( _share->getValue("hide files") );
  connect( _dlg->hiddenEdit, SIGNAL(textChanged(const QString &)), this, SLOT(updateView()));

  _dlg->vetoEdit->setText( _share->getValue("veto files") );
  connect( _dlg->vetoEdit, SIGNAL(textChanged(const QString &)), this, SLOT(updateView()));

  _dlg->vetoOplockEdit->setText( _share->getValue("veto oplock files") );
  connect( _dlg->vetoOplockEdit, SIGNAL(textChanged(const QString &)), this, SLOT(updateView()));

//  new QLabel(i18n("Hint")+" : ",grid);
//  new QLabel(i18n("You have to separate the entries with a '/'. You can use the wildcards '*' and '?'"),grid);
//  new QLabel(i18n("Example")+" : ",grid);
//  new QLabel(i18n("*.tmp/*SECRET*/.*/file?.*/"),grid);

  _dir = new KDirLister(true);
  _dir->setShowingDotFiles(true);

  connect( _dir, SIGNAL(newItems(const KFileItemList &)),
           this, SLOT(insertNewFiles(const KFileItemList &)));

  connect( _dir, SIGNAL(deleteItem(KFileItem*)),
           this, SLOT(deleteItem(KFileItem*)));

  connect( _dir, SIGNAL(refreshItems(const KFileItemList &)),
           this, SLOT(refreshItems(const KFileItemList &)));

  connect( _hiddenActn, SIGNAL(toggled(bool)), this, SLOT(hiddenChkClicked(bool)));
  connect( _vetoActn, SIGNAL(toggled(bool)), this, SLOT(vetoChkClicked(bool)));
  connect( _vetoOplockActn, SIGNAL(toggled(bool)), this, SLOT(vetoOplockChkClicked(bool)));
}